From abef381ae9b384aeac0a1ecc8438d94b27eb22dc Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Wed, 5 Aug 2020 09:40:41 -0600 Subject: [PATCH 1/5] fixed memory leaks in tests --- tests/ncint/tst_ncint_async_perf.c | 5 +++-- tests/ncint/tst_ncint_perf.c | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/ncint/tst_ncint_async_perf.c b/tests/ncint/tst_ncint_async_perf.c index 6b60f14f802..7a8cb5a6984 100644 --- a/tests/ncint/tst_ncint_async_perf.c +++ b/tests/ncint/tst_ncint_async_perf.c @@ -162,10 +162,11 @@ main(int argc, char **argv) printf("%s,\t%d,\t%d,\t%d,\t%8.3f,\t%8.1f,\t%8.3f\n", mode_name[m], ntasks, num_io_procs, 1, delta_in_sec, num_megabytes, mb_per_sec); + + free(my_data); + if (nc_free_decomp(ioid)) PERR; } /* next mode flag */ - free(my_data); - if (nc_free_decomp(ioid)) PERR; if (nc_free_iosystem(iosysid)) PERR; } } diff --git a/tests/ncint/tst_ncint_perf.c b/tests/ncint/tst_ncint_perf.c index 2e857c76c67..a5833cc0dbf 100644 --- a/tests/ncint/tst_ncint_perf.c +++ b/tests/ncint/tst_ncint_perf.c @@ -154,10 +154,11 @@ main(int argc, char **argv) printf("%s,\t%d,\t%d,\t%d,\t%8.3f,\t%8.1f,\t%8.3f\n", mode_name[m], ntasks, num_io_procs, 1, delta_in_sec, num_megabytes, mb_per_sec); - } /* next mode flag */ + + free(my_data); + if (nc_free_decomp(ioid)) PERR; - free(my_data); - if (nc_free_decomp(ioid)) PERR; + } /* next mode flag */ } if (nc_free_iosystem(iosysid)) PERR; From 88cf3d137107e592c59e4fcb0c76ecdc1fb2babd Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Wed, 5 Aug 2020 09:46:58 -0600 Subject: [PATCH 2/5] turn on netcdf-integration in travis testing --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2504a0268d0..122e3e64f7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,7 +44,7 @@ script: - export CFLAGS='-std=c99 -fsanitize=address -fno-omit-frame-pointer -Werror' - export FFLAGS='-fsanitize=address -fno-omit-frame-pointer' - export FCFLAGS='-fsanitize=address -fno-omit-frame-pointer -Werror' - - export DISTCHECK_CONFIGURE_FLAGS='--enable-fortran' + - export DISTCHECK_CONFIGURE_FLAGS='--enable-fortran --enable-netcdf-integration' - ./configure --enable-fortran --enable-developer-docs - make -j distcheck - make -j distclean @@ -54,4 +54,4 @@ script: - cmake -DPIO_HDF5_LOGGING=On -DPIO_USE_MALLOC=On -DPIO_ENABLE_LOGGING=On -DPIO_ENABLE_TIMING=Off .. - make VERBOSE=1 - make tests VERBOSE=1 - - ctest -VV \ No newline at end of file + - ctest -VV From 56243cfc054c20ff647b44c8d1ea1eee9a18f456 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Wed, 5 Aug 2020 10:04:47 -0600 Subject: [PATCH 3/5] turn off netcdf-integration in travis testing --- .travis.yml | 3 +-- tests/unit/basic_tests.F90 | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 122e3e64f7a..07a76603d90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,6 @@ before_script: - export CPPFLAGS='-I/usr/include' - wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.1.tar.gz - tar -xzvf pnetcdf-1.12.1.tar.gz - - ls -l - pushd pnetcdf-1.12.1 - ./configure --prefix=/usr --enable-shared - make @@ -44,7 +43,7 @@ script: - export CFLAGS='-std=c99 -fsanitize=address -fno-omit-frame-pointer -Werror' - export FFLAGS='-fsanitize=address -fno-omit-frame-pointer' - export FCFLAGS='-fsanitize=address -fno-omit-frame-pointer -Werror' - - export DISTCHECK_CONFIGURE_FLAGS='--enable-fortran --enable-netcdf-integration' + - export DISTCHECK_CONFIGURE_FLAGS='--enable-fortran' - ./configure --enable-fortran --enable-developer-docs - make -j distcheck - make -j distclean diff --git a/tests/unit/basic_tests.F90 b/tests/unit/basic_tests.F90 index 541fa92cd12..e48c99a9047 100644 --- a/tests/unit/basic_tests.F90 +++ b/tests/unit/basic_tests.F90 @@ -285,7 +285,7 @@ Subroutine test_open(test_id, err_msg) call mpi_abort(MPI_COMM_WORLD, 0, ret_val2) end if - ret_val = PIO_set_log_level(3) + !ret_val = PIO_set_log_level(3) ret_val = PIO_inq_unlimdim(pio_file, unlimdimid) if(unlimdimid /= -1) then err_msg = "Error in inq_unlimdim" @@ -293,7 +293,7 @@ Subroutine test_open(test_id, err_msg) print *,__FILE__,__LINE__,iotype, trim(err_msg) call mpi_abort(MPI_COMM_WORLD, 0, ret_val2) end if - ret_val = PIO_set_log_level(0) + !ret_val = PIO_set_log_level(0) ! Close file call PIO_closefile(pio_file) From 28fcb48523796cabd0ab207122c4b08fd825e8ae Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Wed, 5 Aug 2020 10:07:12 -0600 Subject: [PATCH 4/5] turn off cxx and fortran for pnetcdf build --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 07a76603d90..ec36153a3ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ before_script: - wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.1.tar.gz - tar -xzvf pnetcdf-1.12.1.tar.gz - pushd pnetcdf-1.12.1 - - ./configure --prefix=/usr --enable-shared + - ./configure --prefix=/usr --enable-shared --disable-cxx --disable-fortran - make - sudo make install - popd From 4438bf5a74c20ffb505dacbccac6a7ea2787a033 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Wed, 5 Aug 2020 10:10:13 -0600 Subject: [PATCH 5/5] turns out we need fortran for pnetcdf --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ec36153a3ab..8811a68a86d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ before_script: - wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.1.tar.gz - tar -xzvf pnetcdf-1.12.1.tar.gz - pushd pnetcdf-1.12.1 - - ./configure --prefix=/usr --enable-shared --disable-cxx --disable-fortran + - ./configure --prefix=/usr --enable-shared --disable-cxx - make - sudo make install - popd