Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: 2.1

# Anchors in case we need to override the defaults from the orb
#baselibs_version: &baselibs_version v7.17.0
#bcs_version: &bcs_version v11.4.0
#baselibs_version: &baselibs_version v7.32.0
#bcs_version: &bcs_version v11.6.0

orbs:
ci: geos-esm/circleci-tools@2
ci: geos-esm/circleci-tools@4

workflows:
build-test:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/release-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@ jobs:
with:
path: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}

- name: Checkout mepo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
repository: GEOS-ESM/mepo
path: mepo
python-version: '3.11'

- name: Pip install mepo
run: |
python -m pip install --upgrade pip
pip install mepo

- name: Run mepo
run : |
cd ${GITHUB_WORKSPACE}/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}
${GITHUB_WORKSPACE}/mepo/mepo clone
mepo clone

- name: Create tarball
run: |
Expand Down
49 changes: 48 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.13)
cmake_minimum_required (VERSION 3.24)
cmake_policy (SET CMP0053 NEW)
cmake_policy (SET CMP0054 NEW)

Expand Down Expand Up @@ -33,8 +33,55 @@ foreach (dir cmake @cmake cmake@)
set (ESMA_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/${dir}" CACHE PATH "Path to ESMA_cmake code")
endif ()
endforeach ()

# We need to find MPI before we go into esma
# for the MPI stack detection to work
set(MPI_DETERMINE_LIBRARY_VERSION TRUE)
find_package(MPI)

include (esma)

# Add CMake for when not using Baselibs
if (NOT Baselibs_FOUND)

find_package(NetCDF REQUIRED C Fortran)
add_definitions(-DHAS_NETCDF4)
add_definitions(-DHAS_NETCDF3)
add_definitions(-DNETCDF_NEED_NF_MPIIO)
add_definitions(-DHAS_NETCDF3)

find_package(HDF5 REQUIRED)
if(HDF5_IS_PARALLEL)
add_definitions(-DH5_HAVE_PARALLEL)
endif()

if (NOT TARGET ESMF::ESMF)
find_package(ESMF 8.6.1 MODULE REQUIRED)
target_link_libraries(ESMF::ESMF INTERFACE MPI::MPI_Fortran)

# GEOS uses lowercase target due to historical reasons but
# the latest FindESMF.cmake file from ESMF produces an ESMF::ESMF target.
if (NOT TARGET esmf)
add_library(esmf ALIAS ESMF::ESMF)
endif ()
if (NOT TARGET ESMF)
add_library(ESMF ALIAS ESMF::ESMF)
endif ()
endif ()

find_package(GFTL_SHARED REQUIRED)

find_package(ZLIB REQUIRED)
# Another issue with historical reasons, old/wrong zlib target used in GEOS
add_library(ZLIB::zlib ALIAS ZLIB::ZLIB)

find_package(MAPL 2.54 QUIET)
if (MAPL_FOUND)
message(STATUS "Found MAPL: ${MAPL_BASE_DIR} (found version \"${MAPL_VERSION})\"")
endif ()

endif ()

ecbuild_declare_project()

# Generic DFLAGS
Expand Down
18 changes: 5 additions & 13 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
{
"version": 3,
"version": 7,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"minor": 27,
"patch": 0
},
"include": [
"presets/CMake$penv{CMAKE_PRESET_NAME}Presets.json"
],
"configurePresets": [
{
"name": "base-configure",
"hidden": true,
"displayName": "Base Configure Settings",
"description": "Sets build and install directories",
"binaryDir": "${sourceDir}/build-${presetName}",
"cacheVariables": {
"BASEDIR": "$env{BASEDIR}",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install-${presetName}"
}
},
{
"name": "base-gnu",
"hidden": true,
Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ module use -a (path)
module load GEOSenv
```

where `(path)` depends on the computing system; at NCCS, `(path)` also depends on the operating system (SLES12 on Skylake and Cascade Lake nodes; SLES15 on Milan nodes, as of Jan. 2024):
where `(path)` depends on the computing system:

| System | Path |
| ------------- |---------------------------------------------------|
| NCCS Discover | `/discover/swdev/gmao_SIteam/modulefiles-SLES12` |
| | `/discover/swdev/gmao_SIteam/modulefiles-SLES15` |
| NCCS Discover | `/discover/swdev/gmao_SIteam/modulefiles-SLES15` |
| NAS | `/nobackup/gmao_SIteam/modulefiles` |
| GMAO desktops | `/ford1/share/gmao_SIteam/modulefiles` |

Expand All @@ -39,22 +38,24 @@ For science runs, you can also obtain a specific tag or branch _only_ (as oppose
```
git clone -b v17.9.1 --single-branch git@github.com:GEOS-ESM/GEOSldas.git
```

Helpful tip: You can speed up this step by applying the following, one-time `mepo` configuration change:
```
mepo config set clone.partial blobless
```
With this configuration change, the size of the initial clone will be reduced, and additional blobs are fetched later when needed.

### Step 3: Build the Model

To build the model in a single step, do the following from a head node:
```
cd ./GEOSldas
parallel_build.csh
./parallel_build.csh
```
This checks out all the external repositories of the model (albeit only on the first run, [see subsection on mepo below](#mepo)!) and then builds and installs the model.

At **NCCS**, the default is to build GEOSldas on SLES12 (Skylake or Cascade Lake nodes); to build GEOSldas on SLES15 (Milan nodes), use `parallel_build.csh -mil`.
The resulting model build is found in `build/`, and the installation is found in `install/`, with setup scripts like `ldas_setup` in `install/bin/`.

The resulting model build is found in `build[-SLESxx]/`, and the installation is found in `install[-SLESxx]/`, with setup scripts like `ldas_setup` in `install[-SLESxx]/bin`.

To obtain a build that is suitable for debugging, use `parallel_build.csh -debug`, which builds in `build-Debug[-SLESxx]/` and installs in `install-Debug[-SLESxx]/`. There is also an option for aggressive optimization. For details, see the [GEOSldas Wiki](https://github.com/GEOS-ESM/GEOSldas/wiki).
To obtain a build that is suitable for debugging, use `./parallel_build.csh -debug`, which builds in `build-Debug/` and installs in `install-Debug/`. There is also an option for aggressive optimization. For details, see the [GEOSldas Wiki](https://github.com/GEOS-ESM/GEOSldas/wiki).

Instructions for building the model in multiple steps are provided below.

Expand All @@ -63,13 +64,11 @@ Instructions for building the model in multiple steps are provided below.
## How to Set Up (Configure) and Run GEOSldas


a) At **NCCS**, GEOSldas must be built, configured, and run on the same operating system. To run GEOSldas on Milan nodes (SLES15), start with `ssh discover-mil`.

b) Set up the job as follows:
Set up the job as follows:

```
cd (build_path)/GEOSldas/install[-SLESxx]/bin
source g5_modules [for bash or zsh: source g5_modules.[z]sh]
cd (build_path)/GEOSldas/install/bin
source g5_modules [for bash or zsh: source g5_modules.[z]sh]
./ldas_setup setup [-v] (exp_path) ("exe"_input_filename) ("bat"_input_filename)
```

Expand Down
8 changes: 4 additions & 4 deletions components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ GEOSldas:
env:
local: ./@env
remote: ../ESMA_env.git
tag: v4.29.1
tag: v4.36.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biljanaorescanin, @mathomp4 : I ticked up the versions of env, cmake, and MAPL (c1007c8). Based on the documentation of the respective releases, this should be zero-diff w.r.t. what was on the PR before my latest edits (but definitely non-0-diff w.r.t. current develop). @mathomp4, please let me know if you have any objections or suggestions. @biljanaorescanin, when you get a chance, please re-test the PR. If all is as expected, the new test is 0-diff w.r.t. the most recent test (if you still have a copy).

develop: main

cmake:
local: ./@cmake
remote: ../ESMA_cmake.git
tag: v3.52.0
tag: v3.57.0
develop: develop

ecbuild:
Expand All @@ -36,7 +36,7 @@ GMAO_Shared:
GEOS_Util:
local: ./src/Shared/@GMAO_Shared/@GEOS_Util
remote: ../GEOS_Util.git
tag: v2.1.3
tag: v2.1.6
sparse: ./config/GEOS_Util.sparse
develop: main

Expand All @@ -45,7 +45,7 @@ GEOS_Util:
MAPL:
local: ./src/Shared/@MAPL
remote: ../MAPL.git
tag: v2.50.1
tag: v2.54.2
develop: develop

GEOSldas_GridComp:
Expand Down
3 changes: 1 addition & 2 deletions parallel_build.csh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ if (! -d ${ESMADIR}/@env) then
echo " Please run from a head node"
exit 1
else
echo "Running mepo initialization"
mepo init
echo "Running mepo clone"
mepo clone
endif
endif
Expand Down
13 changes: 13 additions & 0 deletions presets/CMakeDefaultPresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"configurePresets": [
{
"name": "base-configure",
"hidden": true,
"displayName": "Base Configure Settings",
"description": "Sets build and install directories",
"binaryDir": "${sourceDir}/build-${presetName}",
"installDir": "${sourceDir}/install-${presetName}"
}
],
"version": 7
}
13 changes: 13 additions & 0 deletions presets/CMakeNCCSPresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"configurePresets": [
{
"name": "base-configure",
"hidden": true,
"displayName": "Base Configure Settings",
"description": "Sets build and install directories",
"binaryDir": "$penv{CMAKE_BUILD_LOCATION}/${sourceDirName}/build-${presetName}",
"installDir": "$penv{CMAKE_INSTALL_LOCATION}/${sourceDirName}/install-${presetName}"
}
],
"version": 7
}