DISPATCH
task_mesg_mod Module Reference

Message handling for task lists. Some of the methods are only used by dispatcher0_t, so should perhaps be moved over to that file. More...

Data Types

type  task_mesg_t
 

Variables

integer, save verbose =0
 
type(task_mesg_t), public task_mesg
 

Detailed Description

Message handling for task lists. Some of the methods are only used by dispatcher0_t, so should perhaps be moved over to that file.

Depending on switches, incoming MPU messages are handled by one of four procedures (the values of the recv_active and recv_priv switches are shown after the colon). Only the ones with recv_active==.false. can (FIXME) be used in AMR runs.

recv_improbe : master puts MPI_IMPROBE messages in recv_list and unpk_list recv_private : master checks (only) for msgs to known virtual tasks recv_private : ditto, but split up into thread-private lists

When doing active receives (asking actively for the package to each virtual task, it is necessary that the MPI message tag equals (or is a function of) the task ID, while another, unique ID should be reserved for load balance messages. To allow detecting packages for new patches (AMR), and still use active receives, one could reserve another unique ID for "new" patches, for which then the actual ID would be extracted from the header part of the buffer. Upon receipt of such a package, the new virtual patch would be created, the first direct request would be sent, and the message would be added to the (thread-private) list of messages.