34#if defined(__COMPILE_REVISION)
35 CHARACTER(LEN=*),
PARAMETER :: compile_revision = __compile_revision
37 CHARACTER(LEN=*),
PARAMETER :: compile_revision =
"unknown"
41 CHARACTER(LEN=*),
PARAMETER ::
cp2k_version =
"CP2K version 2024.1 (Development Version)"
43 CHARACTER(LEN=*),
PARAMETER ::
cp2k_home =
"https://www.cp2k.org/"
46#if defined(__COMPILE_ARCH)
47 CHARACTER(LEN=*),
PARAMETER ::
compile_arch = __compile_arch
49 CHARACTER(LEN=*),
PARAMETER ::
compile_arch =
"unknown: -D__COMPILE_ARCH=?"
52#if defined(__COMPILE_DATE)
53 CHARACTER(LEN=*),
PARAMETER ::
compile_date = __compile_date
55 CHARACTER(LEN=*),
PARAMETER ::
compile_date =
"unknown: -D__COMPILE_DATE=?"
58#if defined(__COMPILE_HOST)
59 CHARACTER(LEN=*),
PARAMETER ::
compile_host = __compile_host
61 CHARACTER(LEN=*),
PARAMETER ::
compile_host =
"unknown: -D__COMPILE_HOST=?"
66 CHARACTER(LEN=default_path_length),
PUBLIC ::
r_cwd
70 CHARACTER(len=*),
PARAMETER,
PRIVATE :: modulen =
'cp2k_info'
79 CHARACTER(len=10*default_string_length) :: flags
81 CHARACTER(len=default_string_length) :: tmp_str
87 flags = trim(flags)//trim(tmp_str)
91 flags = trim(flags)//
" libint"
94 flags = trim(flags)//
" fftw3"
96#if defined(__FFTW3_MKL)
97 flags = trim(flags)//
" fftw3_mkl"
100 flags = trim(flags)//
" libxc"
102#if defined(__LIBGRPP)
103 flags = trim(flags)//
" libgrpp"
105#if defined(__LIBPEXSI)
106 flags = trim(flags)//
" pexsi"
109 flags = trim(flags)//
" elpa"
111#if defined(__ELPA_NVIDIA_GPU)
112 flags = trim(flags)//
" elpa_nvidia_gpu"
114#if defined(__ELPA_AMD_GPU)
115 flags = trim(flags)//
" elpa_amd_gpu"
117#if defined(__ELPA_INTEL_GPU)
118 flags = trim(flags)//
" elpa_intel_gpu"
120#if defined(__parallel)
121 flags = trim(flags)//
" parallel"
123#if defined(__MPI_F08)
124 flags = trim(flags)//
" mpi_f08"
126#if defined(__SCALAPACK)
127 flags = trim(flags)//
" scalapack"
130 flags = trim(flags)//
" cosma"
134 flags = trim(flags)//
" quip"
137#if defined(__HAS_PATCHED_CUFFT_70)
138 flags = trim(flags)//
" patched_cufft_70"
142 flags = trim(flags)//
" deepmd"
145#if defined(__PW_FPGA)
146 flags = trim(flags)//
" pw_fpga"
149#if defined(__PW_FPGA_SP)
150 flags = trim(flags)//
" pw_fpga_sp"
153#if defined(__LIBXSMM)
154 flags = trim(flags)//
" xsmm"
157#if defined(__CRAY_PM_ACCEL_ENERGY)
158 flags = trim(flags)//
" cray_pm_accel_energy"
160#if defined(__CRAY_PM_ENERGY)
161 flags = trim(flags)//
" cray_pm_energy"
163#if defined(__CRAY_PM_FAKE_ENERGY)
164 flags = trim(flags)//
" cray_pm_fake_energy"
166#if defined(__DBCSR_ACC)
167 flags = trim(flags)//
" dbcsr_acc"
169#if defined(__MAX_CONTR)
171 flags = trim(flags)//
" max_contr="//trim(tmp_str)
173#if defined(__NO_SOCKETS)
174 flags = trim(flags)//
" no_sockets"
176#if defined(__NO_MPI_THREAD_SUPPORT_CHECK)
177 flags = trim(flags)//
" no_mpi_thread_support_check"
179#if defined(__NO_STATM_ACCESS)
180 flags = trim(flags)//
" no_statm_access"
183 flags = trim(flags)//
" mingw"
185#if defined(__PW_CUDA_NO_HOSTALLOC)
186 flags = trim(flags)//
" pw_cuda_no_hostalloc"
188#if defined(__STATM_RESIDENT)
189 flags = trim(flags)//
" statm_resident"
191#if defined(__STATM_TOTAL)
192 flags = trim(flags)//
" statm_total"
194#if defined(__PLUMED2)
195 flags = trim(flags)//
" plumed2"
197#if defined(__HAS_IEEE_EXCEPTIONS)
198 flags = trim(flags)//
" has_ieee_exceptions"
200#if defined(__NO_ABORT)
201 flags = trim(flags)//
" no_abort"
204 flags = trim(flags)//
" spglib"
206#if defined(__ACCELERATE)
207 flags = trim(flags)//
" accelerate"
210 flags = trim(flags)//
" mkl"
213 flags = trim(flags)//
" sirius"
215#if defined(__CHECK_DIAG)
216 flags = trim(flags)//
" check_diag"
218#if defined(__LIBVORI)
219 flags = trim(flags)//
" libvori"
220 flags = trim(flags)//
" libbqb"
222#if defined(__LIBMAXWELL)
223 flags = trim(flags)//
" libmaxwell"
225#if defined(__LIBTORCH)
226 flags = trim(flags)//
" libtorch"
228#if defined(__OFFLOAD_CUDA)
229 flags = trim(flags)//
" offload_cuda"
231#if defined(__OFFLOAD_HIP)
232 flags = trim(flags)//
" offload_hip"
234#if defined(__OFFLOAD_OPENCL)
235 flags = trim(flags)//
" offload_opencl"
237#if defined(__NO_OFFLOAD_GRID)
238 flags = trim(flags)//
" no_offload_grid"
240#if defined(__NO_OFFLOAD_DBM)
241 flags = trim(flags)//
" no_offload_dbm"
243#if defined(__NO_OFFLOAD_PW)
244 flags = trim(flags)//
" no_offload_pw"
246#if defined(__OFFLOAD_PROFILING)
247 flags = trim(flags)//
" offload_profiling"
250#if defined(__SPLA) && defined(__OFFLOAD_GEMM)
251 flags = trim(flags)//
" spla_gemm_offloading"
254#if defined(__CUSOLVERMP)
255 flags = trim(flags)//
" cusolvermp"
259 flags = trim(flags)//
" dlaf"
262#if defined(__LIBVDWXC)
263 flags = trim(flags)//
" libvdwxc"
267 flags = trim(flags)//
" hdf5"
270#if defined(__OFFLOAD_UNIFIED_MEMORY)
271 flags = trim(flags)//
" offload_unified_memory"
284 WRITE (unit=iunit, fmt=
"(T2,A)") &
285 "******************************************************************************", &
287 "* CP2K: A general program to perform molecular dynamics simulations *", &
288 "* Copyright (C) 2000-2024 CP2K developer group <https://www.cp2k.org/> *", &
290 "* This program is free software: you can redistribute it and/or modify *", &
291 "* it under the terms of the GNU General Public License as published by *", &
292 "* the Free Software Foundation, either version 2 of the License, or *", &
293 "* (at your option) any later version. *", &
295 "* This program is distributed in the hope that it will be useful, *", &
296 "* but WITHOUT ANY WARRANTY; without even the implied warranty of *", &
297 "* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *", &
298 "* GNU General Public License for more details. *", &
300 "* You should have received a copy of the GNU General Public License *", &
301 "* along with this program. If not, see <https://www.gnu.org/licenses/>. *", &
303 "******************************************************************************"
334 INTEGER,
INTENT(IN) :: iunit
336 CHARACTER(LEN=256) :: cwd, datx
341 WRITE (unit=iunit, fmt=
"(T2,A)")
"# Version information for this restart file "
342 WRITE (unit=iunit, fmt=
"(T2,A)")
"# current date "//trim(datx)
343 WRITE (unit=iunit, fmt=
"(T2,A)")
"# current working dir "//trim(cwd)
345 WRITE (unit=iunit, fmt=
"(T2,A,T31,A50)") &
346 "# Program compiled at", &
348 WRITE (unit=iunit, fmt=
"(T2,A,T31,A50)") &
349 "# Program compiled on", &
351 WRITE (unit=iunit, fmt=
"(T2,A,T31,A50)") &
352 "# Program compiled for", &
354 WRITE (unit=iunit, fmt=
"(T2,A,T31,A50)") &
355 "# Source code revision number", &
356 adjustr(compile_revision)
some minimal info about CP2K, including its version and license
character(len=default_string_length), public r_host_name
character(len= *), parameter, public cp2k_home
character(len= *), parameter, public compile_host
character(len= *), parameter, public compile_arch
subroutine, public print_cp2k_license(iunit)
...
subroutine, public write_restart_header(iunit)
Writes the header for the restart file.
character(len= *), parameter, public compile_revision
character(len= *), parameter, public compile_date
character(len= *), parameter, public cp2k_year
character(len=10 *default_string_length) function, public cp2k_flags()
list all compile time options that influence the capabilities of cp2k. All new flags should be added ...
character(len= *), parameter, public cp2k_version
character(len=default_path_length), public r_cwd
subroutine, public get_runtime_info()
...
character(len=default_string_length), public r_user_name
character(len=26), public r_datx
Defines the basic variable types.
integer, parameter, public default_string_length
integer, parameter, public default_path_length
Machine interface based on Fortran 2003 and POSIX.
subroutine, public m_getpid(pid)
...
subroutine, public m_datum(cal_date)
returns a datum in human readable format using a standard Fortran routine
subroutine, public m_getcwd(curdir)
...
subroutine, public m_getlog(user)
...
subroutine, public m_hostnm(hname)
...
Utilities for string manipulations.
subroutine, public integer_to_string(inumber, string)
Converts an integer number to a string. The WRITE statement will return an error message,...