cudart error

Hello,

I tried to run a hybrid test program which involved MPI + GPU. I got the following error. Please help me to find a solution for this.

Thanks.

mpicc -o mpicuda mpi.c kernel.o -lcudart -L /usr/local/cuda/lib -I /usr/local/cuda/include
/usr/bin/ld: skipping incompatible /usr/local/cuda/lib/libcudart.so when searching for -lcudart
/usr/bin/ld: cannot find -lcudart
collect2: ld returned 1 exit status

It seems like you are on a 64-bit Linux system, in which case you should point at the CUDART library in /usr/local/cuda/lib64 (this is from memory, but I think that is the correct location for the 64-bit library). Currently the compiler can only find the 32-bit library, which it skips because it is not suitable.