Skip to content

Commit

Permalink
Merge pull request #4 from PARALLELIO/master
Browse files Browse the repository at this point in the history
Merge up to the head of the master
  • Loading branch information
Katetc committed Oct 12, 2015
2 parents 9365829 + 58c6211 commit 14364ed
Show file tree
Hide file tree
Showing 22 changed files with 384 additions and 108 deletions.
13 changes: 12 additions & 1 deletion CTestScript.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +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
Expand Down Expand Up @@ -122,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}")

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

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/).

## 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.
Expand Down
39 changes: 18 additions & 21 deletions cmake/FindGPTL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

Expand Down
37 changes: 17 additions & 20 deletions cmake/FindHDF5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 9 additions & 11 deletions cmake/FindLIBZ.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
18 changes: 8 additions & 10 deletions cmake/FindNetCDF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 8 additions & 10 deletions cmake/FindPnetCDF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 9 additions & 11 deletions cmake/FindSZIP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
62 changes: 48 additions & 14 deletions cmake/LibFind.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down Expand Up @@ -272,20 +312,14 @@ 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)
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 ()

Expand Down
5 changes: 5 additions & 0 deletions cmake/LibMPI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

Expand Down
12 changes: 12 additions & 0 deletions cmake/mpiexec.ncsa
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
#
# Arguments:
#
# $1 - Number of MPI Tasks
# $2+ - Executable and its arguments
#

NP=$1
shift

aprun -n $NP $@
17 changes: 17 additions & 0 deletions ctest/CTestEnvironment-cgd.cmake
Original file line number Diff line number Diff line change
@@ -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=$ENV{PNETCDF_PATH} -DNETCDF_DIR=$ENV{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 ()
22 changes: 22 additions & 0 deletions ctest/CTestEnvironment-ncsa.cmake
Original file line number Diff line number Diff line change
@@ -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")
Loading

0 comments on commit 14364ed

Please sign in to comment.