From c64bfbd8a0eb71bfbd458eb680e7419bc1bd10c7 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 5 Jun 2019 16:35:04 -0500 Subject: [PATCH 1/2] Move check for MPI defined to enable parallel from options scripts in HPC to config/cmake/HDF5options.cmake. --- config/cmake/scripts/HDF5options.cmake | 14 ++++++++------ config/cmake/scripts/HPC/bsub-HDF5options.cmake | 12 ------------ config/cmake/scripts/HPC/qsub-HDF5options.cmake | 12 ------------ config/cmake/scripts/HPC/raybsub-HDF5options.cmake | 12 ------------ config/cmake/scripts/HPC/sbatch-HDF5options.cmake | 12 ------------ 5 files changed, 8 insertions(+), 54 deletions(-) diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index 45877d7fcb..cb75c02a77 100644 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -69,12 +69,14 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN ############################################################################################# ### enable parallel builds - -#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON") -#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF") -#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") -#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF") - +if (DEFINED MPI) + # maximum parallel processor count for build and test #### + set (MAX_PROC_COUNT 8) + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") + set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF") +endif() ############################################################################################# ### enable thread-safety builds diff --git a/config/cmake/scripts/HPC/bsub-HDF5options.cmake b/config/cmake/scripts/HPC/bsub-HDF5options.cmake index 83c17aa52e..e0b48f46d6 100644 --- a/config/cmake/scripts/HPC/bsub-HDF5options.cmake +++ b/config/cmake/scripts/HPC/bsub-HDF5options.cmake @@ -14,18 +14,6 @@ #### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### ############################################################################################# -### uncomment/comment and change the following lines for other configuration options - -############################################################################################# -### enable parallel builds -if (DEFINED MPI) - # maximum parallel processor count for build and test #### - set (MAX_PROC_COUNT 8) - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF") -endif () ############################################################################################# ### options to run test scripts in batch commands set (LOCAL_BATCH_SCRIPT_COMMAND "bsub") diff --git a/config/cmake/scripts/HPC/qsub-HDF5options.cmake b/config/cmake/scripts/HPC/qsub-HDF5options.cmake index 51c3891a58..d9af140d91 100644 --- a/config/cmake/scripts/HPC/qsub-HDF5options.cmake +++ b/config/cmake/scripts/HPC/qsub-HDF5options.cmake @@ -14,18 +14,6 @@ #### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### ############################################################################################# -### uncomment/comment and change the following lines for other configuration options - -############################################################################################# -### enable parallel builds -if (DEFINED MPI) - # maximum parallel processor count for build and test #### - set (MAX_PROC_COUNT 8) - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF") -endif () ############################################################################################# ### options to run test scripts in batch commands set (LOCAL_BATCH_SCRIPT_NAME "ctest.qsub") diff --git a/config/cmake/scripts/HPC/raybsub-HDF5options.cmake b/config/cmake/scripts/HPC/raybsub-HDF5options.cmake index 4aad887767..f70e754ea4 100644 --- a/config/cmake/scripts/HPC/raybsub-HDF5options.cmake +++ b/config/cmake/scripts/HPC/raybsub-HDF5options.cmake @@ -14,18 +14,6 @@ #### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### ############################################################################################# -### uncomment/comment and change the following lines for other configuration options - -############################################################################################# -### enable parallel builds -if (DEFINED MPI) - # maximum parallel processor count for build and test #### - set (MAX_PROC_COUNT 8) - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF") -endif () ############################################################################################# ### options to run test scripts in batch commands set (LOCAL_BATCH_SCRIPT_COMMAND "raybsub") diff --git a/config/cmake/scripts/HPC/sbatch-HDF5options.cmake b/config/cmake/scripts/HPC/sbatch-HDF5options.cmake index f70526e5c3..42d74821f4 100644 --- a/config/cmake/scripts/HPC/sbatch-HDF5options.cmake +++ b/config/cmake/scripts/HPC/sbatch-HDF5options.cmake @@ -14,18 +14,6 @@ #### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### ############################################################################################# -### uncomment/comment and change the following lines for other configuration options - -############################################################################################# -### enable parallel builds -if (DEFINED MPI) - # maximum parallel processor count for build and test #### - set (MAX_PROC_COUNT 8) - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") - set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_THREADSAFE:BOOL=OFF") -endif () ############################################################################################# ### options to run test scripts in batch commands if (DEFINED KNL) From 931abe94244c94e106835250e2f723f634a61c8c Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 5 Jun 2019 16:44:10 -0500 Subject: [PATCH 2/2] Move set (MAX_PROC_COUNT 8) back to HPC options files. --- config/cmake/scripts/HDF5options.cmake | 2 -- config/cmake/scripts/HPC/bsub-HDF5options.cmake | 5 ++++- config/cmake/scripts/HPC/qsub-HDF5options.cmake | 5 ++++- config/cmake/scripts/HPC/raybsub-HDF5options.cmake | 5 ++++- config/cmake/scripts/HPC/sbatch-HDF5options.cmake | 5 ++++- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index cb75c02a77..bfd7fad000 100644 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -70,8 +70,6 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN ############################################################################################# ### enable parallel builds if (DEFINED MPI) - # maximum parallel processor count for build and test #### - set (MAX_PROC_COUNT 8) set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PARALLEL:BOOL=ON") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF") set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF") diff --git a/config/cmake/scripts/HPC/bsub-HDF5options.cmake b/config/cmake/scripts/HPC/bsub-HDF5options.cmake index e0b48f46d6..7473e8aee1 100644 --- a/config/cmake/scripts/HPC/bsub-HDF5options.cmake +++ b/config/cmake/scripts/HPC/bsub-HDF5options.cmake @@ -13,7 +13,10 @@ #### 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") diff --git a/config/cmake/scripts/HPC/qsub-HDF5options.cmake b/config/cmake/scripts/HPC/qsub-HDF5options.cmake index d9af140d91..34eba1b245 100644 --- a/config/cmake/scripts/HPC/qsub-HDF5options.cmake +++ b/config/cmake/scripts/HPC/qsub-HDF5options.cmake @@ -13,7 +13,10 @@ #### 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") diff --git a/config/cmake/scripts/HPC/raybsub-HDF5options.cmake b/config/cmake/scripts/HPC/raybsub-HDF5options.cmake index f70e754ea4..fa1ec4a20d 100644 --- a/config/cmake/scripts/HPC/raybsub-HDF5options.cmake +++ b/config/cmake/scripts/HPC/raybsub-HDF5options.cmake @@ -13,7 +13,10 @@ #### 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") diff --git a/config/cmake/scripts/HPC/sbatch-HDF5options.cmake b/config/cmake/scripts/HPC/sbatch-HDF5options.cmake index 42d74821f4..3205a1cabe 100644 --- a/config/cmake/scripts/HPC/sbatch-HDF5options.cmake +++ b/config/cmake/scripts/HPC/sbatch-HDF5options.cmake @@ -13,7 +13,10 @@ #### 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)