diff --git a/src/ncint/ncintdispatch.c b/src/ncint/ncintdispatch.c index d7d3fa3a6a2..78b2f577b7d 100644 --- a/src/ncint/ncintdispatch.c +++ b/src/ncint/ncintdispatch.c @@ -880,6 +880,9 @@ PIO_NCINT_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep, if (!ret) ret = PIOc_inq_var_deflate(ncid, varid, shufflep, deflatep, deflate_levelp); + + if (!ret) + ret = PIOc_inq_var_endian(ncid, varid, endiannessp); return ret; } diff --git a/tests/ncint/tst_var_compress.c b/tests/ncint/tst_var_compress.c index c6f5191669a..e7fc492a029 100644 --- a/tests/ncint/tst_var_compress.c +++ b/tests/ncint/tst_var_compress.c @@ -72,6 +72,7 @@ run_var_compress_test(int my_rank, int ntasks, int iosysid) int shuffle_in, deflate_in, deflate_level_in, storage_in; int *data_in; size_t chunksizes_in[NDIM3]; + int endian_in; int d; /* Open the file. */ @@ -87,6 +88,10 @@ run_var_compress_test(int my_rank, int ntasks, int iosysid) for (d = 0; d < NDIM3; d++) if (chunksizes_in[d] != chunksizes[d]) PERR; if (storage_in != NC_CHUNKED) PERR; + + /* Check the endianness. */ + if (nc_inq_var_endian(ncid, 0, &endian_in)) PERR; + if (endian_in != NC_ENDIAN_BIG) PERR; /* Read distributed arrays. */ if (!(data_in = malloc(elements_per_pe * sizeof(int)))) PERR;