Skip to content

Commit

Permalink
Disable OpenMP only for Cray
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrack committed Jan 5, 2022
1 parent 6fa5bfa commit bf46389
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
13 changes: 9 additions & 4 deletions tools/toolchain/scripts/stage5/install_elpa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,15 @@ case "$with_elpa" in
patch -p1 < "${patch}"
done

enable_openmp="yes"

# specific settings needed on CRAY Linux Environment
if [ ${CRAY_PRGENVCRAY} ]; then
# extra LDFLAGS needed
cray_ldflags="-dynamic"
if [ "$ENABLE_CRAY" = "__TRUE__" ]; then
if [ ${CRAY_PRGENVCRAY} ]; then
# extra LDFLAGS needed
cray_ldflags="-dynamic"
fi
enable_openmp="no"
fi

# ELPA-2017xxxx enables AVX2 by default, switch off if machine doesn't support it.
Expand Down Expand Up @@ -109,7 +114,7 @@ case "$with_elpa" in
cd "build_${TARGET}"
../configure --prefix="${pkg_install_dir}/${TARGET}/" \
--libdir="${pkg_install_dir}/${TARGET}/lib" \
--enable-openmp=no \
--enable-openmp=${enable_openmp} \
--enable-shared=no \
--enable-static=yes \
${config_flags} \
Expand Down
11 changes: 5 additions & 6 deletions tools/toolchain/scripts/stage7/install_libvdwxc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ case "$with_libvdwxc" in
for patch in "${patches[@]}"; do
patch -p1 < ../"${patch##*/}"
done
unset MPICC MPICXX MPIF90 MPIFC MPIF77
# unset MPICC MPICXX MPIF90 MPIFC MPIF77
if [ "$MPI_MODE" = "no" ]; then
# compile libvdwxc without mpi support since fftw (or mkl) do not have mpi support activated
./configure \
Expand All @@ -80,13 +80,12 @@ case "$with_libvdwxc" in
--without-mpi \
>> configure.log 2>&1
else
CC="${MPICC}" FC="${MPIFC}" ./configure \
./configure \
FFTW3_INCLUDES="-I${FFTW_ROOT}/include" \
FFTW3_LIBS="-L${FFTW_ROOT}/lib" \
--prefix="${pkg_install_dir}" \
--libdir="${pkg_install_dir}/lib" \
--disable-shared \
--with-mpi \
FFTW3_LIBS="$(resolve_string "${FFTW3_LIBS}" "MPI")" \
>> configure.log 2>&1
> configure.log 2>&1
fi
make -j $(get_nprocs) > compile.log 2>&1
make install > compile.log 2>&1
Expand Down

0 comments on commit bf46389

Please sign in to comment.