Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/gcc_mpi
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Apr 29, 2022
2 parents 27d8469 + 127d7e4 commit 74d2a8c
Show file tree
Hide file tree
Showing 49 changed files with 3,448 additions and 2,101 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/debug-docs-test_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,13 @@ jobs:
export CC=mpicc
export CXX=mpicxx
export FC=mpifort
# Findwgrib2 in module form does not search <libname>-version
# as NCEPLIBS installs it
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:~/jasper/lib;~/jasper/lib64"
export wgrib2_ROOT=`find ~/nceplibs -type d -maxdepth 1 -iname "wgrib2*"`
cmake .. -DCMAKE_PREFIX_PATH='~/jasper;~/nceplibs' -DCMAKE_BUILD_TYPE=Debug -DENABLE_DOCS=On -DCMAKE_Fortran_FLAGS="-g -fprofile-arcs -ftest-coverage -O0"
make -j2
- name: test
run: |
cd ufs_utils/build/tests
wget -i ./chgres_cube/data/files.txt -P ./chgres_cube/data
wget -i ./sfc_climo_gen/data/files.txt -P ./sfc_climo_gen/data
cd ../
cd ufs_utils/build
export LSAN_OPTIONS=suppressions=LSanSuppress.supp
ctest --rerun-failed --output-on-failure
export PATH="/home/runner/.local/bin:$PATH"
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
export CC=mpiicc
export CPPFLAGS=-I${HOME}/netcdf/include
export LDFLAGS=-L${HOME}/netcdf/lib
wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.4.tar.gz &> /dev/null
tar -xzf netcdf-c-4.7.4.tar.gz
wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.7.4.tar.gz &> /dev/null
tar -xzf v4.7.4.tar.gz
pushd netcdf-c-4.7.4
./configure --prefix=${HOME}/netcdf --disable-dap --disable-utilities --disable-shared
make -j2
Expand Down Expand Up @@ -160,17 +160,11 @@ jobs:
export ESMFMKFILE=~/esmf/lib/esmf.mk
cd ufs_utils
mkdir build && cd build
# Findwgrib2 in module form does not search <libname>-version
# as NCEPLIBS installs it
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:~/jasper/lib;~/jasper/lib64"
export wgrib2_ROOT=`find ~/nceplibs -type d -maxdepth 1 -iname "wgrib2*"`
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH='~;~/jasper;~/nceplibs;~/netcdf'
make -j2
- name: test
run: |
cd ufs_utils/build/tests
wget -i ./chgres_cube/data/files.txt -P ./chgres_cube/data
wget -i ./sfc_climo_gen/data/files.txt -P ./sfc_climo_gen/data
cd ../
cd ufs_utils/build
ctest --rerun-failed --output-on-failure
12 changes: 3 additions & 9 deletions .github/workflows/linux-mac-nceplibs-mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ jobs:
export CC=mpicc
export CPPFLAGS=-I${HOME}/netcdf/include
export LDFLAGS=-L${HOME}/netcdf/lib
wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-${{ matrix.netcdf_version }}.tar.gz &> /dev/null
tar -xzf netcdf-c-${{ matrix.netcdf_version }}.tar.gz
wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v${{ matrix.netcdf_version }}.tar.gz &> /dev/null
tar -xzf v${{ matrix.netcdf_version }}.tar.gz
cd netcdf-c-${{ matrix.netcdf_version }}
./configure --prefix=${HOME}/netcdf --disable-dap --disable-utilities --disable-shared
make -j2
Expand Down Expand Up @@ -214,20 +214,14 @@ jobs:
export CC=mpicc
export CXX=mpicxx
export FC=mpifort
# Findwgrib2 in module form does not search <libname>-version
# as NCEPLIBS installs it
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:~/jasper/lib;~/jasper/lib64"
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:~/jasper/lib;~/jasper/lib64"
export wgrib2_ROOT=`find ~/nceplibs -type d -maxdepth 1 -iname "wgrib2*"`
cmake .. -DCMAKE_PREFIX_PATH='~/jasper;~/nceplibs;~/netcdf'
make -j2
- name: test
run: |
cd ufs_utils/build/tests
wget -i ./chgres_cube/data/files.txt -P ./chgres_cube/data
wget -i ./sfc_climo_gen/data/files.txt -P ./sfc_climo_gen/data
cd ../
cd ufs_utils/build
# Oversubscribe for OpenMPI to run more processes than CPUs
export OMPI_MCA_rmaps_base_oversubscribe=1
ctest --rerun-failed --output-on-failure
12 changes: 3 additions & 9 deletions .github/workflows/netcdf-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
export CC=mpicc
export CPPFLAGS=-I${HOME}/netcdf/include
export LDFLAGS=-L${HOME}/netcdf/lib
wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-${{ matrix.netcdf_version }}.tar.gz &> /dev/null
tar -xzf netcdf-c-${{ matrix.netcdf_version }}.tar.gz
wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v${{ matrix.netcdf_version }}.tar.gz &> /dev/null
tar -xzf v${{ matrix.netcdf_version }}.tar.gz
cd netcdf-c-${{ matrix.netcdf_version }}
./configure --prefix=${HOME}/netcdf --disable-dap --disable-utilities --disable-shared
make -j2
Expand Down Expand Up @@ -148,18 +148,12 @@ jobs:
export CC=mpicc
export CXX=mpicxx
export FC=mpifort
# Findwgrib2 in module form does not search <libname>-version
# as NCEPLIBS installs it
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:~/jasper/lib;~/jasper/lib64"
export wgrib2_ROOT=`find ~/nceplibs -type d -maxdepth 1 -iname "wgrib2*"`
cmake .. -DCMAKE_PREFIX_PATH='~/jasper;~/nceplibs;~/netcdf' -DCMAKE_BUILD_TYPE=Debug
make -j2
- name: test
run: |
cd ufs_utils/build/tests
wget -i ./chgres_cube/data/files.txt -P ./chgres_cube/data
wget -i ./sfc_climo_gen/data/files.txt -P ./sfc_climo_gen/data
cd ../
cd ufs_utils/build
export LSAN_OPTIONS=suppressions=LSanSuppress.supp
ctest --rerun-failed --output-on-failure
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$")
CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
message(STATUS "Set BUILD_TESTING to YES and build unit testing package under tests")
set(BUILD_TESTING "YES")
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 -fp-model precise")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check -check noarg_temp_created -check nopointer -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv")
if(APPLE)
# The linker on macOS does not include `common symbols` by default.
# Passing the -c flag includes them and fixes an error with undefined symbols.
set(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> -c <TARGET>")
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -c <TARGET>")
endif()
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -fbacktrace")
if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
Expand Down Expand Up @@ -63,8 +67,7 @@ find_package(nemsio 2.5.0 REQUIRED)
find_package(sigio 2.3.0 REQUIRED)
find_package(sp 2.3.3 REQUIRED)
find_package(ip 3.3.3 REQUIRED)
find_package(g2 3.4.0 REQUIRED)
find_package(wgrib2 2.0.8 REQUIRED)
find_package(g2 3.4.3 REQUIRED)
find_package(sigio 2.3.0 REQUIRED)

# EMC requires executables in ./exec
Expand All @@ -87,6 +90,6 @@ add_subdirectory(sorc)
# Run unit tests.
include(CTest)
if(BUILD_TESTING)
message(STATUS "Set BUILD_TESTING to YES and build unit testing package under tests")
add_subdirectory(tests)
endif()

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ This package uses the [hpc-stack](https://github.com/NOAA-EMC/hpc-stack) for the
- [NCEPLIBS-sp](https://github.com/NOAA-EMC/NCEPLIBS-sp)
- [NCEPLIBS-ip](https://github.com/NOAA-EMC/NCEPLIBS-ip)
- [NCEPLIBS-g2](https://github.com/NOAA-EMC/NCEPLIBS-g2)
- [NCEPLIBS-wgrib2](https://github.com/NOAA-EMC/NCEPLIBS-wgrib2)

And for the following third party libraries:

Expand Down
17 changes: 15 additions & 2 deletions build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@ else
set -x
fi

CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON -DENABLE_DOCS=ON"
# The unit test data download is part of the build system. Not all machines can
# access the EMC ftp site, so turn off the build (-DBUILD_TESTING=OFF) of the units tests accordingly.
# Those with access to the EMC ftp site are: Orion, Hera, WCOSS-Cray, WCOSS-Dell.

if [[ "$target" == "hera" || "$target" == "orion" || "$target" == "wcoss_cray" || "$target" == "wcoss_dell_p3" ]]; then
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON -DBUILD_TESTING=OFF"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON -DBUILD_TESTING=ON"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON -DENABLE_DOCS=ON -DBUILD_TESTING=ON"
else
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON -DBUILD_TESTING=OFF"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DEMC_EXEC_DIR=ON -DENABLE_DOCS=ON -DBUILD_TESTING=OFF"
fi

rm -fr ./build
mkdir ./build && cd ./build
Expand All @@ -37,4 +47,7 @@ cmake .. ${CMAKE_FLAGS}
make -j 8 VERBOSE=1
make install

#make test
#ctest -I 4,5

exit
41 changes: 0 additions & 41 deletions cmake/Findwgrib2.cmake

This file was deleted.

15 changes: 0 additions & 15 deletions cmake/mpiexec.jet

This file was deleted.

1 change: 0 additions & 1 deletion modulefiles/build.cheyenne.intel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module load w3nco/2.4.1
module load sigio/2.3.2

module load sfcio/1.4.1
module load wgrib2/2.0.8
module load netcdf/4.7.4

setenv ESMFMKFILE /glade/p/ral/jntp/GMTB/tools/NCEPLIBS-ufs-v2.0.0/intel-19.1.1/mpt-2.19/lib64/esmf.mk
Expand Down
5 changes: 1 addition & 4 deletions modulefiles/build.hera.gnu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ load(pathJoin("esmf", esmf_ver))
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
load(pathJoin("bacio", bacio_ver))

g2_ver=os.getenv("g2_ver") or "3.4.1"
g2_ver=os.getenv("g2_ver") or "3.4.3"
load(pathJoin("g2", g2_ver))

ip_ver=os.getenv("ip_ver") or "3.3.3"
Expand All @@ -49,9 +49,6 @@ load(pathJoin("sfcio", sfcio_ver))
sigio_ver=os.getenv("sigio_ver") or "2.3.2"
load(pathJoin("sigio", sigio_ver))

wgrib2_ver=os.getenv("wgrib2_ver") or "2.0.8"
load(pathJoin("wgrib2", wgrib2_ver))

nccmp_ver=os.getenv("nccmp_ver") or "1.8.7.0"
load(pathJoin("nccmp", nccmp_ver))

Expand Down
5 changes: 1 addition & 4 deletions modulefiles/build.hera.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ load(pathJoin("hpc-impi", impi_ver))
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
load(pathJoin("bacio", bacio_ver))

g2_ver=os.getenv("g2_ver") or "3.4.1"
g2_ver=os.getenv("g2_ver") or "3.4.3"
load(pathJoin("g2", g2_ver))

ip_ver=os.getenv("ip_ver") or "3.3.3"
Expand All @@ -43,9 +43,6 @@ load(pathJoin("sfcio", sfcio_ver))
sigio_ver=os.getenv("sigio_ver") or "2.3.2"
load(pathJoin("sigio", sigio_ver))

wgrib2_ver=os.getenv("wgrib2_ver") or "2.0.8"
load(pathJoin("wgrib2", wgrib2_ver))

zlib_ver=os.getenv("zlib_ver") or "1.2.11"
load(pathJoin("zlib", zlib_ver))

Expand Down
5 changes: 1 addition & 4 deletions modulefiles/build.jet.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,9 @@ load(pathJoin("sfcio", sfcio_ver))
nemsio_ver=os.getenv("nemsio_ver") or "2.5.2"
load(pathJoin("nemsio", nemsio_ver))

g2_ver=os.getenv("g2_ver") or "3.4.1"
g2_ver=os.getenv("g2_ver") or "3.4.3"
load(pathJoin("g2", g2_ver))

wgrib2_ver=os.getenv("wgrib2_ver") or "2.0.8"
load(pathJoin("wgrib2", wgrib2_ver))

prod_util_ver=os.getenv("prod_util_ver") or "1.2.2"
load(pathJoin("prod_util", prod_util_ver))

Expand Down
3 changes: 0 additions & 3 deletions modulefiles/build.odin.intel
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@ module load sigio
module load sfcio
module load nemsio
module load g2
module load wgrib2

#module load esmf/8.0.0
#setenv ESMFMKFILE /oldscratch/ywang/external/NCEPLIBS_SRW/lib64/esmf.mk
setenv ESMFMKFILE /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/lib64/esmf.mk

setenv CMAKE_Fortran_COMPILER ftn
setenv CMAKE_C_COMPILER cc

#setenv WGRIB2_ROOT /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/wgrib2-2.0.8
5 changes: 1 addition & 4 deletions modulefiles/build.orion.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ load(pathJoin("hpc-impi", impi_ver))
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
load(pathJoin("bacio", bacio_ver))

g2_ver=os.getenv("g2_ver") or "3.4.1"
g2_ver=os.getenv("g2_ver") or "3.4.3"
load(pathJoin("g2", g2_ver))

ip_ver=os.getenv("ip_ver") or "3.3.3"
Expand All @@ -40,9 +40,6 @@ load(pathJoin("sfcio", sfcio_ver))
sigio_ver=os.getenv("sigio_ver") or "2.3.2"
load(pathJoin("sigio", sigio_ver))

wgrib2_ver=os.getenv("wgrib2_ver") or "2.0.8"
load(pathJoin("wgrib2", wgrib2_ver))

zlib_ver=os.getenv("zlib_ver") or "1.2.11"
load(pathJoin("zlib", zlib_ver))

Expand Down
1 change: 0 additions & 1 deletion modulefiles/build.s4.intel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ module load sp/2.3.3
module load w3nco/2.4.1
module load sfcio/1.4.1
module load sigio/2.3.2
module load wgrib2/2.0.8

module load jasper/2.0.22
module load zlib/1.2.11
Expand Down
1 change: 0 additions & 1 deletion modulefiles/build.stampede.intel
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ module load sigio
module load sfcio
module load nemsio
module load g2
module load wgrib2

#setenv ESMFMKFILE /work/00315/tg455890/stampede2/regional_fv3/NCEPLIBS_SRWv2.0/lib64/esmf.mk

Expand Down
6 changes: 4 additions & 2 deletions modulefiles/build.wcoss_cray.intel
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@ module load cray-hdf5/1.8.14

module use /usrx/local/nceplibs/NCEPLIBS/cmake/install/NCEPLIBS-v1.3.0/modules
module load bacio/2.4.1
module load g2/3.4.1
module load ip/3.3.3
module load nemsio/2.5.2
module load sp/2.3.3
module load w3nco/2.4.1
module load sfcio/1.4.1
module load sigio/2.3.2
module load wgrib2/2.0.8

setenv ZLIB_ROOT /usrx/local/prod/zlib/1.2.7/intel/haswell
setenv PNG_ROOT /usrx/local/prod/png/1.2.49/intel/haswell
setenv Jasper_ROOT /usrx/local/prod/jasper/1.900.1/intel/haswell

module use /usrx/local/nceplibs/NCEPLIBS/cmake/install/NCEPLIBS-v1.4.0/modules
module load g2/3.4.5

module load esmf/820

setenv NETCDF /opt/cray/netcdf/4.3.3.1/INTEL/14.0
module rm gcc
module load gcc/6.3.0
Loading

0 comments on commit 74d2a8c

Please sign in to comment.