mpi and cublas problem

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

Issue solved,

the gpu I was using with mpi was in protected mode, which prevent me from running…

Sorry for the noise,

Jonathan

hi
how can you change the “protected mode”?
I just face the same problem ,and do not know your solution~~~
kai