-
Notifications
You must be signed in to change notification settings - Fork 38
Add libraries required to build UFS-Aerosols #252
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
aa20a4a
Add libraries required to build UFS-Aerosols.
rmontuoro 2c04952
Fix name of environment variable provding the installation
rmontuoro faa7214
Require MPI and set CMAKE_MODULE_PATH according
rmontuoro f9f91fa
Use uppercase for environment variables set in modulefiles.
rmontuoro f7aad29
Remove CMAKE_MODULE_PATH and Intel MPI settings from MAPL modulefile.
rmontuoro c75b290
Add UFS-Aerosols dependencies to custom and Mac stack files.
rmontuoro d39fa24
Set ESMFMKFILE when building MAPL without LMod.
rmontuoro aa313a8
Add NetCDF linker settings required to overcome build issue
rmontuoro f8afa5b
Revert to static-only NetCDF and HDF5 libraries.
rmontuoro 591065a
Set ecbuild module path so CMakeModules FindNetCDF takes precedence
kgerheiser 06ae29d
Merge pull request #1 from kgerheiser/feature/gocart
rmontuoro 81e539f
Always use authoritative repositories for CMakeModules,
rmontuoro 4efc880
Use CMakeModules v1.2.0.
rmontuoro fd8237c
Build shared NetCDF and HDF5 libraries for custom and Mac stacks.
rmontuoro 152b70e
Do not load python module when building MAPL.
rmontuoro 91f60d6
Update MAPL to version 2.7.2.
rmontuoro 7318189
Build OpenMPI for correct C++ linking
kgerheiser 41f7ea4
Merge pull request #2 from kgerheiser/feature/gocart
rmontuoro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -eux | ||
|
|
||
| name="cmakemodules" | ||
| repo="NOAA-EMC" | ||
| version=${2:-${STACK_cmakemodules_version:-"develop"}} | ||
| id=${version//\//-} | ||
|
|
||
| if $MODULES; then | ||
| set +x | ||
| source $MODULESHOME/init/bash | ||
| module list | ||
| set -x | ||
|
|
||
| prefix="${PREFIX:-"/opt/modules"}/core/$name/$id" | ||
| if [[ -d $prefix ]]; then | ||
| [[ $OVERWRITE =~ [yYtT] ]] && ( echo "WARNING: $prefix EXISTS: OVERWRITING!"; $SUDO rm -rf $prefix; $SUDO mkdir $prefix ) \ | ||
| || ( echo "WARNING: $prefix EXISTS, SKIPPING"; exit 1 ) | ||
| fi | ||
| else | ||
| prefix=${CMAKEMODULES_ROOT:-"/usr/local"} | ||
| fi | ||
|
|
||
| software=$name-$id | ||
| cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"} | ||
| URL="https://github.com/$repo/$name.git" | ||
| [[ -d $software ]] || git clone $URL $software | ||
| [[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 ) | ||
|
|
||
| git fetch --tags | ||
| git checkout $version | ||
| [[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0 | ||
|
|
||
| cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"} | ||
| mkdir -p $prefix && cp -r $software/* $prefix | ||
|
|
||
| # generate modulefile from template | ||
| $MODULES && update_modules core $name $id | ||
| echo $name $id $URL >> ${HPC_STACK_ROOT}/hpc-stack-contents.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -eux | ||
|
|
||
| name="esma_cmake" | ||
| repo="GEOS-ESM" | ||
| version=${2:-${STACK_esma_cmake_version:-"main"}} | ||
| id=${version//\//-} | ||
|
|
||
| if $MODULES; then | ||
| set +x | ||
| source $MODULESHOME/init/bash | ||
| module list | ||
| set -x | ||
|
|
||
| prefix="${PREFIX:-"/opt/modules"}/core/$name/$id" | ||
| if [[ -d $prefix ]]; then | ||
| [[ $OVERWRITE =~ [yYtT] ]] && ( echo "WARNING: $prefix EXISTS: OVERWRITING!"; $SUDO rm -rf $prefix; $SUDO mkdir $prefix ) \ | ||
| || ( echo "WARNING: $prefix EXISTS, SKIPPING"; exit 1 ) | ||
| fi | ||
| else | ||
| prefix=${ESMA_CMAKE_ROOT:-"/usr/local"} | ||
| fi | ||
|
|
||
| software=$name-$id | ||
| cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"} | ||
| URL="https://github.com/$repo/$name.git" | ||
| [[ -d $software ]] || git clone $URL $software | ||
| [[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 ) | ||
|
|
||
| git fetch --tags | ||
| git checkout $version | ||
| [[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0 | ||
|
|
||
| cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"} | ||
| mkdir -p $prefix && cp -r $software/* $prefix | ||
|
|
||
| # generate modulefile from template | ||
| $MODULES && update_modules core $name $id | ||
| echo $name $id $URL >> ${HPC_STACK_ROOT}/hpc-stack-contents.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -eux | ||
|
|
||
| name="gftl-shared" | ||
| repo="Goddard-Fortran-Ecosystem" | ||
| version=${2:-${STACK_gftl_shared_version:-"main"}} | ||
|
|
||
| # Hyphenated version used for install prefix | ||
| compiler=$(echo $HPC_COMPILER | sed 's/\//-/g') | ||
| id=${version//\//-} | ||
|
|
||
| if $MODULES; then | ||
| set +x | ||
| source $MODULESHOME/init/bash | ||
| module load hpc-$HPC_COMPILER | ||
| module try-load cmake | ||
| module list | ||
| set -x | ||
|
|
||
| prefix="${PREFIX:-"/opt/modules"}/$compiler/$name/$id" | ||
| if [[ -d $prefix ]]; then | ||
| [[ $OVERWRITE =~ [yYtT] ]] && ( echo "WARNING: $prefix EXISTS: OVERWRITING!"; $SUDO rm -rf $prefix; $SUDO mkdir $prefix ) \ | ||
| || ( echo "WARNING: $prefix EXISTS, SKIPPING"; exit 1 ) | ||
| fi | ||
| else | ||
| prefix=${GFTL_SHARED_ROOT:-"/usr/local"} | ||
| fi | ||
|
|
||
| software=$name-$id | ||
| cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"} | ||
| URL="https://github.com/$repo/$name.git" | ||
| [[ -d $software ]] || git clone $URL $software | ||
| [[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 ) | ||
|
|
||
| git fetch --tags | ||
| git checkout $version | ||
| [[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0 | ||
|
|
||
| [[ -d build ]] && $SUDO rm -rf build | ||
| mkdir -p build && cd build | ||
| cmake -DCMAKE_INSTALL_PREFIX=$prefix .. | ||
| VERBOSE=$MAKE_VERBOSE make -j${NTHREADS:-4} install | ||
|
|
||
| # generate modulefile from template | ||
| $MODULES && update_modules compiler $name $id | ||
| echo $name $URL >> ${HPC_STACK_ROOT}/hpc-stack-contents.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -eux | ||
|
|
||
| name="mapl" | ||
| repo="GEOS-ESM" | ||
| version=${2:-${STACK_mapl_version:-"main"}} | ||
|
|
||
| # Hyphenated version used for install prefix | ||
| compiler=$(echo $HPC_COMPILER | sed 's/\//-/g') | ||
| mpi=$(echo $HPC_MPI | sed 's/\//-/g') | ||
| id=${version//\//-} | ||
|
|
||
| if $MODULES; then | ||
| set +x | ||
| source $MODULESHOME/init/bash | ||
| module load hpc-$HPC_COMPILER | ||
| module load hpc-$HPC_MPI | ||
| module try-load cmake | ||
| module load esma_cmake | ||
| module load cmakemodules | ||
| module load ecbuild | ||
| # module exports ecbuild_ROOT, but when building without modules ECBUILD_ROOT is set | ||
| export ECBUILD_ROOT=$ecbuild_ROOT | ||
| module load gftl-shared | ||
| module load yafyaml | ||
| module load netcdf | ||
| module load esmf | ||
| module list | ||
|
|
||
| set -x | ||
|
|
||
| prefix="${PREFIX:-"/opt/modules"}/$compiler/$mpi/$name/$id" | ||
| if [[ -d $prefix ]]; then | ||
| [[ $OVERWRITE =~ [yYtT] ]] && ( echo "WARNING: $prefix EXISTS: OVERWRITING!"; $SUDO rm -rf $prefix; $SUDO mkdir $prefix ) \ | ||
| || ( echo "WARNING: $prefix EXISTS, SKIPPING"; exit 1 ) | ||
| fi | ||
| else | ||
| prefix=${MAPL_ROOT:-"/usr/local"} | ||
| export ESMFMKFILE=$ESMF_ROOT/lib/esmf.mk | ||
| fi | ||
|
|
||
| export FC=$MPI_FC | ||
| export CC=$MPI_CC | ||
| export CXX=$MPI_CXX | ||
|
|
||
| software=$name-$id | ||
| cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"} | ||
| URL="https://github.com/$repo/$name.git" | ||
| [[ -d $software ]] || git clone $URL $software | ||
| [[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 ) | ||
|
|
||
| git fetch --tags | ||
| git checkout $version | ||
| [[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0 | ||
|
|
||
| [[ -d build ]] && $SUDO rm -rf build | ||
| mkdir -p build && cd build | ||
|
|
||
| CMAKE_OPTS=${STACK_mapl_cmake_opts:-""} | ||
|
|
||
| cmake .. \ | ||
| -DCMAKE_INSTALL_PREFIX=$prefix \ | ||
| -DCMAKE_MODULE_PATH="${ESMA_CMAKE_ROOT};${CMAKEMODULES_ROOT}/Modules;${ECBUILD_ROOT}/share/ecbuild/cmake" \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DBUILD_WITH_FLAP=OFF \ | ||
| -DBUILD_WITH_PFLOGGER=OFF \ | ||
| -DESMA_USE_GFE_NAMESPACE=ON \ | ||
| -DBUILD_SHARED_MAPL=OFF \ | ||
| ${CMAKE_OPTS} | ||
|
|
||
| VERBOSE=$MAKE_VERBOSE make -j${NTHREADS:-4} install | ||
|
|
||
| # generate modulefile from template | ||
| modpath=mpi | ||
| $MODULES && update_modules $modpath $name $id | ||
| echo $name $id $URL >> ${HPC_STACK_ROOT}/hpc-stack-contents.log | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -eux | ||
|
|
||
| name="yafyaml" | ||
| repo="Goddard-Fortran-Ecosystem" | ||
| version=${2:-${STACK_yafyaml_version:-"main"}} | ||
|
|
||
| # Hyphenated version used for install prefix | ||
| compiler=$(echo $HPC_COMPILER | sed 's/\//-/g') | ||
| id=${version//\//-} | ||
|
|
||
| if $MODULES; then | ||
| set +x | ||
| source $MODULESHOME/init/bash | ||
| module load hpc-$HPC_COMPILER | ||
| module try-load cmake | ||
| module load gftl-shared | ||
| module list | ||
| set -x | ||
|
|
||
| prefix="${PREFIX:-"/opt/modules"}/$compiler/$name/$id" | ||
| if [[ -d $prefix ]]; then | ||
| [[ $OVERWRITE =~ [yYtT] ]] && ( echo "WARNING: $prefix EXISTS: OVERWRITING!"; $SUDO rm -rf $prefix; $SUDO mkdir $prefix ) \ | ||
| || ( echo "WARNING: $prefix EXISTS, SKIPPING"; exit 1 ) | ||
| fi | ||
| else | ||
| prefix=${YAFYAML_ROOT:-"/usr/local"} | ||
| fi | ||
|
|
||
| software=$name-$id | ||
| cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"} | ||
| URL="https://github.com/$repo/$name.git" | ||
| [[ -d $software ]] || git clone $URL $software | ||
| [[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 ) | ||
|
|
||
| git fetch --tags | ||
| git checkout $version | ||
| [[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0 | ||
|
|
||
| [[ -d build ]] && $SUDO rm -rf build | ||
| mkdir -p build && cd build | ||
| cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH .. | ||
| VERBOSE=$MAKE_VERBOSE make -j${NTHREADS:-4} install | ||
|
|
||
| # generate modulefile from template | ||
| $MODULES && update_modules compiler $name $id | ||
| echo $name $id $URL >> ${HPC_STACK_ROOT}/hpc-stack-contents.log |
24 changes: 24 additions & 0 deletions
24
modulefiles/compiler/compilerName/compilerVersion/gftl-shared/gftl-shared.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| help([[ | ||
| ]]) | ||
|
|
||
| local pkgName = myModuleName() | ||
| local pkgVersion = myModuleVersion() | ||
| local pkgNameVer = myModuleFullName() | ||
|
|
||
| local hierA = hierarchyA(pkgNameVer,1) | ||
| local compNameVer = hierA[1] | ||
| local compNameVerD = compNameVer:gsub("/","-") | ||
|
|
||
| conflict(pkgName) | ||
|
|
||
| local opt = os.getenv("HPC_OPT") or os.getenv("OPT") or "/opt/modules" | ||
|
|
||
| local base = pathJoin(opt,compNameVerD,pkgName,pkgVersion) | ||
|
|
||
| setenv("GFTL_SHARED_ROOT", base) | ||
| setenv("GFTL_ROOT", base) | ||
rmontuoro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| whatis("Name: ".. pkgName) | ||
| whatis("Version: " .. pkgVersion) | ||
| whatis("Category: library") | ||
| whatis("Description: gFTL-shared provides common gFTL containers of Fortran intrinsic types") | ||
23 changes: 23 additions & 0 deletions
23
modulefiles/compiler/compilerName/compilerVersion/yafyaml/yafyaml.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| help([[ | ||
| ]]) | ||
|
|
||
| local pkgName = myModuleName() | ||
| local pkgVersion = myModuleVersion() | ||
| local pkgNameVer = myModuleFullName() | ||
|
|
||
| local hierA = hierarchyA(pkgNameVer,1) | ||
| local compNameVer = hierA[1] | ||
| local compNameVerD = compNameVer:gsub("/","-") | ||
|
|
||
| conflict(pkgName) | ||
|
|
||
| local opt = os.getenv("HPC_OPT") or os.getenv("OPT") or "/opt/modules" | ||
|
|
||
| local base = pathJoin(opt,compNameVerD,pkgName,pkgVersion) | ||
|
|
||
| setenv("YAFYAML_ROOT", base) | ||
|
|
||
| whatis("Name: ".. pkgName) | ||
| whatis("Version: " .. pkgVersion) | ||
| whatis("Category: library") | ||
| whatis("Description: yet another Fortran (implementation of) YAML") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| help([[ | ||
| ]]) | ||
|
|
||
| local pkgName = myModuleName() | ||
| local pkgVersion = myModuleVersion() | ||
| local pkgNameVer = myModuleFullName() | ||
|
|
||
| conflict(pkgName) | ||
|
|
||
| local opt = os.getenv("HPC_OPT") or os.getenv("OPT") or "/opt/modules" | ||
|
|
||
| local base = pathJoin(opt,"core",pkgName,pkgVersion) | ||
|
|
||
| setenv("CMAKEMODULES_ROOT", base) | ||
|
|
||
| whatis("Name: ".. pkgName) | ||
| whatis("Version: " .. pkgVersion) | ||
| whatis("Category: Software") | ||
| whatis("Description: CMakeModules (A collection of CMake modules)") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| help([[ | ||
| ]]) | ||
|
|
||
| local pkgName = myModuleName() | ||
| local pkgVersion = myModuleVersion() | ||
| local pkgNameVer = myModuleFullName() | ||
|
|
||
| conflict(pkgName) | ||
|
|
||
| local opt = os.getenv("HPC_OPT") or os.getenv("OPT") or "/opt/modules" | ||
|
|
||
| local base = pathJoin(opt,"core",pkgName,pkgVersion) | ||
|
|
||
| setenv("ESMA_CMAKE_ROOT", base) | ||
|
|
||
| whatis("Name: ".. pkgName) | ||
| whatis("Version: " .. pkgVersion) | ||
| whatis("Category: Software") | ||
| whatis("Description: ESMA (NASA GEOS CMake configuration files)") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.