diff --git a/src/clib/pio_msg.c b/src/clib/pio_msg.c index 57460cd8a9e..6ffb616a7c3 100644 --- a/src/clib/pio_msg.c +++ b/src/clib/pio_msg.c @@ -174,7 +174,7 @@ int create_file_handler(iosystem_desc_t *ios) int mode; int use_ext_ncid; char ncidp_present; - int iosysid; + int iosysid = 0; int mpierr; PLOG((1, "create_file_handler comproot = %d", ios->comproot)); @@ -201,8 +201,10 @@ int create_file_handler(iosystem_desc_t *ios) if (ncidp_present) if ((mpierr = MPI_Bcast(&ncid, 1, MPI_INT, 0, ios->intercomm))) return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__); +#ifdef NETCDF_INTEGRATION if ((mpierr = MPI_Bcast(&iosysid, 1, MPI_INT, 0, ios->intercomm))) return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__); +#endif /* NETCDF_INTEGRATION */ PLOG((1, "create_file_handler len %d filename %s iotype %d mode %d " "use_ext_ncid %d ncidp_present %d ncid %d iosysid %d", len, filename, iotype, mode, use_ext_ncid, ncidp_present, ncid, @@ -1977,7 +1979,7 @@ int open_file_handler(iosystem_desc_t *ios) int iotype; int mode; int use_ext_ncid; - int iosysid; + int iosysid = 0; int mpierr; PLOG((1, "open_file_handler comproot = %d", ios->comproot)); @@ -2000,8 +2002,10 @@ int open_file_handler(iosystem_desc_t *ios) return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__); if ((mpierr = MPI_Bcast(&use_ext_ncid, 1, MPI_INT, 0, ios->intercomm))) return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__); +#ifdef NETCDF_INTEGRATION if ((mpierr = MPI_Bcast(&iosysid, 1, MPI_INT, 0, ios->intercomm))) return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__); +#endif /* NETCDF_INTEGRATION */ PLOG((2, "len %d filename %s iotype %d mode %d use_ext_ncid %d iosysid %d", len, filename, iotype, mode, use_ext_ncid, iosysid)); diff --git a/src/clib/pioc_support.c b/src/clib/pioc_support.c index 9e5fc1f5e22..fb3f58f2e80 100644 --- a/src/clib/pioc_support.c +++ b/src/clib/pioc_support.c @@ -2039,11 +2039,13 @@ PIOc_createfile_int(int iosysid, int *ncidp, int *iotype, const char *filename, if (ncidp_present) if (!mpierr) mpierr = MPI_Bcast(ncidp, 1, MPI_INT, ios->compmaster, ios->intercomm); +#ifdef NETCDF_INTEGRATION if (!mpierr) mpierr = MPI_Bcast(&diosysid, 1, MPI_INT, ios->compmaster, ios->intercomm); +#endif /* NETCDF_INTEGRATION */ PLOG((2, "len %d filename %s iotype %d mode %d use_ext_ncid %d " - "ncidp_present %d diosysid %d", len, filename, file->iotype, mode, - use_ext_ncid, ncidp_present, diosysid)); + "ncidp_present %d", len, filename, file->iotype, mode, + use_ext_ncid, ncidp_present)); } /* Handle MPI errors. */ @@ -2598,8 +2600,10 @@ PIOc_openfile_retry(int iosysid, int *ncidp, int *iotype, const char *filename, mpierr = MPI_Bcast(&mode, 1, MPI_INT, ios->compmaster, ios->intercomm); if (!mpierr) mpierr = MPI_Bcast(&use_ext_ncid, 1, MPI_INT, ios->compmaster, ios->intercomm); +#ifdef NETCDF_INTEGRATION if (!mpierr) mpierr = MPI_Bcast(&diosysid, 1, MPI_INT, ios->compmaster, ios->intercomm); +#endif /* NETCDF_INTEGRATION */ } /* Handle MPI errors. */