PartMC
2.6.1
|
Parallel aerosol particle coagulation with MPI. More...
Data Types | |
type | request_t |
A single outstanding request for a remote particle. More... | |
Functions/Subroutines | |
subroutine | request_allocate (request) |
subroutine | request_deallocate (request) |
Deallocate a request object and set it to be invalid. More... | |
logical function | request_is_active (request) |
Whether the given reqest object is currectly active. More... | |
subroutine | mc_coag_dist (coag_kernel_type, env_state, aero_data, aero_state, del_t, tot_n_samp, tot_n_coag) |
Do coagulation for time del_t. More... | |
subroutine | coag_dist_recv (requests, env_state, aero_weight_total, aero_data, aero_state, accept_factors, coag_kernel_type, tot_n_coag, magnitudes, procs_done) |
subroutine | add_coagulation_requests (aero_state, requests, n_parts, local_bin, remote_bin, n_samps, samps_remaining) |
logical function | any_requests_active (requests) |
Returns .true. if any of the requests are active, otherwise returns .false. More... | |
subroutine | find_rand_remote_proc (n_parts, remote_bin, remote_proc) |
subroutine | update_n_samps (n_samps, local_bin, remote_bin, samps_remaining) |
subroutine | send_request_particle (remote_proc, remote_bin) |
subroutine | recv_request_particle (aero_state) |
subroutine | send_return_no_particle (dest_proc, i_bin) |
subroutine | recv_return_no_particle (requests, aero_data, aero_state) |
subroutine | send_return_req_particle (aero_particle, i_bin, dest_proc) |
subroutine | recv_return_req_particle (requests, env_state, aero_weight_total, aero_data, aero_state, accept_factors, coag_kernel_type, tot_n_coag, magnitudes) |
subroutine | send_return_unreq_particle (aero_particle, dest_proc) |
subroutine | recv_return_unreq_particle (aero_state, aero_data) |
subroutine | send_done (dest_proc) |
Send a message saying that this process is finished with its coagulation. More... | |
subroutine | recv_done (procs_done) |
Receive a done message. More... | |
subroutine | generate_n_samps (n_parts, del_t, bin_grid, aero_weight_array, k_max, n_samps, accept_factors) |
generate the number of samples to do per bin pair. More... | |
subroutine | coagulate_dist (aero_data, aero_state, aero_particle_1, aero_particle_2, remote_proc, aero_weight_total, magnitudes, remove_1, remove_2) |
Variables | |
integer, parameter | coag_dist_outgoing_buffer_size = 1000000 |
Size of the outgoing buffer for bsend (bytes). More... | |
integer, parameter | coag_dist_max_buffer_size = 10000 |
Size of send and receive buffer for each message (bytes). More... | |
integer, parameter | coag_dist_max_requests = 1 |
integer, parameter | coag_dist_tag_request_particle = 5321 |
integer, parameter | coag_dist_tag_return_req_particle = 5322 |
integer, parameter | coag_dist_tag_return_unreq_particle = 5323 |
integer, parameter | coag_dist_tag_return_no_particle = 5324 |
integer, parameter | coag_dist_tag_done = 5325 |
Parallel aerosol particle coagulation with MPI.
subroutine pmc_coagulation_dist::add_coagulation_requests | ( | type(aero_state_t), intent(inout) | aero_state, |
type(request_t), dimension(coag_dist_max_requests), intent(inout) | requests, | ||
integer, dimension(:,:), intent(in) | n_parts, | ||
integer, intent(inout) | local_bin, | ||
integer, intent(inout) | remote_bin, | ||
integer, dimension(:,:), intent(inout) | n_samps, | ||
logical, intent(inout) | samps_remaining | ||
) |
[in,out] | aero_state | Aerosol state. |
[in,out] | requests | Array of outstanding requests. |
[in] | n_parts | Number of particles per bin per process. |
[in,out] | local_bin | Bin index of first particle we need to coagulate. |
[in,out] | remote_bin | Bin index of second particle we need to coagulate. |
[in,out] | n_samps | Number of samples remaining per bin pair |
[in,out] | samps_remaining | Whether there are still coagulation samples that need to be done. |
Definition at line 298 of file coagulation_dist.F90.
logical function pmc_coagulation_dist::any_requests_active | ( | type(request_t), dimension(coag_dist_max_requests), intent(inout) | requests | ) |
Returns .true. if any of the requests are active, otherwise returns
.false.
[in,out] | requests | Array of outstanding requests. |
Definition at line 354 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::coag_dist_recv | ( | type(request_t), dimension(coag_dist_max_requests), intent(inout) | requests, |
type(env_state_t), intent(in) | env_state, | ||
type(aero_weight_array_t), intent(in) | aero_weight_total, | ||
type(aero_data_t), intent(in) | aero_data, | ||
type(aero_state_t), intent(inout) | aero_state, | ||
real(kind=dp), dimension(:,:), intent(in) | accept_factors, | ||
integer, intent(in) | coag_kernel_type, | ||
integer, intent(inout) | tot_n_coag, | ||
real(kind=dp), dimension(:,:), intent(in) | magnitudes, | ||
logical, dimension(:), intent(inout) | procs_done | ||
) |
[in,out] | requests | Array of outstanding requests. |
[in] | env_state | Environment state. |
[in] | aero_weight_total | Total weighting functions. |
[in] | aero_data | Aerosol data. |
[in,out] | aero_state | Aerosol state. |
[in] | accept_factors | Accept scale factors per bin pair (1). |
[in] | coag_kernel_type | Coagulation kernel type. |
[in,out] | tot_n_coag | Number of coagulation events. |
[in] | magnitudes | Computational volumes on all processes. |
[in,out] | procs_done | Which processes are finished with coagulation. |
Definition at line 245 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::coagulate_dist | ( | type(aero_data_t), intent(in) | aero_data, |
type(aero_state_t), intent(inout) | aero_state, | ||
type(aero_particle_t), intent(in) | aero_particle_1, | ||
type(aero_particle_t), intent(in) | aero_particle_2, | ||
integer, intent(in) | remote_proc, | ||
type(aero_weight_array_t), intent(in) | aero_weight_total, | ||
real(kind=dp), dimension(:,:), intent(in) | magnitudes, | ||
logical, intent(out) | remove_1, | ||
logical, intent(out) | remove_2 | ||
) |
[in] | aero_data | Aerosol data. |
[in,out] | aero_state | Aerosol state. |
[in] | aero_particle_1 | First particle to coagulate. |
[in] | aero_particle_2 | Second particle to coagulate. |
[in] | remote_proc | Remote process that the particle came from. |
[in] | aero_weight_total | Total weight across all processes. |
[in] | magnitudes | Computational volumes on all processes (m^3). |
[out] | remove_1 | Whether to remove aero_particle_1 after the coagulation. |
[out] | remove_2 | Whether to remove aero_particle_2 after the coagulation. |
Definition at line 880 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::find_rand_remote_proc | ( | integer, dimension(:,:), intent(in) | n_parts, |
integer, intent(in) | remote_bin, | ||
integer, intent(out) | remote_proc | ||
) |
[in] | n_parts | Number of particles per bin per process. |
[in] | remote_bin | Remote bin number. |
[out] | remote_proc | Remote process number chosen at random. |
Definition at line 373 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::generate_n_samps | ( | integer, dimension(:,:), intent(in) | n_parts, |
real(kind=dp), intent(in) | del_t, | ||
type(bin_grid_t), intent(in) | bin_grid, | ||
type(aero_weight_array_t), intent(in) | aero_weight_array, | ||
real(kind=dp), dimension(:,:), intent(in) | k_max, | ||
integer, dimension(:,:), intent(out) | n_samps, | ||
real(kind=dp), dimension(:,:), intent(out) | accept_factors | ||
) |
generate the number of samples to do per bin pair.
[in] | n_parts | Number of particles per bin on all processes. |
[in] | del_t | Timestep. |
[in] | bin_grid | Bin grid. |
[in] | aero_weight_array | Weighting function array. |
[in] | k_max | Maximum kernel. |
[out] | n_samps | Number of samples to do per bin pair. |
[out] | accept_factors | Accept scale factors per bin pair (1). |
Definition at line 841 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::mc_coag_dist | ( | integer, intent(in) | coag_kernel_type, |
type(env_state_t), intent(in) | env_state, | ||
type(aero_data_t), intent(in) | aero_data, | ||
type(aero_state_t), intent(inout) | aero_state, | ||
real(kind=dp), intent(in) | del_t, | ||
integer, intent(out) | tot_n_samp, | ||
integer, intent(out) | tot_n_coag | ||
) |
Do coagulation for time del_t.
[in] | coag_kernel_type | Coagulation kernel type. |
[in] | env_state | Environment state. |
[in] | aero_data | Aerosol data. |
[in,out] | aero_state | Aerosol state. |
[in] | del_t | Timestep. |
[out] | tot_n_samp | Total number of samples tested. |
[out] | tot_n_coag | Number of coagulation events. |
Definition at line 104 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::recv_done | ( | logical, dimension(:), intent(inout) | procs_done | ) |
Receive a done message.
[in,out] | procs_done | Which processes are finished with coagulation. |
Definition at line 810 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::recv_request_particle | ( | type(aero_state_t), intent(inout) | aero_state | ) |
[in,out] | aero_state | Aero state. |
Definition at line 455 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::recv_return_no_particle | ( | type(request_t), dimension(coag_dist_max_requests), intent(inout) | requests, |
type(aero_data_t), intent(in) | aero_data, | ||
type(aero_state_t), intent(inout) | aero_state | ||
) |
[in,out] | requests | Array of outstanding requests. |
[in] | aero_data | Aerosol data. |
[in,out] | aero_state | Aerosol state. |
Definition at line 530 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::recv_return_req_particle | ( | type(request_t), dimension(coag_dist_max_requests), intent(inout) | requests, |
type(env_state_t), intent(in) | env_state, | ||
type(aero_weight_array_t), intent(in) | aero_weight_total, | ||
type(aero_data_t), intent(in) | aero_data, | ||
type(aero_state_t), intent(inout) | aero_state, | ||
real(kind=dp), dimension(:,:), intent(in) | accept_factors, | ||
integer, intent(in) | coag_kernel_type, | ||
integer, intent(inout) | tot_n_coag, | ||
real(kind=dp), dimension(:,:), intent(in) | magnitudes | ||
) |
[in,out] | requests | Array of outstanding requests. |
[in] | env_state | Environment state. |
[in] | aero_weight_total | Total weighting array. |
[in] | aero_data | Aerosol data. |
[in,out] | aero_state | Aerosol state. |
[in] | accept_factors | Accept scale factors per bin pair (1). |
[in] | coag_kernel_type | Coagulation kernel type. |
[in,out] | tot_n_coag | Number of coagulation events. |
[in] | magnitudes | Computational volumes on all processes. |
Definition at line 619 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::recv_return_unreq_particle | ( | type(aero_state_t), intent(inout) | aero_state, |
type(aero_data_t), intent(in) | aero_data | ||
) |
[in,out] | aero_state | Aerosol state. |
[in] | aero_data | Aerosol data. |
Definition at line 748 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::request_allocate | ( | type(request_t), intent(out) | request | ) |
[out] | request | Request object to allocate. |
Definition at line 68 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::request_deallocate | ( | type(request_t), intent(inout) | request | ) |
Deallocate a request object and set it to be invalid.
[in,out] | request | Request object to deallocate |
Definition at line 80 of file coagulation_dist.F90.
logical function pmc_coagulation_dist::request_is_active | ( | type(request_t), intent(in) | request | ) |
Whether the given reqest object is currectly active.
[in] | request | Request object to test for activeness. |
Definition at line 92 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::send_done | ( | integer, intent(in) | dest_proc | ) |
Send a message saying that this process is finished with its coagulation.
[in] | dest_proc | Process to send the message to. |
Definition at line 790 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::send_request_particle | ( | integer, intent(in) | remote_proc, |
integer, intent(in) | remote_bin | ||
) |
[in] | remote_proc | Remote process number. |
[in] | remote_bin | Remote bin number. |
Definition at line 428 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::send_return_no_particle | ( | integer, intent(in) | dest_proc, |
integer, intent(in) | i_bin | ||
) |
[in] | dest_proc | Process number to send message to. |
[in] | i_bin | Bin number where there was no particle. |
Definition at line 503 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::send_return_req_particle | ( | type(aero_particle_t), intent(in) | aero_particle, |
integer, intent(in) | i_bin, | ||
integer, intent(in) | dest_proc | ||
) |
[in] | aero_particle | Aero particle to send. |
[in] | i_bin | Bin that the particle is in. |
[in] | dest_proc | Process number to send particle to. |
Definition at line 587 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::send_return_unreq_particle | ( | type(aero_particle_t), intent(in) | aero_particle, |
integer, intent(in) | dest_proc | ||
) |
[in] | aero_particle | Aero particle to send. |
[in] | dest_proc | Process to send the particle to. |
Definition at line 720 of file coagulation_dist.F90.
subroutine pmc_coagulation_dist::update_n_samps | ( | integer, dimension(:,:), intent(inout) | n_samps, |
integer, intent(inout) | local_bin, | ||
integer, intent(inout) | remote_bin, | ||
logical, intent(inout) | samps_remaining | ||
) |
[in,out] | n_samps | Number of samples remaining per bin pair |
[in,out] | local_bin | Bin index of first particle we need to coagulate. |
[in,out] | remote_bin | Bin index of second particle we need to coagulate. |
[in,out] | samps_remaining | Whether there are still coagulation samples that need to be done. |
Definition at line 391 of file coagulation_dist.F90.
integer, parameter pmc_coagulation_dist::coag_dist_max_buffer_size = 10000 |
Size of send and receive buffer for each message (bytes).
The biggest message type will be one of the particle-sending types, for which we need pmc_mpi_pack_size_aero_particle(), plus a couple of integers or something. At the moment this means something like (10 + n_spec) reals, (3 + 2) integers, which for n_spec = 20 gives a size of 260 bytes.
Definition at line 39 of file coagulation_dist.F90.
integer, parameter pmc_coagulation_dist::coag_dist_max_requests = 1 |
Definition at line 40 of file coagulation_dist.F90.
integer, parameter pmc_coagulation_dist::coag_dist_outgoing_buffer_size = 1000000 |
Size of the outgoing buffer for bsend
(bytes).
FIXME: check that this size is big enough. It must be large enough to handle the required number of messages of the given sizes, plus MPI_BSEND_OVERHEAD per message, plus some extra room because it's only kind of a circular buffer — the messages themselves aren't allowed to wrap around then end, so we might need extra space up to the size of the largest message type.
Definition at line 31 of file coagulation_dist.F90.
integer, parameter pmc_coagulation_dist::coag_dist_tag_done = 5325 |
Definition at line 45 of file coagulation_dist.F90.
integer, parameter pmc_coagulation_dist::coag_dist_tag_request_particle = 5321 |
Definition at line 41 of file coagulation_dist.F90.
integer, parameter pmc_coagulation_dist::coag_dist_tag_return_no_particle = 5324 |
Definition at line 44 of file coagulation_dist.F90.
integer, parameter pmc_coagulation_dist::coag_dist_tag_return_req_particle = 5322 |
Definition at line 42 of file coagulation_dist.F90.
integer, parameter pmc_coagulation_dist::coag_dist_tag_return_unreq_particle = 5323 |
Definition at line 43 of file coagulation_dist.F90.