Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simple example of smpi tracing with platform utilization (with three categories)
[simgrid.git] / examples / java / ping_pong / Receiver.java
index cb5c808..9603a76 100644 (file)
@@ -15,17 +15,16 @@ public class Receiver extends simgrid.msg.Process {
    final double commSizeLat = 1;
    final double commSizeBw = 100000000;
     
-   public void main(String[] args) throws JniException, NativeException {
+   public void main(String[] args) throws MsgException {
         
       Msg.info("hello!");
       double communicationTime=0;
 
       double time = Msg.getClock();
-      Channel channel = new Channel(0);
     
       Msg.info("try to get a task");
         
-      PingPongTask task = (PingPongTask)channel.get();
+      PingPongTask task = (PingPongTask)Task.receive(getHost().getName());
       double timeGot = Msg.getClock();
       double timeSent = task.getTime();