Commit 2b11fdb3 authored by Chuck Atkins's avatar Chuck Atkins
Browse files

Added build scripts for the Andromeda cluster at Kitware

parent 9d1d786c
# General build settings
set(CMAKE_BUILD_TYPE Release CACHE STRING "")
set(BUILD_SHARED_LIBS 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_netcdf 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_silo ON CACHE BOOL "")
set(ENABLE_visitbridge ON CACHE BOOL "")
set(ENABLE_zlib ON CACHE BOOL "")
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_matplotlib ON CACHE BOOL "")
set(USE_SYSTEM_mpi ON CACHE BOOL "")
#set(USE_SYSTEM_netcdf ON CACHE BOOL "")
set(USE_SYSTEM_numpy ON CACHE BOOL "")
set(USE_SYSTEM_osmesa ON CACHE BOOL "")
set(USE_SYSTEM_png ON CACHE BOOL "")
set(USE_SYSTEM_python ON CACHE BOOL "")
set(USE_SYSTEM_zlib ON CACHE BOOL "")
# Make sure the final ParaView build uses the whole node
include(ProcessorCount)
ProcessorCount(N)
if(NOT N EQUAL 0)
set(PV_MAKE_NCPUS ${N} CACHE STRING "")
else()
set(PV_MAKE_NCPUS 5 CACHE STRING "")
endif()
# Specify where the necessary tarballs have beel downloaded to
set(download_location $ENV{HOME}/Code/ParaView/Superbuild/downloads
CACHE PATH "")
# Paraview details
set(ParaView_FROM_GIT OFF CACHE BOOL "")
#$ -S /bin/bash
#$ -N PVBuild
#$ -pe make 16
case ${PVMPI} in
mpich|openmpi)
PVMPI_MODULE=${PVMPI}-x86_64
;;
*)
echo "Error: MPI implementation must be specified in the PVMPI variable and must be one of mpich or openmpi."
exit 1
;;
esac
echo "Building on $(hostname -f)"
#source /etc/profile.d/modules.sh
module purge
module load ${PVMPI_MODULE}
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
export FC=/usr/bin/gfortran
#SCRATCH_DIR=/data/shared/scratch/${USER}
SCRATCH_DIR=/data/local/${USER}
mkdir -p ${SCRATCH_DIR}
SOURCE_DIR=${HOME}/Code/ParaView/Superbuild/source
BUILD_DIR=$(mktemp -d -p ${SCRATCH_DIR} --suffix=.pvbuild-${PVMPI}-shared)
INSTALL_DIR=/opt/Kitware/ParaView/4.3.1-osmesa/${PVMPI}_shared
cd ${BUILD_DIR}
# Configure
echo "Configuring..."
/opt/Kitware/CMake/3.2.3/bin/cmake \
-C${SOURCE_DIR}/CMake/Sites/Kitware-Andromeda-Shared.cmake \
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
${SOURCE_DIR}
# Build and install
echo "Building..."
make
# Install
echo "Installing..."
mkdir -p ${INSTALL_DIR}
make install
# Cleanup
echo "Cleaning up build directory ${BUILD_DIR}"
cd /tmp
rm -rf ${BUILD_DIR}
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