Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add debug flags to GNU CI and fix remaining failures #1579

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/github_autotools_gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ 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
- name: Prepare GNU autoconf for build
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 $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' }}
Expand Down
2 changes: 2 additions & 0 deletions test_fms/data_override/test_data_override2_mono.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ do
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
Expand Down
11 changes: 2 additions & 9 deletions time_interp/time_interp_external2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -848,23 +847,17 @@ 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)
field%mask(isw:iew,jsw:jew,:,ib) = hi_tmp_msk_out(isw:iew,jsw:jew,:) > 0.0_r4_kind

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), &
Expand Down
Loading