4

Suppose I have a laptop with nvcc and CUDA Toolkit installed, and a network of 16 PCs with Nvidia GPUs and MPI. The PCs aren't aware of CUDA, they just have regular Nvidia drivers and supporting software.

I'd like to develop an MPI application for this network. The PCs are going to acquire tasks via MPI and use their GPUs to do these tasks. I plan to develop the CUDA part on my laptop, compile it in a static library and later link this static library at a PC using mpicxx compiler.

However, I can't find any evidence that such deployment is possible. On the contrary, most of the examples of so called separate compilation require CUDA installed for the final step (linking CUDA-aware static library with MPI-aware main program):

$ g++ main.cpp -L. -lgpu -o main -L/usr/local/cuda/lib64 -lcudart

So, is it possible to compile a program or library that uses CUDA and doesn't have any dependencies like installed drivers and CUDA libs?

Community
  • 1
  • 1
u354356007
  • 3,205
  • 15
  • 25
  • short answer is: you will have to deploy runtime dlls along with your executable – Regis Portalez Apr 21 '16 at 14:17
  • strangely a cluster of cuda computing resources does not have cuda runtime already deployed. – user3528438 Apr 21 '16 at 14:26
  • @RegisPortalez thanks for your response. So at least I don't have to install new video drivers to the target machines; dlls with missing dependencies will suffice. Did I get it right? – u354356007 Apr 21 '16 at 14:35
  • recent enough drivers will be ok. The best thing you can do is give it a try on a single machine with a test program – Regis Portalez Apr 21 '16 at 15:03
  • @RegisPortalez just have checked it, yes, indeed, a CUDA program works just fine on a PC without special CUDA stuff installed. However, CUDA calls may fail with error 35 if GPU driver is too old. If you'd like, feel free to submit an answer, and I'll mark it as accepted. – u354356007 Apr 21 '16 at 20:10

1 Answers1

2

everything should work if you deploy cuda runtime dynamic libraries along with your executable.

At the same time, ensure you have a recent enough driver installed on the target machine.

Regis Portalez
  • 4,675
  • 1
  • 29
  • 41
  • I would like to add just that you have to ensure the target machine has a sufficient compute capability if your NVCC options specify a minimum required compute capability. – Taro Apr 22 '16 at 12:48