1 /* Copyright (c) 2012-2014. The SimGrid Team.
2 * 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. */
8 import org.simgrid.msg.Host;
9 import org.simgrid.msg.Msg;
10 import org.simgrid.msg.MsgException;
11 import org.simgrid.msg.Task;
12 import org.simgrid.msg.Process;
14 public class Test extends Process {
15 public Test(Host host, String name, String[]args) {
16 super(host,name,args);
18 public void main(String[] args) throws MsgException {
19 double computationAmount = 1.0;
20 double priority = 1.0;
22 computationAmount = Double.valueOf(args[0]);
23 priority = Double.valueOf(args[1]);
25 Msg.info("Hello! Running a task of size " + computationAmount + " with priority " + priority);
27 Task task = new Task("Task", computationAmount, 0);
28 task.setPriority(priority);
32 Msg.info("Goodbye now!");