Skip to content

Commit

Permalink
Merge Pull Request #7427 from bartlettroscoe/Trilinos/atdv-351-atdm-a…
Browse files Browse the repository at this point in the history
…ts2-refactor

Automatically Merged using Trilinos Pull Request AutoTester
PR Title: ATDM: Address several 'ats2' issues (#7402, #7406, #7122, #2422)
PR Author: bartlettroscoe
  • Loading branch information
trilinos-autotester authored May 28, 2020
2 parents 350e07e + 0037354 commit d1803f8
Show file tree
Hide file tree
Showing 15 changed files with 248 additions and 201 deletions.
1 change: 1 addition & 0 deletions cmake/std/atdm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ TRIBITS_ADD_TEST_DIRECTORIES(test)
TRIBITS_ADD_TEST_DIRECTORIES(cee-rhel6)
TRIBITS_ADD_TEST_DIRECTORIES(van1-tx2)
TRIBITS_ADD_TEST_DIRECTORIES(ats1)
TRIBITS_ADD_TEST_DIRECTORIES(ats2)
TRIBITS_PACKAGE_POSTPROCESS()
10 changes: 5 additions & 5 deletions cmake/std/atdm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1075,11 +1075,11 @@ $ bsub -x -Is -n 20 \

### ATS-2

Once logged on a supported ATS-2 system like 'vortex' (SRN), one can either
build and configure on a login node or a compute node. But one must always
run the tests from the launch node (allocated using 'bsub'). Make sure to
setup SSH keys as described in `/opt/VORTEX_INTRO` before trying to do
anything.
Once logged on a supported ATS-2 system (called system 'ats2') like 'vortex'
(SRN), one can either build and configure on a login node or a compute node.
But one must always run the tests from the launch node (allocated using
'bsub'). Make sure to setup SSH keys as described in `/opt/VORTEX_INTRO`
before trying to do anything.

For example, to configure, build and run the tests for the default
`cuda-debug` build for `Tpetra` (after cloning Trilinos on the 'develop'
Expand Down
11 changes: 11 additions & 0 deletions cmake/std/atdm/ats2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
TRIBITS_ADD_ADVANCED_TEST( ats2_custom_builds_unit_tests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND env
ARGS SHUNIT_COLOR=none ${CMAKE_CURRENT_SOURCE_DIR}/custom_builds_unit_tests.sh
PASS_REGULAR_EXPRESSION_ALL
"ERROR: A supported compiler was not selected for 'ats2' env - anything-cudas-after"
"Ran 1 test"
"[^]OK[$]"
ALWAYS_FAIL_ON_NONZERO_RETURN
)
12 changes: 6 additions & 6 deletions cmake/std/atdm/ats2/all_supported_builds.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

export ATDM_CONFIG_CTEST_S_BUILD_NAME_PREFIX=Trilinos-atdm-

# ats2-xl-2019.08.20-spmpi-2019.06.24_openmp_static_opt
# ats2-xl-2019.08.20-spmpi-2019.06.24_openmp_static_dbg
# ats2-xl-2019.08.20-spmpi-rolling_openmp_static_opt
# ats2-xl-2019.08.20-spmpi-rolling_openmp_static_dbg
export ATDM_CONFIG_ALL_SUPPORTED_BUILDS=(
ats2-gnu-7.3.1-spmpi-2019.06.24_serial_static_opt
ats2-gnu-7.3.1-spmpi-2019.06.24_serial_static_dbg
ats2-cuda-10.1.243-gnu-7.3.1-spmpi-2019.06.24_static_opt
ats2-cuda-10.1.243-gnu-7.3.1-spmpi-2019.06.24_static_dbg
ats2-gnu-7.3.1-spmpi-rolling_serial_static_opt
ats2-gnu-7.3.1-spmpi-rolling_serial_static_dbg
ats2-cuda-10.1.243-gnu-7.3.1-spmpi-rolling_static_opt
ats2-cuda-10.1.243-gnu-7.3.1-spmpi-rolling_static_dbg
)
84 changes: 48 additions & 36 deletions cmake/std/atdm/ats2/custom_builds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,58 @@

# Custom compiler selection logic

if [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243-xl-2019.08.20-spmpi-2019.06.24"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243_xl-2019.08.20_spmpi-2019.06.24"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243-xl-2019.08.20"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243_xl-2019.08.20"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243-xl-2019"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243_xl-2019"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-xl"* ]] \
if atdm_match_any_buildname_keyword \
cuda-10.1.243-xl-2019.08.20-spmpi-rolling \
cuda-10.1.243_xl-2019.08.20_spmpi-rolling \
cuda-10.1.243-xl-2019.08.20 \
cuda-10.1.243_xl-2019.08.20 \
cuda-10.1.243-xl-2019 \
cuda-10.1.243_xl-2019 \
cuda-xl\
; then
export ATDM_CONFIG_COMPILER=CUDA-10.1.243_XL-2019.08.20_SPMPI-2019.06.24
echo
echo "ERROR: Currently not supporting cuda-10.1.243-xl-2019.08.20-spmpi-rolling"
echo
return
#export ATDM_CONFIG_COMPILER=CUDA-10.1.243_XL-2019.08.20_SPMPI-ROLLING

elif [[ $ATDM_CONFIG_BUILD_NAME == *"xl-2019.08.20-spmpi-2019.06.24"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"xl-2019.08.20_spmpi-2019.06.24"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"xl-2019.08.20"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"xl-2019"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"xl"* ]] \
elif atdm_match_any_buildname_keyword \
xl-2019.08.20-spmpi-rolling \
xl-2019.08.20_spmpi-rolling \
xl-2019.08.20 \
xl-2019 \
xl \
; then
export ATDM_CONFIG_COMPILER=XL-2019.08.20_SPMPI-2019.06.24
echo
echo "ERROR: Currently not supporting xl-2019.08.20-spmpi-rolling"
echo
return
#export ATDM_CONFIG_COMPILER=XL-2019.08.20_SPMPI-ROLLING

elif [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243-gnu-7.3.1-spmpi-2019.06.24"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243_gnu-7.3.1_spmpi-2019.06.24"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243-gnu-7.3.1"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243_gnu-7.3.1"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243-gnu-7"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243_gnu-7"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10.1.243"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-10"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda-gnu"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"cuda"* ]] \
elif atdm_match_any_buildname_keyword \
cuda-10.1.243-gnu-7.3.1-spmpi-rolling \
cuda-10.1.243_gnu-7.3.1_spmpi-rolling \
cuda-10.1.243-gnu-7.3.1 \
cuda-10.1.243_gnu-7.3.1 \
cuda-10.1.243-gnu-7 \
cuda-10.1.243_gnu-7 \
cuda-10.1.243 \
cuda-10 \
cuda-gnu \
cuda \
; then
export ATDM_CONFIG_COMPILER=CUDA-10.1.243_GNU-7.3.1_SPMPI-2019.06.24
export ATDM_CONFIG_COMPILER=CUDA-10.1.243_GNU-7.3.1_SPMPI-ROLLING
# NOTE: Default 'cuda' must be last cuda listed!

elif [[ $ATDM_CONFIG_BUILD_NAME == *"gnu-7.3.1-spmpi-2019.06.24"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"gnu-7.3.1_spmpi-2019.06.24"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"gnu-7.3.1"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"gnu-7"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"gnu"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"default" ]] \
elif atdm_match_any_buildname_keyword \
gnu-7.3.1-spmpi-rolling \
gnu-7.3.1_spmpi-rolling \
gnu-7.3.1 \
gnu-7 \
gnu \
default \
; then
export ATDM_CONFIG_COMPILER=GNU-7.3.1_SPMPI-2019.06.24
export ATDM_CONFIG_COMPILER=GNU-7.3.1_SPMPI-ROLLING
# NOTE: Defaut 'gnu' must be last 'gnu' listed!

else
Expand All @@ -56,10 +68,10 @@ else
echo "***"
echo "*** Supported compilers include:"
echo "***"
echo "**** gnu-7.3.1_spmpi-2019.06.24 (default, default gnu)"
echo "**** cuda-10.1.243_gnu-7.3.1_spmpi-2019.06.24 (default cuda)"
echo "**** xl-2019.08.20_spmpi-2019.06.24 (disabled)"
echo "**** cuda-10.1.243-gnu-7.3.1-spmpi-2019.06.24 (disabled)"
echo "**** gnu-7.3.1_spmpi-rolling (default, default gnu)"
echo "**** cuda-10.1.243_gnu-7.3.1_spmpi-rolling (default cuda)"
echo "**** xl-2019.08.20_spmpi-rolling (disabled)"
echo "**** cuda-10.1.243-gnu-7.3.1-spmpi-rolling (disabled)"
echo "***"
return

Expand Down
86 changes: 86 additions & 0 deletions cmake/std/atdm/ats2/custom_builds_unit_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#!/bin/bash

CURRENT_SCRIPTS_DIR=`echo $BASH_SOURCE | sed "s/\(.*\)\/.*\.sh/\1/g"`
ATDM_CONFIG_SCRIPT_DIR=`readlink -f ${CURRENT_SCRIPTS_DIR}/..`
ATDM_CONFIG_SYSTEM_DIR=${ATDM_CONFIG_SCRIPT_DIR}/ats2

#
# Test compiler parsing
#

testAll() {

ATDM_CONFIG_BUILD_NAME=default
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_cuda-10.1.243-gnu-7.3.1-spmpi-rolling_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} CUDA-10.1.243_GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_cuda-10.1.243_gnu-7.3.1_spmpi-rolling_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} CUDA-10.1.243_GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_cuda-10.1.243-gnu-7.3.1_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} CUDA-10.1.243_GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_cuda-10.1.243_gnu-7.3.1_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} CUDA-10.1.243_GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_cuda-10.1.243-gnu-7_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} CUDA-10.1.243_GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_cuda-10.1.243_gnu-7_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} CUDA-10.1.243_GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_cuda-10.1.243_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} CUDA-10.1.243_GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_cuda-10_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} CUDA-10.1.243_GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_cuda_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} CUDA-10.1.243_GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_gnu-7.3.1-spmpi-rolling_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_gnu-7.3.1_spmpi-rolling_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_gnu-7.3.1_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_gnu-7_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_gnu_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} GNU-7.3.1_SPMPI-ROLLING ${ATDM_CONFIG_COMPILER}

# This should not match anything and should be an error!
ATDM_CONFIG_BUILD_NAME=anything-cudas-after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} DEFAULT ${ATDM_CONFIG_COMPILER}

}


#
# Run the unit tests
#

SHUNIT2_DIR=`readlink -f ${ATDM_CONFIG_SCRIPT_DIR}/../../../commonTools/test/shunit2`
. ${SHUNIT2_DIR}/shunit2
Loading

0 comments on commit d1803f8

Please sign in to comment.