4
votes

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?

1
short answer is: you will have to deploy runtime dlls along with your executable - Regis Portalez
strangely a cluster of cuda computing resources does not have cuda runtime already deployed. - user3528438
@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
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
@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

1 Answers

2
votes

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.