From 78eae8c91bf113f709f080458d17505695c95d7e Mon Sep 17 00:00:00 2001 From: Kevin Paul Date: Fri, 11 Sep 2015 10:49:00 -0600 Subject: [PATCH 01/21] Adding new function to initialize search paths from include/lib lists --- cmake/FindGPTL.cmake | 39 ++++++++++++++++++--------------------- cmake/FindHDF5.cmake | 37 +++++++++++++++++-------------------- cmake/FindLIBZ.cmake | 20 +++++++++----------- cmake/FindNetCDF.cmake | 18 ++++++++---------- cmake/FindPnetCDF.cmake | 18 ++++++++---------- cmake/FindSZIP.cmake | 20 +++++++++----------- cmake/LibFind.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 109 insertions(+), 83 deletions(-) diff --git a/cmake/FindGPTL.cmake b/cmake/FindGPTL.cmake index 70bd5ec9588..c223c1b3461 100644 --- a/cmake/FindGPTL.cmake +++ b/cmake/FindGPTL.cmake @@ -46,29 +46,26 @@ foreach (GPTL_comp IN LISTS GPTL_FIND_VALID_COMPONENTS) if (NOT GPTL_${GPTL_comp}_FOUND) # Manually add the MPI include and library dirs to search paths - if (GPTL_comp STREQUAL C) - if (MPI_C_FOUND) - set (GPTL_${GPTL_comp}_PATHS ${MPI_C_INCLUDE_PATH}) - foreach (lib IN LISTS MPI_C_LIBRARIES) - get_filename_component (libdir ${lib} PATH) - list (APPEND GPTL_${GPTL_comp}_PATHS ${libdir}) - unset (libdir) - endforeach () - endif () - else () - if (MPI_Fortran_FOUND) - set (GPTL_${GPTL_comp}_PATHS ${MPI_Fortran_INCLUDE_PATH}) - foreach (lib IN LISTS MPI_Fortran_LIBRARIES) - get_filename_component (libdir ${lib} PATH) - list (APPEND GPTL_${GPTL_comp}_PATHS ${libdir}) - unset (libdir) - endforeach () - endif () + if (GPTL_comp STREQUAL C AND MPI_C_FOUND) + set (mpiincs ${MPI_C_INCLUDE_PATH}) + set (mpilibs ${MPI_C_LIBRARIES}) + set (mpifound ${MPI_C_FOUND}) + elseif (MPI_Fortran_FOUND) + set (mpiincs ${MPI_Fortran_INCLUDE_PATH}) + set (mpilibs ${MPI_Fortran_LIBRARIES}) + set (mpifound ${MPI_Fortran_FOUND}) endif () - + # Search for the package component - find_package_component(GPTL COMPONENT ${GPTL_comp} - PATHS ${GPTL_${GPTL_comp}_PATHS}) + if (mpifound) + initialize_paths (GPTL_${GPTL_comp}_PATHS + INCLUDE_DIRECTORIES ${mpiincs} + LIBRARIES ${mpilibs}) + find_package_component(GPTL COMPONENT ${GPTL_comp} + PATHS ${GPTL_${GPTL_comp}_PATHS}) + else () + find_package_component(GPTL COMPONENT ${GPTL_comp}) + endif () endif () diff --git a/cmake/FindHDF5.cmake b/cmake/FindHDF5.cmake index 120dcae0ca5..e918277b1ae 100644 --- a/cmake/FindHDF5.cmake +++ b/cmake/FindHDF5.cmake @@ -52,29 +52,26 @@ foreach (HDF5_comp IN LISTS HDF5_FIND_VALID_COMPONENTS) if (NOT HDF5_${HDF5_comp}_FOUND) # Manually add the MPI include and library dirs to search paths - if (HDF5_comp STREQUAL C OR HDF5_comp STREQUAL HL) - if (MPI_C_FOUND) - set (HDF5_${HDF5_comp}_PATHS ${MPI_C_INCLUDE_PATH}) - foreach (lib IN LISTS MPI_C_LIBRARIES) - get_filename_component (libdir ${lib} PATH) - list (APPEND HDF5_${HDF5_comp}_PATHS ${libdir}) - unset (libdir) - endforeach () - endif () - else () - if (MPI_Fortran_FOUND) - set (HDF5_${HDF5_comp}_PATHS ${MPI_Fortran_INCLUDE_PATH}) - foreach (lib IN LISTS MPI_Fortran_LIBRARIES) - get_filename_component (libdir ${lib} PATH) - list (APPEND HDF5_${HDF5_comp}_PATHS ${libdir}) - unset (libdir) - endforeach () - endif () + if ( (HDF5_comp STREQUAL C OR HDF5_comp STREQUAL HL) AND MPI_C_FOUND) + set (mpiincs ${MPI_C_INCLUDE_PATH}) + set (mpilibs ${MPI_C_LIBRARIES}) + set (mpifound ${MPI_C_FOUND}) + elseif (MPI_Fortran_FOUND) + set (mpiincs ${MPI_Fortran_INCLUDE_PATH}) + set (mpilibs ${MPI_Fortran_LIBRARIES}) + set (mpifound ${MPI_Fortran_FOUND}) endif () # Search for the package component - find_package_component(HDF5 COMPONENT ${HDF5_comp} - PATHS ${HDF5_${HDF5_comp}_PATHS}) + if (mpifound) + initialize_paths (HDF5_${HDF5_comp}_PATHS + INCLUDE_DIRECTORIES ${mpiincs} + LIBRARIES ${mpilibs}) + find_package_component(HDF5 COMPONENT ${HDF5_comp} + PATHS ${HDF5_${HDF5_comp}_PATHS}) + else () + find_package_component(HDF5 COMPONENT ${HDF5_comp}) + endif () # Continue only if found if (HDF5_${HDF5_comp}_FOUND) diff --git a/cmake/FindLIBZ.cmake b/cmake/FindLIBZ.cmake index 4175b136a53..8ebbaefeed8 100644 --- a/cmake/FindLIBZ.cmake +++ b/cmake/FindLIBZ.cmake @@ -22,18 +22,16 @@ define_package_component (LIBZ # SEARCH FOR PACKAGE if (NOT LIBZ_FOUND) - # Manually add the MPI include and library dirs to search paths + # Manually add the MPI include and library dirs to search paths + # and search for the package component if (MPI_C_FOUND) - set (LIBZ_PATHS ${MPI_C_INCLUDE_PATH}) - foreach (lib IN LISTS MPI_C_LIBRARIES) - get_filename_component (libdir ${lib} PATH) - list (APPEND LIBZ_PATHS ${libdir}) - unset (libdir) - endforeach () + initialize_paths (LIBZ_PATHS + INCLUDE_DIRECTORIES ${MPI_C_INCLUDE_PATH} + LIBRARIES ${MPI_C_LIBRARIES}) + find_package_component(LIBZ + PATHS ${LIBZ_PATHS}) + else () + find_package_component(LIBZ) endif () - - # Search for the package - find_package_component(LIBZ - PATHS ${LIBZ_PATHS}) endif () diff --git a/cmake/FindNetCDF.cmake b/cmake/FindNetCDF.cmake index f5473e6ebfb..118ab8a70ca 100644 --- a/cmake/FindNetCDF.cmake +++ b/cmake/FindNetCDF.cmake @@ -41,18 +41,16 @@ foreach (NCDFcomp IN LISTS NetCDF_FIND_VALID_COMPONENTS) if (NOT NetCDF_${NCDFcomp}_FOUND) # Manually add the MPI include and library dirs to search paths + # and search for the package component if (MPI_${NCDFcomp}_FOUND) - set (NetCDF_${NCDFcomp}_PATHS ${MPI_${NCDFcomp}_INCLUDE_PATH}) - foreach (lib IN LISTS MPI_${NCDFcomp}_LIBRARIES) - get_filename_component (libdir ${lib} PATH) - list (APPEND NetCDF_${NCDFcomp}_PATHS ${libdir}) - unset (libdir) - endforeach () + initialize_paths (NetCDF_${NCDFcomp}_PATHS + INCLUDE_DIRECTORIES ${MPI_${NCDFcomp}_INCLUDE_PATH} + LIBRARIES ${MPI_${NCDFcomp}_LIBRARIES}) + find_package_component(NetCDF COMPONENT ${NCDFcomp} + PATHS ${NetCDF_${NCDFcomp}_PATHS}) + else () + find_package_component(NetCDF COMPONENT ${NCDFcomp}) endif () - - # Search for the package component - find_package_component(NetCDF COMPONENT ${NCDFcomp} - PATHS ${NetCDF_${NCDFcomp}_PATHS}) # Continue only if component found if (NetCDF_${NCDFcomp}_FOUND) diff --git a/cmake/FindPnetCDF.cmake b/cmake/FindPnetCDF.cmake index e1c1c5c9ace..b87d245cd10 100644 --- a/cmake/FindPnetCDF.cmake +++ b/cmake/FindPnetCDF.cmake @@ -41,18 +41,16 @@ foreach (PNCDFcomp IN LISTS PnetCDF_FIND_VALID_COMPONENTS) if (NOT PnetCDF_${PNCDFcomp}_FOUND) # Manually add the MPI include and library dirs to search paths + # and search for the package component if (MPI_${PNCDFcomp}_FOUND) - set (PnetCDF_${PNCDFcomp}_PATHS ${MPI_${PNCDFcomp}_INCLUDE_PATH}) - foreach (lib IN LISTS MPI_${PNCDFcomp}_LIBRARIES) - get_filename_component (libdir ${lib} PATH) - list (APPEND PnetCDF_${PNCDFcomp}_PATHS ${libdir}) - unset (libdir) - endforeach () + initialize_paths (PnetCDF_${PNCDFcomp}_PATHS + INCLUDE_DIRECTORIES ${MPI_${PNCDFcomp}_INCLUDE_PATH} + LIBRARIES ${MPI_${PNCDFcomp}_LIBRARIES}) + find_package_component(PnetCDF COMPONENT ${PNCDFcomp} + PATHS ${PnetCDF_${PNCDFcomp}_PATHS}) + else () + find_package_component(PnetCDF COMPONENT ${PNCDFcomp}) endif () - - # Search for the package component - find_package_component(PnetCDF COMPONENT ${PNCDFcomp} - PATHS ${PnetCDF_${PNCDFcomp}_PATHS}) # Continue only if component found if (PnetCDF_${PNCDFcomp}_FOUND) diff --git a/cmake/FindSZIP.cmake b/cmake/FindSZIP.cmake index cc823fd72c8..e65cfe5fd68 100644 --- a/cmake/FindSZIP.cmake +++ b/cmake/FindSZIP.cmake @@ -22,18 +22,16 @@ define_package_component (SZIP # SEARCH FOR PACKAGE if (NOT SZIP_FOUND) - # Manually add the MPI include and library dirs to search paths + # Manually add the MPI include and library dirs to search paths + # and search for the package component if (MPI_C_FOUND) - set (SZIP_PATHS ${MPI_C_INCLUDE_PATH}) - foreach (lib IN LISTS MPI_C_LIBRARIES) - get_filename_component (libdir ${lib} PATH) - list (APPEND SZIP_PATHS ${libdir}) - unset (libdir) - endforeach () + initialize_paths (SZIP_PATHS + INCLUDE_DIRECTORIES ${MPI_C_INCLUDE_PATH} + LIBRARIES ${MPI_C_LIBRARIES}) + find_package_component(SZIP + PATHS ${SZIP_PATHS}) + else () + find_package_component(SZIP) endif () - - # Search for the package - find_package_component(SZIP - PATHS ${SZIP_PATHS}) endif () diff --git a/cmake/LibFind.cmake b/cmake/LibFind.cmake index bdf6140bee7..3960e8845d9 100644 --- a/cmake/LibFind.cmake +++ b/cmake/LibFind.cmake @@ -122,6 +122,46 @@ function (find_valid_components PKG) endfunction () +#______________________________________________________________________________ +# - Initialize a list of paths from a list of includes and libraries +# +# Input: +# INCLUDE_DIRECTORIES +# LIBRARIES +# +# Ouput: +# ${PATHLIST} +# +function (initialize_paths PATHLIST) + + # Parse the input arguments + set (multiValueArgs INCLUDE_DIRECTORIES LIBRARIES) + cmake_parse_arguments (INIT "" "" "${multiValueArgs}" ${ARGN}) + + set (paths) + foreach (inc IN LISTS INIT_INCLUDE_DIRECTORIES) + list (APPEND paths ${inc}) + get_filename_component (dname ${inc} NAME) + if (dname MATCHES "include") + get_filename_component (prefx ${inc} PATH) + list (APPEND paths ${prefx}) + endif () + endforeach () + foreach (lib IN LISTS INIT_LIBRARIES) + get_filename_component (libdir ${lib} PATH) + list (APPEND paths ${libdir}) + get_filename_component (dname ${libdir} PATH) + if (dname MATCHES "lib") + get_filename_component (prefx ${libdir} PATH) + list (APPEND paths ${prefx}) + endif () + endforeach () + + set (${PATHLIST} ${paths} PARENT_SCOPE) + +endfunction () + + #______________________________________________________________________________ # - Basic find package macro for a specific component # From 4207106c68f5656cb8a6f399a082aea04b6cc4d2 Mon Sep 17 00:00:00 2001 From: Kevin Paul Date: Fri, 11 Sep 2015 11:13:03 -0600 Subject: [PATCH 02/21] Making compile options private --- src/flib/CMakeLists.txt | 4 ++-- src/gptl/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/flib/CMakeLists.txt b/src/flib/CMakeLists.txt index c8aed4e7f60..2520bc40e95 100644 --- a/src/flib/CMakeLists.txt +++ b/src/flib/CMakeLists.txt @@ -52,8 +52,8 @@ if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU") target_compile_options (piof PRIVATE -ffree-line-length-none) elseif (CMAKE_Fortran_COMPILER_ID MATCHES "NAG") - target_compile_options (piof - PUBLIC -mismatch_all) + target_compile_options (piof + PRIVATE -mismatch_all) endif() # Look for c_sizeof capability diff --git a/src/gptl/CMakeLists.txt b/src/gptl/CMakeLists.txt index 133e3627a93..f547d488a34 100644 --- a/src/gptl/CMakeLists.txt +++ b/src/gptl/CMakeLists.txt @@ -46,7 +46,7 @@ target_compile_definitions (gptl if (CMAKE_Fortran_COMPILER_ID MATCHES "NAG") target_compile_options (gptl - PUBLIC -mismatch_all) + PRIVATE -mismatch_all) endif () #============================================================================== From 985f6f25cf273d099ad97a94d12559a12386b35b Mon Sep 17 00:00:00 2001 From: Kevin Paul Date: Fri, 11 Sep 2015 11:14:04 -0600 Subject: [PATCH 03/21] Changing NAG checks to STREQUAL (instead of MATCHES) just to be sure --- src/flib/CMakeLists.txt | 2 +- src/gptl/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flib/CMakeLists.txt b/src/flib/CMakeLists.txt index 2520bc40e95..1eb36f32e04 100644 --- a/src/flib/CMakeLists.txt +++ b/src/flib/CMakeLists.txt @@ -51,7 +51,7 @@ target_compile_definitions (piof if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU") target_compile_options (piof PRIVATE -ffree-line-length-none) -elseif (CMAKE_Fortran_COMPILER_ID MATCHES "NAG") +elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") target_compile_options (piof PRIVATE -mismatch_all) endif() diff --git a/src/gptl/CMakeLists.txt b/src/gptl/CMakeLists.txt index f547d488a34..f7919beff6f 100644 --- a/src/gptl/CMakeLists.txt +++ b/src/gptl/CMakeLists.txt @@ -44,7 +44,7 @@ endif () target_compile_definitions (gptl PUBLIC ${CMAKE_Fortran_COMPILER_DIRECTIVE}) -if (CMAKE_Fortran_COMPILER_ID MATCHES "NAG") +if (CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") target_compile_options (gptl PRIVATE -mismatch_all) endif () From cf053f917387aac9b7ad63651a7b0814728a6a30 Mon Sep 17 00:00:00 2001 From: Kevin Paul Date: Fri, 11 Sep 2015 11:15:38 -0600 Subject: [PATCH 04/21] Removing check on PKGCOMP_FOUND --- cmake/LibFind.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/LibFind.cmake b/cmake/LibFind.cmake index 3960e8845d9..36753861cc2 100644 --- a/cmake/LibFind.cmake +++ b/cmake/LibFind.cmake @@ -191,8 +191,8 @@ function (find_package_component PKG) string (TOUPPER ${PKGCOMP} PKGCOMPUP) # Only continue if package not found already - if (NOT ${PKGCOMP}_FOUND) - +# if (NOT ${PKGCOMP}_FOUND) +# # Handle QUIET and REQUIRED arguments if (${${PKG}_FIND_QUIETLY}) set (${PKGCOMP}_FIND_QUIETLY TRUE) @@ -327,7 +327,7 @@ function (find_package_component PKG) set (${PKGCOMP}_IS_SHARED ${${PKGCOMP}_IS_SHARED} CACHE BOOL "Whether the ${PKGCOMP} library is dynamic" FORCE) - endif () +# endif () endfunction () From c4aaf218be2032fbb9bf044ba2dbab103564cf12 Mon Sep 17 00:00:00 2001 From: Kevin Paul Date: Fri, 11 Sep 2015 11:19:11 -0600 Subject: [PATCH 05/21] Reverting last change (uncommenting PKGCOMP_FOUND check) --- cmake/LibFind.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/LibFind.cmake b/cmake/LibFind.cmake index 36753861cc2..3960e8845d9 100644 --- a/cmake/LibFind.cmake +++ b/cmake/LibFind.cmake @@ -191,8 +191,8 @@ function (find_package_component PKG) string (TOUPPER ${PKGCOMP} PKGCOMPUP) # Only continue if package not found already -# if (NOT ${PKGCOMP}_FOUND) -# + if (NOT ${PKGCOMP}_FOUND) + # Handle QUIET and REQUIRED arguments if (${${PKG}_FIND_QUIETLY}) set (${PKGCOMP}_FIND_QUIETLY TRUE) @@ -327,7 +327,7 @@ function (find_package_component PKG) set (${PKGCOMP}_IS_SHARED ${${PKGCOMP}_IS_SHARED} CACHE BOOL "Whether the ${PKGCOMP} library is dynamic" FORCE) -# endif () + endif () endfunction () From 777bbba4883ce9aaf9af8d281f593996fe5f77f6 Mon Sep 17 00:00:00 2001 From: Kevin Paul Date: Fri, 11 Sep 2015 11:21:42 -0600 Subject: [PATCH 06/21] Setting return variables in parent scope (instead of caching) --- cmake/LibFind.cmake | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/cmake/LibFind.cmake b/cmake/LibFind.cmake index 3960e8845d9..06349e99d31 100644 --- a/cmake/LibFind.cmake +++ b/cmake/LibFind.cmake @@ -314,18 +314,26 @@ function (find_package_component PKG) endif () # Set cache variables - set (${PKGCOMP}_FOUND ${${PKGCOMP}_FOUND} - CACHE BOOL "Whether the ${PKGCOMP} package was found" FORCE) - set (${PKGCOMP}_INCLUDE_DIR ${${PKGCOMP}_INCLUDE_DIR} - CACHE PATH "Directory containing the ${PKGCOMP} include file" FORCE) - set (${PKGCOMP}_INCLUDE_DIRS ${${PKGCOMP}_INCLUDE_DIRS} - CACHE STRING "Include path for the ${PKGCOMP} package" FORCE) - set (${PKGCOMP}_LIBRARY ${${PKGCOMP}_LIBRARY} - CACHE FILEPATH "Location of the ${PKGCOMP} library file" FORCE) - set (${PKGCOMP}_LIBRARIES ${${PKGCOMP}_LIBRARIES} - CACHE STRING "Libraries for the ${PKGCOMP} package" FORCE) - set (${PKGCOMP}_IS_SHARED ${${PKGCOMP}_IS_SHARED} - CACHE BOOL "Whether the ${PKGCOMP} library is dynamic" FORCE) +# set (${PKGCOMP}_FOUND ${${PKGCOMP}_FOUND} +# CACHE BOOL "Whether the ${PKGCOMP} package was found" FORCE) +# set (${PKGCOMP}_INCLUDE_DIR ${${PKGCOMP}_INCLUDE_DIR} +# CACHE PATH "Directory containing the ${PKGCOMP} include file" FORCE) +# set (${PKGCOMP}_INCLUDE_DIRS ${${PKGCOMP}_INCLUDE_DIRS} +# CACHE STRING "Include path for the ${PKGCOMP} package" FORCE) +# set (${PKGCOMP}_LIBRARY ${${PKGCOMP}_LIBRARY} +# CACHE FILEPATH "Location of the ${PKGCOMP} library file" FORCE) +# set (${PKGCOMP}_LIBRARIES ${${PKGCOMP}_LIBRARIES} +# CACHE STRING "Libraries for the ${PKGCOMP} package" FORCE) +# set (${PKGCOMP}_IS_SHARED ${${PKGCOMP}_IS_SHARED} +# CACHE BOOL "Whether the ${PKGCOMP} library is dynamic" FORCE) + + # Set variables in parent scope + set (${PKGCOMP}_FOUND ${${PKGCOMP}_FOUND} PARENT_SCOPE) + set (${PKGCOMP}_INCLUDE_DIR ${${PKGCOMP}_INCLUDE_DIR} PARENT_SCOPE) + set (${PKGCOMP}_INCLUDE_DIRS ${${PKGCOMP}_INCLUDE_DIRS} PARENT_SCOPE) + set (${PKGCOMP}_LIBRARY ${${PKGCOMP}_LIBRARY} PARENT_SCOPE) + set (${PKGCOMP}_LIBRARIES ${${PKGCOMP}_LIBRARIES} PARENT_SCOPE) + set (${PKGCOMP}_IS_SHARED ${${PKGCOMP}_IS_SHARED} PARENT_SCOPE) endif () From e016b30c03cae9c16a7251833cbc068b1d8bf1ec Mon Sep 17 00:00:00 2001 From: Kevin Paul Date: Fri, 11 Sep 2015 11:33:56 -0600 Subject: [PATCH 07/21] Deleting commented-out code --- cmake/LibFind.cmake | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/cmake/LibFind.cmake b/cmake/LibFind.cmake index 06349e99d31..7da13e32596 100644 --- a/cmake/LibFind.cmake +++ b/cmake/LibFind.cmake @@ -312,20 +312,6 @@ function (find_package_component PKG) set (${PKGCOMP}_INCLUDE_DIRS ${${PKGCOMP}_INCLUDE_DIR}) set (${PKGCOMP}_LIBRARIES ${${PKGCOMP}_LIBRARY}) endif () - - # Set cache variables -# set (${PKGCOMP}_FOUND ${${PKGCOMP}_FOUND} -# CACHE BOOL "Whether the ${PKGCOMP} package was found" FORCE) -# set (${PKGCOMP}_INCLUDE_DIR ${${PKGCOMP}_INCLUDE_DIR} -# CACHE PATH "Directory containing the ${PKGCOMP} include file" FORCE) -# set (${PKGCOMP}_INCLUDE_DIRS ${${PKGCOMP}_INCLUDE_DIRS} -# CACHE STRING "Include path for the ${PKGCOMP} package" FORCE) -# set (${PKGCOMP}_LIBRARY ${${PKGCOMP}_LIBRARY} -# CACHE FILEPATH "Location of the ${PKGCOMP} library file" FORCE) -# set (${PKGCOMP}_LIBRARIES ${${PKGCOMP}_LIBRARIES} -# CACHE STRING "Libraries for the ${PKGCOMP} package" FORCE) -# set (${PKGCOMP}_IS_SHARED ${${PKGCOMP}_IS_SHARED} -# CACHE BOOL "Whether the ${PKGCOMP} library is dynamic" FORCE) # Set variables in parent scope set (${PKGCOMP}_FOUND ${${PKGCOMP}_FOUND} PARENT_SCOPE) From 719a44898e23d1999eefc582e95f843316324d64 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 11 Sep 2015 15:06:34 -0600 Subject: [PATCH 08/21] needed to build without timing --- src/flib/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/flib/CMakeLists.txt b/src/flib/CMakeLists.txt index 1eb36f32e04..36a6d0a01e2 100644 --- a/src/flib/CMakeLists.txt +++ b/src/flib/CMakeLists.txt @@ -180,13 +180,17 @@ if (MPIMOD_PATH) message (STATUS "MPI Fortran module verified and enabled.") else () message (STATUS "MPI Fortran module failed verification and therefore disabled.") - target_compile_definitions (gptl + if (PIO_ENABLE_TIMING) + target_compile_definitions (gptl PUBLIC NO_MPIMOD) + endif() endif () else () message (STATUS "MPI Fortran module not detected and therefore disabled.") - target_compile_definitions (gptl + if (PIO_ENABLE_TIMING) + target_compile_definitions (gptl PUBLIC NO_MPIMOD) + endif() endif () #===== GPTL ===== From 09c31321d977d13957847873a743bf9b9a1b4724 Mon Sep 17 00:00:00 2001 From: katetc Date: Fri, 11 Sep 2015 15:53:29 -0600 Subject: [PATCH 09/21] Added link to new github.io website and doxygen documentation to main page. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index e3a3889177b..c13a2c6d4d8 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ A high-level Parallel I/O Library for structured grid applications +## Website + +For complete documentation, see our website at [http://parallelio.github.io/ParallelIO/](http://parallelio.github.io/ParallelIO/). + ## Dependencies PIO can use NetCDF (version 4.3.3+) and/or PnetCDF (version 1.6.0+) for I/O. From 171aa703503308a94eac7015189a87388b9e3a7e Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 30 Sep 2015 15:20:45 -0600 Subject: [PATCH 10/21] add ctest scripts for hobart --- ctest/CTestEnvironment-cgd.cmake | 17 +++++++++++++++++ ctest/runcdash-cgd-nag.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 ctest/CTestEnvironment-cgd.cmake create mode 100755 ctest/runcdash-cgd-nag.sh diff --git a/ctest/CTestEnvironment-cgd.cmake b/ctest/CTestEnvironment-cgd.cmake new file mode 100644 index 00000000000..94e499bc12d --- /dev/null +++ b/ctest/CTestEnvironment-cgd.cmake @@ -0,0 +1,17 @@ +#============================================================================== +# +# This file sets the environment variables needed to configure and build +# on the NCAR CGD cluster Hobart +# +#============================================================================== + +# Assume all package locations (NetCDF, PnetCDF, HDF5, etc) are already +# set with existing environment variables: NETCDF, PNETCDF, HDF5, etc. + +# Define the extra CMake configure options +set (CTEST_CONFIGURE_OPTIONS "-DCMAKE_VERBOSE_MAKEFILE=TRUE -DPNETCDF_DIR=$PNETCDF_PATH -DNETCDF_DIR=$NETCDF_PATH") + +# If MPISERIAL environment variable is set, then enable MPISERIAL +if (DEFINED ENV{MPISERIAL}) + set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DPIO_USE_MPISERIAL=ON") +endif () diff --git a/ctest/runcdash-cgd-nag.sh b/ctest/runcdash-cgd-nag.sh new file mode 100755 index 00000000000..866da89473b --- /dev/null +++ b/ctest/runcdash-cgd-nag.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# Get/Generate the Dashboard Model +if [ $# -eq 0 ]; then + model=Experimental +else + model=$1 +fi + +module purge +module load compiler/nag/6.0 +module load tool/parallel-netcdf/1.6.1/nag/openmpi + +export CC=mpicc +export FC=mpif90 +export PIO_DASHBOARD_SITE="CGD" +export PIO_DASHBOARD_ROOT=/scratch/cluster/jedwards/dashboard +export PIO_COMPILER_ID=Nag-6.0-gcc-`gcc --version | head -n 1 | cut -d' ' -f3` + +if [ ! -d "$PIO_DASHBOARD_ROOT" ]; then + mkdir "$PIO_DASHBOARD_ROOT" +fi +cd "$PIO_DASHBOARD_ROOT" + +if [ ! -d src ]; then + git clone https://github.com/PARALLELIO/ParallelIO src +fi +cd src + +ctest -S CTestScript.cmake,${model} -VV From ddbbe336824619bdf92dfe46b220041043133852 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 30 Sep 2015 15:25:09 -0600 Subject: [PATCH 11/21] add hobart to supported test systems --- CTestScript.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CTestScript.cmake b/CTestScript.cmake index 1fff0b56f09..517d14b391b 100644 --- a/CTestScript.cmake +++ b/CTestScript.cmake @@ -59,6 +59,8 @@ elseif (HOSTNAME MATCHES "^edison" OR HOSTNAME MATCHES "^hopper" OR HOSTNAME MATCHES "^nid") set (HOSTNAME_ID "nersc") +elseif (HOSTNAME MATCHES "^hobart") + set (HOSTNAME_ID "cgd") else () set (HOSTNAME_ID "unknown") endif () From 27214fcd0a57f998fc5564f7e5756f8cc1746fd7 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 30 Sep 2015 15:30:07 -0600 Subject: [PATCH 12/21] update to use $ENV --- ctest/CTestEnvironment-cgd.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctest/CTestEnvironment-cgd.cmake b/ctest/CTestEnvironment-cgd.cmake index 94e499bc12d..203e543686c 100644 --- a/ctest/CTestEnvironment-cgd.cmake +++ b/ctest/CTestEnvironment-cgd.cmake @@ -9,7 +9,7 @@ # set with existing environment variables: NETCDF, PNETCDF, HDF5, etc. # Define the extra CMake configure options -set (CTEST_CONFIGURE_OPTIONS "-DCMAKE_VERBOSE_MAKEFILE=TRUE -DPNETCDF_DIR=$PNETCDF_PATH -DNETCDF_DIR=$NETCDF_PATH") +set (CTEST_CONFIGURE_OPTIONS "-DCMAKE_VERBOSE_MAKEFILE=TRUE -DPNETCDF_DIR=$ENV{PNETCDF_PATH} -DNETCDF_DIR=$ENV{NETCDF_PATH}") # If MPISERIAL environment variable is set, then enable MPISERIAL if (DEFINED ENV{MPISERIAL}) From 6a6331193f8c1404def5b2bddce2fa73b0a606af Mon Sep 17 00:00:00 2001 From: katetc Date: Fri, 2 Oct 2015 11:10:12 -0600 Subject: [PATCH 13/21] Added a better handler for NAG compiler -mismatch_all The NAG compiler needs the flag -mismatch_all in order to compile PIO. Previously, we used target_compile_options, but that does not seem to actually work. I changed it to use CMAKE_Fortran_FLAGS instead, and had to update every CMakeLists.txt file in a directory with fortran code. Test suite: Build on Hobart with Nag - worked Test baseline: Test namelist changes: Test status: [bit for bit, roundoff, climate changing] Fixes: [CIME Github issue #] Code review: --- src/flib/CMakeLists.txt | 5 +++-- src/gptl/CMakeLists.txt | 5 +++-- tests/general/CMakeLists.txt | 6 ++++++ tests/performance/CMakeLists.txt | 6 ++++++ tests/unit/CMakeLists.txt | 7 +++++++ 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/flib/CMakeLists.txt b/src/flib/CMakeLists.txt index 36a6d0a01e2..5163b7d2098 100644 --- a/src/flib/CMakeLists.txt +++ b/src/flib/CMakeLists.txt @@ -52,8 +52,9 @@ if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU") target_compile_options (piof PRIVATE -ffree-line-length-none) elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") - target_compile_options (piof - PRIVATE -mismatch_all) + set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mismatch_all" ) +# target_compile_options (piof +# PRIVATE -mismatch_all) endif() # Look for c_sizeof capability diff --git a/src/gptl/CMakeLists.txt b/src/gptl/CMakeLists.txt index f7919beff6f..320faf6c679 100644 --- a/src/gptl/CMakeLists.txt +++ b/src/gptl/CMakeLists.txt @@ -45,8 +45,9 @@ target_compile_definitions (gptl PUBLIC ${CMAKE_Fortran_COMPILER_DIRECTIVE}) if (CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") - target_compile_options (gptl - PRIVATE -mismatch_all) + set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mismatch_all" ) +# target_compile_options (gptl +# PRIVATE -mismatch_all) endif () #============================================================================== diff --git a/tests/general/CMakeLists.txt b/tests/general/CMakeLists.txt index 5731fd491bb..69bb85d2901 100644 --- a/tests/general/CMakeLists.txt +++ b/tests/general/CMakeLists.txt @@ -28,6 +28,12 @@ if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU") add_definitions(-ffree-line-length-none) endif() +if (CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") + set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mismatch_all" ) +# target_compile_options (gptl +# PRIVATE -mismatch_all) +endif () + #============================================================================== # DEFINE THE TARGETS AND TESTS #============================================================================== diff --git a/tests/performance/CMakeLists.txt b/tests/performance/CMakeLists.txt index 960fc456cf7..ea9efbf0a51 100644 --- a/tests/performance/CMakeLists.txt +++ b/tests/performance/CMakeLists.txt @@ -12,6 +12,12 @@ if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU") PRIVATE -ffree-line-length-none) endif() +if (CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") + set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mismatch_all" ) +# target_compile_options (gptl +# PRIVATE -mismatch_all) +endif () + if (PIO_HDF5_LOGGING) target_compile_definitions (pioperf PUBLIC LOGGING) diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 89e5fd1da62..116b5807fba 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -25,6 +25,13 @@ if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU") target_compile_options (pio_unit_test PRIVATE -ffree-line-length-none) endif() + +if (CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") + set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mismatch_all" ) +# target_compile_options (gptl +# PRIVATE -mismatch_all) +endif () + add_dependencies (tests pio_unit_test) # Test Timeout (4 min = 240 sec) From 855ff8fc161be3ab00e9928653a8f74564ade048 Mon Sep 17 00:00:00 2001 From: katetc Date: Fri, 2 Oct 2015 11:21:48 -0600 Subject: [PATCH 14/21] Trying to add an iframe to embed the nightly test results on the GitHub page. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index c13a2c6d4d8..e50a54b27c7 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,11 @@ A high-level Parallel I/O Library for structured grid applications For complete documentation, see our website at [http://parallelio.github.io/ParallelIO/](http://parallelio.github.io/ParallelIO/). +## Nightly Test Status + + + ## Dependencies PIO can use NetCDF (version 4.3.3+) and/or PnetCDF (version 1.6.0+) for I/O. From 69ac68d524f483253235a7cc4e6de5084dad2a1b Mon Sep 17 00:00:00 2001 From: katetc Date: Fri, 2 Oct 2015 11:30:39 -0600 Subject: [PATCH 15/21] Trying again to add an iframe to embed the nightly test results on the GitHub page. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e50a54b27c7..50be756677a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ For complete documentation, see our website at [http://parallelio.github.io/Para ## Nightly Test Status - ## Dependencies From a8cc82900a0d95c52754ebea2742557969bbf6f7 Mon Sep 17 00:00:00 2001 From: katetc Date: Fri, 2 Oct 2015 11:38:49 -0600 Subject: [PATCH 16/21] iframe is really, truely no longer ALLOWED by github. Will have to find a different way? --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 50be756677a..c13a2c6d4d8 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,6 @@ A high-level Parallel I/O Library for structured grid applications For complete documentation, see our website at [http://parallelio.github.io/ParallelIO/](http://parallelio.github.io/ParallelIO/). -## Nightly Test Status - - - ## Dependencies PIO can use NetCDF (version 4.3.3+) and/or PnetCDF (version 1.6.0+) for I/O. From 7e59004c9362892773e9e1a4ccd77199c68b7cd3 Mon Sep 17 00:00:00 2001 From: Katetc Date: Mon, 5 Oct 2015 16:28:54 -0600 Subject: [PATCH 17/21] Added build instructions for Intel compiler on Blue Waters. --- doc/source/mach_walkthrough.txt | 47 +++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/doc/source/mach_walkthrough.txt b/doc/source/mach_walkthrough.txt index be53d6c3648..5983b28a437 100644 --- a/doc/source/mach_walkthrough.txt +++ b/doc/source/mach_walkthrough.txt @@ -191,7 +191,50 @@ Building PIO requires running the CMake configure and then make. In the PIO_buil ### Blue Waters ### -Instructions to come. +
    +
  1. Directory setup + +Download a copy of the PIO source into a sub-directory of your working directory (refered to here as the PIO_source directory). Create another sub-directory for the build (refered to here as the PIO_build directory) and 'cd' into it. + +
  2. Modules + +Modules required for installation depend on your prefered compiler. Issue the commands below to set the module environment for building PIO on Hobart. + ++ Intel + + %> module swap PrgEnv-cray PrgEnv-intel + %> module load torque + %> module load git + %> module load cmake + %> module load cray-hdf5-parallel/1.8.13 + %> module load cray-netcdf-hdf5parallel/4.3.2 + %> module load cray-parallel-netcdf/1.6.0 + +
  3. Environment Variables + +The appropriate compiler wrappers must be chosen for cmake, so the environment variables CC and FC must be set as:
    + CC=cc
    + FC=ftn
    + +
  4. Build + +Building PIO requires running the CMake configure and then make. In the PIO_build directory type
    + %> cmake -DCMAKE_VERBOSE_MAKEFILE=TRUE \\
    + -DPREFER_STATIC=TRUE \\
    + -DNetCDF_PATH=${NETCDF_DIR} \\
    + -DPnetCDF_PATH=${PARALLEL_NETCDF_DIR} \\
    + -DHDF5_PATH=${HDF5_DIR} \\
    + -DMPI_C_INCLUDE_PATH=${MPICH_DIR}/include \\
    + -DMPI_Fortran_INCLUDE_PATH=${MPICH_DIR}/include \\
    + -DMPI_C_LIBRARIES=${MPICH_DIR}/lib/libmpich.a \\
    + -DMPI_Fortran_LIBRARIES=${MPICH_DIR}/lib/libmpichf90.a \\
    + -DCMAKE_SYSTEM_NAME=Catamount \\
    + ../PIO_source/
    + %> make + +
+ + ### Hobart ### @@ -240,5 +283,5 @@ ParallelIO does not require Parallel netcdf to run, so if you decide to use the -_Last updated: 09-11-2015_ +_Last updated: 10-05-2015_ */ From 20ebb2395d66b6a789494653b10360cddbee313e Mon Sep 17 00:00:00 2001 From: Kate Thayer-Calder Date: Wed, 7 Oct 2015 13:14:46 -0600 Subject: [PATCH 18/21] Added a link to the cdash site for nightly tests --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index c13a2c6d4d8..67a393adb0a 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,11 @@ A high-level Parallel I/O Library for structured grid applications For complete documentation, see our website at [http://parallelio.github.io/ParallelIO/](http://parallelio.github.io/ParallelIO/). +## Nightly Tests + +The results of our nightly tests on multiple platforms can be found on our +cdash site at [http://my.cdash.org/index.php?project=PIO](http://my.cdash.org/index.php?project=PIO). + ## Dependencies PIO can use NetCDF (version 4.3.3+) and/or PnetCDF (version 1.6.0+) for I/O. From 207d705f93a091e512f45482a8185febb6e18eff Mon Sep 17 00:00:00 2001 From: katetc Date: Thu, 8 Oct 2015 11:56:01 -0500 Subject: [PATCH 19/21] Changes to cmake and ctest to run tests on Blue Waters. Updates to machine walkthrough documentation for Blue Waters (updated netcdf modules required to run ctest). --- CTestScript.cmake | 11 ++++++++- cmake/LibMPI.cmake | 5 ++++ cmake/mpiexec.ncsa | 12 ++++++++++ ctest/CTestEnvironment-ncsa.cmake | 22 +++++++++++++++++ ctest/runctest-ncsa.sh | 39 +++++++++++++++++++++++++++++++ doc/source/mach_walkthrough.txt | 4 ++-- 6 files changed, 90 insertions(+), 3 deletions(-) create mode 100755 cmake/mpiexec.ncsa create mode 100644 ctest/CTestEnvironment-ncsa.cmake create mode 100755 ctest/runctest-ncsa.sh diff --git a/CTestScript.cmake b/CTestScript.cmake index 517d14b391b..03f21edc272 100644 --- a/CTestScript.cmake +++ b/CTestScript.cmake @@ -59,10 +59,18 @@ elseif (HOSTNAME MATCHES "^edison" OR HOSTNAME MATCHES "^hopper" OR HOSTNAME MATCHES "^nid") set (HOSTNAME_ID "nersc") +# Blue Waters at NCSA +elseif (HOSTNAME MATCHES "^h2ologin" ) + set (HOSTNAME_ID "ncsa") +# CGD local linux cluster elseif (HOSTNAME MATCHES "^hobart") set (HOSTNAME_ID "cgd") else () - set (HOSTNAME_ID "unknown") + if (CMAKE_SYSTEM_NAME MATCHES "Catamount") + set (HOSTNAME_ID "ncsa") + else () + set (HOSTNAME_ID "unknown") + endif () endif () ## -- Get system info @@ -124,6 +132,7 @@ set (ENV{PIO_DASHBOARD_BINARY_DIR} ${CTEST_BINARY_DIRECTORY}) ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) ## -- Start +message (" -- Hostname_id = ${HOSTNAME_ID}") message (" -- Start dashboard - ${CTEST_BUILD_NAME} --") ctest_start("${CTEST_SCRIPT_ARG}") diff --git a/cmake/LibMPI.cmake b/cmake/LibMPI.cmake index 607f38b9f5a..401c8ae228c 100644 --- a/cmake/LibMPI.cmake +++ b/cmake/LibMPI.cmake @@ -35,6 +35,11 @@ function (platform_name RETURN_VARIABLE) SITENAME MATCHES "^hopper") set (${RETURN_VARIABLE} "nersc" PARENT_SCOPE) + + # NCSA Machine (Blue Waters) + elseif (SITENAME MATCHES "^h2ologin") + + set (${RETURN_VARIABLE} "ncsa" PARENT_SCOPE) else () diff --git a/cmake/mpiexec.ncsa b/cmake/mpiexec.ncsa new file mode 100755 index 00000000000..2bb0d1c8468 --- /dev/null +++ b/cmake/mpiexec.ncsa @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Arguments: +# +# $1 - Number of MPI Tasks +# $2+ - Executable and its arguments +# + +NP=$1 +shift + +aprun -n $NP $@ diff --git a/ctest/CTestEnvironment-ncsa.cmake b/ctest/CTestEnvironment-ncsa.cmake new file mode 100644 index 00000000000..706946ec2bc --- /dev/null +++ b/ctest/CTestEnvironment-ncsa.cmake @@ -0,0 +1,22 @@ +#============================================================================== +# +# This file sets the environment variables needed to configure and build +# on the NCSA systems +# (Blue Waters). +# +#============================================================================== + +# Assume all package locations (NetCDF, PnetCDF, HDF5, etc) are already +# set with existing environment variables: NETCDF, PNETCDF, HDF5, etc. + +# Define the extra CMake configure options +set (CTEST_CONFIGURE_OPTIONS "-DCMAKE_VERBOSE_MAKEFILE=TRUE") +set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DPREFER_STATIC=TRUE") +set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DNetCDF_PATH=$ENV{NETCDF_DIR}") +set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DPnetCDF_PATH=$ENV{PARALLEL_NETCDF_DIR}") +set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DHDF5_PATH=$ENV{HDF5_DIR}") +set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DMPI_C_INCLUDE_PATH=$ENV{MPICH_DIR}/include") +set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DMPI_Fortran_INCLUDE_PATH=$ENV{MPICH_DIR}/include") +set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DMPI_C_LIBRARIES=$ENV{MPICH_DIR}/lib/libmpich.a") +set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DMPI_Fortran_LIBRARIES=$ENV{MPICH_DIR}/lib/libmpichf90.a") +set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DCMAKE_SYSTEM_NAME=Catamount") diff --git a/ctest/runctest-ncsa.sh b/ctest/runctest-ncsa.sh new file mode 100755 index 00000000000..c3cd75e3001 --- /dev/null +++ b/ctest/runctest-ncsa.sh @@ -0,0 +1,39 @@ +#!/bin/sh +#============================================================================== +# +# This script defines how to run CTest on the National Center for +# Supercomputing Applications system (blue waters). +# +# This assumes the CTest model name (e.g., "Nightly") is passed to it when +# run. +# +#============================================================================== + +# Get the CTest script directory +scrdir=$1 + +# Get the CTest model name +model=$2 + +# Write QSUB submission script with the test execution command +echo "#!/bin/sh" > runctest.pbs +echo "#PBS -q debug" >> runctest.pbs +echo "#PBS -l mppwidth=24" >> runctest.pbs +echo "#PBS -l walltime=00:20:00" >> runctest.pbs +echo "#PBS -v PIO_DASHBOARD_SITE,PIO_DASHBOARD_BUILD_NAME,PIO_DASHBOARD_SOURCE_DIR,PIO_DASHBOARD_BINARY_DIR" >> runctest.pbs +echo "cd \$PBS_O_WORKDIR" >> runctest.pbs +echo "CTEST_CMD=`which ctest`" >> runctest.pbs +echo "\$CTEST_CMD -S ${scrdir}/CTestScript-Test.cmake,${model} -V" >> runctest.pbs + +# Submit the job to the queue +jobid=`qsub runctest.pbs` + +# Wait for the job to complete before exiting +while true; do + status=`qstat $jobid` + if [ "$status" == "" ]; then + break + else + sleep 10 + fi +done diff --git a/doc/source/mach_walkthrough.txt b/doc/source/mach_walkthrough.txt index 5983b28a437..e36b9ccd84b 100644 --- a/doc/source/mach_walkthrough.txt +++ b/doc/source/mach_walkthrough.txt @@ -206,8 +206,8 @@ Modules required for installation depend on your prefered compiler. Issue the co %> module load torque %> module load git %> module load cmake - %> module load cray-hdf5-parallel/1.8.13 - %> module load cray-netcdf-hdf5parallel/4.3.2 + %> module load cray-hdf5-parallel/1.8.14 + %> module load cray-netcdf-hdf5parallel/4.3.3.1 %> module load cray-parallel-netcdf/1.6.0
  • Environment Variables From 7f13253fe24bdd179a36c76a794dede3b543c5f0 Mon Sep 17 00:00:00 2001 From: katetc Date: Thu, 8 Oct 2015 14:55:37 -0600 Subject: [PATCH 20/21] Added a runctest file for Hobart. Hopefully this helps the nightly tests run through... though needs testing. --- ctest/runcdash-cgd-nag.sh | 1 + ctest/runctest-cgd.sh | 43 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100755 ctest/runctest-cgd.sh diff --git a/ctest/runcdash-cgd-nag.sh b/ctest/runcdash-cgd-nag.sh index 866da89473b..86a9393d919 100755 --- a/ctest/runcdash-cgd-nag.sh +++ b/ctest/runcdash-cgd-nag.sh @@ -25,6 +25,7 @@ cd "$PIO_DASHBOARD_ROOT" if [ ! -d src ]; then git clone https://github.com/PARALLELIO/ParallelIO src fi + cd src ctest -S CTestScript.cmake,${model} -VV diff --git a/ctest/runctest-cgd.sh b/ctest/runctest-cgd.sh new file mode 100755 index 00000000000..3efbf23978b --- /dev/null +++ b/ctest/runctest-cgd.sh @@ -0,0 +1,43 @@ +#!/bin/sh +set -x +#============================================================================== +# +# This script defines how to run CTest on the Argonne Leadership Computing +# Facility systems (mira/cetus/vesta/cooley). +# +# This assumes the CTest model name (e.g., "Nightly") is passed to it when +# run. +# +#============================================================================== + +# Get the CTest script directory +scrdir=$1 + +# Get the CTest model name +model=$2 + +# Write QSUB submission script with the test execution command +echo "#!/bin/sh" > runctest.sh +echo "CTESTCMD=`which ctest`" >> runctest.sh +echo "\$CTESTCMD -S ${scrdir}/CTestScript-Test.cmake,${model} -V" >> runctest.sh + +# Make the QSUB script executable +chmod +x runctest.sh + +# Submit the job to the queue +jobid=`qsub -l nodes=1:ppn=4 \ + --env PIO_DASHBOARD_SITE=$PIO_DASHBOARD_SITE \ + --env PIO_DASHBOARD_BUILD_NAME=$PIO_DASHBOARD_BUILD_NAME \ + --env PIO_DASHBOARD_SOURCE_DIR=$PIO_DASHBOARD_SOURCE_DIR \ + --env PIO_DASHBOARD_BINARY_DIR=$PIO_DASHBOARD_BINARY_DIR \ + runctest.sh` + +# Wait for the job to complete before exiting +while true; do + status=`qstat $jobid` + if [ "$status" == "" ]; then + break + else + sleep 10 + fi +done From 58c62113bbcf6f152dc03cf8020bf3efc1758189 Mon Sep 17 00:00:00 2001 From: katetc Date: Thu, 8 Oct 2015 15:15:49 -0600 Subject: [PATCH 21/21] Removed -x from the script. --- ctest/runctest-cgd.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ctest/runctest-cgd.sh b/ctest/runctest-cgd.sh index 3efbf23978b..d662485004e 100755 --- a/ctest/runctest-cgd.sh +++ b/ctest/runctest-cgd.sh @@ -1,5 +1,4 @@ #!/bin/sh -set -x #============================================================================== # # This script defines how to run CTest on the Argonne Leadership Computing