Available since CUDA 5.5
Formerly known as CUDA Proxy
Allows multiple CUDA processes to share a single GPU context
Pre-CUDA 4.0 APIs are not supported
Requirements
Unified Virtual Address (UVA)
x86-64
Compute capability - 3.5 or higher
-
MPS is not required to use MPI
-
If you don't use MPS, but you launch multiple MPI ranks per node (i.e. per GPU), then if you have the compute mode set to default, then your GPU activity will serialize. If you have your compute mode set to EXCLUSIVE_PROCESS or EXCLUSIVE_THREAD, you'll get errors when multiple MPI ranks attempt to use a single GPU.
- do I have to launch MPS-daemon before my application will launched, or do I have to launch MPS-daemon from my application, or MPS-daemon will started automatically when I have launched my app?
You must launch the daemon before your run.You may want to read the documentation in particular section 4.1.2
The necessary instructions are contained in the documentation for the MPS service. You'll note that those instructions don't really depend on or call out MPI, so there really isn't anything MPI-specific about them.
Here's a walkthrough/example.
-
Read section 2.3 of the above-linked documentation for various requirements and restrictions. I recommend using CUDA 7, 7.5, or later for this. There were some configuration differences with prior versions of CUDA MPS that I won't cover here. Also, I'll demonstrate just using a single server/single GPU. The machine I am using for test is a CentOS 6.2 node using a K40c (cc3.5/Kepler) GPU, with CUDA 7.0. There are other GPUs in the node. In my case, the CUDA enumeration order places my K40c at device 0, but the nvidia-smi enumeration order happens to place it as id 2 in the order. All of these details matter in a system with multiple GPUs, impacting the scripts given below.
鏈接中有例子,說明如何使用 Nvidia MPS
http://stackoverflow.com/questions/34709749/how-do-i-use-nvidia-multi-process-service-mps-to-run-multiple-non-mpi-cuda-app
http://on-demand.gputechconf.com/gtc/2015/presentation/S5584-Priyanka-Sah.pdf
問題是,
1、如何運行 MPS? 有沒有一個流程,比如 hello world?
2、Jcuda里面有沒有?如果有,怎么用?萬一沒有,怎么辦