Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ for an atmospheric model to interact with physics through the CCPP.
and, if asked, enter your github credentials again. If the machine is running an older
version of git and you are denied access, you may need to configure the
submodule URLs before repeating step 4 by executing this command:
* `git config submodule.src/ccpp.url https://[username]@github.com/NCAR/gmtb-ccpp.git`
* `git config submodule.gmtb-gfsphysics.url https://[username]@github.com/NCAR/gmtb-gfsphysics.git`
* `git config submodule.ccpp-framework.url https://[username]@github.com/NCAR/ccpp-framework.git`
* `git config submodule.ccpp-physics.url https://[username]@github.com/NCAR/ccpp-physics.git`

## Building and Compiling the SCM with CCPP
1. Run the CCPP prebuild script to match required physics variables with those
available from the dycore (SCM) and to generate physics caps and makefile
segments.
* `cd gmtb-ccpp/scripts`
* `cd ccpp-framework/scripts`
* `./ccpp_prebuild.py`
Note: use `./ccpp_prebuild.py --debug` to see the full output of the script.
2. Change directory to the top-level SCM directory.
* `cd ../../gmtb-scm`
* `cd ../../scm`
3. [Optional] Run the machine setup script if necessary. This script loads
compiler modules (Fortran 2003-compliant Intel), netCDF module, etc. and sets
compiler environment variables.
* `source Theia_setup.csh` (for csh) or `. Theia_setup.sh` (for bash)
* `source Cheyenne_setup.csh` (for csh) or `. Cheyenne_setup.sh` (for bash)
* `source MACOSX_setup.csh` (for csh) or `. MACOSX_setup.sh` (for bash) if following the instructions in doc/README_MACOSX.txt
* `source etc/Theia_setup.csh` (for csh) or `. etc/Theia_setup.sh` (for bash)
* `source etc/Cheyenne_setup.csh` (for csh) or `. etc/Cheyenne_setup.sh` (for bash)
* `source etc/MACOSX_setup.csh` (for csh) or `. etc/MACOSX_setup.sh` (for bash) if following the instructions in doc/README_MACOSX.txt
3. Make a build directory and change into it.
* `mkdir bin && cd bin`
4. Invoke cmake on the source code to build.
Expand All @@ -54,7 +54,7 @@ compiler environment variables.
file.
* `./gmtb_scm twpice`
2. A netcdf output file is generated in the location specified in the case
configuration file. For the twpice case, it is located in `../output_twpice/output.nc`
configuration file. For the twpice case, it is located in `./output_twpice/output.nc`

## Setting up the physics suite
First, a physics suite is defined using an XML file located in
Expand Down
2 changes: 1 addition & 1 deletion ccpp-physics
4 changes: 4 additions & 0 deletions external/bacio/v2.0.1/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ else (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
message (FATAL_ERROR "This program has only been compiled on Linux and Darwin platforms. If another platform is needed, the appropriate flags must be added in ${BACIOLIB_SRC}/CMakeLists.txt")
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

#add OpenMP
set(c_flags ${c_flags} ${OpenMP_C_FLAGS})
set(f_flags ${f_flags} ${OpenMP_Fortran_FLAGS})

if(${CMAKE_VERSION} LESS 3.3)
file(GLOB f_files *.f)
string (REPLACE ";" " " f_flags_str "${f_flags}")
Expand Down
4 changes: 4 additions & 0 deletions external/sp/v2.0.2/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ else (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
message ("This program has only been compiled with gfortran and ifort. If another compiler is needed, the appropriate flags must be added in ${SPLIB_SRC}/CMakeLists.txt")
endif (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")

#add OpenMP
set(c_flags ${c_flags} ${OpenMP_C_FLAGS})
set(f_flags ${f_flags} ${OpenMP_Fortran_FLAGS})

if(${CMAKE_VERSION} LESS 3.3)
string (REPLACE ";" " " f_flags_str "${f_flags}")
SET_SOURCE_FILES_PROPERTIES(${sp_source_code} PROPERTIES COMPILE_FLAGS ${f_flags_str})
Expand Down
4 changes: 4 additions & 0 deletions external/w3nco/v2.0.6/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ endif (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
#set C compiler flags
set(c_flags -O3 -DLINUX -fPIC)

#add OpenMP
set(c_flags ${c_flags} ${OpenMP_C_FLAGS})
set(f_flags ${f_flags} ${OpenMP_Fortran_FLAGS})

if(${CMAKE_VERSION} LESS 3.3)
file(GLOB f_files *.f)
string (REPLACE ";" " " f_flags_str "${f_flags}")
Expand Down
Empty file modified scm/etc/Theia_setup.csh
100644 → 100755
Empty file.
Empty file modified scm/etc/Theia_setup.sh
100644 → 100755
Empty file.
21 changes: 11 additions & 10 deletions scm/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,18 @@ else (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
endif (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")

#------------------------------------------------------------------------------
# Find OpenMP for C/C++/Fortran
# CMake Modules
# Set the CMake module path
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../ccpp-framework/cmake")
#------------------------------------------------------------------------------
# Set OpenMP flags for C/C++/Fortran
if (OPENMP)
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
message(STATUS "Enabled OpenMP support for C/C++/Fortran compiler")
else(OPENMP_FOUND)
message (FATAL_ERROR "C/C++/Fortran compiler does not support OpenMP")
endif()
include(detect_openmp)
detect_openmp()
set (CMAKE_Fortran_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_Fortran_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
message(STATUS "Enable OpenMP support for C/C++/Fortran compiler")
else(OPENMP)
message (STATUS "Disable OpenMP support for C/C++/Fortran compiler")
endif()
Expand Down