class org.simgrid.msg.Comm

public class Comm

Communication action, representing an ongoing communication between processes.

Fields

finished

protected boolean finished

Indicates if the communication is finished

receiving

protected boolean receiving

Indicates if the communication is a receiving communication

task

protected Task task

Task associated with the comm. Beware, it can be null

Constructors

Comm

protected Comm()

Protected constructor, used by Comm factories in Task.

Methods

finalize

protected void finalize()

Destroy the C communication object, when the GC reclaims the java part.

getTask

public Task getTask()

Returns the task associated with the communication. if the communication isn’t finished yet, will return null.

nativeFinalize

protected native void nativeFinalize()

nativeInit

public static native void nativeInit()

Class initializer, to initialize various JNI stuff

test

public native boolean test()

Returns if the communication is finished or not. If the communication has finished and there was an error, raise an exception.

waitAll

public static native void waitAll(Comm[] comms, double timeout)

Wait all of the communications

waitAll

public static void waitAll(Comm[] comms)

Wait all of the communications, with no maximal delay

waitAny

public static native int waitAny(Comm[] comms)

Wait any of the communications, and return the rank of the terminating comm

waitCompletion

public void waitCompletion()

Wait infinitely for the completion of the communication (infinite timeout)

waitCompletion

public native void waitCompletion(double timeout)

Wait for the completion of the communication. Throws an exception if there were an error in the communication.

Parameters:
  • timeout – Time before giving up (infinite time if negative)