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

Build scripts for Cray on DoD machines

parent 383600fc
#!/bin/bash
if [ $# -lt 5 ]
then
echo "Usage: $0 compiler cpu compiler_version mpi mpi_version [extra cmake args]"
exit 1
fi
CPU=$1
COMP=$2
COMP_VER=$3
MPI=$4
MPI_VER=$5
shift 4
case "${COMP}" in
gcc|gnu)
COMP_MOD=gcc
PE_MOD=gnu
;;
*)
COMP_MOD=${COMP}
PE_MOD=${COMP}
;;
esac
case "${MPI}" in
cray|craympt)
MPI=craympt
MPI_MOD=cray-mpich
;;
*)
MPI_MOD=${MPI}
;;
esac
module purge
module load craype
module load craype-${CPU}
module load PrgEnv-${PE_MOD}
module swap ${COMP_MOD} ${COMP_MOD}/${COMP_VER}
module load ${MPI_MOD}/${MPI_VER}
module load cray-hdf5
module load cray-libsci
if [ "${COMP_MOD}" != "gcc" ]
then
# Also load GCC to get proper C++11 support
module load gcc/4.8.2
fi
module list
export CC=$(which cc) CXX=$(which CC) FC=$(which ftn)
export CRAYPE_LINK_TYPE=dynamic
BASENAME=5.1.2-osmesa_${COMP}-${COMP_VER}_${MPI}-${MPI_VER}
SRC=$(readlink -f $(dirname $(readlink -f $0))/../..)
mkdir -p ${BASENAME}
cd ${BASENAME}
export TMPDIR=/tmp/$USER
mkdir -p ${TMPDIR}
~/Code/CMake/build/master/bin/cmake \
-DPARAVIEWSDK_PACKAGE_FILE_NAME=${BASENAME} \
-C${SRC}/cmake/sites/DoD-CLE5-Shared.cmake \
-DSUPERBUILD_PROJECT_PARALLELISM=10 \
"$@" ${SRC} 2>&1 | tee log.configure
if [ ${PIPESTATUS[0]} -ne 0 ]
then
exit 1
fi
make 2>&1 | tee log.build
if [ ${PIPESTATUS[0]} -ne 0 ]
then
exit 1
fi
~/Code/CMake/build/master/bin/ctest -V -R cpack-paraviewsdk-TGZ 2>&1 | tee log.package
if [ ${PIPESTATUS[0]} -ne 0 ]
then
exit 1
fi
rm -rf ${TMPDIR}
# This is a cache file used for build configurations on
# the DoD SGI machines Topaz, Thunder, and Spirit
# General build settings
set(CMAKE_BUILD_TYPE Release CACHE STRING "")
set(BUILD_SHARED_LIBS ON CACHE BOOL "")
# Enable the appropriate packages
set(ENABLE_adios ON CACHE BOOL "")
set(ENABLE_boost ON CACHE BOOL "")
set(ENABLE_bzip2 ON CACHE BOOL "")
set(ENABLE_ffmpeg ON CACHE BOOL "")
set(ENABLE_freetype ON CACHE BOOL "")
set(ENABLE_hdf5 ON CACHE BOOL "")
set(ENABLE_lapack ON CACHE BOOL "")
set(ENABLE_libxml2 ON CACHE BOOL "")
set(ENABLE_matplotlib ON CACHE BOOL "")
set(ENABLE_mpi ON CACHE BOOL "")
set(ENABLE_numpy ON CACHE BOOL "")
set(ENABLE_osmesa ON CACHE BOOL "")
set(ENABLE_paraview ON CACHE BOOL "")
set(ENABLE_paraviewsdk ON CACHE BOOL "")
set(ENABLE_png ON CACHE BOOL "")
set(ENABLE_python ON CACHE BOOL "")
set(ENABLE_visitbridge ON CACHE BOOL "")
set(ENABLE_zlib ON CACHE BOOL "")
# These will get pulled from the compute node's userland
set(USE_SYSTEM_bzip2 ON CACHE BOOL "")
set(USE_SYSTEM_freetype ON CACHE BOOL "")
set(USE_SYSTEM_hdf5 ON CACHE BOOL "")
set(USE_SYSTEM_lapack ON CACHE BOOL "")
set(USE_SYSTEM_libxml2 ON CACHE BOOL "")
set(USE_SYSTEM_mpi ON CACHE BOOL "")
set(USE_SYSTEM_zlib ON CACHE BOOL "")
# Enable all architectures for OSPray
set(OSPRAY_BUILD_ISA ALL CACHE STRING "")
# Paraview details
set(paraview_FROM_GIT OFF CACHE BOOL "")
set(PARAVIEW_FREEZE_PYTHON ON CACHE BOOL "")
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