added parallel I/O test for NC_BYTE scalar
@@ -287,6 +287,26 @@ main(int argc, char **argv)
if (!mpi_rank)
SUMMARIZE_ERR;
+ if (!mpi_rank)
+ printf("*** testing NC_BYTE type and parallel I/O...");
+ {
+ /* This test is related to
+ * https://github.com/Unidata/netcdf-c/issues/1462. */
+ int ncid, varid;
+
+ /* Crate a file with a scalar NC_BYTE value. */
+ if (nc_create_par(FILE, NC_NETCDF4, MPI_COMM_WORLD, MPI_INFO_NULL,
+ &ncid)) ERR;
+ if (nc_def_var(ncid, "fred", NC_BYTE, 0, NULL, &varid)) ERR;
+ if (nc_enddef(ncid)) ERR;
+ if (nc_close(ncid)) ERR;
+
+ if (nc_open_par(FILE, 0, comm, info, &ncid)) ERR;
+ if (nc_close(ncid)) ERR;
+ }
+ if (!mpi_rank)
+ SUMMARIZE_ERR;
+
/* Shut down MPI. */
MPI_Finalize();
