Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Summa Actors
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Numerical_Simulations_Lab
Actors
Summa Actors
Commits
2803474f
Commit
2803474f
authored
2 years ago
by
KyleKlenk
Browse files
Options
Downloads
Patches
Plain Diff
Add Kinsol_Cluster option
Added Kinsol_Cluster option to cmake
parent
1353e793
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/cmake/CMakeLists.txt
+8
-8
8 additions, 8 deletions
build/cmake/CMakeLists.txt
build/cmake/kinsol.cmake
+84
-72
84 additions, 72 deletions
build/cmake/kinsol.cmake
with
92 additions
and
80 deletions
build/cmake/CMakeLists.txt
+
8
−
8
View file @
2803474f
...
...
@@ -24,9 +24,9 @@ include(ida.cmake)
######### SET THE PATHS TO THE SUNDIALS LIBRARIES AND INCLUDE FILES #########
#############################################################################
#
set(DIR_SUNDIALS "/globalhome/kck540/HPC/Libraries/sundials/instdir")
set
(
DIR_SUNDIALS
"/globalhome/kck540/HPC/Libraries/sundials/instdir"
)
# set(DIR_SUNDIALS "/home/kklenk/projects/rpp-kshook/CompHydCore/SummaSundials/sundials/sundials/instdir")
set
(
DIR_SUNDIALS
"/usr/local/sundials-6.3.0"
)
#
set(DIR_SUNDIALS "/usr/local/sundials-6.3.0")
#############################################################################
# Set default build type to Release
...
...
@@ -35,10 +35,10 @@ if(NOT CMAKE_BUILD_TYPE)
endif
()
# Add options for build type
set
(
CMAKE_CONFIGURATION_TYPES Debug Release Cluster Cluster_Debug Kinsol Kinsol_Debug IDA IDA_DEBUG
)
set
(
CMAKE_CONFIGURATION_TYPES Debug Release Cluster Cluster_Debug Kinsol Kinsol_Debug
Kinsol_Cluster
IDA IDA_DEBUG
)
message
(
"Build type:
${
CMAKE_BUILD_TYPE
}
"
)
# Set compiler flags
if
(
CMAKE_BUILD_TYPE
MATCHES
Debug OR CMAKE_BUILD_TYPE
MATCHES
Cluster_Debug OR CMAKE_BUILD_TYPE
MATCHES
Kinsol_Debug
)
if
(
CMAKE_BUILD_TYPE
STREQUAL
Debug OR CMAKE_BUILD_TYPE
STREQUAL
Cluster_Debug OR CMAKE_BUILD_TYPE
STREQUAL
Kinsol_Debug
)
message
(
"Debug build."
)
add_definitions
(
-DDEBUG
)
set
(
SUMMA_NOAHMP_OPTIONS -g -O0 -ffree-form -ffree-line-length-none -fmax-errors=0 -fPIC -Wfatal-errors
)
...
...
@@ -56,7 +56,7 @@ endif()
# Set include directories
if
(
CMAKE_BUILD_TYPE
MATCHES
Cluster OR CMAKE_BUILD_TYPE
MATCHES
Cluster_Debug
)
if
(
CMAKE_BUILD_TYPE
STREQUAL
Cluster OR CMAKE_BUILD_TYPE
STREQUAL
Cluster_Debug
)
find_package
(
CAF REQUIRED
)
find_package
(
netCDF REQUIRED
)
...
...
@@ -65,7 +65,7 @@ if (CMAKE_BUILD_TYPE MATCHES Cluster OR CMAKE_BUILD_TYPE MATCHES Cluster_Debug)
compile_summa_original
(
PARENT_DIR,
${
DIR_SUNDIALS
}
)
elseif
(
CMAKE_BUILD_TYPE
MATCHES
IDA OR CMAKE_BUILD_TYPE
MATCHES
IDA_DEBUG
)
elseif
(
CMAKE_BUILD_TYPE
STREQUAL
IDA OR CMAKE_BUILD_TYPE
STREQUAL
IDA_DEBUG
)
find_package
(
CAF REQUIRED
)
find_package
(
netCDF REQUIRED
)
find_package
(
LAPACK REQUIRED
)
...
...
@@ -74,7 +74,7 @@ elseif(CMAKE_BUILD_TYPE MATCHES IDA OR CMAKE_BUILD_TYPE MATCHES IDA_DEBUG)
compile_with_ida
(
PARENT_DIR,
${
DIR_SUNDIALS
}
)
elseif
(
CMAKE_BUILD_TYPE
MATCHES
Kinsol OR CMAKE_BUILD_TYPE
MATCHES
Kinsol_Debug
)
elseif
(
CMAKE_BUILD_TYPE
STREQUAL
Kinsol OR CMAKE_BUILD_TYPE
STREQUAL
Kinsol_Debug
OR CMAKE_BUILD_TYPE STREQUAL Kinsol_Cluster
)
message
(
"
\n
Building Kinsol
\n
"
)
compile_with_kinsol
(
PARENT_DIR,
${
DIR_SUNDIALS
}
)
...
...
This diff is collapsed.
Click to expand it.
build/cmake/kinsol.cmake
+
84
−
72
View file @
2803474f
...
...
@@ -8,44 +8,30 @@ function(compile_with_kinsol PARENT_DIR, DIR_SUNDIALS)
message
(
"DIR_SUNDIALS:
${
DIR_SUNDIALS
}
"
)
# Building Summa with sundials on local machine
link_directories
(
${
DIR_SUNDIALS
}
/lib
)
set
(
CMAKE_BUILD_RPATH
"
${
DIR_SUNDIALS
}
/lib:/usr/local/lib"
)
set
(
SUMMA_INCLUDES
"/usr/include"
"
${
DIR_SUNDIALS
}
/include"
"
${
DIR_SUNDIALS
}
/fortran"
${
netCDF_INCLUDES
}
${
LAPACK_INCLUDES
}
)
# link_directories(${DIR_SUNDIALS}/lib64)
# set(CMAKE_BUILD_RPATH "${DIR_SUNDIALS}/lib64")
# set(SUMMA_INCLUDES
# "$ENV{EBROOTNETCDFMINFORTRAN}/include"
# "${DIR_SUNDIALS}/include"
# "${DIR_SUNDIALS}/fortran"
# ${netCDF_INCLUDES}
# ${LAPACK_INCLUDES})
set
(
SUMMA_LIBS
-lsundials_fkinsol_mod
-lsundials_fnvecserial_mod
-lsundials_fsunmatrixdense_mod
-lsundials_fsunlinsoldense_mod
-lsundials_fsunnonlinsolnewton_mod
-lnetcdff
-lopenblas
SUMMA_NOAHMP
)
# set(SUMMA_LIBS
# -lsundials_fkinsol_mod
# -lsundials_fnvecserial_mod
# -lsundials_fsunmatrixdense_mod
# -lsundials_fsunlinsoldense_mod
# -lsundials_fsunnonlinsolnewton_mod
# -lnetcdff
# ${netCDF_LIBRARIES}
# ${LAPACK_LIBRARIES}
# SUMMA_NOAHMP)
if
(
CMAKE_BUILD_TYPE STREQUAL Kinsol_Cluster
)
link_directories
(
${
DIR_SUNDIALS
}
/lib64
)
set
(
CMAKE_BUILD_RPATH
"
${
DIR_SUNDIALS
}
/lib64"
)
set
(
SUMMA_INCLUDES
"$ENV{EBROOTNETCDFMINFORTRAN}/include"
"
${
DIR_SUNDIALS
}
/include"
"
${
DIR_SUNDIALS
}
/fortran"
${
netCDF_INCLUDES
}
${
LAPACK_INCLUDES
}
)
set
(
SUMMA_LIBS
-lsundials_fkinsol_mod
-lsundials_fnvecserial_mod
-lsundials_fsunmatrixdense_mod
-lsundials_fsunlinsoldense_mod
-lsundials_fsunnonlinsolnewton_mod
-lnetcdff
${
netCDF_LIBRARIES
}
${
LAPACK_LIBRARIES
}
SUMMA_NOAHMP
)
set
(
SUMMA_ACTORS_INCLUDES
set
(
SUMMA_ACTORS_INCLUDES
${
CAF_INCLUDES
}
"$ENV{EBROOTNETCDFMINFORTRAN}/include"
${
LAPACK_INCLUDES
}
...
...
@@ -56,42 +42,68 @@ function(compile_with_kinsol PARENT_DIR, DIR_SUNDIALS)
"
${
PARENT_DIR
}
/build/includes/job_actor"
"
${
PARENT_DIR
}
/build/includes/file_access_actor"
"
${
PARENT_DIR
}
/build/includes/hru_actor"
)
# set(SUMMA_ACTORS_INCLUDES
# ${CAF_INCLUDES}
# "$ENV{EBROOTNETCDFMINFORTRAN}/include"
# ${LAPACK_INCLUDES}
# "${DIR_SUNDIALS}/include"
# "${PARENT_DIR}/build/includes/global"
# "${PARENT_DIR}/build/includes/summa_actor"
# "${PARENT_DIR}/build/includes/gru_actor"
# "${PARENT_DIR}/build/includes/job_actor"
# "${PARENT_DIR}/build/includes/file_access_actor"
# "${PARENT_DIR}/build/includes/hru_actor")
set
(
SUMMA_ACTORS_LIBS
-lopenblas
-lcaf_core
-lcaf_io
summa
-lnetcdff
-lsundials_fkinsol_mod
-lsundials_fnvecserial_mod
-lsundials_fsunmatrixdense_mod
-lsundials_fsunlinsoldense_mod
-lsundials_fsunnonlinsolnewton_mod
)
# set(SUMMA_ACTORS_LIBS
# ${CAF_LIBRARIES}
# ${netCDF_LIBRARIES}
# ${LAPACK_LIBRARIES}
# -lcaf_core
# -lcaf_io
# summa
# -lnetcdff
# -lsundials_fkinsol_mod
# -lsundials_fnvecserial_mod
# -lsundials_fsunmatrixdense_mod
# -lsundials_fsunlinsoldense_mod
# -lsundials_fsunnonlinsolnewton_mod)
set
(
SUMMA_ACTORS_LIBS
${
CAF_LIBRARIES
}
${
netCDF_LIBRARIES
}
${
LAPACK_LIBRARIES
}
-lcaf_core
-lcaf_io
summa
-lnetcdff
-lsundials_fkinsol_mod
-lsundials_fnvecserial_mod
-lsundials_fsunmatrixdense_mod
-lsundials_fsunlinsoldense_mod
-lsundials_fsunnonlinsolnewton_mod
)
else
()
link_directories
(
${
DIR_SUNDIALS
}
/lib
)
set
(
CMAKE_BUILD_RPATH
"
${
DIR_SUNDIALS
}
/lib:/usr/local/lib"
)
set
(
SUMMA_INCLUDES
"/usr/include"
"
${
DIR_SUNDIALS
}
/include"
"
${
DIR_SUNDIALS
}
/fortran"
${
netCDF_INCLUDES
}
${
LAPACK_INCLUDES
}
)
set
(
SUMMA_LIBS
-lsundials_fkinsol_mod
-lsundials_fnvecserial_mod
-lsundials_fsunmatrixdense_mod
-lsundials_fsunlinsoldense_mod
-lsundials_fsunnonlinsolnewton_mod
-lnetcdff
-lopenblas
SUMMA_NOAHMP
)
set
(
SUMMA_ACTORS_INCLUDES
${
CAF_INCLUDES
}
"$ENV{EBROOTNETCDFMINFORTRAN}/include"
${
LAPACK_INCLUDES
}
"
${
DIR_SUNDIALS
}
/include"
"
${
PARENT_DIR
}
/build/includes/global"
"
${
PARENT_DIR
}
/build/includes/summa_actor"
"
${
PARENT_DIR
}
/build/includes/gru_actor"
"
${
PARENT_DIR
}
/build/includes/job_actor"
"
${
PARENT_DIR
}
/build/includes/file_access_actor"
"
${
PARENT_DIR
}
/build/includes/hru_actor"
)
set
(
SUMMA_ACTORS_LIBS
-lopenblas
-lcaf_core
-lcaf_io
summa
-lnetcdff
-lsundials_fkinsol_mod
-lsundials_fnvecserial_mod
-lsundials_fsunmatrixdense_mod
-lsundials_fsunlinsoldense_mod
-lsundials_fsunnonlinsolnewton_mod
)
endif
()
set
(
ACTORS_DIR
${
PARENT_DIR
}
/build/source/actors
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment