Commit 29cf126e authored by Chuck Atkins's avatar Chuck Atkins
Browse files

Add CMake config and build scripts for Trinity

parent d3016921
# Tarballs needing to be downloaded:
# boost
# matplotlib
# numpy
# osmesa
# paraview
# python
# visitbridge
set(CMAKE_BUILD_TYPE Release CACHE STRING "")
if("$ENV{CRAYPE_LINK_TYPE}" STREQUAL "dynamic")
set(BUILD_SHARED_LIBS ON CACHE BOOL "")
set(LIB_EXT ".so")
else()
set(BUILD_SHARED_LIBS OFF CACHE BOOL "")
set(LIB_EXT ".a")
endif()
set(ENABLE_boost ON CACHE BOOL "")
set(ENABLE_bzip2 ON CACHE BOOL "")
set(ENABLE_freetype ON CACHE BOOL "")
set(ENABLE_hdf5 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_boost ON CACHE BOOL "")
set(USE_SYSTEM_bzip2 ON CACHE BOOL "")
set(USE_SYSTEM_freetype ON CACHE BOOL "")
set(USE_SYSTEM_libxml2 ON CACHE BOOL "")
set(USE_SYSTEM_matplotlib ON CACHE BOOL "")
set(USE_SYSTEM_numpy ON CACHE BOOL "")
set(USE_SYSTEM_python ON CACHE BOOL "")
set(USE_SYSTEM_zlib ON CACHE BOOL "")
# CDIReader plugin is broken when using the Cray HDF5 library with
# VTK's internal netcdf
set(PV_EXTRA_CMAKE_ARGS -DPARAVIEW_BUILD_PLUGIN_CDIReader:BOOL=OFF)
# Set the OSMesa options in the actual build script as thier location will
# be different on every machine
#set(USE_SYSTEM_osmesa ON CACHE BOOL "")
#set(osmesa_base /scratch1/users/atkins3/openswr/avx2)
#set(OSMESA_INCLUDE_DIR ${osmesa_base}/include CACHE PATH "")
#set(OSMESA_LIBRARY ${osmesa_base}/lib/libOSMesa.so CACHE FILEPATH "")
# This comes form the cray-hdf5 module
set(USE_SYSTEM_hdf5 ON CACHE BOOL "")
# This comes from the cray-mpich module
set(USE_SYSTEM_mpi ON CACHE BOOL "")
find_program(MPIEXEC aprun)
# Make sure the final ParaView build uses the whole node
set(PV_MAKE_NCPUS 20 CACHE STRING "")
# Download location
set(download_location $ENV{HOME}/Code/ParaView/Superbuild/downloads
CACHE STRING "")
set(ParaView_FROM_GIT OFF CACHE BOOL "")
#!/bin/bash
# This is used to build ParaView on Gadget / Trinity
# Validate arguments
if [ $# -ne 3 ]
then
echo "$(basename $0) compiler compver install_dir"
exit 1
fi
COMP=$1
case $COMP in
intel) COMPMOD=intel
;;
gnu) COMPMOD=gcc
;;
esac
COMPVER=$2
INST_DIR=$3
. /opt/modules/default/init/bash
# Start with a pristine environment
module purge 1>/dev/null 2>&1
# Load the compilers
module load modules
module load craype
module load PrgEnv-${COMP}
module swap ${COMPMOD} ${COMPMOD}/${COMPVER}
module load craype-haswell
export CRAYPE_LINK_TYPE=dynamic
# Make sure the compiler vars contain the full path to the cray wrappers
export CC=$(which cc)
export CXX=$(which CC)
export FC=$(which ftn)
# Load the Cray-provided libraries
module load cray-mpich
module load cray-hdf5
# Used by the CMake FindHDF5.cmake module
export HDF5_ROOT=${HDF5_DIR}
# Run the build steps
SOURCE_DIR=${HOME}/Code/ParaView/Superbuild/source
BUILD_DIR=/tmp/scratch/pv-build
mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}
# Configure
osmesa_base=/scratch1/users/paraview/haswell/openswr-mesa-11.2.20162201git
$HOME/Code/CMake/build/master/bin/cmake \
-C${SOURCE_DIR}/CMake/Sites/Cray-CLE6-Shared.cmake \
-DCMAKE_INSTALL_PREFIX=${INST_DIR} \
-DUSE_SYSTEM_osmesa:BOOL=ON \
-DPARAVIEW_RENDERING_BACKEND:STRING=OpenGL2 \
-DOSMESA_INCLUDE_DIR:PATH=${osmesa_base}/include \
-DOSMESA_LIBRARY:FILEPATH=${osmesa_base}/lib/libOSMesa.so \
${SOURCE_DIR}
# Make
make install
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