Hi all,
I am trying to use cublas within an mpi application.
the mpi code is as follow :
[codebox]
…
if(rank==0){
rc = run_gpu(0);
if (rc != 0){
printf ("Error in run_gpu. (%i)\n",rc);
MPI_Abort(MPI_COMM_WORLD, rc);
}
}
…
[/codebox]
and the function :
[codebox]
int run_gpu(int gpu){
…
cublasStatus toto;
if( cudaSetDevice(gpu)!=cudaSuccess) return 1;
toto=cublasInit();
if(toto!=CUBLAS_STATUS_SUCCESS ){
printf("TOTO = %u\n",toto);
return 2;
}
…
}
[/codebox]
this code exit because the function cublasInit() returned CUBLAS_STATUS_NOT_INITIALIZED. The exact same code runing outside mpi execute well…
Does anyone knows why it is not working under MPI? are there special things to do in this case?
Thanks,
Jonathan