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. */
9 import org.simgrid.msg.File;
10 import org.simgrid.msg.Host;
11 import org.simgrid.msg.HostNotFoundException;
12 import org.simgrid.msg.Msg;
13 import org.simgrid.msg.MsgException;
14 import org.simgrid.msg.Process;
16 public class Node extends Process {
17 private static String FILENAME1 = "/home/user/Install/simgrid/doc/simgrid/examples/platforms/g5k.xml";
18 private static String FILENAME2 = "/home/user/Install/simgrid/doc/simgrid/examples/platforms/One_cluster_no_backbone.xml";
19 private static String FILENAME3 = "/home/user/Install/simgrid/doc/simgrid/examples/platforms/g5k_cabinets.xml";
20 private static String FILENAME4 = "/home/user/Install/simgrid/doc/simgrid/examples/platforms/nancy.xml";
24 public Node(Host host, int number) throws HostNotFoundException {
25 super(host, Integer.toString(number), null);
28 public void main(String[] args) throws MsgException {
47 Msg.info("Open file " + filename);
48 File file = new File(mount,filename);
50 long read = file.read(10000000,1);
51 Msg.info("Having read " + read + " on " + filename);
53 long write = file.read(100000,1);
54 Msg.info("Having write " + write + " on " + filename);
56 read = file.read(10000000,1);
57 Msg.info("Having read " + read + " on " + filename);