3 # This script updates the simgrid XML file passed as argument (modification in place)
4 # It is built to do the conversion from a XML platfrom version 2 to a version 3
6 # Copyright (C) 2006-2010. The SimGrid team. All rights reserved.
8 # This file is part of the SimGrid project. This is free software:
9 # You can redistribute and/or modify it under the terms of the
10 # GNU LGPL (v2.1) licence.
22 die "Error: Wrong number of parameters\nUsage:\tperl transform_platform.perl [platform_v2.xml]\n";
27 open FILE, "$file" or die "Error: Unable to open file: \"$file\".\n$!\n";
28 while(defined($line=<FILE>))
31 if($line =~ /^(.*)<platform version=\"2\"(.*)$/)
33 print "<platform version=\"3\">\n";
34 print "<AS id=\"AS$AScount\" routing=\"Full\">\n";
39 if($line =~ /^(.*)<\/platform(.*)$/)