FLASH-X
Doxygen Generated Documentation From Interface Source Code
Functions/Subroutines
Pipeline_localSendItem.F90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine Pipeline_localSendItem (userItem, userProcID, isHandled)
 

Function/Subroutine Documentation

◆ Pipeline_localSendItem()

subroutine Pipeline_localSendItem ( real  userItem,
integer  userProcID,
logical  isHandled 
)

The routine will try to add the user supplied item to the local send buffer on the pipeline channel corresponding to the user supplied channel processor procID. This can be done, if there is no pending send on the send buffer and if there is enough space on the send buffer. This part of the routine can be considered the local feeder of the pipeline.

userItem : the item (array of elements) to be added to the send buffer userProcID : channel processor ID isHandled : is true, if the item was successfully added to the buffer

NOTES

If the item supplied by the user contains more elements than the pipeline items can handle, the program aborts.

It is the user's responsibility to make sure that the supplied channel processor ID actually belongs to a channel of the pipeline on the local processor. If the userProcID channel is not found within all the channels of the pipeline on the local processor, then currently we signal that something must have gone wrong. Either the pipeline for the local processor was set up incorrectly or userProcID does not correspond to a channel processor. In this case the only solution is to abort the program.

In the future we might just simply ignore the sending item request, if userProcID is not one of the channels. We simply return isHandled = false and continue with the program.

Currently the routine is written in such a way that the item will always be added to the send buffer, i.e. isHandled should always be true. In case there is a pending send of the buffer, we call the progress sending communication repeatedly until the send for the particular channel has completed (i.e. the send buffer is free to be reused). A return of isHandled equal to false indicates an abnormality and should be catched by the calling routine.

Definition at line 54 of file Pipeline_localSendItem.F90.