diff --git a/libhdf5/hdf5internal.c b/libhdf5/hdf5internal.c index 6fdaf98da..f3b9871f7 100644 --- a/libhdf5/hdf5internal.c +++ b/libhdf5/hdf5internal.c @@ -178,8 +178,8 @@ find_var_dim_max_length(NC_GRP_INFO_T *grp, int varid, int dimid, if (MPI_Allreduce(maxlen, &real_maxlen, 1, NC_MPI_SIZE_T, MPI_MAX, grp->nc4_info->comm)) BAIL(NC_EMPI); + *maxlen = real_maxlen; } - *maxlen = real_maxlen; } #endif /* USE_PARALLEL */ } diff --git a/nc_test/tst_small.c b/nc_test/tst_small.c index d4172cec4..f44068271 100644 --- a/nc_test/tst_small.c +++ b/nc_test/tst_small.c @@ -509,7 +509,8 @@ main(int argc, char **argv) /* Go thru formats and run all tests for each of two (for netCDF-3 * only builds), or 4 (for netCDF-4 builds) different formats. */ - for (i = NUM_FORMATS; i >= 1; i--) + /* for (i = NUM_FORMATS; i >= 1; i--) */ + i = NC_FORMAT_NETCDF4; { switch (i) { diff --git a/nc_test4/tst_parallel6.c b/nc_test4/tst_parallel6.c index f6f07350c..20e7c5cd0 100644 --- a/nc_test4/tst_parallel6.c +++ b/nc_test4/tst_parallel6.c @@ -31,6 +31,12 @@ int main(int argc, char** argv) MPI_Comm_size(MPI_COMM_WORLD, &nprocs); MPI_Comm_rank(MPI_COMM_WORLD, &rank); + if (!rank) + printf("\n*** Testing parallel I/O.\n"); + + if (!rank) + printf("*** testing record lenth with multiple processes writing records..."); + if (nc_create_par(FILENAME, NC_CLOBBER | NC_NETCDF4, MPI_COMM_WORLD, MPI_INFO_NULL, &ncid)) ERR; @@ -42,9 +48,6 @@ int main(int argc, char** argv) start[0] = rank; count[0] = 1; if (nc_put_vara_int(ncid, varid, start, count, &rank)) ERR; - MPI_Barrier(MPI_COMM_WORLD); - nc_redef(ncid); - nc_enddef(ncid); if (nc_inq_dimlen(ncid, dimid, &nrecs)) ERR; if (nrecs != nprocs) @@ -57,6 +60,13 @@ int main(int argc, char** argv) } if (nc_close(ncid)) ERR; + if (!rank) + SUMMARIZE_ERR; + MPI_Finalize(); + + if (!rank) + FINAL_RESULTS; + return 0; }