41 integer,
public,
parameter :: &
42 P_STRATEGY_SERIAL = 0, & !< single domain, all states, k-points on a single processor
49 integer,
parameter :: default_parallelization_mask = ior(ibset(p_strategy_serial,
p_strategy_domains - 1), &
73 integer :: par_mask = default_parallelization_mask
74 integer :: def_par_mask = default_parallelization_mask
75 logical :: scalapack_compat_ = .false.
86 type(calc_mode_par_t) :: calc_mode_par
92 class(calc_mode_par_t),
intent(inout) :: this
93 integer,
intent(in) :: par
94 logical,
intent(in) :: default
98 this%par_mask = ibset(this%par_mask, par - 1)
99 if (default) this%def_par_mask = ibset(this%def_par_mask, par - 1)
108 class(calc_mode_par_t),
intent(inout) :: this
109 integer,
intent(in) :: par
113 this%par_mask = ibclr(this%par_mask, par - 1)
114 this%def_par_mask = ibclr(this%def_par_mask, par - 1)
123 class(calc_mode_par_t),
intent(inout) :: this
127 this%scalapack_compat_ = .
true.
135 logical pure function calc_mode_par_scalapack_compat(this) result(compat)
136 class(calc_mode_par_t),
intent(in) :: this
138 compat = this%scalapack_compat_
143 integer pure function calc_mode_par_parallel_mask(this) result(par_mask)
144 class(calc_mode_par_t),
intent(in) :: this
146 par_mask = this%par_mask
153 integer pure function calc_mode_par_default_parallel_mask(this) result(par_mask)
154 class(calc_mode_par_t),
intent(in) :: this
156 par_mask = this%def_par_mask
This module handles the calculation mode.
integer, parameter, public p_strategy_max
subroutine calc_mode_par_set_scalapack_compat(this)
Set that the current run mode requires division of states and domains to be compatible with scalapack...
subroutine calc_mode_par_set_parallelization(this, par, default)
Add a parallelization strategy to the list of possible ones.
integer, parameter, public p_strategy_kpoints
parallelization in k-points
integer, parameter, public p_strategy_other
something else like e-h pairs
logical pure function calc_mode_par_scalapack_compat(this)
Get whether the current run mode requires division of states and domains to be compatible with scalap...
integer pure function calc_mode_par_parallel_mask(this)
Get parallel mask.
integer, parameter, public p_strategy_domains
parallelization in domains
type(calc_mode_par_t), public calc_mode_par
Singleton instance of parallel calculation mode.
integer pure function calc_mode_par_default_parallel_mask(this)
Get the default parallel mask used for a calculation.
subroutine calc_mode_par_unset_parallelization(this, par)
Remove a parallelization strategy from the list of possible ones. It will also be removed from the de...
integer, parameter, public p_strategy_states
parallelization in states
Octopus Parallelization modes, stored concurrently in a bit representation.