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

NCEPLIBS-external updates #94

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a16c548
Add option to create modules to release/public-v2
climbfuji Sep 10, 2020
43d50d7
Remove submodule wgrib2
climbfuji Sep 15, 2020
34ccfa9
Correct ESMF version in CMakeLists.txt
climbfuji Sep 16, 2020
9fd2fce
Update doc/README_???.txt for jet.intel, hera.intel, hera.gnu; add re…
climbfuji Sep 16, 2020
e348546
Remove doc/README_endeavor_intel.txt, update doc/README_orion_intel.txt
climbfuji Sep 16, 2020
c5d6b17
Merge pull request #68 from climbfuji/remove_wgrib2_now_in_nceplibs
climbfuji Sep 16, 2020
8f27b8d
Update documentation for all remaining platforms, add instructions fo…
climbfuji Sep 17, 2020
c8e2e4f
Minor bugfixes in documentation
climbfuji Sep 18, 2020
b7a12bd
Merge pull request #69 from climbfuji/doc_update_release_public_v2_20…
climbfuji Sep 18, 2020
45f960e
Update documentation to check out tag ufs-v2.0.0 of ufs-weather-model
climbfuji Sep 23, 2020
c2d8339
Merge pull request #71 from climbfuji/doc_update_20200922
climbfuji Sep 23, 2020
0b01c9d
tmplModulefiles/netcdf: add the install bin directory to PATH, requir…
climbfuji Sep 24, 2020
05506dd
Merge pull request #72 from climbfuji/netcdf_module_add_path
climbfuji Sep 24, 2020
af31842
Add wcoss dell instructions.
RatkoVasic-NOAA Sep 28, 2020
684e2e9
Bugfixes in top-level CMakeLists.txt for building MPI, HDF5 and NetCDF
climbfuji Oct 7, 2020
3f05a05
Build static jpeg library
DomHeinzeller Oct 9, 2020
89ff203
Update instructions for macOS with clang+gfortran to solve OpenMP lin…
DomHeinzeller Oct 9, 2020
4d538f0
Merge pull request #77 from climbfuji/mpi_bugfixes_release_public_v2
climbfuji Oct 9, 2020
5a0fd9a
Add INSTALL_PREFIX for ufs-weather-model
RatkoVasic-NOAA Oct 13, 2020
3d080e8
Merge pull request #74 from RatkoVasic-NOAA/release/public-v2
climbfuji Oct 13, 2020
4a42c06
Turn DEPLOY on by default
climbfuji Oct 26, 2020
ac88461
Update install documentation for macOS with gcc+gfortran and clang+gf…
climbfuji Oct 26, 2020
a281624
Remove manual NCEPLIBS-external cmake config file (left from release/…
climbfuji Oct 27, 2020
55136b7
Update README for gaea.intel and jet.intel
climbfuji Oct 27, 2020
075284b
Update README for hera.intel and orion.intel
climbfuji Oct 27, 2020
d95cd1f
Update README for stampede.intel and orion.intel
climbfuji Oct 28, 2020
a1e177e
Update README for cheyenne.intel, cheyenne.gnu, hera.gnu
climbfuji Oct 28, 2020
1745c0c
Update README for odin.intel and wcoss_dell_p3
climbfuji Oct 28, 2020
8bbabcf
Fix travis tests
climbfuji Oct 28, 2020
37237d0
Update README for ubuntu.gnu and wcoss_dell_p3.intel
climbfuji Oct 28, 2020
201a474
Update README for redhat.gnu
climbfuji Oct 29, 2020
95de67f
Merge pull request #80 from climbfuji/deploy_on_update_doc_20201026
climbfuji Oct 29, 2020
eaa939f
Add READ.ME for WCOSS Cray machine.
RatkoVasic-NOAA Nov 6, 2020
fa05654
Fix CMAKE_C_COMPILER in README_wcoss_cray_intel.txt
RatkoVasic-NOAA Nov 6, 2020
e1e33c4
Added new INSTALL_PREFIX path to doc/README_wcoss_cray_intel.txt
RatkoVasic-NOAA Nov 6, 2020
44269f8
Merge pull request #86 from RatkoVasic-NOAA/release/public-v2
kgerheiser Nov 6, 2020
50a7194
Update GNU compiler on Cheyenne to 10.1.0
climbfuji Dec 31, 2020
bf66cb8
Merge pull request #88 from climbfuji/cheyenne_gnu_10
climbfuji Jan 5, 2021
4ea139a
Update install instructions for macOS, Ubuntu and Redhat to include a…
climbfuji Feb 25, 2021
60d72aa
Fix travis ci tests on macOS
climbfuji Feb 25, 2021
f9e5c4b
Update instructions for docker/ubuntu with gnu
climbfuji Feb 27, 2021
f607061
Merge pull request #90 from climbfuji/final_doc_update_srw_20210225
climbfuji Feb 27, 2021
cfcabe6
Fix formatting in final version of doc/README_docker_gnu.md
climbfuji Mar 1, 2021
e4a8e53
Address all reviewer comments except one
climbfuji Mar 2, 2021
2ae87eb
Changes to sections 5 & 6 of docker instructions, due to reviewer com…
SamuelTrahanNOAA Mar 2, 2021
0ecfd04
Merge pull request #2 from SamuelTrahanNOAA/release/public-v2
climbfuji Mar 2, 2021
0dbbfd0
Merge pull request #91 from climbfuji/docker_doc_final_20210301
climbfuji Mar 2, 2021
210ea35
Add MPI dependency
kgerheiser Apr 13, 2021
e9c7bd3
Merge release/public-v2 into develop
kgerheiser Apr 13, 2021
ef35477
Remove duplicate module deploy
kgerheiser Apr 13, 2021
f054ef6
Build MPICH because using Homebrew MPI fails
kgerheiser Apr 13, 2021
55acef2
Remove cat in workflow files
kgerheiser Apr 13, 2021
b5af046
Fix MPI build logic
kgerheiser Apr 13, 2021
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
1 change: 0 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ jobs:
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install -DBUILD_MPI=OFF
make -j4
cat install/share/nceplibs-external.cmake.config
7 changes: 4 additions & 3 deletions .github/workflows/macos-clanggfortran.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
run: |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# mpich installs gcc@10 as prerequisite
brew install automake coreutils gnu-sed mpich llvm@9
brew install automake coreutils gnu-sed llvm@9
# mpif90 is looking for "gfortran" only
ln -sf /usr/local/bin/gfortran-10 /usr/local/bin/gfortran

- name: Checkout
uses: actions/checkout@v2
Expand All @@ -33,6 +35,5 @@ jobs:
export LDFLAGS="-L/usr/local/opt/llvm@9/lib -Wl,-rpath,/usr/local/opt/llvm@9/lib"
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install -DBUILD_MPI=OFF
cmake .. -DCMAKE_INSTALL_PREFIX=install -DBUILD_MPI=ON
make -j4
cat install/share/nceplibs-external.cmake.config
7 changes: 4 additions & 3 deletions .github/workflows/macos-gccgfortran.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
run: |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# mpich installs gcc@10 as prerequisite
brew install automake coreutils gnu-sed mpich
brew install automake coreutils gnu-sed
# mpif90 is looking for "gfortran" only
ln -sf /usr/local/bin/gfortran-10 /usr/local/bin/gfortran

- name: Checkout
uses: actions/checkout@v2
Expand All @@ -29,6 +31,5 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install -DBUILD_MPI=OFF
cmake .. -DCMAKE_INSTALL_PREFIX=install -DBUILD_MPI=ON
make -j4
cat install/share/nceplibs-external.cmake.config
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,3 @@
path = cmake
url = https://github.com/NOAA-EMC/CMakeModules
branch = develop
[submodule "wgrib2"]
path = wgrib2
url = https://github.com/NOAA-EMC/NCEPLIBS-wgrib2
branch = feature/cmake
65 changes: 14 additions & 51 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ if(POLICY CMP0074)
endif(POLICY CMP0074)

# Tell cmake what to build
option(BUILD_MPI "Build MPI" ON )
option(BUILD_ESMF "Build ESMF" ON )
option(BUILD_NETCDF "Build NetCDF" ON )
option(BUILD_JASPER "Build Jasper" ON )
option(BUILD_PNG "Build libpng" ON )
option(BUILD_WGRIB2 "Build wgrib2" ON )
option(DEPLOY "Deploy modulefiles" OFF)
option(BUILD_MPI "Build MPI" ON)
option(BUILD_ESMF "Build ESMF" ON)
option(BUILD_NETCDF "Build NetCDF" ON)
option(BUILD_JASPER "Build Jasper" ON)
option(BUILD_PNG "Build libpng" ON)
option(DEPLOY "Deploy modulefiles" ON)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

Expand All @@ -29,7 +28,7 @@ if((BUILD_NETCDF OR BUILD_PNG) AND NOT (BUILD_NETCDF AND BUILD_PNG))
message(FATAL_ERROR "NetCDF and PNG must both be built or both supplied externally")
endif()

set(libs "MPI" "NETCDF" "ESMF" "JASPER" "PNG" "WGRIB2")
set(libs "MPI" "NETCDF" "ESMF" "JASPER" "PNG")
set(libs_to_build)
foreach(lib ${libs})
if(BUILD_${lib})
Expand All @@ -44,12 +43,6 @@ set(install_path ${CMAKE_INSTALL_PREFIX})
include(ExternalProject)
include(GNUInstallDirs)

if(NOT EXISTS ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR})
file(MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR})
endif()
set(CMAKE_CONFIG_FILE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/nceplibs-external.cmake.config")
file(WRITE ${CMAKE_CONFIG_FILE} "# CMake configuration file for NCEPLIBS-external\n")

if(BUILD_MPI)
if(${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU" AND ${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER 9.9)
set(MPICH_FORTRAN_FLAGS "-w -fallow-argument-mismatch")
Expand All @@ -69,12 +62,16 @@ if(BUILD_MPI)
INSTALL_COMMAND cd ${PROJECT_BINARY_DIR}/mpich/mpich-${MPICH_VERSION} && $(MAKE) install
)
set(MPI_ROOT ${CMAKE_INSTALL_PREFIX})
set(MPI_C_COMPILER ${CMAKE_INSTALL_PREFIX}/bin/mpicc)
set(MPI_CXX_COMPILER ${CMAKE_INSTALL_PREFIX}/bin/mpicxx)
set(MPI_Fortran_COMPILER ${CMAKE_INSTALL_PREFIX}/bin/mpif90)
set(MPI_C_LIBRARY_VERSION_STRING "MPICH")
set(MPI_C_VERSION_MAJOR "3")
file(APPEND ${CMAKE_CONFIG_FILE} "set(MPI_ROOT \"${CMAKE_INSTALL_PREFIX}\")\n")
else()
set(MPI_DETERMINE_LIBRARY_VERSION true)
find_package(MPI REQUIRED)
message(${MPI_C_COMPILER})
add_custom_target(mpi)
endif()

if(NOT DEFINED MPITYPE AND BUILD_ESMF)
Expand Down Expand Up @@ -106,8 +103,6 @@ if(BUILD_NETCDF OR BUILD_PNG)
TEST_COMMAND cd ${PROJECT_BINARY_DIR}/zlib/build && make test
INSTALL_COMMAND $(MAKE) install
)

file(APPEND ${CMAKE_CONFIG_FILE} "set(ZLIB_ROOT \"${CMAKE_INSTALL_PREFIX}\")\n")
endif()

if(BUILD_NETCDF)
Expand Down Expand Up @@ -159,6 +154,7 @@ if(BUILD_NETCDF)
#TEST_COMMAND cd ${PROJECT_BINARY_DIR}/hdf5/build && make test
DEPENDS zlib
DEPENDS szip
DEPENDS mpi
)

# configure NetCDF configure script with installation locations of HDF, install location, etc
Expand Down Expand Up @@ -199,9 +195,6 @@ if(BUILD_NETCDF)
TEST_COMMAND cd ${PROJECT_BINARY_DIR}/netcdf-fortran && $(MAKE) check
DEPENDS netcdf
)

file(APPEND ${CMAKE_CONFIG_FILE} "set(HDF5_ROOT \"${CMAKE_INSTALL_PREFIX}\")\n")
file(APPEND ${CMAKE_CONFIG_FILE} "set(NETCDF \"${CMAKE_INSTALL_PREFIX}\")\n")
else()
# Find NetCDF
add_custom_target(netcdf-fortran)
Expand Down Expand Up @@ -229,7 +222,6 @@ if(BUILD_PNG)
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DEPENDS zlib
)
file(APPEND ${CMAKE_CONFIG_FILE} "set(PNG_ROOT \"${CMAKE_INSTALL_PREFIX}\")\n")
else()
# Find PNG
add_custom_target(libpng)
Expand All @@ -246,6 +238,7 @@ if(BUILD_JASPER)
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_BUILD_TYPE=RELEASE
-DBUILD_STATIC=ON
SOURCE_DIR ${PROJECT_SOURCE_DIR}/libjpeg
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
)
Expand All @@ -262,9 +255,6 @@ if(BUILD_JASPER)
INSTALL_COMMAND cd ${PROJECT_BINARY_DIR}/jasper && $(MAKE) install
DEPENDS libjpeg
)

file(APPEND ${CMAKE_CONFIG_FILE} "set(JPEG_ROOT \"${CMAKE_INSTALL_PREFIX}\")\n")
file(APPEND ${CMAKE_CONFIG_FILE} "set(Jasper_ROOT \"${CMAKE_INSTALL_PREFIX}\")\n")
else()
# Find JPEG and Jasper
add_custom_target(libjpeg)
Expand All @@ -273,30 +263,6 @@ else()
find_package(Jasper REQUIRED)
endif()

if(BUILD_WGRIB2)

ExternalProject_Add(wgrib2
PREFIX ${PROJECT_BINARY_DIR}/wgrib2
SOURCE_DIR ${PROJECT_SOURCE_DIR}/wgrib2
BINARY_DIR ${PROJECT_BINARY_DIR}/wgrib2
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
CMAKE_ARGS
-DUSE_NETCDF4=ON
-DUSE_IPOLATES=0
-DUSE_SPECTRAL=OFF
-DMAKE_FTN_API=ON
-DUSE_PNG=ON
-DUSE_JASPER=ON
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_C_COMPILER=${MPI_C_COMPILER}
-DCMAKE_Fortran_COMPILER=${MPI_Fortran_COMPILER}
-DCMAKE_PREFIX_PATH=${CMAKE_INSTALL_PREFIX}
DEPENDS jasper libpng netcdf-fortran
)

file(APPEND ${CMAKE_CONFIG_FILE} "set(WGRIB2_ROOT \"${CMAKE_INSTALL_PREFIX}\")\n")
endif()

if(BUILD_ESMF)
if(${CMAKE_C_COMPILER_ID} STREQUAL "Intel")
set(comp "intel")
Expand Down Expand Up @@ -330,7 +296,6 @@ if(BUILD_ESMF)
endif()

if(NOT BUILD_MPI)
add_custom_target(mpi)
set(ESMF_PATH $ENV{PATH})
else()
set(ESMF_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}:$ENV{PATH}")
Expand All @@ -348,8 +313,6 @@ if(BUILD_ESMF)
#TEST_BEFORE_INSTALL TRUE
INSTALL_COMMAND ${CMAKE_COMMAND} -E env PATH=${ESMF_PATH} ESMF_DIR=${PROJECT_SOURCE_DIR}/esmf ESMF_COMM=${MPITYPE} ESMF_COMPILER=${comp} ESMF_NETCDF=1 ESMF_NETCDF_INCLUDE=${NETCDF_INCLUDE_DIRS} ESMF_NETCDF_LIBS=${NETCDF_LIBRARIES} ESMF_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} ESMF_INSTALL_HEADERDIR=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} ESMF_INSTALL_MODDIR=${CMAKE_INSTALL_PREFIX}/mod ESMF_INSTALL_LIBDIR=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} ESMF_INSTALL_BINDIR=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR} ESMF_BOPT=${ESMF_BOPT} ESMF_OPTLEVEL=${ESMF_OPTLEVEL} ESMF_F90COMPILEOPTS=${ESMF_F90COMPILEOPTS} ESMF_CXXCOMPILEOPTS=${ESMF_CXXCOMPILEOPTS} $(MAKE) install
DEPENDS mpi netcdf-fortran)

file(APPEND ${CMAKE_CONFIG_FILE} "set(ESMFMKFILE \"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/esmf.mk\")\n")
endif()

# Option to overwrite modulefile (if DEPLOY = ON)
Expand Down
46 changes: 13 additions & 33 deletions doc/README_cheyenne_gnu.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,38 @@
Setup instructions for CISL Cheyenne using GNU-9.1.0
Setup instructions for CISL Cheyenne using GNU-10.1.0

NOTE: set "export INSTALL_PREFIX=..." as required for your installation (twice in this file!)

module purge
module load ncarenv/1.3
module load gnu/9.1.0
module load gnu/10.1.0
module load mpt/2.19
module load ncarcompilers/0.5.0
module load cmake/3.16.4
module li

> Currently Loaded Modules:
> 1) ncarenv/1.3 2) gnu/9.1.0 3) mpt/2.19 4) ncarcompilers/0.5.0 5) cmake/3.16.4
> 1) ncarenv/1.3 2) gnu/10.1.0 3) mpt/2.19 4) ncarcompilers/0.5.0 5) cmake/3.16.4

export CC=mpicc
export FC=mpif90
export CXX=mpicxx
export INSTALL_PREFIX=/glade/work/heinzell/fv3/ufs-srweather-app/NCEPLIBS-test-20200813-gnu
export INSTALL_PREFIX=/glade/p/ral/jntp/GMTB/tools/NCEPLIBS-ufs-v2.0.0/gnu-10.1.0/mpt-2.19

mkdir -p ${INSTALL_PREFIX}/src
cd ${INSTALL_PREFIX}/src

git clone -b develop --recursive https://github.com/NOAA-EMC/NCEPLIBS-external
git clone -b ufs-v2.0.0 --recursive https://github.com/NOAA-EMC/NCEPLIBS-external
cd NCEPLIBS-external
mkdir build && cd build
cmake -DBUILD_MPI=OFF -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} .. 2>&1 | tee log.cmake
make VERBOSE=1 -j2 2>&1 | tee log.make

export NETCDF=${INSTALL_PREFIX}
export ESMFMKFILE=${INSTALL_PREFIX}/lib64/esmf.mk
export WGRIB2_ROOT=${INSTALL_PREFIX}

cd ${INSTALL_PREFIX}/src
git clone -b develop --recursive https://github.com/NOAA-EMC/NCEPLIBS
git clone -b ufs-v2.0.0 --recursive https://github.com/NOAA-EMC/NCEPLIBS
cd NCEPLIBS
mkdir build && cd build
cmake -DDEPLOY=ON -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} .. 2>&1 | tee log.cmake
export ESMFMKFILE=${INSTALL_PREFIX}/lib64/esmf.mk
cmake -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DOPENMP=ON .. 2>&1 | tee log.cmake
make VERBOSE=1 -j2 2>&1 | tee log.make
make deploy 2>&1 | tee log.deploy

Expand All @@ -50,38 +47,21 @@ with those libraries installed.
This is separate from NCEPLIBS-external and NCEPLIBS, and details on how to get
the code are provided here: https://github.com/ufs-community/ufs-weather-model/wiki

git clone -b ufs-v2.0.0 --recursive https://github.com/ufs-community/ufs-weather-model

After checking out the code and changing to the top-level directory of ufs-weather-model,
the following commands should suffice to build the model.


module purge
module load ncarenv/1.3
module load gnu/9.1.0
module load gnu/10.1.0
module load mpt/2.19
module load ncarcompilers/0.5.0
module load cmake/3.16.4

export CC=mpicc
export FC=mpif90
export CXX=mpicxx
export INSTALL_PREFIX=/glade/work/heinzell/fv3/ufs-srweather-app/NCEPLIBS-test-20200813-gnu

export NETCDF=${INSTALL_PREFIX}
export ESMFMKFILE=${INSTALL_PREFIX}/lib64/esmf.mk
export WGRIB2_ROOT=${INSTALL_PREFIX}

module use -a ${INSTALL_PREFIX}/modules
module load bacio/2.4.0
module load nemsio/2.5.1
module load sp/2.3.0
module load w3emc/2.7.0
module load w3nco/2.4.0
module load nceppost/dceca26
module load sigio/2.3.0
module load g2/3.4.0
module load g2tmpl/1.9.0
module load ip/3.3.0
module load crtm/2.3.0
module use /glade/p/ral/jntp/GMTB/tools/NCEPLIBS-ufs-v2.0.0/gnu-10.1.0/mpt-2.19/modules
module load NCEPLIBS/2.0.0

export CMAKE_Platform=cheyenne.gnu
./build.sh 2>&1 | tee build.log
42 changes: 11 additions & 31 deletions doc/README_cheyenne_intel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,23 @@ module li
export CC=mpicc
export FC=mpif90
export CXX=mpicxx
export INSTALL_PREFIX=/glade/work/heinzell/fv3/ufs-srweather-app/NCEPLIBS-test-20200813-intel
export INSTALL_PREFIX=/glade/p/ral/jntp/GMTB/tools/NCEPLIBS-ufs-v2.0.0/intel-19.1.1/mpt-2.19

mkdir -p ${INSTALL_PREFIX}/src
cd ${INSTALL_PREFIX}/src

git clone -b develop --recursive https://github.com/NOAA-EMC/NCEPLIBS-external
git clone -b ufs-v2.0.0 --recursive https://github.com/NOAA-EMC/NCEPLIBS-external
cd NCEPLIBS-external
mkdir build && cd build
cmake -DBUILD_MPI=OFF -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} .. 2>&1 | tee log.cmake
make VERBOSE=1 -j2 2>&1 | tee log.make

export NETCDF=${INSTALL_PREFIX}
export ESMFMKFILE=${INSTALL_PREFIX}/lib64/esmf.mk
export WGRIB2_ROOT=${INSTALL_PREFIX}

cd ${INSTALL_PREFIX}/src/
git clone -b develop --recursive https://github.com/NOAA-EMC/NCEPLIBS
cd ${INSTALL_PREFIX}/src
git clone -b ufs-v2.0.0 --recursive https://github.com/NOAA-EMC/NCEPLIBS
cd NCEPLIBS
mkdir build && cd build
cmake -DDEPLOY=ON -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} .. 2>&1 | tee log.cmake
export ESMFMKFILE=${INSTALL_PREFIX}/lib64/esmf.mk
cmake -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DOPENMP=ON .. 2>&1 | tee log.cmake
make VERBOSE=1 -j2 2>&1 | tee log.make
make deploy 2>&1 | tee log.deploy

Expand All @@ -44,12 +41,14 @@ make deploy 2>&1 | tee log.deploy


The following instructions are for building the ufs-weather-model (standalone;
not the ufs-mrweather app - for the latter, the model is built by the workflow)
not the UFS applications - for the latter, the model is built by the workflow)
with those libraries installed.

This is separate from NCEPLIBS-external and NCEPLIBS, and details on how to get
the code are provided here: https://github.com/ufs-community/ufs-weather-model/wiki

git clone -b ufs-v2.0.0 --recursive https://github.com/ufs-community/ufs-weather-model

After checking out the code and changing to the top-level directory of ufs-weather-model,
the following commands should suffice to build the model.

Expand All @@ -61,27 +60,8 @@ module load mpt/2.19
module load ncarcompilers/0.5.0
module load cmake/3.16.4

export CC=mpicc
export FC=mpif90
export CXX=mpicxx
export INSTALL_PREFIX=/glade/work/heinzell/fv3/ufs-srweather-app/NCEPLIBS-test-20200813-intel

export NETCDF=${INSTALL_PREFIX}
export ESMFMKFILE=${INSTALL_PREFIX}/lib64/esmf.mk
export WGRIB2_ROOT=${INSTALL_PREFIX}

module use -a ${INSTALL_PREFIX}/modules
module load bacio/2.4.0
module load nemsio/2.5.1
module load sp/2.3.0
module load w3emc/2.7.0
module load w3nco/2.4.0
module load nceppost/dceca26
module load sigio/2.3.0
module load g2/3.4.0
module load g2tmpl/1.9.0
module load ip/3.3.0
module load crtm/2.3.0
module use /glade/p/ral/jntp/GMTB/tools/NCEPLIBS-ufs-v2.0.0/intel-19.1.1/mpt-2.19/modules
module load NCEPLIBS/2.0.0

export CMAKE_Platform=cheyenne.intel
./build.sh 2>&1 | tee build.log
Loading