Skip to content

Commit

Permalink
Use prebuilt FMS library (ufs-community#534)
Browse files Browse the repository at this point in the history
* Remove FMS git submodule
* Update module files and top-level CMakeLists.txt to use fms module (library) built by hpc-stack.
* Update ci for fms library ufs-community#575 (NCAR#13)

Co-authored-by: Minsuk Ji <57227195+MinsukJi-NOAA@users.noreply.github.com>
  • Loading branch information
DusanJovic-NOAA and MinsukJi-NOAA authored May 14, 2021
1 parent 6572e78 commit 9350745
Show file tree
Hide file tree
Showing 36 changed files with 2,812 additions and 2,951 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
path = NEMS
url = https://github.com/NOAA-EMC/NEMS
branch = develop
[submodule "FMS"]
path = FMS
url = https://github.com/NOAA-GFDL/FMS
branch = release/2020.04
[submodule "WW3"]
path = WW3
url = https://github.com/NOAA-EMC/WW3
Expand Down
39 changes: 9 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.18)

project(ufs
VERSION 1.0
Expand Down Expand Up @@ -71,17 +71,6 @@ if(CMAKE_Platform)
else()
message("Platform '${CMAKE_Platform}' configuration file does not exist")
endif()

# DH* 20210208 temporary workaround for FMS issues on Cheyenne with GNU 9.1.0
if (CMAKE_Platform MATCHES "cheyenne.gnu")
message("Applying patch cheyenne_gnu_fms_mpp_util_mpi_inc.patch")
execute_process(COMMAND patch -N -p0 INPUT_FILE cheyenne_gnu_fms_mpp_util_mpi_inc.patch
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/cheyenne_gnu_fms_mpp_util_mpi_inc.patch.out
ERROR_FILE ${CMAKE_CURRENT_BINARY_DIR}/cheyenne_gnu_fms_mpp_util_mpi_inc.patch.err
RESULT_VARIABLE RC)
# *DH 20210208
endif()
endif()

message("")
Expand Down Expand Up @@ -118,6 +107,14 @@ if(OPENMP)
endif()
find_package(NetCDF REQUIRED C Fortran)
find_package(ESMF MODULE REQUIRED)
if(FMS)
find_package(FMS REQUIRED COMPONENTS R4 R8)
if(32BIT)
add_library(fms ALIAS FMS::fms_r4)
else()
add_library(fms ALIAS FMS::fms_r8)
endif()
endif()
if(CMEPS)
find_package(PIO REQUIRED COMPONENTS C Fortran STATIC)
endif()
Expand All @@ -138,24 +135,6 @@ target_link_libraries(nemsio::nemsio INTERFACE w3emc::w3emc_d bacio::bacio_4)
find_package(Python 3 REQUIRED COMPONENTS Interpreter)
message("Found Python: ${Python_EXECUTABLE}")

###############################################################################
### FMS
###############################################################################
if(FMS)
set(GFS_PHYS ON CACHE BOOL "Enable GFS Physics")
if(NOT 32BIT)
set(64BIT ON CACHE BOOL "Enable 64-bit")
endif()

add_subdirectory(FMS)

if(32BIT)
add_library(fms ALIAS fms_r4)
else()
add_library(fms ALIAS fms_r8)
endif()
endif(FMS)

###############################################################################
### stochastic_physics
###############################################################################
Expand Down
1 change: 0 additions & 1 deletion FMS
Submodule FMS deleted from d4724f
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ The top level directory structure groups source code and input files as follow:
| -------------- | ------- |
| ```LICENSE.md``` | A copy of the GNU Lesser General Public License, Version 3. |
| ```README.md``` | This file with basic pointers to more information. |
| ```FMS/``` | Contains Flexible Modeling System source code. |
| ```NEMS/``` | Contains NOAA Environmental Modeling System source code and nems compset run scripts. |
| ```CMEPS-interface/``` | Contains CMEPS mediator |
| ```FV3/``` | Contains FV3 atmosphere model component including FV3 dynamical core, dynamics to physics driver, physics and IO. |
Expand Down
12 changes: 0 additions & 12 deletions cheyenne_gnu_fms_mpp_util_mpi_inc.patch

This file was deleted.

2 changes: 1 addition & 1 deletion modulefiles/ufs_cheyenne.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ proc ModulesHelp {} {

module-whatis "loads UFS Model prerequisites for Cheyenne/GNU"

module load cmake/3.16.4
module load cmake/3.18.2

# load programming environment
module load ncarenv/1.3
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_cheyenne.gnu_debug
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ proc ModulesHelp {} {

module-whatis "loads UFS Model prerequisites for Cheyenne/GNU"

module load cmake/3.16.4
module load cmake/3.18.2

# load programming environment
module load ncarenv/1.3
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_cheyenne.intel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ proc ModulesHelp {} {

module-whatis "loads UFS Model prerequisites for Cheyenne/Intel"

module load cmake/3.16.4
module load cmake/3.18.2

# load programming environment
module load ncarenv/1.3
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_cheyenne.intel_debug
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ proc ModulesHelp {} {

module-whatis "loads UFS Model prerequisites for Cheyenne/Intel"

module load cmake/3.16.4
module load cmake/3.18.2

# load programming environment
module load ncarenv/1.3
Expand Down
1 change: 1 addition & 0 deletions modulefiles/ufs_common
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module load hdf5/1.10.6
module load netcdf/4.7.4
module load pio/2.5.2
module load esmf/8_1_1
module load fms/2020.04.03

module load bacio/2.4.1
module load crtm/2.3.0
Expand Down
1 change: 1 addition & 0 deletions modulefiles/ufs_common_debug
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module load hdf5/1.10.6
module load netcdf/4.7.4
module load pio/2.5.2
module load esmf/8_1_1-debug
module load fms/2020.04.03

module load bacio/2.4.1
module load crtm/2.3.0
Expand Down
3 changes: 2 additions & 1 deletion modulefiles/ufs_gaea.intel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ module load cray-python/3.7.3.2
# Needed at runtime:
module load alps

module load cmake/3.17.0
module use /lustre/f2/pdata/ncep_shared/cmake-3.20.1/modulefiles
module load cmake/3.20.1

#needed for WW3 build
module load gcc/8.3.0
Expand Down
3 changes: 2 additions & 1 deletion modulefiles/ufs_gaea.intel_debug
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ module load cray-python/3.7.3.2
# Needed at runtime:
module load alps

module load cmake/3.17.0
module use /lustre/f2/pdata/ncep_shared/cmake-3.20.1/modulefiles
module load cmake/3.20.1

module use /lustre/f2/pdata/esrl/gsd/ufs/hpc-stack-v1.1.0/modulefiles/stack

Expand Down
6 changes: 4 additions & 2 deletions modulefiles/ufs_hera.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ module-whatis "loads UFS Model prerequisites for Hera/GNU"
module use /contrib/sutils/modulefiles
module load sutils

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 cmake/3.20.0

module load hpc-gnu/9.2.0
module load hpc-mpich/3.3.2

Expand Down
5 changes: 3 additions & 2 deletions modulefiles/ufs_hera.intel
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ module-whatis "loads UFS Model prerequisites for Hera/Intel"
module use /contrib/sutils/modulefiles
module load sutils

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 cmake/3.20.0

module load hpc-intel/18.0.5.274
module load hpc-impi/2018.0.4

Expand Down
5 changes: 3 additions & 2 deletions modulefiles/ufs_hera.intel_debug
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ module-whatis "loads UFS Model prerequisites for Hera/Intel"
module use /contrib/sutils/modulefiles
module load sutils

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 cmake/3.20.0

module load hpc-intel/18.0.5.274
module load hpc-impi/2018.0.4

Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_jet.intel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module-whatis "loads UFS Model prerequisites for Jet/Intel"
module use /contrib/sutils/modulefiles
module load sutils

module load cmake/3.16.1
module load cmake/3.20.1

module use /lfs4/HFIP/hfv3gfs/nwprod/hpc-stack/libs/modulefiles/stack

Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_jet.intel_debug
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module-whatis "loads UFS Model prerequisites for Jet/Intel"
module use /contrib/sutils/modulefiles
module load sutils

module load cmake/3.16.1
module load cmake/3.20.1

module use /lfs4/HFIP/hfv3gfs/nwprod/hpc-stack/libs/modulefiles/stack

Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_orion.intel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module-whatis "loads UFS Model prerequisites for Orion/Intel"

module load contrib noaatools

module load cmake/3.17.3
module load cmake/3.18.1
module load python/3.7.5

module use /apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_orion.intel_debug
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module-whatis "loads UFS Model prerequisites for Orion/Intel"

module load contrib noaatools

module load cmake/3.17.3
module load cmake/3.18.1
module load python/3.7.5

module use /apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack
Expand Down
5 changes: 3 additions & 2 deletions modulefiles/ufs_wcoss_cray
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ module rm NetCDF-intel-sandybridge/4.2
module load xt-lsfhpc/9.1.3
module load craype-haswell
module load python/3.6.3
module load cmake/3.16.2
module load gcc/5.3.0
#

module use /usrx/local/dev/modulefiles
module load NetCDF-intel-sandybridge/4.7.4
module load HDF5-parallel-intel-sandybridge/1.10.6
Expand Down Expand Up @@ -64,12 +63,14 @@ module load udreg
module load ugni

module load esmf/811
module load fms/2020.04.03

module swap pmi pmi/5.0.11

##
## load cmake
##
prepend-path PATH /gpfs/hps3/emc/nems/noscrub/emc.nemspara/soft/cmake/cmake-3.20.1-linux-x86_64/bin
setenv CC cc
setenv CXX CC
setenv FC ftn
Expand Down
5 changes: 3 additions & 2 deletions modulefiles/ufs_wcoss_cray_debug
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ module rm NetCDF-intel-sandybridge/4.2
module load xt-lsfhpc/9.1.3
module load craype-haswell
module load python/3.6.3
module load cmake/3.16.2
module load gcc/5.3.0
#

module use /usrx/local/dev/modulefiles
module load NetCDF-intel-sandybridge/4.7.4
module load HDF5-parallel-intel-sandybridge/1.10.6
Expand Down Expand Up @@ -64,12 +63,14 @@ module load udreg
module load ugni

module load esmf/811-debug
module load fms/2020.04.03

module swap pmi pmi/5.0.11

##
## load cmake
##
prepend-path PATH /gpfs/hps3/emc/nems/noscrub/emc.nemspara/soft/cmake/cmake-3.20.1-linux-x86_64/bin
setenv CC cc
setenv CXX CC
setenv FC ftn
Expand Down
3 changes: 2 additions & 1 deletion modulefiles/ufs_wcoss_dell_p3
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ module load ips/18.0.1.163
module load impi/18.0.1
module load lsf/10.1
module load python/3.6.3
module load cmake/3.16.2

module use /usrx/local/nceplibs/dev/hpc-stack/libs/hpc-stack/modulefiles/stack

module load cmake/3.20.0

module load hpc/1.1.0
module load hpc-ips/18.0.1.163
module load hpc-impi/18.0.1
Expand Down
3 changes: 2 additions & 1 deletion modulefiles/ufs_wcoss_dell_p3_debug
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ module load ips/18.0.1.163
module load impi/18.0.1
module load lsf/10.1
module load python/3.6.3
module load cmake/3.16.2

module use /usrx/local/nceplibs/dev/hpc-stack/libs/hpc-stack/modulefiles/stack

module load cmake/3.20.0

module load hpc/1.1.0
module load hpc-ips/18.0.1.163
module load hpc-impi/18.0.1
Expand Down
Loading

0 comments on commit 9350745

Please sign in to comment.