![]() |
Stellarator-Tools
|
Defines the base class of the type bmw_parallel_context_class. This contains the state variables needed by BMW for parallel computation. More...
Data Types | |
| interface | bmw_parallel_context_class |
| Base class representing a bmw parallel context. This contains all memory needed parameters needed to parallel processing. More... | |
Functions/Subroutines | |
| class(bmw_parallel_context_class) function, pointer | bmw_parallel_context_construct (comm) |
| Construct a bmw_context_class object. | |
| subroutine | bmw_parallel_context_destruct (this) |
| Deconstruct a bmw_parallel_context_class object. | |
| subroutine | bmw_parallel_context_set_threads (this, num_threads) |
| Set the number of threads. | |
| subroutine | bmw_parallel_context_abort (status) |
| Abort the entire program. | |
| subroutine | bmw_parallel_context_report (this, io_unit) |
| Report the number of parallel processes and threads. | |
| subroutine | bmw_parallel_context_reduce1 (this, buffer) |
| Reduce parallel buffers. | |
| subroutine | bmw_parallel_context_reduce2 (this, buffer) |
| Reduce parallel buffers. | |
| subroutine | bmw_parallel_context_reduce3 (this, buffer) |
| Reduce parallel buffers. | |
| subroutine | bmw_parallel_context_reduce4 (this, buffer) |
| Reduce parallel buffers. | |
| pure integer function | bmw_parallel_context_start (this, total) |
| Compute the start index of a flat array. | |
| pure integer function | bmw_parallel_context_end (this, total) |
| Compute the end index of a flat array. | |
| pure integer function | bmw_parallel_context_i (index, num_i) |
| Compute the i index of a flat array. | |
| pure integer function | bmw_parallel_context_j (index, num_i, num_j) |
| Compute the j index of a flat array. | |
| pure integer function | bmw_parallel_context_k (index, num_i, num_j) |
| Compute the k index of a flat array. | |
Defines the base class of the type bmw_parallel_context_class. This contains the state variables needed by BMW for parallel computation.
| subroutine bmw_parallel_context::bmw_parallel_context_abort | ( | integer, intent(in) | status | ) |
Abort the entire program.
Aborts everything.
| [in] | status | Error number to abort with. |
| class (bmw_parallel_context_class) function, pointer bmw_parallel_context::bmw_parallel_context_construct | ( | integer, intent(in) | comm | ) |
Construct a bmw_context_class object.
Allocates memory and initializes a bmw_parallel_context_class object.
| [in] | comm | MPI communicator. Only used if MPI support has been compiled in. |
| subroutine bmw_parallel_context::bmw_parallel_context_destruct | ( | type (bmw_parallel_context_class), intent(inout) | this | ) |
Deconstruct a bmw_parallel_context_class object.
Deallocates memory and uninitializes a bmw_parallel_context_class object.
| [in,out] | this | A bmw_parallel_context_class instance. |
| [in] | finalize | Flag to call MPI_FINALIZE. Only used if MPI support has been compiled in. |
| pure integer function bmw_parallel_context::bmw_parallel_context_end | ( | class (bmw_parallel_context_class), intent(in) | this, |
| integer, intent(in) | total | ||
| ) |
Compute the end index of a flat array.
The total problem size is divided by the number of processes. Any remaining elements are added to the first few processes.
| [in] | this | A bmw_parallel_context_class instance. |
| [in] | total | Total number of elements in the loop. |
| pure integer function bmw_parallel_context::bmw_parallel_context_i | ( | integer, intent(in) | index, |
| integer, intent(in) | num_i | ||
| ) |
Compute the i index of a flat array.
The total problem size represents a three dimensional space. From the flat index, compute the i index.
| [in] | index | Flat index. |
| [in] | num_i | Size of the ith dimension. |
| pure integer function bmw_parallel_context::bmw_parallel_context_j | ( | integer, intent(in) | index, |
| integer, intent(in) | num_i, | ||
| integer, intent(in) | num_j | ||
| ) |
Compute the j index of a flat array.
The total problem size represents a three dimensional space. From the flat index, compute the j index.
| [in] | index | Flat index. |
| [in] | num_i | Size of the ith dimension. |
| [in] | num_j | Size of the jth dimension. |
| pure integer function bmw_parallel_context::bmw_parallel_context_k | ( | integer, intent(in) | index, |
| integer, intent(in) | num_i, | ||
| integer, intent(in) | num_j | ||
| ) |
Compute the k index of a flat array.
The total problem size represents a three dimensional space. From the flat index, compute the k index.
| [in] | index | Flat index. |
| [in] | num_i | Size of the ith dimension. |
| [in] | num_j | Size of the jth dimension. |
| subroutine bmw_parallel_context::bmw_parallel_context_reduce1 | ( | class (bmw_parallel_context_class), intent(in) | this, |
| real (rprec), dimension(:), intent(inout) | buffer | ||
| ) |
Reduce parallel buffers.
Reduce a buffer from all parallel processes. In the single processes case, this reduces to nothing. This reduces a 1D buffer.
| [in] | this | A bmw_parallel_context_class instance. |
| [in,out] | buffer | Buffer to reduce. |
| subroutine bmw_parallel_context::bmw_parallel_context_reduce2 | ( | class (bmw_parallel_context_class), intent(in) | this, |
| real (rprec), dimension(:,:), intent(inout) | buffer | ||
| ) |
Reduce parallel buffers.
Reduce a buffer from all parallel processes. In the single processes case, this reduces to nothing. This reduces a 2D buffer.
| [in] | this | A bmw_parallel_context_class instance. |
| [in,out] | buffer | Buffer to reduce. |
| subroutine bmw_parallel_context::bmw_parallel_context_reduce3 | ( | class (bmw_parallel_context_class), intent(in) | this, |
| real (rprec), dimension(:,:,:), intent(inout) | buffer | ||
| ) |
Reduce parallel buffers.
Reduce a buffer from all parallel processes. In the single processes case, this reduces to nothing. This reduces a 3D buffer.
| [in] | this | A bmw_parallel_context_class instance. |
| [in,out] | buffer | Buffer to reduce. |
| subroutine bmw_parallel_context::bmw_parallel_context_reduce4 | ( | class (bmw_parallel_context_class), intent(in) | this, |
| real (rprec), dimension(:,:,:,:), intent(inout) | buffer | ||
| ) |
Reduce parallel buffers.
Reduce a buffer from all parallel processes. In the single processes case, this reduces to nothing. This reduces a 4D buffer.
| [in] | this | A bmw_parallel_context_class instance. |
| [in,out] | buffer | Buffer to reduce. |
| subroutine bmw_parallel_context::bmw_parallel_context_report | ( | class (bmw_parallel_context_class), intent(inout) | this, |
| integer, intent(in) | io_unit | ||
| ) |
Report the number of parallel processes and threads.
Provides a summary report if the number of threads and processes currently configured.
| [in] | this | A bmw_parallel_context_class instance. |
| [in] | io_unit | Unit number to write messages to. |
| subroutine bmw_parallel_context::bmw_parallel_context_set_threads | ( | class (bmw_parallel_context_class), intent(inout) | this, |
| integer, intent(in) | num_threads | ||
| ) |
Set the number of threads.
Sets the number of OpenMP threads to use.
| [in] | this | A bmw_parallel_context_class instance. |
| [in] | num_threads | Number of threads to use. |
| pure integer function bmw_parallel_context::bmw_parallel_context_start | ( | class (bmw_parallel_context_class), intent(in) | this, |
| integer, intent(in) | total | ||
| ) |
Compute the start index of a flat array.
The total problem size is divided by the number of processes. Any remaining elements are added to the first few processes.
| [in] | this | A bmw_parallel_context_class instance. |
| [in] | total | Total number of elements in the loop. |