2 * Copyright 2006,2007,2010. The SimGrid Team. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package.
10 public class Slave extends simgrid.msg.Process {
11 public void main(String[] args) throws NativeException {
12 if (args.length < 1) {
13 Msg.info("Slave needs 1 argument (its number)");
17 int num = Integer.valueOf(args[0]).intValue();
18 Msg.info("Receiving on 'slave_"+num+"'");
21 Task task = Task.receive("slave_"+num);
23 if (task instanceof FinalizeTask) {
29 Msg.info("Received Finalize. I'm done. See you!");