diff --git a/src/client/dfuse/pil4dfs/int_dfs.c b/src/client/dfuse/pil4dfs/int_dfs.c index 6b068fbce72..2d1c0f839ae 100644 --- a/src/client/dfuse/pil4dfs/int_dfs.c +++ b/src/client/dfuse/pil4dfs/int_dfs.c @@ -470,6 +470,7 @@ static int (*next_tcgetattr)(int fd, void *termios_p); /* end NOT supported by DAOS */ static int (*next_mpi_init)(int *argc, char ***argv); +static int (*next_pmpi_init)(int *argc, char ***argv); /* to do!! */ /** @@ -1040,6 +1041,22 @@ MPI_Init(int *argc, char ***argv) return rc; } +int +PMPI_Init(int *argc, char ***argv) +{ + int rc; + + if (next_pmpi_init == NULL) { + next_pmpi_init = dlsym(RTLD_NEXT, "PMPI_Init"); + D_ASSERT(next_pmpi_init != NULL); + } + + atomic_fetch_add_relaxed(&mpi_init_count, 1); + rc = next_pmpi_init(argc, argv); + atomic_fetch_add_relaxed(&mpi_init_count, -1); + return rc; +} + /** determine whether a path (both relative and absolute) is on DAOS or not. If yes, * returns parent object, item name, full path of parent dir, full absolute path, and * the pointer to struct dfs_mt.