Commit b075fbaf authored by Rob Latham's avatar Rob Latham

Revert "hoist ROMIO init into MPI_Init"

I don't know why this change breaks with "disable weak symbols".  Until
I figure it out, we'll have to back it out.

This reverts commit a500a7da.
parent fc296e18
......@@ -4341,7 +4341,6 @@ int MPIR_Type_size_x_impl(MPI_Datatype datatype, MPI_Count *size);
/* random initializers */
int MPIR_Group_init(void);
int MPIR_Comm_init(MPID_Comm *);
int MPIR_MPIOInit(int *error);
/* Collective functions cannot be called from multiple threads. These
......
......@@ -560,10 +560,6 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
if (mpi_errno == MPI_SUCCESS)
mpi_errno = MPID_InitCompleted();
#ifdef HAVE_ROMIO
MPIR_MPIOInit(&mpi_errno);
#endif
fn_exit:
MPIU_THREAD_CS_EXIT(INIT,required);
/* Make fields of MPIR_Process global visible and set mpich_state
......
......@@ -19,8 +19,23 @@ extern int ADIO_Init_keyval;
void MPIR_MPIOInit(int * error_code) {
int flag;
char myname[] = "MPIR_MPIOInit";
/* first check if ADIO has been initialized. If not, initialize it */
if (ADIO_Init_keyval == MPI_KEYVAL_INVALID) {
MPI_Initialized(&flag);
/* --BEGIN ERROR HANDLING-- */
if (!flag) {
*error_code = MPIO_Err_create_code(MPI_SUCCESS,
MPIR_ERR_RECOVERABLE, myname, __LINE__,
MPI_ERR_OTHER, "**initialized", 0);
*error_code = MPIO_Err_return_file(MPI_FILE_NULL, *error_code);
return;
}
/* --END ERROR HANDLING-- */
MPI_Keyval_create(MPI_NULL_COPY_FN, ADIOI_End_call, &ADIO_Init_keyval,
(void *) 0);
......
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