Skip to content

Commit

Permalink
Add cmake files for Kuroshio
Browse files Browse the repository at this point in the history
  • Loading branch information
josephzhang8 committed Feb 25, 2024
1 parent 71eaebe commit 6f67844
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
15 changes: 15 additions & 0 deletions cmake/SCHISM.local.kuro
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
###W&M kuro cluster

set (SCHISM_EXE_BASENAME pschism_KURO CACHE STRING "Base name (modules and file extension to be added of the executable. If you want a machine name, add it here")

###Relative paths won't work
#set(CMAKE_Fortran_COMPILER ifort CACHE PATH "Path to serial Fortran compiler")
set(CMAKE_Fortran_COMPILER ifx CACHE PATH "Path to serial Fortran compiler")
set(CMAKE_C_COMPILER icx CACHE PATH "Path to serial Fortran compiler")
set(CMAKE_CXX_COMPILER icpx CACHE PATH "Path to serial Fortran compiler")
set(CMAKE_Fortran_COMPILER mpiifort CACHE PATH "Path to serial Fortran compiler")
set(CMAKE_C_COMPILER mpiicc CACHE PATH "Path to serial Fortran compiler")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -mcmodel=medium -march=x86-64-v3 -init=zero" CACHE STRING "Fortran flags" FORCE)
#set(CMAKE_Fortran_FLAGS_RELEASE "-O1 -ipo -mcmodel=medium -march=core-avx2 -init=zero " CACHE STRING "Fortran flags" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-O1 -march=core-avx2 " CACHE STRING "Fortran flags" FORCE)

6 changes: 5 additions & 1 deletion cmake/SCHISMCompile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Intel")
set( CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2 ${SCHISM_INTEL_OPTIONS}")
set( CMAKE_Fortran_FLAGS_DEBUG_INIT "-g ${SCHISM_INTEL_OPTIONS}")
set( CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -debug inline_debug_info ${SCHISM_INTEL_OPTIONS}")
set( C_PREPROCESS_FLAG CACHE STRING "C Preprocessor Flag")
set( C_PREPROCESS_FLAG -cpp CACHE STRING "C Preprocessor Flag")
endif()

endif()

if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "IntelLLVM")
set( C_PREPROCESS_FLAG CACHE STRING "C Preprocessor Flag")
endif()

if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "PGI")
#message(STATUS "Overriding default cmake Portland Group compiler flags")
set (SCHISM_PG_OPTIONS "-mcmodel=medium")
Expand Down
2 changes: 2 additions & 0 deletions src/Utility/Cluster_files/modules.kuro
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module load intel/compiler-2024.0 openmpi-ib/intel-2024.0/4.1.6 hdf5/intel-2024.0/1.14.3_openmpi
module load slurm/23.11.1 netcdf-c/intel-2024.0/4.9.2_openmpi netcdf-fortran/intel-2024.0/4.6.1_openmpi
8 changes: 8 additions & 0 deletions src/Utility/Cluster_files/run_kuro
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/tcsh
#SBATCH --job-name=R01a
##64 cores/nodes
#SBATCH -N 13 --ntasks-per-node=64
##Max wall clock time is XX days
#SBATCH -t 24:00:00

srun ./pschism_i24 6

0 comments on commit 6f67844

Please sign in to comment.