Skip to content

Commit

Permalink
Merge branch 'develop' into feature/mathomp4/2926-update-quantize
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 authored Aug 7, 2024
2 parents 703951d + aa8511e commit 12d15ca
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 225 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Added new driver, CapDriver.x, to excerise the MAPL_Cap with the configuratable component also used by ExtDataDriver.x
- Added Fortran interface to UDUNITS2
- NOTE: This now means MAPL depends on UDUNITS2 (and transitively, expat)
- Improve mask sampler by adding an MPI step and a LS_chunk (intermediate step)
Expand Down Expand Up @@ -42,6 +43,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fix profiler PercentageColumn test for GCC 14
- Fix bug in ExtData Tests. CMake was overwriting the `EXTDATA2G_SMALL_TESTS` LABEL with `ESSENTIAL`

### Removed

### Deprecated
Expand Down
19 changes: 14 additions & 5 deletions Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
esma_set_this (OVERRIDE MAPL.test_utilities)

set(MODULE_DIRECTORY "${esma_include}/Tests")

set (srcs
ExtDataDriverGridComp.F90
ExtDataRoot_GridComp.F90
ExtDataDriver.F90
ExtDataDriverMod.F90
VarspecDescription.F90
)

esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL NetCDF::NetCDF_Fortran NetCDF::NetCDF_C TYPE ${MAPL_LIBRARY_TYPE})

if (BUILD_WITH_FARGPARSE)

ecbuild_add_executable (TARGET ExtDataDriver.x SOURCES ${srcs})
target_link_libraries (ExtDataDriver.x PRIVATE MAPL FARGPARSE::fargparse ESMF::ESMF)
ecbuild_add_executable (TARGET ExtDataDriver.x SOURCES ExtDataDriver.F90 ExtDataDriverGridComp.F90 ExtDataDriverMod.F90)
target_link_libraries (ExtDataDriver.x PRIVATE MAPL MAPL.test_utilities FARGPARSE::fargparse ESMF::ESMF)
# CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
target_link_libraries(ExtDataDriver.x PRIVATE OpenMP::OpenMP_Fortran)
Expand All @@ -35,4 +36,12 @@ if (BUILD_WITH_FARGPARSE)
endif ()
set_target_properties(MAPL_demo_fargparse.x PROPERTIES Fortran_MODULE_DIRECTORY ${MODULE_DIRECTORY})

ecbuild_add_executable (TARGET CapDriver.x SOURCES CapDriver.F90)
target_link_libraries (CapDriver.x PRIVATE MAPL MAPL.test_utilities FARGPARSE::fargparse ESMF::ESMF)
# CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
target_link_libraries(CapDriver.x PRIVATE OpenMP::OpenMP_Fortran)
endif ()
set_target_properties(CapDriver.x PROPERTIES Fortran_MODULE_DIRECTORY ${MODULE_DIRECTORY})

endif ()
24 changes: 24 additions & 0 deletions Tests/CapDriver.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#define I_AM_MAIN

#include "MAPL_Generic.h"

program CapDriver_Main
use MPI
use MAPL
use ExtDataUtRoot_GridCompMod, only: ROOT_SetServices => SetServices
implicit none

character(len=*), parameter :: Iam="CapDriver_Main"
type (MAPL_Cap) :: cap
type (MAPL_FargparseCLI) :: cli
type (MAPL_CapOptions) :: cap_options
integer :: status

cli = MAPL_FargparseCLI()
cap_options = MAPL_CapOptions(cli)
cap = MAPL_Cap('Root', ROOT_SetServices, cap_options = cap_options)

call cap%run(_RC)

end program CapDriver_Main

3 changes: 1 addition & 2 deletions Tests/ExtData_Testing_Framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ foreach(TEST_CASE ${TEST_CASES_2G})
elseif (${TEST_CASE} IN_LIST SLOW_TESTS)
set_tests_properties ("ExtData2G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA2G_SLOW_TESTS")
else()
set_tests_properties ("ExtData2G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA2G_SMALL_TESTS")
set_tests_properties ("ExtData2G_${TEST_CASE}" PROPERTIES LABELS "ESSENTIAL")
set_tests_properties ("ExtData2G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA2G_SMALL_TESTS;ESSENTIAL")
endif()
endforeach()
Loading

0 comments on commit 12d15ca

Please sign in to comment.