mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 06:05:29 -04:00
parent
77f1922497
commit
7a8bbbd46a
5 changed files with 11 additions and 6 deletions
|
|
@ -19,7 +19,7 @@ OPENBLAS_LIBCORE=${OPENBLAS_LIBCORE:-''}
|
|||
|
||||
# search paths
|
||||
SYS_INCLUDE_PATH=${SYS_INCLUDE_PATH:-'/usr/local/include:/usr/include'}
|
||||
SYS_LIB_PATH=${SYS_LIB_PATHS:-'/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:/lib64:/lib'}
|
||||
SYS_LIB_PATH=${SYS_LIB_PATHS:-'/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/aarch-linux-gnu:/lib64:/lib'}
|
||||
INCLUDE_PATHS=${INCLUDE_PATHS:-"CPATH SYS_INCLUDE_PATH"}
|
||||
LIB_PATHS=${LIB_PATHS:-'LD_LIBRARY_PATH LIBRARY_PATH LD_RUN_PATH SYS_LIB_PATH'}
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,12 @@ export MPICH_LIBS="${MPICH_LIBS}"
|
|||
export MPI_CFLAGS="${MPICH_CFLAGS}"
|
||||
export MPI_LDFLAGS="${MPICH_LDFLAGS}"
|
||||
export MPI_LIBS="${MPICH_LIBS}"
|
||||
export CP_DFLAGS="\${CP_DFLAGS} IF_MPI(-D__parallel -D__MPI_F08|)"
|
||||
export CP_DFLAGS="\${CP_DFLAGS} IF_MPI(-D__parallel|)"
|
||||
# For proper mpi_f08 support, we need at least GCC version 9 (asynchronous keyword)
|
||||
# Other compilers should work
|
||||
if ! [ "\$(gfortran -dumpversion | cut -d. -f1)" -lt 9 ]; then
|
||||
export CP_DFLAGS="\${CP_DFLAGS} IF_MPI(-D__MPI_F08|)"
|
||||
fi
|
||||
export CP_CFLAGS="\${CP_CFLAGS} IF_MPI(${MPICH_CFLAGS}|)"
|
||||
export CP_LDFLAGS="\${CP_LDFLAGS} IF_MPI(${MPICH_LDFLAGS}|)"
|
||||
export CP_LIBS="\${CP_LIBS} IF_MPI(${MPICH_LIBS}|)"
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ case "${with_openblas}" in
|
|||
check_lib -lopenblas_openmp 2> /dev/null && OPENBLAS_LIBS="-lopenblas_openmp"
|
||||
check_lib -lopenblas_omp 2> /dev/null && OPENBLAS_LIBS="-lopenblas_omp"
|
||||
pkg_install_dir="$(dirname $(dirname $(find_in_paths "libopenblas.*" $LIB_PATHS)))"
|
||||
# Deal with the condition that libfftw3 is installed in "/usr/lib/x86_64-linux-gnu"
|
||||
# Deal with the condition that libopenblas is installed in "/usr/lib/x86_64-linux-gnu"
|
||||
if [[ "${pkg_install_dir}" == "/usr/lib"* ]]; then
|
||||
pkg_install_dir="/usr"
|
||||
else
|
||||
|
|
|
|||
|
|
@ -73,11 +73,11 @@ case "$with_scalapack" in
|
|||
echo "==================== Finding ScaLAPACK from system paths ===================="
|
||||
check_lib -lscalapack "ScaLAPACK"
|
||||
pkg_install_dir="$(dirname $(dirname $(find_in_paths "libscalapack*" $LIB_PATHS)))"
|
||||
# Deal with the condition that libfftw3 is installed in "/usr/lib/x86_64-linux-gnu"
|
||||
# Deal with the condition that libscalapack is installed in "/usr/lib/x86_64-linux-gnu"
|
||||
if [[ "${pkg_install_dir}" == "/usr/lib"* ]]; then
|
||||
pkg_install_dir="/usr"
|
||||
fi
|
||||
add_lib_from_paths SCALAPACK_LDFLAGS "libscalapack.*" $LIB_PATHS
|
||||
add_lib_from_paths SCALAPACK_LDFLAGS "libscalapack*" $LIB_PATHS
|
||||
;;
|
||||
__DONTUSE__) ;;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ case "${with_dbcsr}" in
|
|||
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DUSE_MPI=OFF"
|
||||
else
|
||||
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DUSE_MPI=ON"
|
||||
if [ -n $(grep "MPI_F08" "${INSTALLDIR}"/toolchain.env) ]; then
|
||||
if [ -n "$(grep "MPI_F08" "${INSTALLDIR}"/toolchain.env)" ]; then
|
||||
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCP2K_USE_MPI_F08=ON"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue