Skip to content

Commit

Permalink
bug fixes for regional EnKF, GNU compilers
Browse files Browse the repository at this point in the history
change build.comgsi
move GSD/gsdcloud to src/
  • Loading branch information
guoqing-noaa committed Jun 15, 2020
1 parent 93cd14b commit 25cf4e4
Show file tree
Hide file tree
Showing 89 changed files with 20,251 additions and 166 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build*/
.*.swp
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ project(GSI)
find_package( LAPACK )
endif()
# build the WRF I/O libraries
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libsrc/wrflib)
if(DEFINED ENV{GSIWRF_LIB})
set(wrflib "$ENV{GSIWRF_LIB}" CACHE INTERNAL "WRFIO library" )
elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libsrc/wrflib)
add_subdirectory(libsrc/wrflib)
else()
message("libsrc/wrflib not pulled from git, looking for WRF dependencies locally")
Expand Down Expand Up @@ -230,12 +232,12 @@ project(GSI)
find_package( IP )

if(BUILD_NCDIAG)
set(NCDIAG_INCS "${PROJECT_BINARY_DIR}/libsrc/ncdiag/include")
set(NCDIAG_INCS "${PROJECT_BINARY_DIR}/src/ncdiag/include")
add_subdirectory(src/ncdiag)
set(NCDIAG_LIBRARIES ncdiag )
endif(BUILD_NCDIAG)
if(BUILD_FV3GFS_NCIO)
set(FV3GFS_NCIO_INCS "${PROJECT_BINARY_DIR}/libsrc/fv3gfs_ncio/include")
set(FV3GFS_NCIO_INCS "${PROJECT_BINARY_DIR}/src/fv3gfs_ncio/include")
add_subdirectory(src/fv3gfs_ncio)
set(FV3GFS_NCIO_LIBRARIES fv3gfs_ncio )
endif(BUILD_FV3GFS_NCIO)
Expand All @@ -255,9 +257,9 @@ project(GSI)
find_package( IP )

if(BUILD_GSDCLOUD_ARW)
set(GSDCLOUD_DIR "${CMAKE_SOURCE_DIR}/libsrc/GSD/gsdcloud")
set(GSDCLOUD_DIR "${CMAKE_SOURCE_DIR}/src/GSD/gsdcloud")
set(gsdcloud gsdcloud_arw)
add_subdirectory(libsrc/GSD/gsdcloud)
add_subdirectory(src/GSD/gsdcloud)
set(GSDCLOUD_LIBRARY ${gsdcloud} )
else(BUILD_GSDCLOUD_ARW)
set(GSDCLOUD_LIBRARY "")
Expand Down
10 changes: 10 additions & 0 deletions cmake/Modules/platforms/Generic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,14 @@ macro (setGeneric)
set(GSI_Intel_Platform_FLAGS "-DPOUND_FOR_STRINGIFY -O3 -fp-model source -assume byterecl -convert big_endian -g -traceback -D_REAL8_ ${OpenMP_Fortran_FLAGS} ${MPI_Fortran_COMPILE_FLAGS}" CACHE INTERNAL "GSI Fortran Flags")
set(ENKF_Platform_FLAGS "-O3 ${HOST_FLAG} -warn all -implicitnone -traceback -fp-model strict -convert big_endian -DGFS -D_REAL8_ ${OpenMP_Fortran_FLAGS}" CACHE INTERNAL "ENKF Fortran Flags")

message("setting values for corelibs")
set(BUILD_BUFR "OFF" CACHE INTERNAL "Build the BUFR library" )
set(BUILD_BACIO "OFF" CACHE INTERNAL "Build the BACIO library" )
set(BUILD_SFCIO "OFF" CACHE INTERNAL "Build the SFCIO library" )
set(BUILD_SIGIO "OFF" CACHE INTERNAL "Build the SIGIO library" )
set(BUILD_NEMSIO "OFF" CACHE INTERNAL "Build the NEMSIO library" )
set(BUILD_SP "OFF" CACHE INTERNAL "Build the SP library" )
set(BUILD_CRTM "OFF" CACHE INTERNAL "Build the CRTM library" )
set(BUILD_W3EMC "OFF" CACHE INTERNAL "Build the EMC library" )
set(BUILD_NCO "OFF" CACHE INTERNAL "Build the NCO library" )
endmacro()
2 changes: 2 additions & 0 deletions cmake/Modules/setGNUFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function (setGNU)
set(W3NCO_C_FLAGS " -DLINUX -O3 -fconvert=big-endian -ffast-math -fno-second-underscore -frecord-marker=4 -funroll-loops -ggdb -static -Wall -fno-range-check -D_REAL8_ -fopenmp" CACHE INTERNAL "")
set(WRFLIB_Fortran_FLAGS " -O3 -fconvert=big-endian -ffast-math -fno-second-underscore -frecord-marker=4 -funroll-loops -ggdb -static -Wall -fno-range-check -D_REAL8_ -fopenmp -ffree-line-length-0" CACHE INTERNAL "")
set( NCDIAG_Fortran_FLAGS "-ffree-line-length-none" CACHE INTERNAL "" )
set( FV3GFS_NCIO_Fortran_FLAGS "-ffree-line-length-none" CACHE INTERNAL "" )
set( NDATE_Fortran_FLAGS "-fconvert=big-endian -DCOMMCODE -DLINUX -DUPPLITTLEENDIAN -O3 -Wl,-noinhibit-exec" CACHE INTERNAL "")
set( COV_CALC_FLAGS "-c -O3 -fconvert=little-endian -ffast-math -ffree-form -fno-second-underscore -frecord-marker=4 -funroll-loops -ggdb -static -Wall -fopenmp" CACHE INTERNAL "")
set(GSDCLOUD_Fortran_FLAGS "-O3 -fconvert=big-endian" CACHE INTERNAL "")
Expand Down Expand Up @@ -56,6 +57,7 @@ function (setGNU)
set(W3NCO_C_FLAGS " -DLINUX -g -fbacktrace -fconvert=big-endian -ffast-math -fno-second-underscore -frecord-marker=4 -funroll-loops -g -ggdb -static -Wall -fno-range-check -D_REAL8_ -fopenmp" CACHE INTERNAL "")
set(WRFLIB_Fortran_FLAGS " -g -fbacktrace -fconvert=big-endian -ffast-math -fno-second-underscore -frecord-marker=4 -funroll-loops -g -ggdb -static -Wall -fno-range-check -D_REAL8_ -fopenmp -ffree-line-length-0" CACHE INTERNAL "")
set( NCDIAG_Fortran_FLAGS "-ffree-line-length-none" CACHE INTERNAL "" )
set( FV3GFS_NCIO_Fortran_FLAGS "-ffree-line-length-none" CACHE INTERNAL "" )
set( NDATE_Fortran_FLAGS "-fconvert=big-endian -DCOMMCODE -DLINUX -DUPPLITTLEENDIAN -g -fbacktrace -Wl,-noinhibit-exec" CACHE INTERNAL "")
set( COV_CALC_FLAGS "-c -O3 -fconvert=little-endian -ffast-math -ffree-form -fno-second-underscore -frecord-marker=4 -funroll-loops -ggdb -static -Wall -fopenmp" CACHE INTERNAL "")
set(GSDCLOUD_Fortran_FLAGS "-O3 -fconvert=big-endian" CACHE INTERNAL "")
Expand Down
Loading

0 comments on commit 25cf4e4

Please sign in to comment.