diff --git a/.github/actions/parallelio_cmake/action.yml b/.github/actions/parallelio_cmake/action.yml index c4708ef44..5a135fce2 100644 --- a/.github/actions/parallelio_cmake/action.yml +++ b/.github/actions/parallelio_cmake/action.yml @@ -137,5 +137,5 @@ runs: -DPnetCDF_C_LIBRARY=${{ inputs.pnetcdf_library }} \ $GITHUB_WORKSPACE/parallelio-src make VERBOSE=1 - make tests + #make tests make install diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index e1f052839..eba2d60bf 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -52,6 +52,6 @@ jobs: cd $GITHUB_WORKSPACE make check - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 +# - name: Setup tmate session +# if: ${{ failure() }} +# uses: mxschmitt/action-tmate@v3 diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9f4cc1586..e554dd690 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -26,6 +26,7 @@ jobs: sudo apt-get update sudo apt-get install netcdf-bin libnetcdf-dev doxygen graphviz wget gfortran \ libjpeg-dev libz-dev openmpi-bin libopenmpi-dev cmake pnetcdf-bin libpnetcdf-dev libnetcdff-dev + nc-config --all - name: cmake build uses: ./.github/actions/parallelio_cmake diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 26e580baa..10eb10fca 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -121,11 +121,11 @@ jobs: - name: parallelio tests run: | pushd $GITHUB_WORKSPACE/build - #make tests + make tests ctest -VV -E test_async_ popd # the following can be used by developers to login to the github server in case of errors # see https://github.com/marketplace/actions/debugging-with-tmate for further details - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 +# - name: Setup tmate session +# if: ${{ failure() }} +# uses: mxschmitt/action-tmate@v3 diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e98da1b4..906727f06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ project (PIO C) # The project version number. set(VERSION_MAJOR 2 CACHE STRING "Project major version number.") set(VERSION_MINOR 6 CACHE STRING "Project minor version number.") -set(VERSION_PATCH 1 CACHE STRING "Project patch version number.") +set(VERSION_PATCH 2 CACHE STRING "Project patch version number.") mark_as_advanced(VERSION_MAJOR VERSION_MINOR VERSION_PATCH) # Create version info in autotools parlance for pio_meta.h. @@ -358,8 +358,16 @@ int main() {return 0;}" HAVE_SZIP_WRITE) # Check to see if parallel filters are supported by HDF5/netcdf-c. ### if (HAVE_NETCDF_PAR) - check_function_exists(nc_inq_filter_avail HAVE_PAR_FILTERS) + CHECK_C_SOURCE_COMPILES(" +#include +#if !NC_HAS_PAR_FILTERS + choke me +#endif +int main() {return 0;}" HAVE_PAR_FILTERS) +else() + set(HAVE_PAR_FILTERS 0) endif() + ### # Check to see if this is netcdf-c-4.7.2, which won't work. ### diff --git a/configure.ac b/configure.ac index 9c1287def..1ba208788 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ ## Ed Hartnett 8/16/17 # Initialize autoconf and automake. -AC_INIT(pio, 2.6.1) +AC_INIT(pio, 2.6.2) AC_CONFIG_SRCDIR(src/clib/pio_darray.c) AM_INIT_AUTOMAKE([foreign serial-tests]) @@ -11,7 +11,7 @@ AM_INIT_AUTOMAKE([foreign serial-tests]) # AC_DEFINE_UNQUOTED for config.h. AC_SUBST([PIO_VERSION_MAJOR]) PIO_VERSION_MAJOR=2 AC_SUBST([PIO_VERSION_MINOR]) PIO_VERSION_MINOR=6 -AC_SUBST([PIO_VERSION_PATCH]) PIO_VERSION_PATCH=1 +AC_SUBST([PIO_VERSION_PATCH]) PIO_VERSION_PATCH=2 AC_DEFINE_UNQUOTED([PIO_VERSION_MAJOR], [$PIO_VERSION_MAJOR], [PIO major version]) AC_DEFINE_UNQUOTED([PIO_VERSION_MINOR], [$PIO_VERSION_MINOR], [PIO minor version]) AC_DEFINE_UNQUOTED([PIO_VERSION_PATCH], [$PIO_VERSION_PATCH], [PIO patch version]) @@ -19,7 +19,7 @@ AC_DEFINE_UNQUOTED([PIO_VERSION_PATCH], [$PIO_VERSION_PATCH], [PIO patch version # Once more for the documentation. AC_SUBST([VERSION_MAJOR], [2]) AC_SUBST([VERSION_MINOR], [6]) -AC_SUBST([VERSION_PATCH], [1]) +AC_SUBST([VERSION_PATCH], [2]) # The m4 directory holds macros for autoconf. diff --git a/src/clib/pio.h b/src/clib/pio.h index 0aea5a5fd..a4b20b752 100644 --- a/src/clib/pio.h +++ b/src/clib/pio.h @@ -1267,9 +1267,8 @@ extern "C" { const long long *op); int PIOc_put_vard_ulonglong(int ncid, int varid, int decompid, const PIO_Offset recnum, const unsigned long long *op); -/* use this variable in the NETCDF library (introduced in v4.9.0) to determine if the following - functions are available */ -#ifdef NC_HAS_MULTIFILTERS + +#ifdef NC_HAS_PAR_FILTERS int PIOc_def_var_filter(int ncid, int varid,unsigned int id, size_t nparams, unsigned int *params); int PIOc_inq_var_filter_ids(int ncid, int varid, size_t *nfiltersp, unsigned int *ids); int PIOc_inq_var_filter_info(int ncid, int varid, unsigned int id, size_t *nparamsp, unsigned int *params ); diff --git a/src/clib/pio_file.c b/src/clib/pio_file.c index 9c65621ec..e9edb6af4 100644 --- a/src/clib/pio_file.c +++ b/src/clib/pio_file.c @@ -156,7 +156,7 @@ PIOc_createfile(int iosysid, int *ncidp, int *iotype, const char *filename, PLOG((1, "PIOc_createfile iosysid = %d iotype = %d filename = %s mode = %d", iosysid, *iotype, filename, mode)); - + /* Create the file. */ if ((ret = PIOc_createfile_int(iosysid, ncidp, iotype, filename, mode, 0))) return pio_err(ios, NULL, ret, __FILE__, __LINE__); diff --git a/src/clib/pio_getput_int.c b/src/clib/pio_getput_int.c index a071ef196..5ab590416 100644 --- a/src/clib/pio_getput_int.c +++ b/src/clib/pio_getput_int.c @@ -1085,100 +1085,51 @@ PIOc_put_vars_tc(int ncid, int varid, const PIO_Offset *start, const PIO_Offset #ifdef _PNETCDF if (file->iotype == PIO_IOTYPE_PNETCDF) { - if (ndims == 0) - if ((ierr = ncmpi_begin_indep_data(file->fh))) - return pio_err(ios, file, ierr, __FILE__, __LINE__); if (ios->iomain == MPI_ROOT) { - /* Scalars have to be handled differently. */ - if (ndims == 0) + /* This is not a scalar var. */ + var_desc_t *vdesc; + + PLOG((2, "PIOc_put_vars_tc calling pnetcdf function")); + + if ((ierr = get_var_desc(varid, &file->varlist, &vdesc))) + return pio_err(ios, file, ierr, __FILE__, __LINE__); + + switch(xtype) { - /* This is a scalar var. */ - PLOG((2, "pnetcdf writing scalar with ncmpi_put_vars_*() file->fh = %d varid = %d", - file->fh, varid)); - pioassert(!start && !count && !stride, "expected NULLs", __FILE__, __LINE__); - - - /* Only the IO main does the IO, so we are not really - * getting parallel IO here. */ - - switch(xtype) - { - case NC_BYTE: - ierr = ncmpi_put_vars_schar(file->fh, varid, start, count, stride, buf); - break; - case NC_CHAR: - ierr = ncmpi_put_vars_text(file->fh, varid, start, count, stride, buf); - break; - case NC_SHORT: - ierr = ncmpi_put_vars_short(file->fh, varid, start, count, stride, buf); - break; - case NC_INT: - ierr = ncmpi_put_vars_int(file->fh, varid, start, count, stride, buf); - break; - case PIO_LONG_INTERNAL: - ierr = ncmpi_put_vars_long(file->fh, varid, start, count, stride, buf); - break; - case NC_FLOAT: - ierr = ncmpi_put_vars_float(file->fh, varid, start, count, stride, buf); - break; - case NC_DOUBLE: - ierr = ncmpi_put_vars_double(file->fh, varid, start, count, stride, buf); - break; - default: - return pio_err(ios, file, PIO_EBADIOTYPE, __FILE__, __LINE__); - } + case NC_BYTE: + ierr = ncmpi_bput_vars_schar(file->fh, varid, start, count, fake_stride, buf, NULL); + break; + case NC_CHAR: + ierr = ncmpi_bput_vars_text(file->fh, varid, start, count, fake_stride, buf, NULL); + break; + case NC_SHORT: + ierr = ncmpi_bput_vars_short(file->fh, varid, start, count, fake_stride, buf, NULL); + break; + case NC_INT: + ierr = ncmpi_bput_vars_int(file->fh, varid, start, count, fake_stride, buf, NULL); + break; + case PIO_LONG_INTERNAL: + ierr = ncmpi_bput_vars_long(file->fh, varid, start, count, fake_stride, buf, NULL); + break; + case NC_FLOAT: + ierr = ncmpi_bput_vars_float(file->fh, varid, start, count, fake_stride, buf, NULL); + break; + case NC_DOUBLE: + ierr = ncmpi_bput_vars_double(file->fh, varid, start, count, fake_stride, buf, NULL); + break; + default: + return pio_err(ios, file, PIO_EBADTYPE, __FILE__, __LINE__); } - else - { - /* This is not a scalar var. */ - var_desc_t *vdesc; - - PLOG((2, "PIOc_put_vars_tc calling pnetcdf function")); - - if ((ierr = get_var_desc(varid, &file->varlist, &vdesc))) - return pio_err(ios, file, ierr, __FILE__, __LINE__); - - switch(xtype) - { - case NC_BYTE: - ierr = ncmpi_bput_vars_schar(file->fh, varid, start, count, fake_stride, buf, NULL); - break; - case NC_CHAR: - ierr = ncmpi_bput_vars_text(file->fh, varid, start, count, fake_stride, buf, NULL); - break; - case NC_SHORT: - ierr = ncmpi_bput_vars_short(file->fh, varid, start, count, fake_stride, buf, NULL); - break; - case NC_INT: - ierr = ncmpi_bput_vars_int(file->fh, varid, start, count, fake_stride, buf, NULL); - break; - case PIO_LONG_INTERNAL: - ierr = ncmpi_bput_vars_long(file->fh, varid, start, count, fake_stride, buf, NULL); - break; - case NC_FLOAT: - ierr = ncmpi_bput_vars_float(file->fh, varid, start, count, fake_stride, buf, NULL); - break; - case NC_DOUBLE: - ierr = ncmpi_bput_vars_double(file->fh, varid, start, count, fake_stride, buf, NULL); - break; - default: - return pio_err(ios, file, PIO_EBADTYPE, __FILE__, __LINE__); - } - PLOG((2, "PIOc_put_vars_tc io_rank 0 done with pnetcdf call, ierr=%d", ierr)); - - - vdesc->nreqs++; + PLOG((2, "PIOc_put_vars_tc io_rank 0 done with pnetcdf call, ierr=%d", ierr)); + + + vdesc->nreqs++; if(ierr == PIO_EINVALCOORDS) for(int i=0; ifh))) - return pio_err(ios, file, ierr, __FILE__, __LINE__); } #endif /* _PNETCDF */ diff --git a/src/clib/pio_internal.h b/src/clib/pio_internal.h index 79cc48eb2..620ce4d18 100644 --- a/src/clib/pio_internal.h +++ b/src/clib/pio_internal.h @@ -17,7 +17,7 @@ #include #include #include -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS #include #include #endif diff --git a/src/clib/pio_nc4.c b/src/clib/pio_nc4.c index 5ccfe8bc5..3074bbd95 100644 --- a/src/clib/pio_nc4.c +++ b/src/clib/pio_nc4.c @@ -1396,7 +1396,6 @@ PIOc_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams, unsign return PIO_NOERR; } #ifdef PIO_HAS_PAR_FILTERS - /** * Get the variable filter ids if any * @@ -1794,8 +1793,10 @@ PIOc_inq_var_zstandard(int ncid, int varid, int* hasfilterp, int *levelp) return PIO_NOERR; } +// NC_HAS_ZSTD #endif - +#endif +#ifdef PIO_HAS_PAR_FILTERS /** * * @@ -1875,7 +1876,9 @@ PIOc_inq_filter_avail(int ncid, unsigned int id ) return ierr; } -#endif +// PIO_HAS_PAR_FILTERS +#endif +// NC_HAS_MULTIFILTERS #endif #ifdef NC_HAS_QUANTIZE /** diff --git a/src/clib/pioc_support.c b/src/clib/pioc_support.c index f7a1d95c2..9d44d1ee7 100644 --- a/src/clib/pioc_support.c +++ b/src/clib/pioc_support.c @@ -3111,15 +3111,15 @@ iotype_is_valid(int iotype) ret++; /* Some builds include netCDF-4. */ -#ifdef _NETCDF4 +#ifdef NC_HAS_NC4 if (iotype == PIO_IOTYPE_NETCDF4C || iotype == PIO_IOTYPE_NETCDF4P) ret++; #endif /* _NETCDF4 */ /* Some builds include pnetcdf. */ +#ifdef _PNETCDF if (iotype == PIO_IOTYPE_PNETCDF) ret++; -#ifdef _PNETCDF #endif /* _PNETCDF */ return ret; diff --git a/src/flib/CMakeLists.txt b/src/flib/CMakeLists.txt index d16803995..11b60e7db 100644 --- a/src/flib/CMakeLists.txt +++ b/src/flib/CMakeLists.txt @@ -200,6 +200,7 @@ else () target_compile_definitions (gptl PUBLIC NO_MPIMOD) endif() + target_compile_definitions (piof PUBLIC NO_MPIMOD) endif () #===== GPTL ===== diff --git a/src/ncint/ncintdispatch.c b/src/ncint/ncintdispatch.c index a77396bd7..30ec26781 100644 --- a/src/ncint/ncintdispatch.c +++ b/src/ncint/ncintdispatch.c @@ -127,6 +127,7 @@ NC_Dispatch NCINT_dispatcher = { NC_NOTNC4_def_var_filter, NC_NOTNC4_set_var_chunk_cache, NC_NOTNC4_get_var_chunk_cache, +#ifdef PIO_HAS_PAR_FILTERS #if NC_DISPATCH_VERSION == 2 PIO_NCINT_filter_actions, #endif @@ -141,6 +142,7 @@ NC_Dispatch NCINT_dispatcher = { #if NC_DISPATCH_VERSION >= 5 PIOc_inq_filter_avail, #endif +#endif }; /** @@ -229,10 +231,11 @@ PIO_NCINT_create(const char *path, int cmode, size_t initialsz, int basepe, if ((ret = nc4_file_list_add(ncid, path, cmode, NULL))) return ret; - /* Create the file with PIO. The final parameter tests + /* Create the file with PIO. The final parameter tells * createfile_int to accept the externally assigned ncid. */ if ((ret = PIOc_createfile_int(diosysid, &ncid, &iotype, path, cmode, 1))) return ret; + return PIO_NOERR; } diff --git a/tests/cunit/test_intercomm2.c b/tests/cunit/test_intercomm2.c index f3f3a96df..deb4657af 100644 --- a/tests/cunit/test_intercomm2.c +++ b/tests/cunit/test_intercomm2.c @@ -338,6 +338,7 @@ int main(int argc, char **argv) sprintf(filename[fmt], "test_intercomm2_%d.nc", flavor[fmt]); /* Create a netCDF file with one dimension and one variable. */ + if ((ret = PIOc_createfile(iosysid[my_comp_idx], &ncid, &flavor[fmt], filename[fmt], NC_CLOBBER))) ERR(ret); diff --git a/tests/cunit/test_pioc.c b/tests/cunit/test_pioc.c index d3dda4503..f50f6fbdd 100644 --- a/tests/cunit/test_pioc.c +++ b/tests/cunit/test_pioc.c @@ -1827,6 +1827,9 @@ int test_scalar(int iosysid, int num_flavors, int *flavor, int my_rank, int asyn int test_val = TEST_VAL_42; if ((ret = PIOc_put_var_int(ncid, varid, &test_val))) ERR(ret); + /* flush the write buffer */ + if ((ret = PIOc_sync(ncid))) + ERR(ret); /* Check the scalar var. */ if ((ret = check_scalar_var(ncid, varid, flavor[fmt], my_rank))) @@ -2326,7 +2329,6 @@ int test_all(int iosysid, int num_flavors, int *flavor, int my_rank, MPI_Comm te /* This will be our file name for writing out decompositions. */ sprintf(filename, "decomp_%d.txt", my_rank); sprintf(nc_filename, "decomp_%d.nc", my_rank); - /* This is a simple test that just creates the decomp with * async. */ if (async) diff --git a/tests/derecho_testsuite.py b/tests/derecho_testsuite.py new file mode 100644 index 000000000..4f31f5971 --- /dev/null +++ b/tests/derecho_testsuite.py @@ -0,0 +1,135 @@ +#!/usr/bin/env python +#PBS -r n +#PBS -j oe +#PBS -S /bin/bash +#PBS -l select=1:ncpus=128:mpiprocs=128:ompthreads=1:mem=230GB +#PBS -N parallelioTest +#PBS -A P93300606 +#PBS -q main +#PBS -l walltime=08:00:00 + +import os, sys, shutil +import subprocess +lmod_root = os.environ["LMOD_ROOT"] +sys.path.append(lmod_root+"/lmod/init/") +from env_modules_python import module + + +compilers = ["cce/15.0.1", "intel/2023.0.0", "intel-oneapi/2023.0.0", "nvhpc/23.5", "gcc/12.2.0"] +#compilers = ["intel/2023.0.0"] +#mpilibs = ["cray-mpich/8.1.25", "intel-mpi/2021.8.0", "mpi-serial/2.3.0"] +mpilibs = ["mpi-serial/2.3.0","cray-mpich/8.1.25"] +netcdf = ["netcdf/4.9.2","netcdf-mpi/4.9.2"] +pnetcdf = ["parallel-netcdf/1.12.3"] + +cmakeopts = [None,["-DPIO_ENABLE_FORTRAN=OFF"],["-DPIO_ENABLE_TIMING=OFF","-DPIO_ENABLE_NETCDF_INTEGRATION=ON"],["-DWITH_PNETCDF=OFF"]] + +piodir = "/glade/work/jedwards/sandboxes/ParallelIO" +bldcnt=0 +module("purge") +module("load", "ncarenv/23.06") +module("load", "cesmdev/1.0") +module("load", "cmake/3.26.3") + +for compiler in compilers: + cmd = " load "+compiler + module("load", compiler) + for mpilib in mpilibs: + module("load", mpilib) + cmakeflags = ["-DPIO_ENABLE_EXAMPLES=OFF"] + for netlib in netcdf: + module("unload", "netcdf") + module("unload", "hdf5") + module("unload", "netcdf-mpi") + module("unload", "hdf5-mpi") + if "mpi-serial" in mpilib: + cc = os.getenv("CC") + ftn = os.getenv("FC") + if not cc: + cc = "cc" + if not ftn: + ftn = "ftn" + mpi_serial = os.environ["NCAR_ROOT_MPI_SERIAL"] + cmakeflags.extend(["-DPIO_USE_MPISERIAL=ON","-DMPISERIAL_PATH="+mpi_serial,"-DPIO_ENABLE_TESTS=OFF","-DPIO_ENABLE_TIMING=OFF"]) + if "mpi" in netlib: + continue + + module("load", netlib) + if not "mpi-serial" in mpilib: + cc = "cc" + ftn = "ftn" + for plib in pnetcdf: + module("load", plib) + cflags = " -g " + fflags = " -g " + if "gcc" in compiler: + fflags += " -ffree-line-length-none -ffixed-line-length-none -fallow-argument-mismatch " + elif "intel" in compiler: + cflags += " -std=gnu99 " + if "mpi-serial" in mpilib: + fflags += " -I$NCAR_INC_MPI_SERIAL " + module("list") + for cmakeopt in cmakeopts: + if cmakeopt and "mpi-serial" in mpilib and "PNETCDF" in cmakeopt: + continue + bldcnt = bldcnt+1 + bld = f"/glade/derecho/scratch/jedwards/piotest/bld{bldcnt:02d}" + os.chdir(piodir) + if os.path.exists(bld): + shutil.rmtree(bld) + os.mkdir(bld) + print(" ") + print(f"bld is {bld}", flush=True) + os.environ["CC"] = cc + os.environ["FC"] = ftn + os.environ["CFLAGS"] = cflags + os.environ["FFLAGS"] = fflags + cmake = ["cmake"] + + if cmakeflags: + cmake.extend(cmakeflags) + if cmakeopt: + cmake.extend(cmakeopt) + cmake.extend([piodir]) + print("Running cmake") + print(f"compiler = {compiler} netcdf={netlib} mpilib={mpilib} cmake = {cmake}", flush=True) + cmakeout = None + try: + cmakeout = subprocess.run(cmake, check=True, cwd=bld, capture_output=True, text=True) +# cmakeout = subprocess.run(cmake, check=True, cwd=bld) + except: + #print(f"cmake process failed {cmakeout.stdout}") + continue + + + printline = False + for line in cmakeout.stdout.split("\n"): + if "PIO Configuration Summary" in line: + printline = True + if printline: + print(line, flush=True) + # print(f"cmakeout is {cmakeout.stdout}") + ctestout = None + print("Running make", flush=True) + if "mpi-serial" in mpilib: + try: + makeout = subprocess.run(["make"], check=True, cwd=bld, capture_output=True, text=True) + except: + print("mpi-serial make process failed") + else: + try: + makeout = subprocess.run(["make", "tests"], check=True, cwd=bld, capture_output=True, text=True) + except: + print("make tests failed") + continue + try: + print("Running ctest", flush=True) + ctestout = subprocess.run(["ctest"], capture_output=True, cwd=bld, text=True) + except: + print("ctest process failed") + #print(f"makeout is {makeout.stdout}") + if ctestout: + for line in ctestout.stdout.split("\n"): + if "Fail" in line or "tests fail" in line: + print(line, flush=True) + diff --git a/tests/ncint/ncint.h b/tests/ncint/ncint.h index e0ead4131..f5fcb4bb2 100644 --- a/tests/ncint/ncint.h +++ b/tests/ncint/ncint.h @@ -3,8 +3,11 @@ #if NETCDF_VERSION_LE(4,9,1) // only netcdf4 formats supported #define NUM_MODES 4 -#else +#elif defined(HAVE_NETCDF_PAR) #define NUM_MODES 10 +#else +// need to fix this: netcdf4 not available with netcdf serial bld +#define NUM_MODES 6 #endif @@ -22,6 +25,30 @@ NC_PIO|NC_FORMAT_NETCDF4_CLASSIC, NC_PIO|NC_FORMAT_NETCDF4_CLASSIC}; #endif +#if NUM_MODES==6 +int cmode[NUM_MODES] = {NC_PIO, + NC_PIO|NC_64BIT_OFFSET, + NC_PIO|NC_64BIT_DATA, + NC_PIO|NC_PNETCDF, + NC_PIO|NC_PNETCDF|NC_64BIT_OFFSET, + NC_PIO|NC_PNETCDF|NC_64BIT_DATA}; + + + char mode_name[NUM_MODES][NC_MAX_NAME] = {"classic serial ", + "64bit offset serial ", + "64bit data serial ", + "classic pnetcdf ", + "64bit offset pnetcdf ", + "64bit data pnetcdf "}; + + + int expected_format[NUM_MODES] = {NC_PIO|NC_FORMAT_CLASSIC, + NC_PIO|NC_FORMAT_64BIT_OFFSET, + NC_PIO|NC_FORMAT_64BIT_DATA, + NC_PIO|NC_FORMAT_CLASSIC, + NC_PIO|NC_FORMAT_64BIT_OFFSET, + NC_PIO|NC_FORMAT_64BIT_DATA}; +#endif #if NUM_MODES==10 int cmode[NUM_MODES] = {NC_PIO, NC_PIO|NC_64BIT_OFFSET, diff --git a/tests/ncint/tst_ncint_async_perf.c b/tests/ncint/tst_ncint_async_perf.c index 7a8cb5a69..d0404b5f1 100644 --- a/tests/ncint/tst_ncint_async_perf.c +++ b/tests/ncint/tst_ncint_async_perf.c @@ -11,6 +11,7 @@ #include #include #include "pio_err_macros.h" +#include "ncint.h" #define FILE_NAME "tst_ncint_async_perf.nc" #define VAR_NAME "data_var" @@ -24,7 +25,7 @@ #define NDIM2 2 #define NDIM3 3 #define NUM_TIMESTEPS 1 -#define NUM_MODES 4 +//#define NUM_MODES 4 extern NC_Dispatch NCINT_dispatcher; @@ -95,6 +96,7 @@ main(int argc, char **argv) float num_megabytes = DIM_LEN_X * DIM_LEN_Y * sizeof(int) / (float)1000000 * NUM_TIMESTEPS; float delta_in_sec; float mb_per_sec; +/* int cmode[NUM_MODES] = {NC_PIO, NC_PIO|NC_NETCDF4, NC_PIO|NC_NETCDF4|NC_MPIIO, NC_PIO|NC_PNETCDF}; @@ -102,6 +104,7 @@ main(int argc, char **argv) "netCDF-4 sequential ", "netCDF-4 parallel I/O", "pnetcdf "}; +*/ int t, m; /* Print header. */ diff --git a/tests/ncint/tst_ncint_perf.c b/tests/ncint/tst_ncint_perf.c index a077f7f91..0e8a51d66 100644 --- a/tests/ncint/tst_ncint_perf.c +++ b/tests/ncint/tst_ncint_perf.c @@ -101,7 +101,7 @@ main(int argc, char **argv) char filename[strlen(FILE_PREFIX)+16]; sprintf(filename,"%s%d.nc",FILE_PREFIX,cmode[m]); /* Turn on logging for PIO library. */ -// PIOc_set_log_level(2); + if(m==9) PIOc_set_log_level(2); // if (!my_rank) // nc_set_log_level(2); if (nc_create(filename, cmode[m], &ncid)) PERR;