Commit 903c616d authored by Philip Carns's avatar Philip Carns

patch from Kevin to make darshan work correctly for apps that use

MPI_Init_thread()


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@108 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 95035712
......@@ -130,8 +130,6 @@ static int file_compare(const void* a, const void* b);
int MPI_Init(int *argc, char ***argv)
{
int ret;
int nprocs;
int rank;
ret = PMPI_Init(argc, argv);
if(ret != MPI_SUCCESS)
......@@ -139,6 +137,31 @@ int MPI_Init(int *argc, char ***argv)
return(ret);
}
darshan_mpi_initialize(argc, argv);
return(ret);
}
int MPI_Init_thread (int *argc, char ***argv, int required, int *provided)
{
int ret;
ret = PMPI_Init_thread(argc, argv, required, provided);
if (ret != MPI_SUCCESS)
{
return(ret);
}
darshan_mpi_initialize(argc, argv);
return(ret);
}
void darshan_mpi_initialize(int *argc, char ***argv)
{
int nprocs;
int rank;
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
......@@ -155,7 +178,7 @@ int MPI_Init(int *argc, char ***argv)
CP_UNLOCK();
return(MPI_SUCCESS);
return;
}
void darshan_shutdown(int timing_flag)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment