Skip to content

Commit

Permalink
toolchain: add workarounds for gcc-10 compat in quip, plumed, mpich
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-zero committed Jul 31, 2020
1 parent 5d89a4e commit 4efc606
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
6 changes: 5 additions & 1 deletion tools/toolchain/scripts/install_mpich.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ case "$with_mpich" in
cd mpich-${mpich_ver}
unset F90
unset F90FLAGS
./configure --prefix="${pkg_install_dir}" --libdir="${pkg_install_dir}/lib" MPICC="" --without-x --enable-gl=no > configure.log 2>&1

# workaround for compilation with GCC-10, until properly fixed:
# https://github.com/pmodels/mpich/issues/4300
( "${FC}" --version | grep -Eq 'GNU.+\s10\.') && compat_flag="-fallow-argument-mismatch" || compat_flag=""
./configure --prefix="${pkg_install_dir}" --libdir="${pkg_install_dir}/lib" MPICC="" FFLAGS="${FCFLAGS} ${compat_flag}" FCFLAGS="${FCFLAGS} ${compat_flag}" --without-x --enable-gl=no > configure.log 2>&1
make -j $NPROCS > make.log 2>&1
make install > install.log 2>&1
cd ..
Expand Down
7 changes: 5 additions & 2 deletions tools/toolchain/scripts/install_plumed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ case "$with_plumed" in

echo "Installing from scratch into ${pkg_install_dir}"
cd plumed-${plumed_ver}
./configure CXX="${MPICXX}" --prefix=${pkg_install_dir} --libdir="${pkg_install_dir}/lib" > configure.log 2>&1
make -j $NPROCS > make.log 2>&1
# disable generating debugging infos for now to work around an issue in gcc-10.2:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96354
# note: some MPI wrappers carry a -g forward, thus stripping is not enough
./configure CXX="${MPICXX}" CXXFLAGS="${CXXFLAGS//-g/-g0}" --prefix=${pkg_install_dir} --libdir="${pkg_install_dir}/lib" > configure.log 2>&1
make VERBOSE=1 -j $NPROCS > make.log 2>&1
make install > install.log 2>&1
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/$(basename ${SCRIPT_NAME})"
fi
Expand Down
9 changes: 7 additions & 2 deletions tools/toolchain/scripts/install_quip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,14 @@ case "$with_quip" in
-e "s|\(QUIPPY_FCOMPILER *=\).*|\1 ${FC}|g" \
-e "s|\(QUIPPY_CPP *=\).*|\1 ${FC} -E -x f95-cpp-input|g" \
arch/Makefile.linux_${quip_arch}_gfortran

# workaround for compilation with GCC-10, until properly fixed:
# https://github.com/libAtoms/QUIP/issues/209
( "${FC}" --version | grep -Eq 'GNU.+\s10\.') && compat_flag="-fallow-argument-mismatch" || compat_flag=""

# enable debug symbols
echo "F95FLAGS += -g" >> arch/Makefile.linux_${quip_arch}_gfortran
echo "F77FLAGS += -g" >> arch/Makefile.linux_${quip_arch}_gfortran
echo "F95FLAGS += -g ${compat_flag}" >> arch/Makefile.linux_${quip_arch}_gfortran
echo "F77FLAGS += -g ${compat_flag}" >> arch/Makefile.linux_${quip_arch}_gfortran
echo "CFLAGS += -g" >> arch/Makefile.linux_${quip_arch}_gfortran
echo "CPLUSPLUSFLAGS += -g" >> arch/Makefile.linux_${quip_arch}_gfortran
export QUIP_ARCH=linux_${quip_arch}_gfortran
Expand Down

0 comments on commit 4efc606

Please sign in to comment.