Skip to content

Commit

Permalink
Add toolchain flag for MPICH device
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrack committed Oct 4, 2022
1 parent 77a50e6 commit 8b06a4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion tools/toolchain/install_cp2k_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,13 @@ The --with-PKG options follow the rules:
Default = system
--with-cmake Cmake utilities
Default = install
--with-openmpi OpenMPI, important if you want parallel version of CP2K.
--with-openmpi OpenMPI, important if you want a parallel version of CP2K.
Default = system
--with-mpich MPICH, MPI library like OpenMPI. one should
use only one of OpenMPI, MPICH or Intel MPI.
Default = system
--with-mpich-device Select the MPICH device, implies the use of MPICH as MPI library
Default = ch3
--with-intelmpi Intel MPI, MPI library like OpenMPI. one should
use only one of OpenMPI, MPICH or Intel MPI.
Default = system
Expand Down Expand Up @@ -334,6 +336,7 @@ enable_opencl="__FALSE__"
enable_cuda="__FALSE__"
enable_hip="__FALSE__"
export GPUVER="no"
export MPICH_DEVICE="ch3"
export TARGET_CPU="native"

# default for libint
Expand Down Expand Up @@ -501,6 +504,11 @@ while [ $# -ge 1 ]; do
--with-cmake*)
with_cmake=$(read_with "${1}")
;;
--with-mpich-device=*)
user_input="${1#*=}"
export MPICH_DEVICE="${user_input}"
export MPI_MODE=mpich
;;
--with-mpich*)
with_mpich=$(read_with "${1}")
if [ "${with_mpich}" != "__DONTUSE__" ]; then
Expand Down
4 changes: 2 additions & 2 deletions tools/toolchain/scripts/stage1/install_mpich.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ case "${with_mpich}" in
else
download_pkg_from_cp2k_org "${mpich_sha256}" "${mpich_pkg}"
fi
echo "Installing from scratch into ${pkg_install_dir}"
echo "Installing from scratch into ${pkg_install_dir} for MPICH device ${MPICH_DEVICE}"
[ -d mpich-${mpich_ver} ] && rm -rf mpich-${mpich_ver}
tar -xzf ${mpich_pkg}
cd mpich-${mpich_ver}
Expand All @@ -58,7 +58,7 @@ case "${with_mpich}" in
FCFLAGS="${FCFLAGS} ${compat_flag}" \
--without-x \
--enable-gl=no \
--with-device=ch3 \
--with-device=${MPICH_DEVICE} \
> configure.log 2>&1 || tail -n ${LOG_LINES} configure.log
make -j $(get_nprocs) > make.log 2>&1 || tail -n ${LOG_LINES} make.log
make install > install.log 2>&1 || tail -n ${LOG_LINES} install.log
Expand Down

0 comments on commit 8b06a4d

Please sign in to comment.