mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
make new parallel I/O flag requirement work with pnetcdf library
This commit is contained in:
parent
069574d842
commit
e4e294ae93
@ -23,8 +23,10 @@ nc_create_par(const char *path, int cmode, MPI_Comm comm,
|
||||
MPI_Comm comm_c = 0;
|
||||
MPI_Info info_c = 0;
|
||||
|
||||
/* One of these two parallel IO modes must be chosen by the user. */
|
||||
if (!(cmode & NC_MPIIO || cmode & NC_MPIPOSIX))
|
||||
/* One of these two parallel IO modes must be chosen by the user,
|
||||
* or else pnetcdf must be in use. */
|
||||
if (!(cmode & NC_MPIIO || cmode & NC_MPIPOSIX) &&
|
||||
!(cmode & NC_PNETCDF))
|
||||
return NC_EINVAL;
|
||||
|
||||
#ifdef HAVE_MPI_COMM_F2C
|
||||
@ -51,8 +53,10 @@ nc_open_par(const char *path, int mode, MPI_Comm comm,
|
||||
#else
|
||||
NC_MPI_INFO mpi_data;
|
||||
|
||||
/* One of these two parallel IO modes must be chosen by the user. */
|
||||
if (!(mode & NC_MPIIO || mode & NC_MPIPOSIX))
|
||||
/* One of these two parallel IO modes must be chosen by the user,
|
||||
* or else pnetcdf must be in use. */
|
||||
if (!(mode & NC_MPIIO || mode & NC_MPIPOSIX) &&
|
||||
!(mode & NC_PNETCDF))
|
||||
return NC_EINVAL;
|
||||
|
||||
mpi_data.comm = comm;
|
||||
|
Loading…
Reference in New Issue
Block a user