26 #include "./base/base_uses.f90"
31 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_rsgrid'
44 TYPE(section_type),
POINTER :: section
46 TYPE(keyword_type),
POINTER :: keyword
48 cpassert(.NOT.
ASSOCIATED(section))
50 description=
"Set options that influence how the realspace grids are being distributed in parallel runs.", &
51 n_keywords=5, n_subsections=0, repeats=.true.)
54 CALL keyword_create(keyword, __location__, name=
"DISTRIBUTION_TYPE", &
55 description=
"Parallelization strategy.", &
56 usage=
"DISTRIBUTION_TYPE DISTRIBUTED", &
57 enum_c_vals=s2a(
"AUTOMATIC",
"DISTRIBUTED",
"REPLICATED"), &
59 enum_desc=s2a(
"Use heuristic rules to decide between distributed and replicated", &
60 "Force a distributed setup if possible", &
61 "Force a replicated setup"), &
66 CALL keyword_create(keyword, __location__, name=
"DISTRIBUTION_LAYOUT", &
67 description=
"Specifies the number of slices in the x, y and z directions. "// &
68 "-1 specifies that any number of slices is OK. "// &
69 "If a given distribution can not be satisfied, a replicated grid will result. "// &
70 "Also see LOCK_DISTRIBUTION.", &
71 usage=
"DISTRIBUTION_LAYOUT", &
72 repeats=.false., n_var=3, &
73 default_i_vals=(/-1, -1, -1/))
77 CALL keyword_create(keyword, __location__, name=
"MAX_DISTRIBUTED_LEVEL", &
78 description=
"If the multigrid-level of a grid is larger than the parameter,"// &
79 " it will not be distributed in the automatic scheme.", &
80 usage=
"MAX_DISTRIBUTED_LEVEL 1", &
85 CALL keyword_create(keyword, __location__, name=
"LOCK_DISTRIBUTION", &
86 description=
"Expert use only, only basic QS deals correctly with a non-default value. "// &
87 "If the distribution is locked, a grid will have the same distribution as "// &
88 "the next finer multigrid (provided it is distributed). "// &
89 "If unlocked, all grids can be distributed freely.", &
90 usage=
"LOCK_DISTRIBUTION TRUE", &
96 description=
"A grid will only be distributed if the memory usage for that grid (including halo) "// &
97 "is smaller than a replicated grid by this parameter.", &
98 usage=
"MEMORY_FACTOR 4.0", &
103 CALL keyword_create(keyword, __location__, name=
"HALO_REDUCTION_FACTOR", &
104 description=
"Can be used to reduce the halo of the distributed grid (experimental features).", &
105 usage=
"HALO_REDUCTION_FACTOR 0.5", &
106 default_r_val=1.0_dp)
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public rsgrid_replicated
integer, parameter, public rsgrid_automatic
integer, parameter, public rsgrid_distributed
Utilities for string manipulations.