#PACKAGES="${PACKAGES} once:boost"
#PACKAGES="${PACKAGES} once:numdiff"
#PACKAGES="${PACKAGES} once:openblas"
+#PACKAGES="${PACKAGES} once:scalapack"
# These packages are not dependencies but are tools used for deal.II development:
#PACKAGES="${PACKAGES} once:astyle"
#PACKAGES="${PACKAGES} once:ginkgo"
#PACKAGES="${PACKAGES} once:gmsh"
#PACKAGES="${PACKAGES} once:gsl"
+#PACKAGES="${PACKAGES} once:mumps"
PACKAGES="${PACKAGES} once:opencascade"
PACKAGES="${PACKAGES} once:parmetis"
#PACKAGES="${PACKAGES} once:sundials"
--- /dev/null
+################################################################################
+## MUMPS ##
+################################################################################
+
+VERSION=5.4.0.5
+EXTRACTSTO=mumps-${VERSION}
+
+NAME=v${VERSION}
+PACKING=.tar.gz
+
+SOURCE=https://github.com/scivision/mumps/archive/
+CHECKSUM=0cd3bd9ad9860f7c0092cd561931a36e
+
+BUILDCHAIN=cmake
+
+BUILDDIR=${BUILD_PATH}/mumps-${VERSION}
+INSTALL_PATH=${INSTALL_PATH}/mumps-${VERSION}
+
+# Set compilers & compiler options
+if [ ! -z "${CC}" ]; then
+ CONFOPTS="${CONFOPTS} \
+ -D CMAKE_C_COMPILER=${CC}"
+fi
+
+if [ ! -z "${CXX}" ]; then
+ CONFOPTS="${CONFOPTS} \
+ -D CMAKE_CXX_COMPILER=${CXX}"
+fi
+
+if [ ! -z "${FC}" ]; then
+ CONFOPTS="${CONFOPTS} \
+ -D CMAKE_Fortran_COMPILER=${FC}"
+fi
+
+CONFOPTS="${CONFOPTS} \
+ -D CMAKE_C_FLAGS:STRING='-fPIC -g -O3' \
+ -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON"
+
+if [ ${MKL} = ON ]; then
+ # When MKL is provided, MUMPS will search for the required packages by itself.
+ # Therefore we only need to set MKLROOT.
+ CONFOPTS="${CONFOPTS} \
+ -D MKLROOT=${MKL_DIR}"
+else
+ if [ ! -z "${BLAS_DIR}" ]; then
+ CONFOPTS="${CONFOPTS} \
+ -D pc_blas_LIBRARY_DIRS=${BLAS_DIR}/lib "
+ fi
+
+ if [ ! -z "${LAPACK_DIR}" ]; then
+ CONFOPTS="${CONFOPTS} \
+ -D pc_lapack_LIBRARY_DIRS=${LAPACK_DIR}/lib"
+ fi
+
+ if [ ! -z "${SCALAPACK_DIR}" ]; then
+ CONFOPTS="${CONFOPTS} \
+ -D pc_scalapack_LIBRARY_DIRS=${SCALAPACK_DIR}/lib"
+ else
+ # auto build missing packages
+ CONFOPTS="${CONFOPTS} -D autobuild=true"
+ fi
+fi
+
+# Set metis directories
+if [ ! -z "${METIS_DIR}" ]; then
+ CONFOPTS="${CONFOPTS} \
+ -D metis=true \
+ -D METIS_LIBRARY=${METIS_DIR}/lib/libmetis.so \
+ -D METIS_INCLUDE_DIR=${METIS_DIR}/include \
+ -D PARMETIS_LIBRARY=${PARMETIS_DIR}/lib/libparmetis.so "
+fi
+
+
+package_specific_register () {
+ export MUMPS_DIR=${INSTALL_PATH}
+}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${EXTRACTSTO}
+ rm -f $CONFIG_FILE
+ echo "
+export MUMPS_DIR=${INSTALL_PATH}
+" >> $CONFIG_FILE
+}
${CONFOPTS} \
--with-parmetis-dir=${PARMETIS_DIR} \
--with-metis-dir=${PARMETIS_DIR}"
+fi
+
+if [ ! -z "${SCALAPACK_DIR}" ]; then
+ cecho ${INFO} "PETSc: configuration with SCALAPACK"
+ CONFOPTS="\
+ ${CONFOPTS} \
+ --with-scalapack-dir=${SCALAPACK_DIR}"
+else
+ CONFOPTS="${CONFOPTS} --download-scalapack=1"
+fi
- for external_pkg in scalapack mumps; do
- CONFOPTS="${CONFOPTS} --download-${external_pkg}=1"
- done
+if [ ! -z "${MUMPS_DIR}" ]; then
+ cecho ${INFO} "PETSc: configuration with MUMPS"
+ CONFOPTS="${CONFOPTS} \
+ --with-mumps-dir=${MUMPS_DIR}"
+else
+ CONFOPTS="${CONFOPTS} --download-mumps=1"
fi
#########################################################################
package_specific_register () {
export PETSC_DIR=${INSTALL_PATH}
- if [ ! -z "${PARMETIS_DIR}" ]; then
+ if [ ! -z "${SCALAPACK_DIR}" ]; then
export SCALAPACK_DIR=${INSTALL_PATH}
fi
}
echo "
export PETSC_DIR=${INSTALL_PATH}
" >> $CONFIG_FILE
- if [ ! -z "${PARMETIS_DIR}" ]; then
+ if [ ! -z "${SCALAPACK_DIR}" ]; then
echo "export SCALAPACK_DIR=${INSTALL_PATH}" >> $CONFIG_FILE
fi
}
--- /dev/null
+################################################################################
+## ScaLAPACK ##
+################################################################################
+
+VERSION=2.1.0
+EXTRACTSTO=scalapack-${VERSION}
+
+NAME=v${VERSION}
+PACKING=.tar.gz
+
+SOURCE=https://github.com/Reference-ScaLAPACK/scalapack/archive/
+CHECKSUM=e9ae970238030fa1e8ee022a9d3e6fbb
+
+BUILDCHAIN=cmake
+
+BUILDDIR=${BUILD_PATH}/scalapack-${VERSION}
+INSTALL_PATH=${INSTALL_PATH}/scalapack-${VERSION}
+
+
+
+# Set compilers & compiler options
+if [ ! -z "${CC}" ]; then
+ CONFOPTS="${CONFOPTS} \
+ -D CMAKE_C_COMPILER=${CC}"
+fi
+
+if [ ! -z "${CXX}" ]; then
+ CONFOPTS="${CONFOPTS} \
+ -D CMAKE_CXX_COMPILER=${CXX}"
+fi
+
+if [ ! -z "${FC}" ]; then
+ CONFOPTS="${CONFOPTS} \
+ -D CMAKE_Fortran_COMPILER=${FC}"
+fi
+
+# Set Fortran flags
+if [ -n ${FC} ]; then
+ FORTRAN_MAJOR_VERSION=$(echo __GNUC__ | ${FC} -E -xc - | tail -n 1)
+ if [ ${FORTRAN_MAJOR_VERSION} > 9 ]; then
+ CONFOPTS="${CONFOPTS} \
+ -D CMAKE_Fortran_FLAGS='-g -O3 -fallow-argument-mismatch' "
+ else
+ CONFOPTS="${CONFOPTS} \
+ -D CMAKE_Fortran_FLAGS='-g -O3' "
+ fi
+fi
+
+
+# Set C flags
+CONFOPTS="${CONFOPTS} \
+ -D CMAKE_C_FLAGS:STRING='-fPIC -g -O3 ' \
+ -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON"
+
+# Set intel MKL options
+if [ "${MKL}" = "ON" ]; then
+ cecho ${INFO} "MUMPS: configuration with MKL"
+
+ CONFOPTS="\
+ ${CONFOPTS} \
+ -D MKLROOT=${MKL_DIR}"
+else
+ # Set blas and lapack directories (if MKL is not used)
+ if [ ! -z "${BLAS_DIR}" ]; then
+ cecho ${INFO} "SCALAPACK: configuration with BLAS_DIR=${BLAS_DIR}"
+ CONFOPTS="${CONFOPTS} \
+ -D BLAS_LIBRARY_DIRS:STRING=${BLAS_DIR}"
+ fi
+
+ if [ ! -z "${LAPACK_DIR}" ]; then
+ cecho ${INFO} "SCALAPACK: configuration with LAPACK_DIR=${LAPACK_DIR}"
+ CONFOPTS="${CONFOPTS} \
+ -D LAPACK_LIBRARY_DIRS:STRING=${LAPACK_DIR}"
+ fi
+fi
+
+# BLACS is provided by ScaLAPACK
+package_specific_register () {
+ export SCALAPACK_DIR=${INSTALL_PATH}
+ # only export the BLACS dir when MKL is not provided, so we do not override the MKL BLACS_DIR
+ if [ ${MKL} = OFF ]; then
+ export BLACS_DIR=${INSTALL_PATH}/lib
+ fi
+}
+
+package_specific_conf () {
+ # Generate configuration file
+ CONFIG_FILE=${CONFIGURATION_PATH}/${EXTRACTSTO}
+ rm -f $CONFIG_FILE
+ echo "
+export SCALAPACK_DIR=${INSTALL_PATH}
+" >> $CONFIG_FILE
+}
-D LAPACK_LIBRARY_DIRS:STRING=${LAPACK_DIR}"
fi
+if [ ! -z "${SCALAPACK_DIR}" ]; then
+ cecho ${INFO} "trilinos: configuration with SCALAPACK_DIR=${SCALAPACK_DIR}"
+ CONFOPTS="\
+ ${CONFOPTS} \
+ -D TPL_ENABLE_SCALAPACK:BOOL=ON \
+ -D SCALAPACK_LIBRARY_DIRS=${SCALAPACK_DIR}/lib"
+fi
+
+if [ ! -z "${MUMPS_DIR}" ]; then
+ cecho ${INFO} "trilinos: configuration with MUMPS_DIR=${MUMPS_DIR}"
+ CONFOPTS="${CONFOPTS} \
+ -D TPL_ENABLE_MUMPS=ON \
+ -D MUMPS_INCLUDE_DIRS:STRING=${MUMPS_DIR}/include \
+ -D MUMPS_LIBRARY_DIRS:STRING=${MUMPS_DIR}/lib"
+fi
+
# Set intel MKL options
if [ ${MKL} = ON ]; then
cecho ${INFO} "trilinos: configuration with MKL"