MONC
|
Performs halo swapping. In the parallel case this is between neighbouring processes and in the serial case it still needs to wrap the halos around for the boundary conditions. This module determines the policy of halo swapping (i.e. the fields to communicate) and the halo communication module is used to provide the actual mechanism. More...
Functions/Subroutines | |
type(component_descriptor_type) function, public | haloswapper_get_descriptor () |
Provides a description of this component for the core to register. More... | |
subroutine | initialisation_callback (current_state) |
Initialisation callback hook which will set up the halo swapping state and cache some precalculated data for fast(er) halo swapping at each timestep. More... | |
subroutine | timestep_callback (current_state) |
Timestep callback hook which performs the halo swapping for each prognostic field. More... | |
subroutine | finalisation_callback (current_state) |
The finalisation callback hook which will clean up and free the memory associated with the halo swapping. More... | |
subroutine | copy_halo_buffer_to_corners (current_state, neighbour_description, corner_loc, x_target_index, y_target_index, neighbour_location, current_page, source_data) |
Copies the halo buffer to halo location in a corner for a halo cell/column and corner location. The copies are performed for each prognostic field. More... | |
subroutine | copy_halo_buffer_to_field (current_state, neighbour_description, dim, target_index, neighbour_location, current_page, source_data) |
Copies the halo buffer to halo location in a field for a specific dimension and halo cell/column. The copies are performed for each prognostic field. More... | |
subroutine | copy_fields_to_halo_buffer (current_state, neighbour_description, dim, source_index, pid_location, current_page, source_data) |
Copies the prognostic field data to halo buffers for a specific process in a dimension and halo cell. More... | |
subroutine | copy_corners_to_halo_buffer (current_state, neighbour_description, corner_loc, x_source_index, y_source_index, pid_location, current_page, source_data) |
Copies the prognostic corner field data to halo buffers for a specific process in a dimension and halo cell. More... | |
integer function | get_fields_per_halo_cell (current_state) |
Deduces the number of fields per halo cell. This depends upon what fields are active in the model. More... | |
subroutine | display_debugging_info_if_needed (neighbour_counts, included_fields, rank) |
Displays some debugging information about who is sending what if that logging_mod level is selected. More... | |
subroutine | perform_local_data_copy_for_all_prognostics (current_state, halo_depth, involve_corners, source_data) |
Will do any local copying of data required for the boundary conditions. I.e. if all columns in a slice are on a process then it will copy in the y dimension. More... | |
Variables | |
logical, private | first_call = .true. |
type(halo_communication_type), save | halo_swap_state |
Performs halo swapping. In the parallel case this is between neighbouring processes and in the serial case it still needs to wrap the halos around for the boundary conditions. This module determines the policy of halo swapping (i.e. the fields to communicate) and the halo communication module is used to provide the actual mechanism.
|
private |
Copies the prognostic corner field data to halo buffers for a specific process in a dimension and halo cell.
current_state | The current model state |
neighbour_descriptions | Description of the neighbour halo swapping status |
corner_loc | Location of the corner |
x_source_index | The X source index of the dimension we are reading from in the prognostic field |
y_source_index | The Y source index of the dimension we are reading from in the prognostic field |
pid_location | Location of the neighbouring process in the local stored data structures |
current_page | The current (next) buffer page to copy into |
source_data | Optional source data which is read from into send buffers and written into by receieve buffers |
Definition at line 307 of file haloswapper.F90.
|
private |
Copies the prognostic field data to halo buffers for a specific process in a dimension and halo cell.
current_state | The current model state |
neighbour_descriptions | Description of the neighbour halo swapping status |
dim | Dimension to copy from |
source_index | The source index of the dimension we are reading from in the prognostic field |
pid_location | Location of the neighbouring process in the local stored data structures |
current_page | The current (next) buffer page to copy into |
source_data | Optional source data which is read from into send buffers and written into by receieve buffers |
Definition at line 231 of file haloswapper.F90.
|
private |
Copies the halo buffer to halo location in a corner for a halo cell/column and corner location. The copies are performed for each prognostic field.
current_state | The current model state |
neighbour_description | The halo swapping description of the neighbour we are accessing the buffer of |
corner_loc | The location of the corner |
x_target_index | The target index for the x dimension we are receiving for |
y_target_index | The target index for the y dimension we are receiving for |
neighbour_location | The location in the local neighbour data stores of this neighbour |
current_page | The current, next, halo swap page to read from (all previous have been read and copied already) |
source_data | Optional source data which is read from into send buffers and written into by receieve buffers |
Definition at line 96 of file haloswapper.F90.
|
private |
Copies the halo buffer to halo location in a field for a specific dimension and halo cell/column. The copies are performed for each prognostic field.
current_state | The current model state |
neighbour_description | The halo swapping description of the neighbour we are accessing the buffer of |
dim | The dimension we receive for |
target_index | The target index for the dimension we are receiving for |
neighbour_location | The location in the local neighbour data stores of this neighbour |
current_page | The current, next, halo swap page to read from (all previous have been read and copied already) |
source_data | Optional source data which is read from into send buffers and written into by receieve buffers |
Definition at line 164 of file haloswapper.F90.
|
private |
Displays some debugging information about who is sending what if that logging_mod level is selected.
neighbour_counts | Number of neighbours that I have |
included_fields | Number of prognostic fields that we include in this halo swap |
rank | My current rank |
Definition at line 407 of file haloswapper.F90.
|
private |
The finalisation callback hook which will clean up and free the memory associated with the halo swapping.
current_state | The current model state |
Definition at line 76 of file haloswapper.F90.
|
private |
Deduces the number of fields per halo cell. This depends upon what fields are active in the model.
current_state | The current model state |
Definition at line 377 of file haloswapper.F90.
type(component_descriptor_type) function, public haloswapper_mod::haloswapper_get_descriptor |
Provides a description of this component for the core to register.
Definition at line 36 of file haloswapper.F90.
|
private |
Initialisation callback hook which will set up the halo swapping state and cache some precalculated data for fast(er) halo swapping at each timestep.
current_state | The current model state |
Definition at line 47 of file haloswapper.F90.
|
private |
Will do any local copying of data required for the boundary conditions. I.e. if all columns in a slice are on a process then it will copy in the y dimension.
current_state | The current model state_mod |
copy_counts | Number of local copies performed |
source_data | Optional source data which is read from into send buffers and written into by receieve buffers |
Definition at line 422 of file haloswapper.F90.
|
private |
Timestep callback hook which performs the halo swapping for each prognostic field.
In parallel this is performed with MPI communication calls and wrapping around. In serial still need to wrap data around
current_state | The current model state_mod |
Definition at line 62 of file haloswapper.F90.
|
private |
Definition at line 27 of file haloswapper.F90.
|
private |
Definition at line 28 of file haloswapper.F90.