-
Notifications
You must be signed in to change notification settings - Fork 211
Build workflow utilities with CMake. #264
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
8 commits
Select commit
Hold shift + click to select a range
3a6b186
add cmake build capability for workflow utilities
aerorahul 1d26a83
update .gitignore to exclude build and install directories as well as…
aerorahul ccba5ee
copy/paste error from enkf_chgres_recenter.fd to enkf_chgres_recenter…
aerorahul 7c856bf
Add workflow_utils to build_all and link scripts
KateFriedman-NOAA 8e90d44
Adjust how target is set for build_workflow_utils
KateFriedman-NOAA 522af45
another use of _d where an _4 is needed
aerorahul d3df2ea
update jasper to 2.x.25. remove compiler flag in fv3nc2nemsio
aerorahul 1d7776d
remove flags that were not present in Makefiles
aerorahul 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #%Module##################################################### | ||
| ## Workflow Utilities - hera | ||
| ############################################################# | ||
|
|
||
| module load cmake/3.16.1 | ||
|
|
||
| module use /scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack | ||
| module load hpc/1.1.0 | ||
| module load hpc-intel/18.0.5.274 | ||
| module load hpc-impi/2018.0.4 | ||
|
|
||
| module load jasper/2.0.25 | ||
| module load zlib/1.2.11 | ||
| module load png/1.6.35 | ||
|
|
||
| module load bacio/2.4.1 | ||
| module load w3nco/2.4.1 | ||
| module load w3emc/2.7.3 | ||
| module load sp/2.3.3 | ||
| module load ip/3.3.3 | ||
| module load nemsio/2.5.2 | ||
| module load nemsiogfs/2.5.3 | ||
| #module load ncio/1.0.0 | ||
| module load sigio/2.3.2 | ||
| module load g2/3.4.1 | ||
| module load bufr/11.4.0 | ||
|
|
||
| module load hdf5/1.10.6 | ||
| module load netcdf/4.7.4 |
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,29 @@ | ||
| #%Module##################################################### | ||
| ## Workflow Utilities - orion | ||
| ############################################################# | ||
|
|
||
| module load cmake/3.17.3 | ||
|
|
||
| module use /apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack | ||
| module load hpc/1.1.0 | ||
| module load hpc-intel/2018.4 | ||
| module load hpc-impi/2018.4 | ||
|
|
||
| module load jasper/2.0.25 | ||
| module load zlib/1.2.11 | ||
| module load png/1.6.35 | ||
|
|
||
| module load bacio/2.4.1 | ||
| module load w3nco/2.4.1 | ||
| module load w3emc/2.7.3 | ||
| module load sp/2.3.3 | ||
| module load ip/3.3.3 | ||
| module load nemsio/2.5.2 | ||
| module load nemsiogfs/2.5.3 | ||
| #module load ncio/1.0.0 | ||
| module load sigio/2.3.2 | ||
| module load g2/3.4.1 | ||
| module load bufr/11.4.0 | ||
|
|
||
| module load hdf5/1.10.6 | ||
| module load netcdf/4.7.4 |
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,29 @@ | ||
| #%Module##################################################### | ||
| ## Workflow Utilities - wcoss_dell_p3 | ||
| ############################################################# | ||
|
|
||
| module load cmake/3.16.2 | ||
|
|
||
| module use /usrx/local/nceplibs/dev/hpc-stack/libs/hpc-stack/modulefiles/stack | ||
| module load hpc/1.1.0 | ||
| module load hpc-ips/18.0.1.163 | ||
| module load hpc-impi/18.0.1 | ||
|
|
||
| module load jasper/2.0.25 | ||
| module load zlib/1.2.11 | ||
| module load png/1.6.35 | ||
|
|
||
| module load bacio/2.4.1 | ||
| module load w3nco/2.4.1 | ||
| module load w3emc/2.7.3 | ||
| module load sp/2.3.3 | ||
| module load ip/3.3.3 | ||
| module load nemsio/2.5.2 | ||
| module load nemsiogfs/2.5.3 | ||
| #module load ncio/1.0.0 | ||
| module load sigio/2.3.2 | ||
| module load g2/3.4.1 | ||
| module load bufr/11.4.0 | ||
|
|
||
| module load hdf5/1.10.6 | ||
| module load netcdf/4.7.4 |
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,72 @@ | ||
| cmake_minimum_required(VERSION 3.15) | ||
|
|
||
| # Get the version from the VERSION file. | ||
| #file(STRINGS "VERSION" pVersion) | ||
| set(pVersion 1.0.0) | ||
|
|
||
| project( | ||
| workflow_utils | ||
| VERSION ${pVersion} | ||
| LANGUAGES Fortran) | ||
| list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
|
|
||
| include(GNUInstallDirs) | ||
|
|
||
| # User options. | ||
| option(OPENMP "use OpenMP threading" ON) | ||
|
|
||
| # Build type | ||
| if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$") | ||
| message(STATUS "Setting build type to 'Release' as none was specified.") | ||
| set(CMAKE_BUILD_TYPE | ||
| "Release" | ||
| CACHE STRING "Choose the type of build." FORCE) | ||
| set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" | ||
| "MinSizeRel" "RelWithDebInfo") | ||
| endif() | ||
|
|
||
| # Set compiler flags. | ||
| if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") | ||
| set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback") | ||
| set(CMAKE_Fortran_FLAGS_RELEASE "-O3") | ||
| set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check -check noarg_temp_created -check nopointer -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv") | ||
| elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") | ||
| set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -fbacktrace") | ||
| set(CMAKE_Fortran_FLAGS_RELEASE "-O3") | ||
| set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -ggdb -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check") | ||
| endif() | ||
|
|
||
| # Find packages. | ||
| find_package(MPI REQUIRED) | ||
| find_package(NetCDF REQUIRED Fortran) | ||
|
|
||
| if(OPENMP) | ||
| find_package(OpenMP REQUIRED COMPONENTS Fortran) | ||
| endif() | ||
|
|
||
| find_package(bacio REQUIRED) | ||
| find_package(w3nco REQUIRED) | ||
| find_package(w3emc REQUIRED) | ||
| find_package(sp REQUIRED) | ||
| find_package(ip REQUIRED) | ||
| find_package(ncio REQUIRED) | ||
| find_package(nemsio REQUIRED) | ||
| find_package(nemsiogfs REQUIRED) | ||
| find_package(sigio REQUIRED) | ||
| find_package(g2 REQUIRED) | ||
| find_package(bufr REQUIRED) | ||
|
|
||
| add_subdirectory(enkf_chgres_recenter.fd) | ||
| add_subdirectory(enkf_chgres_recenter_nc.fd) | ||
| add_subdirectory(fv3nc2nemsio.fd) | ||
| add_subdirectory(regrid_nemsio.fd) | ||
| add_subdirectory(gaussian_sfcanl.fd) | ||
| add_subdirectory(gfs_bufr.fd) | ||
| add_subdirectory(tocsbufr.fd) | ||
| add_subdirectory(fbwndgfs.fd) | ||
| add_subdirectory(vint.fd) | ||
| add_subdirectory(tave.fd) | ||
| add_subdirectory(syndat_qctropcy.fd) | ||
| add_subdirectory(syndat_maksynrc.fd) | ||
| add_subdirectory(syndat_getjtbul.fd) | ||
| add_subdirectory(supvit.fd) | ||
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,48 @@ | ||
| #!/bin/bash | ||
| set -eux | ||
|
|
||
| [[ $(uname -s) == Darwin ]] && cmd=$(which greadlink) || cmd=$(which readlink) | ||
| readonly UTILS_DIR=$(cd "$(dirname "$($cmd -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P) | ||
|
|
||
| # Adapt for global-workflow structure. | ||
| target=${target:-"NULL"} | ||
| modulefile=${UTILS_DIR}/../modulefiles/workflow_utils.$target | ||
| if [[ -f $modulefile ]]; then | ||
| set +x | ||
| source ${UTILS_DIR}/machine-setup.sh > /dev/null 2>&1 | ||
| source $modulefile | ||
| module list | ||
| set -x | ||
| fi | ||
| # End adaptation | ||
|
|
||
| # Begin hack | ||
| # In place until nceplibs-ncio is in hpc-stack and available as a module | ||
| # After nceplibs-ncio is in hpc-stack, add the following line to | ||
| # ${UTILS_DIR}/../modulefiles/workflow_utils.<platform> | ||
| # "module load ncio/<ncio-version>" | ||
| # and remove this hack | ||
|
WalterKolczynski-NOAA marked this conversation as resolved.
|
||
|
|
||
| [[ -d nceplibs-ncio ]] && rm -rf nceplibs-ncio | ||
| git clone -b develop https://github.com/noaa-emc/nceplibs-ncio | ||
| cd nceplibs-ncio | ||
| mkdir -p build && cd build | ||
| cmake -DCMAKE_INSTALL_PREFIX=../install .. | ||
| make -j ${BUILD_JOBS:-4} VERBOSE=${BUILD_VERBOSE:-} | ||
| make install | ||
| cd ../.. | ||
| export ncio_ROOT=$PWD/nceplibs-ncio/install | ||
| # End hack | ||
|
|
||
| BUILD_DIR=${BUILD_DIR:-${UTILS_DIR}/build} | ||
| [[ -d $BUILD_DIR ]] && rm -rf $BUILD_DIR | ||
| mkdir -p ${BUILD_DIR} | ||
| cd $BUILD_DIR | ||
|
|
||
| INSTALL_DIR=${INSTALL_DIR:-${UTILS_DIR}/install} | ||
|
|
||
| CMAKE_FLAGS+=" -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR" | ||
|
|
||
| cmake ${UTILS_DIR} ${CMAKE_FLAGS} | ||
| make -j ${BUILD_JOBS:-4} VERBOSE=${BUILD_VERBOSE:-} | ||
| make install | ||
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.