Skip to content

Commit

Permalink
Merge branch 'feature/sdrabenh/gcm_v12' into feature/mathomp4/v12-upd…
Browse files Browse the repository at this point in the history
…ate-hemco-2.3.0
  • Loading branch information
mathomp4 authored Feb 12, 2025
2 parents 3860e7b + 9008fc5 commit 03790e8
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ parameters:
default: ""

# Anchors to prevent forgetting to update a version
os_version: &os_version ubuntu20
baselibs_version: &baselibs_version v8.7.0
os_version: &os_version ubuntu24
baselibs_version: &baselibs_version v8.9.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.9.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.12.0](https://github.com/GEOS-ESM/ESMA_cmake/releases/tag/v4.12.0) |
| [ESMA_env](https://github.com/GEOS-ESM/ESMA_env) | [v5.7.1](https://github.com/GEOS-ESM/ESMA_env/releases/tag/v5.7.1) |
| [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
4 changes: 2 additions & 2 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.1
develop: main

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

ecbuild:
Expand Down

0 comments on commit 03790e8

Please sign in to comment.