Skip to content

Commit

Permalink
Scripts: Updating the SEMS Modules based generic build script
Browse files Browse the repository at this point in the history
Added some explanation, added the generation of a "modules" file,
which can be used to reload all modules without rerunning configure.
Changed the default compiler to gcc/4.8.4 because it works well with
the default CUDA Cuda 7.5.18.
  • Loading branch information
crtrott committed Feb 4, 2016
1 parent 7187c1f commit f95dfd1
Showing 1 changed file with 33 additions and 9 deletions.
42 changes: 33 additions & 9 deletions sampleScripts/Sandia-SEMS/configure-all
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/bin/bash


# This script is a generic build script for Trilinos using the SEMS provided modules at Sandia
# It assumes you have the SEMS modules files as well as the Kokkos subcategory enabled
# Assuming basic SEMS Module usage has been set up you can add the Kokkos modules through
# source $SEMS_MODULE_ROOT/utils/sems-modules-init.sh kokkos
# The script also assumes BLAS and LAPACK are available in the system paths.
# A 'modules' file will be created which can be used to reload the same modules as used during configuration.

# Choose options below for configurations.
rm -f CMakeCache.txt;
rm -rf CMakeFiles
echo ""
Expand Down Expand Up @@ -31,10 +40,10 @@ COMPLEX=ON
#This is meant for Sandia SEMS module system and similar setups.
TPL_PATH=/projects/install/rhel6-x86_64/sems/tpl

#Options: gcc/4.7.2 gcc/4.8.4 gcc/4.9.2 gcc/5.1.0 intel/14.0.4 intel/15.0.5 clang/3.5.2 clang/3.6.1
COMPILER_SUFFIX=gcc/4.7.2
#Options: cuda/6.5.14 cuda/7.0.28
CUDA_SUFFIX=cuda/7.0.28
#Options: gcc/4.7.2 gcc/4.8.4 gcc/4.9.2 gcc/5.1.0 intel/14.0.4 intel/15.0.2 clang/3.5.2 clang/3.6.1
COMPILER_SUFFIX=gcc/4.8.4
#Options: cuda/6.5.14 cuda/7.0.28 cuda/7.5.18
CUDA_SUFFIX=cuda/7.5.18
#Options: openmpi/1.6.5 openmpi/1.8.7
MPI_SUFFIX=openmpi/1.8.7

Expand All @@ -45,8 +54,7 @@ BOOST_PATH=${TPL_PATH}/${BOOST_SUFFIX}/${COMPILER_SUFFIX}/base

#SuperLU is not correctly installed in the sems modules so use your own
SUPERLU_SUFFIX=superlu/4.3
SUPERLU_PATH=${HOME}/libs/${SUPERLU_SUFFIX}
#SUPERLU_PATH=${TPL_PATH}/${SUPERLU_SUFFIX}/${COMPILER_SUFFIX}/base
SUPERLU_PATH=${TPL_PATH}/${SUPERLU_SUFFIX}/${COMPILER_SUFFIX}/base

#Using HDF5 from sems
HDF5_SUFFIX=hdf5/1.8.12
Expand All @@ -65,18 +73,34 @@ ZLIB_PATH=${TPL_PATH}/${ZLIB_SUFFIX}/${COMPILER_SUFFIX}/base

module purge
module load cmake/2.8.12
if [ "${CUDA}" == 'ON' ]; then
if [ "${CUDA}" == "ON" ]; then
module load ${CUDA_SUFFIX}
module load ${COMPILER_SUFFIX}/${MPI_SUFFIX}/${CUDA_SUFFIX}
export OMPI_CXX=${TRILINOS_PATH}/packages/kokkos/config/nvcc_wrapper
else
module load ${COMPILER_SUFFIX}/${MPI_SUFFIX}
module load ${COMPILER_SUFFIX}/${MPI_SUFFIX}/${CUDA_SUFFIX}
module load ${CUDA_SUFFIX}
fi
module load ${BOOST_SUFFIX}/${COMPILER_SUFFIX}/base
module load ${HDF5_SUFFIX}/${COMPILER_SUFFIX}/${MPI_SUFFIX}
module load ${NETCDF_SUFFIX}/${COMPILER_SUFFIX}/parallel
module load ${ZLIB_SUFFIX}/${COMPILER_SUFFIX}/base

echo "module purge" > modules
echo "module load cmake/2.8.12" >> modules
if [ "${CUDA}" == "ON" ]; then
echo "module load ${CUDA_SUFFIX}" >> modules
echo "module load ${COMPILER_SUFFIX}/${MPI_SUFFIX}/${CUDA_SUFFIX}" >> modules
echo "export OMPI_CXX=${TRILINOS_PATH}/packages/kokkos/config/nvcc_wrapper" >> modules
else
echo "module load ${COMPILER_SUFFIX}/${MPI_SUFFIX}/${CUDA_SUFFIX}" >> modules
echo "module load ${CUDA_SUFFIX}" >> modules
fi
echo "module load ${BOOST_SUFFIX}/${COMPILER_SUFFIX}/base" >> modules
echo "module load ${HDF5_SUFFIX}/${COMPILER_SUFFIX}/${MPI_SUFFIX}" >> modules
echo "module load ${NETCDF_SUFFIX}/${COMPILER_SUFFIX}/parallel" >> modules
echo "module load ${ZLIB_SUFFIX}/${COMPILER_SUFFIX}/base" >> modules

# CMAKE Command structured
#
# Basic Options for backends (Enable OpenMP etc.)
Expand Down Expand Up @@ -117,7 +141,7 @@ cmake \
-D TPL_ENABLE_MPI=ON \
-D MPI_EXEC_POST_NUMPROCS_FLAGS:STRING="-bind-to;socket;-map-by;socket" \
-D TPL_ENABLE_BinUtils=OFF \
-D TPL_ENABLE_SuperLU=ON \
-D TPL_ENABLE_SuperLU=OFF \
-D TPL_SuperLU_LIBRARIES:STRING="${SUPERLU_PATH}/lib/libsuperlu.a" \
-D TPL_SuperLU_INCLUDE_DIRS:STRING="${SUPERLU_PATH}/include" \
-D TPL_ENABLE_BLAS=ON \
Expand Down

0 comments on commit f95dfd1

Please sign in to comment.