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