Skip to content

Commit

Permalink
A set of updates for the new release scripts.
Browse files Browse the repository at this point in the history
+ Remove environment definitions for versions of draco prior to 7_0_0.
+ Add sanity checks for client builds that point to versions of draco
  prior to 7_0_0.
+ Add sanity checks for builds that request an environment that isn't
  defined.
+ Add a callback bash function `set_extra_vars` that will modify the working
  environment before building code.  This is useful for setting environment
  variables like `TMP_DIR` or `CMAKE_PREFIX_PATH` that might be needed.
+ Fix a bug that caused the patch version to be ommitted.
+ Tweak scripts for thunder, darwin and sierra.
  • Loading branch information
KineticTheory committed Sep 18, 2019
1 parent a00691c commit b118e4e
Show file tree
Hide file tree
Showing 15 changed files with 199 additions and 219 deletions.
7 changes: 4 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
ATS-1 Intel 18.0.2 Cray_MPICH2-7.7.4
(TT/TR) Intel 17.0.4 Cray_MPICH2-7.7.4
---------------------------------------------------------------
TH/CP GCC 8.3.0 Cray_MPICH2-7.7.8
LANL ARM GCC 8.3.0 Cray_MPICH2-7.7.8
TH/CP CCE 9.0.1.80 Cray_MPICH2-7.7.8
---------------------------------------------------------------
ATS-2 GCC 7.3.1 Spectrum MPI 2010.01-30
ATS-2 GCC 7.3.1 Spectrum MPI 2019.01.30
Cuda-9.2
XL 2019.04 Spectrum MPI 2010.01-30
XL 2019.04 Spectrum MPI 2019.01.30
Cuda-9.2
---------------------------------------------------------------
Darwin - Power9 GCC 7.3.0 OpenMPI-3.1.3, Cuda-10.1
Expand Down
154 changes: 22 additions & 132 deletions tools/ats1-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Cray (ATS-1) Environment setups
#------------------------------------------------------------------------------#

# verbose=true
export KMP_AFFINITY=disabled
export VENDOR_DIR=/usr/projects/draco/vendors
export CRAYPE_LINK_TYPE=dynamic
Expand All @@ -16,7 +17,7 @@ fi

# symlinks will be generated for each machine that point to the correct
# installation directory.
if [[ `df | grep yellow | grep -c jayenne` -gt 0 ]]; then
if [[ `df | grep yellnfs2 | grep -c jayenne` -gt 0 ]]; then
export siblings="trinitite"
else
export siblings="trinity"
Expand All @@ -34,7 +35,7 @@ case $avail_queues in
*access*) access_queue="-A access --qos=access" ;;
*dev*) access_queue="--qos=dev" ;;
esac
export avail_queues
export access_queue

#------------------------------------------------------------------------------#
# Specify environments (modules)
Expand Down Expand Up @@ -91,7 +92,8 @@ case $ddir in
if [[ ${CRAY_CPU_TARGET} == mic-knl ]]; then
run "module swap craype-mic-knl craype-haswell"
fi
run "module load user_contrib friendly-testing"
run "module load user_contrib"
run "module load friendly-testing"
run "module unload cmake numdiff git"
run "module unload gsl random123 eospac"
run "module unload trilinos ndi"
Expand Down Expand Up @@ -258,7 +260,7 @@ case $ddir in
;;

#------------------------------------------------------------------------------#
draco-7_0_0 | draco-7_1_0)
draco-7_0* | draco-7_1*)
function intel1802env()
{
unset partition
Expand Down Expand Up @@ -396,140 +398,28 @@ case $ddir in
}
;;

#------------------------------------------------------------------------------#
draco-6_25_0 )

function intel18env()
{
if [[ ${CRAY_CPU_TARGET} == mic-knl ]]; then
run "module swap craype-mic-knl craype-haswell"
fi
run "module load user_contrib friendly-testing"
run "module unload cmake numdiff git"
run "module unload gsl random123 eospac"
run "module unload trilinos ndi"
run "module unload superlu-dist metis parmetis"
run "module unload csk lapack"
run "module unload PrgEnv-intel PrgEnv-pgi PrgEnv-cray PrgEnv-gnu"
run "module unload lapack "
run "module unload intel gcc"
run "module unload papi perftools"
run "module load PrgEnv-intel"
run "module unload intel"
run "module unload xt-libsci xt-totalview"
run "module load intel/18.0.2"
run "module load cmake/3.12.1 numdiff git"
run "module load gsl random123 eospac/6.3.0 ndi"
run "module load trilinos/12.10.1 metis parmetis/4.0.3 superlu-dist"
run "module use --append ${VENDOR_DIR}-ec/modulefiles"
run "module load csk"
run "module list"
CC=`which cc`
CXX=`which CC`
FC=`which ftn`
export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
}

function intel18env-knl()
{
if [[ ${CRAY_CPU_TARGET} == mic-knl ]]; then
run "module swap craype-mic-knl craype-haswell"
fi
run "module load user_contrib friendly-testing"
run "module unload cmake numdiff git"
run "module unload gsl random123 eospac"
run "module unload trilinos ndi"
run "module unload superlu-dist metis parmetis"
run "module unload csk lapack"
run "module unload PrgEnv-intel PrgEnv-pgi PrgEnv-cray PrgEnv-gnu"
run "module unload intel gcc"
run "module unload papi perftools"
run "module load PrgEnv-intel"
run "module unload intel"
run "module unload xt-libsci xt-totalview"
run "module load intel/18.0.2"
run "module load cmake/3.12.1 numdiff git"
run "module load gsl random123 eospac/6.3.0 ndi"
run "module load trilinos/12.10.1 metis parmetis/4.0.3 superlu-dist"
run "module use --append ${VENDOR_DIR}-ec/modulefiles"
run "module load csk"
run "module swap craype-haswell craype-mic-knl"
run "module list"
run "module list"
CC=`which cc`
CXX=`which CC`
FC=`which ftn`
export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
}

function intel17env()
{
if [[ ${CRAY_CPU_TARGET} == mic-knl ]]; then
run "module swap craype-mic-knl craype-haswell"
fi
run "module load user_contrib friendly-testing"
run "module unload cmake numdiff git"
run "module unload gsl random123 eospac"
run "module unload trilinos ndi"
run "module unload superlu-dist metis parmetis"
run "module unload csk lapack"
run "module unload PrgEnv-intel PrgEnv-pgi PrgEnv-cray PrgEnv-gnu"
run "module unload lapack "
run "module unload intel gcc"
run "module unload papi perftools"
run "module load PrgEnv-intel"
run "module unload intel"
run "module unload xt-libsci xt-totalview"
run "module load intel/17.0.4"
run "module load cmake/3.12.1 numdiff git"
run "module load gsl random123 eospac/6.3.0 ndi"
run "module load trilinos/12.10.1 metis parmetis/4.0.3 superlu-dist"
run "module use --append ${VENDOR_DIR}-ec/modulefiles"
run "module load csk"
run "module list"
CC=`which cc`
CXX=`which CC`
FC=`which ftn`
export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
}

function intel17env-knl()
{
if [[ ${CRAY_CPU_TARGET} == mic-knl ]]; then
run "module swap craype-mic-knl craype-haswell"
fi
run "module load user_contrib friendly-testing"
run "module unload cmake numdiff git"
run "module unload gsl random123 eospac"
run "module unload trilinos ndi"
run "module unload superlu-dist metis parmetis"
run "module unload csk lapack"
run "module unload PrgEnv-intel PrgEnv-pgi PrgEnv-cray PrgEnv-gnu"
run "module unload intel gcc"
run "module unload papi perftools"
run "module load PrgEnv-intel"
run "module unload intel"
run "module unload xt-libsci xt-totalview"
run "module load intel/17.0.4"
run "module load cmake/3.12.1 numdiff git"
run "module load gsl random123 eospac/6.3.0 ndi"
run "module load trilinos/12.10.1 metis parmetis/4.0.3 superlu-dist"
run "module use --append ${VENDOR_DIR}-ec/modulefiles"
run "module load csk"
run "module swap craype-haswell craype-mic-knl"
run "module list"
run "module list"
CC=`which cc`
CXX=`which CC`
FC=`which ftn`
export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
}
*)
die "ats1-env.sh:: did not set any build environments, ddir = $ddir."
;;


#------------------------------------------------------------------------------#
esac

#------------------------------------------------------------------------------#
# Sanity check
#------------------------------------------------------------------------------#

for env in $environments; do
if [[ `fn_exists $env` -gt 0 ]]; then
if [[ $verbose ]]; then echo "export -f $env"; fi
# exporting these environment is required on CTS-1, but breaks the module
# system on trinitite. Ugh.
# export -f $env
else
die "Requested environment $env is not defined."
fi
done

##---------------------------------------------------------------------------##
## End
Expand Down
26 changes: 26 additions & 0 deletions tools/ats2-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ environments="gcc731env"
# Extra cmake options
export CONFIG_BASE+=" -DCMAKE_VERBOSE_MAKEFILE=ON"

# job launch options
case $siblings in
rzansel) job_launch_options="-q pdebug" ;;
sierra) job_launch_options="-q pbatch" ;;
*) die "*FATAL ERROR* (ats2-env.sh) I only know how to set job_launch_options for rzansel and sierra." ;;
esac
export job_launch_options

# Special setup for ATS-1: replace the 'latest' symlink
(cd /usr/gapps/jayenne; if [[ -L draco-latest ]]; then rm draco-latest; fi; ln -s $source_prefix draco-latest)

Expand Down Expand Up @@ -76,9 +84,27 @@ case $ddir in
}
;;

*)
die "ats2-env.sh:: did not set any build environments, ddir = $ddir."
;;

#------------------------------------------------------------------------------#
esac

#------------------------------------------------------------------------------#
# Sanity check
#------------------------------------------------------------------------------#

for env in $environments; do
if [[ `fn_exists $env` -gt 0 ]]; then
if [[ $verbose ]]; then echo "export -f $env"; fi
export -f $env
else
die "Requested environment $env is not defined."
fi
done


##---------------------------------------------------------------------------##
## End
##---------------------------------------------------------------------------##
8 changes: 4 additions & 4 deletions tools/ats2-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ echo -e "\nConfigure, build, and test $package for $buildflavor-$rttversion."
echo
export steps="config build test"
export logfile="$source_prefix/logs/release-$buildflavor-$rttversion-cbt${jobnameext}.log"
cmd="bsub -q pdebug -nnodes 1 -W 2:00 -J rel_${package:0:3}-${buildflavor: -12}-$rttversion \
-o $logfile -e $logfile"
echo "$cmd $script_dir/release.msub"
jobid=`$cmd < $script_dir/release.msub`
cmd="bsub $job_launch_options -nnodes 1 -W 4:00 \
-J rel_${package:0:3}-${buildflavor: -12}-$rttversion -o $logfile -e $logfile"
echo "$cmd $draco_script_dir/release.msub"
jobid=`$cmd $draco_script_dir/release.msub`
sleep 1m
# trim extra whitespace from number
jobid=`echo ${jobid//[^0-9]/}`
Expand Down
6 changes: 3 additions & 3 deletions tools/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,8 @@ function install_versions
# source_dir="$source_prefix/source/$package"
build_dir="$build_prefix/$rttversion/${package:0:1}"

# Purge any existing files before running cmake to configure the build directory.
# Purge any existing files before running cmake to configure the build
# directory.
if test $config_step == 1; then
if test -d ${build_dir}; then
run "rm -rf ${build_dir}"
Expand All @@ -518,8 +519,7 @@ function install_versions

run "cd $build_dir"
if test $config_step == 1; then
run "cmake -DCMAKE_INSTALL_PREFIX=$install_dir \
$options $CONFIG_EXTRA $source_dir" \
run "cmake -DCMAKE_INSTALL_PREFIX=$install_dir $options $CONFIG_EXTRA $source_dir" \
|| die "Could not configure in $build_dir from source at $source_dir"
fi
if test $build_step == 1; then
Expand Down
34 changes: 26 additions & 8 deletions tools/cray-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

export KMP_AFFINITY=disabled
export VENDOR_DIR=/usr/projects/draco/vendors
export CRAYPE_LINK_TYPE=dynamic

# Sanity Check (Cray machines have very fragile module systems!)
if [[ -d $ParMETIS_ROOT_DIR ]]; then
Expand Down Expand Up @@ -61,11 +62,11 @@ case $ddir in
run "module load trilinos/12.14.1-gcc-8.3.0-mpt-7.7.8-openblas"
run "module load cray-python/3.6.5.6 qt"
run "module use --append ${VENDOR_DIR}-ec/modulefiles-capulin"
run "module load csk"
run "module load csk/0.4.2-gcc-8.3.0"
run "module list"
CC=`which cc`
CXX=`which CC`
FC=`which ftn`
export CC=`which cc`
export CXX=`which CC`
export FC=`which ftn`
# export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
}

Expand All @@ -89,19 +90,36 @@ case $ddir in
# run "module load superlu-dist/5.4.0-cce-9.0.1.80-mpt-7.7.8-openblas"
run "module load cray-python/3.6.5.6 qt"
run "module use --append ${VENDOR_DIR}-ec/modulefiles-capulin"
run "module load csk"
run "module load csk/0.4.2-cce-9.0.1.80"
run "module list"
CC=`which cc`
CXX=`which CC`
FC=`which ftn`
export CC=`which cc`
export CXX=`which CC`
export FC=`which ftn`
# export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
}

;;

*)
die "cray-env.sh:: did not set any build environments, ddir = $ddir."
;;

#------------------------------------------------------------------------------#
esac

#------------------------------------------------------------------------------#
# Sanity check
#------------------------------------------------------------------------------#

for env in $environments; do
if [[ `fn_exists $env` -gt 0 ]]; then
if [[ $verbose ]]; then echo "export -f $env"; fi
export -f $env
else
die "Requested environment $env is not defined."
fi
done


##---------------------------------------------------------------------------##
## End
Expand Down
Loading

0 comments on commit b118e4e

Please sign in to comment.