MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
virtualexchangemodule::virtualexchangetype Type Reference

The Virtual Exchange is based on two Virtual Models and is therefore not always strictly local or remote. We have to consider three different cases: More...

Inheritance diagram for virtualexchangemodule::virtualexchangetype:
Inheritance graph
Collaboration diagram for virtualexchangemodule::virtualexchangetype:
Collaboration graph

Public Member Functions

procedure create => vx_create
 
procedure prepare_stage => vx_prepare_stage
 
procedure get_send_items => vx_get_send_items
 
procedure get_recv_items => vx_get_recv_items
 
procedure has_mover => vx_has_mover
 
procedure destroy => vx_destroy
 
procedure vdc_create
 
generic map => map_scalar, map_array1d, map_array2d
 
procedure link_items => vdc_link_items
 
procedure set_element_map => vdc_set_element_map
 
procedure get_vrt_mem_path => vdc_get_vrt_mem_path
 
procedure set_orig_rank => vdc_set_orig_rank
 
procedure get_virtual_data => vdc_get_virtual_data
 
procedure print_items
 
procedure set
 

Public Attributes

class(virtualmodeltype), pointer v_model1 => null()
 
class(virtualmodeltype), pointer v_model2 => null()
 
type(virtualinttype), pointer nexg => null()
 
type(virtualinttype), pointer naux => null()
 
type(virtualinttype), pointer ianglex => null()
 
type(virtualint1dtype), pointer nodem1 => null()
 
type(virtualint1dtype), pointer nodem2 => null()
 
type(virtualint1dtype), pointer ihc => null()
 
type(virtualdbl1dtype), pointer cl1 => null()
 
type(virtualdbl1dtype), pointer cl2 => null()
 
type(virtualdbl1dtype), pointer hwva => null()
 
type(virtualdbl2dtype), pointer auxvar => null()
 
integer(i4b) id
 unique identifier matching with the real counterpart More...
 
integer(i4b) container_type
 to identify the actual type of this container More...
 
character(lencomponentname) name
 container name (model, exchange, ...) used in the memory path More...
 
character(lencontextname) vmem_ctx
 prefixes virtual memory located on remote processes More...
 
logical(lgp) is_local
 when true, the physical object resides on the same process. However, some of its variables can still be remote More...
 
logical(lgp) is_active
 when true, this container is being synchronized More...
 
integer(i4b) orig_rank
 the global rank of the process which holds the physical data for this container More...
 
type(stlvecintrcv_ranks
 the ranks of processes, other than orig_rank, having this container active (only guaranteed to be complete after synchronization) More...
 
type(listtypevirtual_data_list
 a list with all virtual data items for this container More...
 
type(vdcelementmaptype), dimension(nr_vdc_element_maps) element_maps
 a list with all element maps More...
 
type(vdcelementluttype), dimension(nr_vdc_element_maps) element_luts
 lookup tables from remote index to local index More...
 

Private Member Functions

procedure, private init_virtual_data
 
procedure, private allocate_data
 
procedure, private deallocate_data
 
procedure, private add_to_list
 
procedure, private map_scalar
 
procedure, private map_array1d
 
procedure, private map_array2d
 
procedure, private map_internal
 
procedure, private vdc_get_virtual_data
 
procedure, private get_items_for_stage
 

Detailed Description

1) both virtual models are local

RECV: In this case this virtual data container will have no data items to receive from other processes. SEND: Whenever it is called to send its virtual data items to other processes, it simply sends everything.

2) one model is local, one model is remote

Consequently, there is another exchange which has the reverse, we call this our dual exchange.

RECV: The sender is our dual exchange, and we have all data except its list of reduced model node numbers, either thisnodem1 or thisnodem2. We receive the missing array. Receiving from a sender that is not the dual exchange cannot occur.

SEND: here we have to consider two cases a) The receiver is our dual exchange, we return the favor and send the list of model node numbers that is present on this process, this would be either thisnodem1 or thisnodem2 b) The receiver is not the dual exchange. And here we will send everything.

3) both models are remote

RECV: we will receive everything. In case the source exchange is fully local, i.e. type 1) above, we get all the data at the first attempt. Otherwise, it will take a second attempt before all the data is in. (To allow for two attempts, the nodem1 and nodem2 arrays are registered to be synchronized at two consecutive stages)

SEND: nothing to be sent.

This behavior is different from the general VirtualDataContainer, so the get_send_items and get_recv_items subroutines are overridden accordingly. Additionally, for case 2) the container will have a mix of

Definition at line 65 of file VirtualExchange.f90.

Member Function/Subroutine Documentation

◆ add_to_list()

procedure, private virtualdatacontainermodule::virtualdatacontainertype::add_to_list
privateinherited

Definition at line 84 of file VirtualDataContainer.f90.

◆ allocate_data()

procedure, private virtualexchangemodule::virtualexchangetype::allocate_data
private

Definition at line 89 of file VirtualExchange.f90.

◆ create()

procedure virtualexchangemodule::virtualexchangetype::create

Definition at line 81 of file VirtualExchange.f90.

◆ deallocate_data()

procedure, private virtualexchangemodule::virtualexchangetype::deallocate_data
private

Definition at line 90 of file VirtualExchange.f90.

◆ destroy()

procedure virtualexchangemodule::virtualexchangetype::destroy

Definition at line 86 of file VirtualExchange.f90.

◆ get_items_for_stage()

procedure, private virtualdatacontainermodule::virtualdatacontainertype::get_items_for_stage
privateinherited

Definition at line 90 of file VirtualDataContainer.f90.

◆ get_recv_items()

procedure virtualexchangemodule::virtualexchangetype::get_recv_items

Definition at line 84 of file VirtualExchange.f90.

◆ get_send_items()

procedure virtualexchangemodule::virtualexchangetype::get_send_items

Definition at line 83 of file VirtualExchange.f90.

◆ get_virtual_data()

procedure virtualdatacontainermodule::virtualdatacontainertype::get_virtual_data
inherited

Definition at line 79 of file VirtualDataContainer.f90.

◆ get_vrt_mem_path()

procedure virtualdatacontainermodule::virtualdatacontainertype::get_vrt_mem_path
inherited

Definition at line 74 of file VirtualDataContainer.f90.

◆ has_mover()

procedure virtualexchangemodule::virtualexchangetype::has_mover

Definition at line 85 of file VirtualExchange.f90.

◆ init_virtual_data()

procedure, private virtualexchangemodule::virtualexchangetype::init_virtual_data
private

Definition at line 88 of file VirtualExchange.f90.

◆ link_items()

procedure virtualdatacontainermodule::virtualdatacontainertype::link_items
inherited

Definition at line 72 of file VirtualDataContainer.f90.

◆ map()

generic virtualdatacontainermodule::virtualdatacontainertype::map
inherited

Definition at line 70 of file VirtualDataContainer.f90.

Here is the call graph for this function:

◆ map_array1d()

procedure, private virtualdatacontainermodule::virtualdatacontainertype::map_array1d
privateinherited

Definition at line 86 of file VirtualDataContainer.f90.

◆ map_array2d()

procedure, private virtualdatacontainermodule::virtualdatacontainertype::map_array2d
privateinherited

Definition at line 87 of file VirtualDataContainer.f90.

◆ map_internal()

procedure, private virtualdatacontainermodule::virtualdatacontainertype::map_internal
privateinherited

Definition at line 88 of file VirtualDataContainer.f90.

◆ map_scalar()

procedure, private virtualdatacontainermodule::virtualdatacontainertype::map_scalar
privateinherited

Definition at line 85 of file VirtualDataContainer.f90.

◆ prepare_stage()

procedure virtualexchangemodule::virtualexchangetype::prepare_stage

Definition at line 82 of file VirtualExchange.f90.

◆ print_items()

procedure virtualdatacontainermodule::virtualdatacontainertype::print_items
inherited

Definition at line 80 of file VirtualDataContainer.f90.

◆ set()

procedure virtualdatacontainermodule::virtualdatacontainertype::set
inherited

Definition at line 82 of file VirtualDataContainer.f90.

◆ set_element_map()

procedure virtualdatacontainermodule::virtualdatacontainertype::set_element_map
inherited

Definition at line 73 of file VirtualDataContainer.f90.

◆ set_orig_rank()

procedure virtualdatacontainermodule::virtualdatacontainertype::set_orig_rank
inherited

Definition at line 76 of file VirtualDataContainer.f90.

◆ vdc_create()

procedure virtualdatacontainermodule::virtualdatacontainertype::vdc_create
inherited

Definition at line 69 of file VirtualDataContainer.f90.

◆ vdc_get_virtual_data()

procedure, private virtualdatacontainermodule::virtualdatacontainertype::vdc_get_virtual_data
privateinherited

Definition at line 89 of file VirtualDataContainer.f90.

Member Data Documentation

◆ auxvar

type(virtualdbl2dtype), pointer virtualexchangemodule::virtualexchangetype::auxvar => null()

Definition at line 79 of file VirtualExchange.f90.

79  type(VirtualDbl2dType), pointer :: auxvar => null()

◆ cl1

type(virtualdbl1dtype), pointer virtualexchangemodule::virtualexchangetype::cl1 => null()

Definition at line 76 of file VirtualExchange.f90.

76  type(VirtualDbl1dType), pointer :: cl1 => null()

◆ cl2

type(virtualdbl1dtype), pointer virtualexchangemodule::virtualexchangetype::cl2 => null()

Definition at line 77 of file VirtualExchange.f90.

77  type(VirtualDbl1dType), pointer :: cl2 => null()

◆ container_type

integer(i4b) virtualdatacontainermodule::virtualdatacontainertype::container_type
inherited

Definition at line 55 of file VirtualDataContainer.f90.

55  integer(I4B) :: container_type !< to identify the actual type of this container

◆ element_luts

type(vdcelementluttype), dimension(nr_vdc_element_maps) virtualdatacontainermodule::virtualdatacontainertype::element_luts
inherited

Definition at line 67 of file VirtualDataContainer.f90.

67  type(VdcElementLutType), dimension(NR_VDC_ELEMENT_MAPS) :: element_luts !< lookup tables from remote index to local index

◆ element_maps

type(vdcelementmaptype), dimension(nr_vdc_element_maps) virtualdatacontainermodule::virtualdatacontainertype::element_maps
inherited

Definition at line 66 of file VirtualDataContainer.f90.

66  type(VdcElementMapType), dimension(NR_VDC_ELEMENT_MAPS) :: element_maps !< a list with all element maps

◆ hwva

type(virtualdbl1dtype), pointer virtualexchangemodule::virtualexchangetype::hwva => null()

Definition at line 78 of file VirtualExchange.f90.

78  type(VirtualDbl1dType), pointer :: hwva => null()

◆ ianglex

type(virtualinttype), pointer virtualexchangemodule::virtualexchangetype::ianglex => null()

Definition at line 71 of file VirtualExchange.f90.

71  type(VirtualIntType), pointer :: ianglex => null()

◆ id

integer(i4b) virtualdatacontainermodule::virtualdatacontainertype::id
inherited

Definition at line 54 of file VirtualDataContainer.f90.

54  integer(I4B) :: id !< unique identifier matching with the real counterpart

◆ ihc

type(virtualint1dtype), pointer virtualexchangemodule::virtualexchangetype::ihc => null()

Definition at line 75 of file VirtualExchange.f90.

75  type(VirtualInt1dType), pointer :: ihc => null()

◆ is_active

logical(lgp) virtualdatacontainermodule::virtualdatacontainertype::is_active
inherited

Definition at line 60 of file VirtualDataContainer.f90.

60  logical(LGP) :: is_active !< when true, this container is being synchronized

◆ is_local

logical(lgp) virtualdatacontainermodule::virtualdatacontainertype::is_local
inherited

Definition at line 58 of file VirtualDataContainer.f90.

58  logical(LGP) :: is_local !< when true, the physical object resides on the same process. However,

◆ name

character(lencomponentname) virtualdatacontainermodule::virtualdatacontainertype::name
inherited

Definition at line 56 of file VirtualDataContainer.f90.

56  character(LENCOMPONENTNAME) :: name !< container name (model, exchange, ...) used in the memory path

◆ naux

type(virtualinttype), pointer virtualexchangemodule::virtualexchangetype::naux => null()

Definition at line 70 of file VirtualExchange.f90.

70  type(VirtualIntType), pointer :: naux => null()

◆ nexg

type(virtualinttype), pointer virtualexchangemodule::virtualexchangetype::nexg => null()

Definition at line 69 of file VirtualExchange.f90.

69  type(VirtualIntType), pointer :: nexg => null()

◆ nodem1

type(virtualint1dtype), pointer virtualexchangemodule::virtualexchangetype::nodem1 => null()

Definition at line 73 of file VirtualExchange.f90.

73  type(VirtualInt1dType), pointer :: nodem1 => null()

◆ nodem2

type(virtualint1dtype), pointer virtualexchangemodule::virtualexchangetype::nodem2 => null()

Definition at line 74 of file VirtualExchange.f90.

74  type(VirtualInt1dType), pointer :: nodem2 => null()

◆ orig_rank

integer(i4b) virtualdatacontainermodule::virtualdatacontainertype::orig_rank
inherited

Definition at line 61 of file VirtualDataContainer.f90.

61  integer(I4B) :: orig_rank !< the global rank of the process which holds the physical data for this container

◆ rcv_ranks

type(stlvecint) virtualdatacontainermodule::virtualdatacontainertype::rcv_ranks
inherited

Definition at line 62 of file VirtualDataContainer.f90.

62  type(STLVecInt) :: rcv_ranks !< the ranks of processes, other than orig_rank, having this container active

◆ v_model1

class(virtualmodeltype), pointer virtualexchangemodule::virtualexchangetype::v_model1 => null()

Definition at line 66 of file VirtualExchange.f90.

66  class(VirtualModelType), pointer :: v_model1 => null()

◆ v_model2

class(virtualmodeltype), pointer virtualexchangemodule::virtualexchangetype::v_model2 => null()

Definition at line 67 of file VirtualExchange.f90.

67  class(VirtualModelType), pointer :: v_model2 => null()

◆ virtual_data_list

type(listtype) virtualdatacontainermodule::virtualdatacontainertype::virtual_data_list
inherited

Definition at line 65 of file VirtualDataContainer.f90.

65  type(ListType) :: virtual_data_list !< a list with all virtual data items for this container

◆ vmem_ctx

character(lencontextname) virtualdatacontainermodule::virtualdatacontainertype::vmem_ctx
inherited

Definition at line 57 of file VirtualDataContainer.f90.

57  character(LENCONTEXTNAME) :: vmem_ctx !< prefixes virtual memory located on remote processes

The documentation for this type was generated from the following file: