Skip to content

Commit

Permalink
toolchain: resolve macros in MATH_LIBS
Browse files Browse the repository at this point in the history
fixes #185
  • Loading branch information
dev-zero committed Feb 1, 2019
1 parent 24bbdec commit 3c22345
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/toolchain/scripts/install_pexsi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ case "$with_pexsi" in
-e "s|\(PEXSI_DIR *=\).*|\1 ${PWD}|g" \
-e "s|\(PEXSI_BUILD_DIR *=\).*|\1 ${pkg_install_dir}|g" \
-e "s|\(CPP_LIB *=\).*|\1 -lstdc++ ${MPI_LDFLAGS} ${MPI_LIBS} |g" \
-e "s|\(LAPACK_LIB *=\).*|\1 ${MATH_LDFLAGS} ${MATH_LIBS}|g" \
-e "s|\(LAPACK_LIB *=\).*|\1 ${MATH_LDFLAGS} $(resolve_string "${MATH_LIBS}")|g" \
-e "s|\(BLAS_LIB *=\).*|\1|g" \
-e "s|\(\bMETIS_LIB *=\).*|\1 ${METIS_LDFLAGS} ${METIS_LIBS}|g" \
-e "s|\(PARMETIS_LIB *=\).*|\1 ${PARMETIS_LDFLAGS} ${PARMETIS_LIBS}|g" \
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchain/scripts/install_quip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ case "$with_quip" in
echo "CPLUSPLUSFLAGS += -g" >> arch/Makefile.linux_${quip_arch}_gfortran
export QUIP_ARCH=linux_${quip_arch}_gfortran
# hit enter a few times to accept defaults
echo -e "${MATH_LDFLAGS} ${MATH_LIBS} \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" | make config > configure.log
echo -e "${MATH_LDFLAGS} $(resolve_string "${MATH_LIBS}") \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" | make config > configure.log
# make -j does not work :-(
make > make.log 2>&1
! [ -d "${pkg_install_dir}/include" ] && mkdir -p "${pkg_install_dir}/include"
Expand Down
3 changes: 2 additions & 1 deletion tools/toolchain/scripts/install_superlu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ case "$with_superlu" in
tar -xzf superlu_dist_${superlu_ver}.tar.gz
cd SuperLU_DIST_${superlu_ver}
mv make.inc make.inc.orig
# using the OMP-based math libraries here (if available) for the executables since PARMETS/METIS also use OMP if available
cat <<EOF >> make.inc
PLAT=_${OPENBLAS_ARCH}
DSUPERLULIB= ${PWD}/lib/libsuperlu_dist.a
LIBS=\$(DSUPERLULIB) ${PARMETIS_LDFLAGS} ${METIS_LDFLAGS} ${MATH_LDFLAGS} ${PARMETIS_LIBS} ${METIS_LIBS} ${MATH_LIBS} -lgfortran
LIBS=\$(DSUPERLULIB) ${PARMETIS_LDFLAGS} ${METIS_LDFLAGS} ${MATH_LDFLAGS} ${PARMETIS_LIBS} ${METIS_LIBS} $(resolve_string "${MATH_LIBS}" OMP) -lgfortran
ARCH=ar
ARCHFLAGS=cr
RANLIB=ranlib
Expand Down

0 comments on commit 3c22345

Please sign in to comment.