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

Fix for ExtData2G unit test on discover GNU #3347

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from
Draft
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
14 changes: 9 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ workflows:
jobs:
# Builds MAPL in a "default" way
- ci/build:
name: build-and-test-MAPL-on-<< matrix.compiler >>-using-<< matrix.cmake_generator >>
name: build-and-test-MAPL-as-<< matrix.build_type >>-on-<< matrix.compiler >>-using-<< matrix.cmake_generator >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran, ifort, ifx]
cmake_generator: ['Unix Makefiles','Ninja']
build_type: ['Debug', 'Release']
baselibs_version: *baselibs_version
repo: MAPL
mepodevelop: false
Expand All @@ -44,12 +45,13 @@ workflows:

# Builds MAPL like UFS does (no FLAP and pFlogger, static)
- ci/build:
name: build-UFS-MAPL-on-<< matrix.compiler >>
name: build-UFS-MAPL-as-<< matrix.build_type >>-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran, ifort, ifx]
build_type: ['Debug', 'Release']
baselibs_version: *baselibs_version
repo: MAPL
mepodevelop: false
Expand All @@ -62,12 +64,13 @@ workflows:

# Builds MAPL without pFUnit support
- ci/build:
name: build-MAPL-without-pFUnit-on-<< matrix.compiler >>
name: build-MAPL-without-pFUnit-as-<< matrix.build_type>>-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [ifort, ifx]
build_type: ['Debug', 'Release']
baselibs_version: *baselibs_version
repo: MAPL
mepodevelop: false
Expand All @@ -77,12 +80,13 @@ workflows:

# Run MAPL Tutorials
- ci/run_mapl_tutorial:
name: run-<< matrix.tutorial_name >>-Tutorial-with-<< matrix.compiler >>
name: run-<< matrix.tutorial_name >>-Tutorial-with-<< matrix.compiler >>-built-with-<< matrix.build_type >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran, ifort, ifx]
build_type: ['Debug', 'Release']
tutorial_name:
- hello_world
- parent_no_children
Expand All @@ -92,7 +96,7 @@ workflows:
# We will only run the tutorials with GNU make. No need to double up
# as Ninja is a build test only
requires:
- build-and-test-MAPL-on-<< matrix.compiler >>-using-Unix Makefiles
- build-and-test-MAPL-as-<< matrix.build_type >>-on-<< matrix.compiler >>-using-Unix Makefiles
baselibs_version: *baselibs_version

build-and-run-GEOSgcm:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added `Release` build CI tests for MAPL

### Changed

### Fixed

- Fix ExtData2G unit test for GNU on Discover

### Removed

### Deprecated
Expand Down
6 changes: 5 additions & 1 deletion gridcomps/ExtData2G/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ set (test_srcs

add_pfunit_ctest(MAPL.ExtData2G.tests
TEST_SOURCES ${test_srcs}
LINK_LIBRARIES MAPL.ExtData2G
LINK_LIBRARIES MAPL.ExtData2G MAPL.pfunit
EXTRA_INITIALIZE Initialize
EXTRA_USE MAPL_pFUnit_Initialize
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
MAX_PES 1
)
set_target_properties(MAPL.ExtData2G.tests PROPERTIES Fortran_MODULE_DIRECTORY ${MODULE_DIRECTORY})
set_tests_properties(MAPL.ExtData2G.tests PROPERTIES LABELS "ESSENTIAL")
Expand Down
14 changes: 7 additions & 7 deletions gridcomps/ExtData2G/tests/Test_ExtDataUpdatePointer.pf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

module Test_ExtDataUpdatePointer
use MAPL_ExtDataPointerUpdate
use funit
use pfunit
use esmf
use MAPL_ExceptionHandling
implicit none
Expand All @@ -15,7 +15,7 @@ module Test_ExtDataUpdatePointer
integer, parameter :: TIME_STEP_IN_SECONDS = 1
integer, parameter :: REFERENCE_TIME_FIELDS(*) = [2024, 12, 31, 20, 0, 0]
integer, parameter :: NF = size(REFERENCE_TIME_FIELDS)
integer, parameter :: START_TIME_FIELDS(*) = [2024, 01, 01, 0, 0, 0]
integer, parameter :: START_TIME_FIELDS(*) = [2024, 01, 01, 0, 0, 0]
integer, parameter :: DEFAULT_TIME_FIELDS(*) = [REFERENCE_TIME_FIELDS(1:3), 0, 0, 0]
integer, parameter :: UPDATE_TIME_FIELDS(*) = [0, 1, 1, REFERENCE_TIME_FIELDS(4:)]
integer, parameter :: STRLEN = 32
Expand Down Expand Up @@ -76,7 +76,7 @@ contains
status = 0
call ESMF_TimeSet(datetime, yy=f(1), mm=f(2), dd=f(3), h=f(4), m=f(5), s=f(6), _RC)
_RETURN(_SUCCESS)

end subroutine make_esmf_time

! Put ESMF_Time output args into an integer array.
Expand Down Expand Up @@ -104,7 +104,7 @@ contains
_VERIFY(status)

end subroutine make_offset_string

@Test
subroutine test_get_adjusted_time
type(ExtDataPointerUpdate) :: ex
Expand Down Expand Up @@ -142,7 +142,7 @@ contains
@assertEqual(expected, actual, ERR_MSG)

end subroutine test_create_from_parameters_string_positive

@Test
subroutine test_create_from_parameters_string_negative()
type(ExtDataPointerUpdate) :: ex
Expand Down Expand Up @@ -269,7 +269,7 @@ contains
offset = timestep
call ESMF_TimeIntervalGet(offset, s=expected, _RC)
call ex%create_from_parameters(UPDATE_TIMESTRING, UPDATE_FREQ_STRING, OFFSET_STRING, default_time, clock, rc=status)
@assertFalse(status == 0, 'An exception should have been thrown.')
@assertExceptionRaised('"+" and "-" cannot both be present in update_offset string.')

end subroutine test_create_from_parameters_heartbeat_positive_negative

Expand All @@ -284,7 +284,7 @@ contains
offset = timestep
call ESMF_TimeIntervalGet(offset, s=expected, _RC)
call ex%create_from_parameters(UPDATE_TIMESTRING, UPDATE_FREQ_STRING, OFFSET_STRING, default_time, clock, rc=status)
@assertFalse(status == 0, 'An exception should have been thrown.')
@assertExceptionRaised('"+" and "-" cannot both be present in update_offset string.')

end subroutine test_create_from_parameters_heartbeat_negative_positive

Expand Down
Loading