Commit e1b6d0ef authored by Chuck Atkins's avatar Chuck Atkins
Browse files

Seperate LANL build scripts into two

parent 22e74d53
#!/bin/bash
##########
#MSUB -l nodes=1:ppn=1
#MSUB -l walltime=4:00:00
#MSUB -l walltime=8:00:00
#MSUB -N pvbuild
####################
......@@ -12,9 +12,8 @@
# Note: Since Lightshow uses Nahelem CPUs, we will disable SWR and set
# the OSPray architecture to SSE.
#
# msub -v MACHINE=lightshow,COMP=intel,COMP_VER=15.0.5,MPI=openmpi,MPI_VER=1.6.5,SWR=0,OSPRAY=SSE /path/to/superbuild/source/Scripts/sites/LANL-TOSS2-Build.moab
# msub -v BASEDIR=/usr/projects/packages/hpc_paraview/superbuild/build/lightshow,COMP=intel,COMP_VER=15.0.5,MPI=openmpi,MPI_VER=1.6.5,SWR=0,OSPRAY=SSE /path/to/superbuild/source/Scripts/sites/LANL-TOSS2-Build.moab
#
# This will generate a logfile called lightshow.5.1.2-osmesa_intel-15.0.5_openmpi-1.6.5.out
# The build will be located in /usr/projects/packages/hpc_paraview/superbuild/build/lightshow/5.1.2-osmesa_intel-15.0.5_openmpi-1.6.5/
# Once finished, the result will be a file called 5.1.2-osmesa_intel-15.0.5_openmpi-1.6.5.tgz
#
......@@ -25,7 +24,7 @@
# Note: Since Moonlight uses SandyBridge CPUs, we will leave SWR enabled
# by default and set the OSPray architecture to AVX.
#
# msub -v MACHINE=moonlight,COMP=intel,COMP_VER=16.0.3,MPI=impi,MPI_VER=5.1.3,OSPRAY=AVX,EXTRA_OPTS="-Dsuperbuild_download_location=/path/to/downloads" /path/to/superbuild/source/Scripts/sites/LANL-TOSS2-Build.moab
# msub -v BASEDIR=/usr/projects/packages/hpc_paraview/superbuild/build/moonlight,COMP=intel,COMP_VER=16.0.3,MPI=impi,MPI_VER=5.1.3,OSPRAY=AVX,EXTRA_OPTS="-Dsuperbuild_download_location=/path/to/downloads" /path/to/superbuild/source/Scripts/sites/LANL-TOSS2-Build.moab
#
# This will generate a logfile called moonlight.5.1.2-osmesa_intel-16.0.3_impi-5.1.3.out
# The build will be located in /usr/projects/packages/hpc_paraview/superbuild/build/moonlight/5.1.2-osmesa_intel-16.0.3_impi-5.1.3
......@@ -36,7 +35,7 @@
usage()
{
echo "This build script requires thr following variables to be set:"
echo " MACHINE - Machine name being built for"
echo " BASEDIR - The base directory to start the build in"
echo " COMP - Compiler to build with (gcc or intel)"
echo " COMP_VER - Compiler version to build with"
echo " MPI - MPI distribution to use (openmpi or impi)"
......@@ -69,7 +68,7 @@ check_var()
fi
}
check_var MACHINE
check_var BASEDIR
check_var COMP
check_var COMP_VER
check_var MPI
......@@ -78,65 +77,13 @@ check_var SWR 1
check_var OSPRAY ALL
check_var EXTRA_OPTS ""
case ${COMP} in
*)
COMP_MOD=${COMP}
;;
esac
SRCDIR=/usr/projects/packages/hpc_paraview/superbuild/source/ParaViewSuperbuild
case "${MPI}" in
impi|intel|intel-mpi*)
MPI_MOD=intel-mpi
MPI=impi
;;
*)
MPI_MOD=${MPI}
;;
esac
module purge
# Set newer GCC for binutils and C++11 headers
export PATH=/opt/rh/devtoolset-3/root/usr/bin:$PATH
module load ${COMP_MOD}/${COMP_VER}
module load ${MPI_MOD}/${MPI_VER}
module load friendly-testing cmake/3.6.0 git/2.3.3
BASENAME=5.1.2-osmesa_${COMP}-${COMP_VER}_${MPI}-${MPI_VER}
BASEDIR=/usr/projects/packages/hpc_paraview/superbuild
SRCDIR=${BASEDIR}/source/ParaViewSuperbuild
BINDIR=${BASEDIR}/build/${MACHINE}/${BASENAME}
LOG=${MACHINE}.${BASENAME}.out
# Make sure we use the correct MPI wrappers
if [ "${MPI}" == "impi" ] && [ "${COMP}" == "intel" ]
then
export MPICC=mpiicc MPICXX=mpiicpc MPIFC=mpiifort
MPI_C_ARGS="-DMPI_C_COMPILER:FILEPATH=$(which mpiicc)"
MPI_CXX_ARGS="-DMPI_CXX_COMPILER:FILEPATH=$(which mpiicpc)"
MPI_F_ARGS="-DMPI_Fortran_COMPILER:FILEPATH=$(which mpiifort)"
EXTRA_OPTS="${EXTRA_OPTS} ${MPI_C_ARGS} ${MPI_CXX_ARGS} ${MPI_F_ARGS}"
fi
if [ $SWR -eq 1 ]
then
EXTRA_OPTS="${EXTRA_OPTS} -DMESA_SWR_ENABLED=ON"
else
EXTRA_OPTS="${EXTRA_OPTS} -DMESA_SWR_ENABLED=OFF"
fi
EXTRA_OPTS="${EXTRA_OPTS} -DOSPRAY_BUILD_ISA=${OSPRAY}"
mkdir -p ${BINDIR}
cd ${BINDIR}
mkdir -p ${BASEDIR}
cd ${BASEDIR}
# This works around a cosmotools linker error. Still not sure why paraview has the
# associated linking problem but this seems to fix it
export LD_FLAGS="${LDFLAGS} -Wl,--allow-shlib-undefined"
cmake \
-DPARAVIEWSDK_PACKAGE_FILE_NAME=${BASENAME} \
-C${SRCDIR}/cmake/sites/LANL-TOSS2-Shared.cmake \
${EXTRA_OPTS} ${SRCDIR} 2>&1 | tee ~/${LOG}
make 2>&1 | tee -a ~/${LOG}
ctest -R cpack-paraviewsdk-TGZ 2>&1 | tee -a ~/${LOG}
${SRCDIR}/Scripts/sites/LANL-TOSS2-Build.sh ${COMP} ${COMP_VER} ${MPI} ${MPI_VER} ${SWR} ${OSPRAY} ${EXTRA_OPTS}
#!/bin/bash
if [ $# -lt 6 ]
then
echo "Usage: $0 compiler compiler_version mpi mpi_version swr ospray [extra cmake args]"
exit 1
fi
COMP=$1
COMP_VER=$2
MPI=$3
MPI_VER=$4
SWR=$5
OSPRAY=$6
shift 6
case ${COMP} in
*)
COMP_MOD=${COMP}
;;
esac
case "${MPI}" in
impi|intel|intel-mpi*)
MPI_MOD=intel-mpi
MPI=impi
;;
*)
MPI_MOD=${MPI}
;;
esac
module purge
module load friendly-testing
module load cmake/3.6.1 git/2.3.3
module load ${COMP_MOD}/${COMP_VER}
module load ${MPI_MOD}/${MPI_VER}
module list
# The paths get mucked with a bit later so this just makes sure we use the
# right compiler when CMake is called
case ${COMP} in
intel)
export CC=$(which icc) CXX=$(which icpc) FC=$(which ifort)
;;
gcc)
export CC=$(which gcc) CXX=$(which g++) FC=$(which gfortran)
;;
esac
BASENAME=5.1.2-osmesa_${COMP}-${COMP_VER}_${MPI}-${MPI_VER}
SRC=$(readlink -f $(dirname $(readlink -f $0))/../..)
DOWNLOADS=${PWD}/downloads
mkdir -p ${BASENAME}
cd ${BASENAME}
# Turn on SWR
if [ $SWR -eq 1 ]
then
EXTRA_OPTS="${EXTRA_OPTS} -DMESA_SWR_ENABLED=ON"
else
EXTRA_OPTS="${EXTRA_OPTS} -DMESA_SWR_ENABLED=OFF"
fi
# Set the requested OSPray backend
EXTRA_OPTS="${EXTRA_OPTS} -DOSPRAY_BUILD_ISA=${OSPRAY}"
# Place newer binutils in the path for AVX2 code generation
export PATH=/opt/rh/devtoolset-3/root/usr/bin:${PATH}
if [ "${COMP}" == "intel" ]
then
# Enable proper C++11/14 with a newer GCC (4.9)
# Intel >= 16.0.3 already does this in the module file
# Intel < 16.0.3 *should be able to use newer GCC headers
# but in reality it breaks with anything 5.x or newer so we
# use the the GCC from the RedHat SCL devtoolset-3
if [[ "${COMP_VER}" < "16.0.3" ]]
then
export GCC=/opt/rh/devtoolset-3/root/usr/bin
export LD_LIBRARY_PATH=${GCC}/lib64:${LD_LIBRARY_PATH}
fi
# Intel MPI has compier wrappers for both GCC and Intel so make sure we
# pick the right one
if [ "${MPI}" == "impi" ]
then
export MPICC=mpiicc MPICXX=mpiicpc MPIFC=mpiifort
MPI_C_ARGS="-DMPI_C_COMPILER:FILEPATH=$(which mpiicc)"
MPI_CXX_ARGS="-DMPI_CXX_COMPILER:FILEPATH=$(which mpiicpc)"
MPI_F_ARGS="-DMPI_Fortran_COMPILER:FILEPATH=$(which mpiifort)"
EXTRA_OPTS="${EXTRA_OPTS} ${MPI_C_ARGS} ${MPI_CXX_ARGS} ${MPI_F_ARGS}"
fi
fi
echo ${BASENAME} > log.configure
cmake \
-DPARAVIEWSDK_PACKAGE_FILE_NAME=${BASENAME} \
-C${SRC}/cmake/sites/LANL-TOSS2-Shared.cmake \
${EXTRA_OPTS} "$@" ${SRC} 2>&1 | tee -a log.configure
if [ $? -ne 0 ]
then
exit 1
fi
echo ${BASENAME} > log.build
make 2>&1 | tee -a log.build
if [ $? -ne 0 ]
then
exit 1
fi
echo ${BASENAME} > log.package
ctest -R cpack-paraviewsdk-TGZ 2>&1 | tee -a log.package
if [ $? -ne 0 ]
then
exit 1
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment