Skip to content

Commit

Permalink
Merge pull request #1134 from berquist/1133-coreonly-build
Browse files Browse the repository at this point in the history
Fix tests when elements are intentionally not built
  • Loading branch information
berquist authored Aug 16, 2024
2 parents ee1eca2 + 4718427 commit 40ef313
Showing 1 changed file with 71 additions and 52 deletions.
123 changes: 71 additions & 52 deletions buildsys/bamboo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,9 @@ setConvenienceVars() {
echo " junobaseoptions = $junobaseoptions"
}

# Singleton used for setting config line of a codebase when it should not be built.
NOBUILD="NOBUILD"

#-------------------------------------------------------------------------
# Function: getconfig
# Description:
Expand Down Expand Up @@ -421,7 +424,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv"
elementsConfigStr="$elementsbaseoptions --with-hbmdramsim=$SST_DEPS_INSTALL_HBM_DRAMSIM2 --with-ramulator=$SST_DEPS_INSTALL_RAMULATOR --with-goblin-hmcsim=$SST_DEPS_INSTALL_GOBLIN_HMCSIM --with-dramsim3=$SST_DEPS_INSTALL_DRAMSIM3 --with-dramsim=$SST_DEPS_INSTALL_DRAMSIM --with-nvdimmsim=$SST_DEPS_INSTALL_NVDIMMSIM --with-hybridsim=$SST_DEPS_INSTALL_HYBRIDSIM --with-pin=$SST_DEPS_INSTALL_INTEL_PIN $elementsMiscEnv"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
;;
Expand All @@ -437,10 +440,10 @@ getconfig() {
depsStr="-r none" # Dependencies only needed for elements
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv"
elementsConfigStr="NOBUILD"
macroConfigStr="NOBUILD"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
elementsConfigStr="${NOBUILD}"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;
sstmainline_config_linux_with_cuda)
#-----------------------------------------------------------------
Expand All @@ -456,7 +459,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv --disable-mem-pools"
elementsConfigStr="$elementsbaseoptions --with-cuda=$CUDA_ROOT --with-gpgpusim=$SST_DEPS_INSTALL_GPGPUSIM --with-hbmdramsim=$SST_DEPS_INSTALL_HBM_DRAMSIM2 --with-ramulator=$SST_DEPS_INSTALL_RAMULATOR --with-goblin-hmcsim=$SST_DEPS_INSTALL_GOBLIN_HMCSIM --with-dramsim3=$SST_DEPS_INSTALL_DRAMSIM3 --with-dramsim=$SST_DEPS_INSTALL_DRAMSIM --with-nvdimmsim=$SST_DEPS_INSTALL_NVDIMMSIM --with-hybridsim=$SST_DEPS_INSTALL_HYBRIDSIM --with-pin=$SST_DEPS_INSTALL_INTEL_PIN $elementsMiscEnv"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
# Must Setup the GPGPUSIM Environment
Expand Down Expand Up @@ -485,9 +488,9 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv --disable-mem-pools --disable-mpi"
elementsConfigStr="$elementsbaseoptions --with-cuda=$CUDA_ROOT --with-gpgpusim=$SST_DEPS_INSTALL_GPGPUSIM --with-hbmdramsim=$SST_DEPS_INSTALL_HBM_DRAMSIM2 --with-ramulator=$SST_DEPS_INSTALL_RAMULATOR --with-goblin-hmcsim=$SST_DEPS_INSTALL_GOBLIN_HMCSIM --with-dramsim3=$SST_DEPS_INSTALL_DRAMSIM3 --with-dramsim=$SST_DEPS_INSTALL_DRAMSIM --with-nvdimmsim=$SST_DEPS_INSTALL_NVDIMMSIM --with-hybridsim=$SST_DEPS_INSTALL_HYBRIDSIM --with-pin=$SST_DEPS_INSTALL_INTEL_PIN $elementsMiscEnv"
macroConfigStr="NOBUILD"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
# Must Setup the GPGPUSIM Environment
echo "SETUP THE GPGPUSIM ENVIRONMENT"
echo "==== ENV BEFORE GPGPUSIM ENV SETUP ==="
Expand All @@ -514,7 +517,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv --disable-mpi"
elementsConfigStr="$elementsbaseoptions --with-hbmdramsim=$SST_DEPS_INSTALL_HBM_DRAMSIM2 --with-ramulator=$SST_DEPS_INSTALL_RAMULATOR --with-goblin-hmcsim=$SST_DEPS_INSTALL_GOBLIN_HMCSIM --with-dramsim3=$SST_DEPS_INSTALL_DRAMSIM3 --with-dramsim=$SST_DEPS_INSTALL_DRAMSIM --with-nvdimmsim=$SST_DEPS_INSTALL_NVDIMMSIM --with-hybridsim=$SST_DEPS_INSTALL_HYBRIDSIM --with-pin=$SST_DEPS_INSTALL_INTEL_PIN $elementsMiscEnv"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
;;
Expand All @@ -528,7 +531,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="$elementsbaseoptions"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
;;
Expand All @@ -544,7 +547,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv"
elementsConfigStr="$elementsbaseoptions --with-hbmdramsim=$SST_DEPS_INSTALL_HBM_DRAMSIM2 --with-ramulator=$SST_DEPS_INSTALL_RAMULATOR --with-goblin-hmcsim=$SST_DEPS_INSTALL_GOBLIN_HMCSIM --with-dramsim3=$SST_DEPS_INSTALL_DRAMSIM3 --with-dramsim=$SST_DEPS_INSTALL_DRAMSIM --with-nvdimmsim=$SST_DEPS_INSTALL_NVDIMMSIM --with-hybridsim=$SST_DEPS_INSTALL_HYBRIDSIM $elementsMiscEnv"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
;;
Expand All @@ -560,10 +563,10 @@ getconfig() {
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="NOBUILD"
elementsConfigStr="${NOBUILD}"
macroConfigStr="--prefix=$SST_MACRO_INSTALL CC=`which clang` CXX=`which clang++` --with-pth=$PTH_HOME --disable-regex --with-sst-core=$SST_CORE_INSTALL"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

sst-macro_nosstcore_mac)
Expand All @@ -576,11 +579,11 @@ getconfig() {
miscEnv="${cc_environment} ${mpi_environment}"
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="NOBUILD"
elementsConfigStr="NOBUILD"
coreConfigStr="${NOBUILD}"
elementsConfigStr="${NOBUILD}"
macroConfigStr="--prefix=$SST_MACRO_INSTALL CC=`which clang` CXX=`which clang++` --with-pth=$PTH_HOME --disable-regex"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

sst-macro_withsstcore_linux)
Expand All @@ -594,10 +597,10 @@ getconfig() {
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="NOBUILD"
elementsConfigStr="${NOBUILD}"
macroConfigStr="--prefix=$SST_MACRO_INSTALL CC=`which gcc` CXX=`which g++` --disable-regex --disable-unordered-containers --with-sst-core=$SST_CORE_INSTALL"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

sst-macro_nosstcore_linux)
Expand All @@ -610,11 +613,11 @@ getconfig() {
miscEnv="${cc_environment} ${mpi_environment}"
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="NOBUILD"
elementsConfigStr="NOBUILD"
coreConfigStr="${NOBUILD}"
elementsConfigStr="${NOBUILD}"
macroConfigStr="--prefix=$SST_MACRO_INSTALL CC=`which gcc` CXX=`which g++` --disable-regex --disable-unordered-containers"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

sst_Macro_make_dist)
Expand All @@ -629,10 +632,10 @@ getconfig() {
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="NOBUILD"
elementsConfigStr="${NOBUILD}"
macroConfigStr="--prefix=$SST_MACRO_INSTALL CC=`which gcc` CXX=`which g++` --disable-regex --disable-unordered-containers --with-sst-core=$SST_CORE_INSTALL"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

sstmainline_config_make_dist_test)
Expand All @@ -648,7 +651,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="$elementsbaseoptions"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
;;
Expand All @@ -665,10 +668,10 @@ getconfig() {
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="NOBUILD"
macroConfigStr="NOBUILD"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
elementsConfigStr="${NOBUILD}"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

*)
Expand Down Expand Up @@ -1123,7 +1126,7 @@ config_and_build() {
local source_dir="$4"
local conf_script_name="$5"

if [[ "${selected_config}" == "NOBUILD" ]]
if [[ "${selected_config}" == "${NOBUILD}" ]]
then
echo "============== ${repo_name} - NO BUILD REQUIRED ==============="
else
Expand Down Expand Up @@ -1355,7 +1358,7 @@ config_and_build_simple() {
local repo_name="$1"
local selected_config="$2"

if [[ "${selected_config}" == "NOBUILD" ]]
if [[ "${selected_config}" == "${NOBUILD}" ]]
then
echo "============== ${repo_name} - NO BUILD REQUIRED ==============="
else
Expand Down Expand Up @@ -2126,34 +2129,50 @@ then
echo "BAMBOO: SST original dotests retval = $retval"

# NOW RUN THE FRAMEWORKS ELEMENTS TESTS
if [[ ${SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS:+isSet} == isSet ]] ; then
echo "**************************************************************************"
echo "*** "
echo "*** RUNNING NEW TEST FRAMEWORKS ELEMENTS - SUBSET OF TESTS : ${SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS}"
echo "*** "
echo "**************************************************************************"
# WE ARE RUNNING THE FRAMEWORKS ELEMENTS SUBSET OF TESTS (Set by wildcard) AFTER DOTESTS() HAVE RUN
cd $SST_ROOT
$SST_PYTHON_APP_EXE $SST_TEST_FRAMEWORKS_ELEMENTS_APP_EXE $SST_TEST_FRAMEWORKS_PARAMS -z -r $SST_MULTI_RANK_COUNT -t $SST_MULTI_THREAD_COUNT -w $SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS
frameworks_retval=$?
echo "BAMBOO: SST Frameworks Elements Test retval = $frameworks_retval"
else
if [[ ${SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS:+isSet} != isSet ]] ; then
echo "**************************************************************************"
echo "*** "
echo "*** RUNNING NEW TEST FRAMEWORKS CORE AND ELEMENTS - FULL SET OF TESTS"
echo "*** RUNNING NEW TEST FRAMEWORKS CORE - FULL SET OF TESTS"
echo "*** "
echo "**************************************************************************"
# WE ARE RUNNING THE FRAMEWORKS ELEMENTS FULL SET OF TESTS AFTER DOTESTS() HAVE RUN
cd $SST_ROOT

$SST_PYTHON_APP_EXE $SST_TEST_FRAMEWORKS_CORE_APP_EXE $SST_TEST_FRAMEWORKS_PARAMS -z -r $SST_MULTI_RANK_COUNT -t $SST_MULTI_THREAD_COUNT
core_frameworks_retval=$?
$SST_PYTHON_APP_EXE $SST_TEST_FRAMEWORKS_ELEMENTS_APP_EXE $SST_TEST_FRAMEWORKS_PARAMS -k -z -r $SST_MULTI_RANK_COUNT -t $SST_MULTI_THREAD_COUNT
elements_frameworks_retval=$?
echo "BAMBOO: SST Frameworks Core Test retval = $core_frameworks_retval"
echo "BAMBOO: SST Frameworks Elements Test retval = $elements_frameworks_retval"
fi

cd $SST_ROOT
elements_frameworks_retval=0
if [[ "${SST_SELECTED_ELEMENTS_CONFIG}" != "${NOBUILD}" ]]; then
if [[ ${SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS:+isSet} == isSet ]] ; then
echo "**************************************************************************"
echo "*** "
echo "*** RUNNING NEW TEST FRAMEWORKS ELEMENTS - SUBSET OF TESTS : ${SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS}"
echo "*** "
echo "**************************************************************************"
# WE ARE RUNNING THE FRAMEWORKS ELEMENTS SUBSET OF TESTS (Set by wildcard) AFTER DOTESTS() HAVE RUN
$SST_PYTHON_APP_EXE $SST_TEST_FRAMEWORKS_ELEMENTS_APP_EXE $SST_TEST_FRAMEWORKS_PARAMS -z -r $SST_MULTI_RANK_COUNT -t $SST_MULTI_THREAD_COUNT -w $SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS
else
echo "**************************************************************************"
echo "*** "
echo "*** RUNNING NEW TEST FRAMEWORKS ELEMENTS - FULL SET OF TESTS"
echo "*** "
echo "**************************************************************************"
# WE ARE RUNNING THE FRAMEWORKS ELEMENTS FULL SET OF TESTS AFTER DOTESTS() HAVE RUN
$SST_PYTHON_APP_EXE $SST_TEST_FRAMEWORKS_ELEMENTS_APP_EXE $SST_TEST_FRAMEWORKS_PARAMS -k -z -r $SST_MULTI_RANK_COUNT -t $SST_MULTI_THREAD_COUNT
fi
elements_frameworks_retval=$?
else
echo "**************************************************************************"
echo "*** "
echo "*** RUNNING NEW TEST FRAMEWORKS - SKIPPING ELEMENTS, NOT BUILT"
echo "*** "
echo "**************************************************************************"
fi
echo "BAMBOO: SST Frameworks Elements Test retval = $elements_frameworks_retval"

# Check the retval result from the bamboo dotests then check the frameworks_retval results with the frameworks run
if [ $retval -eq 0 ]; then
# Did the dotests pass, if so, then return the results
Expand Down

0 comments on commit 40ef313

Please sign in to comment.