找到了救命的东西 NVIDIA MPS (multi-process service)
Posted 杏子肥
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了找到了救命的东西 NVIDIA MPS (multi-process service)相关的知识,希望对你有一定的参考价值。
-
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里面有没有?如果有,怎么用?万一没有,怎么办
以上是关于找到了救命的东西 NVIDIA MPS (multi-process service)的主要内容,如果未能解决你的问题,请参考以下文章
如何从 Docker 容器连接到 Nvidia MPS 服务器?
如何使用 Nvidia 多进程服务 (MPS) 运行多个非 MPI CUDA 应用程序?