Skip to content

Commit

Permalink
update sitename
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Dec 17, 2018
1 parent 3878280 commit fbd27d8
Showing 1 changed file with 20 additions and 26 deletions.
46 changes: 20 additions & 26 deletions cmake/LibMPI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ endif ()
#

#==============================================================================
# - Get the machine platform-specific
# - Get the machine platform-specific
#
# Syntax: platform_name (RETURN_VARIABLE)
#
Expand All @@ -25,30 +25,24 @@ function (platform_name RETURN_VARIABLE)
# Determine platform name from site name...
site_name (SITENAME)

# UCAR/NWSC Machines
if (SITENAME MATCHES "^yslogin" OR
SITENAME MATCHES "^geyser" OR
SITENAME MATCHES "^caldera")

set (${RETURN_VARIABLE} "nwsc" PARENT_SCOPE)

# New NWSC SGI machine
elseif (SITENAME MATCHES "^laramie")
if (SITENAME MATCHES "^laramie" OR
SITENAME MATCHES "^cheyenne")

set (${RETURN_VARIABLE} "nwscla" PARENT_SCOPE)

# ALCF/Argonne Machines
elseif (SITENAME MATCHES "^mira" OR
SITENAME MATCHES "^cetus" OR
SITENAME MATCHES "^vesta" OR
SITENAME MATCHES "^cooley")

set (${RETURN_VARIABLE} "alcf" PARENT_SCOPE)

# NERSC Machines
elseif (SITENAME MATCHES "^edison" OR
SITENAME MATCHES "^cori")

set (${RETURN_VARIABLE} "nersc" PARENT_SCOPE)

# NCSA Machine (Blue Waters)
Expand All @@ -61,11 +55,11 @@ function (platform_name RETURN_VARIABLE)
SITENAME MATCHES "^titan")

set (${RETURN_VARIABLE} "olcf" PARENT_SCOPE)

else ()

set (${RETURN_VARIABLE} "unknown" PARENT_SCOPE)

endif ()

endfunction ()
Expand All @@ -85,35 +79,35 @@ function (add_mpi_test TESTNAME)
set (oneValueArgs NUMPROCS TIMEOUT EXECUTABLE)
set (multiValueArgs ARGUMENTS)
cmake_parse_arguments (${TESTNAME} "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

# Store parsed arguments for convenience
set (exec_file ${${TESTNAME}_EXECUTABLE})
set (exec_args ${${TESTNAME}_ARGUMENTS})
set (num_procs ${${TESTNAME}_NUMPROCS})
set (timeout ${${TESTNAME}_TIMEOUT})

# Get the platform name
platform_name (PLATFORM)

# Default ("unknown" platform) execution
if (PLATFORM STREQUAL "unknown")

# Run tests directly from the command line
set(EXE_CMD ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${num_procs}
${MPIEXEC_PREFLAGS} ${VALGRIND_COMMAND} ${VALGRIND_COMMAND_OPTIONS} ${exec_file}
set(EXE_CMD ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${num_procs}
${MPIEXEC_PREFLAGS} ${VALGRIND_COMMAND} ${VALGRIND_COMMAND_OPTIONS} ${exec_file}
${MPIEXEC_POSTFLAGS} ${exec_args})

else ()

# Run tests from the platform-specific executable
set (EXE_CMD ${CMAKE_SOURCE_DIR}/cmake/mpiexec.${PLATFORM}
set (EXE_CMD ${CMAKE_SOURCE_DIR}/cmake/mpiexec.${PLATFORM}
${num_procs} ${VALGRIND_COMMAND} ${VALGRIND_COMMAND_OPTIONS} ${exec_file} ${exec_args})

endif ()

# Add the test to CTest
add_test(NAME ${TESTNAME} COMMAND ${EXE_CMD})

# Adjust the test timeout
set_tests_properties(${TESTNAME} PROPERTIES TIMEOUT ${timeout})

Expand Down

0 comments on commit fbd27d8

Please sign in to comment.