(git:374b731)
Loading...
Searching...
No Matches
input_cp2k.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2024 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief builds the input structure for cp2k
10!> \par History
11!> 06.2004 created [fawzi]
12!> \author fawzi
13! **************************************************************************************************
21 USE dbcsr_api, ONLY: dbcsr_test_binary_io,&
22 dbcsr_test_mm,&
23 dbcsr_type_complex_8,&
24 dbcsr_type_real_8
25 USE input_constants, ONLY: &
45 USE input_val_types, ONLY: char_t,&
46 integer_t,&
47 lchar_t,&
49 USE kinds, ONLY: dp
54 USE string_utilities, ONLY: newline,&
55 s2a
57#include "../base/base_uses.f90"
58
59 IMPLICIT NONE
60 PRIVATE
61
62 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
63 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k'
64
66
67CONTAINS
68
69! **************************************************************************************************
70!> \brief creates the input structure of the file used by cp2k
71!> \param root_section the input structure to be created
72!> \author fawzi
73! **************************************************************************************************
74 SUBROUTINE create_cp2k_root_section(root_section)
75 TYPE(section_type), POINTER :: root_section
76
77 CHARACTER(len=*), PARAMETER :: routinen = 'create_cp2k_root_section'
78
79 INTEGER :: handle
80 TYPE(section_type), POINTER :: section
81
82 CALL timeset(routinen, handle)
83
84 cpassert(.NOT. ASSOCIATED(root_section))
85 CALL section_create(root_section, __location__, name="__ROOT__", &
86 description="input file of cp2k", n_keywords=0, n_subsections=10, &
87 repeats=.false.)
88 NULLIFY (section)
89
90 CALL create_global_section(section)
91 CALL section_add_subsection(root_section, section)
92 CALL section_release(section)
93
94 CALL create_test_section(section)
95 CALL section_add_subsection(root_section, section)
96 CALL section_release(section)
97
98 CALL create_debug_section(section)
99 CALL section_add_subsection(root_section, section)
100 CALL section_release(section)
101
102 CALL create_motion_section(section)
103 CALL section_add_subsection(root_section, section)
104 CALL section_release(section)
105
106 CALL create_multi_force_section(section)
107 CALL section_add_subsection(root_section, section)
108 CALL section_release(section)
109
110 CALL create_force_eval_section(section)
111 CALL section_add_subsection(root_section, section)
112 CALL section_release(section)
113
114 CALL create_farming_section(section)
115 CALL section_add_subsection(root_section, section)
116 CALL section_release(section)
117
119 CALL section_add_subsection(root_section, section)
120 CALL section_release(section)
121
123 CALL section_add_subsection(root_section, section)
124 CALL section_release(section)
125
126 CALL create_swarm_section(section)
127 CALL section_add_subsection(root_section, section)
128 CALL section_release(section)
129
130 CALL create_ext_restart_section(section)
131 CALL section_add_subsection(root_section, section)
132 CALL section_release(section)
133
134 CALL create_vib_section(section)
135 CALL section_add_subsection(root_section, section)
136 CALL section_release(section)
137
138 CALL create_negf_section(section)
139 CALL section_add_subsection(root_section, section)
140 CALL section_release(section)
141
142 CALL create_atom_section(section)
143 CALL section_add_subsection(root_section, section)
144 CALL section_release(section)
145 CALL timestop(handle)
146
147 END SUBROUTINE create_cp2k_root_section
148
149! **************************************************************************************************
150!> \brief section with the tests of the libraries or external code that cp2k uses
151!> \param section the section to be created
152!> \author fawzi
153! **************************************************************************************************
154 SUBROUTINE create_test_section(section)
155 TYPE(section_type), POINTER :: section
156
157 TYPE(keyword_type), POINTER :: keyword
158 TYPE(section_type), POINTER :: print_key, subsection
159
160 CALL section_create(section, __location__, name="TEST", &
161 description="Tests to perform on the supported libraries.", &
162 n_keywords=6, n_subsections=0, repeats=.false.)
163
164 NULLIFY (keyword, print_key)
165 CALL keyword_create(keyword, __location__, name="MEMORY", &
166 description="Set the maximum amount of memory allocated for a given test (in bytes)", &
167 usage="MEMORY <REAL>", default_r_val=256.e6_dp)
168 CALL section_add_keyword(section, keyword)
169 CALL keyword_release(keyword)
170
171 CALL keyword_create(keyword, __location__, name="COPY", &
172 description="Tests the performance to copy two vectors. "// &
173 "The results of these tests allow to determine the size of the cache "// &
174 "of the CPU. This can be used to optimize the performance of the "// &
175 "FFTSG library. Tests are repeated the given number of times.", &
176 usage="copy 10", default_i_val=0)
177 CALL section_add_keyword(section, keyword)
178 CALL keyword_release(keyword)
179
180 CALL keyword_create(keyword, __location__, name="MATMUL", &
181 description="Tests the performance of different kinds of matrix matrix "// &
182 "multiply kernels for the F95 INTRINSIC matmul. Matrices up to 2**N+1 will be tested. ", &
183 usage="matmul 10", default_i_val=0)
184 CALL section_add_keyword(section, keyword)
185 CALL keyword_release(keyword)
186
187 CALL keyword_create(keyword, __location__, name="DGEMM", &
188 description="Tests the performance of different kinds of matrix matrix "// &
189 "multiply kernels for the BLAS INTRINSIC DGEMM. Matrices up to 2**N+1 will be tested. ", &
190 usage="DGEMM 10", default_i_val=0)
191 CALL section_add_keyword(section, keyword)
192 CALL keyword_release(keyword)
193
194 CALL keyword_create(keyword, __location__, name="FFT", &
195 description="Tests the performance of all available FFT libraries for "// &
196 "3D FFTs Tests are repeated the given number of times.", &
197 usage="fft 10", default_i_val=0)
198 CALL section_add_keyword(section, keyword)
199 CALL keyword_release(keyword)
200
201 CALL keyword_create(keyword, __location__, name="ERI", &
202 description="Tests the performance and correctness of ERI libraries ", &
203 usage="eri 1", default_i_val=0)
204 CALL section_add_keyword(section, keyword)
205 CALL keyword_release(keyword)
206
207 CALL keyword_create(keyword, __location__, name="CLEBSCH_GORDON", variants=(/"CLEBSCH"/), &
208 description="Tests the Clebsch-Gordon Coefficients. "// &
209 "Tests are repeated the given number of times.", &
210 usage="clebsch_gordon 10", default_i_val=0)
211
212 CALL section_add_keyword(section, keyword)
213 CALL keyword_release(keyword)
214
215 CALL keyword_create(keyword, __location__, name="MPI", &
216 description="Tests mpi, quickly adapted benchmark code, "// &
217 "will ONLY work on an even number of CPUs. comm is the relevant, "// &
218 "initialized communicator. This test will produce messages "// &
219 "of the size 8*10**requested_size, where requested_size is the value "// &
220 "given to this keyword", &
221 usage="mpi 6", default_i_val=0)
222
223 CALL section_add_keyword(section, keyword)
224 CALL keyword_release(keyword)
225
226 CALL keyword_create(keyword, __location__, name="MINIMAX", &
227 description="Tests validity of minimax coefficients for approximating 1/x "// &
228 "as a sum of exponentials. "// &
229 "Checks numerical error against tabulated error, testing "// &
230 "the given number of different Rc values.", &
231 usage="MINIMAX 1000", default_i_val=0)
232 CALL section_add_keyword(section, keyword)
233 CALL keyword_release(keyword)
234
235 CALL keyword_create(keyword, __location__, name="LEAST_SQ_FT", &
236 description="Tests accuracy of the integration weights gamma_ik from Kaltak, "// &
237 "Klimes, Kresse, JCTC 10, 2498 (2014), Eq. 30. Printed is the L1-error (=minimax "// &
238 "error for a given range and a given number of grid points. The input parameter is "// &
239 "the given number of different Rc values.", &
240 usage="MINIMAX 1000", default_i_val=0)
241 CALL section_add_keyword(section, keyword)
242 CALL keyword_release(keyword)
243
245 print_key, __location__, "GRID_INFORMATION", &
246 description="Controls the printing of information regarding the PW and RS grid structures"// &
247 " (ONLY for TEST run).", &
248 print_level=medium_print_level, filename="__STD_OUT__")
249 CALL section_add_subsection(section, print_key)
250 CALL section_release(print_key)
251
252 CALL cp_print_key_section_create(print_key, __location__, "PROGRAM_RUN_INFO", &
253 description="controls the printing of tests output", &
254 print_level=silent_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
255 CALL section_add_subsection(section, print_key)
256 CALL section_release(print_key)
257
258 NULLIFY (subsection)
259 CALL create_rs_pw_transfer_section(subsection)
260 CALL section_add_subsection(section, subsection)
261 CALL section_release(subsection)
262
263 CALL create_eigensolver_section(subsection)
264 CALL section_add_subsection(section, subsection)
265 CALL section_release(subsection)
266
267 CALL create_pw_transfer_section(subsection)
268 CALL section_add_subsection(section, subsection)
269 CALL section_release(subsection)
270
271 CALL create_cp_fm_gemm_section(subsection)
272 CALL section_add_subsection(section, subsection)
273 CALL section_release(subsection)
274
275 CALL create_cp_dbcsr_section(subsection)
276 CALL section_add_subsection(section, subsection)
277 CALL section_release(subsection)
278
279 CALL create_dbm_section(subsection)
280 CALL section_add_subsection(section, subsection)
281 CALL section_release(subsection)
282
283 CALL create_eri_mme_test_section(subsection)
284 CALL section_add_subsection(section, subsection)
285 CALL section_release(subsection)
286
287 CALL create_shg_integrals_test_section(subsection)
288 CALL section_add_subsection(section, subsection)
289 CALL section_release(subsection)
290
291 END SUBROUTINE create_test_section
292
293! **************************************************************************************************
294!> \brief section to setup debugging parameter
295!> \param section the section to be created
296!> \author teo
297! **************************************************************************************************
298 SUBROUTINE create_debug_section(section)
299 TYPE(section_type), POINTER :: section
300
301 TYPE(keyword_type), POINTER :: keyword
302 TYPE(section_type), POINTER :: print_key
303
304 CALL section_create(section, __location__, name="DEBUG", &
305 description="Section to setup parameters for debug runs.", &
306 n_keywords=7, n_subsections=0, repeats=.false.)
307
308 NULLIFY (keyword, print_key)
309
310 CALL keyword_create(keyword, __location__, name="DEBUG_FORCES", &
311 description="Activates the debugging of the atomic forces", &
312 usage="DEBUG_FORCES {LOGICAL}", default_l_val=.true., &
313 lone_keyword_l_val=.true.)
314 CALL section_add_keyword(section, keyword)
315 CALL keyword_release(keyword)
316
317 CALL keyword_create(keyword, __location__, name="DEBUG_STRESS_TENSOR", &
318 description="Activates the debugging of the stress tensor", &
319 usage="DEBUG_STRESS_TENSOR {LOGICAL}", default_l_val=.true., &
320 lone_keyword_l_val=.true.)
321 CALL section_add_keyword(section, keyword)
322 CALL keyword_release(keyword)
323
324 CALL keyword_create(keyword, __location__, name="DEBUG_DIPOLE", &
325 description="Activates the debugging of the dipole moment", &
326 usage="DEBUG_DIPOLE {LOGICAL}", default_l_val=.false., &
327 lone_keyword_l_val=.true.)
328 CALL section_add_keyword(section, keyword)
329 CALL keyword_release(keyword)
330
331 CALL keyword_create(keyword, __location__, name="DEBUG_POLARIZABILITY", &
332 description="Activates the debugging of the polarizability", &
333 usage="DEBUG_POLARIZABILITY {LOGICAL}", default_l_val=.false., &
334 lone_keyword_l_val=.true.)
335 CALL section_add_keyword(section, keyword)
336 CALL keyword_release(keyword)
337
338 CALL keyword_create(keyword, __location__, name="DX", &
339 description="Increment for the calculation of the numerical derivatives", &
340 usage="DX {REAL}", default_r_val=0.001_dp)
341 CALL section_add_keyword(section, keyword)
342 CALL keyword_release(keyword)
343
344 CALL keyword_create(keyword, __location__, name="DE", &
345 description="Increment for the calculation of the numerical electric field derivatives", &
346 usage="DE {REAL}", default_r_val=0.0001_dp)
347 CALL section_add_keyword(section, keyword)
348 CALL keyword_release(keyword)
349
350 CALL keyword_create(keyword, __location__, name="MAX_RELATIVE_ERROR", &
351 description="The maximum relative error that will be "// &
352 "flagged [in percent]. ", &
353 usage="MAX_RELATIVE_ERROR {REAL}", default_r_val=0.2_dp)
354 CALL section_add_keyword(section, keyword)
355 CALL keyword_release(keyword)
356
357 CALL keyword_create(keyword, __location__, name="EPS_NO_ERROR_CHECK", &
358 description="The mismatch between the numerical and the "// &
359 "analytical value is not checked for analytical "// &
360 "values smaller than this threshold value", &
361 usage="EPS_NO_ERROR_CHECK {REAL}", default_r_val=1.0e-5_dp)
362 CALL section_add_keyword(section, keyword)
363 CALL keyword_release(keyword)
364
365 CALL keyword_create(keyword, __location__, name="STOP_ON_MISMATCH", &
366 description="Stop the debug run when a mismatch between the numerical and "// &
367 "the analytical value is detected", &
368 usage="STOP_ON_MISMATCH {LOGICAL}", default_l_val=.true., &
369 lone_keyword_l_val=.true.)
370 CALL section_add_keyword(section, keyword)
371 CALL keyword_release(keyword)
372
373 CALL keyword_create(keyword, __location__, name="CHECK_DIPOLE_DIRS", &
374 description="Dipole coordinates to be checked", &
375 usage="CHECK_DIPOLE_DIRS XZ", type_of_var=char_t, &
376 default_c_val="XYZ")
377 CALL section_add_keyword(section, keyword)
378 CALL keyword_release(keyword)
379
380 CALL keyword_create(keyword, __location__, name="CHECK_ATOM_FORCE", &
381 description="Atom force directions to be checked [atom_number coordinates]", &
382 usage="CHECK_ATOM_FORCE 1 XZ", &
383 type_of_var=char_t, n_var=2, repeats=.true.)
384 CALL section_add_keyword(section, keyword)
385 CALL keyword_release(keyword)
386
387 CALL cp_print_key_section_create(print_key, __location__, "PROGRAM_RUN_INFO", &
388 description="Controls the printing of the DEBUG specific output", &
389 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
390 CALL section_add_subsection(section, print_key)
391 CALL section_release(print_key)
392
393 END SUBROUTINE create_debug_section
394
395! **************************************************************************************************
396!> \brief creates the multiple force_eval section
397!> \param section the section to be created
398!> \author fawzi
399! **************************************************************************************************
400 SUBROUTINE create_multi_force_section(section)
401 TYPE(section_type), POINTER :: section
402
403 TYPE(keyword_type), POINTER :: keyword
404
405 cpassert(.NOT. ASSOCIATED(section))
406 CALL section_create(section, __location__, name="MULTIPLE_FORCE_EVALS", &
407 description="Describes how to handle multiple force_evals.", &
408 n_keywords=1, n_subsections=0, repeats=.false.)
409
410 NULLIFY (keyword)
411 CALL keyword_create(keyword, __location__, name="FORCE_EVAL_ORDER", &
412 description='Specify the orders of the different force_eval. When using a MIXED force_eval'// &
413 " this does not need to be specified in this list, because it that takes into account only the real"// &
414 " energy contributions", &
415 usage="FORCE_EVAL_ORDER <INTEGER> .. <INTEGER>", type_of_var=integer_t, n_var=-1, &
416 default_i_vals=(/1/))
417 CALL section_add_keyword(section, keyword)
418 CALL keyword_release(keyword)
419
420 CALL keyword_create(keyword, __location__, name="MULTIPLE_SUBSYS", &
421 description="Specify if force_eval have different subsys. In case they share the same subsys,"// &
422 " it needs to be specified only in the MIXED force_eval (if using MIXED) or"// &
423 " in the force_eval corresponding to first force_eval of the previous order (when not using MIXED).", &
424 default_l_val=.false., lone_keyword_l_val=.true.)
425 CALL section_add_keyword(section, keyword)
426 CALL keyword_release(keyword)
427
428 END SUBROUTINE create_multi_force_section
429
430! **************************************************************************************************
431!> \brief Creates the exteranal restart section
432!> \param section the section to create
433!> \author fawzi
434! **************************************************************************************************
435 SUBROUTINE create_ext_restart_section(section)
436 TYPE(section_type), POINTER :: section
437
438 TYPE(keyword_type), POINTER :: keyword
439
440 cpassert(.NOT. ASSOCIATED(section))
441 CALL section_create(section, __location__, name="EXT_RESTART", &
442 description="Section for external restart, specifies an external "// &
443 "input file where to take positions, etc. "// &
444 "By default they are all set to TRUE", &
445 n_keywords=1, n_subsections=0, repeats=.false.)
446 NULLIFY (keyword)
447
448 CALL keyword_create(keyword, __location__, name="RESTART_FILE_NAME", variants=(/"EXTERNAL_FILE"/), &
449 description="Specifies the name of restart file (or any other input file)"// &
450 " to be read. Only fields relevant to a restart will be used"// &
451 " (unless switched off with the keywords in this section)", &
452 default_lc_val=" ")
453 CALL section_add_keyword(section, keyword)
454 CALL keyword_release(keyword)
455
456 CALL keyword_create(keyword, __location__, name="BINARY_RESTART_FILE_NAME", &
457 variants=(/"BINARY_RESTART_FILE"/), &
458 description="Specifies the name of an additional restart file "// &
459 "from which selected input sections are read in binary format "// &
460 "(see SPLIT_RESTART_FILE).", &
461 default_lc_val="")
462 CALL section_add_keyword(section, keyword)
463 CALL keyword_release(keyword)
464
465 CALL keyword_create(keyword, __location__, name="RESTART_DEFAULT", &
466 description="This keyword controls the default value for all possible"// &
467 " restartable keywords, unless explicitly defined. For example setting"// &
468 " this keyword to .FALSE. does not restart any quantity. If, at the"// &
469 " same time, one keyword is set to .TRUE. only that quantity will be"// &
470 " restarted.", default_l_val=.true.)
471 CALL section_add_keyword(section, keyword)
472 CALL keyword_release(keyword)
473 CALL keyword_create(keyword, __location__, name="RESTART_COUNTERS", &
474 description="Restarts the counters in MD schemes and optimization STEP", &
475 type_of_var=logical_t, lone_keyword_l_val=.true.)
476 CALL section_add_keyword(section, keyword)
477 CALL keyword_release(keyword)
478 CALL keyword_create(keyword, __location__, name="RESTART_POS", &
479 description="Takes the positions from the external file", &
480 type_of_var=logical_t, lone_keyword_l_val=.true.)
481 CALL section_add_keyword(section, keyword)
482 CALL keyword_release(keyword)
483 CALL keyword_create(keyword, __location__, name="RESTART_VEL", &
484 description="Takes the velocities from the external file", &
485 type_of_var=logical_t, lone_keyword_l_val=.true.)
486 CALL section_add_keyword(section, keyword)
487 CALL keyword_release(keyword)
488 CALL keyword_create(keyword, __location__, name="RESTART_RANDOMG", &
489 description="Restarts the random number generator from the external file", &
490 type_of_var=logical_t, lone_keyword_l_val=.true.)
491 CALL section_add_keyword(section, keyword)
492 CALL keyword_release(keyword)
493
494 CALL keyword_create(keyword, __location__, name="RESTART_SHELL_POS", &
495 description="Takes the positions of the shells from the external file (only if shell-model)", &
496 type_of_var=logical_t, lone_keyword_l_val=.true.)
497 CALL section_add_keyword(section, keyword)
498 CALL keyword_release(keyword)
499 CALL keyword_create(keyword, __location__, name="RESTART_CORE_POS", &
500 description="Takes the positions of the cores from the external file (only if shell-model)", &
501 type_of_var=logical_t, lone_keyword_l_val=.true.)
502 CALL section_add_keyword(section, keyword)
503 CALL keyword_release(keyword)
504 CALL keyword_create(keyword, __location__, name="RESTART_OPTIMIZE_INPUT_VARIABLES", &
505 description="Restart with the optimize input variables", &
506 type_of_var=logical_t, lone_keyword_l_val=.true.)
507 CALL section_add_keyword(section, keyword)
508 CALL keyword_release(keyword)
509
510 CALL keyword_create(keyword, __location__, name="RESTART_SHELL_VELOCITY", &
511 description="Takes the velocities of the shells from the external file (only if shell-model)", &
512 type_of_var=logical_t, lone_keyword_l_val=.true.)
513 CALL section_add_keyword(section, keyword)
514 CALL keyword_release(keyword)
515 CALL keyword_create(keyword, __location__, name="RESTART_CORE_VELOCITY", &
516 description="Takes the velocities of the shells from the external file (only if shell-model)", &
517 type_of_var=logical_t, lone_keyword_l_val=.true.)
518 CALL section_add_keyword(section, keyword)
519 CALL keyword_release(keyword)
520 CALL keyword_create(keyword, __location__, name="RESTART_BAROSTAT", &
521 description="Restarts the barostat from the external file", &
522 type_of_var=logical_t, lone_keyword_l_val=.true.)
523 CALL section_add_keyword(section, keyword)
524 CALL keyword_release(keyword)
525 CALL keyword_create(keyword, __location__, name="RESTART_BAROSTAT_THERMOSTAT", &
526 description="Restarts the barostat thermostat from the external file", &
527 type_of_var=logical_t, lone_keyword_l_val=.true.)
528 CALL section_add_keyword(section, keyword)
529 CALL keyword_release(keyword)
530 CALL keyword_create(keyword, __location__, name="RESTART_SHELL_THERMOSTAT", &
531 description="Restarts the shell thermostat from the external file", &
532 type_of_var=logical_t, lone_keyword_l_val=.true.)
533 CALL section_add_keyword(section, keyword)
534 CALL keyword_release(keyword)
535 CALL keyword_create(keyword, __location__, name="RESTART_THERMOSTAT", &
536 description="Restarts the nose thermostats of the particles "// &
537 "from the EXTERNAL file", &
538 type_of_var=logical_t, lone_keyword_l_val=.true.)
539 CALL section_add_keyword(section, keyword)
540 CALL keyword_release(keyword)
541 CALL keyword_create(keyword, __location__, name="RESTART_TEMPERATURE_ANNEALING", &
542 description="Restarts external temperature when using TEMPERATURE_ANNEALING.", &
543 type_of_var=logical_t, lone_keyword_l_val=.true., default_l_val=.false.)
544 CALL section_add_keyword(section, keyword)
545 CALL keyword_release(keyword)
546 CALL keyword_create(keyword, __location__, name="RESTART_CELL", &
547 description="Restarts the cell (and cell_ref) "// &
548 "from the EXTERNAL file", &
549 type_of_var=logical_t, lone_keyword_l_val=.true.)
550 CALL section_add_keyword(section, keyword)
551 CALL keyword_release(keyword)
552 CALL keyword_create(keyword, __location__, name="RESTART_METADYNAMICS", &
553 description="Restarts hills from a previous metadynamics run "// &
554 "from the EXTERNAL file", &
555 type_of_var=logical_t, lone_keyword_l_val=.true.)
556 CALL section_add_keyword(section, keyword)
557 CALL keyword_release(keyword)
558 CALL keyword_create(keyword, __location__, name="RESTART_WALKERS", &
559 description="Restarts walkers informations from a previous metadynamics run "// &
560 "from the EXTERNAL file", &
561 type_of_var=logical_t, lone_keyword_l_val=.true.)
562 CALL section_add_keyword(section, keyword)
563 CALL keyword_release(keyword)
564 CALL keyword_create(keyword, __location__, name="RESTART_BAND", &
565 description="Restarts positions and velocities of the Band.", &
566 type_of_var=logical_t, lone_keyword_l_val=.true.)
567 CALL section_add_keyword(section, keyword)
568 CALL keyword_release(keyword)
569 CALL keyword_create(keyword, __location__, name="RESTART_QMMM", &
570 description="Restarts the following specific QMMM info: translation vectors.", &
571 type_of_var=logical_t, lone_keyword_l_val=.true.)
572 CALL section_add_keyword(section, keyword)
573 CALL keyword_release(keyword)
574 CALL keyword_create(keyword, __location__, name="RESTART_CONSTRAINT", &
575 description="Restarts constraint section. It's necessary when doing restraint"// &
576 " calculation to have a perfect energy conservation. For constraints only its"// &
577 " use is optional.", &
578 type_of_var=logical_t, lone_keyword_l_val=.true.)
579 CALL section_add_keyword(section, keyword)
580 CALL keyword_release(keyword)
581 CALL keyword_create(keyword, __location__, name="RESTART_BSSE", &
582 description="Restarts information for BSSE calculations.", &
583 type_of_var=logical_t, lone_keyword_l_val=.true.)
584 CALL section_add_keyword(section, keyword)
585 CALL keyword_release(keyword)
586 CALL keyword_create(keyword, __location__, name="RESTART_DIMER", &
587 description="Restarts information for DIMER geometry optimizations.", &
588 type_of_var=logical_t, lone_keyword_l_val=.true.)
589 CALL section_add_keyword(section, keyword)
590 CALL keyword_release(keyword)
591 CALL keyword_create(keyword, __location__, name="RESTART_AVERAGES", &
592 description="Restarts information for AVERAGES.", &
593 type_of_var=logical_t, lone_keyword_l_val=.true.)
594 CALL section_add_keyword(section, keyword)
595 CALL keyword_release(keyword)
596 CALL keyword_create(keyword, __location__, name="RESTART_RTP", &
597 description="Restarts information for REAL TIME PROPAGATION and EHRENFEST DYNAMICS.", &
598 type_of_var=logical_t, lone_keyword_l_val=.true.)
599 CALL section_add_keyword(section, keyword)
600 CALL keyword_release(keyword)
601 CALL keyword_create(keyword, __location__, name="CUSTOM_PATH", &
602 description="Restarts the given path from the EXTERNAL file. Allows a major flexibility for restarts.", &
603 type_of_var=char_t, repeats=.true.)
604 CALL section_add_keyword(section, keyword)
605 CALL keyword_release(keyword)
606
607 ! PIMD
608 CALL keyword_create(keyword, __location__, name="RESTART_PINT_POS", &
609 description="Restart bead positions from PINT%BEADS%COORD.", &
610 type_of_var=logical_t, lone_keyword_l_val=.true.)
611 CALL section_add_keyword(section, keyword)
612 CALL keyword_release(keyword)
613 CALL keyword_create(keyword, __location__, name="RESTART_PINT_VEL", &
614 description="Restart bead velocities from PINT%BEADS%VELOCITY.", &
615 type_of_var=logical_t, lone_keyword_l_val=.true.)
616 CALL section_add_keyword(section, keyword)
617 CALL keyword_release(keyword)
618 CALL keyword_create(keyword, __location__, name="RESTART_PINT_NOSE", &
619 description="Restart Nose thermostat for beads from PINT%NOSE.", &
620 type_of_var=logical_t, lone_keyword_l_val=.true.)
621 CALL section_add_keyword(section, keyword)
622 CALL keyword_release(keyword)
623 CALL keyword_create(keyword, __location__, name="RESTART_PINT_GLE", &
624 description="Restart GLE thermostat for beads from PINT%GLE.", &
625 type_of_var=logical_t, lone_keyword_l_val=.true.)
626 CALL section_add_keyword(section, keyword)
627 CALL keyword_release(keyword)
628
629 ! PIMC
630 CALL keyword_create(keyword, __location__, name="RESTART_HELIUM_POS", &
631 description="Restart helium positions from PINT%HELIUM%COORD.", &
632 type_of_var=logical_t, lone_keyword_l_val=.true.)
633 CALL section_add_keyword(section, keyword)
634 CALL keyword_release(keyword)
635 CALL keyword_create(keyword, __location__, name="RESTART_HELIUM_PERMUTATION", &
636 description="Restart helium permutation state from PINT%HELIUM%PERM.", &
637 type_of_var=logical_t, lone_keyword_l_val=.true.)
638 CALL section_add_keyword(section, keyword)
639 CALL keyword_release(keyword)
640 CALL keyword_create(keyword, __location__, name="RESTART_HELIUM_FORCE", &
641 description="Restart helium forces exerted on the solute from PINT%HELIUM%FORCE.", &
642 type_of_var=logical_t, lone_keyword_l_val=.true.)
643 CALL section_add_keyword(section, keyword)
644 CALL keyword_release(keyword)
645 CALL keyword_create(keyword, __location__, name="RESTART_HELIUM_RNG", &
646 description="Restarts helium random number generators from PINT%HELIUM%RNG_STATE.", &
647 type_of_var=logical_t, lone_keyword_l_val=.true.)
648 CALL section_add_keyword(section, keyword)
649 CALL keyword_release(keyword)
650 CALL keyword_create(keyword, __location__, name="RESTART_HELIUM_DENSITIES", &
651 description="Restarts helium density distributions from PINT%HELIUM%RHO.", &
652 type_of_var=logical_t, lone_keyword_l_val=.true., &
653 default_l_val=.false.)
654 CALL section_add_keyword(section, keyword)
655 CALL keyword_release(keyword)
656 CALL keyword_create(keyword, __location__, name="RESTART_HELIUM_AVERAGES", &
657 description="Restarts average properties from PINT%HELIUM%AVERAGES.", &
658 type_of_var=logical_t, lone_keyword_l_val=.true., default_l_val=.false.)
659 CALL section_add_keyword(section, keyword)
660 CALL keyword_release(keyword)
661
662 END SUBROUTINE create_ext_restart_section
663
664! **************************************************************************************************
665!> \brief creates the farming section
666!> \param section the section to create
667!> \author fawzi
668! **************************************************************************************************
669 SUBROUTINE create_farming_section(section)
670 TYPE(section_type), POINTER :: section
671
672 TYPE(keyword_type), POINTER :: keyword
673 TYPE(section_type), POINTER :: print_key, sub_section
674
675 cpassert(.NOT. ASSOCIATED(section))
676 CALL section_create(section, __location__, name="farming", &
677 description="Describes a farming job, in which multiple inputs are executed."//newline// &
678 "The RUN_TYPE in the global section has to be set to NONE for FARMING."//newline// &
679 "The different groups are executed in parallel. The jobs inside the same groups in series.", &
680 repeats=.false.)
681 NULLIFY (keyword, print_key)
682
683 CALL keyword_create( &
684 keyword, __location__, name="CAPTAIN_MINION", &
685 description="If a captain/minion setup should be employed, in which one process (captain) is used to distribute the tasks. "// &
686 "This is most useful to load-balance if not all jobs have the same length, "// &
687 "and a lot of CPUs/groups are available.", &
688 usage="CAPTAIN_MINION", default_l_val=.false., lone_keyword_l_val=.true.)
689 CALL section_add_keyword(section, keyword)
690 CALL keyword_release(keyword)
691
692 CALL keyword_create(keyword, __location__, name="NGROUPS", variants=(/"NGROUP"/), &
693 description="Gives the preferred number of working groups.", &
694 usage="ngroups 4", type_of_var=integer_t)
695 CALL section_add_keyword(section, keyword)
696 CALL keyword_release(keyword)
697
698 CALL keyword_create(keyword, __location__, name="GROUP_SIZE", &
699 description="Gives the preferred size of a working group, "// &
700 "groups will always be equal or larger than this size.", &
701 usage="group_size 2", default_i_val=8)
702 CALL section_add_keyword(section, keyword)
703 CALL keyword_release(keyword)
704
705 CALL keyword_create(keyword, __location__, name="STRIDE", &
706 description="Stride to be used when building working groups from the parent MPI comm. "// &
707 "Can be used to layout minion groups over nodes in advanced ways (1 rank per node / 2 groups per node).", &
708 usage="STRIDE 2", default_i_val=1)
709 CALL section_add_keyword(section, keyword)
710 CALL keyword_release(keyword)
711
712 CALL keyword_create(keyword, __location__, name="GROUP_PARTITION", &
713 description="gives the exact number of processors for each group.", &
714 usage="group_partition 2 2 4 2 4 ", type_of_var=integer_t, n_var=-1)
715 CALL section_add_keyword(section, keyword)
716 CALL keyword_release(keyword)
717
718 CALL keyword_create(keyword, __location__, name="MAX_JOBS_PER_GROUP", &
719 variants=(/"MAX_JOBS"/), &
720 description="maximum number of jobs executed per group", &
721 usage="max_step 4", default_i_val=65535)
722 CALL section_add_keyword(section, keyword)
723 CALL keyword_release(keyword)
724
725 CALL keyword_create( &
726 keyword, __location__, name="CYCLE", &
727 description="If farming should process all jobs in a cyclic way, stopping only if MAX_JOBS_PER_GROUP is exceeded.", &
728 usage="CYCLE", default_l_val=.false., lone_keyword_l_val=.true.)
729 CALL section_add_keyword(section, keyword)
730 CALL keyword_release(keyword)
731
732 CALL keyword_create( &
733 keyword, __location__, name="WAIT_TIME", &
734 description="Time to wait [s] for a new task if no task is currently available, make this zero if no clock is available", &
735 usage="WAIT_TIME 0.1", default_r_val=0.5_dp)
736 CALL section_add_keyword(section, keyword)
737 CALL keyword_release(keyword)
738
739 NULLIFY (sub_section)
740 CALL section_create(sub_section, __location__, name="JOB", &
741 description="description of the jobs to be executed", &
742 repeats=.true.)
743
744 CALL keyword_create(keyword, __location__, name="DIRECTORY", &
745 description="the directory in which the job should be executed", &
746 usage="DIRECTORY /my/path", &
747 default_lc_val=".")
748 CALL section_add_keyword(sub_section, keyword)
749 CALL keyword_release(keyword)
750
751 CALL keyword_create(keyword, __location__, name="INPUT_FILE_NAME", &
752 description="the filename of the input file", &
753 usage="INPUT_FILE_NAME my_input.inp", &
754 default_lc_val="input.inp")
755 CALL section_add_keyword(sub_section, keyword)
756 CALL keyword_release(keyword)
757
758 CALL keyword_create( &
759 keyword, __location__, name="OUTPUT_FILE_NAME", &
760 description="the filename of the output file, if not specified will use the project name in the &GLOBAL section.", &
761 usage="OUTPUT_FILE_NAME my_input.inp", &
762 default_lc_val="")
763 CALL section_add_keyword(sub_section, keyword)
764 CALL keyword_release(keyword)
765
766 CALL keyword_create(keyword, __location__, name="JOB_ID", &
767 description="An ID used to indentify a job in DEPENDENCIES. "// &
768 "JOB_IDs do not need to be unique, dependencies will be on all jobs with a given ID. "// &
769 "If no JOB_ID is given, the index of the &JOB section in the input file will be used.", &
770 usage="JOB_ID 13", type_of_var=integer_t)
771 CALL section_add_keyword(sub_section, keyword)
772 CALL keyword_release(keyword)
773
774 CALL keyword_create( &
775 keyword, __location__, name="DEPENDENCIES", &
776 description="specifies a list of JOB_IDs on which the current job depends. "// &
777 "The current job will not be executed before all the dependencies have finished. "// &
778 "The keyword requires a CAPTAIN_MINION farming run. "// &
779 "Beyond the default case, some special cases might arise: "// &
780 "1) circular dependencies will lead to a deadlock. "// &
781 "2) This keyword is not compatible with CYCLE. "// &
782 "3) MAX_JOBS_PER_GROUP is ignored (though only a total of MAX_JOBS_PER_GROUP*NGROUPS jobs will be executed) "// &
783 "4) dependencies on jobs that will not be executed (due to RESTART or MAX_JOBS_PER_GROUP) are ignored. "// &
784 "Additionally, note that, on some file systems, "// &
785 "output (restart) files might not be immediately available on all compute nodes, "// &
786 "potentially resulting in unexpected failures.", &
787 usage="DEPENDENCIES 13 1 7", type_of_var=integer_t, n_var=-1)
788 CALL section_add_keyword(sub_section, keyword)
789 CALL keyword_release(keyword)
790 CALL section_add_subsection(section, sub_section)
791 CALL section_release(sub_section)
792
793 CALL cp_print_key_section_create(print_key, __location__, "PROGRAM_RUN_INFO", &
794 description="controls the printing of FARMING specific output", &
795 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
796 CALL section_add_subsection(section, print_key)
797 CALL section_release(print_key)
798
799 CALL keyword_create(keyword, __location__, name="DO_RESTART", &
800 description="Restart a farming job (and should pick up where the previous left off)", &
801 usage="DO_RESTART", default_l_val=.false., lone_keyword_l_val=.true.)
802 CALL section_add_keyword(section, keyword)
803 CALL keyword_release(keyword)
804
805 CALL keyword_create(keyword, __location__, name="RESTART_FILE_NAME", &
806 description="Name of the restart file to use for restarting a FARMING run. If not "// &
807 "specified the name is determined from PROJECT name.", &
808 usage="RESTART_FILE_NAME <FILENAME>", type_of_var=lchar_t)
809 CALL section_add_keyword(section, keyword)
810 CALL keyword_release(keyword)
811
812 CALL cp_print_key_section_create(print_key, __location__, "RESTART", &
813 description="controls the printing of the restart for FARMING.", &
814 print_level=low_print_level, add_last=add_last_numeric, filename="FARMING")
815 CALL section_add_subsection(section, print_key)
816 CALL section_release(print_key)
817
818 END SUBROUTINE create_farming_section
819
820! **************************************************************************************************
821!> \brief creates the rs_pw_transfer section for use in the test section
822!> \param section ...
823!> \date 2008-03-09
824!> \author Joost VandeVondele
825! **************************************************************************************************
826 SUBROUTINE create_rs_pw_transfer_section(section)
827 TYPE(section_type), POINTER :: section
828
829 TYPE(keyword_type), POINTER :: keyword
830 TYPE(section_type), POINTER :: subsection
831
832 cpassert(.NOT. ASSOCIATED(section))
833 CALL section_create(section, __location__, name="RS_PW_TRANSFER", &
834 description="Describes how to benchmark the rs_pw_transfer routines.", &
835 n_keywords=1, n_subsections=0, repeats=.false.)
836
837 NULLIFY (keyword)
838 CALL keyword_create(keyword, __location__, name="GRID", &
839 description="Specify the number of grid points (not all grid points are allowed)", &
840 usage="GRID_DIMENSIONS 128 128 128", type_of_var=integer_t, n_var=3, &
841 default_i_vals=(/128, 128, 128/))
842 CALL section_add_keyword(section, keyword)
843 CALL keyword_release(keyword)
844
845 CALL keyword_create(keyword, __location__, name="HALO_SIZE", &
846 description="number of grid points of the halo", &
847 usage="HALO_SIZE 17", default_i_val=17)
848 CALL section_add_keyword(section, keyword)
849 CALL keyword_release(keyword)
850
851 CALL keyword_create(keyword, __location__, name="N_LOOP", &
852 description="Number of rs_pw_transfers being timed", &
853 usage="N_LOOP 100", default_i_val=10)
854 CALL section_add_keyword(section, keyword)
855 CALL keyword_release(keyword)
856
857 CALL keyword_create(keyword, __location__, name="RS2PW", &
858 description="should the direction be rs2pw (pw2rs otherwise)", &
859 usage="rs2pw TRUE", default_l_val=.true.)
860 CALL section_add_keyword(section, keyword)
861 CALL keyword_release(keyword)
862
863 NULLIFY (subsection)
864 CALL create_rsgrid_section(subsection)
865 CALL section_add_subsection(section, subsection)
866 CALL section_release(subsection)
867
868 END SUBROUTINE create_rs_pw_transfer_section
869
870! **************************************************************************************************
871!> \brief creates the rs_pw_transfer section for use in the test section
872!> \param section ...
873!> \date 2008-03-09
874!> \author Joost VandeVondele
875! **************************************************************************************************
876 SUBROUTINE create_pw_transfer_section(section)
877 TYPE(section_type), POINTER :: section
878
879 TYPE(keyword_type), POINTER :: keyword
880
881 cpassert(.NOT. ASSOCIATED(section))
882 CALL section_create(section, __location__, name="PW_TRANSFER", &
883 description="Benchmark and test the pw_transfer routines.", &
884 n_keywords=1, n_subsections=0, repeats=.true.)
885
886 NULLIFY (keyword)
887 CALL keyword_create(keyword, __location__, name="GRID", &
888 description="Specify the number of grid points (not all grid points are allowed)", &
889 usage="GRID_DIMENSIONS 128 128 128", type_of_var=integer_t, n_var=3, &
890 default_i_vals=(/128, 128, 128/))
891 CALL section_add_keyword(section, keyword)
892 CALL keyword_release(keyword)
893
894 CALL keyword_create(keyword, __location__, name="N_LOOP", &
895 description="Number of pw_transfers (backward&forward) being timed", &
896 usage="N_LOOP 100", default_i_val=100)
897 CALL section_add_keyword(section, keyword)
898 CALL keyword_release(keyword)
899
900 CALL keyword_create(keyword, __location__, name="PW_GRID", &
901 description="What kind of PW_GRID should be employed", &
902 usage="PW_GRID NS-FULLSPACE", &
903 enum_c_vals=s2a("SPHERICAL", "NS-FULLSPACE", "NS-HALFSPACE"), &
904 enum_desc=s2a("- not tested", " tested", " - not tested"), &
906 default_i_val=do_pwgrid_ns_fullspace)
907 CALL section_add_keyword(section, keyword)
908 CALL keyword_release(keyword)
909
910 CALL keyword_create(keyword, __location__, name="PW_GRID_LAYOUT_ALL", &
911 description="loop overal all PW_GRID_LAYOUTs that are compatible with a given number of CPUs ", &
912 usage="PW_GRID_LAYOUT_ALL", default_l_val=.false., lone_keyword_l_val=.true.)
913 CALL section_add_keyword(section, keyword)
914 CALL keyword_release(keyword)
915
916 CALL keyword_create(keyword, __location__, name="DEBUG", &
917 description="Do the FFT in debug mode in all cases", &
918 usage="DEBUG", default_l_val=.false., lone_keyword_l_val=.true.)
919 CALL section_add_keyword(section, keyword)
920 CALL keyword_release(keyword)
921
922 CALL keyword_create(keyword, __location__, name="PW_GRID_LAYOUT", &
923 description="Expert use only, leave the default... "// &
924 "Can be used to set the distribution for ray-distributed FFT.", &
925 usage="PW_GRID_LAYOUT", &
926 repeats=.false., n_var=2, &
927 default_i_vals=(/-1, -1/))
928 CALL section_add_keyword(section, keyword)
929 CALL keyword_release(keyword)
930
931 CALL keyword_create(keyword, __location__, name="PW_GRID_BLOCKED", &
932 description="Expert use only, leave the default... "// &
933 "Can be used to set the distribution in g-space for the pw grids and their FFT.", &
934 usage="PW_GRID_BLOCKED FREE", &
935 enum_c_vals=s2a("FREE", "TRUE", "FALSE"), &
936 enum_desc=s2a("CP2K will select the optimal value", "blocked", "not blocked"), &
938 default_i_val=do_pw_grid_blocked_false)
939 CALL section_add_keyword(section, keyword)
940 CALL keyword_release(keyword)
941
942 END SUBROUTINE create_pw_transfer_section
943
944! **************************************************************************************************
945!> \brief creates the cp_fm_gemm section for use in the test section
946!> \param section ...
947!> \date 2009-06-15
948!> \author Joost VandeVondele
949! **************************************************************************************************
950 SUBROUTINE create_cp_fm_gemm_section(section)
951 TYPE(section_type), POINTER :: section
952
953 TYPE(keyword_type), POINTER :: keyword
954
955 cpassert(.NOT. ASSOCIATED(section))
956 CALL section_create(section, __location__, name="CP_FM_GEMM", &
957 description="Benchmark and test the cp_fm_gemm routines by multiplying C=A*B ", &
958 n_keywords=1, n_subsections=0, repeats=.true.)
959
960 NULLIFY (keyword)
961 CALL keyword_create(keyword, __location__, name="N_LOOP", &
962 description="Number of cp_fm_gemm operations being timed (useful for small matrices).", &
963 usage="N_LOOP 10", default_i_val=10)
964 CALL section_add_keyword(section, keyword)
965 CALL keyword_release(keyword)
966
967 CALL keyword_create(keyword, __location__, name="K", &
968 description="Dimension 1 of C", &
969 usage="A 1024", default_i_val=256)
970 CALL section_add_keyword(section, keyword)
971 CALL keyword_release(keyword)
972 CALL keyword_create(keyword, __location__, name="M", &
973 description="Inner dimension M ", &
974 usage="A 1024", default_i_val=256)
975 CALL section_add_keyword(section, keyword)
976 CALL keyword_release(keyword)
977 CALL keyword_create(keyword, __location__, name="N", &
978 description="Dimension 2 of C", &
979 usage="A 1024", default_i_val=256)
980 CALL section_add_keyword(section, keyword)
981 CALL keyword_release(keyword)
982
983 CALL keyword_create(keyword, __location__, name="NROW_BLOCK", &
984 description="block_size for rows", &
985 usage="nrow_block 64", default_i_val=32)
986 CALL section_add_keyword(section, keyword)
987 CALL keyword_release(keyword)
988
989 CALL keyword_create(keyword, __location__, name="NCOL_BLOCK", &
990 description="block_size for cols", &
991 usage="nrow_block 64", default_i_val=32)
992 CALL section_add_keyword(section, keyword)
993 CALL keyword_release(keyword)
994
995 CALL keyword_create(keyword, __location__, name="ROW_MAJOR", &
996 description="Use a row major blacs grid", &
997 usage="ROW_MAJOR .FALSE.", default_l_val=.true., lone_keyword_l_val=.true.)
998 CALL section_add_keyword(section, keyword)
999 CALL keyword_release(keyword)
1000
1001 CALL keyword_create(keyword, __location__, name="FORCE_BLOCKSIZE", &
1002 description="Forces the blocksize, even if this implies that a few processes might have no data", &
1003 usage="FORCE_BLOCKSIZE", default_l_val=.false., lone_keyword_l_val=.true.)
1004 CALL section_add_keyword(section, keyword)
1005 CALL keyword_release(keyword)
1006
1007 CALL keyword_create(keyword, __location__, name="GRID_2D", &
1008 description="Explicitly set the blacs 2D processor layout."// &
1009 " If the product differs from the number of MPI ranks,"// &
1010 " it is ignored and a default nearly square layout is used.", n_var=2, &
1011 usage="GRID_2D 64 16 ", default_i_vals=(/1, 1/))
1012 CALL section_add_keyword(section, keyword)
1013 CALL keyword_release(keyword)
1014
1015 CALL keyword_create(keyword, __location__, name="TRANSA", &
1016 description="Transpose matrix A", &
1017 usage="TRANSA", default_l_val=.false., lone_keyword_l_val=.true.)
1018 CALL section_add_keyword(section, keyword)
1019 CALL keyword_release(keyword)
1020
1021 CALL keyword_create(keyword, __location__, name="TRANSB", &
1022 description="Transpose matrix B", &
1023 usage="TRANSB", default_l_val=.false., lone_keyword_l_val=.true.)
1024 CALL section_add_keyword(section, keyword)
1025 CALL keyword_release(keyword)
1026
1027 END SUBROUTINE create_cp_fm_gemm_section
1028
1029! **************************************************************************************************
1030!> \brief creates the eigensolver section for use in the test section
1031!> \param section ...
1032!> \date 2010-03-10
1033!> \author Joost VandeVondele
1034! **************************************************************************************************
1035 SUBROUTINE create_eigensolver_section(section)
1036 TYPE(section_type), POINTER :: section
1037
1038 TYPE(keyword_type), POINTER :: keyword
1039
1040 cpassert(.NOT. ASSOCIATED(section))
1041 CALL section_create(section, __location__, name="EIGENSOLVER", &
1042 description="Benchmark and test the eigensolver routines.", &
1043 n_keywords=1, n_subsections=0, repeats=.true.)
1044
1045 NULLIFY (keyword)
1046 CALL keyword_create(keyword, __location__, name="N", &
1047 description="Dimension of the square matrix", &
1048 usage="N 1024", default_i_val=256)
1049 CALL section_add_keyword(section, keyword)
1050 CALL keyword_release(keyword)
1051
1052 CALL keyword_create(keyword, __location__, name="N_LOOP", &
1053 description="Number of operations being timed (useful for small matrices).", &
1054 usage="N_LOOP 10", default_i_val=10)
1055 CALL section_add_keyword(section, keyword)
1056 CALL keyword_release(keyword)
1057
1058 CALL keyword_create(keyword, __location__, name="DIAG_METHOD", &
1059 description="Diagonalization strategy", &
1060 usage="DIAG_METHOD syevd", &
1061 enum_c_vals=s2a("syevd", "syevx"), &
1062 enum_desc=s2a("(sca)lapacks syevd", "(sca)lapacks syevx"), &
1063 enum_i_vals=(/do_diag_syevd, do_diag_syevx/), &
1064 default_i_val=do_diag_syevd)
1065 CALL section_add_keyword(section, keyword)
1066 CALL keyword_release(keyword)
1067
1068 CALL keyword_create(keyword, __location__, name="EIGENVALUES", &
1069 description="number of eigenvalues to be computed (all=<0) ", &
1070 usage="EIGENVALUES 13", default_i_val=-1)
1071 CALL section_add_keyword(section, keyword)
1072 CALL keyword_release(keyword)
1073
1074 CALL keyword_create(keyword, __location__, name="INIT_METHOD", &
1075 description="Initialization approach", &
1076 usage="INIT_METHOD RANDOM", &
1077 enum_c_vals=s2a("random", "read"), &
1078 enum_desc=s2a("use a random initial matrix", "read a matrix from file MATRIX"), &
1079 enum_i_vals=(/do_mat_random, do_mat_read/), &
1080 default_i_val=do_mat_random)
1081 CALL section_add_keyword(section, keyword)
1082 CALL keyword_release(keyword)
1083
1084 END SUBROUTINE create_eigensolver_section
1085
1086! **************************************************************************************************
1087!> \brief creates the cp_dbcsr section for use in the test section
1088!> \param section ...
1089!> \date 2010-02-08
1090!> \author Urban Borstnik
1091! **************************************************************************************************
1092 SUBROUTINE create_cp_dbcsr_section(section)
1093 TYPE(section_type), POINTER :: section
1094
1095 TYPE(keyword_type), POINTER :: keyword
1096
1097 cpassert(.NOT. ASSOCIATED(section))
1098 CALL section_create(section, __location__, name="CP_DBCSR", &
1099 description="Benchmark and test the cp_dbcsr routines", &
1100 n_keywords=1, n_subsections=0, repeats=.true.)
1101
1102 NULLIFY (keyword)
1103 CALL keyword_create(keyword, __location__, name="N_LOOP", &
1104 description="Number of operations being timed (useful for small matrices).", &
1105 usage="N_LOOP 10", default_i_val=10)
1106 CALL section_add_keyword(section, keyword)
1107 CALL keyword_release(keyword)
1108
1109 CALL keyword_create(keyword, __location__, name="DATA_TYPE", &
1110 description="Data type of the matrices", &
1111 usage="DATA_TYPE real_8", &
1112 default_i_val=dbcsr_type_real_8, &
1113 enum_c_vals=s2a("real_8", "complex_8"), &
1114 enum_i_vals=(/dbcsr_type_real_8, dbcsr_type_complex_8/), &
1115 enum_desc=s2a( &
1116 "Real (Double Precision)", &
1117 "Complex (Double Precision)"))
1118 CALL section_add_keyword(section, keyword)
1119 CALL keyword_release(keyword)
1120
1121 CALL keyword_create(keyword, __location__, name="TEST_TYPE", &
1122 description="Which part of DBCSR is tested", &
1123 usage="TEST_TYPE MM", &
1124 default_i_val=dbcsr_test_mm, &
1125 enum_c_vals=s2a("MM", "Binary_IO"), &
1126 enum_i_vals=(/dbcsr_test_mm, dbcsr_test_binary_io/), &
1127 enum_desc=s2a( &
1128 "Run matrix multiplications", &
1129 "Run binary IO checks"))
1130 CALL section_add_keyword(section, keyword)
1131 CALL keyword_release(keyword)
1132
1133 CALL keyword_create(keyword, __location__, name="M", &
1134 description="Dimension 1 of C", &
1135 usage="A 1024", default_i_val=256)
1136 CALL section_add_keyword(section, keyword)
1137 CALL keyword_release(keyword)
1138 CALL keyword_create(keyword, __location__, name="N", &
1139 description="Dimension 2 of C", &
1140 usage="A 1024", default_i_val=256)
1141 CALL section_add_keyword(section, keyword)
1142 CALL keyword_release(keyword)
1143 CALL keyword_create(keyword, __location__, name="K", &
1144 description="Inner dimension M ", &
1145 usage="A 1024", default_i_val=256)
1146 CALL section_add_keyword(section, keyword)
1147 CALL keyword_release(keyword)
1148
1149 CALL keyword_create(keyword, __location__, name="TRANSA", &
1150 description="Transpose matrix A", &
1151 usage="TRANSA", default_l_val=.false., lone_keyword_l_val=.true.)
1152 CALL section_add_keyword(section, keyword)
1153 CALL keyword_release(keyword)
1154
1155 CALL keyword_create(keyword, __location__, name="TRANSB", &
1156 description="Transpose matrix B", &
1157 usage="TRANSB", default_l_val=.false., lone_keyword_l_val=.true.)
1158 CALL section_add_keyword(section, keyword)
1159 CALL keyword_release(keyword)
1160
1161 CALL keyword_create(keyword, __location__, name="BS_M", &
1162 description="Row block sizes of C", n_var=-1, &
1163 usage="BS_M 1 13 2 5", default_i_vals=(/1, 13, 2, 15/))
1164 CALL section_add_keyword(section, keyword)
1165 CALL keyword_release(keyword)
1166
1167 CALL keyword_create(keyword, __location__, name="BS_N", &
1168 description="Column block sizes of C", n_var=-1, &
1169 usage="BS_N 1 13 2 5", default_i_vals=(/1, 13, 2, 15/))
1170 CALL section_add_keyword(section, keyword)
1171 CALL keyword_release(keyword)
1172
1173 CALL keyword_create(keyword, __location__, name="BS_K", &
1174 description="Block sizes of inner dimension", n_var=-1, &
1175 usage="BS_K 1 13 2 5", default_i_vals=(/1, 13, 2, 15/))
1176 CALL section_add_keyword(section, keyword)
1177 CALL keyword_release(keyword)
1178
1179 CALL keyword_create(keyword, __location__, name="ATYPE", &
1180 description="Matrix A type", &
1181 usage="ATYPE N", default_c_val='N')
1182 CALL section_add_keyword(section, keyword)
1183 CALL keyword_release(keyword)
1184 CALL keyword_create(keyword, __location__, name="BTYPE", &
1185 description="Matrix B type", &
1186 usage="BTYPE N", default_c_val='N')
1187 CALL section_add_keyword(section, keyword)
1188 CALL keyword_release(keyword)
1189 CALL keyword_create(keyword, __location__, name="CTYPE", &
1190 description="Matrix C type", &
1191 usage="CTYPE N", default_c_val='N')
1192 CALL section_add_keyword(section, keyword)
1193 CALL keyword_release(keyword)
1194
1195 CALL keyword_create(keyword, __location__, name="NPROC", &
1196 description="Number of processors to test", n_var=-1, &
1197 usage="NPROC 128 16 1", default_i_vals=(/0/))
1198 CALL section_add_keyword(section, keyword)
1199 CALL keyword_release(keyword)
1200
1201 CALL keyword_create(keyword, __location__, name="KEEPSPARSE", &
1202 description="Keep product sparse", &
1203 usage="KEEPSPARSE", default_l_val=.false., lone_keyword_l_val=.true.)
1204 CALL section_add_keyword(section, keyword)
1205 CALL keyword_release(keyword)
1206
1207 CALL keyword_create(keyword, __location__, name="ASPARSITY", &
1208 description="Sparsity of A matrix", &
1209 usage="ASPARSITY 70", default_r_val=0.0_dp)
1210 CALL section_add_keyword(section, keyword)
1211 CALL keyword_release(keyword)
1212
1213 CALL keyword_create(keyword, __location__, name="BSPARSITY", &
1214 description="Sparsity of B matrix", &
1215 usage="ASPARSITY 80", default_r_val=0.0_dp)
1216 CALL section_add_keyword(section, keyword)
1217 CALL keyword_release(keyword)
1218
1219 CALL keyword_create(keyword, __location__, name="CSPARSITY", &
1220 description="Sparsity of C matrix", &
1221 usage="ASPARSITY 90", default_r_val=0.0_dp)
1222 CALL section_add_keyword(section, keyword)
1223 CALL keyword_release(keyword)
1224
1225 CALL keyword_create(keyword, __location__, name="ALPHA", &
1226 description="Multiplication factor", &
1227 usage="ALPHA 2.0", default_r_val=1.0_dp)
1228 CALL section_add_keyword(section, keyword)
1229 CALL keyword_release(keyword)
1230
1231 CALL keyword_create(keyword, __location__, name="BETA", &
1232 description="Product premultiplication factor", &
1233 usage="BETA 1.0", default_r_val=0.0_dp)
1234 CALL section_add_keyword(section, keyword)
1235 CALL keyword_release(keyword)
1236
1237 CALL keyword_create(keyword, __location__, name="FILTER_EPS", &
1238 description="Threshold for on-the-fly and final filtering.", &
1239 usage="FILTER_EPS 1.0", default_r_val=-1.0_dp)
1240 CALL section_add_keyword(section, keyword)
1241 CALL keyword_release(keyword)
1242
1243 CALL keyword_create(keyword, __location__, name="ALWAYS_CHECKSUM", &
1244 description="perform a checksum after each multiplication", &
1245 usage="ALWAYS_CHECKSUM", default_l_val=.false., lone_keyword_l_val=.true.)
1246 CALL section_add_keyword(section, keyword)
1247 CALL keyword_release(keyword)
1248
1249 END SUBROUTINE create_cp_dbcsr_section
1250
1251! **************************************************************************************************
1252!> \brief Creates the DBM section for use in the test section.
1253!> \param section ...
1254!> \author Ole Schuett
1255! **************************************************************************************************
1256 SUBROUTINE create_dbm_section(section)
1257 TYPE(section_type), POINTER :: section
1258
1259 TYPE(keyword_type), POINTER :: keyword
1260
1261 cpassert(.NOT. ASSOCIATED(section))
1262 CALL section_create(section, __location__, name="DBM", &
1263 description="Benchmark and test the dbm routines", &
1264 n_keywords=1, n_subsections=0, repeats=.true.)
1265
1266 NULLIFY (keyword)
1267 CALL keyword_create(keyword, __location__, name="N_LOOP", &
1268 description="Number of operations being timed (useful for small matrices).", &
1269 usage="N_LOOP 10", default_i_val=10)
1270 CALL section_add_keyword(section, keyword)
1271 CALL keyword_release(keyword)
1272
1273 CALL keyword_create(keyword, __location__, name="M", &
1274 description="Dimension 1 of C", &
1275 usage="A 1024", default_i_val=256)
1276 CALL section_add_keyword(section, keyword)
1277 CALL keyword_release(keyword)
1278 CALL keyword_create(keyword, __location__, name="N", &
1279 description="Dimension 2 of C", &
1280 usage="A 1024", default_i_val=256)
1281 CALL section_add_keyword(section, keyword)
1282 CALL keyword_release(keyword)
1283 CALL keyword_create(keyword, __location__, name="K", &
1284 description="Inner dimension M ", &
1285 usage="A 1024", default_i_val=256)
1286 CALL section_add_keyword(section, keyword)
1287 CALL keyword_release(keyword)
1288
1289 CALL keyword_create(keyword, __location__, name="TRANSA", &
1290 description="Transpose matrix A", &
1291 usage="TRANSA", default_l_val=.false., lone_keyword_l_val=.true.)
1292 CALL section_add_keyword(section, keyword)
1293 CALL keyword_release(keyword)
1294
1295 CALL keyword_create(keyword, __location__, name="TRANSB", &
1296 description="Transpose matrix B", &
1297 usage="TRANSB", default_l_val=.false., lone_keyword_l_val=.true.)
1298 CALL section_add_keyword(section, keyword)
1299 CALL keyword_release(keyword)
1300
1301 CALL keyword_create(keyword, __location__, name="BS_M", &
1302 description="Row block sizes of C", n_var=-1, &
1303 usage="BS_M 1 13 2 5", default_i_vals=(/1, 13, 2, 15/))
1304 CALL section_add_keyword(section, keyword)
1305 CALL keyword_release(keyword)
1306
1307 CALL keyword_create(keyword, __location__, name="BS_N", &
1308 description="Column block sizes of C", n_var=-1, &
1309 usage="BS_N 1 13 2 5", default_i_vals=(/1, 13, 2, 15/))
1310 CALL section_add_keyword(section, keyword)
1311 CALL keyword_release(keyword)
1312
1313 CALL keyword_create(keyword, __location__, name="BS_K", &
1314 description="Block sizes of inner dimension", n_var=-1, &
1315 usage="BS_K 1 13 2 5", default_i_vals=(/1, 13, 2, 15/))
1316 CALL section_add_keyword(section, keyword)
1317 CALL keyword_release(keyword)
1318
1319 CALL keyword_create(keyword, __location__, name="KEEPSPARSE", &
1320 description="Keep product sparse", &
1321 usage="KEEPSPARSE", default_l_val=.false., lone_keyword_l_val=.true.)
1322 CALL section_add_keyword(section, keyword)
1323 CALL keyword_release(keyword)
1324
1325 CALL keyword_create(keyword, __location__, name="ASPARSITY", &
1326 description="Sparsity of A matrix", &
1327 usage="ASPARSITY 70", default_r_val=0.0_dp)
1328 CALL section_add_keyword(section, keyword)
1329 CALL keyword_release(keyword)
1330
1331 CALL keyword_create(keyword, __location__, name="BSPARSITY", &
1332 description="Sparsity of B matrix", &
1333 usage="ASPARSITY 80", default_r_val=0.0_dp)
1334 CALL section_add_keyword(section, keyword)
1335 CALL keyword_release(keyword)
1336
1337 CALL keyword_create(keyword, __location__, name="CSPARSITY", &
1338 description="Sparsity of C matrix", &
1339 usage="ASPARSITY 90", default_r_val=0.0_dp)
1340 CALL section_add_keyword(section, keyword)
1341 CALL keyword_release(keyword)
1342
1343 CALL keyword_create(keyword, __location__, name="ALPHA", &
1344 description="Multiplication factor", &
1345 usage="ALPHA 2.0", default_r_val=1.0_dp)
1346 CALL section_add_keyword(section, keyword)
1347 CALL keyword_release(keyword)
1348
1349 CALL keyword_create(keyword, __location__, name="BETA", &
1350 description="Product premultiplication factor", &
1351 usage="BETA 1.0", default_r_val=0.0_dp)
1352 CALL section_add_keyword(section, keyword)
1353 CALL keyword_release(keyword)
1354
1355 CALL keyword_create(keyword, __location__, name="FILTER_EPS", &
1356 description="Threshold for on-the-fly and final filtering.", &
1357 usage="FILTER_EPS 1.0", default_r_val=-1.0_dp)
1358 CALL section_add_keyword(section, keyword)
1359 CALL keyword_release(keyword)
1360
1361 CALL keyword_create(keyword, __location__, name="ALWAYS_CHECKSUM", &
1362 description="perform a checksum after each multiplication", &
1363 usage="ALWAYS_CHECKSUM", default_l_val=.false., lone_keyword_l_val=.true.)
1364 CALL section_add_keyword(section, keyword)
1365 CALL keyword_release(keyword)
1366
1367 END SUBROUTINE create_dbm_section
1368END MODULE input_cp2k
Interface to Minimax-Ewald method for periodic ERI's to be used in CP2K.
subroutine, public create_eri_mme_test_section(section)
Create input section for unit testing.
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public low_print_level
integer, parameter, public medium_print_level
integer, parameter, public add_last_numeric
integer, parameter, public silent_print_level
subroutine, public cp_print_key_section_create(print_key_section, location, name, description, print_level, each_iter_names, each_iter_values, add_last, filename, common_iter_levels, citations, unit_str)
creates a print_key section
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public do_diag_syevd
integer, parameter, public ehrenfest
integer, parameter, public do_mat_read
integer, parameter, public do_pwgrid_ns_fullspace
integer, parameter, public do_diag_syevx
integer, parameter, public do_pwgrid_spherical
integer, parameter, public do_mat_random
integer, parameter, public do_pwgrid_ns_halfspace
integer, parameter, public numerical
builds the input structure for the ATOM module
subroutine, public create_atom_section(section)
Creates the input section for the atom code.
builds the input structure for the FORCE_EVAL section of cp2k
subroutine, public create_force_eval_section(section)
creates the force_eval section
builds the global input section for cp2k
subroutine, public create_global_section(section)
section to hold global settings for the whole program
subroutine, public create_motion_section(section)
creates the motion section
Input section for NEGF based quantum transport calculations.
subroutine, public create_negf_section(section)
Create NEGF input section.
subroutine, public create_rsgrid_section(section)
...
builds the input structure for the VIBRATIONAL_ANALYSIS module
subroutine, public create_vib_section(section)
Creates the exteranal restart section.
builds the input structure for cp2k
Definition input_cp2k.F:14
subroutine, public create_cp2k_root_section(root_section)
creates the input structure of the file used by cp2k
Definition input_cp2k.F:75
represents keywords in an input
subroutine, public keyword_release(keyword)
releases the given keyword (see doc/ReferenceCounting.html)
subroutine, public keyword_create(keyword, location, name, description, usage, type_of_var, n_var, repeats, variants, default_val, default_l_val, default_r_val, default_lc_val, default_c_val, default_i_val, default_l_vals, default_r_vals, default_c_vals, default_i_vals, lone_keyword_val, lone_keyword_l_val, lone_keyword_r_val, lone_keyword_c_val, lone_keyword_i_val, lone_keyword_l_vals, lone_keyword_r_vals, lone_keyword_c_vals, lone_keyword_i_vals, enum_c_vals, enum_i_vals, enum, enum_strict, enum_desc, unit_str, citations, deprecation_notice, removed)
creates a keyword object
builds the input structure for optimize_basis
subroutine, public create_optimize_basis_section(section)
creates the optimize_basis section
builds the input structure for optimize_input
subroutine, public create_optimize_input_section(section)
creates the optimize_input section
objects that represent the structure of input sections and the data contained in an input section
subroutine, public section_create(section, location, name, description, n_keywords, n_subsections, repeats, citations)
creates a list of keywords
subroutine, public section_add_keyword(section, keyword)
adds a keyword to the given section
subroutine, public section_add_subsection(section, subsection)
adds a subsection to the given section
recursive subroutine, public section_release(section)
releases the given keyword list (see doc/ReferenceCounting.html)
a wrapper for basic fortran types.
integer, parameter, public lchar_t
integer, parameter, public logical_t
integer, parameter, public char_t
integer, parameter, public integer_t
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
This module defines the grid data type and some basic operations on it.
Definition pw_grids.F:36
integer, parameter, public do_pw_grid_blocked_false
Definition pw_grids.F:78
integer, parameter, public do_pw_grid_blocked_true
Definition pw_grids.F:78
integer, parameter, public do_pw_grid_blocked_free
Definition pw_grids.F:78
Calculates 2-center integrals for different r12 operators comparing the Solid harmonic Gaussian integ...
subroutine, public create_shg_integrals_test_section(section)
Create input section for unit testing.
Utilities for string manipulations.
character(len=1), parameter, public newline
Declares the input for swarm framework.
Definition swarm_input.F:12
subroutine, public create_swarm_section(swarm_section)
Declares the SWARM input section.
Definition swarm_input.F:45
represent a keyword in the input
represent a section of the input file