2 * Copyright (c) 2006-2013. The SimGrid Team.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package.
11 import org.simgrid.msg.*;
13 public class Slave extends org.simgrid.msg.Process {
14 public Slave(Host host, String name, String[]args) {
15 super(host,name,args);
17 public void main(String[] args) throws MsgException {
18 if (args.length < 1) {
19 Msg.info("Slave needs 1 argument (its number)");
23 int num = Integer.valueOf(args[0]).intValue();
24 Msg.info("Receiving on 'slave_"+num+"'");
27 Task task = Task.receive("slave_"+num);
29 if (task instanceof FinalizeTask) {
35 Msg.info("Received Finalize. I'm done. See you!");