2 * Sender of basic ping/pong example
4 * Copyright 2006,2007,2010 The SimGrid Team. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the license (GNU LGPL) which comes with this package.
12 public class Sender extends simgrid.msg.Process {
14 private final double commSizeLat = 1;
15 final double commSizeBw = 100000000;
17 public void main(String[] args) throws MsgException {
21 int hostCount = args.length;
23 Msg.info("host count: " + hostCount);
24 String mailboxes[] = new String[hostCount];
26 double computeDuration = 0;
29 for(int pos = 0; pos < args.length ; pos++) {
31 mailboxes[pos] = Host.getByName(args[pos]).getName();
32 } catch (HostNotFoundException e) {
33 Msg.info("Invalid deployment file: " + e.toString());
38 for (int pos = 0; pos < hostCount; pos++) {
39 time = Msg.getClock();
41 Msg.info("sender time: " + time);
43 task = new PingPongTask("no name",computeDuration,commSizeLat);
46 task.send(mailboxes[pos]);