added setting of mpiexec command to CMake build

This commit is contained in:
Ed Hartnett 2018-08-16 07:33:04 -06:00
parent afb7e5ab43
commit 59a25093d9
2 changed files with 21 additions and 18 deletions

View File

@ -315,6 +315,7 @@ SET(CHUNK_CACHE_PREEMPTION 0.75 CACHE STRING "Default file chunk cache preemptio
SET(MAX_DEFAULT_CACHE_SIZE 67108864 CACHE STRING "Default maximum cache size.")
SET(NETCDF_LIB_NAME "" CACHE STRING "Default name of the netcdf library.")
SET(TEMP_LARGE "." CACHE STRING "Where to put large temp files if large file tests are run.")
SET(MPIEXEC "mpiexec" CACHE STRING "Command to run MPI programs if parallel tests are run.")
IF(NOT NETCDF_LIB_NAME STREQUAL "")
SET(MOD_NETCDF_NAME ON)
@ -974,7 +975,7 @@ IF(NOT ENABLE_NETCDF_4 AND ENABLE_EXAMPLE_TESTS)
SET(ENABLE_EXAMPLE_TESTS OFF)
ENDIF()
# Enable Parallel (different than pnetcdf).
# Enable Parallel IO with netCDF-4/HDF5 files using HDF5 parallel I/O.
SET(STATUS_PARALLEL "OFF")
OPTION(ENABLE_PARALLEL4 "Build netCDF-4 with parallel IO" "${HDF5_PARALLEL}")
IF(ENABLE_PARALLEL4 AND ENABLE_NETCDF_4)
@ -986,10 +987,12 @@ IF(ENABLE_PARALLEL4 AND ENABLE_NETCDF_4)
SET(USE_PARALLEL ON CACHE BOOL "")
SET(USE_PARALLEL4 ON CACHE BOOL "")
SET(STATUS_PARALLEL "ON")
configure_file("${netCDF_SOURCE_DIR}/nc_test4/run_par_test.sh.in"
"${netCDF_BINARY_DIR}/nc_test4/run_par_test.sh")
ENDIF()
ENDIF()
# Options to enable parallel IO, tests.
# Options to enable parallel IO for classic formats with parallel-netcdf library.
SET(STATUS_PNETCDF "OFF")
OPTION(ENABLE_PNETCDF "Build with parallel I/O for classic and 64-bit offset files using parallel-netcdf." OFF)

View File

@ -8,36 +8,36 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi
set -e
echo
echo "Testing MPI parallel I/O with various other mode flags..."
mpiexec -n 1 ./tst_mode
@MPIEXEC@ -n 1 ./tst_mode
echo
echo "Testing MPI parallel I/O without netCDF..."
mpiexec -n 4 ./tst_mpi_parallel
@MPIEXEC@ -n 4 ./tst_mpi_parallel
echo
echo "Testing very simple parallel I/O with 4 processors..."
mpiexec -n 4 ./tst_parallel
@MPIEXEC@ -n 4 ./tst_parallel
echo
echo "Testing simple parallel I/O with 16 processors..."
mpiexec -n 16 ./tst_parallel3
@MPIEXEC@ -n 16 ./tst_parallel3
echo
echo "num_proc time(s) write_rate(B/s)"
mpiexec -n 1 ./tst_parallel4
mpiexec -n 2 ./tst_parallel4
mpiexec -n 4 ./tst_parallel4
mpiexec -n 8 ./tst_parallel4
@MPIEXEC@ -n 1 ./tst_parallel4
@MPIEXEC@ -n 2 ./tst_parallel4
@MPIEXEC@ -n 4 ./tst_parallel4
@MPIEXEC@ -n 8 ./tst_parallel4
#mpiexec -n 16 ./tst_parallel4
#mpiexec -n 32 ./tst_parallel4
#mpiexec -n 64 ./tst_parallel4
#@MPIEXEC@ -n 16 ./tst_parallel4
#@MPIEXEC@ -n 32 ./tst_parallel4
#@MPIEXEC@ -n 64 ./tst_parallel4
echo
echo "Testing collective writes with some 0 element writes..."
mpiexec -n 4 ./tst_parallel5
@MPIEXEC@ -n 4 ./tst_parallel5
echo
echo "Parallel Performance Test for NASA"
mpiexec -n 4 ./tst_nc4perf
@MPIEXEC@ -n 4 ./tst_nc4perf
echo
echo "Parallel I/O test for Collective I/O, contributed by HDF Group."
mpiexec -n 1 ./tst_simplerw_coll_r
mpiexec -n 2 ./tst_simplerw_coll_r
mpiexec -n 4 ./tst_simplerw_coll_r
@MPIEXEC@ -n 1 ./tst_simplerw_coll_r
@MPIEXEC@ -n 2 ./tst_simplerw_coll_r
@MPIEXEC@ -n 4 ./tst_simplerw_coll_r