summaryrefslogtreecommitdiffstats
path: root/config/cmake/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake/scripts')
-rwxr-xr-xconfig/cmake/scripts/CTestScript.cmake20
-rwxr-xr-xconfig/cmake/scripts/HDF5config.cmake101
-rw-r--r--config/cmake/scripts/HPC/bsub-HDF5options.cmake31
-rw-r--r--config/cmake/scripts/HPC/qsub-HDF5options.cmake42
-rw-r--r--config/cmake/scripts/HPC/raybsub-HDF5options.cmake32
-rw-r--r--config/cmake/scripts/HPC/sbatch-HDF5options.cmake43
6 files changed, 222 insertions, 47 deletions
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index 8ff52ec..dc3939e 100755
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -277,7 +277,15 @@ message (STATUS "Dashboard script configuration:\n${vars}\n")
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
else ()
file(STRINGS ${CTEST_BINARY_DIRECTORY}/Testing/TAG TAG_CONTENTS REGEX "^2([0-9]+)[-]([0-9]+)$")
- execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME})
+ if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "raybsub")
+ execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME})
+ else ()
+ if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "qsub")
+ execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME} ctestS.out)
+ else ()
+ execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME})
+ endif()
+ endif ()
message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml")
execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
while(result)
@@ -292,7 +300,15 @@ message (STATUS "Dashboard script configuration:\n${vars}\n")
file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/SerialTest.xml)
file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}.log ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}_Serial.log)
unset(result CACHE)
- execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME})
+ if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "raybsub")
+ execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME})
+ else ()
+ if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "qsub")
+ execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME} ctestP.out)
+ else ()
+ execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME})
+ endif ()
+ endif ()
message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml")
execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
while(result)
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake
index 9d84ba6..185a86e 100755
--- a/config/cmake/scripts/HDF5config.cmake
+++ b/config/cmake/scripts/HDF5config.cmake
@@ -9,56 +9,62 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-#############################################################################################
-### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
+#############################################################################################
+### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
### BUILD_GENERATOR required [Unix, VS2017, VS201764, VS2015, VS201564, VS2013, VS201364] ###
-### ctest -S HDF518config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf518.log ###
-#############################################################################################
-
-cmake_minimum_required (VERSION 3.10)
-############################################################################
-# Usage:
-# ctest -S HDF518config.cmake,OPTION=VALUE -C Release -VV -O test.log
-# where valid options for OPTION are:
-# BUILD_GENERATOR - The cmake build generator:
-# Unix * Unix Makefiles
+### ctest -S HDF518config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf518.log ###
+#############################################################################################
+
+cmake_minimum_required (VERSION 3.10)
+############################################################################
+# Usage:
+# ctest -S HDF518config.cmake,OPTION=VALUE -C Release -VV -O test.log
+# where valid options for OPTION are:
+# BUILD_GENERATOR - The cmake build generator:
+# Unix * Unix Makefiles
# VS2017 * Visual Studio 15 2017
# VS201764 * Visual Studio 15 2017 Win64
-# VS2015 * Visual Studio 14 2015
-# VS201564 * Visual Studio 14 2015 Win64
-# VS2013 * Visual Studio 12 2013
-# VS201364 * Visual Studio 12 2013 Win64
-#
-# INSTALLDIR - root folder where hdf5 is installed
-# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
-# CTEST_SOURCE_NAME - source folder
-##############################################################################
-
-set (CTEST_SOURCE_VERSION "1.8.22")
-set (CTEST_SOURCE_VERSEXT "-snap3")
-
-##############################################################################
-# handle input parameters to script.
-#BUILD_GENERATOR - which CMake generator to use, required
-#INSTALLDIR - HDF5-1.8 root folder
-#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
-#CTEST_SOURCE_NAME - name of source folder; HDF5-1.8.x
+# VS2015 * Visual Studio 14 2015
+# VS201564 * Visual Studio 14 2015 Win64
+# VS2013 * Visual Studio 12 2013
+# VS201364 * Visual Studio 12 2013 Win64
+#
+# INSTALLDIR - root folder where hdf5 is installed
+# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
+# CTEST_SOURCE_NAME - source folder
+##############################################################################
+
+set (CTEST_SOURCE_VERSION "1.8.22")
+set (CTEST_SOURCE_VERSEXT "-snap3")
+
+##############################################################################
+# handle input parameters to script.
+#BUILD_GENERATOR - which CMake generator to use, required
+#INSTALLDIR - HDF5-1.8 root folder
+#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
+#CTEST_SOURCE_NAME - name of source folder; HDF5-1.8.x
#MODEL - CDash group name
+#HPC - run alternate configurations for HPC machines; sbatch, bsub, raybsub, qsub
#MPI - enable MPI
-if (DEFINED CTEST_SCRIPT_ARG)
- # transform ctest script arguments of the form
- # script.ctest,var1=value1,var2=value2
- # to variables with the respective names set to the respective values
- string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
- foreach (current_var ${script_args})
- if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
- set ("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
- endif ()
- endforeach ()
-endif ()
-
-# build generator must be defined
-if (NOT DEFINED BUILD_GENERATOR)
+if (DEFINED CTEST_SCRIPT_ARG)
+ # transform ctest script arguments of the form
+ # script.ctest,var1=value1,var2=value2
+ # to variables with the respective names set to the respective values
+ string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+ foreach (current_var ${script_args})
+ if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
+ set ("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+ endif ()
+ endforeach ()
+endif ()
+
+#HPC - run alternate configurations for HPC machines
+if (DEFINED HPC)
+ set (BUILD_GENERATOR "Unix")
+endif ()
+
+# build generator must be defined
+if (NOT DEFINED BUILD_GENERATOR)
message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364")
endif ()
@@ -94,6 +100,7 @@ endif ()
###################################################################
######### Following describes compiler ############
+if (NOT DEFINED HPC)
if (NOT DEFINED BUILD_GENERATOR)
message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2017, or VS201764, VS2015, VS201564, VS2013, VS201364")
endif ()
@@ -169,6 +176,10 @@ endif ()
set (ENV{CXXFLAGS} "${RR_WARNINGS_CXX} ${RR_FLAGS_CXX}")
endif ()
endif ()
+else ()
+ set (CTEST_SITE "${SITE_OS_NAME}")
+ set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
+endif ()
###################################################################
###################################################################
diff --git a/config/cmake/scripts/HPC/bsub-HDF5options.cmake b/config/cmake/scripts/HPC/bsub-HDF5options.cmake
new file mode 100644
index 0000000..7473e8a
--- /dev/null
+++ b/config/cmake/scripts/HPC/bsub-HDF5options.cmake
@@ -0,0 +1,31 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#############################################################################################
+#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
+#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
+#############################################################################################
+if (DEFINED MPI)
+ # maximum parallel processor count for build and test ####
+ set (MAX_PROC_COUNT 8)
+endif()
+#############################################################################################
+### options to run test scripts in batch commands
+set (LOCAL_BATCH_SCRIPT_COMMAND "bsub")
+set (LOCAL_BATCH_TEST "TRUE")
+set (LOCAL_BATCH_SCRIPT_NAME "ctestS.lsf")
+set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "ctestP.lsf")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=${LOCAL_BATCH_SCRIPT_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_EXECUTABLE:STRING=srun")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-n")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=6")
diff --git a/config/cmake/scripts/HPC/qsub-HDF5options.cmake b/config/cmake/scripts/HPC/qsub-HDF5options.cmake
new file mode 100644
index 0000000..34eba1b
--- /dev/null
+++ b/config/cmake/scripts/HPC/qsub-HDF5options.cmake
@@ -0,0 +1,42 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#############################################################################################
+#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
+#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
+#############################################################################################
+if (DEFINED MPI)
+ # maximum parallel processor count for build and test ####
+ set (MAX_PROC_COUNT 8)
+endif()
+#############################################################################################
+### options to run test scripts in batch commands
+set (LOCAL_BATCH_SCRIPT_NAME "ctest.qsub")
+set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "ctest.qsub")
+if (DEFINED KNL)
+ ### some additions and alternatives to cross compile on haswell for knl
+ set (COMPUTENODE_HWCOMPILE_MODULE "craype-mic-knl")
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake")
+endif ()
+set (LOCAL_BATCH_SCRIPT_COMMAND "qsub")
+set (LOCAL_BATCH_TEST "TRUE")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=${LOCAL_BATCH_SCRIPT_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_EXECUTABLE:STRING=aprun")
+# Option to suppress writing job statistics; to avoid issues with h5diff comparisons.
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_PREFLAGS:STRING=-q")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-n")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=6")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DACCOUNT_ID:STRING=${LOCAL_BATCH_SCRIPT_ARGS}")
+
+#############################################################################################
+#############################################################################################
diff --git a/config/cmake/scripts/HPC/raybsub-HDF5options.cmake b/config/cmake/scripts/HPC/raybsub-HDF5options.cmake
new file mode 100644
index 0000000..fa1ec4a
--- /dev/null
+++ b/config/cmake/scripts/HPC/raybsub-HDF5options.cmake
@@ -0,0 +1,32 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#############################################################################################
+#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
+#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
+#############################################################################################
+if (DEFINED MPI)
+ # maximum parallel processor count for build and test ####
+ set (MAX_PROC_COUNT 8)
+endif()
+#############################################################################################
+### options to run test scripts in batch commands
+set (LOCAL_BATCH_SCRIPT_COMMAND "raybsub")
+set (LOCAL_BATCH_TEST "TRUE")
+set (LOCAL_BATCH_SCRIPT_NAME "ray_ctestS.lsf")
+set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "ray_ctestP.lsf")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_COMMAND:STRING=${LOCAL_BATCH_SCRIPT_COMMAND}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=${LOCAL_BATCH_SCRIPT_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_EXECUTABLE:STRING=mpirun")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-np")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=6")
diff --git a/config/cmake/scripts/HPC/sbatch-HDF5options.cmake b/config/cmake/scripts/HPC/sbatch-HDF5options.cmake
new file mode 100644
index 0000000..3205a1c
--- /dev/null
+++ b/config/cmake/scripts/HPC/sbatch-HDF5options.cmake
@@ -0,0 +1,43 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#############################################################################################
+#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
+#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
+#############################################################################################
+if (DEFINED MPI)
+ # maximum parallel processor count for build and test ####
+ set (MAX_PROC_COUNT 8)
+endif()
+#############################################################################################
+### options to run test scripts in batch commands
+if (DEFINED KNL)
+ ### some additions and alternatives to cross compile on haswell for knl
+ set (COMPILENODE_HWCOMPILE_MODULE "craype-haswell")
+ set (COMPUTENODE_HWCOMPILE_MODULE "craype-mic-knl")
+ set (LOCAL_BATCH_SCRIPT_NAME "knl_ctestS.sl")
+ set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "knl_ctestP.sl")
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/crayle.cmake")
+else ()
+ set (LOCAL_BATCH_SCRIPT_NAME "ctestS.sl")
+ set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "ctestP.sl")
+endif ()
+set (LOCAL_BATCH_SCRIPT_COMMAND "sbatch")
+set (LOCAL_BATCH_TEST "TRUE")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=${LOCAL_BATCH_SCRIPT_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_EXECUTABLE:STRING=srun")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-n")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=6")
+
+#############################################################################################
+#############################################################################################