ALL Fortran module¶
Due to the case insensitive nature of Fortran and the used toolchain
(doxygen and sphinx), all variables and function names are lowercase on
this page. We do, however, use only upper case for global constants, such
as the load balancing methods (ALL_STAGGERED
etc.) and the function
names are usually written similarly to MPI as ALL_get_work
. The object
is of type(ALL_t)
.
Methods¶
Available methods are:
-
integer(c_int), parameter, public all_module::all_forcebased = 2
-
integer(c_int), parameter, public all_module::all_histogram = 4
-
integer(c_int), parameter, public all_module::all_staggered = 0
-
integer(c_int), parameter, public all_module::all_tensor = 1
-
integer(c_int), parameter, public all_module::all_voronoi = 3
Errors¶
The exceptions map to the following error constants:
-
integer(c_int), parameter, public all_module::all_error_filesystem = 6
-
integer(c_int), parameter, public all_module::all_error_generic = 1
-
integer(c_int), parameter, public all_module::all_error_internal = 6
-
integer(c_int), parameter, public all_module::all_error_invalidargument = 4
-
integer(c_int), parameter, public all_module::all_error_invalidcommtype = 3
-
integer(c_int), parameter, public all_module::all_error_outofbounds = 5
-
integer(c_int), parameter, public all_module::all_error_pointdimensionmissmatch = 2
And the error message is returned in a string of length
ALL_ERROR_LENGTH
.
Functions¶
These function all have a corresponding call in the object, with the
ALL_
stripped from the function name. So with an object named
balancer
the function ALL_get_work(balancer, work)
is identical to
balancer%get_work(work)
. The following functions are available:
-
subroutine, public all_module::all_balance (this)
Run loadbalancer and calculate new vertices.
-
subroutine, public all_module::all_finalize (this)
Delete the loadbalance object.
-
subroutine, public all_module::all_setup (this)
Set up the loadbalancer.
Getters¶
-
subroutine, public all_module::all_get_dimension (this, dim)
Get current dimension from loadbalancer.
-
subroutine, public all_module::all_get_gamma (this, gamma)
Retrieve currently set gamma value of balancer.
-
subroutine, public all_module::all_get_length_of_work (this, length)
Retrieve length of work array.
-
subroutine, public all_module::all_get_neighbors (this, neighbors)
Retrieve list of neighboring ranks (must be correct size already)
-
subroutine, public all_module::all_get_number_of_neighbors (this, count)
Retrieve number of neighbors (i.e. length of neighbors list)
-
subroutine, public all_module::all_get_number_of_vertices (this, n)
Retrieve number of vertices for current vertices.
- Parameters
[out] n
: set to number of new vertices
-
subroutine, public all_module::all_get_prev_vertices (this, vertices)
Retrieve vertices from before loadbalancing.
- Parameters
[out] vertices
: set to prev vertices, must be exact size (dim,n), unchecked!
-
subroutine, public all_module::all_get_vertices (this, vertices)
Retrieve current vertices.
- Parameters
[out] vertices
: set to new vertices, must be exact size (dim,n)
-
subroutine, public all_module::all_get_vertices_alloc (this, vertices)
Same function as get_vertices, but takes an allocatable array, and resizes automatically.
- Parameters
[inout] vertices
: set to new vertices, may be reallocated to fit
-
subroutine, public all_module::all_get_work (this, work)
Retrieve first element of work array.
-
subroutine, public all_module::all_get_work_array (this, work)
Retrieve work array, which must already be the correct size.
Setters¶
-
subroutine, public all_module::all_set_gamma (this, gamma)
Set gamma value for load balancer.
-
subroutine, public all_module::all_set_method_data_histgram (this, nbins)
Set number of bins for histogram method.
- Parameters
[in] nbins
: Number of bins per dimension
-
subroutine, public all_module::all_set_min_domain_size (this, domain_size)
Set a minimum domain size.
- Parameters
[in] domain_size
: minimum domain size
-
subroutine, public all_module::all_set_proc_grid_params (this, loc, ranks)
Set the grid parameters for this process.
- Parameters
[in] loc
: index of domain indim
directions (0-indexed!)[in] ranks
: total number of domains indim
directions
-
subroutine, public all_module::all_set_proc_tag (this, tag)
Set process identifying tag for output.
- Parameters
[in] tag
: tag of local process, only output in VTK outlines
-
subroutine, public all_module::all_set_sys_size (this, syssize)
Set size of system, which is required for the histogram method.
- Parameters
[in] syssize
: system size
-
subroutine, public all_module::all_set_vertices (this, vertices)
Set new vertices.
- Parameters
[in] vertices
: vertices of domain, forn
domains must have shape: (dim,n)
-
subroutine, public all_module::all_set_work (this, work)
Set the work of this process.
- Parameters
[in] work
: work of this domain
-
subroutine, public all_module::all_set_work_multi (this, work)
Set multi dimensional work of this process.
- Parameters
[in] work
: multi dimensional work of this domain
Output¶
-
subroutine, public all_module::all_print_vtk_outlines (this, step)
Print VTK outlines (must be enabled in build step)
- Parameters
[in] step
: current step, used for filename
-
subroutine, public all_module::all_print_vtk_vertices (this, step)
Print VTK domain vertices (must be enabled in build step)
- Parameters
[in] step
: current step, used for filename
Error handling¶
-
integer function, public all_module::all_error ()
-
character(len=all_error_length) function, public all_module::all_error_description ()
-
subroutine, public all_module::all_reset_error ()