Skip to content

Commit

Permalink
Updates to bring in line with GEOSgcm v10.17.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 committed Mar 25, 2021
1 parent b130443 commit b4ceaeb
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
executors:
gcc-build-env:
docker:
- image: gmao/ubuntu20-geos-env-mkl:v6.0.22-openmpi_4.0.5-gcc_10.2.0
- image: gmao/ubuntu20-geos-env-mkl:v6.0.27-openmpi_4.0.5-gcc_10.2.0
auth:
username: $DOCKERHUB_USER
password: $DOCKERHUB_AUTH_TOKEN
Expand Down
6 changes: 5 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
# precedence.

# The FV3 Team owns all

* @GEOS-ESM/fv3-gatekeepers

# The CMake Team should know/approve these
/.github/ @GEOS-ESM/cmake-team
/.circleci/ @GEOS-ESM/cmake-team
/.codebuild/ @GEOS-ESM/cmake-team

# The GEOS CMake Team is the CODEOWNER for the CMakeLists.txt files in this repository
CMakeLists.txt @GEOS-ESM/cmake-team

6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
/@cmake/
/@modules/
/@env/
/BUILD/
/build*/
/install*/
parallel_build.o*
/.mepo/
parallel_build.o*
log.*
19 changes: 15 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_policy (SET CMP0054 NEW)

project (
GEOSfvdycore
VERSION 1.0
VERSION 1.2.4
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

if ("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
Expand All @@ -25,9 +25,7 @@ set (DOING_GEOS5 YES)

# Should find a better place for this - used in Chem component
set (ACG_FLAGS -v)
set (F2PYEXT .so)
set (F2PY_SUFFIX .so)
set (FV_PRECISION R4)
set (FV_PRECISION "R4" CACHE STRING "Precision of FV3 core (R4, R4R8, R8)")

list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/@cmake")
include (esma)
Expand All @@ -44,3 +42,16 @@ include_directories(${MPI_Fortran_INCLUDE_PATH})
add_subdirectory (@env)
add_subdirectory (src)

# https://www.scivision.dev/cmake-auto-gitignore-build-dir/
# --- auto-ignore build directory
if(NOT EXISTS ${PROJECT_BINARY_DIR}/.gitignore)
file(WRITE ${PROJECT_BINARY_DIR}/.gitignore "*")
endif()

# Piggyback that file into install
install(
FILES ${PROJECT_BINARY_DIR}/.gitignore
DESTINATION ${CMAKE_INSTALL_PREFIX}
)


17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Cubed-sphere finite-volume dynamical core fixture
![Build Test](https://github.com/GEOS-ESM/GEOSfvdycore/workflows/Build%20Test/badge.svg)

## How to build FV
## How to build FV Standalone

### Preliminary Steps

#### Load Build Modules

In your `.bashrc` or `.tcshrc` or other rc file add a line:

##### NCCS (SLES12)

##### NCCS
```
module use -a /discover/swdev/gmao_SIteam/modulefiles-SLES12
```
Expand Down Expand Up @@ -81,6 +80,7 @@ This will install to a directory parallel to your `build` directory. If you pref
and CMake will install there.

###### Building with Debugging Flags

To build with debugging flags add:
```
-DCMAKE_BUILD_TYPE=Debug
Expand All @@ -89,5 +89,14 @@ to the cmake line.

##### Build and Install with Make
```
make -j6 install
make -jN install
```
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 FV3 Standalone

Once the model has built successfully, you will have an `install/` directory in your checkout. To run `fv3_setup` go to the `install/bin/` directory and run it there:
```
cd install/bin
./fv3_setup
```
12 changes: 6 additions & 6 deletions components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
cmake:
local: ./@cmake
remote: ../ESMA_cmake.git
tag: v3.3.6
tag: v3.3.7
develop: develop

ecbuild:
Expand All @@ -22,31 +22,31 @@ ecbuild:
GMAO_Shared:
local: ./src/Shared/@GMAO_Shared
remote: ../GMAO_Shared.git
tag: v1.3.8
tag: v1.3.9
sparse: ./config/GMAO_Shared.sparse
develop: main

MAPL:
local: ./src/Shared/@MAPL
remote: ../MAPL.git
tag: v2.6.2
tag: v2.6.3
develop: develop

FMS:
local: ./src/Shared/@FMS
remote: ../FMS.git
tag: geos/2019.01.02+noaff.4
tag: geos/2019.01.02+noaff.6
develop: geos/release/2019.01

FVdycoreCubed_GridComp:
local: ./src/Components/@FVdycoreCubed_GridComp
remote: ../FVdycoreCubed_GridComp.git
tag: v1.2.9
tag: v1.2.10
develop: develop

fvdycore:
local: ./src/Components/@FVdycoreCubed_GridComp/@fvdycore
remote: ../GFDL_atmos_cubed_sphere.git
tag: geos/v1.1.3
tag: geos/v1.1.5
develop: geos/develop

21 changes: 16 additions & 5 deletions parallel_build.csh
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,35 @@ setenv ESMADIR $srcdir
# tcsh script maker
set origargv = "$argv"

setenv external ""
setenv DEVELOP FALSE

while ($#argv)
if ("$1" == "-develop") then
setenv external "-e Develop.cfg"
setenv DEVELOP TRUE
endif

shift
end

if (! -d ${ESMADIR}/@env) then
if ($?PBS_JOBID || $?SLURM_JOBID) then
echo " checkout_externals must be run!"
echo " mepo clone must be run!"
echo " This requires internet access but you are on a compute node"
echo " Please run from a head node"
exit 1
else
echo " Running checkout_externals"
checkout_externals $external
echo "Running mepo initialization"
mepo init
mepo clone
if ( "$DEVELOP" == "TRUE" ) then
echo "Checking out development branches of GEOSgcm_GridComp and GEOSgcm_App"
mepo develop GEOSgcm_GridComp GEOSgcm_App
endif
endif
else
if ( "$DEVELOP" == "TRUE" ) then
echo "Checking out development branches of GEOSgcm_GridComp and GEOSgcm_App"
mepo develop GEOSgcm_GridComp GEOSgcm_App
endif
endif

Expand Down

0 comments on commit b4ceaeb

Please sign in to comment.