Commit ca2a0f75 authored by gsell's avatar gsell

amrex build-script added

parent 95aa4443
#!/bin/bash
#
# OPAL Toolchain Build recipe for AMReX.
#
# http://zlib.net
#
P=amrex
V=${AMREX_VERSION:-18.07}
trap "otb_exit" EXIT
FNAME="$P-$V.tar.gz"
DOWNLOAD_URL="https://github.com/AMReX-Codes/$P/archive/$V.tar.gz"
SRC_FILE="${OTB_DOWNLOAD_DIR}/${FNAME}"
# download
test -r "${SRC_FILE}" || curl -L --output "$_" "${DOWNLOAD_URL}" || exit ${OTB_ERR_DOWNLOAD}
# unpack
mkdir -p "${OTB_SRC_DIR}/$P" && cd "$_" || exit ${OTB_ERR_SYSTEM}
tar xvf "${SRC_FILE}" || exit ${OTB_ERR_UNTAR}
# configure
mkdir -p "${OTB_SRC_DIR}/$P/build" && cd "$_" || exit ${OTB_ERR_SYSTEM}
CC=mpicc CXX=mpicxx FC=mpif90 cmake \
"-DCMAKE_INSTALL_PREFIX:PATH=${OTB_PREFIX}" \
"-DENABLE_PARTICLES=1" \
"-DENABLE_LINEAR_SOLVERS=1" \
"-DENABLE_LINEAR_SOLVERS_LEGACY=1" \
"-DDEBUG=OFF" \
"-DDIM=3" \
"-DENABLE_PIC=0" \
"-DENABLE_MPI=1" \
"-DENABLE_OMP=0" \
"-DENABLE_DP=1" \
"-DENABLE_EB=OFF" \
"-DENABLE_FORTRAN_INTERFACES=ON" \
"-DENABLE_FBASELIB=1" \
"-DENABLE_AMRDATA=OFF" \
"-DENABLE_DP_PARTICLES=1" \
"-DENABLE_FPE=0" \
"-DENABLE_ASSERTION=OFF" \
"-DENABLE_BASE_PROFILE=OFF" \
"-DENABLE_TINY_PROFILE=OFF" \
"-DENABLE_TRACE_PROFILE=OFF" \
"-DENABLE_MEM_PROFILE=OFF" \
"-DENABLE_COMM_PROFILE=OFF" \
"-DENABLE_BACKTRACE=OFF" \
"-DENABLE_PROFPARSER=OFF" \
"-DCMAKE_BUILD_TYPE=Release" \
"${OTB_SRC_DIR}/$P/$P-$V" || exit ${OTB_ERR_CONFIGURE}
# compile & install
make -j ${NJOBS} || exit ${OTB_ERR_MAKE}
make install || exit ${OTB_ERR_INSTALL}
# Local Variables:
# mode: shell-script-mode
# sh-basic-offset: 8
# End:
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