mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
fixed problems running mpi-enabled tests with --enable-pnetcdf in nc_test
This commit is contained in:
parent
d4d4e28ac9
commit
2b26121537
@ -103,7 +103,8 @@ endif
|
||||
if USE_PNETCDF
|
||||
TESTS += run_pnetcdf_tests.sh
|
||||
else
|
||||
TESTS += t_nc tst_atts3
|
||||
TESTS += t_nc tst_atts3 tst_nofill nc_test tst_default_format_pnetcdf \
|
||||
tst_small tst_formatx_pnetcdf tst_cdf5format
|
||||
endif
|
||||
|
||||
# The .c files that are generated with m4 are already distributed, but
|
||||
|
@ -44,7 +44,8 @@ int main(int argc, char* argv[])
|
||||
size_t start[2], count[2];
|
||||
MPI_Comm comm=MPI_COMM_SELF;
|
||||
MPI_Info info=MPI_INFO_NULL;
|
||||
|
||||
char file_name[NC_MAX_NAME + 1];
|
||||
|
||||
printf("\n*** Testing bug fix with changing PnetCDF variable offsets...");
|
||||
|
||||
MPI_Init(&argc,&argv);
|
||||
@ -63,7 +64,9 @@ int main(int argc, char* argv[])
|
||||
#endif
|
||||
|
||||
cmode = NC_CLOBBER;
|
||||
st = nc_create_par(FILENAME, cmode, comm, info, &ncid);
|
||||
sprintf(file_name, "%s/%s", TEMP_LARGE, FILENAME);
|
||||
st = nc_create_par(file_name, cmode, comm, info, &ncid);
|
||||
|
||||
#ifdef USE_PNETCDF
|
||||
CHK_ERR(st)
|
||||
#else
|
||||
@ -109,7 +112,7 @@ int main(int argc, char* argv[])
|
||||
if (info != MPI_INFO_NULL) MPI_Info_free(&info);
|
||||
|
||||
/* re-open the file with netCDF (parallel) and enter define mode */
|
||||
st = nc_open_par(FILENAME, NC_WRITE, comm, info, &ncid); CHK_ERR(st)
|
||||
st = nc_open_par(file_name, NC_WRITE, comm, info, &ncid); CHK_ERR(st)
|
||||
|
||||
st = nc_redef(ncid); CHK_ERR(st)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user