[petsc-dev] always calling MPI_Init_thread?
Barry Smith
bsmith at mcs.anl.gov
Thu Feb 14 13:16:10 CST 2013
Do we really ALWAYS want to call this version even if we are not monkeying with threads at ALL?
Thanks
Barry
ierr = MPI_Initialized(&flag);CHKERRQ(ierr);
if (!flag) {
if (PETSC_COMM_WORLD != MPI_COMM_NULL) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"You cannot set PETSC_COMM_WORLD if you have not initialized MPI first");
#if defined(PETSC_HAVE_MPI_INIT_THREAD)
{
PetscMPIInt provided;
ierr = MPI_Init_thread(argc,args,MPI_THREAD_FUNNELED,&provided);CHKERRQ(ierr);
}
#else
ierr = MPI_Init(argc,args);CHKERRQ(ierr);
#endif
More information about the petsc-dev
mailing list