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

v12: Update to ESMA_cmake v4.11.0, ESMA_env 5.7.0 #864

Open
wants to merge 6 commits into
base: feature/sdrabenh/gcm_v12
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ parameters:
default: ""

# Anchors to prevent forgetting to update a version
os_version: &os_version ubuntu20
os_version: &os_version ubuntu24
baselibs_version: &baselibs_version v8.7.0
bcs_version: &bcs_version v12.0.0
tag_build_arg_name: &tag_build_arg_name gcmversion
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')"
runs-on: ubuntu-latest
container:
image: gmao/ubuntu20-geos-env:v8.7.0-intelmpi_2021.13-ifort_2021.13-bcs_v12.0.0
image: gmao/ubuntu24-geos-env:v8.7.0-intelmpi_2021.13-ifort_2021.13-bcs_v12.0.0
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
# It seems like we might not need secrets on GitHub Actions which is good for forked
# pull requests
Expand Down
43 changes: 29 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
| [CICE](https://github.com/GEOS-ESM/CICE) | [geos/v0.2.0](https://github.com/GEOS-ESM/CICE/releases/tag/geos%2Fv0.2.0) |
| [CPLFCST_Etc](https://github.com/GEOS-ESM/CPLFCST_Etc) | [v1.0.1](https://github.com/GEOS-ESM/CPLFCST_Etc/releases/tag/v1.0.1) |
| [ecbuild](https://github.com/GEOS-ESM/ecbuild) | [geos/v1.3.0](https://github.com/GEOS-ESM/ecbuild/releases/tag/geos%2Fv1.3.0) |
| [ESMA_cmake](https://github.com/GEOS-ESM/ESMA_cmake) | [v4.10.0](https://github.com/GEOS-ESM/ESMA_cmake/releases/tag/v4.10.0) |
| [ESMA_env](https://github.com/GEOS-ESM/ESMA_env) | [v5.5.1](https://github.com/GEOS-ESM/ESMA_env/releases/tag/v5.5.1) |
| [ESMA_cmake](https://github.com/GEOS-ESM/ESMA_cmake) | [v4.11.0](https://github.com/GEOS-ESM/ESMA_cmake/releases/tag/v4.11.0) |
| [ESMA_env](https://github.com/GEOS-ESM/ESMA_env) | [v5.7.0](https://github.com/GEOS-ESM/ESMA_env/releases/tag/v5.7.0) |
| [FVdycoreCubed_GridComp](https://github.com/GEOS-ESM/FVdycoreCubed_GridComp) | [v2.11.1](https://github.com/GEOS-ESM/FVdycoreCubed_GridComp/releases/tag/v2.11.1) |
| [geos-chem](https://github.com/GEOS-ESM/geos-chem) | [geos/v13.0.0-rc1](https://github.com/GEOS-ESM/geos-chem/releases/tag/geos%2Fv13.0.0-rc1) |
| [GEOS_OceanGridComp](https://github.com/GEOS-ESM/GEOS_OceanGridComp) | [v3.3.0](https://github.com/GEOS-ESM/GEOS_OceanGridComp/releases/tag/v3.3.0) |
Expand Down Expand Up @@ -255,24 +255,39 @@ source @env/g5_modules.sh
```

##### Create Build Directory
We currently do not allow in-source builds of GEOSgcm. So we must make a directory:
```
mkdir build
```
The advantages of this is that you can build both a Debug and Release version with the same clone if desired.

##### Run CMake
CMake generates the Makefiles needed to build the model.

CMake generates the Makefiles needed to build the model. This command:
```
cd build
cmake .. -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_INSTALL_PREFIX=../install
cmake -B build -S . -DCMAKE_INSTALL_PREFIX=install
```
This will install to a directory parallel to your `build` directory. If you prefer to install elsewhere change the path in:

As is, this command assumes you are in the root of the GEOSgcm checkout and will create a `build/` directory in the root of the checkout and install into `install/ parallel to the `build/` directory.

This command has three options:

1. `-B` specifies the build directory.
2. `-S` specifies the source directory (root of the checkout).
3. `-DCMAKE_INSTALL_PREFIX` specifies the installation directory.

If you prefer to install elsewhere change the path in:

```
-DCMAKE_INSTALL_PREFIX=<path>
-DCMAKE_INSTALL_PREFIX=/path/to/install
```
and CMake will install there.

If you prefer your build somewhere else, you can specify that with:
```
-B /path/to/build
```

Finally, if your source is in a different directory than the current one, you can specify that with:
```
-S /path/to/source
```

###### Create and install source tarfile

Note that running with `parallel_build.csh` will create and install a tarfile of the source code at build time. But if CMake is run by hand, this is not the default action (as many who build with CMake by hand are developers and not often running experiments). In order to enable this at install time, add:
Expand All @@ -283,15 +298,15 @@ to your CMake command.

##### Build and Install with Make
```
make -jN install
cmake --build build -j N
```
where `N` is the number of parallel processes. On discover head nodes, this should only be as high as 2 due to limits on the head nodes. On a compute node, you can set `N` has high as you like, though 8-12 is about the limit of parallelism in our model's make system.

### Run the GCM

Once the model has built successfully, you will have an `install/` directory in your checkout. To run `gcm_setup` go to the `install/bin/` directory and run it there:
```
cd install/bin
cd /path/to/install/bin
./gcm_setup
```

Expand Down
6 changes: 3 additions & 3 deletions components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ GEOSgcm:
env:
local: ./@env
remote: ../ESMA_env.git
tag: v5.5.1
tag: v5.7.0
develop: main

cmake:
local: ./@cmake
remote: ../ESMA_cmake.git
tag: v4.10.0
tag: v4.11.0
develop: develop

ecbuild:
Expand Down Expand Up @@ -160,7 +160,7 @@ sis2:
GEOSradiation_GridComp:
local: ./src/Components/@GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/@GEOSradiation_GridComp
remote: ../GEOSradiation_GridComp.git
tag: GCMv12-rc10
tag: GCMv12-rc10b
develop: feature/sdrabenh/gcm_v12

RRTMGP:
Expand Down
Loading