From a8c1a331f3c8e9da2143b7fa44bc71d6986a12df Mon Sep 17 00:00:00 2001 From: rem1776 Date: Wed, 28 Aug 2024 15:16:12 -0400 Subject: [PATCH 1/3] add in debug flags to gnu ci and attempt to fix data_override ci failures --- .github/workflows/github_autotools_gnu.yml | 2 +- test_fms/data_override/test_data_override2_mono.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github_autotools_gnu.yml b/.github/workflows/github_autotools_gnu.yml index 7be75bbe68..acfa20f454 100644 --- a/.github/workflows/github_autotools_gnu.yml +++ b/.github/workflows/github_autotools_gnu.yml @@ -32,7 +32,7 @@ jobs: run: autoreconf -if - name: Configure the build if: ${{ matrix.conf-flag != '--disable-setting-flags' }} - run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} || cat config.log + run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="$FCFLAGS -O0 -g -W -fbounds-check -ffpe-trap=invalid,zero,overflow" - name: Configure the build with compiler flags if: ${{ matrix.conf-flag == '--disable-setting-flags' }} run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include $FCFLAGS" || cat config.log diff --git a/test_fms/data_override/test_data_override2_mono.sh b/test_fms/data_override/test_data_override2_mono.sh index be1cce4103..df7f1dc66b 100755 --- a/test_fms/data_override/test_data_override2_mono.sh +++ b/test_fms/data_override/test_data_override2_mono.sh @@ -40,10 +40,11 @@ _EOF for KIND in r4 r8 do - rm -rf INPUT/* test_expect_success "test_data_override with monotonically increasing and decreasing data sets (${KIND})" ' mpirun -n 6 ../test_data_override_ongrid_${KIND} ' + rm -f INPUT/* + sync done rm -rf data_table From 67dc4dd8184d1155e1590bc4abee25c79585563e Mon Sep 17 00:00:00 2001 From: rem1776 Date: Thu, 29 Aug 2024 10:39:48 -0400 Subject: [PATCH 2/3] add variable for flags --- .github/workflows/github_autotools_gnu.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github_autotools_gnu.yml b/.github/workflows/github_autotools_gnu.yml index acfa20f454..c290944e45 100644 --- a/.github/workflows/github_autotools_gnu.yml +++ b/.github/workflows/github_autotools_gnu.yml @@ -25,6 +25,7 @@ jobs: TEST_VERBOSE: 1 DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.conf-flag }} ${{ matrix.input-flag }} ${{ matrix.io-flag }}" SKIP_TESTS: "test_horiz_interp2.[23-24]" # TODO (couldn't reproduce outside CI) + DEBUG_FLAGS: "-O0 -g -fbounds-check -ffpe-trap=invalid,zero,overflow" # debug compiler flags taken from the mkmf template steps: - name: Checkout code uses: actions/checkout@v4 @@ -32,10 +33,10 @@ jobs: run: autoreconf -if - name: Configure the build if: ${{ matrix.conf-flag != '--disable-setting-flags' }} - run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="$FCFLAGS -O0 -g -W -fbounds-check -ffpe-trap=invalid,zero,overflow" + run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="$FCFLAGS $DEBUG_FLAGS" - name: Configure the build with compiler flags if: ${{ matrix.conf-flag == '--disable-setting-flags' }} - run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include $FCFLAGS" || cat config.log + run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include $FCFLAGS $DEBUG_FLAGS" || cat config.log - name: Build the library run: make distcheck if: ${{ matrix.conf-flag != '--with-mpi=no' }} From 762bff4f1b1f8870d1b08825c7070bdd8854ac28 Mon Sep 17 00:00:00 2001 From: rem1776 Date: Thu, 19 Dec 2024 11:38:24 -0500 Subject: [PATCH 3/3] remove unneeded variable causing segfaults --- time_interp/time_interp_external2.F90 | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/time_interp/time_interp_external2.F90 b/time_interp/time_interp_external2.F90 index 0e5386ab3f..5f7bc25bbf 100644 --- a/time_interp/time_interp_external2.F90 +++ b/time_interp/time_interp_external2.F90 @@ -768,7 +768,6 @@ subroutine load_record(field, rec, interp, is_in, ie_in, js_in, je_in, window_id real(r8_kind), allocatable :: mask_out(:,:,:) real(r4_kind), allocatable :: hi_tmp_data(:,:,:,:) !< used to hold a copy of field%domain_data if using r4_kind real(r4_kind), allocatable :: hi_tmp_msk_out(:,:,:) !< used return the field mask if using r4_kind - real(r4_kind), allocatable :: hi_tmp_src_data(:,:,:,:) !< used return the field mask if using r4_kind window_id = 1 if( PRESENT(window_id_in) ) window_id = window_id_in @@ -848,15 +847,10 @@ subroutine load_record(field, rec, interp, is_in, ie_in, js_in, je_in, window_id LBOUND(field%domain_data,2):UBOUND(field%domain_data,2), & LBOUND(field%domain_data,3):UBOUND(field%domain_data,3), & LBOUND(field%domain_data,4):UBOUND(field%domain_data,4))) - allocate(hi_tmp_src_data(LBOUND(field%src_data,1):UBOUND(field%src_data,1), & - LBOUND(field%src_data,2):UBOUND(field%src_data,2), & - LBOUND(field%src_data,3):UBOUND(field%src_data,3), & - LBOUND(field%src_data,4):UBOUND(field%src_data,4))) - ! assign if needed + ! copy over to r4 hi_tmp_data = real(field%domain_data, r4_kind) - hi_tmp_src_data = real(field%src_data, r4_kind) ! do interpolation - call horiz_interp(interp, hi_tmp_src_data(:,:,:,ib), hi_tmp_data(isw:iew,jsw:jew,:,ib), & + call horiz_interp(interp, real(field%src_data(:,:,:,ib),r4_kind), hi_tmp_data(isw:iew,jsw:jew,:,ib), & mask_in=real(mask_in,r4_kind), mask_out=hi_tmp_msk_out) ! assign any output field%domain_data = real(hi_tmp_data, r8_kind) @@ -864,7 +858,6 @@ subroutine load_record(field, rec, interp, is_in, ie_in, js_in, je_in, window_id if(allocated(hi_tmp_data)) deallocate(hi_tmp_data) if(allocated(hi_tmp_msk_out)) deallocate(hi_tmp_msk_out) - if(allocated(hi_tmp_src_data)) deallocate(hi_tmp_src_data) else allocate(mask_out(isw:iew,jsw:jew, size(field%src_data,3))) call horiz_interp(interp, field%src_data(:,:,:,ib),field%domain_data(isw:iew,jsw:jew,:,ib), &