mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-25 12:35:15 -04:00
[toolchain] yet another fix
This commit is contained in:
parent
c3940dcaeb
commit
82e132cdce
1 changed files with 13 additions and 21 deletions
|
|
@ -168,12 +168,7 @@ case "$with_sirius" in
|
|||
> cmake.log 2>&1 || tail -n ${LOG_LINES} cmake.log
|
||||
|
||||
make -j $(get_nprocs) -C src >> make.log 2>&1 || tail -n ${LOG_LINES} make.log
|
||||
|
||||
install -d "${pkg_install_dir}/include" >> install.log 2>&1
|
||||
install -d "${pkg_install_dir}/lib" >> install.log 2>&1
|
||||
cp -R ../src/* "${pkg_install_dir}/include" >> install.log 2>&1
|
||||
install -m 644 src/*.a "${pkg_install_dir}/lib" >> install.log 2>&1
|
||||
install -m 644 src/mod_files/*.mod "${pkg_install_dir}/include" >> install.log 2>&1
|
||||
make install >> make.log 2?&1 || tail -n ${LOG_LINES} make.log
|
||||
cd ..
|
||||
|
||||
# now do we have cuda as well
|
||||
|
|
@ -183,7 +178,7 @@ case "$with_sirius" in
|
|||
mkdir build-cuda
|
||||
cd build-cuda
|
||||
CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${GSL_ROOT}:${SPGLIB_ROOT}:${LIBXC_ROOT}:${SpFFT_DIR}:${SpLA_DIR}:${COSTA_DIR}" cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=${pkg_install_dir} \
|
||||
-DCMAKE_INSTALL_PREFIX=${pkg_install_dir}/cuda \
|
||||
-DCMAKE_CXX_FLAGS_RELEASE="${SIRIUS_OPT}" \
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="${SIRIUS_DBG}" \
|
||||
-DCMAKE_CUDA_FLAGS="-std=c++14 -allow-unsupported-compiler" \
|
||||
|
|
@ -199,15 +194,12 @@ case "$with_sirius" in
|
|||
${EXTRA_CMAKE_FLAGS} .. \
|
||||
>> cmake.log 2>&1 || tail -n ${LOG_LINES} cmake.log
|
||||
make -j $(get_nprocs) -C src >> make.log 2>&1 || tail -n ${LOG_LINES} make.log
|
||||
install -d ${pkg_install_dir}/lib/cuda
|
||||
install -d ${pkg_install_dir}/include/cuda
|
||||
install -m 644 src/*.a ${pkg_install_dir}/lib/cuda >> install.log 2>&1
|
||||
install -m 644 src/mod_files/*.mod ${pkg_install_dir}/include/cuda >> install.log 2>&1
|
||||
SIRIUS_CUDA_LDFLAGS="-L'${pkg_install_dir}/lib/cuda' -Wl,-rpath,'${pkg_install_dir}/lib/cuda'"
|
||||
make install >> make.log 2?&1 || tail -n ${LOG_LINES} make.log
|
||||
SIRIUS_CUDA_LDFLAGS="-L'${pkg_install_dir}/cuda/lib' -Wl,-rpath,'${pkg_install_dir}/cuda/lib'"
|
||||
cd ..
|
||||
fi
|
||||
SIRIUS_CFLAGS="-I'${pkg_install_dir}/include/cuda'"
|
||||
SIRIUS_LDFLAGS="-L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib'"
|
||||
SIRIUS_CFLAGS="-I'${pkg_install_dir}/cuda/include'"
|
||||
SIRIUS_LDFLAGS="-L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/cuda/lib'"
|
||||
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage8/$(basename ${SCRIPT_NAME})"
|
||||
fi
|
||||
;;
|
||||
|
|
@ -264,7 +256,7 @@ case "$with_sirius" in
|
|||
esac
|
||||
if [ "$with_sirius" != "__DONTUSE__" ]; then
|
||||
SIRIUS_LIBS="-lsirius IF_CUDA(-lcusolver|)"
|
||||
SIRIUS_CUDA_LDFLAGS="-L'${pkg_install_dir}/lib/cuda' -Wl,-rpath,'${pkg_install_dir}/lib/cuda'"
|
||||
SIRIUS_CUDA_LDFLAGS="-L'${pkg_install_dir}/cuda/lib' -Wl,-rpath,'${pkg_install_dir}/cuda/lib'"
|
||||
SIRIUS_LDFLAGS="-L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib'"
|
||||
SIRIUS_CFLAGS="-I'${pkg_install_dir}/include'"
|
||||
cat << EOF > "${BUILDDIR}/setup_sirius"
|
||||
|
|
@ -273,11 +265,11 @@ EOF
|
|||
if [ "$with_sirius" != "__SYSTEM__" ]; then
|
||||
cat << EOF >> "${BUILDDIR}/setup_sirius"
|
||||
prepend_path LD_LIBRARY_PATH "${pkg_install_dir}/lib"
|
||||
prepend_path LD_LIBRARY_PATH "${pkg_install_dir}/lib/cuda"
|
||||
prepend_path LD_LIBRARY_PATH "${pkg_install_dir}/cuda/lib"
|
||||
prepend_path LD_RUN_PATH "${pkg_install_dir}/lib"
|
||||
prepend_path LD_RUN_PATH "${pkg_install_dir}/lib/cuda"
|
||||
prepend_path LD_RUN_PATH "${pkg_install_dir}/cuda/lib"
|
||||
prepend_path LIBRARY_PATH "${pkg_install_dir}/lib"
|
||||
prepend_path LIBRARY_PATH "${pkg_install_dir}/lib/cuda"
|
||||
prepend_path LIBRARY_PATH "${pkg_install_dir}/cuda/lib"
|
||||
prepend_path CPATH "${pkg_install_dir}/include"
|
||||
prepend_path PKG_CONFIG_PATH "${pkg_install_dir}/lib/pkgconfig"
|
||||
prepend_path CMAKE_PREFIX_PATH "${pkg_install_dir}"
|
||||
|
|
@ -285,10 +277,10 @@ EOF
|
|||
cat "${BUILDDIR}/setup_sirius" >> $SETUPFILE
|
||||
fi
|
||||
cat << EOF >> "${BUILDDIR}/setup_sirius"
|
||||
export SIRIUS_CFLAGS="IF_CUDA(-I${pkg_install_dir}/include/cuda|-I${pkg_install_dir}/include)"
|
||||
export SIRIUS_FFLAGS="IF_CUDA(-I${pkg_install_dir}/include/cuda|-I${pkg_install_dir}/include)"
|
||||
export SIRIUS_CFLAGS="IF_CUDA(-I${pkg_install_dir}/cuda/include|-I${pkg_install_dir}/include)"
|
||||
export SIRIUS_FFLAGS="IF_CUDA(-I${pkg_install_dir}/cuda/include|-I${pkg_install_dir}/include)"
|
||||
export SIRIUS_LDFLAGS="-L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib'"
|
||||
export SIRIUS_CUDA_LDFLAGS="-L'${pkg_install_dir}/lib/cuda' -Wl,-rpath,'${pkg_install_dir}/lib/cuda'"
|
||||
export SIRIUS_CUDA_LDFLAGS="-L'${pkg_install_dir}/cuda/lib' -Wl,-rpath,'${pkg_install_dir}/cuda/lib'"
|
||||
export SIRIUS_LIBS="${SIRIUS_LIBS}"
|
||||
export CP_DFLAGS="\${CP_DFLAGS} IF_MPI("-D__SIRIUS"|)"
|
||||
export CP_CFLAGS="\${CP_CFLAGS} IF_MPI("\${SIRIUS_CFLAGS}"|)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue