cp2k: update to 2025.1

This commit is contained in:
Mehdi Chinoune 2025-01-07 17:35:00 +00:00 committed by مهدي شينون (Mehdi Chinoune)
parent 30506b3cd0
commit cf70e08899
2 changed files with 107 additions and 7 deletions

View File

@ -0,0 +1,99 @@
--- a/src/ipi_server.F
+++ b/src/ipi_server.F
@@ -150,6 +150,12 @@
SUBROUTINE shutdown_server(ipi_env)
TYPE(ipi_environment_type), POINTER :: ipi_env
+#ifdef __NO_SOCKETS
+ CHARACTER(len=*), PARAMETER :: routineN = 'shutdown_server'
+ INTEGER :: handle
+ CALL timeset(routineN, handle)
+ CPABORT("CP2K was compiled with the __NO_SOCKETS option!")
+#else
CHARACTER(len=msglength), PARAMETER :: msg = "EXIT"
INTEGER :: output_unit
@@ -158,6 +164,7 @@
WRITE (output_unit, *) "@ iPI: Shutting down server."
CALL writebuffer(ipi_env%sockfd, msg, msglength)
CALL close_socket(ipi_env%sockfd)
+#endif
END SUBROUTINE shutdown_server
! **************************************************************************************************
@@ -168,6 +175,12 @@
SUBROUTINE request_forces(ipi_env)
TYPE(ipi_environment_type), POINTER :: ipi_env
+#ifdef __NO_SOCKETS
+ CHARACTER(len=*), PARAMETER :: routineN = 'request_forces'
+ INTEGER :: handle
+ CALL timeset(routineN, handle)
+ CPABORT("CP2K was compiled with the __NO_SOCKETS option!")
+#else
CHARACTER(len=msglength) :: msgbuffer
INTEGER :: comm_socket, i, nAtom, p, xyz
REAL(kind=dp) :: energy
@@ -206,8 +219,9 @@
END DO
END DO
CALL ipi_env_set(ipi_env=ipi_env, ipi_energy=energy, ipi_forces=forces)
+#endif
END SUBROUTINE request_forces
-
+#ifndef __NO_SOCKETS
! **************************************************************************************************
!> \brief ...
!> \param sockfd ...
@@ -238,7 +252,7 @@
CALL writebuffer(sockfd, msg, msglength)
CALL get_header(sockfd, buffer)
END SUBROUTINE ask_status
-
+#endif
! **************************************************************************************************
!> \brief ...
!> \param sockfd ...
@@ -256,6 +270,12 @@
OPTIONAL :: virial
CHARACTER(len=:), INTENT(OUT), OPTIONAL, POINTER :: extra
+#ifdef __NO_SOCKETS
+ CHARACTER(len=*), PARAMETER :: routineN = 'ask_getforce'
+ INTEGER :: handle
+ CALL timeset(routineN, handle)
+ CPABORT("CP2K was compiled with the __NO_SOCKETS option!")
+#else
CHARACTER(len=msglength), PARAMETER :: msg = "GETFORCE"
CHARACTER(len=:), ALLOCATABLE :: extra_buffer
@@ -285,6 +305,7 @@
IF (PRESENT(forces)) forces = RESHAPE(forces_buffer, shape=[3, nAtom])
IF (PRESENT(virial)) virial = RESHAPE(virial_buffer, shape=[3, 3])
IF (PRESENT(extra)) extra = extra_buffer
+#endif
END SUBROUTINE ask_getforce
! **************************************************************************************************
@@ -296,6 +317,12 @@
INTEGER, INTENT(IN) :: sockfd
TYPE(cp_subsys_type), POINTER :: subsys
+#ifdef __NO_SOCKETS
+ CHARACTER(len=*), PARAMETER :: routineN = 'send_posdata'
+ INTEGER :: handle
+ CALL timeset(routineN, handle)
+ CPABORT("CP2K was compiled with the __NO_SOCKETS option!")
+#else
CHARACTER(len=msglength), PARAMETER :: msg = "POSDATA"
INTEGER :: i, nAtom, p, xyz
@@ -323,7 +350,7 @@
END DO
END DO
CALL writebuffer(sockfd, particle_buffer, nAtom*3)
-
+#endif
END SUBROUTINE send_posdata
END MODULE ipi_server

View File

@ -3,8 +3,8 @@
_realname=cp2k
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2024.1
pkgrel=2
pkgver=2025.1
pkgrel=1
pkgdesc="A quantum chemistry and solid state physics software package (mingw-w64)"
arch=('any')
mingw_arch=('ucrt64')
@ -25,13 +25,14 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-ninja"
#$([[ ${CARCH} != x86_64 ]] || echo "${MINGW_PACKAGE_PREFIX}-libxsmm")
"${MINGW_PACKAGE_PREFIX}-python")
source=("https://github.com/cp2k/cp2k/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.bz2")
sha256sums=('a7abf149a278dfd5283dc592a2c4ae803b37d040df25d62a5e35af5c4557668f')
noextract=("${_realname}-${pkgver}.tar.bz2")
source=("https://github.com/cp2k/cp2k/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.bz2"
"001-fix-build-on-mingw-w64.patch")
sha256sums=('65c8ad5488897b0f995919b9fa77f2aba4b61677ba1e3c19bb093d5c08a8ce1d'
'd60efc3d43e55aef81480794b698ccbcb40cf4d936859ac64b69436c00dc713d')
prepare() {
echo "Extracting ${_realname}-${pkgver}.tar.bz2..."
tar -xjf ${_realname}-${pkgver}.tar.bz2 || true
cd ${_realname}-${pkgver}
patch -p1 -i "${srcdir}"/001-fix-build-on-mingw-w64.patch
}
build() {