Skip to content

Commit

Permalink
Merge branch 'tril-171-fixups-20180309' into develop (TRIL-171)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlettroscoe committed Mar 12, 2018
2 parents b89f7eb + 3450efd commit c6b31cd
Show file tree
Hide file tree
Showing 23 changed files with 860 additions and 98 deletions.
2 changes: 2 additions & 0 deletions cmake/ctest/drivers/atdm/TrilinosCTestDriverCore.atdm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ SET(CTEST_BUILD_NAME "$ENV{JOB_NAME}")
SET(THIS_FILE_LIST_DIR "${CMAKE_CURRENT_LIST_DIR}")
INCLUDE("${THIS_FILE_LIST_DIR}/../../TrilinosCTestDriverCore.cmake")

INCLUDE("${THIS_FILE_LIST_DIR}/../../../std/atdm/utils/ATDMDevEnvUtils.cmake")

SET(THIS_LIST_FILE "${CMAKE_CURRENT_LIST_FILE}")

MACRO(TRILINOS_SYSTEM_SPECIFIC_CTEST_DRIVER)
Expand Down
14 changes: 7 additions & 7 deletions cmake/ctest/drivers/atdm/ctest-driver.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

INCLUDE("${CTEST_SCRIPT_DIRECTORY}/TrilinosCTestDriverCore.atdm.cmake")

ATDM_ASSERT_ENV_VAR_SET(ATDM_CONFIG_KNOWN_HOSTNAME)
ATDM_ASSERT_ENV_VAR_SET(ATDM_CONFIG_KNOWN_SYSTEM_NAME)
ATDM_ASSERT_ENV_VAR_SET(ATDM_CONFIG_USE_MAKEFILES)
ATDM_ASSERT_ENV_VAR_SET(ATDM_CONFIG_USE_NINJA)
ATDM_ASSERT_ENV_VAR_SET(ATDM_CONFIG_CTEST_PARALLEL_LEVEL)
ATDM_ASSERT_ENV_VAR_SET(ATDM_CONFIG_BUILD_COUNT)
ATDM_ASSERT_ENV_VAR_SET(ATDM_CONFIG_SYSTEM_CDASH_SITE)

# Add this script and the shiller env script to the notes
SET( CTEST_NOTES_FILES
Expand All @@ -21,19 +21,19 @@ SET( CTEST_NOTES_FILES

SET(CTEST_PARALLEL_LEVEL "$ENV{ATDM_CONFIG_CTEST_PARALLEL_LEVEL}")

IF ($ENV{ATDM_CONFIG_USE_MAKEFILES})
SET(CTEST_CMAKE_GENERATOR "Unix Makefiles")
SET(CTEST_BUILD_FLAGS "-j$ENV{ATDM_CONFIG_BUILD_COUNT} -k")
ELSE()
IF ($ENV{ATDM_CONFIG_USE_NINJA})
SET(CTEST_CMAKE_GENERATOR Ninja)
SET(CTEST_BUILD_FLAGS "-k 999999")
ELSE()
SET(CTEST_CMAKE_GENERATOR "Unix Makefiles")
SET(CTEST_BUILD_FLAGS "-j$ENV{ATDM_CONFIG_BUILD_COUNT} -k")
ENDIF()

SET(EXTRA_CONFIGURE_OPTIONS)

# Must set the site name so that it does not change depending on what node
# runs the build.
SET(CTEST_SITE "$ENV{ATDM_CONFIG_SYSTEM_CDASH_SITE}")
SET(CTEST_SITE "$ENV{ATDM_CONFIG_KNOWN_HOSTNAME}")

# Run the genetic ATDM driver
TRILINOS_SYSTEM_SPECIFIC_CTEST_DRIVER()
3 changes: 3 additions & 0 deletions cmake/ctest/drivers/atdm/ctest-s-driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ echo "Running: ctest -V -S $WORKSPACE/Trilinos/cmake/ctest/drivers/atdm/ctest-dr

ctest -V -S \
$WORKSPACE/Trilinos/cmake/ctest/drivers/atdm/ctest-driver.cmake
ATDM_TCD_CTEST_S_RETURN_CODE=$?

echo
echo "The 'ctest -S ctest-drivers.cmake' command returned code '$ATDM_TCD_CTEST_S_RETURN_CODE'"
echo
echo "End: ctest-s-driver.sh"
echo
Expand Down
2 changes: 1 addition & 1 deletion cmake/std/atdm/ATDMDevEnv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
###############################################################################

INCLUDE("${CMAKE_CURRENT_LIST_DIR}/ATDMDevEnvUtils.cmake")
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/utils/ATDMDevEnvUtils.cmake")

#
# A) Assert the right env vars are set and set local defaults
Expand Down
2 changes: 0 additions & 2 deletions cmake/std/atdm/ATDMDisables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
###
#####################################################

INCLUDE("${CMAKE_CURRENT_LIST_DIR}/ATDMDevEnvUtils.cmake")

ATDM_SET_CACHE(TPL_ENABLE_GLM OFF CACHE BOOL)
ATDM_SET_CACHE(TPL_ENABLE_Matio OFF CACHE BOOL)
ATDM_SET_CACHE(TPL_ENABLE_SuperLU OFF CACHE BOOL)
Expand Down
140 changes: 90 additions & 50 deletions cmake/std/atdm/checkin-test-atdm.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
#!/bin/bash

#
# Test ATDM configurations of Trilinos
#
# Usage:
#
# ./checkin-test-atdm.sh \
# <job-name-keys0> <job-name-keys1> ... <job-name-keysn> \
# [other checkin-test options]
#
# If just 'all' is passsed in for the <job-name-keys> list, then the list of
# all of of the supported jobs for that current system will be loaded from
# <system_name>/all_supported_builds.sh.
#
# To use this script, just symlink this into any desired directory where to
# run from like:
#
# cd <some-base-dir>/
# ln -s $TRILNOS_DIR/cmake/std/atdm/checkin-test-atdm.sh .
#
# then run it as above. For example, to locally test a few builds for just
# Kokkos use:
#
# ./checkin-test-atdm.sh \
# gnu-opt-openmp intel-debug-serial \
# --no-enable-fwd-packages --enable-packages=Kokkos \
# --local-do-all
#
# This will only send email for the final check of all of the builds
# specified.
#

echo
echo "***"
echo "*** $0 " "$@"
Expand All @@ -57,6 +26,58 @@ fi
echo
source $STD_ATDM_DIR/utils/get_known_system_name.sh

ATDM_CHT_HELP_STR="
usage: ./checkin-test-atdm.sh \\
<job-name-keys0> <job-name-keys1> ... <job-name-keysn> \\
[other checkin-test options]
This script drives local confiugre, build and testing for each of the
<job-name-keyi> builds.
If just 'all' is passsed in for the <job-name-keys> list, then the list of all
of the supported jobs for that current system will be loaded from
<system_name>/all_supported_builds.sh.
To use this script, just symlink this into any desired directory like:
cd <some-base-dir>/
ln -s $TRILNOS_DIR/cmake/std/atdm/checkin-test-atdm.sh .
and then load an env to make sure that at least some env is loaded that is
needed to provide git, python, cmake using, for example:
source $TRILNOS_DIR/cmake/std/atdm/load-env.sh gnu
Then, for example, to locally test a few builds for just Kokkos use:
./checkin-test-atdm.sh \\
gnu-opt-openmp intel-debug-serial \\
--no-enable-fwd-packages --enable-packages=Kokkos \\
--local-do-all
This will only send email for the final check of all of the builds specified
(currently you can't turn that final email off).
Note that this will auatomatically use the full number processors for building
and running tests as specified in the <system_name>/environment.sh file.
Therefore, be caseful to only run this on a dedicated compute node for the
system and not the login node or it will completely fill up the login node.
To reproduce any build just do:
cd <job-name-keys>/
soruce load-env.sh
./do-configure
make -j16
ctest -j16
or any combination of configure, build, and test commands you want.
NOTE: To see checkin-test.py --help, run:
$STD_ATDM_DIR/../../../checkin-test.py --help
"

#
# A) Parse the arguments
#
Expand All @@ -73,7 +94,41 @@ while [[ ! "$1" == "--"* ]] && [[ ! "$1" == "" ]] ; do
shift
done

# A.2) Look for --pull and --push arguments and pull them out

ATDM_CHT_FOUND_HELP=0
ATDM_CHT_FOUND_PULL=0
ATDM_CHT_FOUND_PUSH=0
ATDM_CHT_ENABLE_PACKAGES_ARG=

for ATDM_CHT_CURENT_ARG in "$@" ; do
if [[ "$ATDM_CHT_CURENT_ARG" == "--help" ]] ; then
#echo "Found --help"
ATDM_CHT_FOUND_HELP=1
elif [[ "$ATDM_CHT_CURENT_ARG" == "-h" ]] ; then
#echo "Found -h"
ATDM_CHT_FOUND_HELP=1
elif [[ "$ATDM_CHT_CURENT_ARG" == "--pull" ]] ; then
#echo "Found --pull"
ATDM_CHT_FOUND_PULL=1
elif [[ "$ATDM_CHT_CURENT_ARG" == "--push" ]] ; then
#echo "Found --push"
ATDM_CHT_FOUND_PUSH=1
elif [[ "$ATDM_CHT_CURENT_ARG" == "--enable-packages"* ]] ; then
#echo "Found --enable-packages"
ATDM_CHT_ENABLE_PACKAGES_ARG="$ATDM_CHT_CURENT_ARG"
fi
done

if [[ "$ATDM_CHT_FOUND_HELP" == "1" ]] ; then
echo "$ATDM_CHT_HELP_STR"
exit 0
fi

# A.3) Inspect the <job-name-keys> args and deal with 'all'

if [[ "$ATDM_JOB_NAME_KEYS_LIST" == "" ]] ; then
echo
echo "Error, at least one <job-name-keys> (e.g. gnu-opt-openmp) argument is required!"
exit 1
fi
Expand All @@ -95,22 +150,6 @@ for ATDM_JOB_NAME_KEYS in $ATDM_JOB_NAME_KEYS_LIST ; do
ATDM_NUM_BULDS=$((ATDM_NUM_BULDS+1))
done

# A.2) Look for --pull and --push arguments and pull them out

ATDM_CHT_FOUND_PULL=0
ATDM_CHT_FOUND_PUSH=0
ARG_ITX=1

for ATDM_CHT_CURENT_ARG in "$@" ; do
if [[ "$ATDM_CHT_CURENT_ARG" == "--pull" ]] ; then
echo "Found --pull"
ATDM_CHT_FOUND_PULL=1
fi
if [[ "ATDM_CHT_CURENT_ARG" == "--push" ]] ; then
echo "Found --push"
ATDM_CHT_FOUND_PUSH=1
fi
done

#
# B) Do an initial pull
Expand All @@ -133,8 +172,8 @@ for ATDM_JOB_NAME_KEYS in $ATDM_JOB_NAME_KEYS_LIST ; do
echo "*** $ATDM_CHT_BUILD_CASE_IDX) Process build case $ATDM_JOB_NAME_KEYS"
echo "***"
echo
$STD_ATDM_DIR/utils/checkin-test-atdm-single.sh $ATDM_JOB_NAME_KEYS "$@" \
--default-builds= --allow-no-pull --send-email-to=
$STD_ATDM_DIR/utils/checkin-test-atdm-single.sh $ATDM_JOB_NAME_KEYS \
--default-builds= --allow-no-pull --send-email-to= "$@"
if [[ "$?" == "0" ]] ; then
echo "$ATDM_JOB_NAME_KEYS: PASSED!"
else
Expand All @@ -154,7 +193,8 @@ echo " ==> See output file checkin-test.final.out"
echo

$ATDM_TRILINOS_DIR/cmake/tribits/ci_support/checkin-test.py \
--allow-no-pull --default-builds= --st-extra-builds=$ATDM_JOB_NAME_KEYS_COMMA_LIST \
--default-builds= --st-extra-builds=$ATDM_JOB_NAME_KEYS_COMMA_LIST \
--allow-no-pull "$ATDM_CHT_ENABLE_PACKAGES_ARG" \
&> checkin-test.final.out

ATDM_CHT_RETURN_CODE=$?
Expand Down
3 changes: 1 addition & 2 deletions cmake/std/atdm/load-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ export OMP_NUM_THREADS=
export OMPI_CC=
export OMPI_CXX=
export OMPI_FC=
export ATDM_CONFIG_SYSTEM_CDASH_SITE=
export ATDM_CONFIG_USE_MAKEFILES=
export ATDM_CONFIG_USE_NINJA=
export ATDM_CONFIG_BUILD_COUNT=
export ATDM_CONFIG_KOKKOS_ARCH=
export ATDM_CONFIG_CTEST_PARALLEL_LEVEL=
Expand Down
3 changes: 1 addition & 2 deletions cmake/std/atdm/ride/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

echo "Using white/ride compiler stack $ATDM_CONFIG_COMPILER to build $ATDM_CONFIG_BUILD_TYPE code with Kokkos node type $ATDM_CONFIG_NODE_TYPE"

export ATDM_CONFIG_SYSTEM_CDASH_SITE=white/ride
export ATDM_CONFIG_USE_MAKEFILES=OFF
export ATDM_CONFIG_USE_NINJA=ON
export ATDM_CONFIG_BUILD_COUNT=128
# NOTE: Above settings are used for running on a single rhel7F (Firestone,
# Dual-Socket POWER8, 8 cores per socket, K80 GPUs) node.
Expand Down
1 change: 1 addition & 0 deletions cmake/std/atdm/ride/tweaks/CUDA-DEBUG-CUDA.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CUDA_COMMON_TWEAKS.cmake")
1 change: 1 addition & 0 deletions cmake/std/atdm/ride/tweaks/CUDA-RELEASE-CUDA.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CUDA_COMMON_TWEAKS.cmake")
9 changes: 9 additions & 0 deletions cmake/std/atdm/ride/tweaks/CUDA_COMMON_TWEAKS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ATDM_SET_ENABLE(Panzer_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerCore_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerDofMgr_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerDiscFE_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerAdaptersSTK_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerAdaptersIOSS_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerMiniEM_ENABLE_EXAMPLES OFF)
# ToDo: Change TriBITS so that, by default, Panzer_ENABLE_EXAMPLES=OFF will
# disable examples in the Panzer subpackages!q
2 changes: 2 additions & 0 deletions cmake/std/atdm/ride/tweaks/GNU-DEBUG-OPENMP.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#ATDM_SET_ENABLE(KokkosCore_UnitTest_OpenMP_MPI_1_DISABLE ON)
#ATDM_SET_ENABLE(KokkosCore_UnitTest_Serial_MPI_1_DISABLE ON)
3 changes: 1 addition & 2 deletions cmake/std/atdm/shiller/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

echo "Using hansen/shiller compiler stack $ATDM_CONFIG_COMPILER to build $ATDM_CONFIG_BUILD_TYPE code with Kokkos node type $ATDM_CONFIG_NODE_TYPE"

export ATDM_CONFIG_SYSTEM_CDASH_SITE=hansen/shiller
export ATDM_CONFIG_USE_MAKEFILES=OFF
export ATDM_CONFIG_USE_NINJA=ON
export ATDM_CONFIG_BUILD_COUNT=32

module purge
Expand Down
File renamed without changes.
14 changes: 4 additions & 10 deletions cmake/std/atdm/utils/checkin-test-atdm-single.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
#!/bin/bash -e

#
# Run a single <job-name-key> build with checkin-test.py script
#
# Usage:
#
# ./checkin-test-atdm-single.sh \
# <job-name-keys0> <job-name-keys1> ... <job-name-keysn> \
# [other checkin-test options]
#
#
# NOTE: This script should only be run by checkin-test-atdm.sh. It does not
# have enough info to run on its own.

ATDM_JOB_NAME_KEYS=$1 ; shift

Expand All @@ -35,4 +27,6 @@ $ATDM_TRILINOS_DIR/cmake/tribits/ci_support/checkin-test.py \

set +x

echo "source $STD_ATDM_DIR/load-env.sh $ATDM_JOB_NAME_KEYS" > $ATDM_JOB_NAME_KEYS/load-env.sh

# ToDo: Read env var ATDM_CONFIG_USE_NINJA and set --use-ninja!
16 changes: 13 additions & 3 deletions cmake/std/atdm/utils/get_known_system_name.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,20 @@ fi
THIS_HOSTNAME=`hostname`
#echo "Hostname = '$THIS_HOSTNAME'"

ATDM_HOSTNAME=
ATDM_SYSTEM_NAME=

if [[ $THIS_HOSTNAME == "shiller"* ]] || [[ $THIS_HOSTNAME == "hansen"* ]] ; then
if [[ $THIS_HOSTNAME == "hansen"* ]] ; then
ATDM_HOSTNAME=hansen
ATDM_SYSTEM_NAME=shiller
elif [[ $THIS_HOSTNAME == "ride"* ]] || [[ $THIS_HOSTNAME == "white"* ]] ; then
elif [[ $THIS_HOSTNAME == "shiller"* ]] ; then
ATDM_HOSTNAME=shiller
ATDM_SYSTEM_NAME=shiller
elif [[ $THIS_HOSTNAME == "white"* ]] ; then
ATDM_HOSTNAME=white
ATDM_SYSTEM_NAME=ride
elif [[ $THIS_HOSTNAME == "ride"* ]] ; then
ATDM_HOSTNAME=ride
ATDM_SYSTEM_NAME=ride
fi

Expand All @@ -28,7 +37,8 @@ if [[ $ATDM_SYSTEM_NAME == "" ]] ; then
echo "Error, hostname = '$THIS_HOSTNAME' not recognized as a known ATDM system name!"
return
else
echo "Hostname '$THIS_HOSTNAME' matches known ATDM system '$ATDM_SYSTEM_NAME'"
echo "Hostname '$THIS_HOSTNAME' matches known ATDM host '$ATDM_HOSTNAME' and system '$ATDM_SYSTEM_NAME'"
fi

export ATDM_CONFIG_KNOWN_HOSTNAME=$ATDM_HOSTNAME
export ATDM_CONFIG_KNOWN_SYSTEM_NAME=$ATDM_SYSTEM_NAME
Loading

0 comments on commit c6b31cd

Please sign in to comment.