Octopus
calc_mode_par_oct_m::calc_mode_par_t Type Reference

Octopus Parallelization modes, stored concurrently in a bit representation. More...

Detailed Description

Octopus Parallelization modes, stored concurrently in a bit representation.

ibset sets a specific bit in an integer, at a position given by P_STRATEGY_X - 1, to 1. For example: ibset(P_STRATEGY_SERIAL, P_STRATEGY_DOMAINS - 1) = ibset(0, 0) sets the 0th bit of 0 to 1, giving 0001 ibset(P_STRATEGY_SERIAL, P_STRATEGY_KPOINTS - 1) = ibset(0, 2) sets the 2nd bit of 0 to 1, giving 0100

ior performs a bitwise inclusive OR operation. For example: ior(0001, 0100) = 0101

For a 32-bit integer, up to 32 strategies can be represented.

One can query if a given strategy is enabled with btest:

if (btest(par_mask, p_strategy_x - 1)) ...

or compare two parallel strategy masks like: ```fortran par_strategy == bitand(mcpar_strategy, parallel_mask)

Definition at line 164 of file calc_mode_par.F90.

Private Member Functions

procedure set_parallelization => calc_mode_par_set_parallelization
 
procedure unset_parallelization => calc_mode_par_unset_parallelization
 
procedure set_scalapack_compat => calc_mode_par_set_scalapack_compat
 
procedure scalapack_compat => calc_mode_par_scalapack_compat
 
procedure parallel_mask => calc_mode_par_parallel_mask
 
procedure default_parallel_mask => calc_mode_par_default_parallel_mask
 

Private Attributes

integer par_mask = default_parallelization_mask
 Parallelization mask. More...
 
integer def_par_mask = default_parallelization_mask
 Default Parallelization mask. More...
 
logical scalapack_compat_ = .false.
 Is the Parallelization strategy compatible with scalapack. More...
 

Member Function/Subroutine Documentation

◆ set_parallelization()

procedure calc_mode_par_oct_m::calc_mode_par_t::set_parallelization
private

Definition at line 170 of file calc_mode_par.F90.

◆ unset_parallelization()

procedure calc_mode_par_oct_m::calc_mode_par_t::unset_parallelization
private

Definition at line 171 of file calc_mode_par.F90.

◆ set_scalapack_compat()

procedure calc_mode_par_oct_m::calc_mode_par_t::set_scalapack_compat
private

Definition at line 172 of file calc_mode_par.F90.

◆ scalapack_compat()

procedure calc_mode_par_oct_m::calc_mode_par_t::scalapack_compat
private

Definition at line 173 of file calc_mode_par.F90.

◆ parallel_mask()

procedure calc_mode_par_oct_m::calc_mode_par_t::parallel_mask
private

Definition at line 174 of file calc_mode_par.F90.

◆ default_parallel_mask()

procedure calc_mode_par_oct_m::calc_mode_par_t::default_parallel_mask
private

Definition at line 175 of file calc_mode_par.F90.

Member Data Documentation

◆ par_mask

integer calc_mode_par_oct_m::calc_mode_par_t::par_mask = default_parallelization_mask
private

Parallelization mask.

Definition at line 166 of file calc_mode_par.F90.

◆ def_par_mask

integer calc_mode_par_oct_m::calc_mode_par_t::def_par_mask = default_parallelization_mask
private

Default Parallelization mask.

Definition at line 167 of file calc_mode_par.F90.

◆ scalapack_compat_

logical calc_mode_par_oct_m::calc_mode_par_t::scalapack_compat_ = .false.
private

Is the Parallelization strategy compatible with scalapack.

Definition at line 168 of file calc_mode_par.F90.


The documentation for this type was generated from the following file: