找到了救命的東西 NVIDIA MPS (multi-process service)


 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

 

 

  1. MPS is not required to use MPI

  2. 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.

  3. 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.

  1. 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里面有沒有?如果有,怎么用?萬一沒有,怎么辦

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM