|
PB3D [2.47]
Ideal linear high-n MHD stability in 3-D
|
Numerical utilities related to MPI. More...
Interfaces and Types | |
| interface | get_ser_var |
| Gather parallel variable in serial version on group master. More... | |
| interface | get_ghost_arr |
| Fill the ghost regions in an array. More... | |
| interface | broadcast_var |
| Wrapper function to broadcast a single variable using MPI. More... | |
Functions/Subroutines | |
| integer function, public | redistribute_var (var, dis_var, lims, lims_dis) |
| Redistribute variables according to new limits. | |
| integer function, public | wait_mpi () |
| Wait for all processes, wrapper to MPI barrier. | |
| integer function, public | lock_req_acc (lock, blocking) |
| Request access to lock of a BL (blocking) or optionally a NB (non-blocking) type. | |
| integer function, public | lock_return_acc (lock) |
| Returns access to a lock. | |
| integer function, public | lock_wl_change (wl_action, blocking, lock_loc, wl, ranks) |
| Adds, removes or sets to active a rank from the waiting list for a lock and returns the lock waiting list: | |
| character(len=max_str_ln) function, public | lock_header (lock_loc) |
| Returns the header for lock debug messages. | |
Variables | |
| logical, public | debug_lock = .false. |
| print debug information about lock operations | |
| integer, public | n_waits = 0 |
| number of waits | |
Numerical utilities related to MPI.
This includes a lock system, which can be both BL (blocking) or NB (non-blocking). It is based on the implementation of an MPI-IO atomic mode without file support, described in [13].
The reason for this was the fact that using a simple lock file can lead to crashes.
| character(len=max_str_ln) function, public mpi_utilities::lock_header | ( | type(lock_type), intent(in) | lock_loc | ) |
Returns the header for lock debug messages.
| [in] | lock_loc | lock |
Definition at line 1216 of file MPI_utilities.f90.
| integer function, public mpi_utilities::lock_req_acc | ( | type(lock_type), intent(inout) | lock, |
| logical, intent(in), optional | blocking ) |
Request access to lock of a BL (blocking) or optionally a NB (non-blocking) type.
Definition at line 764 of file MPI_utilities.f90.
| integer function, public mpi_utilities::lock_return_acc | ( | type(lock_type), intent(inout) | lock | ) |
Returns access to a lock.
The blocking property has been set when requesting the lock.
Definition at line 871 of file MPI_utilities.f90.
| integer function, public mpi_utilities::lock_wl_change | ( | integer, intent(in) | wl_action, |
| logical, intent(in) | blocking, | ||
| type(lock_type), intent(inout) | lock_loc, | ||
| integer, dimension(:), intent(inout), allocatable | wl, | ||
| integer, dimension(:), intent(in), optional | ranks ) |
Adds, removes or sets to active a rank from the waiting list for a lock and returns the lock waiting list:
Actions:
wl_action = 0: removewl_action = 1: addwl_action = 2: activeOr negative equivalents for non-blocking (NB) procs.
Optionally, the rank(s) of the process for which to perform this action can be passed. This is useful for doing the same action on multiple processes.
| [in] | wl_action | action to perform |
| [in] | blocking | the ranks to be changed are blocking |
| [in,out] | lock_loc | lock |
| [in,out] | wl | waiting list |
| [in] | ranks | rank(s) for which to perform option |
Definition at line 1109 of file MPI_utilities.f90.
| integer function, public mpi_utilities::redistribute_var | ( | real(dp), dimension(:), intent(in) | var, |
| real(dp), dimension(:), intent(inout) | dis_var, | ||
| integer, dimension(2), intent(in) | lims, | ||
| integer, dimension(2), intent(in) | lims_dis ) |
Redistribute variables according to new limits.
| [in] | var | parallel vector |
| [in,out] | dis_var | redistributed vector |
| [in] | lims | indices of parallel vector |
| [in] | lims_dis | indices of redistributed parallel vector |
Definition at line 329 of file MPI_utilities.f90.
| integer function, public mpi_utilities::wait_mpi |
Wait for all processes, wrapper to MPI barrier.
Definition at line 743 of file MPI_utilities.f90.
| logical, public mpi_utilities::debug_lock = .false. |
print debug information about lock operations
Definition at line 40 of file MPI_utilities.f90.
| integer, public mpi_utilities::n_waits = 0 |