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

Updates to build for JEDI linking/control, add wcoss2 #295

Merged
merged 24 commits into from
Dec 12, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
98e8764
Build on wcoss2 (acorn)
DusanJovic-NOAA Nov 18, 2020
ed381e8
Use -march=core-avx2 instead of -xCORE-AVX2 on wcoss2
DusanJovic-NOAA Nov 19, 2020
8e524f6
Merge branch 'develop' into wcoss2
DusanJovic-NOAA Nov 19, 2020
9f95a8b
Updates to build for JEDI linking/control
mark-a-potts Nov 20, 2020
507aa1b
Removed unnecessary include files and INLINE POST setting
mark-a-potts Nov 20, 2020
423b66d
Updated to address PR suggestions.
mark-a-potts Nov 30, 2020
6cbfe82
Merge branch 'jedi-ufs' of github.com:mark-a-potts/ufs-weather-model …
mark-a-potts Nov 30, 2020
7a84602
Add rt_acorn.conf. Change /lfs/h2 to /lfs/h1.
DusanJovic-NOAA Dec 3, 2020
c628df3
Merge remote-tracking branch 'origin/develop' into wcoss2
DusanJovic-NOAA Dec 4, 2020
7e327db
Merge branch 'develop' into wcoss2
DusanJovic-NOAA Dec 7, 2020
7771a20
Merge remote-tracking branch 'upstream/develop' into jedi-ufs
mark-a-potts Dec 7, 2020
01dc7a2
Merge pull request #1 from DusanJovic-NOAA/wcoss2
mark-a-potts Dec 8, 2020
fd525c1
Update .gitmodules and submodule pointer for fv3atm for code review a…
climbfuji Dec 10, 2020
e81d686
Merge pull request #2 from climbfuji/jedi-ufs-dom4mark
mark-a-potts Dec 10, 2020
a0d75be
New regression tests
mark-a-potts Dec 10, 2020
deb80a5
Updated regression test logs
mark-a-potts Dec 10, 2020
3db490d
Merge branch 'jedi-ufs' of github.com:mark-a-potts/ufs-weather-model …
mark-a-potts Dec 10, 2020
32b851b
Updated regression test logs
mark-a-potts Dec 10, 2020
f4ace4f
Updated more regression test files
mark-a-potts Dec 11, 2020
1f89953
More regression test results
mark-a-potts Dec 11, 2020
4f25481
Updates for logs
mark-a-potts Dec 11, 2020
5db8934
Updated .gitmodules and removed extraneous file
mark-a-potts Dec 11, 2020
958478e
Fixed .gitmodules and updated pointer for FV3
mark-a-potts Dec 11, 2020
3f753ec
Updated pointer to NEMS repo
mark-a-potts Dec 11, 2020
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
40 changes: 29 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ set(QUAD_PRECISION ON CACHE BOOL "Enable QUAD_PRECISION (for certain grid metr
set(REPRO OFF CACHE BOOL "Enable REPRO mode")
set(WW3 OFF CACHE BOOL "Enable WW3")
set(S2S OFF CACHE BOOL "Enable S2S")
set(NEMS_DRIVER ON CACHE BOOL "Enable NEMS as top level driver")
set(DATM OFF CACHE BOOL "Enable Data Atmosphere")

###############################################################################
Expand Down Expand Up @@ -132,7 +133,7 @@ endif()
### FMS
###############################################################################
include(fms_files.cmake)
add_library(fms ${fms_src_files})
add_library(fms ${fms_src_files} ${fms_headers})
# stupid cmake can not figure out dependency of fft.F90 on fft99.F90 because 'use fft99_mod' is inside ifdefs
set_property(SOURCE FMS/fft/fft.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "-DSGICRAY=0 -DNAGFFT=0")

Expand All @@ -153,16 +154,20 @@ target_compile_definitions(fms PRIVATE "${_fms_defs_private}")

target_include_directories(fms PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/FMS/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/FMS/fms>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/FMS/fms2_io/include>
junwang-noaa marked this conversation as resolved.
Show resolved Hide resolved
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/FMS/mod>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/FMS/mpp/include>)
target_include_directories(fms INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/mod>)
target_link_libraries(fms PUBLIC MPI::MPI_Fortran
NetCDF::NetCDF_Fortran)
if(OpenMP_Fortran_FOUND)
target_link_libraries(fms PRIVATE OpenMP::OpenMP_Fortran)
endif()
set_target_properties(fms PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/FMS)
set_target_properties(fms PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/FMS/mod)
target_include_directories(fms INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/FMS/mod>
$<INSTALL_INTERFACE:FMS/mod>)
set_target_properties(fms PROPERTIES PUBLIC_HEADER "${fms_headers}" )

###############################################################################
### stochastic_physics
Expand Down Expand Up @@ -259,7 +264,9 @@ else()
list(APPEND _ufs_defs_private FRONT_FV3=fv3gfs_cap_mod)
add_dependencies(ufs fv3atm)
endif()

if(NEMS_DRIVER)
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
list(APPEND _ufs_defs_private NEMS_DRIVER=ON)
endif()
set_target_properties(ufs PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(ufs PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/NEMS/src)

Expand Down Expand Up @@ -314,7 +321,7 @@ endif()
target_compile_definitions(ufs_model PRIVATE "${_ufs_model_defs_private}")

if(DATM)
target_link_libraries(ufs_model PRIVATE ufs w3nco::w3nco_d)
target_link_libraries(ufs_model PUBLIC ufs w3nco::w3nco_d)
endif()
target_link_libraries(ufs_model PRIVATE ufs
esmf
Expand All @@ -325,17 +332,28 @@ target_link_libraries(ufs_model PRIVATE ufs
### Install
###############################################################################
install(
TARGETS ufs_model ufs fms
EXPORT ufs-config
RUNTIME DESTINATION bin
TARGETS fms
EXPORT fms-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include )

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/FMS/mod DESTINATION ${CMAKE_INSTALL_PREFIX})

install(EXPORT fms-config
DESTINATION lib/cmake
)
install(
TARGETS ufs
EXPORT ufs-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX})

install(EXPORT ufs-config
DESTINATION lib/cmake)

install(EXPORT ufs-config
DESTINATION lib/cmake
)
###############################################################################
### Done
###############################################################################
5 changes: 5 additions & 0 deletions fms_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,8 @@ list(APPEND fms_src_files
FMS/mpp/nsclock.c
FMS/mpp/threadloc.c
)

list( APPEND fms_headers
FMS/include/fms_platform.h
FMS/include/file_version.h
)