26 #include "./base/base_uses.f90"
31 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .false.
32 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_distribution'
44 TYPE(section_type),
POINTER :: section
46 TYPE(keyword_type),
POINTER :: keyword
48 cpassert(.NOT.
ASSOCIATED(section))
50 description=
"can be used used to tune the parallel distribution of the data", &
51 n_keywords=2, n_subsections=2, repeats=.false.)
56 description=
"The cost model that needs to be minimized ", &
57 usage=
"COST_MODEL BLOCK_COUNT", &
58 enum_c_vals=s2a(
"BLOCK_COUNT",
"BLOCK_SURFACE",
"BLOCK_LMAX"), &
60 enum_desc=s2a(
"the number of blocks", &
61 "the number of blocks weighted by the number elements per block", &
62 "the number of blocks weighted by the sum of the lmax"), &
67 CALL keyword_create(keyword, __location__, name=
"2D_MOLECULAR_DISTRIBUTION", &
68 description=
"Distribute the atoms so that atoms belonging to a given molecule"// &
69 " are on the same CPU for the 2D distribution. This might give rise to a"// &
70 " worse distribution but reduces memory needs of finding the optimal distribution.", &
71 usage=
"2D_MOLECULAR_DISTRIBUTION TRUE", &
72 default_l_val=.false., lone_keyword_l_val=.true.)
76 CALL keyword_create(keyword, __location__, name=
"SKIP_OPTIMIZATION", &
77 description=
"Do not optimize the distribution, go for something very simple."// &
78 " Might be useful if the optimization, which scales quadratically in system size, is too expensive.", &
79 usage=
"SKIP_OPTIMIZATION TRUE", &
80 default_l_val=.false., lone_keyword_l_val=.true.)
84 CALL keyword_create(keyword, __location__, name=
"BASIC_OPTIMIZATION", &
85 description=
"Creates a distribution based on a few heuristics using only minimal memory "// &
87 usage=
"BASIC_OPTIMIZATION TRUE", &
88 default_l_val=.true., lone_keyword_l_val=.true.)
92 CALL keyword_create(keyword, __location__, name=
"BASIC_SPATIAL_OPTIMIZATION", &
93 description=
"Creates a distribution with spatial info, using only minimal memory "// &
95 usage=
"BASIC_SPATIAL_OPTIMIZATION TRUE", &
96 default_l_val=.false., lone_keyword_l_val=.true.)
100 CALL keyword_create(keyword, __location__, name=
"BASIC_CLUSTER_OPTIMIZATION", &
101 description=
"Creates a distribution with spatial info, using recursively KMEANS clustering. ", &
102 usage=
"BASIC_CLUSTER_OPTIMIZATION TRUE", &
103 default_l_val=.false., lone_keyword_l_val=.true.)
108 description=
"Take the symmetry of the distribution_2d into account.", &
109 usage=
"SYMMETRIC TRUE", &
110 default_l_val=.true., lone_keyword_l_val=.true.)
Utilities for string manipulations.