From 0ddbc2b8c1ccdb8b7a530e30d60e6a99cba2a809 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Tue, 22 Aug 2023 13:05:38 -0600 Subject: [PATCH 01/15] fix scalar write issue, fix serial build issue --- src/clib/pio.h | 5 +- src/clib/pio_getput_int.c | 121 ++++++++++++-------------------------- src/clib/pio_internal.h | 2 +- src/clib/pio_msg.c | 10 ++-- src/clib/pio_nc4.c | 2 +- src/flib/pio.F90 | 2 +- src/flib/pio_nf.F90 | 14 ++--- src/ncint/ncintdispatch.c | 2 + tests/cunit/test_pioc.c | 4 +- 9 files changed, 58 insertions(+), 104 deletions(-) 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_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_msg.c b/src/clib/pio_msg.c index 3302ae7a3..4125f72cb 100644 --- a/src/clib/pio_msg.c +++ b/src/clib/pio_msg.c @@ -1142,7 +1142,7 @@ int inq_var_chunking_handler(iosystem_desc_t *ios) return PIO_NOERR; } -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS /** * Do an inq_var_filter_ids on a netCDF variable. This function is only * run on IO tasks. @@ -1247,7 +1247,7 @@ int inq_var_bzip2_handler(iosystem_desc_t *ios) } #endif -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS /** * Do an inq_var_filter_info on a netCDF variable. This function is only * run on IO tasks. @@ -2955,7 +2955,7 @@ int set_loglevel_handler(iosystem_desc_t *ios) #endif return PIO_NOERR; } -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS /** * Do an inq_var_filter_avail on a netCDF variable. This function is only * run on IO tasks. @@ -3177,7 +3177,7 @@ int pio_msg_handler2(int io_rank, int component_count, iosystem_desc_t **iosys, case PIO_MSG_DEF_VAR: ret = def_var_handler(my_iosys); break; -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS #ifdef NC_HAS_ZSTD case PIO_MSG_INQ_VAR_ZSTANDARD: ret = inq_var_zstandard_handler(my_iosys); @@ -3289,7 +3289,7 @@ int pio_msg_handler2(int io_rank, int component_count, iosystem_desc_t **iosys, case PIO_MSG_SETLOGLEVEL: ret = set_loglevel_handler(my_iosys); break; -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS #ifdef NC_HAS_QUANTIZE case PIO_MSG_DEF_VAR_QUANTIZE: ret = def_var_quantize_handler(my_iosys); diff --git a/src/clib/pio_nc4.c b/src/clib/pio_nc4.c index 5ccfe8bc5..a5492b9fd 100644 --- a/src/clib/pio_nc4.c +++ b/src/clib/pio_nc4.c @@ -1395,7 +1395,7 @@ PIOc_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams, unsign return PIO_NOERR; } -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS /** * Get the variable filter ids if any diff --git a/src/flib/pio.F90 b/src/flib/pio.F90 index f94ed7ce1..0f7225363 100644 --- a/src/flib/pio.F90 +++ b/src/flib/pio.F90 @@ -76,7 +76,7 @@ module pio PIO_inq_unlimdim, & PIO_def_dim , & PIO_def_var , & -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS #ifdef NC_HAS_BZ PIO_def_var_bzip2, & #endif diff --git a/src/flib/pio_nf.F90 b/src/flib/pio_nf.F90 index db08a7725..90ebac1fe 100644 --- a/src/flib/pio_nf.F90 +++ b/src/flib/pio_nf.F90 @@ -135,7 +135,7 @@ module pio_nf pio_redef , & pio_set_log_level , & pio_strerror , & -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS #ifdef NC_HAS_QUANTIZE pio_def_var_quantize , & pio_inq_var_quantize , & @@ -176,7 +176,7 @@ module pio_nf def_var_chunking_int, & def_var_chunking_vid end interface pio_def_var_chunking -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS #ifdef NC_HAS_BZ interface pio_def_var_bzip2 module procedure & @@ -409,7 +409,7 @@ module pio_nf inq_var_quantize_id end interface pio_inq_var_quantize #endif -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS interface pio_inq_var_filter_ids module procedure & inq_var_filter_ids_desc , & @@ -1548,7 +1548,7 @@ end function PIOc_inq_var_chunking enddo end function inq_var_chunking_id -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS #ifdef NC_HAS_BZ !> !! @public @@ -2204,7 +2204,7 @@ end function PIOc_def_var_chunking ierr = PIOc_def_var_chunking(ncid, varid-1, storage, cchunksizes) end function def_var_chunking_int -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS #ifdef NC_HAS_BZ !> !! @ingroup PIO_def_var_bzip2 @@ -2581,7 +2581,7 @@ end function PIOc_inq_var_quantize ierr = PIOc_inq_var_quantize(ncid, varid-1, quantize_mode, nsd) end function inq_var_quantize_id #endif -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS !> !! @ingroup PIO_inq_var_filter_ids !! Inquire filter ids for a netCDF-4/HDF5 variable. @@ -2656,7 +2656,7 @@ integer function inq_var_filter_info_desc(file, vardesc, id, params) result(ierr ierr = inq_var_filter_info_id(file%fh, vardesc%varid, id, params) end function inq_var_filter_info_desc -#ifdef PIO_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS !> !! @ingroup PIO_inq_filter_avail_id !! Inquire filter available for a netCDF-4/HDF5 file. diff --git a/src/ncint/ncintdispatch.c b/src/ncint/ncintdispatch.c index a77396bd7..cb6323b1f 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 NC_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 }; /** 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) From e8d1be883be05dcb97e10d55139928a5e9b93cac Mon Sep 17 00:00:00 2001 From: James Edwards Date: Fri, 25 Aug 2023 15:37:11 -0600 Subject: [PATCH 02/15] add derecho_testsuite.py --- src/clib/pioc_support.c | 2 +- src/flib/CMakeLists.txt | 1 + src/ncint/ncintdispatch.c | 3 +- tests/derecho_testsuite.py | 130 +++++++++++++++++++++++++++++ tests/ncint/ncint.h | 29 ++++++- tests/ncint/tst_ncint_async_perf.c | 5 +- tests/ncint/tst_ncint_perf.c | 2 +- 7 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 tests/derecho_testsuite.py diff --git a/src/clib/pioc_support.c b/src/clib/pioc_support.c index f7a1d95c2..67e1df7f2 100644 --- a/src/clib/pioc_support.c +++ b/src/clib/pioc_support.c @@ -3111,7 +3111,7 @@ iotype_is_valid(int iotype) ret++; /* Some builds include netCDF-4. */ -#ifdef _NETCDF4 +#ifdef HAVE_NETCDF4 if (iotype == PIO_IOTYPE_NETCDF4C || iotype == PIO_IOTYPE_NETCDF4P) ret++; #endif /* _NETCDF4 */ 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 cb6323b1f..ed5299814 100644 --- a/src/ncint/ncintdispatch.c +++ b/src/ncint/ncintdispatch.c @@ -231,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/derecho_testsuite.py b/tests/derecho_testsuite.py new file mode 100644 index 000000000..06b4b6f03 --- /dev/null +++ b/tests/derecho_testsuite.py @@ -0,0 +1,130 @@ +#!/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 = ["cray-mpich/8.1.25", "mpi-serial/2.3.0"] +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", "-DPIO_ENABLE_LOGGING=ON"] + 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 = "gcc" + if not ftn: + ftn = "gfortran" + cmakeflags.extend(["-DPIO_USE_MPISERIAL=ON","-DMPISERIAL_PATH=$NCAR_ROOT_MPI_SERIAL","-DPIO_ENABLE_TESTS=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"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(["../"]) + print("Running cmake", flush=True) + try: + cmakeout = subprocess.run(cmake, check=True, cwd=bld, capture_output=True, text=True) + except: + print(f"cmake process failed {cmakeout.stdout}") + continue + print(f"compiler = {compiler} netcdf={netlib} mpilib={mpilib} cmake args = {cmakeout.args}") + 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; From 24a9e1338efddc68fe5ee97fc6bbbab0634f76b9 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Fri, 25 Aug 2023 16:55:17 -0600 Subject: [PATCH 03/15] work on github tests --- .github/workflows/cmake.yml | 2 ++ src/clib/pio_nc4.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9f4cc1586..52086963d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -40,6 +40,8 @@ jobs: - name: parallelio tests run: | pushd $GITHUB_WORKSPACE/build + nc-config --all + cat ../libpio.settings make tests VERBOSE=1 ctest -VV popd diff --git a/src/clib/pio_nc4.c b/src/clib/pio_nc4.c index a5492b9fd..021f15212 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 NC_HAS_PAR_FILTERS - /** * Get the variable filter ids if any * @@ -1795,7 +1794,6 @@ PIOc_inq_var_zstandard(int ncid, int varid, int* hasfilterp, int *levelp) return PIO_NOERR; } #endif - /** * * From 803298715277d109103bd4d2544a13a1072d4e9a Mon Sep 17 00:00:00 2001 From: James Edwards Date: Fri, 25 Aug 2023 17:03:26 -0600 Subject: [PATCH 04/15] github tests again --- .github/actions/parallelio_cmake/action.yml | 2 +- .github/workflows/cmake.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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/cmake.yml b/.github/workflows/cmake.yml index 52086963d..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 @@ -40,8 +41,6 @@ jobs: - name: parallelio tests run: | pushd $GITHUB_WORKSPACE/build - nc-config --all - cat ../libpio.settings make tests VERBOSE=1 ctest -VV popd From 20f1bcf9457d750f864b464af94254e0dd635726 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Fri, 25 Aug 2023 17:14:26 -0600 Subject: [PATCH 05/15] github tests again --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e98da1b4..bc4d8ee03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -358,8 +358,13 @@ 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) -endif() + CHECK_C_SOURCE_COMPILES(" +#include +#if !NC_HAS_PAR_FILTERS + choke me +#endif +int main() {return 0;}" HAVE_PAR_FILTERS) + ### # Check to see if this is netcdf-c-4.7.2, which won't work. ### From 3e6a435ad7cebfb3a6826b65c5a57a6675c31811 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Fri, 25 Aug 2023 17:16:52 -0600 Subject: [PATCH 06/15] github tests again --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc4d8ee03..df6de40c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -364,6 +364,7 @@ if (HAVE_NETCDF_PAR) choke me #endif int main() {return 0;}" HAVE_PAR_FILTERS) +endif() ### # Check to see if this is netcdf-c-4.7.2, which won't work. From d616e352a81246c15b1f92ec99cc21d069c4bd7c Mon Sep 17 00:00:00 2001 From: James Edwards Date: Fri, 25 Aug 2023 17:27:14 -0600 Subject: [PATCH 07/15] github tests again --- src/clib/pio_nc4.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/clib/pio_nc4.c b/src/clib/pio_nc4.c index 021f15212..b566b4f6c 100644 --- a/src/clib/pio_nc4.c +++ b/src/clib/pio_nc4.c @@ -1793,7 +1793,10 @@ PIOc_inq_var_zstandard(int ncid, int varid, int* hasfilterp, int *levelp) return PIO_NOERR; } +// NC_HAS_ZSTD #endif +#endif +#if NC_HAS_PAR_FILTERS /** * * @@ -1873,7 +1876,9 @@ PIOc_inq_filter_avail(int ncid, unsigned int id ) return ierr; } -#endif +// NC_HAS_PAR_FILTERS +#endif +// NC_HAS_MULTIFILTERS #endif #ifdef NC_HAS_QUANTIZE /** From f1abc92cdb83cba72258ec7fc36d048b3ee11534 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Fri, 25 Aug 2023 17:34:17 -0600 Subject: [PATCH 08/15] github tests again --- CMakeLists.txt | 2 ++ src/clib/pio_nc4.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df6de40c2..7af7f3efb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -364,6 +364,8 @@ if (HAVE_NETCDF_PAR) choke me #endif int main() {return 0;}" HAVE_PAR_FILTERS) +else() + set(HAVE_PAR_FILTERS 0) endif() ### diff --git a/src/clib/pio_nc4.c b/src/clib/pio_nc4.c index b566b4f6c..e3eb1bd9e 100644 --- a/src/clib/pio_nc4.c +++ b/src/clib/pio_nc4.c @@ -1796,7 +1796,7 @@ PIOc_inq_var_zstandard(int ncid, int varid, int* hasfilterp, int *levelp) // NC_HAS_ZSTD #endif #endif -#if NC_HAS_PAR_FILTERS +#ifdef NC_HAS_PAR_FILTERS /** * * From ab6c84b29db32d68d6b495f334fca3a708bc8004 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Fri, 25 Aug 2023 17:38:52 -0600 Subject: [PATCH 09/15] github tests again --- src/clib/pio_nc4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clib/pio_nc4.c b/src/clib/pio_nc4.c index e3eb1bd9e..8983061d4 100644 --- a/src/clib/pio_nc4.c +++ b/src/clib/pio_nc4.c @@ -1395,7 +1395,7 @@ PIOc_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams, unsign return PIO_NOERR; } -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS /** * Get the variable filter ids if any * @@ -1796,7 +1796,7 @@ PIOc_inq_var_zstandard(int ncid, int varid, int* hasfilterp, int *levelp) // NC_HAS_ZSTD #endif #endif -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS /** * * From f01d368129b69ad7a53915d8a82aeeca0bc5b23c Mon Sep 17 00:00:00 2001 From: James Edwards Date: Fri, 25 Aug 2023 17:41:53 -0600 Subject: [PATCH 10/15] github tests again --- src/flib/pio.F90 | 2 +- src/flib/pio_nf.F90 | 14 +++++++------- src/ncint/ncintdispatch.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/flib/pio.F90 b/src/flib/pio.F90 index 0f7225363..f94ed7ce1 100644 --- a/src/flib/pio.F90 +++ b/src/flib/pio.F90 @@ -76,7 +76,7 @@ module pio PIO_inq_unlimdim, & PIO_def_dim , & PIO_def_var , & -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS #ifdef NC_HAS_BZ PIO_def_var_bzip2, & #endif diff --git a/src/flib/pio_nf.F90 b/src/flib/pio_nf.F90 index 90ebac1fe..db08a7725 100644 --- a/src/flib/pio_nf.F90 +++ b/src/flib/pio_nf.F90 @@ -135,7 +135,7 @@ module pio_nf pio_redef , & pio_set_log_level , & pio_strerror , & -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS #ifdef NC_HAS_QUANTIZE pio_def_var_quantize , & pio_inq_var_quantize , & @@ -176,7 +176,7 @@ module pio_nf def_var_chunking_int, & def_var_chunking_vid end interface pio_def_var_chunking -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS #ifdef NC_HAS_BZ interface pio_def_var_bzip2 module procedure & @@ -409,7 +409,7 @@ module pio_nf inq_var_quantize_id end interface pio_inq_var_quantize #endif -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS interface pio_inq_var_filter_ids module procedure & inq_var_filter_ids_desc , & @@ -1548,7 +1548,7 @@ end function PIOc_inq_var_chunking enddo end function inq_var_chunking_id -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS #ifdef NC_HAS_BZ !> !! @public @@ -2204,7 +2204,7 @@ end function PIOc_def_var_chunking ierr = PIOc_def_var_chunking(ncid, varid-1, storage, cchunksizes) end function def_var_chunking_int -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS #ifdef NC_HAS_BZ !> !! @ingroup PIO_def_var_bzip2 @@ -2581,7 +2581,7 @@ end function PIOc_inq_var_quantize ierr = PIOc_inq_var_quantize(ncid, varid-1, quantize_mode, nsd) end function inq_var_quantize_id #endif -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS !> !! @ingroup PIO_inq_var_filter_ids !! Inquire filter ids for a netCDF-4/HDF5 variable. @@ -2656,7 +2656,7 @@ integer function inq_var_filter_info_desc(file, vardesc, id, params) result(ierr ierr = inq_var_filter_info_id(file%fh, vardesc%varid, id, params) end function inq_var_filter_info_desc -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS !> !! @ingroup PIO_inq_filter_avail_id !! Inquire filter available for a netCDF-4/HDF5 file. diff --git a/src/ncint/ncintdispatch.c b/src/ncint/ncintdispatch.c index ed5299814..30ec26781 100644 --- a/src/ncint/ncintdispatch.c +++ b/src/ncint/ncintdispatch.c @@ -127,7 +127,7 @@ NC_Dispatch NCINT_dispatcher = { NC_NOTNC4_def_var_filter, NC_NOTNC4_set_var_chunk_cache, NC_NOTNC4_get_var_chunk_cache, -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS #if NC_DISPATCH_VERSION == 2 PIO_NCINT_filter_actions, #endif From 1026fbd972946ff3678254b2a9ec4e3acb727875 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Fri, 25 Aug 2023 17:44:05 -0600 Subject: [PATCH 11/15] github tests again --- src/clib/pio_msg.c | 10 +++++----- src/clib/pio_nc4.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/clib/pio_msg.c b/src/clib/pio_msg.c index 4125f72cb..3302ae7a3 100644 --- a/src/clib/pio_msg.c +++ b/src/clib/pio_msg.c @@ -1142,7 +1142,7 @@ int inq_var_chunking_handler(iosystem_desc_t *ios) return PIO_NOERR; } -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS /** * Do an inq_var_filter_ids on a netCDF variable. This function is only * run on IO tasks. @@ -1247,7 +1247,7 @@ int inq_var_bzip2_handler(iosystem_desc_t *ios) } #endif -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS /** * Do an inq_var_filter_info on a netCDF variable. This function is only * run on IO tasks. @@ -2955,7 +2955,7 @@ int set_loglevel_handler(iosystem_desc_t *ios) #endif return PIO_NOERR; } -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS /** * Do an inq_var_filter_avail on a netCDF variable. This function is only * run on IO tasks. @@ -3177,7 +3177,7 @@ int pio_msg_handler2(int io_rank, int component_count, iosystem_desc_t **iosys, case PIO_MSG_DEF_VAR: ret = def_var_handler(my_iosys); break; -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS #ifdef NC_HAS_ZSTD case PIO_MSG_INQ_VAR_ZSTANDARD: ret = inq_var_zstandard_handler(my_iosys); @@ -3289,7 +3289,7 @@ int pio_msg_handler2(int io_rank, int component_count, iosystem_desc_t **iosys, case PIO_MSG_SETLOGLEVEL: ret = set_loglevel_handler(my_iosys); break; -#ifdef NC_HAS_PAR_FILTERS +#ifdef PIO_HAS_PAR_FILTERS #ifdef NC_HAS_QUANTIZE case PIO_MSG_DEF_VAR_QUANTIZE: ret = def_var_quantize_handler(my_iosys); diff --git a/src/clib/pio_nc4.c b/src/clib/pio_nc4.c index 8983061d4..3074bbd95 100644 --- a/src/clib/pio_nc4.c +++ b/src/clib/pio_nc4.c @@ -1876,7 +1876,7 @@ PIOc_inq_filter_avail(int ncid, unsigned int id ) return ierr; } -// NC_HAS_PAR_FILTERS +// PIO_HAS_PAR_FILTERS #endif // NC_HAS_MULTIFILTERS #endif From 40bb4516889675c118762b28e2b818b1c86ea6e4 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Sat, 26 Aug 2023 07:40:08 -0600 Subject: [PATCH 12/15] more github --- .github/workflows/autotools.yml | 6 +++--- .github/workflows/intel.yml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) 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/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 From 8b04e206f6b64df6faf3bf6758a10019519a0b2a Mon Sep 17 00:00:00 2001 From: James Edwards Date: Mon, 28 Aug 2023 10:17:24 -0600 Subject: [PATCH 13/15] fix test for netcdf4 --- configure.ac | 6 +++--- src/clib/pio_file.c | 2 +- src/clib/pioc_support.c | 4 ++-- tests/cunit/test_intercomm2.c | 1 + tests/derecho_testsuite.py | 5 +++-- 5 files changed, 10 insertions(+), 8 deletions(-) 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_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/pioc_support.c b/src/clib/pioc_support.c index 67e1df7f2..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 HAVE_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/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/derecho_testsuite.py b/tests/derecho_testsuite.py index 06b4b6f03..bb4a2a006 100644 --- a/tests/derecho_testsuite.py +++ b/tests/derecho_testsuite.py @@ -72,7 +72,7 @@ if cmakeopt and "mpi-serial" in mpilib and "PNETCDF" in cmakeopt: continue bldcnt = bldcnt+1 - bld = f"bld{bldcnt:02d}" + bld = f"/glade/derecho/scratch/jedwards/piotest/bld{bldcnt:02d}" os.chdir(piodir) if os.path.exists(bld): shutil.rmtree(bld) @@ -89,8 +89,9 @@ cmake.extend(cmakeflags) if cmakeopt: cmake.extend(cmakeopt) - cmake.extend(["../"]) + cmake.extend([piodir]) print("Running cmake", flush=True) + cmakeout = None try: cmakeout = subprocess.run(cmake, check=True, cwd=bld, capture_output=True, text=True) except: From 155be2fc92b7b4dc52023e9a003ef1ecd121ba63 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Mon, 28 Aug 2023 12:37:31 -0600 Subject: [PATCH 14/15] update version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7af7f3efb..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. From 3661a58bdfbc7912624e2dd3f835827bfa2e2c7c Mon Sep 17 00:00:00 2001 From: James Edwards Date: Mon, 28 Aug 2023 15:43:00 -0600 Subject: [PATCH 15/15] derecho test script update --- tests/derecho_testsuite.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/derecho_testsuite.py b/tests/derecho_testsuite.py index bb4a2a006..4f31f5971 100644 --- a/tests/derecho_testsuite.py +++ b/tests/derecho_testsuite.py @@ -18,7 +18,7 @@ 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 = ["cray-mpich/8.1.25", "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"] @@ -36,7 +36,7 @@ module("load", compiler) for mpilib in mpilibs: module("load", mpilib) - cmakeflags = ["-DPIO_ENABLE_EXAMPLES=OFF", "-DPIO_ENABLE_LOGGING=ON"] + cmakeflags = ["-DPIO_ENABLE_EXAMPLES=OFF"] for netlib in netcdf: module("unload", "netcdf") module("unload", "hdf5") @@ -46,10 +46,11 @@ cc = os.getenv("CC") ftn = os.getenv("FC") if not cc: - cc = "gcc" + cc = "cc" if not ftn: - ftn = "gfortran" - cmakeflags.extend(["-DPIO_USE_MPISERIAL=ON","-DMPISERIAL_PATH=$NCAR_ROOT_MPI_SERIAL","-DPIO_ENABLE_TESTS=OFF"]) + 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 @@ -90,14 +91,17 @@ if cmakeopt: cmake.extend(cmakeopt) cmake.extend([piodir]) - print("Running cmake", flush=True) + 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}") + #print(f"cmake process failed {cmakeout.stdout}") continue - print(f"compiler = {compiler} netcdf={netlib} mpilib={mpilib} cmake args = {cmakeout.args}") + + printline = False for line in cmakeout.stdout.split("\n"): if "PIO Configuration Summary" in line: