diff --git a/.github/workflows/a3.yml b/.github/workflows/a3.yml index 6f326b86a3a..53121bb8acb 100644 --- a/.github/workflows/a3.yml +++ b/.github/workflows/a3.yml @@ -126,7 +126,7 @@ jobs: export CC=/home/runner/openmpi/bin/mpicc autoreconf -i ./configure --with-mpiexec='mpiexec --oversubscribe' - which mpiexec + cat config.h make check - name: cmake build run: | @@ -138,6 +138,7 @@ jobs: cd build export LD_LIBRARY_PATH="/home/runner/netcdf-c/lib:/home/runner/pnetcdf/lib:/home/runner/hdf5/lib:/home/runner/openmpi/lib:$LD_LIBRARY_PATH" cmake -Wno-dev -DWITH_MPIEXEC='/home/runner/openmpi/bin/mpiexec;--oversubscribe' -DNetCDF_C_LIBRARY=/home/runner/netcdf-c/lib/libnetcdf.so -DNetCDF_C_INCLUDE_DIR=/home/runner/netcdf-c/include -DPnetCDF_PATH='/home/runner/pnetcdf' -DPIO_ENABLE_FORTRAN=Off -DPIO_HDF5_LOGGING=On -DPIO_USE_MALLOC=On -DPIO_ENABLE_LOGGING=On -DPIO_ENABLE_TIMING=Off .. || (cat CMakeFiles/CMakeOutput.log && cat CMakeFiles/CMakeError.log) + cat config.h make VERBOSE=1 make tests VERBOSE=1 ctest -VV diff --git a/tests/unit/ftst_vars.F90 b/tests/unit/ftst_vars.F90 index f56ed2d81fc..a9f0a755011 100644 --- a/tests/unit/ftst_vars.F90 +++ b/tests/unit/ftst_vars.F90 @@ -10,11 +10,15 @@ program ftst_vars use pio type(iosystem_desc_t) :: pio_iosystem - type(file_desc_t) :: pio_file + type(file_desc_t) :: pio_file + type(var_desc_t) :: pio_var integer :: my_rank, ntasks integer :: niotasks = 1, stride = 1 character(len=64) :: filename = 'ftst_vars.nc' + character(len=64) :: dim_name = 'influence_on_Roman_history' + character(len=64) :: var_name = 'Caesar' integer :: iotype = PIO_iotype_netcdf4c + integer :: dimid, dim_len = 4 integer :: ierr ! Set up MPI @@ -36,12 +40,23 @@ program ftst_vars ierr = PIO_createfile(pio_iosystem, pio_file, iotype, filename) if (ierr .ne. PIO_NOERR) stop 3 + ! Define a dim. + ret_val = PIO_def_dim(pio_file, dim_name, dim_len, dimid) + if (ierr .ne. PIO_NOERR) stop 5 + + ! Define a var. + ret_val = PIO_def_var(pio_file, var_name, PIO_int, (/dimid/), pio_var) + if (ierr .ne. PIO_NOERR) stop 7 + ! Close the file. call PIO_closefile(pio_file) ! Open the file. + ret_val = PIO_openfile(pio_iosystem, pio_file, iotype, filename, PIO_nowrite) + if (ierr .ne. PIO_NOERR) stop 3 - + ! Close the file. + call PIO_closefile(pio_file) ! Finalize PIO. call PIO_finalize(pio_iosystem, ierr)