MPIcallInfo

public final class MPIcallInfo

The collection of all info about a particular Message-Passing call, needed to analyze it and to differentiate it more easily later.

Methods

argumentIsABuffer

public boolean argumentIsABuffer(int argumentRank)

argumentIsAReduceOp

public boolean argumentIsAReduceOp(int argumentRank)

argumentIsAType

public boolean argumentIsAType(int argumentRank)

argumentIsRead

public boolean argumentIsRead(int argumentRank)

checkMessagePassingCalls

protected static void checkMessagePassingCalls(CallGraph callGraph)

checkNumberOfChannels

protected static int checkNumberOfChannels(CallGraph callGraph)

findMessagePassingChannel

public TapPair<MPIcallInfo, TapIntList> findMessagePassingChannel(CallGraph callGraph)

findMessagePassingChannelZones

public TapIntList findMessagePassingChannelZones(CallGraph callGraph)

funcName

public String funcName()

The full name of this message-passing call, capitalized the way it is used.

getMessagePassingMPIcallInfo

public static MPIcallInfo getMessagePassingMPIcallInfo(String funcName, Tree callTree, int language, Block block)

Get (or create) the Message-Passing info attached to the particular call “callTree”.

Returns

null when callTree is not and MPI call or is an MPI call irrelevant to AD (e.g. mpi_init, mpi_finalize,…).

isCommCreation

public boolean isCommCreation()

isCommFree

public boolean isCommFree()

isMessagePassingFunction

public static boolean isMessagePassingFunction(String funcName, int language)
Parameters
  • funcName – MPI or AMPI function name.

  • language – current language.

Returns

true for a Message Passing call.

isNonBlocking

public boolean isNonBlocking()

isNonBlockingMPI

public static boolean isNonBlockingMPI(Tree callTree, Unit calledUnit, Block block)

isOnDifferentiableType

public boolean isOnDifferentiableType()

When false, indicates that this message-passing call deals with values of non-differentiable type, and therefore must not be differentiated.

isPointToPoint

public boolean isPointToPoint()
Returns

True when this is a send or recv i.e. one end of a point-to-point communication.

isReduceCall

public boolean isReduceCall()

receivedExprFromChannel

public Tree receivedExprFromChannel()

registerMessagePassingChannel

public void registerMessagePassingChannel(CallGraph callGraph)

replaceMPIconstantsIfPossible

public static Tree replaceMPIconstantsIfPossible(Tree preprocessedTree)

NOT_YET_IMPLEMENTED !!! When possible, replace a Tree which has been returned by the C preprocessor, e.g. (MPI_Comm)0x44000000, with a reference to the MPI defined name it had before, e.g. MPI_COMM_WORLD.

sentExprToChannel

public Tree sentExprToChannel()

toString

public String toString()