Skip to content

Commit

Permalink
WIP: Add unit tests for KOKKOS_ARCH (trilinos#5939, ATDV-339)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlettroscoe committed Apr 17, 2020
1 parent 997ee0b commit d3b05a2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cmake/std/atdm/tests/unit_tests/set_build_options_unit_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ATDM_CONFIG_SCRIPT_DIR=`readlink -f ${CURRENT_SCRIPTS_DIR}/../..`
# Test compiler parsing
#


testAllDefaults() {
ATDM_CONFIG_BUILD_NAME=default
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
Expand All @@ -21,6 +22,7 @@ testAllDefaults() {
${_ASSERT_EQUALS_} ${ATDM_CONFIG_USE_PTHREADS} OFF
}


testCompilerClangAndDefaults() {
ATDM_CONFIG_BUILD_NAME=clang
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
Expand All @@ -34,6 +36,7 @@ testCompilerClangAndDefaults() {
${_ASSERT_EQUALS_} ${ATDM_CONFIG_USE_PTHREADS} OFF
}


testCompilerClang() {

ATDM_CONFIG_BUILD_NAME=clang-5.0.1
Expand All @@ -54,6 +57,7 @@ testCompilerClang() {

}


testCompilerCuda() {

ATDM_CONFIG_BUILD_NAME=cuda
Expand All @@ -70,6 +74,7 @@ testCompilerCuda() {

}


testCompilerIntel() {

ATDM_CONFIG_BUILD_NAME=intel
Expand All @@ -91,8 +96,24 @@ testCompilerIntel() {
}


testKokkosArch() {

ATDM_CONFIG_BUILD_NAME=default-AMDAVX
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} ${ATDM_CONFIG_COMPILER} DEFAULT
${_ASSERT_EQUALS_} ${ATDM_CONFIG_KOKKOS_ARCH} AMDAVX
${_ASSERT_EQUALS_} ${ATDM_CONFIG_BUILD_TYPE} DEBUG
${_ASSERT_EQUALS_} ${ATDM_CONFIG_SHARED_LIBS} OFF
${_ASSERT_EQUALS_} ${ATDM_CONFIG_NODE_TYPE} SERIAL
${_ASSERT_EQUALS_} ${ATDM_CONFIG_USE_OPENMP} OFF
${_ASSERT_EQUALS_} ${ATDM_CONFIG_USE_CUDA} OFF
${_ASSERT_EQUALS_} ${ATDM_CONFIG_USE_PTHREADS} OFF

ATDM_CONFIG_BUILD_NAME=default-HSW
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} ${ATDM_CONFIG_KOKKOS_ARCH} HSW

}

#
# Run the unit tests
Expand Down

0 comments on commit d3b05a2

Please sign in to comment.