Skip to content

Commit

Permalink
add ogs (#71)
Browse files Browse the repository at this point in the history
* add ogs to optional institutes

* add quotes around CMAKE_Fortran_COMPILER_ID to support cases where it is undefined

* use ubuntu-24.04 to test gfortran-13

* test gfortran 13 and 14 only with ubuntu-24.04
  • Loading branch information
jornbr authored May 28, 2024
1 parent 9ad7042 commit 9ebd005
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/fabm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
version: [9, 10, 11, 12, 13]
version: [9, 10, 11, 12]
os: [ubuntu-latest]
include:
#- version: 4.8
Expand All @@ -24,6 +24,10 @@ jobs:
- version: 8
os: ubuntu-20.04
cmake_args: -DFABM_USE_CONTIGUOUS=OFF
- version: 13
os: ubuntu-24.04
- version: 14
os: ubuntu-24.04
fail-fast: false
runs-on: ${{ matrix.os }}
env:
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
endif()

# Customize compiler flags
if(${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-ffree-line-length-none)
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Intel")
if(WIN32)
add_compile_options("$<$<CONFIG:DEBUG>:/Od>")
endif()
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Cray")
elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Cray")
add_compile_options(-N 1023)
endif()

Expand Down
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ set(DEFAULT_INSTITUTES
msi # Marine Systems Institute, Tallinn University of Technology, Estonia
nersc # Nansen Environmental and Remote Sensing Center
niva # Norwegian Institute for Water Research, Norway
ogs # National Institute of Oceanography and Applied Geophysics - OGS, Italy
pclake # The PCLake model - reference implementation
pisces # Pelagic Interactions Scheme for Carbon and Ecosystem Studies, https://doi.org/10.5194/gmd-8-2465-2015
pml # Plymouth Marine Laboratory, United Kingdom
Expand All @@ -24,7 +25,7 @@ set(DEFAULT_INSTITUTES
uhh # University of Hamburg, Germany
)

set(OPTIONAL_INSTITUTES ersem mops pclake pisces ihamocc)
set(OPTIONAL_INSTITUTES ersem mops pclake pisces ihamocc ogs)

if(CMAKE_CURRENT_LIST_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR "Please point cmake to the top-level directory with FABM source code, not to its src subdirectory.")
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/0d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ find_path(GOTM_BASE
option(FABM_USE_NetCDF "Enable NetCDF output" ON)

# Specify additional compiler flags
if(${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none")
elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Intel")
if(WIN32)
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} /Od")
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(BUILD_SHARED_LIBS ON)
project(python_fabm Fortran)

# Customize compiler flags
if(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Intel")
if(WIN32)
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} /Od")
else()
Expand Down

0 comments on commit 9ebd005

Please sign in to comment.