A template project for CUDA+MPI with autotools build system
./autogen.sh
It will create all autotools related files.
./configure --with-cuda=$CUDA_ROOT --enable-mpi
where CUDA_ROOT is an environment variable set to the location of the CUDA toolkit (e.g. /usr/local/cuda-6.5)
This will build an executable src/testHelloMpiCuda.
You can run it on a multi-GPU cluster with
mpirun -np N_PROC_MPI ./testHelloMpiCuda
For a detailled discussion about coupling CUDA and MPI (initialize CUDA context before/after MPI_Init), see the following references: