Skip to content

Commit

Permalink
Remove unnecessary dbg outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mtaillefumier authored and oschuett committed Mar 20, 2019
1 parent 7943cbc commit e9b6eed
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 20 deletions.
4 changes: 2 additions & 2 deletions tools/toolchain/scripts/install_fftw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ case "$with_fftw" in
[ -d fftw-${fftw_ver} ] && rm -rf fftw-${fftw_ver}
tar -xzf fftw-${fftw_ver}.tar.gz
cd fftw-${fftw_ver}
if [ -n ${ENABLE_MPI} ] ; then
if [ "$ENABLE_MPI" != "no" ] ; then
# fftw has mpi support but not compiled by default. so compile it if we build with mpi.
# it will create a second library to link with if needed
./configure --prefix=${pkg_install_dir} --libdir="${pkg_install_dir}/lib" --enable-openmp --enable-mpi > configure.log 2>&1
Expand All @@ -56,7 +56,7 @@ case "$with_fftw" in
echo "==================== Finding FFTW from system paths ===================="
check_lib -lfftw3 "FFTW"
[ $ENABLE_OMP = "__TRUE__" ] && check_lib -lfftw3_omp "FFTW"
[ $ENABLE_MPI = "__TRUE__" ] && check_lib -lfftw3_mpi "FFTW"
check_lib -lfftw3_mpi "FFTW"
add_include_from_paths FFTW_CFLAGS "fftw3.h" $INCLUDE_PATHS
add_lib_from_paths FFTW_LDFLAGS "libfftw3.*" $LIB_PATHS
;;
Expand Down
18 changes: 14 additions & 4 deletions tools/toolchain/scripts/install_libvdwxc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ with_libvdwxc=${1:-__INSTALL__}

[ -f "${BUILDDIR}/setup_libvdwxc" ] && rm "${BUILDDIR}/setup_libvdwxc"

if [ "$MPI_MODE" = "no" ] && [ "$ENABLE_OMP" = "__FALSE__" ] && [ $with_sirius ="__FALSE__" ] ; then
report_warning $LINENO "MPI and OpenMP and SIRIUS are disabled, skipping libvdwxc installation"
exit 0
fi

! [ -d "${BUILDDIR}" ] && mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}"
case "$with_libvdwxc" in
Expand Down Expand Up @@ -55,10 +60,15 @@ case "$with_libvdwxc" in
patch -p1 < ../"${patch##*/}"
done
unset MPICC MPICXX MPIF90 MPIFC MPIF77
./autogen.sh
CC=mpicc FC=mpifort ./configure --prefix="${pkg_install_dir}" --with-fftw3 --disable-shared --with-mpi
make -j
make install
./autogen.sh > configure.log 2>&1
if [ "$MPI_MODE" = "no" ]; then
# compile libvdwxc without mpi support since fftw (or mkl) do not have mpi support activated
./configure --prefix="${pkg_install_dir}" --with-fftw3 --disable-shared --without-mpi >> configure.log 2>&1
else
CC=mpicc FC=mpifort ./configure --prefix="${pkg_install_dir}" --with-fftw3 --disable-shared --with-mpi >> configure.log 2>&1
fi
make -j > compile.log 2>&1
make install > compile.log 2>&1
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/$(basename ${SCRIPT_NAME})"
fi

Expand Down
28 changes: 14 additions & 14 deletions tools/toolchain/scripts/install_sirius.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ SIRIUS_CFLAGS=''
SIRIUS_LDFLAGS=''
SIRIUS_LIBS=''

export
! [ -d "${BUILDDIR}" ] && mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}"
case "$with_sirius" in
Expand Down Expand Up @@ -90,6 +89,7 @@ case "$with_sirius" in
[ -d sirius-${sirius_ver} ] && rm -rf sirius-${sirius_ver}
tar -xzf SIRIUS-${sirius_ver}.tar.gz
cd SIRIUS-${sirius_ver}
cd src && sed -i -e "s/desciption/description/g" options.json && cd ..
rm -Rf build
mkdir build
cd build
Expand All @@ -101,7 +101,6 @@ case "$with_sirius" in
COMPILATION_OPTIONS="-DUSE_ELPA=ON -DELPA_INCLUDE_DIR=${ELPAROOT}/include/elpa-${ELPAVERSION}/elpa $COMPILATION_OPTIONS"
fi

echo "scalapack : $SCALAPACK_CFLAGS"
if [ -n "$SCALAPACK_LIBS" ] ; then
export SCALAPACK_LIB="$SCALAPACK_LIBS"
if [ -s "$SCALAPACKROOT" ] ; then
Expand Down Expand Up @@ -131,19 +130,20 @@ case "$with_sirius" in
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="${SIRIUS_DBG}" \
-DCMAKE_CXX_COMPILER=mpic++ \
-DCMAKE_C_COMPILER=mpicc \
${COMPILATION_OPTIONS} ..
make -C src > compile.log

install -d ${pkg_install_dir}/include #>> install.log 2>&1
install -d ${pkg_install_dir}/lib #>> install.log 2>&1
cp -R ../src/* ${pkg_install_dir}/include
install -m 644 src/*.a ${pkg_install_dir}/lib #>> install.log 2>&1
install -m 644 src/mod_files/*.mod ${pkg_install_dir}/include #>> install.log 2>&1
${COMPILATION_OPTIONS} .. > compile.log 2>&1
make -C src >> compile.log 2>&1

install -d ${pkg_install_dir}/include >> install.log 2>&1
install -d ${pkg_install_dir}/lib >> install.log 2>&1
cp -R ../src/* ${pkg_install_dir}/include >> install.log 2>&1
install -m 644 src/*.a ${pkg_install_dir}/lib >> install.log 2>&1
install -m 644 src/mod_files/*.mod ${pkg_install_dir}/include >> install.log 2>&1
cd ..

# now do we have cuda as well

if [ "$ENABLE_CUDA" = "__TRUE__" ] ; then
[ -d build-cuda ] && rm -rf "build-cuda"
mkdir build-cuda
cd build-cuda
cmake -DCMAKE_INSTALL_PREFIX=${pkg_install_dir} \
Expand All @@ -152,10 +152,10 @@ case "$with_sirius" in
-DUSE_CUDA=ON \
-DGPU_MODEL=P100 \
-DCMAKE_CXX_COMPILER=mpic++ \
-DCMAKE_C_COMPILER=mpicc ${COMPILATION_OPTIONS} ..
make -C src
install -m 644 src/*.a ${pkg_install_dir}/lib/cuda #>> install.log 2>&1
install -m 644 src/mod_files/*.mod ${pkg_install_dir}/include/cuda #>> install.log 2>&1
-DCMAKE_C_COMPILER=mpicc ${COMPILATION_OPTIONS} .. >> compile.log 2>&1
make -C src >> compile.log 2>&1
install -m 644 src/*.a ${pkg_install_dir}/lib/cuda >> install.log 2>&1
install -m 644 src/mod_files/*.mod ${pkg_install_dir}/include/cuda >> install.log 2>&1
SIRIUS_CUDA_LDFLAGS="-L'${pkg_install_dir}/lib/cuda' -Wl,-rpath='${pkg_install_dir}/lib/cuda'"
cd ..
fi
Expand Down

0 comments on commit e9b6eed

Please sign in to comment.