Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pio2 external update #1447

Merged
merged 2 commits into from
May 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 40 additions & 23 deletions src/externals/pio2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,6 @@ else()
set(USE_MPI_SERIAL 0)
endif()

#===== Library Variables =====
set (PIO_FILESYSTEM_HINTS IGNORE CACHE STRING "Filesystem hints (lustre or gpfs)")

#===== Testing Options =====
option (PIO_ENABLE_TESTS "Enable the testing builds" ON)
option (PIO_VALGRIND_CHECK "Enable memory leak check using valgrind" OFF)

#==============================================================================
# BACKWARDS COMPATIBILITY
#==============================================================================

# Old NETCDF_DIR variable --> NetCDF_PATH
if (DEFINED NETCDF_DIR)
set (NetCDF_PATH ${NETCDF_DIR}
CACHE STRING "Location of the NetCDF library installation")
endif ()

# Old PNETCDF_DIR variable --> PnetCDF_PATH
if (DEFINED PNETCDF_DIR)
set (PnetCDF_PATH ${PNETCDF_DIR}
CACHE STRING "Location of the PnetCDF library installation")
endif ()

#==============================================================================
# PREPEND TO CMAKE MODULE PATH
#==============================================================================
Expand Down Expand Up @@ -97,6 +74,46 @@ set (USER_CMAKE_MODULE_PATH ${USER_CMAKE_MODULE_PATH}
CACHE STRING "Location of the CMake_Fortran_utils")
list (APPEND CMAKE_MODULE_PATH ${USER_CMAKE_MODULE_PATH})

INCLUDE (CheckTypeSize)

#===== MPI =====
if (PIO_USE_MPISERIAL)
find_package (MPISERIAL COMPONENTS C REQUIRED)
if (MPISERIAL_C_FOUND)
set (CMAKE_REQUIRED_INCLUDES ${MPISERIAL_C_INCLUDE_DIRS})
endif ()
else ()
find_package (MPI REQUIRED)
set (CMAKE_REQUIRED_INCLUDES ${MPI_INCLUDE_PATH})
endif ()

SET(CMAKE_EXTRA_INCLUDE_FILES "mpi.h")
check_type_size("MPI_Offset" SIZEOF_MPI_OFFSET)
SET(CMAKE_EXTRA_INCLUDE_FILES)

#===== Library Variables =====
set (PIO_FILESYSTEM_HINTS IGNORE CACHE STRING "Filesystem hints (lustre or gpfs)")

#===== Testing Options =====
option (PIO_ENABLE_TESTS "Enable the testing builds" ON)
option (PIO_VALGRIND_CHECK "Enable memory leak check using valgrind" OFF)

#==============================================================================
# BACKWARDS COMPATIBILITY
#==============================================================================

# Old NETCDF_DIR variable --> NetCDF_PATH
if (DEFINED NETCDF_DIR)
set (NetCDF_PATH ${NETCDF_DIR}
CACHE STRING "Location of the NetCDF library installation")
endif ()

# Old PNETCDF_DIR variable --> PnetCDF_PATH
if (DEFINED PNETCDF_DIR)
set (PnetCDF_PATH ${PNETCDF_DIR}
CACHE STRING "Location of the PnetCDF library installation")
endif ()

#==============================================================================
# HELPFUL GLOBAL VARIABLES
#==============================================================================
Expand Down
25 changes: 13 additions & 12 deletions src/externals/pio2/CTestScript.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else ()
set (CTEST_DASHBOARD_ROOT "$ENV{HOME}/pio-dashboard")
endif ()

## -- Compiler ID
## -- Compiler ID
if (DEFINED ENV{PIO_COMPILER_ID})
set (compid "$ENV{PIO_COMPILER_ID}")
else ()
Expand Down Expand Up @@ -49,7 +49,8 @@ if (HOSTNAME MATCHES "^yslogin" OR
HOSTNAME MATCHES "^pronghorn")
set (HOSTNAME_ID "nwsc")
# New UCAR/NWSC SGI Machines
elseif (HOSTNAME MATCHES "^laramie")
elseif (HOSTNAME MATCHES "^laramie" OR
HOSTNAME MATCHES "^chadmin")
set (HOSTNAME_ID "nwscla")
# ALCF/Argonne Machines
elseif (HOSTNAME MATCHES "^mira" OR
Expand Down Expand Up @@ -109,9 +110,9 @@ find_program (CTEST_GIT_COMMAND NAMES git)
## -- make command
find_program (MAKE NAMES make)

#-----------------------------------------------------------
#-----------------------------------------------------------
#-- Generate build-specific information
#-----------------------------------------------------------
#-----------------------------------------------------------

## -- CTest Site Name

Expand All @@ -124,25 +125,25 @@ set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}-${compid}")
## -- SRC Dir (where this script exists)
set (CTEST_SOURCE_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}")

## -- BIN Dir
## -- BIN Dir
set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/build-${CTEST_BUILD_NAME}-${CTEST_BUILD_GROUP}")

## -- Add the CTest script directory to the module path
set (CTEST_EXTRA_SCRIPT_PATH "${CTEST_SOURCE_DIRECTORY}/ctest")
list (APPEND CMAKE_MODULE_PATH ${CTEST_EXTRA_SCRIPT_PATH})

# -----------------------------------------------------------
# -----------------------------------------------------------
# -- Store Build-Specific Info (environment variables)
# -----------------------------------------------------------
# -----------------------------------------------------------

set (ENV{PIO_DASHBOARD_SITE} ${CTEST_SITE})
set (ENV{PIO_DASHBOARD_BUILD_NAME} ${CTEST_BUILD_NAME})
set (ENV{PIO_DASHBOARD_SOURCE_DIR} ${CTEST_SOURCE_DIRECTORY})
set (ENV{PIO_DASHBOARD_BINARY_DIR} ${CTEST_BINARY_DIRECTORY})

# -----------------------------------------------------------
# -----------------------------------------------------------
# -- Run CTest
# -----------------------------------------------------------
# -----------------------------------------------------------

## -- Empty the binary directory
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
Expand All @@ -157,7 +158,7 @@ message (" -- Update source - ${CTEST_BUILD_NAME} --")
set (CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
ctest_update ()

## -- Configure
## -- Configure
message (" -- Configure build - ${CTEST_BUILD_NAME} --")
include (CTestEnvironment-${HOSTNAME_ID})
set (CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND} ${CTEST_CONFIGURE_OPTIONS} ${CTEST_SOURCE_DIRECTORY}")
Expand All @@ -179,9 +180,9 @@ message (" -- Submit to dashboard - ${CTEST_BUILD_NAME} --")
message ("** -- PIO_DASHBOARD_SITE=$ENV{PIO_DASHBOARD_SITE}")
ctest_submit ()

# -----------------------------------------------------------
# -----------------------------------------------------------
# -- Clear environment
# -----------------------------------------------------------
# -----------------------------------------------------------

unset (ENV{PIO_DASHBOARD_SITE})
unset (ENV{PIO_DASHBOARD_BUILD_NAME})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ endif ()
if (DEFINED ENV{VALGRIND_CHECK})
set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DPIO_VALGRIND_CHECK=ON")
endif ()

# If USE_MALLOC environment variable is set, then use native malloc (instead of bget package)
if (DEFINED ENV{USE_MALLOC})
set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DPIO_USE_MALLOC=ON")
endif ()
2 changes: 1 addition & 1 deletion src/externals/pio2/ctest/CTestEnvironment-nwsc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ set (CTEST_CONFIGURE_OPTIONS "-DCMAKE_VERBOSE_MAKEFILE=TRUE -DPIO_ENABLE_DOC=OFF

# If MPISERIAL environment variable is set, then enable MPISERIAL
if (DEFINED ENV{MPISERIAL})
set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DPIO_USE_MPISERIAL=ON")
set (CTEST_CONFIGURE_OPTIONS "${CTEST_CONFIGURE_OPTIONS} -DPIO_USE_MPISERIAL=ON -DPIO_ENABLE_EXAMPLES=OFF ")
endif ()
38 changes: 38 additions & 0 deletions src/externals/pio2/ctest/runcdash-cgd-gnu-openmpi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh

# Get/Generate the Dashboard Model
if [ $# -eq 0 ]; then
model=Experimental
else
model=$1
fi

module purge
module load compiler/gnu/5.4.0
module load tool/parallel-netcdf/1.8.1/gnu-5.4.0/openmpi

export CC=mpicc
export FC=mpif90
export PIO_DASHBOARD_SITE="cgd"
export PIO_DASHBOARD_ROOT=/scratch/cluster/jedwards/dashboard
export CTEST_SCRIPT_DIRECTORY=${PIO_DASHBOARD_ROOT}/src
export PIO_DASHBOARD_SOURCE_DIR=${CTEST_SCRIPT_DIRECTORY}
export PIO_COMPILER_ID=gcc-`gcc --version | head -n 1 | cut -d' ' -f3`

if [ ! -d "$PIO_DASHBOARD_ROOT" ]; then
mkdir "$PIO_DASHBOARD_ROOT"
fi
cd "$PIO_DASHBOARD_ROOT"

echo "CTEST_SCRIPT_DIRECTORY="${CTEST_SCRIPT_DIRECTORY}
echo "PIO_DASHBOARD_SOURCE_DIR="${PIO_DASHBOARD_SOURCE_DIR}

if [ ! -d src ]; then
git clone --branch develop https://github.com/PARALLELIO/ParallelIO src
fi
cd src
git checkout develop
git pull origin develop


ctest -S CTestScript.cmake,${model} -VV
2 changes: 1 addition & 1 deletion src/externals/pio2/ctest/runcdash-cgd-nag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module load tool/parallel-netcdf/1.7.0/nag/mvapich2
export CC=mpicc
export FC=mpif90
export PIO_DASHBOARD_SITE="cgd"
export PIO_DASHBOARD_ROOT=/scratch/cluster/katec/dashboard
export PIO_DASHBOARD_ROOT=/scratch/cluster/jedwards/dashboard
export CTEST_SCRIPT_DIRECTORY=${PIO_DASHBOARD_ROOT}/src
export PIO_DASHBOARD_SOURCE_DIR=${CTEST_SCRIPT_DIRECTORY}
export PIO_COMPILER_ID=Nag-6.1-gcc-`gcc --version | head -n 1 | cut -d' ' -f3`
Expand Down
2 changes: 1 addition & 1 deletion src/externals/pio2/ctest/runcdash-nwsc-intel-mpiserial.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module load git/2.3.0
module load cmake/3.0.2
module load netcdf/4.3.3.1

export MPISERIAL=/glade/p/work/katec/installs/intel_15.0.3
export MPISERIAL=/glade/u/home/jedwards/mpi-serial/intel15.0.3/

export CC=icc
export FC=ifort
Expand Down
10 changes: 5 additions & 5 deletions src/externals/pio2/ctest/runcdash-nwscla-intel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ source /etc/profile.d/modules.sh

module reset
module unload netcdf
module swap intel intel/16.0.3
module load git/2.10.0
module load cmake/3.6.2
module load netcdf-mpi/4.4.1
module swap intel intel/17.0.1
module load cmake/3.7.2
module load netcdf-mpi/4.4.1.1
module load pnetcdf/1.8.0
module switch mpt mpt/2.15
echo "MODULE LIST..."
module list

export CC=mpicc
export FC=mpif90

export PIO_DASHBOARD_ROOT=`pwd`/dashboard
export PIO_DASHBOARD_ROOT=/glade/scratch/jedwards/dashboard
export PIO_COMPILER_ID=Intel-`$CC --version | head -n 1 | cut -d' ' -f3`

if [ ! -d "$PIO_DASHBOARD_ROOT" ]; then
Expand Down
2 changes: 1 addition & 1 deletion src/externals/pio2/ctest/runctest-cgd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ echo "\$CTESTCMD -S ${scrdir}/CTestScript-Test.cmake,${model} -V" >> runctest.sh
chmod +x runctest.sh

# Submit the job to the queue
jobid=`/usr/local/bin/qsub -l nodes=1:ppn=4 runctest.sh -q short`
jobid=`/usr/local/bin/qsub -l nodes=1:ppn=8 runctest.sh -q short`

# Wait for the job to complete before exiting
while true; do
Expand Down
19 changes: 9 additions & 10 deletions src/externals/pio2/ctest/runctest-nwscla.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh
#==============================================================================
#
# This script defines how to run CTest on the NCAR Wyoming Supercomputing
# Center systems (yellowstone/caldera/geyser).
# This script defines how to run CTest on the NCAR Wyoming Supercomputing
# Center systems (cheyenne/laramie).
#
# This assumes the CTest model name (e.g., "Nightly") is passed to it when
# run.
Expand All @@ -19,7 +19,8 @@ model=$2
echo "#!/bin/sh" > runctest.sh
echo "#PBS -l walltime=01:00:00" >> runctest.sh
echo "#PBS -l select=1:ncpus=8:mpiprocs=8" >> runctest.sh
echo "#PBS -A SCSG0002" >> runctest.sh
echo "#PBS -A P93300606" >> runctest.sh
echo "#PBS -q regular" >> runctest.sh
echo "export PIO_DASHBOARD_SITE=nwscla-${HOSTNAME}" >> runctest.sh
echo "CTESTCMD=`which ctest`" >> runctest.sh
echo "\$CTESTCMD -S ${scrdir}/CTestScript-Test.cmake,${model} -V" >> runctest.sh
Expand All @@ -28,18 +29,16 @@ echo "\$CTESTCMD -S ${scrdir}/CTestScript-Test.cmake,${model} -V" >> runctest.sh
chmod +x runctest.sh

# Submit the job to the queue
jobid=`qsub runctest.sh`
jobid=`qsub -l walltime=01:00:00 runctest.sh`

# Wait for the job to complete before exiting
while true; do
status=`qstat $jobid`
echo $status
if [ "$status" == "" ]; then
break
qstat $jobid
if [ $? -eq 0 ]; then
sleep 30
else
sleep 10
break;
fi
done

exit 0

2 changes: 1 addition & 1 deletion src/externals/pio2/doc/source/contributing_code.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/ /*! \page code_style Code Style for Contributors
*/ /*! \page contributing_code Guide for Contributors

# Introduction #

Expand Down
10 changes: 10 additions & 0 deletions src/externals/pio2/examples/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,22 @@ ADD_EXECUTABLE(example1 example1.c)
TARGET_LINK_LIBRARIES(example1 pioc)
add_dependencies(tests example1)

ADD_EXECUTABLE(darray_no_async darray_no_async.c)
TARGET_LINK_LIBRARIES(darray_no_async pioc)
add_dependencies(tests darray_no_async)

ADD_EXECUTABLE(darray_async darray_async.c)
TARGET_LINK_LIBRARIES(darray_async pioc)
add_dependencies(tests darray_async)

if (PIO_USE_MPISERIAL)
add_test(NAME examplePio COMMAND examplePio)
add_test(NAME example1 COMMAND example1)
else ()
add_mpi_test(examplePio EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/examplePio NUMPROCS 4 TIMEOUT 60)
add_mpi_test(example1 EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/example1 NUMPROCS 4 TIMEOUT 60)
#add_mpi_test(darray_async EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/darray_async NUMPROCS 5 TIMEOUT 60)
add_mpi_test(darray_no_async EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/darray_no_async NUMPROCS 4 TIMEOUT 60)
endif ()


Expand Down
Loading