mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 14:15:19 -04:00
Fix CMake builds with SpLA and CUDA
This commit is contained in:
parent
f3d57eb2e0
commit
8dd14c0b2b
3 changed files with 8 additions and 14 deletions
|
|
@ -130,6 +130,7 @@ elif [[ "${PROFILE}" == "toolchain_cuda_"* ]] && [[ "${VERSION}" == "psmp" ]]; t
|
|||
-GNinja \
|
||||
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
|
||||
-DDBCSR_DIR="${DBCSR_CUDA_ROOT}/lib/cmake/dbcsr" \
|
||||
-DSPLA_ROOT="${SPLA_ROOT}-cuda" \
|
||||
-DCP2K_WITH_GPU="${PROFILE:(-4)}" \
|
||||
-DCP2K_USE_ACCEL=CUDA \
|
||||
-DCP2K_USE_EVERYTHING=ON \
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@ source /opt/cp2k-toolchain/install/setup
|
|||
echo -e '\n============== CP2K Binary Flags ============='
|
||||
./build/bin/cp2k.psmp --version | grep cp2kflags
|
||||
|
||||
# Check benchmark files for input errors.
|
||||
echo -en "\nChecking benchmark inputs... "
|
||||
echo -e '\n========== Checking Benchmark Inputs ========='
|
||||
if ! ./tools/regtesting/check_inputs.py "./build/bin/cp2k.psmp" "./benchmarks/"; then
|
||||
echo -e "\nSummary: Some benchmark inputs could not be parsed."
|
||||
echo -e "Status: FAILED\n"
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ case "${with_spla}" in
|
|||
mkdir build-cuda
|
||||
cd build-cuda
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX="${pkg_install_dir}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${pkg_install_dir}-cuda" \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
|
||||
|
|
@ -71,9 +71,7 @@ case "${with_spla}" in
|
|||
.. \
|
||||
> cmake.log 2>&1 || tail -n ${LOG_LINES} cmake.log
|
||||
make -j $(get_nprocs) > make.log 2>&1 || tail -n ${LOG_LINES} make.log
|
||||
install -d ${pkg_install_dir}/lib/cuda
|
||||
[ -f src/libspla.a ] && install -m 644 src/*.a ${pkg_install_dir}/lib/cuda >> install.log 2>&1
|
||||
[ -f src/libspla.so ] && install -m 644 src/*.so ${pkg_install_dir}/lib/cuda >> install.log 2>&1
|
||||
make -j $(get_nprocs) install > install.log 2>&1 || tail -n ${LOG_LINES} install.log
|
||||
fi
|
||||
|
||||
if [ "$ENABLE_HIP" = "__TRUE__" ]; then
|
||||
|
|
@ -84,7 +82,7 @@ case "${with_spla}" in
|
|||
mkdir build-cuda
|
||||
cd build-cuda
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX="${pkg_install_dir}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${pkg_install_dir}-hip" \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
|
||||
|
|
@ -96,16 +94,14 @@ case "${with_spla}" in
|
|||
.. \
|
||||
> cmake.log 2>&1 || tail -n ${LOG_LINES} cmake.log
|
||||
make -j $(get_nprocs) > make.log 2>&1 || tail -n ${LOG_LINES} make.log
|
||||
install -d ${pkg_install_dir}/lib/hip
|
||||
[ -f src/libspla.a ] && install -m 644 src/*.a ${pkg_install_dir}/lib/hip >> install.log 2>&1
|
||||
[ -f src/libspla.so ] && install -m 644 src/*.so ${pkg_install_dir}/lib/hip >> install.log 2>&1
|
||||
make -j $(get_nprocs) install > install.log 2>&1 || tail -n ${LOG_LINES} install.log
|
||||
;;
|
||||
Mi50 | Mi100 | Mi200 | Mi250)
|
||||
[ -d build-hip ] && rm -rf "build-hip"
|
||||
mkdir build-hip
|
||||
cd build-hip
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX="${pkg_install_dir}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${pkg_install_dir}-hip" \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
|
||||
|
|
@ -117,9 +113,7 @@ case "${with_spla}" in
|
|||
.. \
|
||||
> cmake.log 2>&1 || tail -n ${LOG_LINES} cmake.log
|
||||
make -j $(get_nprocs) > make.log 2>&1 || tail -n ${LOG_LINES} make.log
|
||||
install -d ${pkg_install_dir}/lib/hip
|
||||
[ -f src/libspla.a ] && install -m 644 src/*.a ${pkg_install_dir}/lib/hip >> install.log 2>&1
|
||||
[ -f src/libspla.so ] && install -m 644 src/*.so ${pkg_install_dir}/lib/hip >> install.log 2>&1
|
||||
make -j $(get_nprocs) install > install.log 2>&1 || tail -n ${LOG_LINES} install.log
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue