#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
set(SIMGRID_VERSION_MAJOR "3")
-set(SIMGRID_VERSION_MINOR "17")
+set(SIMGRID_VERSION_MINOR "18")
set(SIMGRID_VERSION_PATCH "0")
set(SIMGRID_VERSION_EXTRA "-DEVEL") # Extra words to add to version string (e.g. -rc1)
if(WIN32)
set(Boost_USE_STATIC_LIBS 1)
endif()
+
set(HAVE_PAPI 0)
if(enable_smpi_papi)
include(FindPAPI)
-SimGrid (3.17) UNRELEASED (release target: September 22 2017)
+SimGrid (3.18) NOT RELEASED YET (target: December 24 2017)
+
+ S4U
+ - Link::name() is deprecated and will be removed in v3.21, use instead
+ Link::getCname().
+ - Mailbox::getName() changed to return a std::string, use instead
+ Mailbox::getCname() to get a char*.
+ - Storage::getName() changed to return a std::string, use intead
+ Storage::getCname() to get a char*.
+
+SimGrid (3.17) Released October 8 2017
The Drained Leaks release: (almost) no known leaks despite the tests.
Even very long simulations will preserve your memory: our testsuite
- stresses SimGrid for over 45mn on fast machines, and there is only
- one single known leak, of about 4kb.
+ stresses SimGrid for over 45mn on fast machines for a coverage of
+ over 80%, and there is only one single known leak, of about 4kb.
S4U
- #222: Actor::kill() doesn't really kill and segfaults
- #225: Actor::kill() doesn't really kill when victims are doing a join()
+----------------------------------------------------------------------------
+
SimGrid (3.16) Released June 22. 2017.
The Blooming Spring Release: developments are budding.
+ _ _____ _ ___
+__ _____ _ __ ___(_) ___ _ __ |___ / / |( _ )
+\ \ / / _ \ '__/ __| |/ _ \| '_ \ |_ \ | |/ _ \
+ \ V / __/ | \__ \ | (_) | | | | ___) || | (_) |
+ \_/ \___|_| |___/_|\___/|_| |_| |____(_)_|\___/
+ (not released yet)
+
_ _____ _ _____
__ _____ _ __ ___(_) ___ _ __ |___ / / |___ |
\ \ / / _ \ '__/ __| |/ _ \| '_ \ |_ \ | | / /
\ V / __/ | \__ \ | (_) | | | | ___) || | / /
\_/ \___|_| |___/_|\___/|_| |_| |____(_)_|/_/
- (unreleased yet)
+ October 8 2017
+
+The Drained Leaks release: (almost) no known leaks despite the tests.
+ * Many many internal cleanups (almost 700 commits since 3.16).
+ * The coverage of our tests is above 80%.
+ * All memleaks but one plugged; A dozen of bugs fixed.
+ * XBT: Further replace XBT with std::* constructs.
_ _____ _ __
__ _____ _ __ ___(_) ___ _ __ |___ / / |/ /_
\ \ / / _ \ '__/ __| |/ _ \| '_ \ |_ \ | | '_ \
`simcall_<name>()` and `simcall_HANDLER()` are defined somewhere, and
generates the following files:
-- smx_popping_accessors.h:
+- popping_accessors.hpp:
Helper functions to get and set simcall arguments and results
-- smx_popping_bodies.cpp:
+- popping_bodies.cpp:
The BODY function of each simcall
-- smx_popping_enum.c:
+- popping_enum.h:
Definition of type `enum e_smx_simcall_t` (one value per existing simcall)
-- smx_popping_generated.cpp:
+- popping_generated.cpp:
Definitions of `simcall_names[]` (debug name of each simcall), and
SIMIX_simcall_enter() that deals with the simcall from within the kernel
Please apply the following checklist before releasing.
- Sources
+ - The external patches (Debian, etc) are integrated.
+ The COPYING file is aligned with Debian's copyright file.
- The version number is correctly marked in CMakeLists.txt, in macros
SIMGRID_VERSION_MAJOR and friends.
- The "make distcheck" target works (testing that every files needed
included through globbing. The best is to use a clean checkout:
\verbatim
cd /tmp
-git clone ~/Code/simgrid
+git clone --depth=1 ~/Code/simgrid
cd simgrid
cmake . && make dist
\endverbatim
- emacs org/site/download.org and C-c C-c the first source block to refresh the download.
- emacs org/site/documentation.org and edit the version links.
- make -C org all sync
- - git commit && git push
+ - git commit -a && git push
- Announce the release
- Mail the simgrid-user mailing list
- the NEWS chunk in the mail;
is the main project, running the tests that we spoke about.\n It is
configured (on Jenkins) to run the script <tt>tools/jenkins/build.sh</tt>
\li <a href="https://ci.inria.fr/simgrid/job/SimGrid-DynamicAnalysis/">SimGrid-DynamicAnalysis</a>
- runs the tests both under valgrind to find the memory errors and
- under gcovr to report the achieved test coverage.\n It is configured
+ should be called "nightly" because it does not only run dynamic
+ tests, but a whole bunch of long lasting tests: valgrind (memory
+ errors), gcovr (coverage), Sanitizers (bad pointer usage, threading
+ errors, use of unspecified C constructs) and the clang static analyzer.\n It is configured
(on Jenkins) to run the script <tt>tools/jenkins/DynamicAnalysis.sh</tt>
In each case, SimGrid gets built in
(label=="small-netbsd-64-clang").implies(build_mode!="ModelChecker")
\endverbatim
+Just for the record, the slaves were created from the available
+template with the following commands:
+\verbatim
+#debian/ubuntu
+apt-get install gcc g++ gfortran automake cmake libboost-dev openjdk-8-jdk openjdk-8-jre libxslt-dev libxml2-dev libevent-dev libunwind-dev libdw-dev htop git python3 xsltproc libboost-context-dev
+#for dynamicanalysis:
+apt-get install jacoco libjacoco-java libns3-dev pcregrep gcovr ant lua5.3-dev sloccount
+
+#fedora
+dnf install libboost-devel openjdk-8-jdk openjdk-8-jre libxslt-devel libxml2-devel xsltproc git python3 libdw-devel libevent-devel libunwind-devel htop lua5.3-devel
+
+#netbsd
+pkg_add cmake gcc7 boost boost-headers automake openjdk8 libxslt libxml2 libunwind git htop python36
+
+#opensuse
+zypper install cmake automake clang boost-devel java-1_8_0-openjdk-devel libxslt-devel libxml2-devel xsltproc git python3 libdw-devel libevent-devel libunwind-devel htop binutils ggc7-fortran
+
+#freebsd
+pkg install boost-libs cmake openjdk8 automake libxslt libxml2 libunwind git htop python3 automake gcc6 flang elfutils libevent
+#+ clang-devel from ports
+
+#osx
+brew install cmake boost libunwind-headers libxslt git python3
+\endverbatim
+
\subsection inside_tests_travis Travis
Travis is a free (as in free beer) Continuous Integration system that
Example: adding a "pair" version of the Alltoall collective.
- - Implement it in a file called alltoall-pair.c in the src/smpi/colls folder. This file should include colls_private.h.
+ - Implement it in a file called alltoall-pair.c in the src/smpi/colls folder. This file should include colls_private.hpp.
- The name of the new algorithm function should be smpi_coll_tuned_alltoall_pair, with the same signature as MPI_Alltoall.
responsible for wrapping the parameters in the `struct s_smx_simcall`;
and wrapping out the result;
-* [accessors](https://github.com/simgrid/simgrid/blob/4ae2fd01d8cc55bf83654e29f294335e3cb1f022/src/simix/popping_accessors.h)
+* [accessors](https://github.com/simgrid/simgrid/blob/4ae2fd01d8cc55bf83654e29f294335e3cb1f022/src/simix/popping_accessors.hpp)
to get/set values of of `struct s_smx_simcall`;
* a simulation-kernel-side [big switch](https://github.com/simgrid/simgrid/blob/4ae2fd01d8cc55bf83654e29f294335e3cb1f022/src/simix/popping_generated.cpp#L106)
@code{cpp}
class ConditionVariable {
private:
- friend s_smx_cond;
+ friend s_smx_cond_t;
smx_cond_t cond_;
ConditionVariable(smx_cond_t cond) : cond_(cond) {}
public:
File f = new File(platfFile);
if (!f.exists()) {
- System.err.println("File "+platfFile+" does not exist in "+System.getProperty("user.dir"));
- System.err.println("Usage : Main ../platforms/platform.xml");
+ Msg.error("File " + platfFile + " does not exist in " + System.getProperty("user.dir"));
+ Msg.error("Usage : Main ../platforms/platform.xml");
}
Msg.createEnvironment(platfFile);
File f = new File(platfFile);
if (!f.exists()) {
- System.err.println("File "+platfFile+" does not exist in "+System.getProperty("user.dir"));
- System.err.println("Usage : Main ../platforms/platform.xml");
+ Msg.error("File " + platfFile + " does not exist in " + System.getProperty("user.dir"));
+ Msg.error("Usage : Main ../platforms/platform.xml");
}
Msg.createEnvironment(platfFile);
-/* Copyright (c) 2014. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
} catch (HostFailureException e) {
e.printStackTrace();
} catch (TaskCancelledException e) {
- System.out.println("task cancelled");
+ Msg.info("task cancelled");
suspend(); // Suspend the process
}
currentTask = new Task(this.getHost().getName()+"-daemon-"+(i++), this.getHost().getSpeed()*100, 0);
}
public int getLoad(){
- System.out.println("Remaining comp:" + this.daemon.getRemaining());
+ Msg.info("Remaining comp:" + this.daemon.getRemaining());
return this.currentLoad;
}
-/* Copyright (c) 2012-2014, 2016. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
}
}
catch (Exception e) {
+ Msg.debug("Caught exception: " + e);
}
}
Msg.info(findNodeSuccedded + "/" + (findNodeSuccedded + findNodeFailed) + " FIND_NODE have succedded.");
waitFor(1);
}
catch (Exception ex) {
+ Msg.debug("Caught exception: " + ex);
}
} while (Msg.getClock() < timeout && !destinationFound);
}
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
Killer killer = new Killer("Jacquelin","killer");
killer.start();
} catch (MsgException e){
- System.out.println("Create processes failed!");
+ Msg.error("Create processes failed!");
}
/* execute the simulation. */
-/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
try {
DreamMaster process1 = new DreamMaster("Jacquelin","DreamMaster");
process1.start();
- } catch (MsgException e){
- System.out.println("Create processes failed!");
- }
+ } catch (MsgException e){
+ Msg.error("Create processes failed!");
+ }
/* execute the simulation. */
Msg.run();
-/* Copyright (c) 2006-2007, 2012-2014, 2016. The SimGrid Team.
+/* Copyright (c) 2006-2007, 2012-2014, 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
import org.simgrid.trace.Trace;
public class Main {
+ public static final String PM_STATE = "PM_STATE";
+
private Main() {
throw new IllegalAccessError("Utility class");
}
new Receiver ("Tremblay", "Receiver", null).start();
/* Initialize some state for the hosts */
- Trace.hostStateDeclare ("PM_STATE");
- Trace.hostStateDeclareValue ("PM_STATE", "waitingPing", "0 0 1");
- Trace.hostStateDeclareValue ("PM_STATE", "sendingPong", "0 1 0");
- Trace.hostStateDeclareValue ("PM_STATE", "sendingPing", "0 1 1");
- Trace.hostStateDeclareValue ("PM_STATE", "waitingPong", "1 0 0");
+ Trace.hostStateDeclare (PM_STATE);
+ Trace.hostStateDeclareValue (PM_STATE, "waitingPing", "0 0 1");
+ Trace.hostStateDeclareValue (PM_STATE, "sendingPong", "0 1 0");
+ Trace.hostStateDeclareValue (PM_STATE, "sendingPing", "0 1 1");
+ Trace.hostStateDeclareValue (PM_STATE, "waitingPong", "1 0 0");
/* execute the simulation. */
Msg.run();
-/* Copyright (c) 2006-2007, 2012-2014, 2016. The SimGrid Team.
+/* Copyright (c) 2006-2007, 2012-2014, 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
public class Receiver extends Process {
private static final double COMM_SIZE_LAT = 1;
private static final double COMM_SIZE_BW = 100000000;
+ private static final String PM_STATE = Main.PM_STATE;
public Receiver(String hostname, String name, String[]args) throws HostNotFoundException {
super(hostname,name,args);
public void main(String[] args) throws MsgException {
Msg.info("hello!");
- Trace.hostPushState (getHost().getName(), "PM_STATE", "waitingPing");
+ Trace.hostPushState (getHost().getName(), PM_STATE, "waitingPing");
/* Wait for the ping */
Msg.info("try to get a task");
Msg.info(" --- bw "+ COMM_SIZE_BW/communicationTime + " ----");
/* Send the pong */
- Trace.hostPushState (getHost().getName(), "PM_STATE", "sendingPong");
+ Trace.hostPushState (getHost().getName(), PM_STATE, "sendingPong");
double computeDuration = 0;
PingPongTask pong = new PingPongTask("no name",computeDuration,COMM_SIZE_LAT);
pong.setTime(time);
pong.send(ping.getSource().getName());
/* Pop the two states */
- Trace.hostPopState (getHost().getName(), "PM_STATE");
- Trace.hostPopState (getHost().getName(), "PM_STATE");
+ Trace.hostPopState (getHost().getName(), PM_STATE);
+ Trace.hostPopState (getHost().getName(), PM_STATE);
Msg.info("goodbye!");
}
-/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
public class Sender extends Process {
private static final double COMM_SIZE_LAT = 1;
private static final double COMM_SIZE_BW = 100000000;
- private static final String PM_STATE = "PM_STATE";
+ private static final String PM_STATE = Main.PM_STATE;
public Sender(String hostname, String name, String[] args) throws HostNotFoundException {
super(hostname,name,args);
> [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159
> [150.178356] (0:maestro@) Total simulation time: 150.178
+p Testing with default compound and Full network optimization
+
+$ $SG_TEST_EXENV ${bindir:=.}/app-pingpong$EXEEXT ${srcdir:=.}/small_platform.xml ${srcdir:=.}/../msg/app-pingpong/app-pingpong_d.xml "--cfg=network/optim:Full" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:maestro@) Configuration change: Set 'network/optim' to 'Full'
+> [ 0.000000] (1:pinger@Tremblay) Ping -> Jupiter
+> [ 0.000000] (2:ponger@Jupiter) Pong -> Tremblay
+> [ 0.019014] (2:ponger@Jupiter) Task received : small communication (latency bound)
+> [ 0.019014] (2:ponger@Jupiter) Ping time (latency bound) 0.019014
+> [ 0.019014] (2:ponger@Jupiter) task_bw->data = 0.019
+> [150.178356] (1:pinger@Tremblay) Task received : large communication (bandwidth bound)
+> [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159
+> [150.178356] (0:maestro@) Total simulation time: 150.178
+
p Testing the deprecated CM02 network model
$ $SG_TEST_EXENV ${bindir:=.}/app-pingpong$EXEEXT ${srcdir:=.}/small_platform.xml ${srcdir:=.}/../msg/app-pingpong/app-pingpong_d.xml --cfg=cpu/model:Cas01 --cfg=network/model:CM02 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159
> [150.178356] (0:maestro@) Total simulation time: 150.178
+p Testing the surf network Reno2 fairness model using lagrangian approach
+
+$ $SG_TEST_EXENV ${bindir:=.}/app-pingpong$EXEEXT ${srcdir:=.}/small_platform.xml ${srcdir:=.}/../msg/app-pingpong/app-pingpong_d.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Reno2" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
+> [ 0.000000] (0:maestro@) Configuration change: Set 'cpu/model' to 'Cas01'
+> [ 0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'Reno2'
+> [ 0.000000] (1:pinger@Tremblay) Ping -> Jupiter
+> [ 0.000000] (2:ponger@Jupiter) Pong -> Tremblay
+> [ 0.019014] (2:ponger@Jupiter) Task received : small communication (latency bound)
+> [ 0.019014] (2:ponger@Jupiter) Ping time (latency bound) 0.019014
+> [ 0.019014] (2:ponger@Jupiter) task_bw->data = 0.019
+> [150.178356] (1:pinger@Tremblay) Task received : large communication (bandwidth bound)
+> [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159
+> [150.178356] (0:maestro@) Total simulation time: 150.178
+
p Testing the surf network Vegas fairness model using lagrangian approach
$ $SG_TEST_EXENV ${bindir:=.}/app-pingpong$EXEEXT ${srcdir:=.}/small_platform.xml ${srcdir:=.}/../msg/app-pingpong/app-pingpong_d.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [150.178356] (1:pinger@Tremblay) Task received : large communication (bandwidth bound)
> [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159
> [150.178356] (0:maestro@) Total simulation time: 150.178
+
+p Testing the surf network constant model
+
+$ $SG_TEST_EXENV ${bindir:=.}/app-pingpong$EXEEXT ${srcdir:=.}/small_platform_constant.xml ${srcdir:=.}/../msg/app-pingpong/app-pingpong_d.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Constant" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
+> [ 0.000000] (0:maestro@) Configuration change: Set 'cpu/model' to 'Cas01'
+> [ 0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'Constant'
+> [ 0.000000] (1:pinger@Tremblay) Ping -> Jupiter
+> [ 0.000000] (2:ponger@Jupiter) Pong -> Tremblay
+> [ 13.010000] (2:ponger@Jupiter) Task received : small communication (latency bound)
+> [ 13.010000] (2:ponger@Jupiter) Ping time (latency bound) 13.010000
+> [ 13.010000] (2:ponger@Jupiter) task_bw->data = 13.010
+> [ 26.020000] (1:pinger@Tremblay) Task received : large communication (bandwidth bound)
+> [ 26.020000] (1:pinger@Tremblay) Pong time (bandwidth bound): 13.010
+> [ 26.020000] (0:maestro@) Total simulation time: 26.020
-/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
MSG_parallel_task_create("parallel task", hosts_count, hosts, computation_amounts, communication_amounts, NULL);
MSG_parallel_task_execute(ptask);
MSG_task_destroy(ptask);
- /* The arrays communication_amounts and computation_amounts are not to be freed manually */
+ xbt_free(communication_amounts);
+ xbt_free(computation_amounts);
XBT_INFO("We can do the same with a timeout of one second enabled.");
computation_amounts = xbt_new0(double, hosts_count);
msg_error_t errcode = MSG_parallel_task_execute_with_timeout(ptask, 1 /* timeout (in seconds)*/);
xbt_assert(errcode == MSG_TIMEOUT, "Woops, this did not timeout as expected... Please report that bug.");
MSG_task_destroy(ptask);
+ xbt_free(communication_amounts);
+ xbt_free(computation_amounts);
XBT_INFO("Then, build a parallel task involving only computations and no communication (1 Gflop per node)");
computation_amounts = xbt_new0(double, hosts_count);
ptask = MSG_parallel_task_create("parallel exec", hosts_count, hosts, computation_amounts, NULL/* no comm */, NULL);
MSG_parallel_task_execute(ptask);
MSG_task_destroy(ptask);
+ xbt_free(computation_amounts);
XBT_INFO("Then, build a parallel task with no computation nor communication (synchro only)");
computation_amounts = xbt_new0(double, hosts_count);
ptask = MSG_parallel_task_create("parallel sync", hosts_count, hosts, computation_amounts, communication_amounts, NULL);
MSG_parallel_task_execute(ptask);
MSG_task_destroy(ptask);
+ xbt_free(communication_amounts);
+ xbt_free(computation_amounts);
- XBT_INFO("Finally, trick the ptask to do a 'remote execution', on host %s", MSG_host_get_name(hosts[1]));
+ XBT_INFO("Finally, trick the ptask to do a 'remote execution', on host %s", MSG_host_get_name(hosts[1]));
computation_amounts = xbt_new0(double, 1);
computation_amounts[0] = 1e9; // 1 Gflop
msg_host_t *remote = xbt_new(msg_host_t,1);
ptask = MSG_parallel_task_create("remote exec", 1, remote, computation_amounts, NULL/* no comm */, NULL);
MSG_parallel_task_execute(ptask);
MSG_task_destroy(ptask);
- free(remote);
+ xbt_free(remote);
+ xbt_free(computation_amounts);
XBT_INFO("Goodbye now!");
- free(hosts);
+ xbt_free(hosts);
return 0;
}
> 10 0.412439 10 8 5.600000
> 10 0.412439 10 9 3.400000
> 10 0.412439 10 8 5.600000
-> 7 0.412439 1 6
-> 7 0.412439 1 3
-> 7 0.412439 3 28
-> 7 0.412439 3 29
-> 7 0.412439 3 23
-> 7 0.412439 3 30
-> 7 0.412439 3 24
-> 7 0.412439 3 18
-> 7 0.412439 1 1
+> 7 0.412439 3 16
+> 7 0.412439 3 14
> 7 0.412439 3 19
> 7 0.412439 3 20
+> 7 0.412439 3 18
> 7 0.412439 3 21
> 7 0.412439 3 22
-> 7 0.412439 3 25
-> 7 0.412439 3 26
-> 7 0.412439 3 31
-> 7 0.412439 3 27
-> 7 0.412439 3 16
-> 7 0.412439 3 14
> 7 0.412439 3 12
> 7 0.412439 3 9
> 7 0.412439 3 15
+> 7 0.412439 3 23
+> 7 0.412439 3 24
> 7 0.412439 3 17
+> 7 0.412439 3 25
+> 7 0.412439 3 26
+> 7 0.412439 3 27
> 7 0.412439 3 8
> 7 0.412439 3 10
+> 7 0.412439 3 28
+> 7 0.412439 3 29
> 7 0.412439 3 13
+> 7 0.412439 3 30
> 7 0.412439 3 11
-> 7 0.412439 1 5
-> 7 0.412439 1 2
> 7 0.412439 1 7
+> 7 0.412439 1 5
+> 7 0.412439 1 3
> 7 0.412439 1 4
+> 7 0.412439 1 6
+> 7 0.412439 1 2
+> 7 0.412439 1 1
+> 7 0.412439 3 31
$ rm -f simgrid.trace
> 16 0 6 0 topology 21 44
> 15 0 6 0 topology 30 45
> 16 0 6 0 topology 28 45
-> 7 0 1 6
-> 7 0 1 3
-> 7 0 3 28
-> 7 0 3 29
-> 7 0 3 23
-> 7 0 3 30
-> 7 0 3 24
-> 7 0 3 18
-> 7 0 1 1
+> 7 0 3 16
+> 7 0 3 14
> 7 0 3 19
> 7 0 3 20
+> 7 0 3 18
> 7 0 3 21
> 7 0 3 22
-> 7 0 3 25
-> 7 0 3 26
-> 7 0 3 31
-> 7 0 3 27
-> 7 0 3 16
-> 7 0 3 14
> 7 0 3 12
> 7 0 3 9
> 7 0 3 15
+> 7 0 3 23
+> 7 0 3 24
> 7 0 3 17
+> 7 0 3 25
+> 7 0 3 26
+> 7 0 3 27
> 7 0 3 8
> 7 0 3 10
+> 7 0 3 28
+> 7 0 3 29
> 7 0 3 13
+> 7 0 3 30
> 7 0 3 11
-> 7 0 1 5
-> 7 0 1 2
> 7 0 1 7
+> 7 0 1 5
+> 7 0 1 3
> 7 0 1 4
+> 7 0 1 6
+> 7 0 1 2
+> 7 0 1 1
+> 7 0 3 31
$ rm -f trace_platform.trace
> 16 0 35 0 topology 3414 6312
> 15 0 35 0 topology 13 6313
> 16 0 35 0 topology 2348 6313
-> 7 0 2 9
-> 7 0 3 18
-> 7 0 3 19
-> 7 0 3 17
-> 7 0 2 2
-> 7 0 3 13
-> 7 0 3 20
-> 7 0 2 10
-> 7 0 2 8
-> 7 0 3 16
-> 7 0 2 3
-> 7 0 3 15
-> 7 0 2 11
-> 7 0 3 14
-> 7 0 2 7
-> 7 0 2 6
-> 7 0 2 5
-> 7 0 3 12
-> 7 0 2 4
-> 7 0 1 1
-> 7 0 3 4794
-> 7 0 7 4648
-> 7 0 9 4778
-> 7 0 7 4660
-> 7 0 9 4640
-> 7 0 9 4665
-> 7 0 9 4652
-> 7 0 9 4725
-> 7 0 9 4701
-> 7 0 7 4663
-> 7 0 9 4677
-> 7 0 9 4785
-> 7 0 9 4761
-> 7 0 7 4723
-> 7 0 9 4737
-> 7 0 7 4699
-> 7 0 9 4713
-> 7 0 7 4675
-> 7 0 9 4689
-> 7 0 7 4783
-> 7 0 7 4759
-> 7 0 9 4773
-> 7 0 7 4735
-> 7 0 9 4749
-> 7 0 7 4711
-> 7 0 7 4687
-> 7 0 7 4771
-> 7 0 7 4747
-> 7 0 9 4673
-> 7 0 9 4703
-> 7 0 9 4733
-> 7 0 9 4647
-> 7 0 9 4763
-> 7 0 9 4685
-> 7 0 7 4639
-> 7 0 9 4715
-> 7 0 9 4745
-> 7 0 9 4659
-> 7 0 9 4775
-> 7 0 7 4651
-> 7 0 9 4637
-> 7 0 9 4649
-> 7 0 9 4668
-> 7 0 12 4792
-> 7 0 9 4728
-> 7 0 9 4704
-> 7 0 9 4661
-> 7 0 7 4666
-> 7 0 9 4680
-> 7 0 9 4788
-> 7 0 9 4764
-> 7 0 7 4726
-> 7 0 9 4740
-> 7 0 7 4702
-> 7 0 9 4716
-> 7 0 7 4678
-> 7 0 9 4692
-> 7 0 7 4786
-> 7 0 7 4762
-> 7 0 9 4776
-> 7 0 7 4738
-> 7 0 9 4752
-> 7 0 7 4714
-> 7 0 7 4690
-> 7 0 7 4774
-> 7 0 9 4670
-> 7 0 7 4750
-> 7 0 9 4638
-> 7 0 9 4700
-> 7 0 9 4730
-> 7 0 9 4760
-> 7 0 9 4682
-> 7 0 9 4790
-> 7 0 9 4650
-> 7 0 9 4712
-> 7 0 9 4742
-> 7 0 7 4642
-> 7 0 9 4772
-> 7 0 9 4662
-> 7 0 7 4654
-> 7 0 9 4646
-> 7 0 9 4695
-> 7 0 9 4671
-> 7 0 9 4755
-> 7 0 9 4658
-> 7 0 9 4731
-> 7 0 7 4693
-> 7 0 9 4707
-> 7 0 7 4669
-> 7 0 9 4683
-> 7 0 9 4791
-> 7 0 7 4753
-> 7 0 9 4767
-> 7 0 7 4729
-> 7 0 9 4743
-> 7 0 7 4705
-> 7 0 9 4719
-> 7 0 7 4681
-> 7 0 7 4789
-> 7 0 7 4765
-> 7 0 9 4779
-> 7 0 7 4741
-> 7 0 7 4717
-> 7 0 9 4667
-> 7 0 9 4697
-> 7 0 7 4777
-> 7 0 9 4727
-> 7 0 9 4793
-> 7 0 9 4641
-> 7 0 9 4757
-> 7 0 9 4679
-> 7 0 9 4787
-> 7 0 9 4709
-> 7 0 9 4739
-> 7 0 9 4653
-> 7 0 9 4769
-> 7 0 9 4691
-> 7 0 7 4645
-> 7 0 9 4721
-> 7 0 9 4751
-> 7 0 9 4781
-> 7 0 7 4657
-> 7 0 9 4643
-> 7 0 9 4698
-> 7 0 9 4655
-> 7 0 9 4674
-> 7 0 9 4758
-> 7 0 9 4734
-> 7 0 7 4696
-> 7 0 9 4710
-> 7 0 7 4672
-> 7 0 9 4686
-> 7 0 7 4756
-> 7 0 9 4770
-> 7 0 7 4732
-> 7 0 9 4746
-> 7 0 7 4708
-> 7 0 9 4722
-> 7 0 7 4684
-> 7 0 7 4768
-> 7 0 9 4782
-> 7 0 9 4664
-> 7 0 7 4744
-> 7 0 9 4694
-> 7 0 7 4720
-> 7 0 9 4724
-> 7 0 9 4754
-> 7 0 7 4780
-> 7 0 9 4676
-> 7 0 9 4784
-> 7 0 9 4644
-> 7 0 9 4706
-> 7 0 9 4736
-> 7 0 7 4636
-> 7 0 9 4766
-> 7 0 9 4688
-> 7 0 9 4656
-> 7 0 9 4718
-> 7 0 9 4748
-> 7 0 6 4635
-> 7 0 3 4797
-> 7 0 12 4796
-> 7 0 6 4795
-> 7 0 3 4634
-> 7 0 9 4405
-> 7 0 9 4427
-> 7 0 9 4511
-> 7 0 7 4422
-> 7 0 9 4463
-> 7 0 9 4547
-> 7 0 9 4631
-> 7 0 7 4458
-> 7 0 9 4499
-> 7 0 7 4542
-> 7 0 9 4583
-> 7 0 7 4494
-> 7 0 9 4535
-> 7 0 7 4578
-> 7 0 9 4619
-> 7 0 7 4446
-> 7 0 7 4530
-> 7 0 7 4614
-> 7 0 9 4633
-> 7 0 9 4459
-> 7 0 7 4566
-> 7 0 9 4400
-> 7 0 9 4519
-> 7 0 9 4441
-> 7 0 9 4579
-> 7 0 9 4501
-> 7 0 9 4561
-> 7 0 9 4621
-> 7 0 7 4413
-> 7 0 9 4454
-> 7 0 9 4414
-> 7 0 7 4449
-> 7 0 9 4490
-> 7 0 9 4574
-> 7 0 9 4442
-> 7 0 7 4485
-> 7 0 9 4526
-> 7 0 7 4569
-> 7 0 9 4610
-> 7 0 7 4437
-> 7 0 9 4478
-> 7 0 7 4521
-> 7 0 9 4562
-> 7 0 7 4605
-> 7 0 7 4473
-> 7 0 7 4557
-> 7 0 9 4598
-> 7 0 9 4426
-> 7 0 9 4486
-> 7 0 7 4593
-> 7 0 9 4546
-> 7 0 9 4468
-> 7 0 9 4606
-> 7 0 9 4528
-> 7 0 9 4415
-> 7 0 7 4404
-> 7 0 9 4588
-> 7 0 9 4399
-> 7 0 9 4481
-> 7 0 9 4433
-> 7 0 9 4517
-> 7 0 9 4601
-> 7 0 7 4428
-> 7 0 9 4469
-> 7 0 7 4512
-> 7 0 9 4553
-> 7 0 7 4464
-> 7 0 9 4505
-> 7 0 7 4548
-> 7 0 9 4589
-> 7 0 7 4500
-> 7 0 7 4584
-> 7 0 9 4625
-> 7 0 9 4453
-> 7 0 7 4536
-> 7 0 9 4513
-> 7 0 7 4620
-> 7 0 9 4435
-> 7 0 9 4573
-> 7 0 9 4406
-> 7 0 9 4495
-> 7 0 7 4395
-> 7 0 9 4555
-> 7 0 9 4477
-> 7 0 9 4615
-> 7 0 9 4537
-> 7 0 9 4597
-> 7 0 9 4424
-> 7 0 9 4408
-> 7 0 7 4419
-> 7 0 9 4460
-> 7 0 9 4544
-> 7 0 7 4455
-> 7 0 9 4496
-> 7 0 7 4539
-> 7 0 9 4580
-> 7 0 9 4448
-> 7 0 7 4491
-> 7 0 9 4532
-> 7 0 7 4575
-> 7 0 9 4616
-> 7 0 7 4443
-> 7 0 9 4420
-> 7 0 7 4527
-> 7 0 9 4568
-> 7 0 7 4611
-> 7 0 9 4480
-> 7 0 7 4563
-> 7 0 9 4397
-> 7 0 9 4540
-> 7 0 9 4462
-> 7 0 9 4600
-> 7 0 9 4522
-> 7 0 9 4444
-> 7 0 9 4582
-> 7 0 9 4504
-> 7 0 9 4564
-> 7 0 7 4410
-> 7 0 9 4624
-> 7 0 9 4393
-> 7 0 9 4451
-> 7 0 9 4487
-> 7 0 9 4417
-> 7 0 9 4571
-> 7 0 9 4439
-> 7 0 9 4523
-> 7 0 7 4482
-> 7 0 9 4607
-> 7 0 9 4475
-> 7 0 7 4434
-> 7 0 9 4559
-> 7 0 7 4518
-> 7 0 7 4602
-> 7 0 7 4470
-> 7 0 7 4554
-> 7 0 9 4595
-> 7 0 7 4506
-> 7 0 9 4429
-> 7 0 7 4590
-> 7 0 9 4489
-> 7 0 7 4626
-> 7 0 9 4549
-> 7 0 9 4471
-> 7 0 9 4412
-> 7 0 9 4609
-> 7 0 9 4531
-> 7 0 7 4401
-> 7 0 9 4591
-> 7 0 12 4632
-> 7 0 9 4402
-> 7 0 9 4430
-> 7 0 9 4514
-> 7 0 9 4466
-> 7 0 7 4425
-> 7 0 9 4550
-> 7 0 7 4509
-> 7 0 9 4502
-> 7 0 7 4461
-> 7 0 7 4545
-> 7 0 9 4586
-> 7 0 7 4629
-> 7 0 9 4538
-> 7 0 7 4497
-> 7 0 7 4581
-> 7 0 9 4622
-> 7 0 7 4533
-> 7 0 9 4456
-> 7 0 7 4617
-> 7 0 9 4516
-> 7 0 9 4438
-> 7 0 9 4403
-> 7 0 7 4392
-> 7 0 9 4576
-> 7 0 9 4498
-> 7 0 9 4558
-> 7 0 9 4618
-> 7 0 7 4416
-> 7 0 9 4421
-> 7 0 9 4457
-> 7 0 9 4411
-> 7 0 9 4541
-> 7 0 9 4493
-> 7 0 7 4452
-> 7 0 9 4577
-> 7 0 9 4445
-> 7 0 9 4529
-> 7 0 7 4488
-> 7 0 7 4572
-> 7 0 9 4613
-> 7 0 7 4440
-> 7 0 7 4524
-> 7 0 9 4565
-> 7 0 7 4608
-> 7 0 7 4476
-> 7 0 9 4423
-> 7 0 7 4560
-> 7 0 9 4483
-> 7 0 9 4394
-> 7 0 9 4543
-> 7 0 7 4596
-> 7 0 9 4465
-> 7 0 9 4603
-> 7 0 9 4525
-> 7 0 9 4447
-> 7 0 9 4585
-> 7 0 9 4507
-> 7 0 9 4418
-> 7 0 7 4407
-> 7 0 9 4567
-> 7 0 9 4627
-> 7 0 9 4396
-> 7 0 9 4484
-> 7 0 9 4436
-> 7 0 9 4520
-> 7 0 7 4479
-> 7 0 9 4604
-> 7 0 9 4472
-> 7 0 7 4431
-> 7 0 9 4556
-> 7 0 7 4515
-> 7 0 7 4599
-> 7 0 9 4508
-> 7 0 7 4467
-> 7 0 7 4551
-> 7 0 9 4592
-> 7 0 7 4503
-> 7 0 9 4450
-> 7 0 7 4587
-> 7 0 9 4628
-> 7 0 9 4510
-> 7 0 9 4432
-> 7 0 9 4570
-> 7 0 7 4623
-> 7 0 9 4492
-> 7 0 9 4630
-> 7 0 9 4552
-> 7 0 9 4409
-> 7 0 9 4474
-> 7 0 7 4398
-> 7 0 9 4612
-> 7 0 9 4534
-> 7 0 9 4594
-> 7 0 6 4391
-> 7 0 1 4390
-> 7 0 12 3919
-> 7 0 6 3918
-> 7 0 7 3801
-> 7 0 9 3827
-> 7 0 9 3887
-> 7 0 9 3817
-> 7 0 9 3863
-> 7 0 12 3915
-> 7 0 7 3813
-> 7 0 9 3839
-> 7 0 9 3899
-> 7 0 9 3875
-> 7 0 9 3851
-> 7 0 9 3911
-> 7 0 9 3823
-> 7 0 9 3853
-> 7 0 9 3883
-> 7 0 7 3825
-> 7 0 9 3913
-> 7 0 9 3835
-> 7 0 7 3855
-> 7 0 9 3865
-> 7 0 7 3885
-> 7 0 9 3806
-> 7 0 9 3895
-> 7 0 7 3837
-> 7 0 9 3847
-> 7 0 7 3867
-> 7 0 9 3877
-> 7 0 7 3897
-> 7 0 9 3818
-> 7 0 9 3907
-> 7 0 7 3849
-> 7 0 7 3879
-> 7 0 7 3909
-> 7 0 9 3802
-> 7 0 7 3798
-> 7 0 9 3854
-> 7 0 9 3830
-> 7 0 9 3814
-> 7 0 9 3914
-> 7 0 7 3810
-> 7 0 9 3890
-> 7 0 9 3866
-> 7 0 9 3842
-> 7 0 9 3902
-> 7 0 9 3878
-> 7 0 7 3822
-> 7 0 9 3797
-> 7 0 9 3832
-> 7 0 7 3852
-> 7 0 9 3916
-> 7 0 9 3862
-> 7 0 7 3882
-> 7 0 9 3892
-> 7 0 7 3912
-> 7 0 7 3834
-> 7 0 9 3809
-> 7 0 9 3844
-> 7 0 7 3864
-> 7 0 9 3874
-> 7 0 7 3894
-> 7 0 9 3904
-> 7 0 7 3846
-> 7 0 9 3821
-> 7 0 7 3876
-> 7 0 7 3906
-> 7 0 9 3799
-> 7 0 7 3795
-> 7 0 9 3811
-> 7 0 9 3857
-> 7 0 7 3807
-> 7 0 9 3833
-> 7 0 9 3893
-> 7 0 9 3869
-> 7 0 7 3819
-> 7 0 9 3845
-> 7 0 9 3905
-> 7 0 9 3881
-> 7 0 9 3829
-> 7 0 9 3859
-> 7 0 9 3800
-> 7 0 9 3889
-> 7 0 7 3831
-> 7 0 9 3841
-> 7 0 7 3861
-> 7 0 9 3871
-> 7 0 7 3891
-> 7 0 9 3812
-> 7 0 9 3901
-> 7 0 7 3843
-> 7 0 7 3873
-> 7 0 7 3903
-> 7 0 9 3796
-> 7 0 9 3824
-> 7 0 9 3808
-> 7 0 7 3804
-> 7 0 9 3884
-> 7 0 9 3860
-> 7 0 9 3836
-> 7 0 9 3820
-> 7 0 7 3816
-> 7 0 9 3896
-> 7 0 9 3872
-> 7 0 9 3848
-> 7 0 9 3908
-> 7 0 9 3826
-> 7 0 9 3856
-> 7 0 9 3886
-> 7 0 7 3828
-> 7 0 9 3803
-> 7 0 9 3838
-> 7 0 7 3858
-> 7 0 9 3868
-> 7 0 7 3888
-> 7 0 9 3898
-> 7 0 7 3840
-> 7 0 9 3815
-> 7 0 9 3850
-> 7 0 7 3870
-> 7 0 9 3880
-> 7 0 7 3900
-> 7 0 9 3910
-> 7 0 9 3805
-> 7 0 6 3794
-> 7 0 3 3714
-> 7 0 3 3611
-> 7 0 9 3434
-> 7 0 7 3462
-> 7 0 9 3523
-> 7 0 7 3570
-> 7 0 7 3492
-> 7 0 9 3553
-> 7 0 7 3600
-> 7 0 7 3522
-> 7 0 9 3583
-> 7 0 7 3552
-> 7 0 7 3582
-> 7 0 9 3418
-> 7 0 9 3446
-> 7 0 7 3423
-> 7 0 9 3430
-> 7 0 9 3506
-> 7 0 9 3482
-> 7 0 9 3458
-> 7 0 9 3566
-> 7 0 7 3435
-> 7 0 9 3442
-> 7 0 9 3542
-> 7 0 9 3518
-> 7 0 9 3494
-> 7 0 9 3602
-> 7 0 9 3470
-> 7 0 9 3578
-> 7 0 9 3554
-> 7 0 9 3530
-> 7 0 9 3590
-> 7 0 9 3448
-> 7 0 9 3478
-> 7 0 7 3447
-> 7 0 9 3508
-> 7 0 7 3477
-> 7 0 9 3538
-> 7 0 9 3425
-> 7 0 9 3460
-> 7 0 7 3507
-> 7 0 9 3568
-> 7 0 9 3490
-> 7 0 7 3537
-> 7 0 9 3598
-> 7 0 7 3459
-> 7 0 9 3520
-> 7 0 7 3567
-> 7 0 7 3489
-> 7 0 9 3550
-> 7 0 7 3597
-> 7 0 9 3437
-> 7 0 9 3472
-> 7 0 7 3519
-> 7 0 9 3580
-> 7 0 9 3502
-> 7 0 7 3549
-> 7 0 7 3471
-> 7 0 9 3532
-> 7 0 7 3579
-> 7 0 7 3501
-> 7 0 9 3562
-> 7 0 7 3531
-> 7 0 9 3592
-> 7 0 7 3561
-> 7 0 7 3591
-> 7 0 7 3420
-> 7 0 9 3427
-> 7 0 9 3449
-> 7 0 9 3509
-> 7 0 7 3432
-> 7 0 9 3439
-> 7 0 9 3485
-> 7 0 9 3461
-> 7 0 9 3569
-> 7 0 9 3545
-> 7 0 9 3521
-> 7 0 9 3497
-> 7 0 9 3605
-> 7 0 9 3473
-> 7 0 9 3581
-> 7 0 9 3557
-> 7 0 9 3533
-> 7 0 9 3445
-> 7 0 9 3593
-> 7 0 9 3475
-> 7 0 7 3444
-> 7 0 9 3505
-> 7 0 7 3474
-> 7 0 9 3535
-> 7 0 12 3609
-> 7 0 9 3457
-> 7 0 7 3504
-> 7 0 9 3565
-> 7 0 9 3487
-> 7 0 7 3534
-> 7 0 9 3595
-> 7 0 9 3428
-> 7 0 7 3456
-> 7 0 9 3517
-> 7 0 7 3564
-> 7 0 7 3486
-> 7 0 9 3547
-> 7 0 7 3594
-> 7 0 9 3469
-> 7 0 7 3516
-> 7 0 9 3577
-> 7 0 9 3499
-> 7 0 7 3546
-> 7 0 9 3607
-> 7 0 9 3440
-> 7 0 7 3468
-> 7 0 9 3529
-> 7 0 7 3576
-> 7 0 7 3498
-> 7 0 9 3559
-> 7 0 7 3606
-> 7 0 7 3528
-> 7 0 9 3589
-> 7 0 7 3558
-> 7 0 7 3588
-> 7 0 7 3417
-> 7 0 9 3424
-> 7 0 9 3476
-> 7 0 9 3452
-> 7 0 7 3429
-> 7 0 9 3436
-> 7 0 9 3536
-> 7 0 9 3512
-> 7 0 9 3488
-> 7 0 9 3596
-> 7 0 9 3464
-> 7 0 9 3572
-> 7 0 7 3441
-> 7 0 9 3548
-> 7 0 9 3524
-> 7 0 9 3500
-> 7 0 9 3608
-> 7 0 9 3584
-> 7 0 9 3560
-> 7 0 9 3419
-> 7 0 9 3454
-> 7 0 9 3610
-> 7 0 9 3484
-> 7 0 7 3453
-> 7 0 9 3514
-> 7 0 7 3483
-> 7 0 9 3544
-> 7 0 9 3431
-> 7 0 9 3466
-> 7 0 7 3513
-> 7 0 9 3574
-> 7 0 9 3496
-> 7 0 7 3543
-> 7 0 9 3604
-> 7 0 7 3465
-> 7 0 9 3526
-> 7 0 7 3573
-> 7 0 7 3495
-> 7 0 9 3556
-> 7 0 7 3603
-> 7 0 9 3443
-> 7 0 7 3525
-> 7 0 9 3586
-> 7 0 7 3555
-> 7 0 7 3585
-> 7 0 9 3421
-> 7 0 7 3426
-> 7 0 9 3433
-> 7 0 9 3479
-> 7 0 9 3455
-> 7 0 9 3539
-> 7 0 9 3515
-> 7 0 7 3438
-> 7 0 9 3491
-> 7 0 9 3599
-> 7 0 9 3467
-> 7 0 9 3575
-> 7 0 9 3551
-> 7 0 9 3527
-> 7 0 9 3503
-> 7 0 9 3587
-> 7 0 9 3563
-> 7 0 9 3451
-> 7 0 9 3481
-> 7 0 9 3422
-> 7 0 7 3450
-> 7 0 9 3511
-> 7 0 7 3480
-> 7 0 9 3541
-> 7 0 9 3463
-> 7 0 7 3510
-> 7 0 9 3571
-> 7 0 9 3493
-> 7 0 7 3540
-> 7 0 9 3601
-> 7 0 6 3416
-> 7 0 3 3917
-> 7 0 7 3640
-> 7 0 9 3615
-> 7 0 9 3650
-> 7 0 7 3670
-> 7 0 9 3713
-> 7 0 9 3680
-> 7 0 7 3700
-> 7 0 9 3710
-> 7 0 7 3652
-> 7 0 9 3627
-> 7 0 9 3662
-> 7 0 7 3682
-> 7 0 9 3692
-> 7 0 7 3664
-> 7 0 9 3639
-> 7 0 7 3694
-> 7 0 9 3617
-> 7 0 7 3613
-> 7 0 9 3629
-> 7 0 9 3675
-> 7 0 7 3625
-> 7 0 9 3651
-> 7 0 9 3711
-> 7 0 9 3687
-> 7 0 7 3637
-> 7 0 9 3663
-> 7 0 9 3699
-> 7 0 9 3647
-> 7 0 9 3677
-> 7 0 9 3618
-> 7 0 9 3707
-> 7 0 7 3649
-> 7 0 9 3659
-> 7 0 7 3679
-> 7 0 9 3689
-> 7 0 7 3709
-> 7 0 9 3630
-> 7 0 7 3661
-> 7 0 7 3691
-> 7 0 12 3712
-> 7 0 9 3614
-> 7 0 9 3642
-> 7 0 9 3626
-> 7 0 7 3622
-> 7 0 9 3702
-> 7 0 9 3678
-> 7 0 9 3654
-> 7 0 9 3638
-> 7 0 7 3634
-> 7 0 9 3690
-> 7 0 9 3666
-> 7 0 9 3644
-> 7 0 9 3674
-> 7 0 9 3704
-> 7 0 7 3646
-> 7 0 9 3621
-> 7 0 9 3656
-> 7 0 7 3676
-> 7 0 9 3686
-> 7 0 7 3706
-> 7 0 7 3658
-> 7 0 9 3633
-> 7 0 9 3668
-> 7 0 7 3688
-> 7 0 9 3698
-> 7 0 9 3623
-> 7 0 7 3619
-> 7 0 9 3645
-> 7 0 9 3705
-> 7 0 9 3635
-> 7 0 9 3681
-> 7 0 7 3631
-> 7 0 9 3657
-> 7 0 9 3693
-> 7 0 9 3669
-> 7 0 9 3641
-> 7 0 9 3671
-> 7 0 9 3701
-> 7 0 7 3643
-> 7 0 9 3653
-> 7 0 7 3673
-> 7 0 9 3683
-> 7 0 7 3703
-> 7 0 9 3624
-> 7 0 7 3655
-> 7 0 9 3665
-> 7 0 7 3685
-> 7 0 9 3695
-> 7 0 9 3636
-> 7 0 7 3667
-> 7 0 7 3697
-> 7 0 9 3620
-> 7 0 7 3616
-> 7 0 9 3672
-> 7 0 9 3648
-> 7 0 9 3632
-> 7 0 7 3628
-> 7 0 9 3708
-> 7 0 9 3684
-> 7 0 9 3660
-> 7 0 9 3696
-> 7 0 6 3612
-> 7 0 3 3793
-> 7 0 3 3920
-> 7 0 9 3729
-> 7 0 7 3725
-> 7 0 9 3778
-> 7 0 9 3754
-> 7 0 9 3741
-> 7 0 7 3737
-> 7 0 9 3790
-> 7 0 9 3766
-> 7 0 9 3744
-> 7 0 9 3774
-> 7 0 9 3718
-> 7 0 7 3746
-> 7 0 9 3756
-> 7 0 7 3776
-> 7 0 9 3786
-> 7 0 9 3730
-> 7 0 7 3758
-> 7 0 9 3768
-> 7 0 7 3788
-> 7 0 9 3742
-> 7 0 7 3770
-> 7 0 9 3726
-> 7 0 9 3745
-> 7 0 7 3722
-> 7 0 9 3781
-> 7 0 9 3738
-> 7 0 9 3757
-> 7 0 7 3734
-> 7 0 12 3791
-> 7 0 9 3769
-> 7 0 7 3743
-> 7 0 9 3753
-> 7 0 7 3773
-> 7 0 9 3721
-> 7 0 9 3783
-> 7 0 7 3755
-> 7 0 9 3765
-> 7 0 7 3785
-> 7 0 9 3733
-> 7 0 7 3767
-> 7 0 9 3723
-> 7 0 7 3719
-> 7 0 9 3748
-> 7 0 9 3735
-> 7 0 7 3731
-> 7 0 9 3784
-> 7 0 9 3760
-> 7 0 9 3772
-> 7 0 9 3750
-> 7 0 9 3780
-> 7 0 9 3724
-> 7 0 7 3752
-> 7 0 9 3762
-> 7 0 7 3782
-> 7 0 9 3736
-> 7 0 7 3764
-> 7 0 9 3720
-> 7 0 7 3716
-> 7 0 9 3775
-> 7 0 9 3732
-> 7 0 9 3751
-> 7 0 7 3728
-> 7 0 9 3787
-> 7 0 9 3763
-> 7 0 7 3740
-> 7 0 9 3747
-> 7 0 9 3777
-> 7 0 9 3792
-> 7 0 7 3749
-> 7 0 9 3759
-> 7 0 7 3779
-> 7 0 9 3727
-> 7 0 9 3789
-> 7 0 7 3761
-> 7 0 9 3771
-> 7 0 9 3739
-> 7 0 9 3717
-> 7 0 6 3715
-> 7 0 1 3415
-> 7 0 3 759
-> 7 0 9 684
-> 7 0 9 602
-> 7 0 9 662
-> 7 0 9 584
-> 7 0 9 722
-> 7 0 7 628
-> 7 0 9 644
-> 7 0 7 580
-> 7 0 9 704
-> 7 0 9 564
-> 7 0 9 626
-> 7 0 7 664
-> 7 0 7 748
-> 7 0 7 616
-> 7 0 9 686
-> 7 0 7 700
-> 7 0 9 746
-> 7 0 7 652
-> 7 0 9 542
-> 7 0 7 736
-> 7 0 9 603
-> 7 0 9 566
-> 7 0 9 639
-> 7 0 9 723
-> 7 0 9 591
-> 7 0 9 675
-> 7 0 7 562
-> 7 0 9 627
-> 7 0 9 711
-> 7 0 9 569
-> 7 0 9 747
-> 7 0 9 629
-> 7 0 9 689
-> 7 0 9 611
-> 7 0 7 571
-> 7 0 9 749
-> 7 0 9 555
-> 7 0 9 671
-> 7 0 9 593
-> 7 0 7 607
-> 7 0 9 731
-> 7 0 9 653
-> 7 0 7 691
-> 7 0 7 643
-> 7 0 9 713
-> 7 0 7 727
-> 7 0 7 595
-> 7 0 7 679
-> 7 0 7 715
-> 7 0 9 551
-> 7 0 9 630
-> 7 0 9 582
-> 7 0 9 666
-> 7 0 7 553
-> 7 0 9 750
-> 7 0 9 618
-> 7 0 9 702
-> 7 0 9 654
-> 7 0 9 738
-> 7 0 9 578
-> 7 0 9 546
-> 7 0 9 638
-> 7 0 7 598
-> 7 0 9 698
-> 7 0 9 620
-> 7 0 7 634
-> 7 0 9 680
-> 7 0 7 718
-> 7 0 7 586
-> 7 0 7 670
-> 7 0 9 740
-> 7 0 7 754
-> 7 0 7 622
-> 7 0 7 706
-> 7 0 7 742
-> 7 0 9 573
-> 7 0 7 544
-> 7 0 9 560
-> 7 0 9 609
-> 7 0 9 693
-> 7 0 9 645
-> 7 0 9 729
-> 7 0 9 597
-> 7 0 9 681
-> 7 0 9 717
-> 7 0 9 605
-> 7 0 9 665
-> 7 0 9 587
-> 7 0 9 725
-> 7 0 7 577
-> 7 0 9 647
-> 7 0 9 561
-> 7 0 7 661
-> 7 0 9 707
-> 7 0 7 613
-> 7 0 7 697
-> 7 0 7 649
-> 7 0 7 733
-> 7 0 9 545
-> 7 0 7 685
-> 7 0 9 600
-> 7 0 9 636
-> 7 0 9 720
-> 7 0 9 588
-> 7 0 9 672
-> 7 0 7 559
-> 7 0 9 756
-> 7 0 9 624
-> 7 0 9 708
-> 7 0 9 744
-> 7 0 9 572
-> 7 0 9 632
-> 7 0 9 758
-> 7 0 9 692
-> 7 0 7 568
-> 7 0 9 614
-> 7 0 9 552
-> 7 0 9 752
-> 7 0 9 674
-> 7 0 7 604
-> 7 0 7 688
-> 7 0 9 596
-> 7 0 9 734
-> 7 0 9 656
-> 7 0 7 640
-> 7 0 7 724
-> 7 0 7 592
-> 7 0 9 716
-> 7 0 7 676
-> 7 0 7 712
-> 7 0 12 757
-> 7 0 9 554
-> 7 0 9 579
-> 7 0 9 663
-> 7 0 7 550
-> 7 0 9 615
-> 7 0 9 699
-> 7 0 9 651
-> 7 0 9 735
-> 7 0 9 687
-> 7 0 9 599
-> 7 0 9 659
-> 7 0 9 543
-> 7 0 9 581
-> 7 0 9 719
-> 7 0 9 641
-> 7 0 9 701
-> 7 0 7 631
-> 7 0 9 623
-> 7 0 7 583
-> 7 0 9 683
-> 7 0 7 667
-> 7 0 9 567
-> 7 0 7 751
-> 7 0 7 619
-> 7 0 9 743
-> 7 0 7 703
-> 7 0 7 655
-> 7 0 7 739
-> 7 0 9 570
-> 7 0 7 541
-> 7 0 9 606
-> 7 0 9 690
-> 7 0 9 563
-> 7 0 9 642
-> 7 0 9 726
-> 7 0 9 594
-> 7 0 9 678
-> 7 0 7 565
-> 7 0 9 714
-> 7 0 9 608
-> 7 0 9 668
-> 7 0 9 590
-> 7 0 7 574
-> 7 0 7 658
-> 7 0 9 558
-> 7 0 9 728
-> 7 0 9 650
-> 7 0 7 610
-> 7 0 7 694
-> 7 0 9 710
-> 7 0 7 646
-> 7 0 7 730
-> 7 0 7 682
-> 7 0 9 548
-> 7 0 9 633
-> 7 0 9 585
-> 7 0 9 669
-> 7 0 7 556
-> 7 0 9 753
-> 7 0 9 621
-> 7 0 9 705
-> 7 0 9 657
-> 7 0 9 741
-> 7 0 9 575
-> 7 0 9 635
-> 7 0 9 549
-> 7 0 9 695
-> 7 0 9 617
-> 7 0 7 601
-> 7 0 9 755
-> 7 0 9 677
-> 7 0 7 637
-> 7 0 7 721
-> 7 0 9 737
-> 7 0 7 589
-> 7 0 7 673
-> 7 0 7 625
-> 7 0 7 709
-> 7 0 7 745
-> 7 0 9 576
-> 7 0 9 557
-> 7 0 9 660
-> 7 0 7 547
-> 7 0 9 612
-> 7 0 9 696
-> 7 0 9 648
-> 7 0 9 732
-> 7 0 6 540
-> 7 0 3 868
-> 7 0 12 867
-> 7 0 6 866
-> 7 0 3 865
-> 7 0 3 539
-> 7 0 9 792
-> 7 0 9 822
-> 7 0 9 852
-> 7 0 9 864
-> 7 0 9 766
-> 7 0 7 788
-> 7 0 9 804
-> 7 0 9 834
-> 7 0 7 848
-> 7 0 9 778
-> 7 0 7 824
-> 7 0 7 800
-> 7 0 9 816
-> 7 0 9 846
-> 7 0 7 860
-> 7 0 7 836
-> 7 0 7 812
-> 7 0 12 863
-> 7 0 9 768
-> 7 0 9 823
-> 7 0 7 764
-> 7 0 9 780
-> 7 0 9 799
-> 7 0 9 859
-> 7 0 9 835
-> 7 0 7 776
-> 7 0 9 811
-> 7 0 9 847
-> 7 0 9 789
-> 7 0 9 819
-> 7 0 9 849
-> 7 0 9 801
-> 7 0 9 769
-> 7 0 9 831
-> 7 0 7 791
-> 7 0 9 861
-> 7 0 9 813
-> 7 0 7 851
-> 7 0 9 781
-> 7 0 7 827
-> 7 0 9 843
-> 7 0 7 803
-> 7 0 7 839
-> 7 0 7 815
-> 7 0 9 765
-> 7 0 9 790
-> 7 0 9 777
-> 7 0 9 850
-> 7 0 9 826
-> 7 0 7 767
-> 7 0 9 802
-> 7 0 9 862
-> 7 0 9 838
-> 7 0 7 779
-> 7 0 9 814
-> 7 0 9 798
-> 7 0 9 828
-> 7 0 9 858
-> 7 0 9 772
-> 7 0 7 818
-> 7 0 7 794
-> 7 0 9 810
-> 7 0 9 840
-> 7 0 7 854
-> 7 0 9 784
-> 7 0 7 830
-> 7 0 7 806
-> 7 0 7 842
-> 7 0 9 762
-> 7 0 9 774
-> 7 0 9 793
-> 7 0 9 853
-> 7 0 9 829
-> 7 0 7 770
-> 7 0 9 786
-> 7 0 9 805
-> 7 0 9 841
-> 7 0 7 782
-> 7 0 9 817
-> 7 0 9 795
-> 7 0 9 763
-> 7 0 9 825
-> 7 0 9 855
-> 7 0 9 807
-> 7 0 9 775
-> 7 0 7 821
-> 7 0 9 837
-> 7 0 7 797
-> 7 0 7 857
-> 7 0 9 787
-> 7 0 7 833
-> 7 0 7 809
-> 7 0 7 845
-> 7 0 9 771
-> 7 0 9 820
-> 7 0 7 761
-> 7 0 9 796
-> 7 0 9 783
-> 7 0 9 856
-> 7 0 9 832
-> 7 0 7 773
-> 7 0 9 808
-> 7 0 9 844
-> 7 0 7 785
-> 7 0 6 760
-> 7 0 7 519
-> 7 0 9 506
-> 7 0 7 528
-> 7 0 9 518
-> 7 0 9 508
-> 7 0 9 533
-> 7 0 12 537
-> 7 0 9 520
-> 7 0 7 510
-> 7 0 7 522
-> 7 0 9 535
-> 7 0 9 509
-> 7 0 7 531
-> 7 0 9 521
-> 7 0 9 505
-> 7 0 7 501
-> 7 0 9 517
-> 7 0 9 536
-> 7 0 7 513
-> 7 0 7 525
-> 7 0 9 532
-> 7 0 9 538
-> 7 0 9 512
-> 7 0 7 534
-> 7 0 9 524
-> 7 0 9 502
-> 7 0 9 514
-> 7 0 7 504
-> 7 0 9 526
-> 7 0 7 516
-> 7 0 9 529
-> 7 0 9 503
-> 7 0 9 515
-> 7 0 9 527
-> 7 0 9 511
-> 7 0 9 530
-> 7 0 7 507
-> 7 0 9 523
-> 7 0 6 500
-> 7 0 1 499
-> 7 0 7 3373
-> 7 0 9 3320
-> 7 0 9 3332
-> 7 0 9 3381
-> 7 0 9 3357
-> 7 0 9 3344
-> 7 0 9 3393
-> 7 0 9 3369
-> 7 0 9 3405
-> 7 0 9 3347
-> 7 0 9 3377
-> 7 0 9 3407
-> 7 0 9 3321
-> 7 0 9 3359
-> 7 0 9 3389
-> 7 0 7 3376
-> 7 0 9 3333
-> 7 0 9 3371
-> 7 0 7 3382
-> 7 0 9 3401
-> 7 0 7 3388
-> 7 0 9 3345
-> 7 0 7 3394
-> 7 0 7 3400
-> 7 0 9 3329
-> 7 0 9 3348
-> 7 0 9 3408
-> 7 0 7 3322
-> 7 0 9 3384
-> 7 0 9 3341
-> 7 0 9 3360
-> 7 0 7 3328
-> 7 0 7 3334
-> 7 0 9 3396
-> 7 0 9 3372
-> 7 0 7 3340
-> 7 0 9 3356
-> 7 0 9 3324
-> 7 0 9 3386
-> 7 0 7 3346
-> 7 0 7 3352
-> 7 0 9 3368
-> 7 0 9 3336
-> 7 0 9 3398
-> 7 0 7 3358
-> 7 0 7 3364
-> 7 0 7 3370
-> 7 0 9 3326
-> 7 0 9 3351
-> 7 0 9 3338
-> 7 0 9 3387
-> 7 0 9 3363
-> 7 0 9 3399
-> 7 0 9 3375
-> 7 0 9 3353
-> 7 0 9 3383
-> 7 0 9 3327
-> 7 0 9 3365
-> 7 0 7 3379
-> 7 0 9 3395
-> 7 0 9 3339
-> 7 0 7 3385
-> 7 0 7 3391
-> 7 0 7 3397
-> 7 0 7 3403
-> 7 0 9 3323
-> 7 0 9 3378
-> 7 0 7 3319
-> 7 0 9 3335
-> 7 0 9 3354
-> 7 0 7 3325
-> 7 0 9 3390
-> 7 0 7 3331
-> 7 0 9 3366
-> 7 0 7 3337
-> 7 0 9 3402
-> 7 0 7 3343
-> 7 0 9 3350
-> 7 0 12 3409
-> 7 0 9 3380
-> 7 0 9 3410
-> 7 0 9 3362
-> 7 0 9 3330
-> 7 0 7 3349
-> 7 0 9 3392
-> 7 0 7 3406
-> 7 0 7 3355
-> 7 0 9 3374
-> 7 0 9 3342
-> 7 0 7 3361
-> 7 0 9 3404
-> 7 0 7 3367
-> 7 0 6 3318
-> 7 0 12 3413
-> 7 0 6 3412
-> 7 0 3 3317
-> 7 0 3 3414
-> 7 0 16 3155
-> 7 0 16 3131
-> 7 0 16 3107
-> 7 0 16 3191
-> 7 0 16 3167
-> 7 0 16 3143
-> 7 0 14 3144
-> 7 0 14 3093
-> 7 0 16 3121
-> 7 0 14 3150
-> 7 0 14 3099
-> 7 0 16 3151
-> 7 0 14 3156
-> 7 0 16 3181
-> 7 0 16 3103
-> 7 0 14 3105
-> 7 0 16 3133
-> 7 0 14 3162
-> 7 0 14 3111
-> 7 0 16 3163
-> 7 0 14 3168
-> 7 0 16 3193
-> 7 0 16 3146
-> 7 0 16 3122
-> 7 0 16 3098
-> 7 0 16 3182
-> 7 0 16 3158
-> 7 0 16 3134
-> 7 0 16 3110
-> 7 0 16 3194
-> 7 0 16 3170
-> 7 0 14 3114
-> 7 0 16 3118
-> 7 0 14 3120
-> 7 0 16 3148
-> 7 0 14 3177
-> 7 0 14 3126
-> 7 0 16 3178
-> 7 0 16 3100
-> 7 0 14 3183
-> 7 0 16 3130
-> 7 0 14 3132
-> 7 0 16 3160
-> 7 0 14 3189
-> 7 0 14 3138
-> 7 0 16 3190
-> 7 0 16 3112
-> 7 0 14 3195
-> 7 0 16 3142
-> 7 0 16 3172
-> 7 0 16 3149
-> 7 0 16 3125
-> 7 0 16 3101
-> 7 0 16 3185
-> 7 0 16 3161
-> 7 0 16 3137
-> 7 0 16 3113
-> 7 0 16 3197
-> 7 0 16 3173
-> 7 0 16 3115
-> 7 0 16 3145
-> 7 0 14 3147
-> 7 0 14 3096
-> 7 0 16 3175
-> 7 0 16 3097
-> 7 0 14 3153
-> 7 0 19 3201
-> 7 0 14 3102
-> 7 0 16 3127
-> 7 0 16 3157
-> 7 0 14 3159
-> 7 0 14 3108
-> 7 0 16 3187
-> 7 0 16 3109
-> 7 0 14 3165
-> 7 0 16 3139
-> 7 0 16 3169
-> 7 0 14 3171
-> 7 0 16 3199
-> 7 0 16 3202
-> 7 0 16 3116
-> 7 0 16 3176
-> 7 0 16 3152
-> 7 0 16 3128
-> 7 0 16 3104
-> 7 0 16 3188
-> 7 0 16 3164
-> 7 0 16 3140
-> 7 0 16 3200
-> 7 0 14 3117
-> 7 0 14 3174
-> 7 0 16 3094
-> 7 0 14 3123
-> 7 0 16 3124
-> 7 0 14 3180
-> 7 0 14 3129
-> 7 0 16 3154
-> 7 0 16 3184
-> 7 0 14 3186
-> 7 0 16 3106
-> 7 0 14 3135
-> 7 0 16 3136
-> 7 0 14 3192
-> 7 0 14 3141
-> 7 0 16 3166
-> 7 0 16 3196
-> 7 0 14 3198
-> 7 0 16 3119
-> 7 0 16 3095
-> 7 0 16 3179
-> 7 0 13 3092
-> 7 0 9 3316
-> 7 0 16 3278
-> 7 0 16 3290
-> 7 0 16 3274
-> 7 0 16 3286
-> 7 0 16 3281
-> 7 0 14 3273
-> 7 0 14 3279
-> 7 0 14 3285
-> 7 0 16 3283
-> 7 0 16 3284
-> 7 0 16 3280
-> 7 0 16 3275
-> 7 0 14 3276
-> 7 0 16 3287
-> 7 0 14 3282
-> 7 0 14 3288
-> 7 0 16 3277
-> 7 0 19 3291
-> 7 0 16 3289
-> 7 0 16 3292
-> 7 0 13 3272
-> 7 0 14 2352
-> 7 0 16 2371
-> 7 0 16 2444
-> 7 0 16 2420
-> 7 0 14 2358
-> 7 0 16 2396
-> 7 0 14 2364
-> 7 0 16 2456
-> 7 0 16 2432
-> 7 0 14 2370
-> 7 0 16 2408
-> 7 0 14 2376
-> 7 0 16 2386
-> 7 0 16 2416
-> 7 0 16 2446
-> 7 0 16 2360
-> 7 0 16 2398
-> 7 0 16 2428
-> 7 0 14 2412
-> 7 0 16 2458
-> 7 0 16 2372
-> 7 0 14 2418
-> 7 0 14 2424
-> 7 0 14 2430
-> 7 0 14 2436
-> 7 0 16 2356
-> 7 0 16 2411
-> 7 0 16 2368
-> 7 0 16 2387
-> 7 0 16 2447
-> 7 0 16 2423
-> 7 0 16 2399
-> 7 0 19 2460
-> 7 0 16 2459
-> 7 0 16 2435
-> 7 0 16 2383
-> 7 0 16 2413
-> 7 0 16 2443
-> 7 0 16 2461
-> 7 0 16 2395
-> 7 0 16 2363
-> 7 0 16 2425
-> 7 0 14 2382
-> 7 0 16 2455
-> 7 0 14 2439
-> 7 0 14 2388
-> 7 0 16 2407
-> 7 0 16 2375
-> 7 0 16 2437
-> 7 0 14 2445
-> 7 0 14 2394
-> 7 0 14 2451
-> 7 0 14 2400
-> 7 0 14 2457
-> 7 0 14 2406
-> 7 0 16 2353
-> 7 0 16 2365
-> 7 0 16 2414
-> 7 0 16 2390
-> 7 0 14 2355
-> 7 0 16 2377
-> 7 0 16 2450
-> 7 0 14 2361
-> 7 0 16 2426
-> 7 0 16 2402
-> 7 0 14 2367
-> 7 0 14 2373
-> 7 0 16 2438
-> 7 0 16 2380
-> 7 0 16 2410
-> 7 0 16 2440
-> 7 0 16 2354
-> 7 0 16 2392
-> 7 0 16 2422
-> 7 0 16 2452
-> 7 0 16 2366
-> 7 0 14 2409
-> 7 0 16 2404
-> 7 0 14 2415
-> 7 0 16 2434
-> 7 0 16 2378
-> 7 0 14 2421
-> 7 0 14 2427
-> 7 0 14 2433
-> 7 0 16 2362
-> 7 0 16 2381
-> 7 0 16 2441
-> 7 0 16 2417
-> 7 0 16 2374
-> 7 0 16 2393
-> 7 0 16 2453
-> 7 0 16 2429
-> 7 0 16 2405
-> 7 0 16 2389
-> 7 0 16 2357
-> 7 0 16 2419
-> 7 0 16 2449
-> 7 0 14 2379
-> 7 0 16 2401
-> 7 0 16 2369
-> 7 0 14 2385
-> 7 0 16 2431
-> 7 0 14 2442
-> 7 0 14 2391
-> 7 0 14 2448
-> 7 0 14 2397
-> 7 0 14 2454
-> 7 0 14 2403
-> 7 0 16 2359
-> 7 0 16 2384
-> 7 0 13 2351
-> 7 0 14 2592
-> 7 0 16 2665
-> 7 0 14 2649
-> 7 0 16 2677
-> 7 0 16 2600
-> 7 0 16 2576
-> 7 0 16 2636
-> 7 0 16 2612
-> 7 0 16 2588
-> 7 0 16 2648
-> 7 0 16 2624
-> 7 0 16 2660
-> 7 0 16 2596
-> 7 0 16 2626
-> 7 0 16 2672
-> 7 0 16 2578
-> 7 0 14 2595
-> 7 0 16 2608
-> 7 0 16 2638
-> 7 0 14 2601
-> 7 0 16 2590
-> 7 0 14 2607
-> 7 0 16 2620
-> 7 0 16 2650
-> 7 0 14 2613
-> 7 0 16 2662
-> 7 0 14 2619
-> 7 0 14 2658
-> 7 0 16 2674
-> 7 0 14 2664
-> 7 0 14 2670
-> 7 0 16 2627
-> 7 0 14 2676
-> 7 0 16 2603
-> 7 0 16 2579
-> 7 0 16 2639
-> 7 0 16 2615
-> 7 0 16 2591
-> 7 0 16 2651
-> 7 0 16 2663
-> 7 0 16 2575
-> 7 0 16 2675
-> 7 0 16 2605
-> 7 0 16 2635
-> 7 0 16 2587
-> 7 0 14 2628
-> 7 0 14 2577
-> 7 0 16 2617
-> 7 0 14 2634
-> 7 0 16 2647
-> 7 0 14 2583
-> 7 0 14 2640
-> 7 0 16 2659
-> 7 0 14 2589
-> 7 0 14 2646
-> 7 0 14 2652
-> 7 0 16 2671
-> 7 0 16 2630
-> 7 0 16 2606
-> 7 0 16 2582
-> 7 0 16 2642
-> 7 0 16 2618
-> 7 0 16 2594
-> 7 0 16 2654
-> 7 0 16 2666
-> 7 0 16 2602
-> 7 0 16 2632
-> 7 0 16 2678
-> 7 0 16 2584
-> 7 0 14 2598
-> 7 0 16 2614
-> 7 0 14 2604
-> 7 0 16 2644
-> 7 0 14 2610
-> 7 0 16 2656
-> 7 0 14 2616
-> 7 0 14 2622
-> 7 0 14 2655
-> 7 0 16 2668
-> 7 0 14 2661
-> 7 0 14 2667
-> 7 0 16 2680
-> 7 0 16 2597
-> 7 0 14 2673
-> 7 0 19 2682
-> 7 0 14 2679
-> 7 0 16 2633
-> 7 0 16 2609
-> 7 0 16 2585
-> 7 0 16 2645
-> 7 0 16 2621
-> 7 0 16 2657
-> 7 0 16 2683
-> 7 0 16 2669
-> 7 0 16 2599
-> 7 0 16 2629
-> 7 0 16 2581
-> 7 0 16 2681
-> 7 0 16 2611
-> 7 0 14 2625
-> 7 0 14 2574
-> 7 0 16 2641
-> 7 0 14 2631
-> 7 0 14 2580
-> 7 0 16 2593
-> 7 0 16 2623
-> 7 0 14 2637
-> 7 0 14 2586
-> 7 0 16 2653
-> 7 0 14 2643
-> 7 0 13 2573
-> 7 0 16 2867
-> 7 0 14 2814
-> 7 0 16 2821
-> 7 0 16 2851
-> 7 0 14 2871
-> 7 0 14 2820
-> 7 0 16 2881
-> 7 0 16 2803
-> 7 0 14 2877
-> 7 0 14 2826
-> 7 0 16 2833
-> 7 0 16 2863
-> 7 0 14 2883
-> 7 0 14 2832
-> 7 0 16 2893
-> 7 0 14 2889
-> 7 0 14 2838
-> 7 0 14 2895
-> 7 0 16 2846
-> 7 0 16 2822
-> 7 0 16 2798
-> 7 0 16 2882
-> 7 0 16 2858
-> 7 0 16 2834
-> 7 0 16 2810
-> 7 0 16 2894
-> 7 0 16 2870
-> 7 0 16 2818
-> 7 0 14 2841
-> 7 0 16 2848
-> 7 0 16 2878
-> 7 0 16 2800
-> 7 0 14 2847
-> 7 0 19 2904
-> 7 0 14 2796
-> 7 0 16 2830
-> 7 0 14 2853
-> 7 0 16 2860
-> 7 0 14 2802
-> 7 0 16 2890
-> 7 0 14 2859
-> 7 0 14 2808
-> 7 0 14 2865
-> 7 0 16 2905
-> 7 0 16 2813
-> 7 0 16 2873
-> 7 0 16 2849
-> 7 0 16 2825
-> 7 0 16 2801
-> 7 0 16 2885
-> 7 0 16 2861
-> 7 0 16 2837
-> 7 0 16 2897
-> 7 0 16 2815
-> 7 0 14 2811
-> 7 0 16 2845
-> 7 0 16 2875
-> 7 0 16 2797
-> 7 0 14 2817
-> 7 0 16 2827
-> 7 0 14 2874
-> 7 0 14 2823
-> 7 0 16 2857
-> 7 0 14 2880
-> 7 0 16 2887
-> 7 0 16 2809
-> 7 0 14 2829
-> 7 0 16 2839
-> 7 0 14 2886
-> 7 0 14 2835
-> 7 0 16 2869
-> 7 0 14 2892
-> 7 0 16 2899
-> 7 0 14 2898
-> 7 0 16 2816
-> 7 0 16 2876
-> 7 0 16 2852
-> 7 0 16 2828
-> 7 0 16 2804
-> 7 0 16 2888
-> 7 0 16 2864
-> 7 0 16 2840
-> 7 0 16 2900
-> 7 0 16 2812
-> 7 0 16 2842
-> 7 0 16 2872
-> 7 0 16 2902
-> 7 0 16 2824
-> 7 0 14 2844
-> 7 0 16 2854
-> 7 0 14 2901
-> 7 0 14 2850
-> 7 0 16 2884
-> 7 0 14 2799
-> 7 0 16 2806
-> 7 0 16 2836
-> 7 0 14 2856
-> 7 0 14 2805
-> 7 0 16 2866
-> 7 0 14 2862
-> 7 0 16 2896
-> 7 0 14 2868
-> 7 0 16 2843
-> 7 0 16 2819
-> 7 0 16 2903
-> 7 0 16 2879
-> 7 0 16 2855
-> 7 0 16 2831
-> 7 0 16 2807
-> 7 0 16 2891
-> 7 0 13 2795
-> 7 0 16 3020
-> 7 0 16 3080
-> 7 0 16 2992
-> 7 0 14 3021
-> 7 0 16 3022
-> 7 0 16 3052
-> 7 0 14 3027
-> 7 0 16 3082
-> 7 0 16 3004
-> 7 0 14 3084
-> 7 0 14 3033
-> 7 0 16 3034
-> 7 0 14 2982
-> 7 0 16 3064
-> 7 0 16 2986
-> 7 0 14 3039
-> 7 0 14 2988
-> 7 0 16 3016
-> 7 0 14 3045
-> 7 0 16 3046
-> 7 0 16 3076
-> 7 0 16 3023
-> 7 0 16 2999
-> 7 0 16 3083
-> 7 0 16 3059
-> 7 0 16 3035
-> 7 0 16 3011
-> 7 0 16 2987
-> 7 0 16 3071
-> 7 0 16 3047
-> 7 0 14 2991
-> 7 0 14 2997
-> 7 0 16 3001
-> 7 0 14 3054
-> 7 0 14 3003
-> 7 0 16 3031
-> 7 0 14 3060
-> 7 0 16 3061
-> 7 0 16 2983
-> 7 0 14 3009
-> 7 0 16 3013
-> 7 0 14 3066
-> 7 0 14 3015
-> 7 0 16 3043
-> 7 0 14 3072
-> 7 0 16 3073
-> 7 0 14 3078
-> 7 0 16 3026
-> 7 0 16 3002
-> 7 0 16 3086
-> 7 0 16 3062
-> 7 0 16 3038
-> 7 0 16 3014
-> 7 0 16 2990
-> 7 0 16 3074
-> 7 0 16 3050
-> 7 0 16 2998
-> 7 0 14 3024
-> 7 0 16 3028
-> 7 0 14 3081
-> 7 0 14 3030
-> 7 0 16 3058
-> 7 0 14 3087
-> 7 0 16 3088
-> 7 0 16 3010
-> 7 0 14 3036
-> 7 0 14 2985
-> 7 0 16 3040
-> 7 0 14 3042
-> 7 0 16 3070
-> 7 0 14 3048
-> 7 0 16 2993
-> 7 0 16 3053
-> 7 0 16 3029
-> 7 0 16 3005
-> 7 0 16 3089
-> 7 0 16 3065
-> 7 0 16 3041
-> 7 0 16 3017
-> 7 0 16 3077
-> 7 0 14 2994
-> 7 0 16 2995
-> 7 0 16 3025
-> 7 0 14 3051
-> 7 0 14 3000
-> 7 0 16 3055
-> 7 0 14 3057
-> 7 0 16 3085
-> 7 0 14 3006
-> 7 0 16 3007
-> 7 0 16 3037
-> 7 0 14 3063
-> 7 0 14 3012
-> 7 0 16 3067
-> 7 0 19 3090
-> 7 0 16 2989
-> 7 0 14 3069
-> 7 0 14 3018
-> 7 0 16 3019
-> 7 0 16 3049
-> 7 0 14 3075
-> 7 0 16 3079
-> 7 0 16 3091
-> 7 0 16 2996
-> 7 0 16 3056
-> 7 0 16 3032
-> 7 0 16 3008
-> 7 0 16 2984
-> 7 0 16 3068
-> 7 0 16 3044
-> 7 0 13 2981
-> 7 0 16 3305
-> 7 0 14 3306
-> 7 0 16 3295
-> 7 0 16 3308
-> 7 0 16 3296
-> 7 0 14 3294
-> 7 0 14 3300
-> 7 0 16 3310
-> 7 0 14 3303
-> 7 0 16 3311
-> 7 0 14 3309
-> 7 0 16 3299
-> 7 0 16 3307
-> 7 0 19 3312
-> 7 0 16 3301
-> 7 0 16 3313
-> 7 0 16 3302
-> 7 0 14 3297
-> 7 0 16 3304
-> 7 0 16 3298
-> 7 0 13 3293
-> 7 0 16 3227
-> 7 0 16 3244
-> 7 0 16 3256
-> 7 0 16 3211
-> 7 0 14 3210
-> 7 0 14 3216
-> 7 0 16 3223
-> 7 0 14 3222
-> 7 0 16 3205
-> 7 0 14 3228
-> 7 0 16 3235
-> 7 0 14 3234
-> 7 0 16 3269
-> 7 0 16 3245
-> 7 0 16 3257
-> 7 0 16 3218
-> 7 0 16 3241
-> 7 0 16 3230
-> 7 0 16 3206
-> 7 0 14 3240
-> 7 0 14 3246
-> 7 0 16 3253
-> 7 0 14 3252
-> 7 0 16 3208
-> 7 0 14 3258
-> 7 0 16 3265
-> 7 0 14 3264
-> 7 0 16 3220
-> 7 0 16 3232
-> 7 0 14 3204
-> 7 0 16 3248
-> 7 0 16 3260
-> 7 0 16 3209
-> 7 0 16 3221
-> 7 0 16 3238
-> 7 0 16 3268
-> 7 0 16 3233
-> 7 0 14 3267
-> 7 0 16 3250
-> 7 0 16 3262
-> 7 0 19 3270
-> 7 0 14 3207
-> 7 0 16 3217
-> 7 0 14 3213
-> 7 0 14 3219
-> 7 0 16 3229
-> 7 0 14 3225
-> 7 0 16 3271
-> 7 0 14 3231
-> 7 0 16 3239
-> 7 0 16 3251
-> 7 0 16 3263
-> 7 0 16 3212
-> 7 0 16 3224
-> 7 0 14 3237
-> 7 0 16 3247
-> 7 0 16 3236
-> 7 0 14 3243
-> 7 0 14 3249
-> 7 0 16 3259
-> 7 0 14 3255
-> 7 0 16 3214
-> 7 0 14 3261
-> 7 0 16 3226
-> 7 0 16 3242
-> 7 0 16 3254
-> 7 0 16 3266
-> 7 0 16 3215
-> 7 0 13 3203
-> 7 0 19 3315
-> 7 0 13 3314
-> 7 0 16 2474
-> 7 0 16 2534
-> 7 0 16 2510
-> 7 0 16 2486
-> 7 0 19 2571
-> 7 0 16 2570
-> 7 0 16 2546
-> 7 0 16 2522
-> 7 0 16 2498
-> 7 0 16 2558
-> 7 0 16 2572
-> 7 0 16 2482
-> 7 0 16 2512
-> 7 0 14 2472
-> 7 0 16 2542
-> 7 0 16 2464
-> 7 0 14 2478
-> 7 0 16 2494
-> 7 0 16 2524
-> 7 0 14 2535
-> 7 0 14 2484
-> 7 0 16 2554
-> 7 0 14 2541
-> 7 0 14 2490
-> 7 0 14 2547
-> 7 0 14 2496
-> 7 0 14 2553
-> 7 0 14 2559
-> 7 0 16 2477
-> 7 0 16 2537
-> 7 0 16 2513
-> 7 0 16 2489
-> 7 0 16 2465
-> 7 0 16 2549
-> 7 0 16 2525
-> 7 0 16 2501
-> 7 0 16 2561
-> 7 0 16 2479
-> 7 0 16 2509
-> 7 0 16 2539
-> 7 0 16 2569
-> 7 0 16 2491
-> 7 0 14 2505
-> 7 0 16 2521
-> 7 0 16 2551
-> 7 0 14 2562
-> 7 0 14 2511
-> 7 0 14 2568
-> 7 0 14 2517
-> 7 0 14 2466
-> 7 0 14 2523
-> 7 0 14 2529
-> 7 0 16 2504
-> 7 0 16 2480
-> 7 0 16 2564
-> 7 0 16 2540
-> 7 0 16 2516
-> 7 0 16 2492
-> 7 0 16 2468
-> 7 0 16 2552
-> 7 0 16 2528
-> 7 0 16 2476
-> 7 0 16 2506
-> 7 0 16 2536
-> 7 0 16 2566
-> 7 0 16 2488
-> 7 0 14 2475
-> 7 0 16 2518
-> 7 0 14 2532
-> 7 0 16 2548
-> 7 0 16 2470
-> 7 0 14 2481
-> 7 0 16 2500
-> 7 0 14 2538
-> 7 0 14 2487
-> 7 0 16 2530
-> 7 0 14 2544
-> 7 0 16 2560
-> 7 0 14 2493
-> 7 0 14 2550
-> 7 0 14 2499
-> 7 0 14 2556
-> 7 0 16 2507
-> 7 0 16 2483
-> 7 0 16 2567
-> 7 0 16 2543
-> 7 0 16 2519
-> 7 0 16 2495
-> 7 0 16 2471
-> 7 0 16 2555
-> 7 0 16 2531
-> 7 0 16 2473
-> 7 0 16 2503
-> 7 0 16 2533
-> 7 0 16 2563
-> 7 0 16 2485
-> 7 0 16 2515
-> 7 0 14 2502
-> 7 0 16 2545
-> 7 0 16 2467
-> 7 0 16 2497
-> 7 0 14 2508
-> 7 0 16 2527
-> 7 0 14 2565
-> 7 0 14 2514
-> 7 0 16 2557
-> 7 0 14 2463
-> 7 0 14 2520
-> 7 0 14 2469
-> 7 0 14 2526
-> 7 0 13 2462
-> 7 0 16 2692
-> 7 0 16 2722
-> 7 0 16 2752
-> 7 0 14 2691
-> 7 0 16 2782
-> 7 0 16 2704
-> 7 0 14 2748
-> 7 0 14 2697
-> 7 0 16 2734
-> 7 0 14 2754
-> 7 0 16 2764
-> 7 0 16 2686
-> 7 0 14 2703
-> 7 0 16 2716
-> 7 0 14 2760
-> 7 0 14 2709
-> 7 0 16 2746
-> 7 0 14 2766
-> 7 0 16 2776
-> 7 0 14 2715
-> 7 0 14 2772
-> 7 0 16 2723
-> 7 0 16 2699
-> 7 0 16 2783
-> 7 0 16 2759
-> 7 0 16 2735
-> 7 0 16 2711
-> 7 0 16 2687
-> 7 0 16 2771
-> 7 0 16 2747
-> 7 0 16 2689
-> 7 0 16 2719
-> 7 0 16 2749
-> 7 0 16 2779
-> 7 0 16 2701
-> 7 0 14 2718
-> 7 0 16 2731
-> 7 0 14 2724
-> 7 0 16 2761
-> 7 0 14 2781
-> 7 0 16 2791
-> 7 0 16 2713
-> 7 0 14 2730
-> 7 0 16 2743
-> 7 0 14 2787
-> 7 0 14 2736
-> 7 0 16 2773
-> 7 0 14 2685
-> 7 0 14 2742
-> 7 0 16 2690
-> 7 0 16 2750
-> 7 0 16 2726
-> 7 0 16 2702
-> 7 0 16 2786
-> 7 0 16 2762
-> 7 0 16 2738
-> 7 0 16 2714
-> 7 0 16 2774
-> 7 0 14 2688
-> 7 0 16 2698
-> 7 0 16 2728
-> 7 0 14 2694
-> 7 0 16 2758
-> 7 0 14 2751
-> 7 0 16 2788
-> 7 0 14 2700
-> 7 0 16 2710
-> 7 0 16 2740
-> 7 0 14 2757
-> 7 0 14 2706
-> 7 0 16 2770
-> 7 0 19 2793
-> 7 0 14 2763
-> 7 0 14 2712
-> 7 0 14 2769
-> 7 0 14 2775
-> 7 0 16 2794
-> 7 0 16 2693
-> 7 0 16 2753
-> 7 0 16 2729
-> 7 0 16 2705
-> 7 0 16 2789
-> 7 0 16 2765
-> 7 0 16 2741
-> 7 0 16 2717
-> 7 0 16 2777
-> 7 0 16 2695
-> 7 0 16 2725
-> 7 0 16 2755
-> 7 0 14 2721
-> 7 0 16 2785
-> 7 0 16 2707
-> 7 0 14 2778
-> 7 0 14 2727
-> 7 0 16 2737
-> 7 0 16 2767
-> 7 0 14 2784
-> 7 0 14 2733
-> 7 0 14 2790
-> 7 0 14 2739
-> 7 0 14 2745
-> 7 0 16 2720
-> 7 0 16 2696
-> 7 0 16 2780
-> 7 0 16 2756
-> 7 0 16 2732
-> 7 0 16 2708
-> 7 0 16 2792
-> 7 0 16 2768
-> 7 0 16 2744
-> 7 0 13 2684
-> 7 0 16 2918
-> 7 0 16 2935
-> 7 0 14 2961
-> 7 0 16 2965
-> 7 0 14 2967
-> 7 0 16 2947
-> 7 0 14 2973
-> 7 0 16 2977
-> 7 0 19 2979
-> 7 0 14 2907
-> 7 0 16 2914
-> 7 0 14 2913
-> 7 0 14 2919
-> 7 0 16 2926
-> 7 0 14 2925
-> 7 0 16 2980
-> 7 0 16 2960
-> 7 0 16 2936
-> 7 0 16 2972
-> 7 0 16 2948
-> 7 0 16 2909
-> 7 0 16 2932
-> 7 0 16 2921
-> 7 0 14 2931
-> 7 0 16 2962
-> 7 0 14 2937
-> 7 0 16 2944
-> 7 0 14 2943
-> 7 0 16 2974
-> 7 0 14 2949
-> 7 0 16 2956
-> 7 0 14 2955
-> 7 0 16 2911
-> 7 0 16 2923
-> 7 0 16 2963
-> 7 0 16 2939
-> 7 0 16 2975
-> 7 0 16 2951
-> 7 0 16 2912
-> 7 0 16 2929
-> 7 0 16 2959
-> 7 0 14 2958
-> 7 0 16 2924
-> 7 0 16 2941
-> 7 0 14 2964
-> 7 0 16 2971
-> 7 0 14 2970
-> 7 0 16 2953
-> 7 0 14 2976
-> 7 0 16 2908
-> 7 0 14 2910
-> 7 0 14 2916
-> 7 0 16 2920
-> 7 0 14 2922
-> 7 0 16 2930
-> 7 0 16 2966
-> 7 0 16 2942
-> 7 0 16 2978
-> 7 0 16 2954
-> 7 0 16 2915
-> 7 0 14 2928
-> 7 0 14 2934
-> 7 0 16 2938
-> 7 0 16 2927
-> 7 0 16 2968
-> 7 0 14 2940
-> 7 0 14 2946
-> 7 0 16 2950
-> 7 0 14 2952
-> 7 0 16 2917
-> 7 0 16 2933
-> 7 0 16 2969
-> 7 0 16 2945
-> 7 0 16 2957
-> 7 0 13 2906
-> 7 0 6 2350
-> 7 0 3 3411
-> 7 0 1 2349
-> 7 0 9 2054
-> 7 0 19 2053
-> 7 0 13 2052
-> 7 0 16 1718
-> 7 0 14 1636
-> 7 0 19 1726
-> 7 0 14 1642
-> 7 0 14 1699
-> 7 0 14 1648
-> 7 0 14 1705
-> 7 0 16 1616
-> 7 0 14 1654
-> 7 0 14 1711
-> 7 0 16 1641
-> 7 0 14 1660
-> 7 0 14 1717
-> 7 0 16 1628
-> 7 0 16 1701
-> 7 0 16 1677
-> 7 0 14 1723
-> 7 0 16 1653
-> 7 0 16 1713
-> 7 0 16 1689
-> 7 0 16 1665
-> 7 0 16 1725
-> 7 0 16 1643
-> 7 0 16 1673
-> 7 0 16 1703
-> 7 0 16 1617
-> 7 0 16 1655
-> 7 0 16 1685
-> 7 0 16 1715
-> 7 0 16 1629
-> 7 0 14 1669
-> 7 0 14 1675
-> 7 0 16 1613
-> 7 0 14 1681
-> 7 0 16 1668
-> 7 0 14 1687
-> 7 0 16 1625
-> 7 0 16 1644
-> 7 0 14 1693
-> 7 0 16 1704
-> 7 0 16 1680
-> 7 0 16 1656
-> 7 0 16 1716
-> 7 0 14 1609
-> 7 0 16 1692
-> 7 0 14 1615
-> 7 0 14 1621
-> 7 0 16 1640
-> 7 0 14 1627
-> 7 0 16 1670
-> 7 0 16 1700
-> 7 0 16 1727
-> 7 0 14 1633
-> 7 0 16 1652
-> 7 0 16 1620
-> 7 0 16 1682
-> 7 0 16 1712
-> 7 0 16 1664
-> 7 0 16 1632
-> 7 0 16 1694
-> 7 0 16 1724
-> 7 0 14 1639
-> 7 0 14 1696
-> 7 0 14 1645
-> 7 0 16 1610
-> 7 0 14 1702
-> 7 0 14 1651
-> 7 0 14 1708
-> 7 0 14 1657
-> 7 0 16 1622
-> 7 0 14 1714
-> 7 0 14 1663
-> 7 0 16 1671
-> 7 0 16 1647
-> 7 0 14 1720
-> 7 0 16 1634
-> 7 0 16 1707
-> 7 0 16 1683
-> 7 0 16 1659
-> 7 0 16 1719
-> 7 0 16 1695
-> 7 0 16 1637
-> 7 0 16 1667
-> 7 0 16 1697
-> 7 0 16 1611
-> 7 0 16 1649
-> 7 0 16 1679
-> 7 0 16 1709
-> 7 0 16 1623
-> 7 0 16 1661
-> 7 0 16 1691
-> 7 0 16 1721
-> 7 0 16 1635
-> 7 0 14 1666
-> 7 0 14 1672
-> 7 0 14 1678
-> 7 0 16 1619
-> 7 0 16 1638
-> 7 0 14 1684
-> 7 0 14 1690
-> 7 0 16 1698
-> 7 0 16 1674
-> 7 0 16 1631
-> 7 0 16 1650
-> 7 0 16 1710
-> 7 0 16 1686
-> 7 0 16 1662
-> 7 0 14 1612
-> 7 0 16 1722
-> 7 0 14 1618
-> 7 0 14 1624
-> 7 0 14 1630
-> 7 0 16 1646
-> 7 0 16 1614
-> 7 0 16 1676
-> 7 0 16 1706
-> 7 0 16 1658
-> 7 0 16 1626
-> 7 0 16 1688
-> 7 0 13 1608
-> 7 0 16 1826
-> 7 0 16 1748
-> 7 0 16 1778
-> 7 0 16 1808
-> 7 0 14 1759
-> 7 0 14 1765
-> 7 0 14 1822
-> 7 0 14 1771
-> 7 0 14 1828
-> 7 0 14 1777
-> 7 0 16 1761
-> 7 0 14 1783
-> 7 0 16 1737
-> 7 0 16 1821
-> 7 0 16 1797
-> 7 0 16 1773
-> 7 0 16 1749
-> 7 0 16 1833
-> 7 0 16 1809
-> 7 0 16 1785
-> 7 0 16 1733
-> 7 0 16 1763
-> 7 0 16 1793
-> 7 0 16 1823
-> 7 0 16 1745
-> 7 0 16 1775
-> 7 0 16 1805
-> 7 0 16 1757
-> 7 0 19 1834
-> 7 0 16 1787
-> 7 0 14 1729
-> 7 0 16 1817
-> 7 0 14 1735
-> 7 0 14 1792
-> 7 0 14 1741
-> 7 0 14 1798
-> 7 0 14 1747
-> 7 0 14 1804
-> 7 0 14 1753
-> 7 0 14 1810
-> 7 0 16 1764
-> 7 0 16 1740
-> 7 0 14 1816
-> 7 0 16 1824
-> 7 0 16 1800
-> 7 0 16 1776
-> 7 0 16 1752
-> 7 0 16 1812
-> 7 0 16 1788
-> 7 0 16 1730
-> 7 0 16 1760
-> 7 0 16 1790
-> 7 0 16 1820
-> 7 0 16 1742
-> 7 0 16 1772
-> 7 0 16 1802
-> 7 0 16 1832
-> 7 0 16 1754
-> 7 0 16 1784
-> 7 0 16 1814
-> 7 0 14 1762
-> 7 0 14 1819
-> 7 0 14 1768
-> 7 0 14 1825
-> 7 0 14 1774
-> 7 0 14 1831
-> 7 0 16 1731
-> 7 0 14 1780
-> 7 0 14 1786
-> 7 0 16 1791
-> 7 0 16 1767
-> 7 0 16 1743
-> 7 0 16 1827
-> 7 0 16 1803
-> 7 0 16 1779
-> 7 0 16 1755
-> 7 0 16 1815
-> 7 0 16 1835
-> 7 0 16 1739
-> 7 0 16 1769
-> 7 0 16 1799
-> 7 0 16 1829
-> 7 0 16 1751
-> 7 0 16 1781
-> 7 0 16 1811
-> 7 0 14 1732
-> 7 0 14 1789
-> 7 0 14 1738
-> 7 0 14 1795
-> 7 0 14 1744
-> 7 0 14 1801
-> 7 0 14 1750
-> 7 0 14 1807
-> 7 0 16 1734
-> 7 0 14 1756
-> 7 0 14 1813
-> 7 0 16 1794
-> 7 0 16 1770
-> 7 0 16 1746
-> 7 0 16 1830
-> 7 0 16 1806
-> 7 0 16 1782
-> 7 0 16 1758
-> 7 0 16 1818
-> 7 0 16 1736
-> 7 0 16 1766
-> 7 0 16 1796
-> 7 0 13 1728
-> 7 0 16 1926
-> 7 0 16 1856
-> 7 0 16 1886
-> 7 0 16 1838
-> 7 0 16 1868
-> 7 0 16 1898
-> 7 0 16 1850
-> 7 0 16 1880
-> 7 0 16 1910
-> 7 0 14 1882
-> 7 0 16 1922
-> 7 0 14 1888
-> 7 0 14 1837
-> 7 0 14 1894
-> 7 0 14 1843
-> 7 0 14 1900
-> 7 0 14 1849
-> 7 0 14 1906
-> 7 0 16 1857
-> 7 0 14 1915
-> 7 0 14 1921
-> 7 0 16 1893
-> 7 0 16 1869
-> 7 0 16 1845
-> 7 0 16 1905
-> 7 0 16 1881
-> 7 0 16 1917
-> 7 0 16 1853
-> 7 0 16 1883
-> 7 0 16 1865
-> 7 0 16 1895
-> 7 0 16 1847
-> 7 0 16 1877
-> 7 0 16 1907
-> 7 0 14 1852
-> 7 0 16 1919
-> 7 0 14 1858
-> 7 0 14 1864
-> 7 0 14 1870
-> 7 0 14 1876
-> 7 0 16 1884
-> 7 0 16 1860
-> 7 0 16 1896
-> 7 0 16 1872
-> 7 0 16 1848
-> 7 0 16 1908
-> 7 0 16 1920
-> 7 0 16 1862
-> 7 0 16 1892
-> 7 0 19 1927
-> 7 0 16 1844
-> 7 0 16 1874
-> 7 0 16 1904
-> 7 0 16 1916
-> 7 0 14 1885
-> 7 0 14 1891
-> 7 0 14 1840
-> 7 0 14 1897
-> 7 0 14 1846
-> 7 0 14 1903
-> 7 0 14 1912
-> 7 0 14 1909
-> 7 0 16 1887
-> 7 0 14 1918
-> 7 0 16 1863
-> 7 0 16 1839
-> 7 0 14 1924
-> 7 0 16 1899
-> 7 0 16 1875
-> 7 0 16 1851
-> 7 0 16 1911
-> 7 0 16 1923
-> 7 0 16 1859
-> 7 0 16 1889
-> 7 0 16 1841
-> 7 0 16 1871
-> 7 0 16 1901
-> 7 0 16 1913
-> 7 0 14 1855
-> 7 0 14 1861
-> 7 0 16 1925
-> 7 0 14 1867
-> 7 0 14 1873
-> 7 0 16 1854
-> 7 0 14 1879
-> 7 0 16 1890
-> 7 0 16 1866
-> 7 0 16 1842
-> 7 0 16 1902
-> 7 0 16 1878
-> 7 0 16 1914
-> 7 0 16 1928
-> 7 0 13 1836
-> 7 0 16 2007
-> 7 0 16 1959
-> 7 0 16 2043
-> 7 0 16 1995
-> 7 0 16 2031
-> 7 0 16 1955
-> 7 0 16 2015
-> 7 0 16 1937
-> 7 0 16 1997
-> 7 0 14 1975
-> 7 0 14 2038
-> 7 0 14 1987
-> 7 0 14 1936
-> 7 0 14 1999
-> 7 0 16 2051
-> 7 0 16 1950
-> 7 0 16 1986
-> 7 0 16 1938
-> 7 0 16 2022
-> 7 0 16 1974
-> 7 0 16 1982
-> 7 0 16 2042
-> 7 0 16 1964
-> 7 0 16 2024
-> 7 0 14 1951
-> 7 0 14 2014
-> 7 0 14 1963
-> 7 0 14 2026
-> 7 0 16 1977
-> 7 0 16 2013
-> 7 0 16 1965
-> 7 0 16 2049
-> 7 0 16 2001
-> 7 0 16 1949
-> 7 0 16 2009
-> 7 0 16 1931
-> 7 0 16 1991
-> 7 0 16 1973
-> 7 0 14 1978
-> 7 0 16 2033
-> 7 0 14 2041
-> 7 0 14 1990
-> 7 0 14 1939
-> 7 0 14 2002
-> 7 0 16 1956
-> 7 0 16 2040
-> 7 0 16 1992
-> 7 0 16 1944
-> 7 0 16 2028
-> 7 0 16 1976
-> 7 0 16 2036
-> 7 0 16 1958
-> 7 0 16 2018
-> 7 0 16 1940
-> 7 0 16 2000
-> 7 0 14 2005
-> 7 0 14 1954
-> 7 0 14 2017
-> 7 0 14 1966
-> 7 0 16 1947
-> 7 0 14 2029
-> 7 0 16 1983
-> 7 0 16 1935
-> 7 0 16 2019
-> 7 0 16 1971
-> 7 0 16 1985
-> 7 0 16 2045
-> 7 0 16 1967
-> 7 0 16 2027
-> 7 0 14 1981
-> 7 0 14 1930
-> 7 0 14 2044
-> 7 0 14 1993
-> 7 0 14 1942
-> 7 0 16 2010
-> 7 0 16 1962
-> 7 0 16 2046
-> 7 0 16 1998
-> 7 0 16 2034
-> 7 0 16 1952
-> 7 0 16 2012
-> 7 0 16 1934
-> 7 0 16 1994
-> 7 0 14 1945
-> 7 0 14 2008
-> 7 0 14 1957
-> 7 0 14 2020
-> 7 0 14 1969
-> 7 0 14 2032
-> 7 0 16 1953
-> 7 0 16 2037
-> 7 0 16 1989
-> 7 0 16 1941
-> 7 0 16 2025
-> 7 0 16 1979
-> 7 0 16 2039
-> 7 0 16 1961
-> 7 0 16 2021
-> 7 0 16 1943
-> 7 0 16 2003
-> 7 0 14 2035
-> 7 0 14 1984
-> 7 0 14 1933
-> 7 0 14 2047
-> 7 0 14 1996
-> 7 0 16 1980
-> 7 0 16 1932
-> 7 0 16 2016
-> 7 0 16 1968
-> 7 0 19 2050
-> 7 0 16 2004
-> 7 0 16 1946
-> 7 0 16 2006
-> 7 0 16 1988
-> 7 0 16 2048
-> 7 0 16 1970
-> 7 0 16 2030
-> 7 0 14 1948
-> 7 0 14 2011
-> 7 0 14 1960
-> 7 0 14 2023
-> 7 0 14 1972
-> 7 0 13 1929
-> 7 0 6 1607
-> 7 0 19 2343
-> 7 0 13 2342
-> 7 0 16 2110
-> 7 0 16 2140
-> 7 0 16 2081
-> 7 0 14 2085
-> 7 0 16 2146
-> 7 0 14 2091
-> 7 0 14 2097
-> 7 0 16 2065
-> 7 0 14 2103
-> 7 0 14 2109
-> 7 0 16 2117
-> 7 0 16 2093
-> 7 0 16 2077
-> 7 0 16 2129
-> 7 0 14 2145
-> 7 0 16 2153
-> 7 0 16 2105
-> 7 0 14 2058
-> 7 0 16 2141
-> 7 0 14 2064
-> 7 0 14 2070
-> 7 0 14 2076
-> 7 0 16 2060
-> 7 0 16 2095
-> 7 0 16 2155
-> 7 0 14 2082
-> 7 0 16 2125
-> 7 0 16 2072
-> 7 0 16 2107
-> 7 0 16 2137
-> 7 0 16 2084
-> 7 0 19 2154
-> 7 0 14 2118
-> 7 0 14 2124
-> 7 0 16 2062
-> 7 0 14 2130
-> 7 0 14 2136
-> 7 0 16 2074
-> 7 0 16 2120
-> 7 0 16 2096
-> 7 0 14 2142
-> 7 0 16 2132
-> 7 0 16 2108
-> 7 0 16 2144
-> 7 0 16 2092
-> 7 0 16 2122
-> 7 0 16 2063
-> 7 0 16 2104
-> 7 0 16 2134
-> 7 0 16 2075
-> 7 0 14 2088
-> 7 0 14 2094
-> 7 0 16 2059
-> 7 0 14 2100
-> 7 0 16 2087
-> 7 0 14 2106
-> 7 0 16 2071
-> 7 0 14 2112
-> 7 0 16 2123
-> 7 0 16 2099
-> 7 0 16 2083
-> 7 0 14 2148
-> 7 0 16 2135
-> 7 0 16 2111
-> 7 0 14 2061
-> 7 0 14 2067
-> 7 0 16 2147
-> 7 0 14 2073
-> 7 0 16 2089
-> 7 0 16 2119
-> 7 0 14 2079
-> 7 0 16 2066
-> 7 0 16 2101
-> 7 0 16 2131
-> 7 0 16 2078
-> 7 0 16 2113
-> 7 0 16 2143
-> 7 0 14 2115
-> 7 0 16 2149
-> 7 0 14 2121
-> 7 0 14 2127
-> 7 0 14 2151
-> 7 0 16 2068
-> 7 0 14 2133
-> 7 0 16 2090
-> 7 0 14 2139
-> 7 0 16 2080
-> 7 0 16 2126
-> 7 0 16 2102
-> 7 0 16 2138
-> 7 0 16 2114
-> 7 0 16 2086
-> 7 0 16 2150
-> 7 0 16 2116
-> 7 0 16 2098
-> 7 0 16 2128
-> 7 0 16 2152
-> 7 0 16 2069
-> 7 0 13 2057
-> 7 0 16 2227
-> 7 0 16 2179
-> 7 0 16 2209
-> 7 0 16 2239
-> 7 0 14 2160
-> 7 0 14 2217
-> 7 0 14 2166
-> 7 0 14 2223
-> 7 0 14 2172
-> 7 0 14 2229
-> 7 0 14 2178
-> 7 0 14 2235
-> 7 0 16 2162
-> 7 0 14 2184
-> 7 0 16 2222
-> 7 0 16 2198
-> 7 0 16 2174
-> 7 0 16 2234
-> 7 0 16 2210
-> 7 0 16 2186
-> 7 0 16 2164
-> 7 0 16 2194
-> 7 0 16 2224
-> 7 0 16 2176
-> 7 0 16 2206
-> 7 0 16 2236
-> 7 0 14 2187
-> 7 0 14 2193
-> 7 0 14 2199
-> 7 0 14 2205
-> 7 0 16 2189
-> 7 0 14 2211
-> 7 0 16 2165
-> 7 0 16 2225
-> 7 0 16 2201
-> 7 0 16 2177
-> 7 0 16 2237
-> 7 0 16 2213
-> 7 0 16 2161
-> 7 0 16 2242
-> 7 0 16 2191
-> 7 0 16 2221
-> 7 0 16 2173
-> 7 0 16 2203
-> 7 0 16 2233
-> 7 0 16 2185
-> 7 0 16 2215
-> 7 0 14 2157
-> 7 0 19 2241
-> 7 0 14 2163
-> 7 0 14 2220
-> 7 0 14 2169
-> 7 0 14 2226
-> 7 0 14 2175
-> 7 0 14 2232
-> 7 0 14 2181
-> 7 0 14 2238
-> 7 0 16 2192
-> 7 0 16 2168
-> 7 0 16 2228
-> 7 0 16 2204
-> 7 0 16 2180
-> 7 0 16 2240
-> 7 0 16 2216
-> 7 0 16 2158
-> 7 0 16 2188
-> 7 0 16 2218
-> 7 0 16 2170
-> 7 0 16 2200
-> 7 0 16 2230
-> 7 0 16 2182
-> 7 0 16 2212
-> 7 0 14 2190
-> 7 0 14 2196
-> 7 0 14 2202
-> 7 0 16 2159
-> 7 0 14 2208
-> 7 0 14 2214
-> 7 0 16 2219
-> 7 0 16 2195
-> 7 0 16 2171
-> 7 0 16 2231
-> 7 0 16 2207
-> 7 0 16 2183
-> 7 0 16 2167
-> 7 0 16 2197
-> 7 0 13 2156
-> 7 0 16 2248
-> 7 0 16 2278
-> 7 0 16 2308
-> 7 0 16 2338
-> 7 0 16 2260
-> 7 0 16 2290
-> 7 0 16 2320
-> 7 0 14 2274
-> 7 0 14 2331
-> 7 0 14 2280
-> 7 0 14 2337
-> 7 0 14 2286
-> 7 0 14 2292
-> 7 0 16 2273
-> 7 0 14 2298
-> 7 0 16 2249
-> 7 0 16 2333
-> 7 0 16 2309
-> 7 0 16 2285
-> 7 0 16 2261
-> 7 0 16 2321
-> 7 0 16 2297
-> 7 0 16 2245
-> 7 0 16 2275
-> 7 0 16 2305
-> 7 0 16 2335
-> 7 0 16 2257
-> 7 0 16 2287
-> 7 0 16 2317
-> 7 0 16 2269
-> 7 0 16 2299
-> 7 0 14 2244
-> 7 0 16 2329
-> 7 0 14 2301
-> 7 0 14 2250
-> 7 0 14 2307
-> 7 0 14 2256
-> 7 0 14 2313
-> 7 0 14 2262
-> 7 0 14 2319
-> 7 0 14 2268
-> 7 0 14 2325
-> 7 0 16 2276
-> 7 0 16 2252
-> 7 0 16 2336
-> 7 0 16 2312
-> 7 0 16 2288
-> 7 0 16 2264
-> 7 0 16 2324
-> 7 0 16 2300
-> 7 0 16 2272
-> 7 0 16 2302
-> 7 0 16 2332
-> 7 0 16 2254
-> 7 0 16 2284
-> 7 0 16 2314
-> 7 0 16 2266
-> 7 0 16 2296
-> 7 0 16 2326
-> 7 0 14 2271
-> 7 0 14 2277
-> 7 0 14 2334
-> 7 0 14 2283
-> 7 0 14 2289
-> 7 0 14 2295
-> 7 0 16 2303
-> 7 0 16 2279
-> 7 0 16 2255
-> 7 0 16 2339
-> 7 0 16 2315
-> 7 0 16 2291
-> 7 0 16 2267
-> 7 0 16 2327
-> 7 0 16 2341
-> 7 0 16 2251
-> 7 0 16 2281
-> 7 0 16 2311
-> 7 0 16 2263
-> 7 0 16 2293
-> 7 0 19 2340
-> 7 0 16 2323
-> 7 0 14 2247
-> 7 0 14 2304
-> 7 0 14 2253
-> 7 0 14 2310
-> 7 0 14 2259
-> 7 0 14 2316
-> 7 0 14 2265
-> 7 0 14 2322
-> 7 0 16 2246
-> 7 0 14 2328
-> 7 0 16 2306
-> 7 0 16 2282
-> 7 0 16 2258
-> 7 0 16 2318
-> 7 0 16 2294
-> 7 0 16 2270
-> 7 0 16 2330
-> 7 0 13 2243
-> 7 0 9 2344
-> 7 0 6 2056
-> 7 0 12 2347
-> 7 0 6 2346
-> 7 0 3 2345
-> 7 0 3 2348
-> 7 0 3 2055
-> 7 0 1 1606
-> 7 0 3 461
-> 7 0 3 495
-> 7 0 9 470
-> 7 0 9 482
-> 7 0 7 469
-> 7 0 9 471
-> 7 0 7 481
-> 7 0 9 483
-> 7 0 12 493
-> 7 0 9 467
-> 7 0 7 490
-> 7 0 9 479
-> 7 0 9 494
-> 7 0 7 472
-> 7 0 9 474
-> 7 0 7 484
-> 7 0 9 486
-> 7 0 9 464
-> 7 0 9 476
-> 7 0 9 488
-> 7 0 9 491
-> 7 0 7 463
-> 7 0 9 465
-> 7 0 7 475
-> 7 0 9 477
-> 7 0 7 487
-> 7 0 9 489
-> 7 0 9 473
-> 7 0 9 492
-> 7 0 9 485
-> 7 0 7 466
-> 7 0 9 468
-> 7 0 7 478
-> 7 0 9 480
-> 7 0 6 462
-> 7 0 3 178
-> 7 0 9 111
-> 7 0 9 141
-> 7 0 9 28
-> 7 0 9 63
-> 7 0 9 171
-> 7 0 7 35
-> 7 0 9 93
-> 7 0 9 123
-> 7 0 9 153
-> 7 0 9 40
-> 7 0 9 75
-> 7 0 7 47
-> 7 0 9 105
-> 7 0 9 135
-> 7 0 9 165
-> 7 0 9 24
-> 7 0 7 83
-> 7 0 9 36
-> 7 0 7 59
-> 7 0 9 82
-> 7 0 9 58
-> 7 0 7 143
-> 7 0 7 119
-> 7 0 9 142
-> 7 0 7 95
-> 7 0 9 118
-> 7 0 9 48
-> 7 0 7 71
-> 7 0 9 94
-> 7 0 9 70
-> 7 0 7 155
-> 7 0 7 131
-> 7 0 9 154
-> 7 0 7 107
-> 7 0 9 130
-> 7 0 9 106
-> 7 0 7 167
-> 7 0 9 166
-> 7 0 7 26
-> 7 0 9 60
-> 7 0 9 177
-> 7 0 9 90
-> 7 0 9 31
-> 7 0 9 120
-> 7 0 7 38
-> 7 0 9 150
-> 7 0 9 72
-> 7 0 9 102
-> 7 0 9 43
-> 7 0 9 132
-> 7 0 9 162
-> 7 0 7 50
-> 7 0 9 33
-> 7 0 7 110
-> 7 0 7 86
-> 7 0 7 62
-> 7 0 9 85
-> 7 0 7 170
-> 7 0 9 61
-> 7 0 7 146
-> 7 0 9 45
-> 7 0 7 122
-> 7 0 9 145
-> 7 0 7 98
-> 7 0 9 121
-> 7 0 7 74
-> 7 0 9 97
-> 7 0 9 73
-> 7 0 7 158
-> 7 0 7 134
-> 7 0 9 157
-> 7 0 9 133
-> 7 0 9 109
-> 7 0 9 169
-> 7 0 9 57
-> 7 0 7 29
-> 7 0 9 87
-> 7 0 9 117
-> 7 0 9 147
-> 7 0 9 34
-> 7 0 9 69
-> 7 0 7 41
-> 7 0 9 99
-> 7 0 9 129
-> 7 0 9 159
-> 7 0 9 46
-> 7 0 9 30
-> 7 0 7 53
-> 7 0 9 52
-> 7 0 7 113
-> 7 0 7 89
-> 7 0 9 112
-> 7 0 9 42
-> 7 0 7 65
-> 7 0 9 88
-> 7 0 7 173
-> 7 0 9 64
-> 7 0 7 149
-> 7 0 9 172
-> 7 0 7 125
-> 7 0 9 148
-> 7 0 7 101
-> 7 0 9 124
-> 7 0 7 77
-> 7 0 9 100
-> 7 0 9 76
-> 7 0 7 161
-> 7 0 7 137
-> 7 0 9 160
-> 7 0 9 136
-> 7 0 9 54
-> 7 0 9 84
-> 7 0 9 25
-> 7 0 9 114
-> 7 0 7 32
-> 7 0 9 144
-> 7 0 9 66
-> 7 0 9 174
-> 7 0 9 96
-> 7 0 9 37
-> 7 0 9 126
-> 7 0 7 44
-> 7 0 9 156
-> 7 0 9 78
-> 7 0 9 108
-> 7 0 9 49
-> 7 0 9 138
-> 7 0 9 168
-> 7 0 9 27
-> 7 0 7 80
-> 7 0 7 56
-> 7 0 9 55
-> 7 0 7 140
-> 7 0 9 39
-> 7 0 7 116
-> 7 0 7 92
-> 7 0 9 115
-> 7 0 7 68
-> 7 0 9 91
-> 7 0 9 67
-> 7 0 7 152
-> 7 0 9 175
-> 7 0 12 176
-> 7 0 7 128
-> 7 0 9 151
-> 7 0 7 104
-> 7 0 9 127
-> 7 0 9 103
-> 7 0 9 79
-> 7 0 7 164
-> 7 0 9 163
-> 7 0 9 139
-> 7 0 9 51
-> 7 0 7 23
-> 7 0 9 81
-> 7 0 6 22
-> 7 0 3 498
-> 7 0 12 497
-> 7 0 6 496
-> 7 0 9 377
-> 7 0 7 441
-> 7 0 7 180
-> 7 0 9 413
-> 7 0 9 241
-> 7 0 9 301
-> 7 0 9 223
-> 7 0 9 361
-> 7 0 9 194
-> 7 0 9 283
-> 7 0 9 421
-> 7 0 7 204
-> 7 0 9 343
-> 7 0 9 265
-> 7 0 9 403
-> 7 0 9 325
-> 7 0 9 385
-> 7 0 9 445
-> 7 0 7 240
-> 7 0 9 212
-> 7 0 9 196
-> 7 0 7 276
-> 7 0 9 248
-> 7 0 7 360
-> 7 0 7 228
-> 7 0 9 332
-> 7 0 7 312
-> 7 0 9 284
-> 7 0 7 396
-> 7 0 7 264
-> 7 0 9 368
-> 7 0 9 236
-> 7 0 7 348
-> 7 0 9 452
-> 7 0 9 320
-> 7 0 7 432
-> 7 0 9 404
-> 7 0 7 384
-> 7 0 9 208
-> 7 0 9 356
-> 7 0 9 440
-> 7 0 9 268
-> 7 0 9 185
-> 7 0 9 328
-> 7 0 9 250
-> 7 0 7 195
-> 7 0 9 388
-> 7 0 9 310
-> 7 0 9 232
-> 7 0 9 448
-> 7 0 9 370
-> 7 0 9 292
-> 7 0 9 430
-> 7 0 9 352
-> 7 0 9 412
-> 7 0 9 181
-> 7 0 7 267
-> 7 0 9 239
-> 7 0 7 219
-> 7 0 7 303
-> 7 0 9 275
-> 7 0 7 387
-> 7 0 9 205
-> 7 0 7 255
-> 7 0 9 359
-> 7 0 9 227
-> 7 0 7 339
-> 7 0 9 311
-> 7 0 7 423
-> 7 0 7 291
-> 7 0 9 395
-> 7 0 9 263
-> 7 0 7 375
-> 7 0 9 347
-> 7 0 9 431
-> 7 0 7 411
-> 7 0 9 383
-> 7 0 7 186
-> 7 0 9 217
-> 7 0 9 277
-> 7 0 9 337
-> 7 0 9 259
-> 7 0 9 200
-> 7 0 9 397
-> 7 0 9 319
-> 7 0 9 457
-> 7 0 9 379
-> 7 0 9 439
-> 7 0 7 210
-> 7 0 9 190
-> 7 0 7 246
-> 7 0 9 218
-> 7 0 7 330
-> 7 0 9 302
-> 7 0 7 282
-> 7 0 9 254
-> 7 0 7 366
-> 7 0 7 234
-> 7 0 9 338
-> 7 0 7 450
-> 7 0 7 318
-> 7 0 9 422
-> 7 0 9 290
-> 7 0 7 402
-> 7 0 9 374
-> 7 0 7 354
-> 7 0 9 458
-> 7 0 9 326
-> 7 0 7 438
-> 7 0 9 410
-> 7 0 9 244
-> 7 0 9 446
-> 7 0 9 304
-> 7 0 9 191
-> 7 0 9 226
-> 7 0 9 364
-> 7 0 7 201
-> 7 0 9 286
-> 7 0 9 424
-> 7 0 9 346
-> 7 0 9 406
-> 7 0 7 237
-> 7 0 9 209
-> 7 0 7 273
-> 7 0 9 199
-> 7 0 9 245
-> 7 0 7 357
-> 7 0 7 225
-> 7 0 9 329
-> 7 0 7 309
-> 7 0 9 281
-> 7 0 7 393
-> 7 0 7 261
-> 7 0 9 365
-> 7 0 9 233
-> 7 0 7 345
-> 7 0 9 449
-> 7 0 9 317
-> 7 0 7 429
-> 7 0 9 401
-> 7 0 7 381
-> 7 0 9 353
-> 7 0 9 437
-> 7 0 9 211
-> 7 0 9 271
-> 7 0 9 182
-> 7 0 9 331
-> 7 0 7 192
-> 7 0 9 253
-> 7 0 9 391
-> 7 0 9 313
-> 7 0 9 235
-> 7 0 9 451
-> 7 0 9 373
-> 7 0 9 295
-> 7 0 9 206
-> 7 0 9 433
-> 7 0 9 355
-> 7 0 9 415
-> 7 0 9 184
-> 7 0 7 216
-> 7 0 7 300
-> 7 0 9 272
-> 7 0 7 252
-> 7 0 7 336
-> 7 0 9 224
-> 7 0 9 308
-> 7 0 7 420
-> 7 0 7 288
-> 7 0 9 392
-> 7 0 7 372
-> 7 0 9 260
-> 7 0 9 344
-> 7 0 7 456
-> 7 0 7 324
-> 7 0 9 428
-> 7 0 9 296
-> 7 0 7 408
-> 7 0 9 380
-> 7 0 9 238
-> 7 0 7 444
-> 7 0 7 183
-> 7 0 9 416
-> 7 0 9 298
-> 7 0 9 220
-> 7 0 9 358
-> 7 0 9 280
-> 7 0 9 418
-> 7 0 9 340
-> 7 0 9 197
-> 7 0 9 262
-> 7 0 9 400
-> 7 0 9 322
-> 7 0 9 382
-> 7 0 9 442
-> 7 0 7 207
-> 7 0 7 243
-> 7 0 9 193
-> 7 0 7 327
-> 7 0 9 215
-> 7 0 9 299
-> 7 0 7 279
-> 7 0 7 363
-> 7 0 9 251
-> 7 0 9 335
-> 7 0 7 231
-> 7 0 7 447
-> 7 0 7 315
-> 7 0 9 419
-> 7 0 9 287
-> 7 0 7 399
-> 7 0 9 371
-> 7 0 7 351
-> 7 0 9 455
-> 7 0 9 323
-> 7 0 7 435
-> 7 0 9 407
-> 7 0 9 443
-> 7 0 9 460
-> 7 0 9 247
-> 7 0 9 188
-> 7 0 9 307
-> 7 0 9 229
-> 7 0 7 198
-> 7 0 9 367
-> 7 0 9 289
-> 7 0 9 427
-> 7 0 9 349
-> 7 0 9 409
-> 7 0 7 270
-> 7 0 9 242
-> 7 0 7 222
-> 7 0 7 306
-> 7 0 9 202
-> 7 0 9 278
-> 7 0 7 390
-> 7 0 9 362
-> 7 0 7 258
-> 7 0 7 342
-> 7 0 9 230
-> 7 0 9 314
-> 7 0 7 426
-> 7 0 7 294
-> 7 0 9 398
-> 7 0 12 459
-> 7 0 7 378
-> 7 0 9 266
-> 7 0 9 350
-> 7 0 9 434
-> 7 0 7 414
-> 7 0 9 386
-> 7 0 9 214
-> 7 0 9 274
-> 7 0 7 189
-> 7 0 9 334
-> 7 0 9 256
-> 7 0 9 394
-> 7 0 9 316
-> 7 0 9 203
-> 7 0 9 454
-> 7 0 9 376
-> 7 0 9 436
-> 7 0 9 187
-> 7 0 7 213
-> 7 0 7 297
-> 7 0 9 269
-> 7 0 7 249
-> 7 0 7 333
-> 7 0 9 221
-> 7 0 9 305
-> 7 0 7 417
-> 7 0 7 285
-> 7 0 9 389
-> 7 0 7 369
-> 7 0 9 257
-> 7 0 9 341
-> 7 0 7 453
-> 7 0 7 321
-> 7 0 9 425
-> 7 0 9 293
-> 7 0 7 405
-> 7 0 6 179
-> 7 0 1 21
-> 7 0 3 1602
-> 7 0 9 1475
-> 7 0 9 1535
-> 7 0 7 1375
-> 7 0 9 1595
-> 7 0 9 1376
-> 7 0 9 1422
-> 7 0 9 1458
-> 7 0 9 1542
-> 7 0 9 1410
-> 7 0 9 1494
-> 7 0 7 1423
-> 7 0 9 1578
-> 7 0 7 1399
-> 7 0 9 1446
-> 7 0 9 1530
-> 7 0 7 1543
-> 7 0 7 1519
-> 7 0 9 1566
-> 7 0 7 1495
-> 7 0 7 1471
-> 7 0 9 1400
-> 7 0 7 1447
-> 7 0 9 1371
-> 7 0 9 1460
-> 7 0 7 1591
-> 7 0 9 1520
-> 7 0 7 1567
-> 7 0 9 1442
-> 7 0 9 1580
-> 7 0 9 1502
-> 7 0 9 1562
-> 7 0 7 1378
-> 7 0 9 1401
-> 7 0 9 1385
-> 7 0 9 1485
-> 7 0 9 1437
-> 7 0 9 1521
-> 7 0 7 1450
-> 7 0 7 1426
-> 7 0 9 1473
-> 7 0 7 1402
-> 7 0 9 1557
-> 7 0 9 1509
-> 7 0 7 1570
-> 7 0 7 1546
-> 7 0 9 1593
-> 7 0 7 1522
-> 7 0 7 1498
-> 7 0 9 1427
-> 7 0 7 1474
-> 7 0 9 1487
-> 7 0 9 1409
-> 7 0 9 1547
-> 7 0 7 1594
-> 7 0 9 1469
-> 7 0 9 1386
-> 7 0 9 1529
-> 7 0 9 1589
-> 7 0 7 1381
-> 7 0 9 1370
-> 7 0 9 1392
-> 7 0 9 1428
-> 7 0 9 1512
-> 7 0 9 1464
-> 7 0 9 1548
-> 7 0 9 1416
-> 7 0 7 1453
-> 7 0 9 1500
-> 7 0 7 1429
-> 7 0 9 1584
-> 7 0 7 1405
-> 7 0 9 1536
-> 7 0 7 1573
-> 7 0 9 1394
-> 7 0 7 1549
-> 7 0 7 1525
-> 7 0 9 1454
-> 7 0 7 1501
-> 7 0 7 1477
-> 7 0 9 1514
-> 7 0 9 1436
-> 7 0 9 1377
-> 7 0 9 1574
-> 7 0 9 1496
-> 7 0 7 1597
-> 7 0 9 1418
-> 7 0 9 1556
-> 7 0 9 1478
-> 7 0 9 1538
-> 7 0 9 1598
-> 7 0 7 1384
-> 7 0 9 1379
-> 7 0 9 1455
-> 7 0 9 1407
-> 7 0 12 1600
-> 7 0 9 1491
-> 7 0 9 1575
-> 7 0 9 1443
-> 7 0 7 1480
-> 7 0 9 1527
-> 7 0 7 1456
-> 7 0 7 1432
-> 7 0 9 1479
-> 7 0 7 1408
-> 7 0 9 1563
-> 7 0 9 1421
-> 7 0 7 1576
-> 7 0 7 1552
-> 7 0 9 1599
-> 7 0 9 1481
-> 7 0 7 1528
-> 7 0 9 1368
-> 7 0 9 1403
-> 7 0 7 1504
-> 7 0 9 1541
-> 7 0 9 1463
-> 7 0 9 1523
-> 7 0 7 1363
-> 7 0 9 1445
-> 7 0 9 1583
-> 7 0 9 1505
-> 7 0 9 1565
-> 7 0 9 1364
-> 7 0 7 1387
-> 7 0 9 1398
-> 7 0 9 1482
-> 7 0 9 1434
-> 7 0 9 1388
-> 7 0 9 1518
-> 7 0 9 1470
-> 7 0 9 1554
-> 7 0 7 1483
-> 7 0 7 1459
-> 7 0 9 1506
-> 7 0 7 1435
-> 7 0 9 1590
-> 7 0 7 1411
-> 7 0 7 1579
-> 7 0 7 1555
-> 7 0 9 1601
-> 7 0 9 1430
-> 7 0 7 1531
-> 7 0 7 1507
-> 7 0 9 1490
-> 7 0 9 1412
-> 7 0 9 1550
-> 7 0 9 1472
-> 7 0 9 1383
-> 7 0 7 1366
-> 7 0 9 1532
-> 7 0 9 1592
-> 7 0 9 1373
-> 7 0 9 1425
-> 7 0 9 1461
-> 7 0 7 1390
-> 7 0 9 1545
-> 7 0 9 1413
-> 7 0 9 1497
-> 7 0 9 1581
-> 7 0 9 1449
-> 7 0 7 1510
-> 7 0 7 1486
-> 7 0 9 1533
-> 7 0 7 1462
-> 7 0 7 1438
-> 7 0 7 1414
-> 7 0 9 1569
-> 7 0 9 1397
-> 7 0 7 1582
-> 7 0 9 1457
-> 7 0 7 1558
-> 7 0 7 1534
-> 7 0 9 1374
-> 7 0 9 1517
-> 7 0 9 1439
-> 7 0 9 1577
-> 7 0 9 1499
-> 7 0 7 1369
-> 7 0 9 1559
-> 7 0 9 1452
-> 7 0 9 1382
-> 7 0 9 1404
-> 7 0 9 1488
-> 7 0 9 1572
-> 7 0 9 1440
-> 7 0 7 1393
-> 7 0 9 1524
-> 7 0 9 1476
-> 7 0 7 1513
-> 7 0 9 1560
-> 7 0 7 1489
-> 7 0 7 1465
-> 7 0 7 1441
-> 7 0 9 1596
-> 7 0 9 1424
-> 7 0 7 1417
-> 7 0 9 1365
-> 7 0 9 1484
-> 7 0 7 1585
-> 7 0 9 1406
-> 7 0 7 1561
-> 7 0 7 1537
-> 7 0 9 1544
-> 7 0 9 1466
-> 7 0 9 1526
-> 7 0 9 1448
-> 7 0 9 1389
-> 7 0 9 1586
-> 7 0 7 1372
-> 7 0 9 1508
-> 7 0 9 1568
-> 7 0 9 1367
-> 7 0 9 1395
-> 7 0 9 1431
-> 7 0 9 1515
-> 7 0 9 1467
-> 7 0 7 1420
-> 7 0 7 1396
-> 7 0 9 1551
-> 7 0 9 1419
-> 7 0 9 1503
-> 7 0 7 1540
-> 7 0 9 1587
-> 7 0 7 1516
-> 7 0 7 1492
-> 7 0 9 1391
-> 7 0 9 1539
-> 7 0 7 1468
-> 7 0 9 1451
-> 7 0 7 1444
-> 7 0 9 1511
-> 7 0 9 1433
-> 7 0 7 1588
-> 7 0 7 1564
-> 7 0 9 1571
-> 7 0 9 1493
-> 7 0 9 1415
-> 7 0 9 1380
-> 7 0 9 1553
-> 7 0 6 1362
-> 7 0 3 1605
-> 7 0 12 1604
-> 7 0 6 1603
-> 7 0 3 1361
-> 7 0 9 1204
-> 7 0 9 1253
-> 7 0 9 1229
-> 7 0 9 1313
-> 7 0 9 1216
-> 7 0 9 1289
-> 7 0 9 1265
-> 7 0 7 1221
-> 7 0 9 1241
-> 7 0 9 1349
-> 7 0 9 1325
-> 7 0 7 1281
-> 7 0 9 1301
-> 7 0 7 1257
-> 7 0 9 1277
-> 7 0 7 1233
-> 7 0 7 1341
-> 7 0 7 1317
-> 7 0 9 1337
-> 7 0 9 1219
-> 7 0 7 1293
-> 7 0 9 1249
-> 7 0 7 1269
-> 7 0 7 1245
-> 7 0 9 1279
-> 7 0 7 1353
-> 7 0 9 1193
-> 7 0 9 1309
-> 7 0 7 1329
-> 7 0 9 1231
-> 7 0 7 1305
-> 7 0 9 1339
-> 7 0 9 1261
-> 7 0 9 1291
-> 7 0 9 1205
-> 7 0 9 1321
-> 7 0 9 1243
-> 7 0 9 1351
-> 7 0 7 1191
-> 7 0 9 1273
-> 7 0 9 1303
-> 7 0 9 1217
-> 7 0 9 1333
-> 7 0 7 1203
-> 7 0 7 1215
-> 7 0 12 1359
-> 7 0 9 1201
-> 7 0 9 1220
-> 7 0 9 1280
-> 7 0 9 1256
-> 7 0 9 1213
-> 7 0 9 1232
-> 7 0 9 1340
-> 7 0 9 1316
-> 7 0 9 1292
-> 7 0 7 1248
-> 7 0 9 1268
-> 7 0 7 1224
-> 7 0 9 1244
-> 7 0 9 1352
-> 7 0 7 1308
-> 7 0 9 1328
-> 7 0 7 1284
-> 7 0 9 1304
-> 7 0 7 1260
-> 7 0 7 1236
-> 7 0 7 1344
-> 7 0 7 1320
-> 7 0 7 1296
-> 7 0 7 1272
-> 7 0 9 1228
-> 7 0 7 1356
-> 7 0 9 1196
-> 7 0 9 1258
-> 7 0 7 1332
-> 7 0 9 1288
-> 7 0 9 1318
-> 7 0 9 1240
-> 7 0 9 1348
-> 7 0 9 1208
-> 7 0 9 1270
-> 7 0 9 1300
-> 7 0 7 1194
-> 7 0 9 1330
-> 7 0 7 1206
-> 7 0 9 1198
-> 7 0 9 1223
-> 7 0 9 1210
-> 7 0 9 1283
-> 7 0 9 1259
-> 7 0 9 1235
-> 7 0 9 1343
-> 7 0 9 1319
-> 7 0 9 1295
-> 7 0 7 1251
-> 7 0 9 1271
-> 7 0 7 1227
-> 7 0 9 1247
-> 7 0 9 1355
-> 7 0 7 1311
-> 7 0 9 1331
-> 7 0 7 1287
-> 7 0 9 1307
-> 7 0 7 1263
-> 7 0 7 1239
-> 7 0 7 1347
-> 7 0 7 1323
-> 7 0 9 1225
-> 7 0 7 1299
-> 7 0 9 1255
-> 7 0 7 1275
-> 7 0 9 1285
-> 7 0 9 1199
-> 7 0 9 1315
-> 7 0 7 1335
-> 7 0 9 1237
-> 7 0 9 1345
-> 7 0 9 1267
-> 7 0 9 1297
-> 7 0 9 1211
-> 7 0 9 1327
-> 7 0 9 1357
-> 7 0 7 1197
-> 7 0 7 1209
-> 7 0 9 1195
-> 7 0 9 1250
-> 7 0 9 1207
-> 7 0 9 1226
-> 7 0 9 1310
-> 7 0 9 1286
-> 7 0 9 1262
-> 7 0 7 1218
-> 7 0 9 1238
-> 7 0 9 1346
-> 7 0 9 1322
-> 7 0 7 1278
-> 7 0 9 1298
-> 7 0 7 1254
-> 7 0 9 1274
-> 7 0 7 1230
-> 7 0 7 1338
-> 7 0 9 1358
-> 7 0 7 1314
-> 7 0 9 1334
-> 7 0 7 1290
-> 7 0 7 1266
-> 7 0 9 1222
-> 7 0 7 1242
-> 7 0 7 1350
-> 7 0 9 1252
-> 7 0 7 1326
-> 7 0 9 1282
-> 7 0 7 1302
-> 7 0 9 1360
-> 7 0 9 1312
-> 7 0 9 1234
-> 7 0 9 1342
-> 7 0 9 1202
-> 7 0 9 1264
-> 7 0 9 1294
-> 7 0 9 1324
-> 7 0 9 1246
-> 7 0 9 1354
-> 7 0 9 1214
-> 7 0 9 1276
-> 7 0 9 1306
-> 7 0 7 1200
-> 7 0 9 1336
-> 7 0 9 1192
-> 7 0 7 1212
-> 7 0 6 1190
-> 7 0 1 1189
-> 7 0 7 1059
-> 7 0 7 1122
-> 7 0 7 1071
+> 7 0 9 177
+> 7 0 9 52
+> 7 0 9 51
+> 7 0 9 55
+> 7 0 9 54
+> 7 0 9 58
+> 7 0 9 57
+> 7 0 9 61
+> 7 0 9 60
+> 7 0 9 64
+> 7 0 9 63
+> 7 0 9 67
+> 7 0 9 66
+> 7 0 9 70
+> 7 0 9 69
+> 7 0 9 73
+> 7 0 9 72
+> 7 0 9 76
+> 7 0 9 75
+> 7 0 9 79
+> 7 0 9 78
+> 7 0 9 25
+> 7 0 9 24
+> 7 0 9 82
+> 7 0 9 81
+> 7 0 9 85
+> 7 0 9 84
+> 7 0 9 88
+> 7 0 9 87
+> 7 0 9 91
+> 7 0 9 90
+> 7 0 9 94
+> 7 0 9 93
+> 7 0 9 97
+> 7 0 9 96
+> 7 0 9 100
+> 7 0 9 99
+> 7 0 9 103
+> 7 0 9 102
+> 7 0 9 106
+> 7 0 9 105
+> 7 0 9 109
+> 7 0 9 108
+> 7 0 9 28
+> 7 0 9 27
+> 7 0 9 112
+> 7 0 9 111
+> 7 0 9 115
+> 7 0 9 114
+> 7 0 9 118
+> 7 0 9 117
+> 7 0 9 121
+> 7 0 9 120
+> 7 0 9 124
+> 7 0 9 123
+> 7 0 9 127
+> 7 0 9 126
+> 7 0 9 130
+> 7 0 9 129
+> 7 0 9 133
+> 7 0 9 132
+> 7 0 9 136
+> 7 0 9 135
+> 7 0 9 139
+> 7 0 9 138
+> 7 0 9 31
+> 7 0 9 30
+> 7 0 9 142
+> 7 0 9 141
+> 7 0 9 145
+> 7 0 9 144
+> 7 0 9 148
+> 7 0 9 147
+> 7 0 9 151
+> 7 0 9 150
+> 7 0 9 154
+> 7 0 9 153
+> 7 0 9 157
+> 7 0 9 156
+> 7 0 9 160
+> 7 0 9 159
+> 7 0 9 163
+> 7 0 9 162
+> 7 0 9 166
+> 7 0 9 165
+> 7 0 9 169
+> 7 0 9 168
+> 7 0 9 34
+> 7 0 9 33
+> 7 0 9 172
+> 7 0 9 171
+> 7 0 9 175
+> 7 0 9 174
+> 7 0 9 37
+> 7 0 9 36
+> 7 0 9 40
+> 7 0 9 39
+> 7 0 9 43
+> 7 0 9 42
+> 7 0 9 46
+> 7 0 9 45
+> 7 0 9 49
+> 7 0 9 48
+> 7 0 7 23
+> 7 0 7 50
+> 7 0 7 53
+> 7 0 7 56
+> 7 0 7 59
+> 7 0 7 62
+> 7 0 7 65
+> 7 0 7 68
+> 7 0 7 71
+> 7 0 7 74
+> 7 0 7 77
+> 7 0 7 26
+> 7 0 7 80
+> 7 0 7 83
+> 7 0 7 86
+> 7 0 7 89
+> 7 0 7 92
+> 7 0 7 95
+> 7 0 7 98
+> 7 0 7 101
+> 7 0 7 104
+> 7 0 7 107
+> 7 0 7 29
+> 7 0 7 110
+> 7 0 7 113
+> 7 0 7 116
+> 7 0 7 119
+> 7 0 7 122
+> 7 0 7 125
+> 7 0 7 128
+> 7 0 7 131
+> 7 0 7 134
+> 7 0 7 137
+> 7 0 7 32
+> 7 0 7 140
+> 7 0 7 143
+> 7 0 7 146
+> 7 0 7 149
+> 7 0 7 152
+> 7 0 7 155
+> 7 0 7 158
+> 7 0 7 161
+> 7 0 7 164
+> 7 0 7 167
+> 7 0 7 35
+> 7 0 7 170
+> 7 0 7 173
+> 7 0 7 38
+> 7 0 7 41
+> 7 0 7 44
+> 7 0 7 47
+> 7 0 12 176
+> 7 0 6 22
+> 7 0 9 460
+> 7 0 9 209
+> 7 0 9 208
+> 7 0 9 212
+> 7 0 9 211
+> 7 0 9 215
+> 7 0 9 214
+> 7 0 9 218
+> 7 0 9 217
+> 7 0 9 221
+> 7 0 9 220
+> 7 0 9 224
+> 7 0 9 223
+> 7 0 9 227
+> 7 0 9 226
+> 7 0 9 230
+> 7 0 9 229
+> 7 0 9 233
+> 7 0 9 232
+> 7 0 9 236
+> 7 0 9 235
+> 7 0 9 182
+> 7 0 9 181
+> 7 0 9 239
+> 7 0 9 238
+> 7 0 9 242
+> 7 0 9 241
+> 7 0 9 245
+> 7 0 9 244
+> 7 0 9 248
+> 7 0 9 247
+> 7 0 9 251
+> 7 0 9 250
+> 7 0 9 254
+> 7 0 9 253
+> 7 0 9 257
+> 7 0 9 256
+> 7 0 9 260
+> 7 0 9 259
+> 7 0 9 263
+> 7 0 9 262
+> 7 0 9 266
+> 7 0 9 265
+> 7 0 9 185
+> 7 0 9 184
+> 7 0 9 269
+> 7 0 9 268
+> 7 0 9 272
+> 7 0 9 271
+> 7 0 9 275
+> 7 0 9 274
+> 7 0 9 278
+> 7 0 9 277
+> 7 0 9 281
+> 7 0 9 280
+> 7 0 9 284
+> 7 0 9 283
+> 7 0 9 287
+> 7 0 9 286
+> 7 0 9 290
+> 7 0 9 289
+> 7 0 9 293
+> 7 0 9 292
+> 7 0 9 296
+> 7 0 9 295
+> 7 0 9 188
+> 7 0 9 187
+> 7 0 9 299
+> 7 0 9 298
+> 7 0 9 302
+> 7 0 9 301
+> 7 0 9 305
+> 7 0 9 304
+> 7 0 9 308
+> 7 0 9 307
+> 7 0 9 311
+> 7 0 9 310
+> 7 0 9 314
+> 7 0 9 313
+> 7 0 9 317
+> 7 0 9 316
+> 7 0 9 320
+> 7 0 9 319
+> 7 0 9 323
+> 7 0 9 322
+> 7 0 9 326
+> 7 0 9 325
+> 7 0 9 191
+> 7 0 9 190
+> 7 0 9 329
+> 7 0 9 328
+> 7 0 9 332
+> 7 0 9 331
+> 7 0 9 335
+> 7 0 9 334
+> 7 0 9 338
+> 7 0 9 337
+> 7 0 9 341
+> 7 0 9 340
+> 7 0 9 344
+> 7 0 9 343
+> 7 0 9 347
+> 7 0 9 346
+> 7 0 9 350
+> 7 0 9 349
+> 7 0 9 353
+> 7 0 9 352
+> 7 0 9 356
+> 7 0 9 355
+> 7 0 9 194
+> 7 0 9 193
+> 7 0 9 359
+> 7 0 9 358
+> 7 0 9 362
+> 7 0 9 361
+> 7 0 9 365
+> 7 0 9 364
+> 7 0 9 368
+> 7 0 9 367
+> 7 0 9 371
+> 7 0 9 370
+> 7 0 9 374
+> 7 0 9 373
+> 7 0 9 377
+> 7 0 9 376
+> 7 0 9 380
+> 7 0 9 379
+> 7 0 9 383
+> 7 0 9 382
+> 7 0 9 386
+> 7 0 9 385
+> 7 0 9 197
+> 7 0 9 196
+> 7 0 9 389
+> 7 0 9 388
+> 7 0 9 392
+> 7 0 9 391
+> 7 0 9 395
+> 7 0 9 394
+> 7 0 9 398
+> 7 0 9 397
+> 7 0 9 401
+> 7 0 9 400
+> 7 0 9 404
+> 7 0 9 403
+> 7 0 9 407
+> 7 0 9 406
+> 7 0 9 410
+> 7 0 9 409
+> 7 0 9 413
+> 7 0 9 412
+> 7 0 9 416
+> 7 0 9 415
+> 7 0 9 200
+> 7 0 9 199
+> 7 0 9 419
+> 7 0 9 418
+> 7 0 9 422
+> 7 0 9 421
+> 7 0 9 425
+> 7 0 9 424
+> 7 0 9 428
+> 7 0 9 427
+> 7 0 9 431
+> 7 0 9 430
+> 7 0 9 434
+> 7 0 9 433
+> 7 0 9 437
+> 7 0 9 436
+> 7 0 9 440
+> 7 0 9 439
+> 7 0 9 443
+> 7 0 9 442
+> 7 0 9 446
+> 7 0 9 445
+> 7 0 9 203
+> 7 0 9 202
+> 7 0 9 449
+> 7 0 9 448
+> 7 0 9 452
+> 7 0 9 451
+> 7 0 9 455
+> 7 0 9 454
+> 7 0 9 458
+> 7 0 9 457
+> 7 0 9 206
+> 7 0 9 205
+> 7 0 7 180
+> 7 0 7 207
+> 7 0 7 210
+> 7 0 7 213
+> 7 0 7 216
+> 7 0 7 219
+> 7 0 7 222
+> 7 0 7 225
+> 7 0 7 228
+> 7 0 7 231
+> 7 0 7 234
+> 7 0 7 183
+> 7 0 7 237
+> 7 0 7 240
+> 7 0 7 243
+> 7 0 7 246
+> 7 0 7 249
+> 7 0 7 252
+> 7 0 7 255
+> 7 0 7 258
+> 7 0 7 261
+> 7 0 7 264
+> 7 0 7 186
+> 7 0 7 267
+> 7 0 7 270
+> 7 0 7 273
+> 7 0 7 276
+> 7 0 7 279
+> 7 0 7 282
+> 7 0 7 285
+> 7 0 7 288
+> 7 0 7 291
+> 7 0 7 294
+> 7 0 7 189
+> 7 0 7 297
+> 7 0 7 300
+> 7 0 7 303
+> 7 0 7 306
+> 7 0 7 309
+> 7 0 7 312
+> 7 0 7 315
+> 7 0 7 318
+> 7 0 7 321
+> 7 0 7 324
+> 7 0 7 192
+> 7 0 7 327
+> 7 0 7 330
+> 7 0 7 333
+> 7 0 7 336
+> 7 0 7 339
+> 7 0 7 342
+> 7 0 7 345
+> 7 0 7 348
+> 7 0 7 351
+> 7 0 7 354
+> 7 0 7 195
+> 7 0 7 357
+> 7 0 7 360
+> 7 0 7 363
+> 7 0 7 366
+> 7 0 7 369
+> 7 0 7 372
+> 7 0 7 375
+> 7 0 7 378
+> 7 0 7 381
+> 7 0 7 384
+> 7 0 7 198
+> 7 0 7 387
+> 7 0 7 390
+> 7 0 7 393
+> 7 0 7 396
+> 7 0 7 399
+> 7 0 7 402
+> 7 0 7 405
+> 7 0 7 408
+> 7 0 7 411
+> 7 0 7 414
+> 7 0 7 201
+> 7 0 7 417
+> 7 0 7 420
+> 7 0 7 423
+> 7 0 7 426
+> 7 0 7 429
+> 7 0 7 432
+> 7 0 7 435
+> 7 0 7 438
+> 7 0 7 441
+> 7 0 7 444
+> 7 0 7 204
+> 7 0 7 447
+> 7 0 7 450
+> 7 0 7 453
+> 7 0 7 456
+> 7 0 12 459
+> 7 0 6 179
+> 7 0 9 494
+> 7 0 9 492
+> 7 0 9 491
+> 7 0 9 465
+> 7 0 9 464
+> 7 0 9 468
+> 7 0 9 467
+> 7 0 9 471
+> 7 0 9 470
+> 7 0 9 474
+> 7 0 9 473
+> 7 0 9 477
+> 7 0 9 476
+> 7 0 9 480
+> 7 0 9 479
+> 7 0 9 483
+> 7 0 9 482
+> 7 0 9 486
+> 7 0 9 485
+> 7 0 9 489
+> 7 0 9 488
+> 7 0 7 463
+> 7 0 7 490
+> 7 0 7 466
+> 7 0 7 469
+> 7 0 7 472
+> 7 0 7 475
+> 7 0 7 478
+> 7 0 7 481
+> 7 0 7 484
+> 7 0 7 487
+> 7 0 12 493
+> 7 0 6 462
+> 7 0 12 497
+> 7 0 6 496
+> 7 0 3 178
+> 7 0 3 461
+> 7 0 3 495
+> 7 0 3 498
+> 7 0 1 21
+> 7 0 9 538
+> 7 0 9 530
+> 7 0 9 529
+> 7 0 9 533
+> 7 0 9 532
+> 7 0 9 536
+> 7 0 9 535
+> 7 0 9 503
+> 7 0 9 502
+> 7 0 9 506
+> 7 0 9 505
+> 7 0 9 509
+> 7 0 9 508
+> 7 0 9 512
+> 7 0 9 511
+> 7 0 9 515
+> 7 0 9 514
+> 7 0 9 518
+> 7 0 9 517
+> 7 0 9 521
+> 7 0 9 520
+> 7 0 9 524
+> 7 0 9 523
+> 7 0 9 527
+> 7 0 9 526
+> 7 0 7 501
+> 7 0 7 528
+> 7 0 7 531
+> 7 0 7 534
+> 7 0 7 504
+> 7 0 7 507
+> 7 0 7 510
+> 7 0 7 513
+> 7 0 7 516
+> 7 0 7 519
+> 7 0 7 522
+> 7 0 7 525
+> 7 0 12 537
+> 7 0 6 500
+> 7 0 9 758
+> 7 0 9 570
+> 7 0 9 569
+> 7 0 9 573
+> 7 0 9 572
+> 7 0 9 576
+> 7 0 9 575
+> 7 0 9 579
+> 7 0 9 578
+> 7 0 9 582
+> 7 0 9 581
+> 7 0 9 585
+> 7 0 9 584
+> 7 0 9 588
+> 7 0 9 587
+> 7 0 9 591
+> 7 0 9 590
+> 7 0 9 594
+> 7 0 9 593
+> 7 0 9 597
+> 7 0 9 596
+> 7 0 9 543
+> 7 0 9 542
+> 7 0 9 600
+> 7 0 9 599
+> 7 0 9 603
+> 7 0 9 602
+> 7 0 9 606
+> 7 0 9 605
+> 7 0 9 609
+> 7 0 9 608
+> 7 0 9 612
+> 7 0 9 611
+> 7 0 9 615
+> 7 0 9 614
+> 7 0 9 618
+> 7 0 9 617
+> 7 0 9 621
+> 7 0 9 620
+> 7 0 9 624
+> 7 0 9 623
+> 7 0 9 627
+> 7 0 9 626
+> 7 0 9 546
+> 7 0 9 545
+> 7 0 9 630
+> 7 0 9 629
+> 7 0 9 633
+> 7 0 9 632
+> 7 0 9 636
+> 7 0 9 635
+> 7 0 9 639
+> 7 0 9 638
+> 7 0 9 642
+> 7 0 9 641
+> 7 0 9 645
+> 7 0 9 644
+> 7 0 9 648
+> 7 0 9 647
+> 7 0 9 651
+> 7 0 9 650
+> 7 0 9 654
+> 7 0 9 653
+> 7 0 9 657
+> 7 0 9 656
+> 7 0 9 549
+> 7 0 9 548
+> 7 0 9 660
+> 7 0 9 659
+> 7 0 9 663
+> 7 0 9 662
+> 7 0 9 666
+> 7 0 9 665
+> 7 0 9 669
+> 7 0 9 668
+> 7 0 9 672
+> 7 0 9 671
+> 7 0 9 675
+> 7 0 9 674
+> 7 0 9 678
+> 7 0 9 677
+> 7 0 9 681
+> 7 0 9 680
+> 7 0 9 684
+> 7 0 9 683
+> 7 0 9 687
+> 7 0 9 686
+> 7 0 9 552
+> 7 0 9 551
+> 7 0 9 690
+> 7 0 9 689
+> 7 0 9 693
+> 7 0 9 692
+> 7 0 9 696
+> 7 0 9 695
+> 7 0 9 699
+> 7 0 9 698
+> 7 0 9 702
+> 7 0 9 701
+> 7 0 9 705
+> 7 0 9 704
+> 7 0 9 708
+> 7 0 9 707
+> 7 0 9 711
+> 7 0 9 710
+> 7 0 9 714
+> 7 0 9 713
+> 7 0 9 717
+> 7 0 9 716
+> 7 0 9 555
+> 7 0 9 554
+> 7 0 9 720
+> 7 0 9 719
+> 7 0 9 723
+> 7 0 9 722
+> 7 0 9 726
+> 7 0 9 725
+> 7 0 9 729
+> 7 0 9 728
+> 7 0 9 732
+> 7 0 9 731
+> 7 0 9 735
+> 7 0 9 734
+> 7 0 9 738
+> 7 0 9 737
+> 7 0 9 741
+> 7 0 9 740
+> 7 0 9 744
+> 7 0 9 743
+> 7 0 9 747
+> 7 0 9 746
+> 7 0 9 558
+> 7 0 9 557
+> 7 0 9 750
+> 7 0 9 749
+> 7 0 9 753
+> 7 0 9 752
+> 7 0 9 756
+> 7 0 9 755
+> 7 0 9 561
+> 7 0 9 560
+> 7 0 9 564
+> 7 0 9 563
+> 7 0 9 567
+> 7 0 9 566
+> 7 0 7 541
+> 7 0 7 568
+> 7 0 7 571
+> 7 0 7 574
+> 7 0 7 577
+> 7 0 7 580
+> 7 0 7 583
+> 7 0 7 586
+> 7 0 7 589
+> 7 0 7 592
+> 7 0 7 595
+> 7 0 7 544
+> 7 0 7 598
+> 7 0 7 601
+> 7 0 7 604
+> 7 0 7 607
+> 7 0 7 610
+> 7 0 7 613
+> 7 0 7 616
+> 7 0 7 619
+> 7 0 7 622
+> 7 0 7 625
+> 7 0 7 547
+> 7 0 7 628
+> 7 0 7 631
+> 7 0 7 634
+> 7 0 7 637
+> 7 0 7 640
+> 7 0 7 643
+> 7 0 7 646
+> 7 0 7 649
+> 7 0 7 652
+> 7 0 7 655
+> 7 0 7 550
+> 7 0 7 658
+> 7 0 7 661
+> 7 0 7 664
+> 7 0 7 667
+> 7 0 7 670
+> 7 0 7 673
+> 7 0 7 676
+> 7 0 7 679
+> 7 0 7 682
+> 7 0 7 685
+> 7 0 7 553
+> 7 0 7 688
+> 7 0 7 691
+> 7 0 7 694
+> 7 0 7 697
+> 7 0 7 700
+> 7 0 7 703
+> 7 0 7 706
+> 7 0 7 709
+> 7 0 7 712
+> 7 0 7 715
+> 7 0 7 556
+> 7 0 7 718
+> 7 0 7 721
+> 7 0 7 724
+> 7 0 7 727
+> 7 0 7 730
+> 7 0 7 733
+> 7 0 7 736
+> 7 0 7 739
+> 7 0 7 742
+> 7 0 7 745
+> 7 0 7 559
+> 7 0 7 748
+> 7 0 7 751
+> 7 0 7 754
+> 7 0 7 562
+> 7 0 7 565
+> 7 0 12 757
+> 7 0 6 540
+> 7 0 9 864
+> 7 0 9 790
+> 7 0 9 789
+> 7 0 9 793
+> 7 0 9 792
+> 7 0 9 796
+> 7 0 9 795
+> 7 0 9 799
+> 7 0 9 798
+> 7 0 9 802
+> 7 0 9 801
+> 7 0 9 805
+> 7 0 9 804
+> 7 0 9 808
+> 7 0 9 807
+> 7 0 9 811
+> 7 0 9 810
+> 7 0 9 814
+> 7 0 9 813
+> 7 0 9 817
+> 7 0 9 816
+> 7 0 9 763
+> 7 0 9 762
+> 7 0 9 820
+> 7 0 9 819
+> 7 0 9 823
+> 7 0 9 822
+> 7 0 9 826
+> 7 0 9 825
+> 7 0 9 829
+> 7 0 9 828
+> 7 0 9 832
+> 7 0 9 831
+> 7 0 9 835
+> 7 0 9 834
+> 7 0 9 838
+> 7 0 9 837
+> 7 0 9 841
+> 7 0 9 840
+> 7 0 9 844
+> 7 0 9 843
+> 7 0 9 847
+> 7 0 9 846
+> 7 0 9 766
+> 7 0 9 765
+> 7 0 9 850
+> 7 0 9 849
+> 7 0 9 853
+> 7 0 9 852
+> 7 0 9 856
+> 7 0 9 855
+> 7 0 9 859
+> 7 0 9 858
+> 7 0 9 862
+> 7 0 9 861
+> 7 0 9 769
+> 7 0 9 768
+> 7 0 9 772
+> 7 0 9 771
+> 7 0 9 775
+> 7 0 9 774
+> 7 0 9 778
+> 7 0 9 777
+> 7 0 9 781
+> 7 0 9 780
+> 7 0 9 784
+> 7 0 9 783
+> 7 0 9 787
+> 7 0 9 786
+> 7 0 7 761
+> 7 0 7 788
+> 7 0 7 791
+> 7 0 7 794
+> 7 0 7 797
+> 7 0 7 800
+> 7 0 7 803
+> 7 0 7 806
+> 7 0 7 809
+> 7 0 7 812
+> 7 0 7 815
+> 7 0 7 764
+> 7 0 7 818
+> 7 0 7 821
+> 7 0 7 824
+> 7 0 7 827
+> 7 0 7 830
+> 7 0 7 833
+> 7 0 7 836
+> 7 0 7 839
+> 7 0 7 842
+> 7 0 7 845
+> 7 0 7 767
+> 7 0 7 848
+> 7 0 7 851
+> 7 0 7 854
+> 7 0 7 857
+> 7 0 7 860
+> 7 0 7 770
+> 7 0 7 773
+> 7 0 7 776
+> 7 0 7 779
+> 7 0 7 782
+> 7 0 7 785
+> 7 0 12 863
+> 7 0 6 760
+> 7 0 12 867
+> 7 0 6 866
+> 7 0 3 539
+> 7 0 3 759
+> 7 0 3 865
+> 7 0 3 868
+> 7 0 1 499
+> 7 0 3 16
+> 7 0 3 12
+> 7 0 3 17
+> 7 0 3 18
+> 7 0 3 19
+> 7 0 3 20
+> 7 0 3 15
+> 7 0 3 13
+> 7 0 3 14
+> 7 0 2 7
+> 7 0 2 8
+> 7 0 2 2
+> 7 0 2 6
+> 7 0 2 9
+> 7 0 2 4
+> 7 0 2 3
+> 7 0 2 5
+> 7 0 2 11
+> 7 0 2 10
+> 7 0 1 1
+> 7 0 9 950
+> 7 0 9 900
+> 7 0 9 899
+> 7 0 9 903
+> 7 0 9 902
+> 7 0 9 906
+> 7 0 9 905
+> 7 0 9 909
+> 7 0 9 908
+> 7 0 9 912
+> 7 0 9 911
+> 7 0 9 915
+> 7 0 9 914
+> 7 0 9 918
+> 7 0 9 917
+> 7 0 9 921
+> 7 0 9 920
+> 7 0 9 924
+> 7 0 9 923
+> 7 0 9 927
+> 7 0 9 926
+> 7 0 9 873
+> 7 0 9 872
+> 7 0 9 930
+> 7 0 9 929
+> 7 0 9 933
+> 7 0 9 932
+> 7 0 9 936
+> 7 0 9 935
+> 7 0 9 939
+> 7 0 9 938
+> 7 0 9 942
+> 7 0 9 941
+> 7 0 9 945
+> 7 0 9 944
+> 7 0 9 948
+> 7 0 9 947
+> 7 0 9 876
+> 7 0 9 875
+> 7 0 9 879
+> 7 0 9 878
+> 7 0 9 882
+> 7 0 9 881
+> 7 0 9 885
+> 7 0 9 884
+> 7 0 9 888
+> 7 0 9 887
+> 7 0 9 891
+> 7 0 9 890
+> 7 0 9 894
+> 7 0 9 893
+> 7 0 9 897
+> 7 0 9 896
+> 7 0 7 871
+> 7 0 7 898
+> 7 0 7 901
+> 7 0 7 904
+> 7 0 7 907
+> 7 0 7 910
+> 7 0 7 913
+> 7 0 7 916
+> 7 0 7 919
+> 7 0 7 922
+> 7 0 7 925
+> 7 0 7 874
+> 7 0 7 928
+> 7 0 7 931
+> 7 0 7 934
+> 7 0 7 937
+> 7 0 7 940
+> 7 0 7 943
+> 7 0 7 946
+> 7 0 7 877
+> 7 0 7 880
+> 7 0 7 883
+> 7 0 7 886
+> 7 0 7 889
+> 7 0 7 892
+> 7 0 7 895
+> 7 0 12 949
+> 7 0 6 870
+> 7 0 9 1014
+> 7 0 9 982
+> 7 0 9 981
+> 7 0 9 985
+> 7 0 9 984
+> 7 0 9 988
+> 7 0 9 987
+> 7 0 9 991
+> 7 0 9 990
+> 7 0 9 994
+> 7 0 9 993
+> 7 0 9 997
+> 7 0 9 996
+> 7 0 9 1000
+> 7 0 9 999
+> 7 0 9 1003
+> 7 0 9 1002
+> 7 0 9 1006
+> 7 0 9 1005
+> 7 0 9 1009
+> 7 0 9 1008
+> 7 0 9 955
+> 7 0 9 954
+> 7 0 9 1012
+> 7 0 9 1011
+> 7 0 9 958
+> 7 0 9 957
+> 7 0 9 961
+> 7 0 9 960
+> 7 0 9 964
+> 7 0 9 963
+> 7 0 9 967
+> 7 0 9 966
+> 7 0 9 970
+> 7 0 9 969
+> 7 0 9 973
+> 7 0 9 972
+> 7 0 9 976
+> 7 0 9 975
+> 7 0 9 979
+> 7 0 9 978
+> 7 0 7 953
+> 7 0 7 980
+> 7 0 7 983
+> 7 0 7 986
+> 7 0 7 989
+> 7 0 7 992
+> 7 0 7 995
+> 7 0 7 998
+> 7 0 7 1001
+> 7 0 7 1004
+> 7 0 7 1007
+> 7 0 7 956
+> 7 0 7 1010
+> 7 0 7 959
+> 7 0 7 962
+> 7 0 7 965
+> 7 0 7 968
+> 7 0 7 971
+> 7 0 7 974
+> 7 0 7 977
+> 7 0 12 1013
+> 7 0 6 952
+> 7 0 9 1156
> 7 0 9 1046
-> 7 0 9 1036
-> 7 0 9 1082
-> 7 0 7 1017
-> 7 0 9 1118
-> 7 0 9 1070
-> 7 0 9 1154
-> 7 0 7 1029
-> 7 0 7 1041
+> 7 0 9 1045
+> 7 0 9 1049
> 7 0 9 1048
+> 7 0 9 1052
+> 7 0 9 1051
+> 7 0 9 1055
+> 7 0 9 1054
+> 7 0 9 1058
+> 7 0 9 1057
+> 7 0 9 1061
+> 7 0 9 1060
+> 7 0 9 1064
+> 7 0 9 1063
+> 7 0 9 1067
+> 7 0 9 1066
+> 7 0 9 1070
+> 7 0 9 1069
+> 7 0 9 1073
+> 7 0 9 1072
> 7 0 9 1019
-> 7 0 9 1108
-> 7 0 12 1155
+> 7 0 9 1018
+> 7 0 9 1076
+> 7 0 9 1075
+> 7 0 9 1079
+> 7 0 9 1078
+> 7 0 9 1082
+> 7 0 9 1081
+> 7 0 9 1085
+> 7 0 9 1084
+> 7 0 9 1088
+> 7 0 9 1087
+> 7 0 9 1091
> 7 0 9 1090
-> 7 0 9 1150
-> 7 0 9 1072
-> 7 0 7 1074
-> 7 0 9 1043
-> 7 0 9 1132
-> 7 0 7 1137
-> 7 0 7 1086
+> 7 0 9 1094
+> 7 0 9 1093
+> 7 0 9 1097
+> 7 0 9 1096
+> 7 0 9 1100
+> 7 0 9 1099
+> 7 0 9 1103
+> 7 0 9 1102
+> 7 0 9 1022
> 7 0 9 1021
-> 7 0 7 1149
-> 7 0 7 1098
+> 7 0 9 1106
+> 7 0 9 1105
> 7 0 9 1109
-> 7 0 9 1061
-> 7 0 9 1145
-> 7 0 9 1097
-> 7 0 9 1133
-> 7 0 9 1075
-> 7 0 9 1135
-> 7 0 9 1057
+> 7 0 9 1108
+> 7 0 9 1112
+> 7 0 9 1111
+> 7 0 9 1115
+> 7 0 9 1114
+> 7 0 9 1118
> 7 0 9 1117
-> 7 0 9 1034
-> 7 0 9 1099
-> 7 0 7 1050
-> 7 0 7 1113
-> 7 0 7 1062
-> 7 0 7 1125
-> 7 0 9 1030
-> 7 0 9 1052
-> 7 0 9 1136
-> 7 0 9 1088
-> 7 0 7 1020
+> 7 0 9 1121
+> 7 0 9 1120
> 7 0 9 1124
-> 7 0 7 1032
-> 7 0 9 1156
-> 7 0 9 1084
+> 7 0 9 1123
+> 7 0 9 1127
+> 7 0 9 1126
+> 7 0 9 1130
+> 7 0 9 1129
+> 7 0 9 1133
+> 7 0 9 1132
> 7 0 9 1025
+> 7 0 9 1024
+> 7 0 9 1136
+> 7 0 9 1135
+> 7 0 9 1139
+> 7 0 9 1138
+> 7 0 9 1142
+> 7 0 9 1141
+> 7 0 9 1145
> 7 0 9 1144
-> 7 0 9 1066
-> 7 0 9 1126
-> 7 0 7 1077
-> 7 0 7 1140
-> 7 0 7 1089
-> 7 0 7 1152
-> 7 0 7 1101
-> 7 0 9 1079
-> 7 0 9 1039
-> 7 0 9 1115
-> 7 0 9 1067
+> 7 0 9 1148
+> 7 0 9 1147
> 7 0 9 1151
-> 7 0 9 1103
-> 7 0 9 1051
-> 7 0 9 1111
-> 7 0 9 1093
+> 7 0 9 1150
+> 7 0 9 1154
> 7 0 9 1153
+> 7 0 9 1028
+> 7 0 9 1027
+> 7 0 9 1031
+> 7 0 9 1030
+> 7 0 9 1034
+> 7 0 9 1033
+> 7 0 9 1037
+> 7 0 9 1036
> 7 0 9 1040
-> 7 0 7 1104
+> 7 0 9 1039
+> 7 0 9 1043
+> 7 0 9 1042
+> 7 0 7 1017
+> 7 0 7 1044
+> 7 0 7 1047
+> 7 0 7 1050
> 7 0 7 1053
-> 7 0 7 1116
+> 7 0 7 1056
+> 7 0 7 1059
+> 7 0 7 1062
> 7 0 7 1065
-> 7 0 9 1024
-> 7 0 7 1128
-> 7 0 9 1106
-> 7 0 9 1058
-> 7 0 9 1142
-> 7 0 9 1094
-> 7 0 7 1023
-> 7 0 9 1130
-> 7 0 7 1035
-> 7 0 9 1078
-> 7 0 9 1138
-> 7 0 9 1060
-> 7 0 9 1120
-> 7 0 9 1031
-> 7 0 9 1102
+> 7 0 7 1068
+> 7 0 7 1071
+> 7 0 7 1020
+> 7 0 7 1074
+> 7 0 7 1077
> 7 0 7 1080
-> 7 0 7 1143
+> 7 0 7 1083
+> 7 0 7 1086
+> 7 0 7 1089
> 7 0 7 1092
-> 7 0 9 1049
-> 7 0 9 1033
-> 7 0 9 1085
-> 7 0 9 1121
-> 7 0 9 1073
-> 7 0 9 1045
-> 7 0 9 1105
-> 7 0 9 1022
-> 7 0 9 1087
-> 7 0 9 1147
-> 7 0 9 1069
-> 7 0 7 1044
-> 7 0 9 1129
+> 7 0 7 1095
+> 7 0 7 1098
+> 7 0 7 1101
+> 7 0 7 1023
+> 7 0 7 1104
> 7 0 7 1107
-> 7 0 7 1056
+> 7 0 7 1110
+> 7 0 7 1113
+> 7 0 7 1116
> 7 0 7 1119
-> 7 0 9 1018
-> 7 0 7 1068
+> 7 0 7 1122
+> 7 0 7 1125
+> 7 0 7 1128
> 7 0 7 1131
-> 7 0 9 1076
-> 7 0 9 1112
-> 7 0 9 1042
-> 7 0 9 1064
-> 7 0 9 1148
-> 7 0 9 1100
> 7 0 7 1026
-> 7 0 7 1038
-> 7 0 9 1054
-> 7 0 9 1114
-> 7 0 9 1096
-> 7 0 9 1037
> 7 0 7 1134
-> 7 0 7 1083
+> 7 0 7 1137
+> 7 0 7 1140
+> 7 0 7 1143
> 7 0 7 1146
-> 7 0 7 1095
-> 7 0 9 1027
-> 7 0 9 1055
-> 7 0 9 1139
-> 7 0 9 1091
-> 7 0 9 1127
-> 7 0 9 1081
-> 7 0 9 1141
-> 7 0 9 1063
-> 7 0 9 1028
-> 7 0 9 1123
-> 7 0 7 1047
-> 7 0 7 1110
+> 7 0 7 1149
+> 7 0 7 1152
+> 7 0 7 1029
+> 7 0 7 1032
+> 7 0 7 1035
+> 7 0 7 1038
+> 7 0 7 1041
+> 7 0 12 1155
> 7 0 6 1016
-> 7 0 7 989
-> 7 0 7 995
-> 7 0 9 954
-> 7 0 7 1001
-> 7 0 7 1007
-> 7 0 9 966
-> 7 0 9 985
-> 7 0 9 978
-> 7 0 9 997
-> 7 0 9 1009
-> 7 0 9 987
-> 7 0 9 955
-> 7 0 9 999
-> 7 0 9 967
-> 7 0 7 1010
-> 7 0 9 979
-> 7 0 9 963
-> 7 0 9 1012
-> 7 0 9 988
-> 7 0 9 975
-> 7 0 7 953
-> 7 0 9 1000
-> 7 0 7 959
-> 7 0 7 965
-> 7 0 7 971
-> 7 0 7 977
-> 7 0 9 984
-> 7 0 9 1014
-> 7 0 9 958
-> 7 0 9 996
-> 7 0 9 970
-> 7 0 7 980
-> 7 0 9 1008
-> 7 0 7 986
-> 7 0 7 992
-> 7 0 7 998
-> 7 0 7 1004
-> 7 0 9 960
-> 7 0 9 972
-> 7 0 9 991
-> 7 0 9 1003
-> 7 0 9 981
-> 7 0 9 1011
-> 7 0 9 993
-> 7 0 9 961
-> 7 0 12 1013
-> 7 0 9 1005
-> 7 0 9 973
-> 7 0 9 957
-> 7 0 9 982
-> 7 0 9 969
-> 7 0 9 994
-> 7 0 7 956
-> 7 0 9 1006
-> 7 0 7 962
-> 7 0 7 968
-> 7 0 7 974
-> 7 0 9 990
-> 7 0 9 964
-> 7 0 9 1002
-> 7 0 9 976
-> 7 0 7 983
-> 7 0 6 952
-> 7 0 9 1179
-> 7 0 9 1169
-> 7 0 9 1181
-> 7 0 7 1159
-> 7 0 7 1165
-> 7 0 7 1171
-> 7 0 7 1177
-> 7 0 9 1170
-> 7 0 9 1182
-> 7 0 9 1166
-> 7 0 9 1178
-> 7 0 9 1161
> 7 0 9 1184
+> 7 0 9 1161
+> 7 0 9 1160
+> 7 0 9 1164
+> 7 0 9 1163
+> 7 0 9 1167
+> 7 0 9 1166
+> 7 0 9 1170
+> 7 0 9 1169
> 7 0 9 1173
-> 7 0 12 1183
-> 7 0 9 1163
+> 7 0 9 1172
+> 7 0 9 1176
> 7 0 9 1175
+> 7 0 9 1179
+> 7 0 9 1178
+> 7 0 9 1182
+> 7 0 9 1181
+> 7 0 7 1159
> 7 0 7 1162
+> 7 0 7 1165
> 7 0 7 1168
+> 7 0 7 1171
> 7 0 7 1174
+> 7 0 7 1177
> 7 0 7 1180
-> 7 0 9 1164
-> 7 0 9 1176
-> 7 0 9 1160
-> 7 0 9 1172
-> 7 0 9 1167
+> 7 0 12 1183
> 7 0 6 1158
> 7 0 12 1187
> 7 0 6 1186
-> 7 0 3 1015
> 7 0 3 951
-> 7 0 9 950
-> 7 0 9 876
-> 7 0 9 914
-> 7 0 9 944
-> 7 0 9 888
-> 7 0 9 926
-> 7 0 7 931
-> 7 0 7 937
-> 7 0 7 943
-> 7 0 9 878
-> 7 0 9 933
-> 7 0 9 890
-> 7 0 9 909
-> 7 0 9 945
-> 7 0 7 874
-> 7 0 9 921
-> 7 0 7 880
-> 7 0 7 886
-> 7 0 7 892
-> 7 0 9 899
-> 7 0 9 929
-> 7 0 9 911
-> 7 0 9 879
-> 7 0 9 941
-> 7 0 9 923
-> 7 0 9 891
-> 7 0 7 901
-> 7 0 7 907
-> 7 0 7 913
-> 7 0 12 949
-> 7 0 7 919
-> 7 0 9 875
-> 7 0 7 925
-> 7 0 9 900
-> 7 0 9 887
-> 7 0 9 936
-> 7 0 9 912
-> 7 0 9 948
-> 7 0 9 924
-> 7 0 9 908
-> 7 0 9 938
-> 7 0 9 882
-> 7 0 9 920
-> 7 0 9 894
-> 7 0 7 928
-> 7 0 7 934
-> 7 0 7 940
-> 7 0 9 872
-> 7 0 7 946
-> 7 0 9 884
-> 7 0 9 903
-> 7 0 9 939
-> 7 0 9 896
-> 7 0 9 915
-> 7 0 7 871
-> 7 0 7 877
-> 7 0 9 927
-> 7 0 7 883
-> 7 0 7 889
-> 7 0 7 895
-> 7 0 9 905
-> 7 0 9 873
-> 7 0 9 935
-> 7 0 9 917
-> 7 0 9 885
-> 7 0 9 947
-> 7 0 7 898
-> 7 0 9 897
-> 7 0 7 904
-> 7 0 7 910
-> 7 0 7 916
-> 7 0 7 922
-> 7 0 9 881
-> 7 0 9 930
-> 7 0 9 906
-> 7 0 9 893
-> 7 0 9 942
-> 7 0 9 918
-> 7 0 9 902
-> 7 0 9 932
-> 7 0 6 870
+> 7 0 3 1015
+> 7 0 3 1157
> 7 0 3 1185
> 7 0 3 1188
-> 7 0 3 1157
> 7 0 1 869
-> 7 0 3 4093
-> 7 0 9 3939
-> 7 0 9 4012
+> 7 0 9 1360
+> 7 0 9 1220
+> 7 0 9 1219
+> 7 0 9 1223
+> 7 0 9 1222
+> 7 0 9 1226
+> 7 0 9 1225
+> 7 0 9 1229
+> 7 0 9 1228
+> 7 0 9 1232
+> 7 0 9 1231
+> 7 0 9 1235
+> 7 0 9 1234
+> 7 0 9 1238
+> 7 0 9 1237
+> 7 0 9 1241
+> 7 0 9 1240
+> 7 0 9 1244
+> 7 0 9 1243
+> 7 0 9 1247
+> 7 0 9 1246
+> 7 0 9 1193
+> 7 0 9 1192
+> 7 0 9 1250
+> 7 0 9 1249
+> 7 0 9 1253
+> 7 0 9 1252
+> 7 0 9 1256
+> 7 0 9 1255
+> 7 0 9 1259
+> 7 0 9 1258
+> 7 0 9 1262
+> 7 0 9 1261
+> 7 0 9 1265
+> 7 0 9 1264
+> 7 0 9 1268
+> 7 0 9 1267
+> 7 0 9 1271
+> 7 0 9 1270
+> 7 0 9 1274
+> 7 0 9 1273
+> 7 0 9 1277
+> 7 0 9 1276
+> 7 0 9 1196
+> 7 0 9 1195
+> 7 0 9 1280
+> 7 0 9 1279
+> 7 0 9 1283
+> 7 0 9 1282
+> 7 0 9 1286
+> 7 0 9 1285
+> 7 0 9 1289
+> 7 0 9 1288
+> 7 0 9 1292
+> 7 0 9 1291
+> 7 0 9 1295
+> 7 0 9 1294
+> 7 0 9 1298
+> 7 0 9 1297
+> 7 0 9 1301
+> 7 0 9 1300
+> 7 0 9 1304
+> 7 0 9 1303
+> 7 0 9 1307
+> 7 0 9 1306
+> 7 0 9 1199
+> 7 0 9 1198
+> 7 0 9 1310
+> 7 0 9 1309
+> 7 0 9 1313
+> 7 0 9 1312
+> 7 0 9 1316
+> 7 0 9 1315
+> 7 0 9 1319
+> 7 0 9 1318
+> 7 0 9 1322
+> 7 0 9 1321
+> 7 0 9 1325
+> 7 0 9 1324
+> 7 0 9 1328
+> 7 0 9 1327
+> 7 0 9 1331
+> 7 0 9 1330
+> 7 0 9 1334
+> 7 0 9 1333
+> 7 0 9 1337
+> 7 0 9 1336
+> 7 0 9 1202
+> 7 0 9 1201
+> 7 0 9 1340
+> 7 0 9 1339
+> 7 0 9 1343
+> 7 0 9 1342
+> 7 0 9 1346
+> 7 0 9 1345
+> 7 0 9 1349
+> 7 0 9 1348
+> 7 0 9 1352
+> 7 0 9 1351
+> 7 0 9 1355
+> 7 0 9 1354
+> 7 0 9 1358
+> 7 0 9 1357
+> 7 0 9 1205
+> 7 0 9 1204
+> 7 0 9 1208
+> 7 0 9 1207
+> 7 0 9 1211
+> 7 0 9 1210
+> 7 0 9 1214
+> 7 0 9 1213
+> 7 0 9 1217
+> 7 0 9 1216
+> 7 0 7 1191
+> 7 0 7 1218
+> 7 0 7 1221
+> 7 0 7 1224
+> 7 0 7 1227
+> 7 0 7 1230
+> 7 0 7 1233
+> 7 0 7 1236
+> 7 0 7 1239
+> 7 0 7 1242
+> 7 0 7 1245
+> 7 0 7 1194
+> 7 0 7 1248
+> 7 0 7 1251
+> 7 0 7 1254
+> 7 0 7 1257
+> 7 0 7 1260
+> 7 0 7 1263
+> 7 0 7 1266
+> 7 0 7 1269
+> 7 0 7 1272
+> 7 0 7 1275
+> 7 0 7 1197
+> 7 0 7 1278
+> 7 0 7 1281
+> 7 0 7 1284
+> 7 0 7 1287
+> 7 0 7 1290
+> 7 0 7 1293
+> 7 0 7 1296
+> 7 0 7 1299
+> 7 0 7 1302
+> 7 0 7 1305
+> 7 0 7 1200
+> 7 0 7 1308
+> 7 0 7 1311
+> 7 0 7 1314
+> 7 0 7 1317
+> 7 0 7 1320
+> 7 0 7 1323
+> 7 0 7 1326
+> 7 0 7 1329
+> 7 0 7 1332
+> 7 0 7 1335
+> 7 0 7 1203
+> 7 0 7 1338
+> 7 0 7 1341
+> 7 0 7 1344
+> 7 0 7 1347
+> 7 0 7 1350
+> 7 0 7 1353
+> 7 0 7 1356
+> 7 0 7 1206
+> 7 0 7 1209
+> 7 0 7 1212
+> 7 0 7 1215
+> 7 0 12 1359
+> 7 0 6 1190
+> 7 0 9 1601
+> 7 0 9 1392
+> 7 0 9 1391
+> 7 0 9 1395
+> 7 0 9 1394
+> 7 0 9 1398
+> 7 0 9 1397
+> 7 0 9 1401
+> 7 0 9 1400
+> 7 0 9 1404
+> 7 0 9 1403
+> 7 0 9 1407
+> 7 0 9 1406
+> 7 0 9 1410
+> 7 0 9 1409
+> 7 0 9 1413
+> 7 0 9 1412
+> 7 0 9 1416
+> 7 0 9 1415
+> 7 0 9 1419
+> 7 0 9 1418
+> 7 0 9 1365
+> 7 0 9 1364
+> 7 0 9 1422
+> 7 0 9 1421
+> 7 0 9 1425
+> 7 0 9 1424
+> 7 0 9 1428
+> 7 0 9 1427
+> 7 0 9 1431
+> 7 0 9 1430
+> 7 0 9 1434
+> 7 0 9 1433
+> 7 0 9 1437
+> 7 0 9 1436
+> 7 0 9 1440
+> 7 0 9 1439
+> 7 0 9 1443
+> 7 0 9 1442
+> 7 0 9 1446
+> 7 0 9 1445
+> 7 0 9 1449
+> 7 0 9 1448
+> 7 0 9 1368
+> 7 0 9 1367
+> 7 0 9 1452
+> 7 0 9 1451
+> 7 0 9 1455
+> 7 0 9 1454
+> 7 0 9 1458
+> 7 0 9 1457
+> 7 0 9 1461
+> 7 0 9 1460
+> 7 0 9 1464
+> 7 0 9 1463
+> 7 0 9 1467
+> 7 0 9 1466
+> 7 0 9 1470
+> 7 0 9 1469
+> 7 0 9 1473
+> 7 0 9 1472
+> 7 0 9 1476
+> 7 0 9 1475
+> 7 0 9 1479
+> 7 0 9 1478
+> 7 0 9 1371
+> 7 0 9 1370
+> 7 0 9 1482
+> 7 0 9 1481
+> 7 0 9 1485
+> 7 0 9 1484
+> 7 0 9 1488
+> 7 0 9 1487
+> 7 0 9 1491
+> 7 0 9 1490
+> 7 0 9 1494
+> 7 0 9 1493
+> 7 0 9 1497
+> 7 0 9 1496
+> 7 0 9 1500
+> 7 0 9 1499
+> 7 0 9 1503
+> 7 0 9 1502
+> 7 0 9 1506
+> 7 0 9 1505
+> 7 0 9 1509
+> 7 0 9 1508
+> 7 0 9 1374
+> 7 0 9 1373
+> 7 0 9 1512
+> 7 0 9 1511
+> 7 0 9 1515
+> 7 0 9 1514
+> 7 0 9 1518
+> 7 0 9 1517
+> 7 0 9 1521
+> 7 0 9 1520
+> 7 0 9 1524
+> 7 0 9 1523
+> 7 0 9 1527
+> 7 0 9 1526
+> 7 0 9 1530
+> 7 0 9 1529
+> 7 0 9 1533
+> 7 0 9 1532
+> 7 0 9 1536
+> 7 0 9 1535
+> 7 0 9 1539
+> 7 0 9 1538
+> 7 0 9 1377
+> 7 0 9 1376
+> 7 0 9 1542
+> 7 0 9 1541
+> 7 0 9 1545
+> 7 0 9 1544
+> 7 0 9 1548
+> 7 0 9 1547
+> 7 0 9 1551
+> 7 0 9 1550
+> 7 0 9 1554
+> 7 0 9 1553
+> 7 0 9 1557
+> 7 0 9 1556
+> 7 0 9 1560
+> 7 0 9 1559
+> 7 0 9 1563
+> 7 0 9 1562
+> 7 0 9 1566
+> 7 0 9 1565
+> 7 0 9 1569
+> 7 0 9 1568
+> 7 0 9 1380
+> 7 0 9 1379
+> 7 0 9 1572
+> 7 0 9 1571
+> 7 0 9 1575
+> 7 0 9 1574
+> 7 0 9 1578
+> 7 0 9 1577
+> 7 0 9 1581
+> 7 0 9 1580
+> 7 0 9 1584
+> 7 0 9 1583
+> 7 0 9 1587
+> 7 0 9 1586
+> 7 0 9 1590
+> 7 0 9 1589
+> 7 0 9 1593
+> 7 0 9 1592
+> 7 0 9 1596
+> 7 0 9 1595
+> 7 0 9 1599
+> 7 0 9 1598
+> 7 0 9 1383
+> 7 0 9 1382
+> 7 0 9 1386
+> 7 0 9 1385
+> 7 0 9 1389
+> 7 0 9 1388
+> 7 0 7 1363
+> 7 0 7 1390
+> 7 0 7 1393
+> 7 0 7 1396
+> 7 0 7 1399
+> 7 0 7 1402
+> 7 0 7 1405
+> 7 0 7 1408
+> 7 0 7 1411
+> 7 0 7 1414
+> 7 0 7 1417
+> 7 0 7 1366
+> 7 0 7 1420
+> 7 0 7 1423
+> 7 0 7 1426
+> 7 0 7 1429
+> 7 0 7 1432
+> 7 0 7 1435
+> 7 0 7 1438
+> 7 0 7 1441
+> 7 0 7 1444
+> 7 0 7 1447
+> 7 0 7 1369
+> 7 0 7 1450
+> 7 0 7 1453
+> 7 0 7 1456
+> 7 0 7 1459
+> 7 0 7 1462
+> 7 0 7 1465
+> 7 0 7 1468
+> 7 0 7 1471
+> 7 0 7 1474
+> 7 0 7 1477
+> 7 0 7 1372
+> 7 0 7 1480
+> 7 0 7 1483
+> 7 0 7 1486
+> 7 0 7 1489
+> 7 0 7 1492
+> 7 0 7 1495
+> 7 0 7 1498
+> 7 0 7 1501
+> 7 0 7 1504
+> 7 0 7 1507
+> 7 0 7 1375
+> 7 0 7 1510
+> 7 0 7 1513
+> 7 0 7 1516
+> 7 0 7 1519
+> 7 0 7 1522
+> 7 0 7 1525
+> 7 0 7 1528
+> 7 0 7 1531
+> 7 0 7 1534
+> 7 0 7 1537
+> 7 0 7 1378
+> 7 0 7 1540
+> 7 0 7 1543
+> 7 0 7 1546
+> 7 0 7 1549
+> 7 0 7 1552
+> 7 0 7 1555
+> 7 0 7 1558
+> 7 0 7 1561
+> 7 0 7 1564
+> 7 0 7 1567
+> 7 0 7 1381
+> 7 0 7 1570
+> 7 0 7 1573
+> 7 0 7 1576
+> 7 0 7 1579
+> 7 0 7 1582
+> 7 0 7 1585
+> 7 0 7 1588
+> 7 0 7 1591
+> 7 0 7 1594
+> 7 0 7 1597
+> 7 0 7 1384
+> 7 0 7 1387
+> 7 0 12 1600
+> 7 0 6 1362
+> 7 0 12 1604
+> 7 0 6 1603
+> 7 0 3 1361
+> 7 0 3 1605
+> 7 0 3 1602
+> 7 0 1 1189
+> 7 0 16 1727
+> 7 0 16 1638
+> 7 0 16 1637
+> 7 0 16 1641
+> 7 0 16 1640
+> 7 0 16 1644
+> 7 0 16 1643
+> 7 0 16 1647
+> 7 0 16 1646
+> 7 0 16 1650
+> 7 0 16 1649
+> 7 0 16 1653
+> 7 0 16 1652
+> 7 0 16 1656
+> 7 0 16 1655
+> 7 0 16 1659
+> 7 0 16 1658
+> 7 0 16 1662
+> 7 0 16 1661
+> 7 0 16 1665
+> 7 0 16 1664
+> 7 0 16 1611
+> 7 0 16 1610
+> 7 0 16 1668
+> 7 0 16 1667
+> 7 0 16 1671
+> 7 0 16 1670
+> 7 0 16 1674
+> 7 0 16 1673
+> 7 0 16 1677
+> 7 0 16 1676
+> 7 0 16 1680
+> 7 0 16 1679
+> 7 0 16 1683
+> 7 0 16 1682
+> 7 0 16 1686
+> 7 0 16 1685
+> 7 0 16 1689
+> 7 0 16 1688
+> 7 0 16 1692
+> 7 0 16 1691
+> 7 0 16 1695
+> 7 0 16 1694
+> 7 0 16 1614
+> 7 0 16 1613
+> 7 0 16 1698
+> 7 0 16 1697
+> 7 0 16 1701
+> 7 0 16 1700
+> 7 0 16 1704
+> 7 0 16 1703
+> 7 0 16 1707
+> 7 0 16 1706
+> 7 0 16 1710
+> 7 0 16 1709
+> 7 0 16 1713
+> 7 0 16 1712
+> 7 0 16 1716
+> 7 0 16 1715
+> 7 0 16 1719
+> 7 0 16 1718
+> 7 0 16 1722
+> 7 0 16 1721
+> 7 0 16 1725
+> 7 0 16 1724
+> 7 0 16 1617
+> 7 0 16 1616
+> 7 0 16 1620
+> 7 0 16 1619
+> 7 0 16 1623
+> 7 0 16 1622
+> 7 0 16 1626
+> 7 0 16 1625
+> 7 0 16 1629
+> 7 0 16 1628
+> 7 0 16 1632
+> 7 0 16 1631
+> 7 0 16 1635
+> 7 0 16 1634
+> 7 0 14 1609
+> 7 0 14 1636
+> 7 0 14 1639
+> 7 0 14 1642
+> 7 0 14 1645
+> 7 0 14 1648
+> 7 0 14 1651
+> 7 0 14 1654
+> 7 0 14 1657
+> 7 0 14 1660
+> 7 0 14 1663
+> 7 0 14 1612
+> 7 0 14 1666
+> 7 0 14 1669
+> 7 0 14 1672
+> 7 0 14 1675
+> 7 0 14 1678
+> 7 0 14 1681
+> 7 0 14 1684
+> 7 0 14 1687
+> 7 0 14 1690
+> 7 0 14 1693
+> 7 0 14 1615
+> 7 0 14 1696
+> 7 0 14 1699
+> 7 0 14 1702
+> 7 0 14 1705
+> 7 0 14 1708
+> 7 0 14 1711
+> 7 0 14 1714
+> 7 0 14 1717
+> 7 0 14 1720
+> 7 0 14 1723
+> 7 0 14 1618
+> 7 0 14 1621
+> 7 0 14 1624
+> 7 0 14 1627
+> 7 0 14 1630
+> 7 0 14 1633
+> 7 0 19 1726
+> 7 0 13 1608
+> 7 0 16 1835
+> 7 0 16 1731
+> 7 0 16 1730
+> 7 0 16 1734
+> 7 0 16 1733
+> 7 0 16 1737
+> 7 0 16 1736
+> 7 0 16 1740
+> 7 0 16 1739
+> 7 0 16 1743
+> 7 0 16 1742
+> 7 0 16 1746
+> 7 0 16 1745
+> 7 0 16 1749
+> 7 0 16 1748
+> 7 0 16 1752
+> 7 0 16 1751
+> 7 0 16 1755
+> 7 0 16 1754
+> 7 0 16 1758
+> 7 0 16 1757
+> 7 0 16 1761
+> 7 0 16 1760
+> 7 0 16 1764
+> 7 0 16 1763
+> 7 0 16 1767
+> 7 0 16 1766
+> 7 0 16 1770
+> 7 0 16 1769
+> 7 0 16 1773
+> 7 0 16 1772
+> 7 0 16 1776
+> 7 0 16 1775
+> 7 0 16 1779
+> 7 0 16 1778
+> 7 0 16 1782
+> 7 0 16 1781
+> 7 0 16 1785
+> 7 0 16 1784
+> 7 0 16 1788
+> 7 0 16 1787
+> 7 0 16 1791
+> 7 0 16 1790
+> 7 0 16 1794
+> 7 0 16 1793
+> 7 0 16 1797
+> 7 0 16 1796
+> 7 0 16 1800
+> 7 0 16 1799
+> 7 0 16 1803
+> 7 0 16 1802
+> 7 0 16 1806
+> 7 0 16 1805
+> 7 0 16 1809
+> 7 0 16 1808
+> 7 0 16 1812
+> 7 0 16 1811
+> 7 0 16 1815
+> 7 0 16 1814
+> 7 0 16 1818
+> 7 0 16 1817
+> 7 0 16 1821
+> 7 0 16 1820
+> 7 0 16 1824
+> 7 0 16 1823
+> 7 0 16 1827
+> 7 0 16 1826
+> 7 0 16 1830
+> 7 0 16 1829
+> 7 0 16 1833
+> 7 0 16 1832
+> 7 0 14 1729
+> 7 0 14 1732
+> 7 0 14 1735
+> 7 0 14 1738
+> 7 0 14 1741
+> 7 0 14 1744
+> 7 0 14 1747
+> 7 0 14 1750
+> 7 0 14 1753
+> 7 0 14 1756
+> 7 0 14 1759
+> 7 0 14 1762
+> 7 0 14 1765
+> 7 0 14 1768
+> 7 0 14 1771
+> 7 0 14 1774
+> 7 0 14 1777
+> 7 0 14 1780
+> 7 0 14 1783
+> 7 0 14 1786
+> 7 0 14 1789
+> 7 0 14 1792
+> 7 0 14 1795
+> 7 0 14 1798
+> 7 0 14 1801
+> 7 0 14 1804
+> 7 0 14 1807
+> 7 0 14 1810
+> 7 0 14 1813
+> 7 0 14 1816
+> 7 0 14 1819
+> 7 0 14 1822
+> 7 0 14 1825
+> 7 0 14 1828
+> 7 0 14 1831
+> 7 0 19 1834
+> 7 0 13 1728
+> 7 0 16 1928
+> 7 0 16 1914
+> 7 0 16 1913
+> 7 0 16 1917
+> 7 0 16 1916
+> 7 0 16 1920
+> 7 0 16 1919
+> 7 0 16 1923
+> 7 0 16 1922
+> 7 0 16 1926
+> 7 0 16 1925
+> 7 0 16 1839
+> 7 0 16 1838
+> 7 0 16 1842
+> 7 0 16 1841
+> 7 0 16 1845
+> 7 0 16 1844
+> 7 0 16 1848
+> 7 0 16 1847
+> 7 0 16 1851
+> 7 0 16 1850
+> 7 0 16 1854
+> 7 0 16 1853
+> 7 0 16 1857
+> 7 0 16 1856
+> 7 0 16 1860
+> 7 0 16 1859
+> 7 0 16 1863
+> 7 0 16 1862
+> 7 0 16 1866
+> 7 0 16 1865
+> 7 0 16 1869
+> 7 0 16 1868
+> 7 0 16 1872
+> 7 0 16 1871
+> 7 0 16 1875
+> 7 0 16 1874
+> 7 0 16 1878
+> 7 0 16 1877
+> 7 0 16 1881
+> 7 0 16 1880
+> 7 0 16 1884
+> 7 0 16 1883
+> 7 0 16 1887
+> 7 0 16 1886
+> 7 0 16 1890
+> 7 0 16 1889
+> 7 0 16 1893
+> 7 0 16 1892
+> 7 0 16 1896
+> 7 0 16 1895
+> 7 0 16 1899
+> 7 0 16 1898
+> 7 0 16 1902
+> 7 0 16 1901
+> 7 0 16 1905
+> 7 0 16 1904
+> 7 0 16 1908
+> 7 0 16 1907
+> 7 0 16 1911
+> 7 0 16 1910
+> 7 0 14 1912
+> 7 0 14 1915
+> 7 0 14 1918
+> 7 0 14 1921
+> 7 0 14 1924
+> 7 0 14 1837
+> 7 0 14 1840
+> 7 0 14 1843
+> 7 0 14 1846
+> 7 0 14 1849
+> 7 0 14 1852
+> 7 0 14 1855
+> 7 0 14 1858
+> 7 0 14 1861
+> 7 0 14 1864
+> 7 0 14 1867
+> 7 0 14 1870
+> 7 0 14 1873
+> 7 0 14 1876
+> 7 0 14 1879
+> 7 0 14 1882
+> 7 0 14 1885
+> 7 0 14 1888
+> 7 0 14 1891
+> 7 0 14 1894
+> 7 0 14 1897
+> 7 0 14 1900
+> 7 0 14 1903
+> 7 0 14 1906
+> 7 0 14 1909
+> 7 0 19 1927
+> 7 0 13 1836
+> 7 0 16 2051
+> 7 0 16 1932
+> 7 0 16 1931
+> 7 0 16 1935
+> 7 0 16 1934
+> 7 0 16 1938
+> 7 0 16 1937
+> 7 0 16 1941
+> 7 0 16 1940
+> 7 0 16 1944
+> 7 0 16 1943
+> 7 0 16 1947
+> 7 0 16 1946
+> 7 0 16 1950
+> 7 0 16 1949
+> 7 0 16 1953
+> 7 0 16 1952
+> 7 0 16 1956
+> 7 0 16 1955
+> 7 0 16 1959
+> 7 0 16 1958
+> 7 0 16 1962
+> 7 0 16 1961
+> 7 0 16 1965
+> 7 0 16 1964
+> 7 0 16 1968
+> 7 0 16 1967
+> 7 0 16 1971
+> 7 0 16 1970
+> 7 0 16 1974
+> 7 0 16 1973
+> 7 0 16 1977
+> 7 0 16 1976
+> 7 0 16 1980
+> 7 0 16 1979
+> 7 0 16 1983
+> 7 0 16 1982
+> 7 0 16 1986
+> 7 0 16 1985
+> 7 0 16 1989
+> 7 0 16 1988
+> 7 0 16 1992
+> 7 0 16 1991
+> 7 0 16 1995
+> 7 0 16 1994
+> 7 0 16 1998
+> 7 0 16 1997
+> 7 0 16 2001
+> 7 0 16 2000
+> 7 0 16 2004
+> 7 0 16 2003
+> 7 0 16 2007
+> 7 0 16 2006
+> 7 0 16 2010
+> 7 0 16 2009
+> 7 0 16 2013
+> 7 0 16 2012
+> 7 0 16 2016
+> 7 0 16 2015
+> 7 0 16 2019
+> 7 0 16 2018
+> 7 0 16 2022
+> 7 0 16 2021
+> 7 0 16 2025
+> 7 0 16 2024
+> 7 0 16 2028
+> 7 0 16 2027
+> 7 0 16 2031
+> 7 0 16 2030
+> 7 0 16 2034
+> 7 0 16 2033
+> 7 0 16 2037
+> 7 0 16 2036
+> 7 0 16 2040
+> 7 0 16 2039
+> 7 0 16 2043
+> 7 0 16 2042
+> 7 0 16 2046
+> 7 0 16 2045
+> 7 0 16 2049
+> 7 0 16 2048
+> 7 0 14 1930
+> 7 0 14 1933
+> 7 0 14 1936
+> 7 0 14 1939
+> 7 0 14 1942
+> 7 0 14 1945
+> 7 0 14 1948
+> 7 0 14 1951
+> 7 0 14 1954
+> 7 0 14 1957
+> 7 0 14 1960
+> 7 0 14 1963
+> 7 0 14 1966
+> 7 0 14 1969
+> 7 0 14 1972
+> 7 0 14 1975
+> 7 0 14 1978
+> 7 0 14 1981
+> 7 0 14 1984
+> 7 0 14 1987
+> 7 0 14 1990
+> 7 0 14 1993
+> 7 0 14 1996
+> 7 0 14 1999
+> 7 0 14 2002
+> 7 0 14 2005
+> 7 0 14 2008
+> 7 0 14 2011
+> 7 0 14 2014
+> 7 0 14 2017
+> 7 0 14 2020
+> 7 0 14 2023
+> 7 0 14 2026
+> 7 0 14 2029
+> 7 0 14 2032
+> 7 0 14 2035
+> 7 0 14 2038
+> 7 0 14 2041
+> 7 0 14 2044
+> 7 0 14 2047
+> 7 0 19 2050
+> 7 0 13 1929
+> 7 0 19 2053
+> 7 0 13 2052
+> 7 0 9 2054
+> 7 0 6 1607
+> 7 0 16 2155
+> 7 0 16 2087
+> 7 0 16 2086
+> 7 0 16 2090
+> 7 0 16 2089
+> 7 0 16 2093
+> 7 0 16 2092
+> 7 0 16 2096
+> 7 0 16 2095
+> 7 0 16 2099
+> 7 0 16 2098
+> 7 0 16 2102
+> 7 0 16 2101
+> 7 0 16 2105
+> 7 0 16 2104
+> 7 0 16 2108
+> 7 0 16 2107
+> 7 0 16 2111
+> 7 0 16 2110
+> 7 0 16 2114
+> 7 0 16 2113
+> 7 0 16 2060
+> 7 0 16 2059
+> 7 0 16 2117
+> 7 0 16 2116
+> 7 0 16 2120
+> 7 0 16 2119
+> 7 0 16 2123
+> 7 0 16 2122
+> 7 0 16 2126
+> 7 0 16 2125
+> 7 0 16 2129
+> 7 0 16 2128
+> 7 0 16 2132
+> 7 0 16 2131
+> 7 0 16 2135
+> 7 0 16 2134
+> 7 0 16 2138
+> 7 0 16 2137
+> 7 0 16 2141
+> 7 0 16 2140
+> 7 0 16 2144
+> 7 0 16 2143
+> 7 0 16 2063
+> 7 0 16 2062
+> 7 0 16 2066
+> 7 0 16 2065
+> 7 0 16 2069
+> 7 0 16 2068
+> 7 0 16 2147
+> 7 0 16 2146
+> 7 0 16 2150
+> 7 0 16 2149
+> 7 0 16 2072
+> 7 0 16 2071
+> 7 0 16 2153
+> 7 0 16 2152
+> 7 0 16 2075
+> 7 0 16 2074
+> 7 0 16 2078
+> 7 0 16 2077
+> 7 0 16 2081
+> 7 0 16 2080
+> 7 0 16 2084
+> 7 0 16 2083
+> 7 0 14 2058
+> 7 0 14 2085
+> 7 0 14 2088
+> 7 0 14 2091
+> 7 0 14 2094
+> 7 0 14 2097
+> 7 0 14 2100
+> 7 0 14 2103
+> 7 0 14 2106
+> 7 0 14 2109
+> 7 0 14 2112
+> 7 0 14 2061
+> 7 0 14 2115
+> 7 0 14 2118
+> 7 0 14 2121
+> 7 0 14 2124
+> 7 0 14 2127
+> 7 0 14 2130
+> 7 0 14 2133
+> 7 0 14 2136
+> 7 0 14 2139
+> 7 0 14 2142
+> 7 0 14 2064
+> 7 0 14 2067
+> 7 0 14 2070
+> 7 0 14 2145
+> 7 0 14 2148
+> 7 0 14 2073
+> 7 0 14 2151
+> 7 0 14 2076
+> 7 0 14 2079
+> 7 0 14 2082
+> 7 0 19 2154
+> 7 0 13 2057
+> 7 0 16 2242
+> 7 0 16 2159
+> 7 0 16 2158
+> 7 0 16 2162
+> 7 0 16 2161
+> 7 0 16 2165
+> 7 0 16 2164
+> 7 0 16 2168
+> 7 0 16 2167
+> 7 0 16 2171
+> 7 0 16 2170
+> 7 0 16 2174
+> 7 0 16 2173
+> 7 0 16 2177
+> 7 0 16 2176
+> 7 0 16 2180
+> 7 0 16 2179
+> 7 0 16 2183
+> 7 0 16 2182
+> 7 0 16 2186
+> 7 0 16 2185
+> 7 0 16 2189
+> 7 0 16 2188
+> 7 0 16 2192
+> 7 0 16 2191
+> 7 0 16 2195
+> 7 0 16 2194
+> 7 0 16 2198
+> 7 0 16 2197
+> 7 0 16 2201
+> 7 0 16 2200
+> 7 0 16 2204
+> 7 0 16 2203
+> 7 0 16 2207
+> 7 0 16 2206
+> 7 0 16 2210
+> 7 0 16 2209
+> 7 0 16 2213
+> 7 0 16 2212
+> 7 0 16 2216
+> 7 0 16 2215
+> 7 0 16 2219
+> 7 0 16 2218
+> 7 0 16 2222
+> 7 0 16 2221
+> 7 0 16 2225
+> 7 0 16 2224
+> 7 0 16 2228
+> 7 0 16 2227
+> 7 0 16 2231
+> 7 0 16 2230
+> 7 0 16 2234
+> 7 0 16 2233
+> 7 0 16 2237
+> 7 0 16 2236
+> 7 0 16 2240
+> 7 0 16 2239
+> 7 0 14 2157
+> 7 0 14 2160
+> 7 0 14 2163
+> 7 0 14 2166
+> 7 0 14 2169
+> 7 0 14 2172
+> 7 0 14 2175
+> 7 0 14 2178
+> 7 0 14 2181
+> 7 0 14 2184
+> 7 0 14 2187
+> 7 0 14 2190
+> 7 0 14 2193
+> 7 0 14 2196
+> 7 0 14 2199
+> 7 0 14 2202
+> 7 0 14 2205
+> 7 0 14 2208
+> 7 0 14 2211
+> 7 0 14 2214
+> 7 0 14 2217
+> 7 0 14 2220
+> 7 0 14 2223
+> 7 0 14 2226
+> 7 0 14 2229
+> 7 0 14 2232
+> 7 0 14 2235
+> 7 0 14 2238
+> 7 0 19 2241
+> 7 0 13 2156
+> 7 0 16 2341
+> 7 0 16 2246
+> 7 0 16 2245
+> 7 0 16 2249
+> 7 0 16 2248
+> 7 0 16 2252
+> 7 0 16 2251
+> 7 0 16 2255
+> 7 0 16 2254
+> 7 0 16 2258
+> 7 0 16 2257
+> 7 0 16 2261
+> 7 0 16 2260
+> 7 0 16 2264
+> 7 0 16 2263
+> 7 0 16 2267
+> 7 0 16 2266
+> 7 0 16 2270
+> 7 0 16 2269
+> 7 0 16 2273
+> 7 0 16 2272
+> 7 0 16 2276
+> 7 0 16 2275
+> 7 0 16 2279
+> 7 0 16 2278
+> 7 0 16 2282
+> 7 0 16 2281
+> 7 0 16 2285
+> 7 0 16 2284
+> 7 0 16 2288
+> 7 0 16 2287
+> 7 0 16 2291
+> 7 0 16 2290
+> 7 0 16 2294
+> 7 0 16 2293
+> 7 0 16 2297
+> 7 0 16 2296
+> 7 0 16 2300
+> 7 0 16 2299
+> 7 0 16 2303
+> 7 0 16 2302
+> 7 0 16 2306
+> 7 0 16 2305
+> 7 0 16 2309
+> 7 0 16 2308
+> 7 0 16 2312
+> 7 0 16 2311
+> 7 0 16 2315
+> 7 0 16 2314
+> 7 0 16 2318
+> 7 0 16 2317
+> 7 0 16 2321
+> 7 0 16 2320
+> 7 0 16 2324
+> 7 0 16 2323
+> 7 0 16 2327
+> 7 0 16 2326
+> 7 0 16 2330
+> 7 0 16 2329
+> 7 0 16 2333
+> 7 0 16 2332
+> 7 0 16 2336
+> 7 0 16 2335
+> 7 0 16 2339
+> 7 0 16 2338
+> 7 0 14 2244
+> 7 0 14 2247
+> 7 0 14 2250
+> 7 0 14 2253
+> 7 0 14 2256
+> 7 0 14 2259
+> 7 0 14 2262
+> 7 0 14 2265
+> 7 0 14 2268
+> 7 0 14 2271
+> 7 0 14 2274
+> 7 0 14 2277
+> 7 0 14 2280
+> 7 0 14 2283
+> 7 0 14 2286
+> 7 0 14 2289
+> 7 0 14 2292
+> 7 0 14 2295
+> 7 0 14 2298
+> 7 0 14 2301
+> 7 0 14 2304
+> 7 0 14 2307
+> 7 0 14 2310
+> 7 0 14 2313
+> 7 0 14 2316
+> 7 0 14 2319
+> 7 0 14 2322
+> 7 0 14 2325
+> 7 0 14 2328
+> 7 0 14 2331
+> 7 0 14 2334
+> 7 0 14 2337
+> 7 0 19 2340
+> 7 0 13 2243
+> 7 0 19 2343
+> 7 0 13 2342
+> 7 0 9 2344
+> 7 0 6 2056
+> 7 0 12 2347
+> 7 0 6 2346
+> 7 0 3 2055
+> 7 0 3 2345
+> 7 0 3 2348
+> 7 0 1 1606
+> 7 0 16 2461
+> 7 0 16 2381
+> 7 0 16 2380
+> 7 0 16 2384
+> 7 0 16 2383
+> 7 0 16 2387
+> 7 0 16 2386
+> 7 0 16 2390
+> 7 0 16 2389
+> 7 0 16 2393
+> 7 0 16 2392
+> 7 0 16 2396
+> 7 0 16 2395
+> 7 0 16 2399
+> 7 0 16 2398
+> 7 0 16 2402
+> 7 0 16 2401
+> 7 0 16 2405
+> 7 0 16 2404
+> 7 0 16 2408
+> 7 0 16 2407
+> 7 0 16 2354
+> 7 0 16 2353
+> 7 0 16 2411
+> 7 0 16 2410
+> 7 0 16 2414
+> 7 0 16 2413
+> 7 0 16 2417
+> 7 0 16 2416
+> 7 0 16 2420
+> 7 0 16 2419
+> 7 0 16 2423
+> 7 0 16 2422
+> 7 0 16 2426
+> 7 0 16 2425
+> 7 0 16 2429
+> 7 0 16 2428
+> 7 0 16 2432
+> 7 0 16 2431
+> 7 0 16 2435
+> 7 0 16 2434
+> 7 0 16 2438
+> 7 0 16 2437
+> 7 0 16 2357
+> 7 0 16 2356
+> 7 0 16 2441
+> 7 0 16 2440
+> 7 0 16 2444
+> 7 0 16 2443
+> 7 0 16 2447
+> 7 0 16 2446
+> 7 0 16 2450
+> 7 0 16 2449
+> 7 0 16 2453
+> 7 0 16 2452
+> 7 0 16 2456
+> 7 0 16 2455
+> 7 0 16 2459
+> 7 0 16 2458
+> 7 0 16 2360
+> 7 0 16 2359
+> 7 0 16 2363
+> 7 0 16 2362
+> 7 0 16 2366
+> 7 0 16 2365
+> 7 0 16 2369
+> 7 0 16 2368
+> 7 0 16 2372
+> 7 0 16 2371
+> 7 0 16 2375
+> 7 0 16 2374
+> 7 0 16 2378
+> 7 0 16 2377
+> 7 0 14 2352
+> 7 0 14 2379
+> 7 0 14 2382
+> 7 0 14 2385
+> 7 0 14 2388
+> 7 0 14 2391
+> 7 0 14 2394
+> 7 0 14 2397
+> 7 0 14 2400
+> 7 0 14 2403
+> 7 0 14 2406
+> 7 0 14 2355
+> 7 0 14 2409
+> 7 0 14 2412
+> 7 0 14 2415
+> 7 0 14 2418
+> 7 0 14 2421
+> 7 0 14 2424
+> 7 0 14 2427
+> 7 0 14 2430
+> 7 0 14 2433
+> 7 0 14 2436
+> 7 0 14 2358
+> 7 0 14 2439
+> 7 0 14 2442
+> 7 0 14 2445
+> 7 0 14 2448
+> 7 0 14 2451
+> 7 0 14 2454
+> 7 0 14 2457
+> 7 0 14 2361
+> 7 0 14 2364
+> 7 0 14 2367
+> 7 0 14 2370
+> 7 0 14 2373
+> 7 0 14 2376
+> 7 0 19 2460
+> 7 0 13 2351
+> 7 0 16 2572
+> 7 0 16 2465
+> 7 0 16 2464
+> 7 0 16 2468
+> 7 0 16 2467
+> 7 0 16 2471
+> 7 0 16 2470
+> 7 0 16 2474
+> 7 0 16 2473
+> 7 0 16 2477
+> 7 0 16 2476
+> 7 0 16 2480
+> 7 0 16 2479
+> 7 0 16 2483
+> 7 0 16 2482
+> 7 0 16 2486
+> 7 0 16 2485
+> 7 0 16 2489
+> 7 0 16 2488
+> 7 0 16 2492
+> 7 0 16 2491
+> 7 0 16 2495
+> 7 0 16 2494
+> 7 0 16 2498
+> 7 0 16 2497
+> 7 0 16 2501
+> 7 0 16 2500
+> 7 0 16 2504
+> 7 0 16 2503
+> 7 0 16 2507
+> 7 0 16 2506
+> 7 0 16 2510
+> 7 0 16 2509
+> 7 0 16 2513
+> 7 0 16 2512
+> 7 0 16 2516
+> 7 0 16 2515
+> 7 0 16 2519
+> 7 0 16 2518
+> 7 0 16 2522
+> 7 0 16 2521
+> 7 0 16 2525
+> 7 0 16 2524
+> 7 0 16 2528
+> 7 0 16 2527
+> 7 0 16 2531
+> 7 0 16 2530
+> 7 0 16 2534
+> 7 0 16 2533
+> 7 0 16 2537
+> 7 0 16 2536
+> 7 0 16 2540
+> 7 0 16 2539
+> 7 0 16 2543
+> 7 0 16 2542
+> 7 0 16 2546
+> 7 0 16 2545
+> 7 0 16 2549
+> 7 0 16 2548
+> 7 0 16 2552
+> 7 0 16 2551
+> 7 0 16 2555
+> 7 0 16 2554
+> 7 0 16 2558
+> 7 0 16 2557
+> 7 0 16 2561
+> 7 0 16 2560
+> 7 0 16 2564
+> 7 0 16 2563
+> 7 0 16 2567
+> 7 0 16 2566
+> 7 0 16 2570
+> 7 0 16 2569
+> 7 0 14 2463
+> 7 0 14 2466
+> 7 0 14 2469
+> 7 0 14 2472
+> 7 0 14 2475
+> 7 0 14 2478
+> 7 0 14 2481
+> 7 0 14 2484
+> 7 0 14 2487
+> 7 0 14 2490
+> 7 0 14 2493
+> 7 0 14 2496
+> 7 0 14 2499
+> 7 0 14 2502
+> 7 0 14 2505
+> 7 0 14 2508
+> 7 0 14 2511
+> 7 0 14 2514
+> 7 0 14 2517
+> 7 0 14 2520
+> 7 0 14 2523
+> 7 0 14 2526
+> 7 0 14 2529
+> 7 0 14 2532
+> 7 0 14 2535
+> 7 0 14 2538
+> 7 0 14 2541
+> 7 0 14 2544
+> 7 0 14 2547
+> 7 0 14 2550
+> 7 0 14 2553
+> 7 0 14 2556
+> 7 0 14 2559
+> 7 0 14 2562
+> 7 0 14 2565
+> 7 0 14 2568
+> 7 0 19 2571
+> 7 0 13 2462
+> 7 0 16 2683
+> 7 0 16 2657
+> 7 0 16 2656
+> 7 0 16 2660
+> 7 0 16 2659
+> 7 0 16 2663
+> 7 0 16 2662
+> 7 0 16 2666
+> 7 0 16 2665
+> 7 0 16 2669
+> 7 0 16 2668
+> 7 0 16 2672
+> 7 0 16 2671
+> 7 0 16 2675
+> 7 0 16 2674
+> 7 0 16 2678
+> 7 0 16 2677
+> 7 0 16 2681
+> 7 0 16 2680
+> 7 0 16 2576
+> 7 0 16 2575
+> 7 0 16 2579
+> 7 0 16 2578
+> 7 0 16 2582
+> 7 0 16 2581
+> 7 0 16 2585
+> 7 0 16 2584
+> 7 0 16 2588
+> 7 0 16 2587
+> 7 0 16 2591
+> 7 0 16 2590
+> 7 0 16 2594
+> 7 0 16 2593
+> 7 0 16 2597
+> 7 0 16 2596
+> 7 0 16 2600
+> 7 0 16 2599
+> 7 0 16 2603
+> 7 0 16 2602
+> 7 0 16 2606
+> 7 0 16 2605
+> 7 0 16 2609
+> 7 0 16 2608
+> 7 0 16 2612
+> 7 0 16 2611
+> 7 0 16 2615
+> 7 0 16 2614
+> 7 0 16 2618
+> 7 0 16 2617
+> 7 0 16 2621
+> 7 0 16 2620
+> 7 0 16 2624
+> 7 0 16 2623
+> 7 0 16 2627
+> 7 0 16 2626
+> 7 0 16 2630
+> 7 0 16 2629
+> 7 0 16 2633
+> 7 0 16 2632
+> 7 0 16 2636
+> 7 0 16 2635
+> 7 0 16 2639
+> 7 0 16 2638
+> 7 0 16 2642
+> 7 0 16 2641
+> 7 0 16 2645
+> 7 0 16 2644
+> 7 0 16 2648
+> 7 0 16 2647
+> 7 0 16 2651
+> 7 0 16 2650
+> 7 0 16 2654
+> 7 0 16 2653
+> 7 0 14 2655
+> 7 0 14 2658
+> 7 0 14 2661
+> 7 0 14 2664
+> 7 0 14 2667
+> 7 0 14 2670
+> 7 0 14 2673
+> 7 0 14 2676
+> 7 0 14 2679
+> 7 0 14 2574
+> 7 0 14 2577
+> 7 0 14 2580
+> 7 0 14 2583
+> 7 0 14 2586
+> 7 0 14 2589
+> 7 0 14 2592
+> 7 0 14 2595
+> 7 0 14 2598
+> 7 0 14 2601
+> 7 0 14 2604
+> 7 0 14 2607
+> 7 0 14 2610
+> 7 0 14 2613
+> 7 0 14 2616
+> 7 0 14 2619
+> 7 0 14 2622
+> 7 0 14 2625
+> 7 0 14 2628
+> 7 0 14 2631
+> 7 0 14 2634
+> 7 0 14 2637
+> 7 0 14 2640
+> 7 0 14 2643
+> 7 0 14 2646
+> 7 0 14 2649
+> 7 0 14 2652
+> 7 0 19 2682
+> 7 0 13 2573
+> 7 0 16 2794
+> 7 0 16 2687
+> 7 0 16 2686
+> 7 0 16 2690
+> 7 0 16 2689
+> 7 0 16 2693
+> 7 0 16 2692
+> 7 0 16 2696
+> 7 0 16 2695
+> 7 0 16 2699
+> 7 0 16 2698
+> 7 0 16 2702
+> 7 0 16 2701
+> 7 0 16 2705
+> 7 0 16 2704
+> 7 0 16 2708
+> 7 0 16 2707
+> 7 0 16 2711
+> 7 0 16 2710
+> 7 0 16 2714
+> 7 0 16 2713
+> 7 0 16 2717
+> 7 0 16 2716
+> 7 0 16 2720
+> 7 0 16 2719
+> 7 0 16 2723
+> 7 0 16 2722
+> 7 0 16 2726
+> 7 0 16 2725
+> 7 0 16 2729
+> 7 0 16 2728
+> 7 0 16 2732
+> 7 0 16 2731
+> 7 0 16 2735
+> 7 0 16 2734
+> 7 0 16 2738
+> 7 0 16 2737
+> 7 0 16 2741
+> 7 0 16 2740
+> 7 0 16 2744
+> 7 0 16 2743
+> 7 0 16 2747
+> 7 0 16 2746
+> 7 0 16 2750
+> 7 0 16 2749
+> 7 0 16 2753
+> 7 0 16 2752
+> 7 0 16 2756
+> 7 0 16 2755
+> 7 0 16 2759
+> 7 0 16 2758
+> 7 0 16 2762
+> 7 0 16 2761
+> 7 0 16 2765
+> 7 0 16 2764
+> 7 0 16 2768
+> 7 0 16 2767
+> 7 0 16 2771
+> 7 0 16 2770
+> 7 0 16 2774
+> 7 0 16 2773
+> 7 0 16 2777
+> 7 0 16 2776
+> 7 0 16 2780
+> 7 0 16 2779
+> 7 0 16 2783
+> 7 0 16 2782
+> 7 0 16 2786
+> 7 0 16 2785
+> 7 0 16 2789
+> 7 0 16 2788
+> 7 0 16 2792
+> 7 0 16 2791
+> 7 0 14 2685
+> 7 0 14 2688
+> 7 0 14 2691
+> 7 0 14 2694
+> 7 0 14 2697
+> 7 0 14 2700
+> 7 0 14 2703
+> 7 0 14 2706
+> 7 0 14 2709
+> 7 0 14 2712
+> 7 0 14 2715
+> 7 0 14 2718
+> 7 0 14 2721
+> 7 0 14 2724
+> 7 0 14 2727
+> 7 0 14 2730
+> 7 0 14 2733
+> 7 0 14 2736
+> 7 0 14 2739
+> 7 0 14 2742
+> 7 0 14 2745
+> 7 0 14 2748
+> 7 0 14 2751
+> 7 0 14 2754
+> 7 0 14 2757
+> 7 0 14 2760
+> 7 0 14 2763
+> 7 0 14 2766
+> 7 0 14 2769
+> 7 0 14 2772
+> 7 0 14 2775
+> 7 0 14 2778
+> 7 0 14 2781
+> 7 0 14 2784
+> 7 0 14 2787
+> 7 0 14 2790
+> 7 0 19 2793
+> 7 0 13 2684
+> 7 0 16 2905
+> 7 0 16 2798
+> 7 0 16 2797
+> 7 0 16 2801
+> 7 0 16 2800
+> 7 0 16 2804
+> 7 0 16 2803
+> 7 0 16 2807
+> 7 0 16 2806
+> 7 0 16 2810
+> 7 0 16 2809
+> 7 0 16 2813
+> 7 0 16 2812
+> 7 0 16 2816
+> 7 0 16 2815
+> 7 0 16 2819
+> 7 0 16 2818
+> 7 0 16 2822
+> 7 0 16 2821
+> 7 0 16 2825
+> 7 0 16 2824
+> 7 0 16 2828
+> 7 0 16 2827
+> 7 0 16 2831
+> 7 0 16 2830
+> 7 0 16 2834
+> 7 0 16 2833
+> 7 0 16 2837
+> 7 0 16 2836
+> 7 0 16 2840
+> 7 0 16 2839
+> 7 0 16 2843
+> 7 0 16 2842
+> 7 0 16 2846
+> 7 0 16 2845
+> 7 0 16 2849
+> 7 0 16 2848
+> 7 0 16 2852
+> 7 0 16 2851
+> 7 0 16 2855
+> 7 0 16 2854
+> 7 0 16 2858
+> 7 0 16 2857
+> 7 0 16 2861
+> 7 0 16 2860
+> 7 0 16 2864
+> 7 0 16 2863
+> 7 0 16 2867
+> 7 0 16 2866
+> 7 0 16 2870
+> 7 0 16 2869
+> 7 0 16 2873
+> 7 0 16 2872
+> 7 0 16 2876
+> 7 0 16 2875
+> 7 0 16 2879
+> 7 0 16 2878
+> 7 0 16 2882
+> 7 0 16 2881
+> 7 0 16 2885
+> 7 0 16 2884
+> 7 0 16 2888
+> 7 0 16 2887
+> 7 0 16 2891
+> 7 0 16 2890
+> 7 0 16 2894
+> 7 0 16 2893
+> 7 0 16 2897
+> 7 0 16 2896
+> 7 0 16 2900
+> 7 0 16 2899
+> 7 0 16 2903
+> 7 0 16 2902
+> 7 0 14 2796
+> 7 0 14 2799
+> 7 0 14 2802
+> 7 0 14 2805
+> 7 0 14 2808
+> 7 0 14 2811
+> 7 0 14 2814
+> 7 0 14 2817
+> 7 0 14 2820
+> 7 0 14 2823
+> 7 0 14 2826
+> 7 0 14 2829
+> 7 0 14 2832
+> 7 0 14 2835
+> 7 0 14 2838
+> 7 0 14 2841
+> 7 0 14 2844
+> 7 0 14 2847
+> 7 0 14 2850
+> 7 0 14 2853
+> 7 0 14 2856
+> 7 0 14 2859
+> 7 0 14 2862
+> 7 0 14 2865
+> 7 0 14 2868
+> 7 0 14 2871
+> 7 0 14 2874
+> 7 0 14 2877
+> 7 0 14 2880
+> 7 0 14 2883
+> 7 0 14 2886
+> 7 0 14 2889
+> 7 0 14 2892
+> 7 0 14 2895
+> 7 0 14 2898
+> 7 0 14 2901
+> 7 0 19 2904
+> 7 0 13 2795
+> 7 0 16 2980
+> 7 0 16 2909
+> 7 0 16 2908
+> 7 0 16 2912
+> 7 0 16 2911
+> 7 0 16 2915
+> 7 0 16 2914
+> 7 0 16 2918
+> 7 0 16 2917
+> 7 0 16 2921
+> 7 0 16 2920
+> 7 0 16 2924
+> 7 0 16 2923
+> 7 0 16 2927
+> 7 0 16 2926
+> 7 0 16 2930
+> 7 0 16 2929
+> 7 0 16 2933
+> 7 0 16 2932
+> 7 0 16 2936
+> 7 0 16 2935
+> 7 0 16 2939
+> 7 0 16 2938
+> 7 0 16 2942
+> 7 0 16 2941
+> 7 0 16 2945
+> 7 0 16 2944
+> 7 0 16 2948
+> 7 0 16 2947
+> 7 0 16 2951
+> 7 0 16 2950
+> 7 0 16 2954
+> 7 0 16 2953
+> 7 0 16 2957
+> 7 0 16 2956
+> 7 0 16 2960
+> 7 0 16 2959
+> 7 0 16 2963
+> 7 0 16 2962
+> 7 0 16 2966
+> 7 0 16 2965
+> 7 0 16 2969
+> 7 0 16 2968
+> 7 0 16 2972
+> 7 0 16 2971
+> 7 0 16 2975
+> 7 0 16 2974
+> 7 0 16 2978
+> 7 0 16 2977
+> 7 0 14 2907
+> 7 0 14 2910
+> 7 0 14 2913
+> 7 0 14 2916
+> 7 0 14 2919
+> 7 0 14 2922
+> 7 0 14 2925
+> 7 0 14 2928
+> 7 0 14 2931
+> 7 0 14 2934
+> 7 0 14 2937
+> 7 0 14 2940
+> 7 0 14 2943
+> 7 0 14 2946
+> 7 0 14 2949
+> 7 0 14 2952
+> 7 0 14 2955
+> 7 0 14 2958
+> 7 0 14 2961
+> 7 0 14 2964
+> 7 0 14 2967
+> 7 0 14 2970
+> 7 0 14 2973
+> 7 0 14 2976
+> 7 0 19 2979
+> 7 0 13 2906
+> 7 0 16 3091
+> 7 0 16 2984
+> 7 0 16 2983
+> 7 0 16 2987
+> 7 0 16 2986
+> 7 0 16 2990
+> 7 0 16 2989
+> 7 0 16 2993
+> 7 0 16 2992
+> 7 0 16 2996
+> 7 0 16 2995
+> 7 0 16 2999
+> 7 0 16 2998
+> 7 0 16 3002
+> 7 0 16 3001
+> 7 0 16 3005
+> 7 0 16 3004
+> 7 0 16 3008
+> 7 0 16 3007
+> 7 0 16 3011
+> 7 0 16 3010
+> 7 0 16 3014
+> 7 0 16 3013
+> 7 0 16 3017
+> 7 0 16 3016
+> 7 0 16 3020
+> 7 0 16 3019
+> 7 0 16 3023
+> 7 0 16 3022
+> 7 0 16 3026
+> 7 0 16 3025
+> 7 0 16 3029
+> 7 0 16 3028
+> 7 0 16 3032
+> 7 0 16 3031
+> 7 0 16 3035
+> 7 0 16 3034
+> 7 0 16 3038
+> 7 0 16 3037
+> 7 0 16 3041
+> 7 0 16 3040
+> 7 0 16 3044
+> 7 0 16 3043
+> 7 0 16 3047
+> 7 0 16 3046
+> 7 0 16 3050
+> 7 0 16 3049
+> 7 0 16 3053
+> 7 0 16 3052
+> 7 0 16 3056
+> 7 0 16 3055
+> 7 0 16 3059
+> 7 0 16 3058
+> 7 0 16 3062
+> 7 0 16 3061
+> 7 0 16 3065
+> 7 0 16 3064
+> 7 0 16 3068
+> 7 0 16 3067
+> 7 0 16 3071
+> 7 0 16 3070
+> 7 0 16 3074
+> 7 0 16 3073
+> 7 0 16 3077
+> 7 0 16 3076
+> 7 0 16 3080
+> 7 0 16 3079
+> 7 0 16 3083
+> 7 0 16 3082
+> 7 0 16 3086
+> 7 0 16 3085
+> 7 0 16 3089
+> 7 0 16 3088
+> 7 0 14 2982
+> 7 0 14 2985
+> 7 0 14 2988
+> 7 0 14 2991
+> 7 0 14 2994
+> 7 0 14 2997
+> 7 0 14 3000
+> 7 0 14 3003
+> 7 0 14 3006
+> 7 0 14 3009
+> 7 0 14 3012
+> 7 0 14 3015
+> 7 0 14 3018
+> 7 0 14 3021
+> 7 0 14 3024
+> 7 0 14 3027
+> 7 0 14 3030
+> 7 0 14 3033
+> 7 0 14 3036
+> 7 0 14 3039
+> 7 0 14 3042
+> 7 0 14 3045
+> 7 0 14 3048
+> 7 0 14 3051
+> 7 0 14 3054
+> 7 0 14 3057
+> 7 0 14 3060
+> 7 0 14 3063
+> 7 0 14 3066
+> 7 0 14 3069
+> 7 0 14 3072
+> 7 0 14 3075
+> 7 0 14 3078
+> 7 0 14 3081
+> 7 0 14 3084
+> 7 0 14 3087
+> 7 0 19 3090
+> 7 0 13 2981
+> 7 0 16 3202
+> 7 0 16 3095
+> 7 0 16 3094
+> 7 0 16 3098
+> 7 0 16 3097
+> 7 0 16 3101
+> 7 0 16 3100
+> 7 0 16 3104
+> 7 0 16 3103
+> 7 0 16 3107
+> 7 0 16 3106
+> 7 0 16 3110
+> 7 0 16 3109
+> 7 0 16 3113
+> 7 0 16 3112
+> 7 0 16 3116
+> 7 0 16 3115
+> 7 0 16 3119
+> 7 0 16 3118
+> 7 0 16 3122
+> 7 0 16 3121
+> 7 0 16 3125
+> 7 0 16 3124
+> 7 0 16 3128
+> 7 0 16 3127
+> 7 0 16 3131
+> 7 0 16 3130
+> 7 0 16 3134
+> 7 0 16 3133
+> 7 0 16 3137
+> 7 0 16 3136
+> 7 0 16 3140
+> 7 0 16 3139
+> 7 0 16 3143
+> 7 0 16 3142
+> 7 0 16 3146
+> 7 0 16 3145
+> 7 0 16 3149
+> 7 0 16 3148
+> 7 0 16 3152
+> 7 0 16 3151
+> 7 0 16 3155
+> 7 0 16 3154
+> 7 0 16 3158
+> 7 0 16 3157
+> 7 0 16 3161
+> 7 0 16 3160
+> 7 0 16 3164
+> 7 0 16 3163
+> 7 0 16 3167
+> 7 0 16 3166
+> 7 0 16 3170
+> 7 0 16 3169
+> 7 0 16 3173
+> 7 0 16 3172
+> 7 0 16 3176
+> 7 0 16 3175
+> 7 0 16 3179
+> 7 0 16 3178
+> 7 0 16 3182
+> 7 0 16 3181
+> 7 0 16 3185
+> 7 0 16 3184
+> 7 0 16 3188
+> 7 0 16 3187
+> 7 0 16 3191
+> 7 0 16 3190
+> 7 0 16 3194
+> 7 0 16 3193
+> 7 0 16 3197
+> 7 0 16 3196
+> 7 0 16 3200
+> 7 0 16 3199
+> 7 0 14 3093
+> 7 0 14 3096
+> 7 0 14 3099
+> 7 0 14 3102
+> 7 0 14 3105
+> 7 0 14 3108
+> 7 0 14 3111
+> 7 0 14 3114
+> 7 0 14 3117
+> 7 0 14 3120
+> 7 0 14 3123
+> 7 0 14 3126
+> 7 0 14 3129
+> 7 0 14 3132
+> 7 0 14 3135
+> 7 0 14 3138
+> 7 0 14 3141
+> 7 0 14 3144
+> 7 0 14 3147
+> 7 0 14 3150
+> 7 0 14 3153
+> 7 0 14 3156
+> 7 0 14 3159
+> 7 0 14 3162
+> 7 0 14 3165
+> 7 0 14 3168
+> 7 0 14 3171
+> 7 0 14 3174
+> 7 0 14 3177
+> 7 0 14 3180
+> 7 0 14 3183
+> 7 0 14 3186
+> 7 0 14 3189
+> 7 0 14 3192
+> 7 0 14 3195
+> 7 0 14 3198
+> 7 0 19 3201
+> 7 0 13 3092
+> 7 0 16 3271
+> 7 0 16 3206
+> 7 0 16 3205
+> 7 0 16 3209
+> 7 0 16 3208
+> 7 0 16 3212
+> 7 0 16 3211
+> 7 0 16 3215
+> 7 0 16 3214
+> 7 0 16 3218
+> 7 0 16 3217
+> 7 0 16 3221
+> 7 0 16 3220
+> 7 0 16 3224
+> 7 0 16 3223
+> 7 0 16 3227
+> 7 0 16 3226
+> 7 0 16 3230
+> 7 0 16 3229
+> 7 0 16 3233
+> 7 0 16 3232
+> 7 0 16 3236
+> 7 0 16 3235
+> 7 0 16 3239
+> 7 0 16 3238
+> 7 0 16 3242
+> 7 0 16 3241
+> 7 0 16 3245
+> 7 0 16 3244
+> 7 0 16 3248
+> 7 0 16 3247
+> 7 0 16 3251
+> 7 0 16 3250
+> 7 0 16 3254
+> 7 0 16 3253
+> 7 0 16 3257
+> 7 0 16 3256
+> 7 0 16 3260
+> 7 0 16 3259
+> 7 0 16 3263
+> 7 0 16 3262
+> 7 0 16 3266
+> 7 0 16 3265
+> 7 0 16 3269
+> 7 0 16 3268
+> 7 0 14 3204
+> 7 0 14 3207
+> 7 0 14 3210
+> 7 0 14 3213
+> 7 0 14 3216
+> 7 0 14 3219
+> 7 0 14 3222
+> 7 0 14 3225
+> 7 0 14 3228
+> 7 0 14 3231
+> 7 0 14 3234
+> 7 0 14 3237
+> 7 0 14 3240
+> 7 0 14 3243
+> 7 0 14 3246
+> 7 0 14 3249
+> 7 0 14 3252
+> 7 0 14 3255
+> 7 0 14 3258
+> 7 0 14 3261
+> 7 0 14 3264
+> 7 0 14 3267
+> 7 0 19 3270
+> 7 0 13 3203
+> 7 0 16 3292
+> 7 0 16 3275
+> 7 0 16 3274
+> 7 0 16 3278
+> 7 0 16 3277
+> 7 0 16 3281
+> 7 0 16 3280
+> 7 0 16 3284
+> 7 0 16 3283
+> 7 0 16 3287
+> 7 0 16 3286
+> 7 0 16 3290
+> 7 0 16 3289
+> 7 0 14 3273
+> 7 0 14 3276
+> 7 0 14 3279
+> 7 0 14 3282
+> 7 0 14 3285
+> 7 0 14 3288
+> 7 0 19 3291
+> 7 0 13 3272
+> 7 0 16 3313
+> 7 0 16 3296
+> 7 0 16 3295
+> 7 0 16 3299
+> 7 0 16 3298
+> 7 0 16 3302
+> 7 0 16 3301
+> 7 0 16 3305
+> 7 0 16 3304
+> 7 0 16 3308
+> 7 0 16 3307
+> 7 0 16 3311
+> 7 0 16 3310
+> 7 0 14 3294
+> 7 0 14 3297
+> 7 0 14 3300
+> 7 0 14 3303
+> 7 0 14 3306
+> 7 0 14 3309
+> 7 0 19 3312
+> 7 0 13 3293
+> 7 0 19 3315
+> 7 0 13 3314
+> 7 0 9 3316
+> 7 0 6 2350
+> 7 0 9 3410
+> 7 0 9 3348
+> 7 0 9 3347
+> 7 0 9 3351
+> 7 0 9 3350
+> 7 0 9 3354
+> 7 0 9 3353
+> 7 0 9 3357
+> 7 0 9 3356
+> 7 0 9 3360
+> 7 0 9 3359
+> 7 0 9 3363
+> 7 0 9 3362
+> 7 0 9 3366
+> 7 0 9 3365
+> 7 0 9 3369
+> 7 0 9 3368
+> 7 0 9 3372
+> 7 0 9 3371
+> 7 0 9 3375
+> 7 0 9 3374
+> 7 0 9 3321
+> 7 0 9 3320
+> 7 0 9 3378
+> 7 0 9 3377
+> 7 0 9 3381
+> 7 0 9 3380
+> 7 0 9 3384
+> 7 0 9 3383
+> 7 0 9 3387
+> 7 0 9 3386
+> 7 0 9 3390
+> 7 0 9 3389
+> 7 0 9 3393
+> 7 0 9 3392
+> 7 0 9 3396
+> 7 0 9 3395
+> 7 0 9 3399
+> 7 0 9 3398
+> 7 0 9 3402
+> 7 0 9 3401
+> 7 0 9 3405
+> 7 0 9 3404
+> 7 0 9 3324
+> 7 0 9 3323
+> 7 0 9 3408
+> 7 0 9 3407
+> 7 0 9 3327
+> 7 0 9 3326
+> 7 0 9 3330
+> 7 0 9 3329
+> 7 0 9 3333
+> 7 0 9 3332
+> 7 0 9 3336
+> 7 0 9 3335
+> 7 0 9 3339
+> 7 0 9 3338
+> 7 0 9 3342
+> 7 0 9 3341
+> 7 0 9 3345
+> 7 0 9 3344
+> 7 0 7 3319
+> 7 0 7 3346
+> 7 0 7 3349
+> 7 0 7 3352
+> 7 0 7 3355
+> 7 0 7 3358
+> 7 0 7 3361
+> 7 0 7 3364
+> 7 0 7 3367
+> 7 0 7 3370
+> 7 0 7 3373
+> 7 0 7 3322
+> 7 0 7 3376
+> 7 0 7 3379
+> 7 0 7 3382
+> 7 0 7 3385
+> 7 0 7 3388
+> 7 0 7 3391
+> 7 0 7 3394
+> 7 0 7 3397
+> 7 0 7 3400
+> 7 0 7 3403
+> 7 0 7 3325
+> 7 0 7 3406
+> 7 0 7 3328
+> 7 0 7 3331
+> 7 0 7 3334
+> 7 0 7 3337
+> 7 0 7 3340
+> 7 0 7 3343
+> 7 0 12 3409
+> 7 0 6 3318
+> 7 0 12 3413
+> 7 0 6 3412
+> 7 0 3 3317
+> 7 0 3 3414
+> 7 0 3 3411
+> 7 0 1 2349
+> 7 0 9 3610
+> 7 0 9 3446
+> 7 0 9 3445
+> 7 0 9 3449
+> 7 0 9 3448
+> 7 0 9 3452
+> 7 0 9 3451
+> 7 0 9 3455
+> 7 0 9 3454
+> 7 0 9 3458
+> 7 0 9 3457
+> 7 0 9 3461
+> 7 0 9 3460
+> 7 0 9 3464
+> 7 0 9 3463
+> 7 0 9 3467
+> 7 0 9 3466
+> 7 0 9 3470
+> 7 0 9 3469
+> 7 0 9 3473
+> 7 0 9 3472
+> 7 0 9 3419
+> 7 0 9 3418
+> 7 0 9 3476
+> 7 0 9 3475
+> 7 0 9 3479
+> 7 0 9 3478
+> 7 0 9 3482
+> 7 0 9 3481
+> 7 0 9 3485
+> 7 0 9 3484
+> 7 0 9 3488
+> 7 0 9 3487
+> 7 0 9 3491
+> 7 0 9 3490
+> 7 0 9 3494
+> 7 0 9 3493
+> 7 0 9 3497
+> 7 0 9 3496
+> 7 0 9 3500
+> 7 0 9 3499
+> 7 0 9 3503
+> 7 0 9 3502
+> 7 0 9 3422
+> 7 0 9 3421
+> 7 0 9 3506
+> 7 0 9 3505
+> 7 0 9 3509
+> 7 0 9 3508
+> 7 0 9 3512
+> 7 0 9 3511
+> 7 0 9 3515
+> 7 0 9 3514
+> 7 0 9 3518
+> 7 0 9 3517
+> 7 0 9 3521
+> 7 0 9 3520
+> 7 0 9 3524
+> 7 0 9 3523
+> 7 0 9 3527
+> 7 0 9 3526
+> 7 0 9 3530
+> 7 0 9 3529
+> 7 0 9 3533
+> 7 0 9 3532
+> 7 0 9 3425
+> 7 0 9 3424
+> 7 0 9 3536
+> 7 0 9 3535
+> 7 0 9 3539
+> 7 0 9 3538
+> 7 0 9 3542
+> 7 0 9 3541
+> 7 0 9 3545
+> 7 0 9 3544
+> 7 0 9 3548
+> 7 0 9 3547
+> 7 0 9 3551
+> 7 0 9 3550
+> 7 0 9 3554
+> 7 0 9 3553
+> 7 0 9 3557
+> 7 0 9 3556
+> 7 0 9 3560
+> 7 0 9 3559
+> 7 0 9 3563
+> 7 0 9 3562
+> 7 0 9 3428
+> 7 0 9 3427
+> 7 0 9 3566
+> 7 0 9 3565
+> 7 0 9 3569
+> 7 0 9 3568
+> 7 0 9 3572
+> 7 0 9 3571
+> 7 0 9 3575
+> 7 0 9 3574
+> 7 0 9 3578
+> 7 0 9 3577
+> 7 0 9 3581
+> 7 0 9 3580
+> 7 0 9 3584
+> 7 0 9 3583
+> 7 0 9 3587
+> 7 0 9 3586
+> 7 0 9 3590
+> 7 0 9 3589
+> 7 0 9 3593
+> 7 0 9 3592
+> 7 0 9 3431
+> 7 0 9 3430
+> 7 0 9 3596
+> 7 0 9 3595
+> 7 0 9 3599
+> 7 0 9 3598
+> 7 0 9 3602
+> 7 0 9 3601
+> 7 0 9 3605
+> 7 0 9 3604
+> 7 0 9 3608
+> 7 0 9 3607
+> 7 0 9 3434
+> 7 0 9 3433
+> 7 0 9 3437
+> 7 0 9 3436
+> 7 0 9 3440
+> 7 0 9 3439
+> 7 0 9 3443
+> 7 0 9 3442
+> 7 0 7 3417
+> 7 0 7 3444
+> 7 0 7 3447
+> 7 0 7 3450
+> 7 0 7 3453
+> 7 0 7 3456
+> 7 0 7 3459
+> 7 0 7 3462
+> 7 0 7 3465
+> 7 0 7 3468
+> 7 0 7 3471
+> 7 0 7 3420
+> 7 0 7 3474
+> 7 0 7 3477
+> 7 0 7 3480
+> 7 0 7 3483
+> 7 0 7 3486
+> 7 0 7 3489
+> 7 0 7 3492
+> 7 0 7 3495
+> 7 0 7 3498
+> 7 0 7 3501
+> 7 0 7 3423
+> 7 0 7 3504
+> 7 0 7 3507
+> 7 0 7 3510
+> 7 0 7 3513
+> 7 0 7 3516
+> 7 0 7 3519
+> 7 0 7 3522
+> 7 0 7 3525
+> 7 0 7 3528
+> 7 0 7 3531
+> 7 0 7 3426
+> 7 0 7 3534
+> 7 0 7 3537
+> 7 0 7 3540
+> 7 0 7 3543
+> 7 0 7 3546
+> 7 0 7 3549
+> 7 0 7 3552
+> 7 0 7 3555
+> 7 0 7 3558
+> 7 0 7 3561
+> 7 0 7 3429
+> 7 0 7 3564
+> 7 0 7 3567
+> 7 0 7 3570
+> 7 0 7 3573
+> 7 0 7 3576
+> 7 0 7 3579
+> 7 0 7 3582
+> 7 0 7 3585
+> 7 0 7 3588
+> 7 0 7 3591
+> 7 0 7 3432
+> 7 0 7 3594
+> 7 0 7 3597
+> 7 0 7 3600
+> 7 0 7 3603
+> 7 0 7 3606
+> 7 0 7 3435
+> 7 0 7 3438
+> 7 0 7 3441
+> 7 0 12 3609
+> 7 0 6 3416
+> 7 0 9 3713
+> 7 0 9 3642
+> 7 0 9 3641
+> 7 0 9 3645
+> 7 0 9 3644
+> 7 0 9 3648
+> 7 0 9 3647
+> 7 0 9 3651
+> 7 0 9 3650
+> 7 0 9 3654
+> 7 0 9 3653
+> 7 0 9 3657
+> 7 0 9 3656
+> 7 0 9 3660
+> 7 0 9 3659
+> 7 0 9 3663
+> 7 0 9 3662
+> 7 0 9 3666
+> 7 0 9 3665
+> 7 0 9 3669
+> 7 0 9 3668
+> 7 0 9 3615
+> 7 0 9 3614
+> 7 0 9 3672
+> 7 0 9 3671
+> 7 0 9 3675
+> 7 0 9 3674
+> 7 0 9 3678
+> 7 0 9 3677
+> 7 0 9 3681
+> 7 0 9 3680
+> 7 0 9 3684
+> 7 0 9 3683
+> 7 0 9 3687
+> 7 0 9 3686
+> 7 0 9 3690
+> 7 0 9 3689
+> 7 0 9 3693
+> 7 0 9 3692
+> 7 0 9 3696
+> 7 0 9 3695
+> 7 0 9 3699
+> 7 0 9 3698
+> 7 0 9 3618
+> 7 0 9 3617
+> 7 0 9 3702
+> 7 0 9 3701
+> 7 0 9 3705
+> 7 0 9 3704
+> 7 0 9 3708
+> 7 0 9 3707
+> 7 0 9 3711
+> 7 0 9 3710
+> 7 0 9 3621
+> 7 0 9 3620
+> 7 0 9 3624
+> 7 0 9 3623
+> 7 0 9 3627
+> 7 0 9 3626
+> 7 0 9 3630
+> 7 0 9 3629
+> 7 0 9 3633
+> 7 0 9 3632
+> 7 0 9 3636
+> 7 0 9 3635
+> 7 0 9 3639
+> 7 0 9 3638
+> 7 0 7 3613
+> 7 0 7 3640
+> 7 0 7 3643
+> 7 0 7 3646
+> 7 0 7 3649
+> 7 0 7 3652
+> 7 0 7 3655
+> 7 0 7 3658
+> 7 0 7 3661
+> 7 0 7 3664
+> 7 0 7 3667
+> 7 0 7 3616
+> 7 0 7 3670
+> 7 0 7 3673
+> 7 0 7 3676
+> 7 0 7 3679
+> 7 0 7 3682
+> 7 0 7 3685
+> 7 0 7 3688
+> 7 0 7 3691
+> 7 0 7 3694
+> 7 0 7 3697
+> 7 0 7 3619
+> 7 0 7 3700
+> 7 0 7 3703
+> 7 0 7 3706
+> 7 0 7 3709
+> 7 0 7 3622
+> 7 0 7 3625
+> 7 0 7 3628
+> 7 0 7 3631
+> 7 0 7 3634
+> 7 0 7 3637
+> 7 0 12 3712
+> 7 0 6 3612
+> 7 0 9 3792
+> 7 0 9 3745
+> 7 0 9 3744
+> 7 0 9 3748
+> 7 0 9 3747
+> 7 0 9 3751
+> 7 0 9 3750
+> 7 0 9 3754
+> 7 0 9 3753
+> 7 0 9 3757
+> 7 0 9 3756
+> 7 0 9 3760
+> 7 0 9 3759
+> 7 0 9 3763
+> 7 0 9 3762
+> 7 0 9 3766
+> 7 0 9 3765
+> 7 0 9 3769
+> 7 0 9 3768
+> 7 0 9 3772
+> 7 0 9 3771
+> 7 0 9 3718
+> 7 0 9 3717
+> 7 0 9 3775
+> 7 0 9 3774
+> 7 0 9 3778
+> 7 0 9 3777
+> 7 0 9 3781
+> 7 0 9 3780
+> 7 0 9 3784
+> 7 0 9 3783
+> 7 0 9 3787
+> 7 0 9 3786
+> 7 0 9 3790
+> 7 0 9 3789
+> 7 0 9 3721
+> 7 0 9 3720
+> 7 0 9 3724
+> 7 0 9 3723
+> 7 0 9 3727
+> 7 0 9 3726
+> 7 0 9 3730
+> 7 0 9 3729
+> 7 0 9 3733
+> 7 0 9 3732
+> 7 0 9 3736
+> 7 0 9 3735
+> 7 0 9 3739
+> 7 0 9 3738
+> 7 0 9 3742
+> 7 0 9 3741
+> 7 0 7 3716
+> 7 0 7 3743
+> 7 0 7 3746
+> 7 0 7 3749
+> 7 0 7 3752
+> 7 0 7 3755
+> 7 0 7 3758
+> 7 0 7 3761
+> 7 0 7 3764
+> 7 0 7 3767
+> 7 0 7 3770
+> 7 0 7 3719
+> 7 0 7 3773
+> 7 0 7 3776
+> 7 0 7 3779
+> 7 0 7 3782
+> 7 0 7 3785
+> 7 0 7 3788
+> 7 0 7 3722
+> 7 0 7 3725
+> 7 0 7 3728
+> 7 0 7 3731
+> 7 0 7 3734
+> 7 0 7 3737
+> 7 0 7 3740
+> 7 0 12 3791
+> 7 0 6 3715
+> 7 0 9 3916
+> 7 0 9 3824
+> 7 0 9 3823
+> 7 0 9 3827
+> 7 0 9 3826
+> 7 0 9 3830
+> 7 0 9 3829
+> 7 0 9 3833
+> 7 0 9 3832
+> 7 0 9 3836
+> 7 0 9 3835
+> 7 0 9 3839
+> 7 0 9 3838
+> 7 0 9 3842
+> 7 0 9 3841
+> 7 0 9 3845
+> 7 0 9 3844
+> 7 0 9 3848
+> 7 0 9 3847
+> 7 0 9 3851
+> 7 0 9 3850
+> 7 0 9 3797
+> 7 0 9 3796
+> 7 0 9 3854
+> 7 0 9 3853
+> 7 0 9 3857
+> 7 0 9 3856
+> 7 0 9 3860
+> 7 0 9 3859
+> 7 0 9 3863
+> 7 0 9 3862
+> 7 0 9 3866
+> 7 0 9 3865
+> 7 0 9 3869
+> 7 0 9 3868
+> 7 0 9 3872
+> 7 0 9 3871
+> 7 0 9 3875
+> 7 0 9 3874
+> 7 0 9 3878
+> 7 0 9 3877
+> 7 0 9 3881
+> 7 0 9 3880
+> 7 0 9 3800
+> 7 0 9 3799
+> 7 0 9 3884
+> 7 0 9 3883
+> 7 0 9 3887
+> 7 0 9 3886
+> 7 0 9 3890
+> 7 0 9 3889
+> 7 0 9 3893
+> 7 0 9 3892
+> 7 0 9 3896
+> 7 0 9 3895
+> 7 0 9 3899
+> 7 0 9 3898
+> 7 0 9 3902
+> 7 0 9 3901
+> 7 0 9 3905
+> 7 0 9 3904
+> 7 0 9 3908
+> 7 0 9 3907
+> 7 0 9 3911
+> 7 0 9 3910
+> 7 0 9 3803
+> 7 0 9 3802
+> 7 0 9 3914
+> 7 0 9 3913
+> 7 0 9 3806
+> 7 0 9 3805
+> 7 0 9 3809
+> 7 0 9 3808
+> 7 0 9 3812
+> 7 0 9 3811
+> 7 0 9 3815
+> 7 0 9 3814
+> 7 0 9 3818
+> 7 0 9 3817
+> 7 0 9 3821
+> 7 0 9 3820
+> 7 0 7 3795
+> 7 0 7 3822
+> 7 0 7 3825
+> 7 0 7 3828
+> 7 0 7 3831
+> 7 0 7 3834
+> 7 0 7 3837
+> 7 0 7 3840
+> 7 0 7 3843
+> 7 0 7 3846
+> 7 0 7 3849
+> 7 0 7 3798
+> 7 0 7 3852
+> 7 0 7 3855
+> 7 0 7 3858
+> 7 0 7 3861
+> 7 0 7 3864
+> 7 0 7 3867
+> 7 0 7 3870
+> 7 0 7 3873
+> 7 0 7 3876
+> 7 0 7 3879
+> 7 0 7 3801
+> 7 0 7 3882
+> 7 0 7 3885
+> 7 0 7 3888
+> 7 0 7 3891
+> 7 0 7 3894
+> 7 0 7 3897
+> 7 0 7 3900
+> 7 0 7 3903
+> 7 0 7 3906
+> 7 0 7 3909
+> 7 0 7 3804
+> 7 0 7 3912
+> 7 0 7 3807
+> 7 0 7 3810
+> 7 0 7 3813
+> 7 0 7 3816
+> 7 0 7 3819
+> 7 0 12 3915
+> 7 0 6 3794
+> 7 0 12 3919
+> 7 0 6 3918
+> 7 0 3 3920
+> 7 0 3 3611
+> 7 0 3 3714
+> 7 0 3 3793
+> 7 0 3 3917
+> 7 0 1 3415
+> 7 0 9 4092
+> 7 0 9 3952
+> 7 0 9 3951
+> 7 0 9 3955
+> 7 0 9 3954
+> 7 0 9 3958
+> 7 0 9 3957
+> 7 0 9 3961
+> 7 0 9 3960
> 7 0 9 3964
-> 7 0 9 4048
-> 7 0 9 4000
-> 7 0 9 4084
-> 7 0 9 4036
-> 7 0 7 3989
-> 7 0 7 4049
-> 7 0 7 3971
-> 7 0 9 3990
-> 7 0 7 4031
-> 7 0 9 3934
-> 7 0 9 4050
+> 7 0 9 3963
+> 7 0 9 3967
+> 7 0 9 3966
+> 7 0 9 3970
+> 7 0 9 3969
+> 7 0 9 3973
> 7 0 9 3972
-> 7 0 9 4032
-> 7 0 7 3929
-> 7 0 9 3924
-> 7 0 9 3955
-> 7 0 9 3991
-> 7 0 9 3948
-> 7 0 9 4075
-> 7 0 9 4027
+> 7 0 9 3976
+> 7 0 9 3975
> 7 0 9 3979
-> 7 0 7 3956
-> 7 0 9 4063
-> 7 0 7 4016
-> 7 0 7 4076
-> 7 0 9 3957
-> 7 0 7 3998
+> 7 0 9 3978
> 7 0 9 3925
-> 7 0 9 4017
-> 7 0 7 4058
-> 7 0 9 4077
-> 7 0 9 3999
-> 7 0 9 4059
-> 7 0 9 3949
-> 7 0 7 3938
-> 7 0 9 3933
+> 7 0 9 3924
> 7 0 9 3982
-> 7 0 9 4018
-> 7 0 9 3970
-> 7 0 9 4054
-> 7 0 9 4006
-> 7 0 7 3983
-> 7 0 9 4090
-> 7 0 7 4043
-> 7 0 7 3965
+> 7 0 9 3981
+> 7 0 9 3985
> 7 0 9 3984
-> 7 0 7 4025
-> 7 0 9 4092
-> 7 0 9 4044
-> 7 0 7 4085
-> 7 0 9 3966
-> 7 0 7 4007
-> 7 0 9 4026
-> 7 0 7 4067
-> 7 0 9 3940
-> 7 0 9 4086
-> 7 0 9 4008
-> 7 0 7 3923
-> 7 0 9 4068
-> 7 0 7 3947
-> 7 0 9 3942
-> 7 0 9 3961
-> 7 0 9 4045
+> 7 0 9 3988
+> 7 0 9 3987
+> 7 0 9 3991
+> 7 0 9 3990
+> 7 0 9 3994
+> 7 0 9 3993
> 7 0 9 3997
-> 7 0 9 4081
-> 7 0 7 3950
-> 7 0 9 4033
-> 7 0 7 4010
-> 7 0 9 4069
-> 7 0 7 4070
-> 7 0 9 3951
-> 7 0 7 3992
+> 7 0 9 3996
+> 7 0 9 4000
+> 7 0 9 3999
+> 7 0 9 4003
+> 7 0 9 4002
+> 7 0 9 4006
+> 7 0 9 4005
+> 7 0 9 4009
+> 7 0 9 4008
+> 7 0 9 3928
+> 7 0 9 3927
+> 7 0 9 4012
> 7 0 9 4011
-> 7 0 7 4052
-> 7 0 7 3974
-> 7 0 9 4071
+> 7 0 9 4015
+> 7 0 9 4014
+> 7 0 9 4018
+> 7 0 9 4017
+> 7 0 9 4021
+> 7 0 9 4020
+> 7 0 9 4024
+> 7 0 9 4023
+> 7 0 9 4027
+> 7 0 9 4026
+> 7 0 9 4030
+> 7 0 9 4029
+> 7 0 9 4033
+> 7 0 9 4032
+> 7 0 9 4036
+> 7 0 9 4035
+> 7 0 9 4039
+> 7 0 9 4038
> 7 0 9 3931
-> 7 0 9 3993
-> 7 0 7 4034
+> 7 0 9 3930
+> 7 0 9 4042
+> 7 0 9 4041
+> 7 0 9 4045
+> 7 0 9 4044
+> 7 0 9 4048
+> 7 0 9 4047
+> 7 0 9 4051
+> 7 0 9 4050
+> 7 0 9 4054
> 7 0 9 4053
-> 7 0 9 3975
-> 7 0 9 4035
-> 7 0 7 3932
-> 7 0 9 3927
-> 7 0 9 3952
-> 7 0 9 3988
-> 7 0 9 4072
-> 7 0 9 4024
-> 7 0 9 3976
+> 7 0 9 4057
+> 7 0 9 4056
> 7 0 9 4060
-> 7 0 7 3959
-> 7 0 7 4019
-> 7 0 7 4079
-> 7 0 7 4001
-> 7 0 9 3960
-> 7 0 7 4061
-> 7 0 9 4020
-> 7 0 9 4080
-> 7 0 9 4002
+> 7 0 9 4059
+> 7 0 9 4063
> 7 0 9 4062
-> 7 0 9 3946
-> 7 0 7 3941
-> 7 0 9 3936
-> 7 0 9 4015
-> 7 0 9 3967
-> 7 0 9 4051
-> 7 0 9 4003
+> 7 0 9 4066
+> 7 0 9 4065
+> 7 0 9 4069
+> 7 0 9 4068
+> 7 0 9 3934
+> 7 0 9 3933
+> 7 0 9 4072
+> 7 0 9 4071
+> 7 0 9 4075
+> 7 0 9 4074
+> 7 0 9 4078
+> 7 0 9 4077
+> 7 0 9 4081
+> 7 0 9 4080
+> 7 0 9 4084
+> 7 0 9 4083
> 7 0 9 4087
-> 7 0 9 4039
-> 7 0 7 3986
-> 7 0 7 4046
-> 7 0 7 3968
-> 7 0 7 4028
-> 7 0 9 3987
-> 7 0 9 4047
-> 7 0 7 4088
-> 7 0 9 3969
-> 7 0 9 3937
-> 7 0 9 4029
+> 7 0 9 4086
+> 7 0 9 4090
> 7 0 9 4089
-> 7 0 7 3926
-> 7 0 12 4091
-> 7 0 9 3958
-> 7 0 9 4042
+> 7 0 9 3937
+> 7 0 9 3936
+> 7 0 9 3940
+> 7 0 9 3939
+> 7 0 9 3943
+> 7 0 9 3942
+> 7 0 9 3946
> 7 0 9 3945
-> 7 0 9 3994
-> 7 0 9 4078
-> 7 0 9 4030
+> 7 0 9 3949
+> 7 0 9 3948
+> 7 0 7 3923
+> 7 0 7 3950
> 7 0 7 3953
+> 7 0 7 3956
+> 7 0 7 3959
+> 7 0 7 3962
+> 7 0 7 3965
+> 7 0 7 3968
+> 7 0 7 3971
+> 7 0 7 3974
+> 7 0 7 3977
+> 7 0 7 3926
+> 7 0 7 3980
+> 7 0 7 3983
+> 7 0 7 3986
+> 7 0 7 3989
+> 7 0 7 3992
+> 7 0 7 3995
+> 7 0 7 3998
+> 7 0 7 4001
+> 7 0 7 4004
+> 7 0 7 4007
+> 7 0 7 3929
+> 7 0 7 4010
> 7 0 7 4013
-> 7 0 9 4066
-> 7 0 7 4073
-> 7 0 7 3995
-> 7 0 9 3954
-> 7 0 7 4055
-> 7 0 9 4014
-> 7 0 7 3977
-> 7 0 9 3928
-> 7 0 9 4074
+> 7 0 7 4016
+> 7 0 7 4019
+> 7 0 7 4022
+> 7 0 7 4025
+> 7 0 7 4028
+> 7 0 7 4031
+> 7 0 7 4034
> 7 0 7 4037
-> 7 0 9 3996
-> 7 0 9 4056
-> 7 0 9 3978
-> 7 0 9 4038
-> 7 0 7 3935
-> 7 0 9 3930
-> 7 0 9 3985
-> 7 0 9 4021
-> 7 0 9 3973
-> 7 0 9 4057
-> 7 0 7 3980
-> 7 0 9 4009
+> 7 0 7 3932
> 7 0 7 4040
-> 7 0 7 3962
-> 7 0 7 4022
-> 7 0 9 3981
-> 7 0 9 4041
-> 7 0 7 4082
-> 7 0 7 4004
-> 7 0 9 3963
+> 7 0 7 4043
+> 7 0 7 4046
+> 7 0 7 4049
+> 7 0 7 4052
+> 7 0 7 4055
+> 7 0 7 4058
+> 7 0 7 4061
> 7 0 7 4064
-> 7 0 9 4023
-> 7 0 9 4083
-> 7 0 9 4005
-> 7 0 9 3943
-> 7 0 9 4065
+> 7 0 7 4067
+> 7 0 7 3935
+> 7 0 7 4070
+> 7 0 7 4073
+> 7 0 7 4076
+> 7 0 7 4079
+> 7 0 7 4082
+> 7 0 7 4085
+> 7 0 7 4088
+> 7 0 7 3938
+> 7 0 7 3941
> 7 0 7 3944
+> 7 0 7 3947
+> 7 0 12 4091
> 7 0 6 3922
-> 7 0 3 4247
-> 7 0 3 4389
-> 7 0 3 4386
-> 7 0 12 4388
-> 7 0 6 4387
-> 7 0 7 4273
-> 7 0 9 4281
-> 7 0 9 4265
-> 7 0 9 4341
-> 7 0 9 4317
-> 7 0 9 4293
-> 7 0 9 4377
-> 7 0 9 4353
-> 7 0 9 4329
-> 7 0 7 4279
-> 7 0 9 4305
-> 7 0 7 4309
-> 7 0 7 4339
-> 7 0 9 4365
-> 7 0 7 4369
-> 7 0 9 4277
-> 7 0 7 4291
-> 7 0 9 4307
-> 7 0 7 4321
-> 7 0 9 4337
-> 7 0 7 4351
-> 7 0 9 4367
-> 7 0 7 4381
-> 7 0 9 4254
-> 7 0 9 4289
-> 7 0 7 4303
-> 7 0 9 4319
-> 7 0 7 4333
-> 7 0 9 4349
-> 7 0 7 4363
-> 7 0 9 4379
-> 7 0 9 4266
-> 7 0 9 4301
-> 7 0 9 4331
-> 7 0 9 4361
-> 7 0 7 4258
-> 7 0 9 4250
-> 7 0 7 4270
-> 7 0 9 4262
-> 7 0 9 4308
-> 7 0 9 4284
-> 7 0 9 4368
-> 7 0 9 4344
-> 7 0 9 4274
-> 7 0 9 4320
-> 7 0 9 4296
-> 7 0 9 4380
-> 7 0 7 4276
-> 7 0 9 4356
-> 7 0 7 4306
-> 7 0 9 4332
-> 7 0 7 4336
-> 7 0 7 4366
-> 7 0 7 4288
-> 7 0 7 4318
-> 7 0 7 4348
-> 7 0 7 4378
-> 7 0 9 4286
-> 7 0 7 4300
-> 7 0 9 4385
-> 7 0 9 4316
-> 7 0 7 4330
-> 7 0 9 4257
-> 7 0 9 4346
-> 7 0 7 4360
-> 7 0 9 4376
-> 7 0 9 4298
-> 7 0 9 4328
-> 7 0 9 4269
-> 7 0 9 4358
-> 7 0 7 4255
-> 7 0 7 4267
-> 7 0 12 4384
-> 7 0 9 4259
-> 7 0 9 4311
-> 7 0 9 4287
-> 7 0 9 4271
-> 7 0 9 4371
-> 7 0 9 4347
-> 7 0 9 4323
-> 7 0 9 4299
-> 7 0 9 4383
-> 7 0 9 4359
-> 7 0 9 4335
-> 7 0 7 4285
-> 7 0 7 4315
-> 7 0 7 4345
-> 7 0 7 4375
-> 7 0 9 4283
-> 7 0 7 4297
-> 7 0 9 4313
-> 7 0 7 4327
-> 7 0 9 4343
-> 7 0 7 4357
-> 7 0 9 4373
-> 7 0 9 4260
-> 7 0 9 4295
-> 7 0 9 4325
-> 7 0 9 4355
-> 7 0 9 4272
-> 7 0 7 4252
-> 7 0 7 4264
-> 7 0 9 4256
-> 7 0 9 4278
-> 7 0 9 4338
-> 7 0 9 4268
-> 7 0 9 4314
-> 7 0 9 4290
-> 7 0 9 4374
-> 7 0 9 4350
-> 7 0 9 4326
-> 7 0 9 4302
-> 7 0 7 4282
-> 7 0 9 4362
-> 7 0 7 4312
-> 7 0 7 4342
-> 7 0 7 4372
-> 7 0 9 4280
-> 7 0 7 4294
-> 7 0 9 4310
-> 7 0 7 4324
-> 7 0 9 4251
-> 7 0 9 4340
-> 7 0 7 4354
-> 7 0 9 4370
-> 7 0 9 4292
-> 7 0 9 4322
-> 7 0 9 4263
-> 7 0 9 4352
-> 7 0 9 4382
-> 7 0 9 4304
-> 7 0 9 4334
-> 7 0 7 4249
-> 7 0 9 4275
-> 7 0 9 4364
-> 7 0 7 4261
-> 7 0 9 4253
-> 7 0 6 4248
-> 7 0 9 4177
-> 7 0 9 4207
-> 7 0 7 4095
-> 7 0 9 4121
-> 7 0 9 4237
-> 7 0 7 4107
-> 7 0 9 4105
-> 7 0 7 4119
+> 7 0 9 4246
> 7 0 9 4124
-> 7 0 9 4184
-> 7 0 9 4160
-> 7 0 9 4117
-> 7 0 9 4136
-> 7 0 9 4244
-> 7 0 9 4220
-> 7 0 9 4196
-> 7 0 9 4172
-> 7 0 9 4148
-> 7 0 9 4232
-> 7 0 7 4128
-> 7 0 9 4208
-> 7 0 7 4158
-> 7 0 7 4188
-> 7 0 7 4218
-> 7 0 7 4140
-> 7 0 7 4170
-> 7 0 9 4132
-> 7 0 7 4200
-> 7 0 9 4100
-> 7 0 9 4162
-> 7 0 7 4230
-> 7 0 9 4192
-> 7 0 9 4222
-> 7 0 9 4144
-> 7 0 9 4112
-> 7 0 9 4174
-> 7 0 9 4204
-> 7 0 9 4234
-> 7 0 7 4104
-> 7 0 9 4102
-> 7 0 7 4116
+> 7 0 9 4123
> 7 0 9 4127
-> 7 0 9 4114
-> 7 0 9 4187
-> 7 0 9 4163
+> 7 0 9 4126
+> 7 0 9 4130
+> 7 0 9 4129
+> 7 0 9 4133
+> 7 0 9 4132
+> 7 0 9 4136
+> 7 0 9 4135
> 7 0 9 4139
-> 7 0 9 4223
-> 7 0 9 4199
-> 7 0 9 4175
-> 7 0 7 4125
+> 7 0 9 4138
+> 7 0 9 4142
+> 7 0 9 4141
+> 7 0 9 4145
+> 7 0 9 4144
+> 7 0 9 4148
+> 7 0 9 4147
> 7 0 9 4151
-> 7 0 7 4155
-> 7 0 9 4235
-> 7 0 7 4185
-> 7 0 9 4211
-> 7 0 7 4215
-> 7 0 7 4137
-> 7 0 7 4167
-> 7 0 9 4129
-> 7 0 7 4197
+> 7 0 9 4150
+> 7 0 9 4097
+> 7 0 9 4096
+> 7 0 9 4154
+> 7 0 9 4153
+> 7 0 9 4157
+> 7 0 9 4156
+> 7 0 9 4160
> 7 0 9 4159
-> 7 0 7 4227
-> 7 0 7 4149
-> 7 0 9 4189
-> 7 0 9 4103
-> 7 0 7 4179
-> 7 0 9 4219
-> 7 0 9 4141
-> 7 0 7 4209
+> 7 0 9 4163
+> 7 0 9 4162
+> 7 0 9 4166
+> 7 0 9 4165
+> 7 0 9 4169
+> 7 0 9 4168
+> 7 0 9 4172
> 7 0 9 4171
-> 7 0 7 4239
-> 7 0 9 4201
-> 7 0 9 4115
-> 7 0 9 4231
-> 7 0 7 4101
+> 7 0 9 4175
+> 7 0 9 4174
+> 7 0 9 4178
+> 7 0 9 4177
+> 7 0 9 4181
+> 7 0 9 4180
+> 7 0 9 4100
> 7 0 9 4099
-> 7 0 7 4113
-> 7 0 9 4154
-> 7 0 9 4111
-> 7 0 9 4130
-> 7 0 9 4214
+> 7 0 9 4184
+> 7 0 9 4183
+> 7 0 9 4187
+> 7 0 9 4186
> 7 0 9 4190
-> 7 0 9 4166
-> 7 0 9 4142
-> 7 0 9 4226
-> 7 0 7 4122
+> 7 0 9 4189
+> 7 0 9 4193
+> 7 0 9 4192
+> 7 0 9 4196
+> 7 0 9 4195
+> 7 0 9 4199
+> 7 0 9 4198
> 7 0 9 4202
-> 7 0 12 4245
-> 7 0 7 4152
-> 7 0 9 4178
-> 7 0 7 4182
-> 7 0 7 4212
-> 7 0 9 4238
-> 7 0 7 4134
-> 7 0 7 4242
-> 7 0 7 4164
-> 7 0 9 4126
-> 7 0 7 4194
-> 7 0 9 4156
-> 7 0 7 4224
-> 7 0 7 4146
-> 7 0 9 4186
-> 7 0 9 4246
-> 7 0 7 4176
+> 7 0 9 4201
+> 7 0 9 4205
+> 7 0 9 4204
+> 7 0 9 4208
+> 7 0 9 4207
+> 7 0 9 4211
+> 7 0 9 4210
+> 7 0 9 4103
+> 7 0 9 4102
+> 7 0 9 4214
+> 7 0 9 4213
+> 7 0 9 4217
> 7 0 9 4216
-> 7 0 9 4138
-> 7 0 7 4206
-> 7 0 9 4106
-> 7 0 9 4168
-> 7 0 7 4236
-> 7 0 9 4198
+> 7 0 9 4220
+> 7 0 9 4219
+> 7 0 9 4223
+> 7 0 9 4222
+> 7 0 9 4226
+> 7 0 9 4225
+> 7 0 9 4229
> 7 0 9 4228
-> 7 0 9 4150
-> 7 0 9 4118
-> 7 0 9 4180
-> 7 0 9 4210
-> 7 0 7 4098
+> 7 0 9 4232
+> 7 0 9 4231
+> 7 0 9 4235
+> 7 0 9 4234
+> 7 0 9 4238
+> 7 0 9 4237
+> 7 0 9 4241
> 7 0 9 4240
-> 7 0 9 4096
-> 7 0 7 4110
+> 7 0 9 4106
+> 7 0 9 4105
+> 7 0 9 4244
+> 7 0 9 4243
+> 7 0 9 4109
> 7 0 9 4108
-> 7 0 9 4157
-> 7 0 9 4133
-> 7 0 9 4217
+> 7 0 9 4112
+> 7 0 9 4111
+> 7 0 9 4115
+> 7 0 9 4114
+> 7 0 9 4118
+> 7 0 9 4117
+> 7 0 9 4121
> 7 0 9 4120
-> 7 0 9 4193
-> 7 0 9 4169
-> 7 0 9 4145
-> 7 0 9 4229
-> 7 0 9 4205
-> 7 0 9 4181
+> 7 0 7 4095
+> 7 0 7 4122
+> 7 0 7 4125
+> 7 0 7 4128
> 7 0 7 4131
-> 7 0 7 4161
-> 7 0 9 4241
-> 7 0 9 4123
-> 7 0 7 4191
-> 7 0 9 4153
-> 7 0 7 4221
+> 7 0 7 4134
+> 7 0 7 4137
+> 7 0 7 4140
> 7 0 7 4143
-> 7 0 9 4183
-> 7 0 9 4097
+> 7 0 7 4146
+> 7 0 7 4149
+> 7 0 7 4098
+> 7 0 7 4152
+> 7 0 7 4155
+> 7 0 7 4158
+> 7 0 7 4161
+> 7 0 7 4164
+> 7 0 7 4167
+> 7 0 7 4170
> 7 0 7 4173
-> 7 0 9 4213
-> 7 0 9 4135
+> 7 0 7 4176
+> 7 0 7 4179
+> 7 0 7 4101
+> 7 0 7 4182
+> 7 0 7 4185
+> 7 0 7 4188
+> 7 0 7 4191
+> 7 0 7 4194
+> 7 0 7 4197
+> 7 0 7 4200
> 7 0 7 4203
-> 7 0 9 4243
-> 7 0 9 4165
+> 7 0 7 4206
+> 7 0 7 4209
+> 7 0 7 4104
+> 7 0 7 4212
+> 7 0 7 4215
+> 7 0 7 4218
+> 7 0 7 4221
+> 7 0 7 4224
+> 7 0 7 4227
+> 7 0 7 4230
> 7 0 7 4233
-> 7 0 9 4195
-> 7 0 9 4109
-> 7 0 9 4225
-> 7 0 9 4147
+> 7 0 7 4236
+> 7 0 7 4239
+> 7 0 7 4107
+> 7 0 7 4242
+> 7 0 7 4110
+> 7 0 7 4113
+> 7 0 7 4116
+> 7 0 7 4119
+> 7 0 12 4245
> 7 0 6 4094
+> 7 0 9 4385
+> 7 0 9 4278
+> 7 0 9 4277
+> 7 0 9 4281
+> 7 0 9 4280
+> 7 0 9 4284
+> 7 0 9 4283
+> 7 0 9 4287
+> 7 0 9 4286
+> 7 0 9 4290
+> 7 0 9 4289
+> 7 0 9 4293
+> 7 0 9 4292
+> 7 0 9 4296
+> 7 0 9 4295
+> 7 0 9 4299
+> 7 0 9 4298
+> 7 0 9 4302
+> 7 0 9 4301
+> 7 0 9 4305
+> 7 0 9 4304
+> 7 0 9 4251
+> 7 0 9 4250
+> 7 0 9 4308
+> 7 0 9 4307
+> 7 0 9 4311
+> 7 0 9 4310
+> 7 0 9 4314
+> 7 0 9 4313
+> 7 0 9 4317
+> 7 0 9 4316
+> 7 0 9 4320
+> 7 0 9 4319
+> 7 0 9 4323
+> 7 0 9 4322
+> 7 0 9 4326
+> 7 0 9 4325
+> 7 0 9 4329
+> 7 0 9 4328
+> 7 0 9 4332
+> 7 0 9 4331
+> 7 0 9 4335
+> 7 0 9 4334
+> 7 0 9 4254
+> 7 0 9 4253
+> 7 0 9 4338
+> 7 0 9 4337
+> 7 0 9 4341
+> 7 0 9 4340
+> 7 0 9 4344
+> 7 0 9 4343
+> 7 0 9 4347
+> 7 0 9 4346
+> 7 0 9 4350
+> 7 0 9 4349
+> 7 0 9 4353
+> 7 0 9 4352
+> 7 0 9 4356
+> 7 0 9 4355
+> 7 0 9 4359
+> 7 0 9 4358
+> 7 0 9 4362
+> 7 0 9 4361
+> 7 0 9 4365
+> 7 0 9 4364
+> 7 0 9 4257
+> 7 0 9 4256
+> 7 0 9 4368
+> 7 0 9 4367
+> 7 0 9 4371
+> 7 0 9 4370
+> 7 0 9 4374
+> 7 0 9 4373
+> 7 0 9 4377
+> 7 0 9 4376
+> 7 0 9 4380
+> 7 0 9 4379
+> 7 0 9 4383
+> 7 0 9 4382
+> 7 0 9 4260
+> 7 0 9 4259
+> 7 0 9 4263
+> 7 0 9 4262
+> 7 0 9 4266
+> 7 0 9 4265
+> 7 0 9 4269
+> 7 0 9 4268
+> 7 0 9 4272
+> 7 0 9 4271
+> 7 0 9 4275
+> 7 0 9 4274
+> 7 0 7 4249
+> 7 0 7 4276
+> 7 0 7 4279
+> 7 0 7 4282
+> 7 0 7 4285
+> 7 0 7 4288
+> 7 0 7 4291
+> 7 0 7 4294
+> 7 0 7 4297
+> 7 0 7 4300
+> 7 0 7 4303
+> 7 0 7 4252
+> 7 0 7 4306
+> 7 0 7 4309
+> 7 0 7 4312
+> 7 0 7 4315
+> 7 0 7 4318
+> 7 0 7 4321
+> 7 0 7 4324
+> 7 0 7 4327
+> 7 0 7 4330
+> 7 0 7 4333
+> 7 0 7 4255
+> 7 0 7 4336
+> 7 0 7 4339
+> 7 0 7 4342
+> 7 0 7 4345
+> 7 0 7 4348
+> 7 0 7 4351
+> 7 0 7 4354
+> 7 0 7 4357
+> 7 0 7 4360
+> 7 0 7 4363
+> 7 0 7 4258
+> 7 0 7 4366
+> 7 0 7 4369
+> 7 0 7 4372
+> 7 0 7 4375
+> 7 0 7 4378
+> 7 0 7 4381
+> 7 0 7 4261
+> 7 0 7 4264
+> 7 0 7 4267
+> 7 0 7 4270
+> 7 0 7 4273
+> 7 0 12 4384
+> 7 0 6 4248
+> 7 0 12 4388
+> 7 0 6 4387
+> 7 0 3 4389
+> 7 0 3 4093
+> 7 0 3 4247
+> 7 0 3 4386
> 7 0 1 3921
+> 7 0 9 4633
+> 7 0 9 4421
+> 7 0 9 4420
+> 7 0 9 4424
+> 7 0 9 4423
+> 7 0 9 4427
+> 7 0 9 4426
+> 7 0 9 4430
+> 7 0 9 4429
+> 7 0 9 4433
+> 7 0 9 4432
+> 7 0 9 4436
+> 7 0 9 4435
+> 7 0 9 4439
+> 7 0 9 4438
+> 7 0 9 4442
+> 7 0 9 4441
+> 7 0 9 4445
+> 7 0 9 4444
+> 7 0 9 4448
+> 7 0 9 4447
+> 7 0 9 4394
+> 7 0 9 4393
+> 7 0 9 4451
+> 7 0 9 4450
+> 7 0 9 4454
+> 7 0 9 4453
+> 7 0 9 4457
+> 7 0 9 4456
+> 7 0 9 4460
+> 7 0 9 4459
+> 7 0 9 4463
+> 7 0 9 4462
+> 7 0 9 4466
+> 7 0 9 4465
+> 7 0 9 4469
+> 7 0 9 4468
+> 7 0 9 4472
+> 7 0 9 4471
+> 7 0 9 4475
+> 7 0 9 4474
+> 7 0 9 4478
+> 7 0 9 4477
+> 7 0 9 4397
+> 7 0 9 4396
+> 7 0 9 4481
+> 7 0 9 4480
+> 7 0 9 4484
+> 7 0 9 4483
+> 7 0 9 4487
+> 7 0 9 4486
+> 7 0 9 4490
+> 7 0 9 4489
+> 7 0 9 4493
+> 7 0 9 4492
+> 7 0 9 4496
+> 7 0 9 4495
+> 7 0 9 4499
+> 7 0 9 4498
+> 7 0 9 4502
+> 7 0 9 4501
+> 7 0 9 4505
+> 7 0 9 4504
+> 7 0 9 4508
+> 7 0 9 4507
+> 7 0 9 4400
+> 7 0 9 4399
+> 7 0 9 4511
+> 7 0 9 4510
+> 7 0 9 4514
+> 7 0 9 4513
+> 7 0 9 4517
+> 7 0 9 4516
+> 7 0 9 4520
+> 7 0 9 4519
+> 7 0 9 4523
+> 7 0 9 4522
+> 7 0 9 4526
+> 7 0 9 4525
+> 7 0 9 4529
+> 7 0 9 4528
+> 7 0 9 4532
+> 7 0 9 4531
+> 7 0 9 4535
+> 7 0 9 4534
+> 7 0 9 4538
+> 7 0 9 4537
+> 7 0 9 4403
+> 7 0 9 4402
+> 7 0 9 4541
+> 7 0 9 4540
+> 7 0 9 4544
+> 7 0 9 4543
+> 7 0 9 4547
+> 7 0 9 4546
+> 7 0 9 4550
+> 7 0 9 4549
+> 7 0 9 4553
+> 7 0 9 4552
+> 7 0 9 4556
+> 7 0 9 4555
+> 7 0 9 4559
+> 7 0 9 4558
+> 7 0 9 4562
+> 7 0 9 4561
+> 7 0 9 4565
+> 7 0 9 4564
+> 7 0 9 4568
+> 7 0 9 4567
+> 7 0 9 4406
+> 7 0 9 4405
+> 7 0 9 4571
+> 7 0 9 4570
+> 7 0 9 4574
+> 7 0 9 4573
+> 7 0 9 4577
+> 7 0 9 4576
+> 7 0 9 4580
+> 7 0 9 4579
+> 7 0 9 4583
+> 7 0 9 4582
+> 7 0 9 4586
+> 7 0 9 4585
+> 7 0 9 4589
+> 7 0 9 4588
+> 7 0 9 4592
+> 7 0 9 4591
+> 7 0 9 4595
+> 7 0 9 4594
+> 7 0 9 4598
+> 7 0 9 4597
+> 7 0 9 4409
+> 7 0 9 4408
+> 7 0 9 4601
+> 7 0 9 4600
+> 7 0 9 4604
+> 7 0 9 4603
+> 7 0 9 4607
+> 7 0 9 4606
+> 7 0 9 4610
+> 7 0 9 4609
+> 7 0 9 4613
+> 7 0 9 4612
+> 7 0 9 4616
+> 7 0 9 4615
+> 7 0 9 4619
+> 7 0 9 4618
+> 7 0 9 4622
+> 7 0 9 4621
+> 7 0 9 4625
+> 7 0 9 4624
+> 7 0 9 4628
+> 7 0 9 4627
+> 7 0 9 4412
+> 7 0 9 4411
+> 7 0 9 4631
+> 7 0 9 4630
+> 7 0 9 4415
+> 7 0 9 4414
+> 7 0 9 4418
+> 7 0 9 4417
+> 7 0 7 4392
+> 7 0 7 4419
+> 7 0 7 4422
+> 7 0 7 4425
+> 7 0 7 4428
+> 7 0 7 4431
+> 7 0 7 4434
+> 7 0 7 4437
+> 7 0 7 4440
+> 7 0 7 4443
+> 7 0 7 4446
+> 7 0 7 4395
+> 7 0 7 4449
+> 7 0 7 4452
+> 7 0 7 4455
+> 7 0 7 4458
+> 7 0 7 4461
+> 7 0 7 4464
+> 7 0 7 4467
+> 7 0 7 4470
+> 7 0 7 4473
+> 7 0 7 4476
+> 7 0 7 4398
+> 7 0 7 4479
+> 7 0 7 4482
+> 7 0 7 4485
+> 7 0 7 4488
+> 7 0 7 4491
+> 7 0 7 4494
+> 7 0 7 4497
+> 7 0 7 4500
+> 7 0 7 4503
+> 7 0 7 4506
+> 7 0 7 4401
+> 7 0 7 4509
+> 7 0 7 4512
+> 7 0 7 4515
+> 7 0 7 4518
+> 7 0 7 4521
+> 7 0 7 4524
+> 7 0 7 4527
+> 7 0 7 4530
+> 7 0 7 4533
+> 7 0 7 4536
+> 7 0 7 4404
+> 7 0 7 4539
+> 7 0 7 4542
+> 7 0 7 4545
+> 7 0 7 4548
+> 7 0 7 4551
+> 7 0 7 4554
+> 7 0 7 4557
+> 7 0 7 4560
+> 7 0 7 4563
+> 7 0 7 4566
+> 7 0 7 4407
+> 7 0 7 4569
+> 7 0 7 4572
+> 7 0 7 4575
+> 7 0 7 4578
+> 7 0 7 4581
+> 7 0 7 4584
+> 7 0 7 4587
+> 7 0 7 4590
+> 7 0 7 4593
+> 7 0 7 4596
+> 7 0 7 4410
+> 7 0 7 4599
+> 7 0 7 4602
+> 7 0 7 4605
+> 7 0 7 4608
+> 7 0 7 4611
+> 7 0 7 4614
+> 7 0 7 4617
+> 7 0 7 4620
+> 7 0 7 4623
+> 7 0 7 4626
+> 7 0 7 4413
+> 7 0 7 4629
+> 7 0 7 4416
+> 7 0 12 4632
+> 7 0 6 4391
+> 7 0 9 4793
+> 7 0 9 4665
+> 7 0 9 4664
+> 7 0 9 4668
+> 7 0 9 4667
+> 7 0 9 4671
+> 7 0 9 4670
+> 7 0 9 4674
+> 7 0 9 4673
+> 7 0 9 4677
+> 7 0 9 4676
+> 7 0 9 4680
+> 7 0 9 4679
+> 7 0 9 4683
+> 7 0 9 4682
+> 7 0 9 4686
+> 7 0 9 4685
+> 7 0 9 4689
+> 7 0 9 4688
+> 7 0 9 4692
+> 7 0 9 4691
+> 7 0 9 4638
+> 7 0 9 4637
+> 7 0 9 4695
+> 7 0 9 4694
+> 7 0 9 4698
+> 7 0 9 4697
+> 7 0 9 4701
+> 7 0 9 4700
+> 7 0 9 4704
+> 7 0 9 4703
+> 7 0 9 4707
+> 7 0 9 4706
+> 7 0 9 4710
+> 7 0 9 4709
+> 7 0 9 4713
+> 7 0 9 4712
+> 7 0 9 4716
+> 7 0 9 4715
+> 7 0 9 4719
+> 7 0 9 4718
+> 7 0 9 4722
+> 7 0 9 4721
+> 7 0 9 4641
+> 7 0 9 4640
+> 7 0 9 4725
+> 7 0 9 4724
+> 7 0 9 4728
+> 7 0 9 4727
+> 7 0 9 4731
+> 7 0 9 4730
+> 7 0 9 4734
+> 7 0 9 4733
+> 7 0 9 4737
+> 7 0 9 4736
+> 7 0 9 4740
+> 7 0 9 4739
+> 7 0 9 4743
+> 7 0 9 4742
+> 7 0 9 4746
+> 7 0 9 4745
+> 7 0 9 4749
+> 7 0 9 4748
+> 7 0 9 4752
+> 7 0 9 4751
+> 7 0 9 4644
+> 7 0 9 4643
+> 7 0 9 4755
+> 7 0 9 4754
+> 7 0 9 4758
+> 7 0 9 4757
+> 7 0 9 4761
+> 7 0 9 4760
+> 7 0 9 4764
+> 7 0 9 4763
+> 7 0 9 4767
+> 7 0 9 4766
+> 7 0 9 4770
+> 7 0 9 4769
+> 7 0 9 4773
+> 7 0 9 4772
+> 7 0 9 4776
+> 7 0 9 4775
+> 7 0 9 4779
+> 7 0 9 4778
+> 7 0 9 4782
+> 7 0 9 4781
+> 7 0 9 4647
+> 7 0 9 4646
+> 7 0 9 4785
+> 7 0 9 4784
+> 7 0 9 4788
+> 7 0 9 4787
+> 7 0 9 4791
+> 7 0 9 4790
+> 7 0 9 4650
+> 7 0 9 4649
+> 7 0 9 4653
+> 7 0 9 4652
+> 7 0 9 4656
+> 7 0 9 4655
+> 7 0 9 4659
+> 7 0 9 4658
+> 7 0 9 4662
+> 7 0 9 4661
+> 7 0 7 4636
+> 7 0 7 4663
+> 7 0 7 4666
+> 7 0 7 4669
+> 7 0 7 4672
+> 7 0 7 4675
+> 7 0 7 4678
+> 7 0 7 4681
+> 7 0 7 4684
+> 7 0 7 4687
+> 7 0 7 4690
+> 7 0 7 4639
+> 7 0 7 4693
+> 7 0 7 4696
+> 7 0 7 4699
+> 7 0 7 4702
+> 7 0 7 4705
+> 7 0 7 4708
+> 7 0 7 4711
+> 7 0 7 4714
+> 7 0 7 4717
+> 7 0 7 4720
+> 7 0 7 4642
+> 7 0 7 4723
+> 7 0 7 4726
+> 7 0 7 4729
+> 7 0 7 4732
+> 7 0 7 4735
+> 7 0 7 4738
+> 7 0 7 4741
+> 7 0 7 4744
+> 7 0 7 4747
+> 7 0 7 4750
+> 7 0 7 4645
+> 7 0 7 4753
+> 7 0 7 4756
+> 7 0 7 4759
+> 7 0 7 4762
+> 7 0 7 4765
+> 7 0 7 4768
+> 7 0 7 4771
+> 7 0 7 4774
+> 7 0 7 4777
+> 7 0 7 4780
+> 7 0 7 4648
+> 7 0 7 4783
+> 7 0 7 4786
+> 7 0 7 4789
+> 7 0 7 4651
+> 7 0 7 4654
+> 7 0 7 4657
+> 7 0 7 4660
+> 7 0 12 4792
+> 7 0 6 4635
+> 7 0 12 4796
+> 7 0 6 4795
+> 7 0 3 4797
+> 7 0 3 4634
+> 7 0 3 4794
+> 7 0 1 4390
$ rm -f trace_platform.trace
> 13 18.155073 3 41
> 16 18.155073 10 0 SR 41 p8
> 7 18.155073 2 41
-> 7 18.155073 1 6
-> 7 18.155073 1 3
-> 7 18.155073 11 28
-> 7 18.155073 11 29
-> 7 18.155073 11 23
-> 7 18.155073 11 30
-> 7 18.155073 11 24
-> 7 18.155073 11 18
-> 7 18.155073 1 1
+> 7 18.155073 11 16
+> 7 18.155073 11 14
> 7 18.155073 11 19
> 7 18.155073 11 20
+> 7 18.155073 11 18
> 7 18.155073 11 21
> 7 18.155073 11 22
-> 7 18.155073 11 25
-> 7 18.155073 11 26
-> 7 18.155073 11 31
-> 7 18.155073 11 27
-> 7 18.155073 11 16
-> 7 18.155073 11 14
> 7 18.155073 11 12
> 7 18.155073 11 9
> 7 18.155073 11 15
+> 7 18.155073 11 23
+> 7 18.155073 11 24
> 7 18.155073 11 17
+> 7 18.155073 11 25
+> 7 18.155073 11 26
+> 7 18.155073 11 27
> 7 18.155073 11 8
> 7 18.155073 11 10
+> 7 18.155073 11 28
+> 7 18.155073 11 29
> 7 18.155073 11 13
+> 7 18.155073 11 30
> 7 18.155073 11 11
-> 7 18.155073 1 5
-> 7 18.155073 1 2
> 7 18.155073 1 7
+> 7 18.155073 1 5
+> 7 18.155073 1 3
> 7 18.155073 1 4
+> 7 18.155073 1 6
+> 7 18.155073 1 2
+> 7 18.155073 1 1
+> 7 18.155073 11 31
$ $SG_TEST_EXENV ${bindir:=.}/trace-process-migration$EXEEXT --cfg=tracing:yes --cfg=tracing/categorized:yes --cfg=tracing/uncategorized:yes --cfg=tracing/buffer:yes --cfg=tracing/filename:procmig.trace --cfg=tracing/msg/process:yes ${srcdir:=.}/small_platform.xml
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
> 16 0 17 0 topology 21 44
> 15 0 17 0 topology 30 45
> 16 0 17 0 topology 28 45
-> 1 20 13 bmigration_order "0.800026 0.545312 0.857926"
-> 1 21 1 pmigration_order "0.800026 0.545312 0.857926"
+> 1 20 1 pmigration_order "0.800026 0.545312 0.857926"
+> 1 21 13 bmigration_order "0.800026 0.545312 0.857926"
> 6 0 32 4 3 "emigrant-1"
> 6 0 33 4 1 "policeman-2"
> 12 0 5 32 7
> 13 18.155073 5 41
> 16 18.155073 12 0 SR 41 p8
> 7 18.155073 4 41
-> 7 18.155073 1 6
-> 7 18.155073 1 3
-> 7 18.155073 13 28
-> 7 18.155073 13 29
-> 7 18.155073 13 23
-> 7 18.155073 13 30
-> 7 18.155073 13 24
-> 7 18.155073 13 18
-> 7 18.155073 1 1
+> 7 18.155073 13 16
+> 7 18.155073 13 14
> 7 18.155073 13 19
> 7 18.155073 13 20
+> 7 18.155073 13 18
> 7 18.155073 13 21
> 7 18.155073 13 22
-> 7 18.155073 13 25
-> 7 18.155073 13 26
-> 7 18.155073 13 31
-> 7 18.155073 13 27
-> 7 18.155073 13 16
-> 7 18.155073 13 14
> 7 18.155073 13 12
> 7 18.155073 13 9
> 7 18.155073 13 15
+> 7 18.155073 13 23
+> 7 18.155073 13 24
> 7 18.155073 13 17
+> 7 18.155073 13 25
+> 7 18.155073 13 26
+> 7 18.155073 13 27
> 7 18.155073 13 8
> 7 18.155073 13 10
+> 7 18.155073 13 28
+> 7 18.155073 13 29
> 7 18.155073 13 13
+> 7 18.155073 13 30
> 7 18.155073 13 11
-> 7 18.155073 1 5
-> 7 18.155073 1 2
> 7 18.155073 1 7
+> 7 18.155073 1 5
+> 7 18.155073 1 3
> 7 18.155073 1 4
+> 7 18.155073 1 6
+> 7 18.155073 1 2
+> 7 18.155073 1 1
+> 7 18.155073 13 31
$ $SG_TEST_EXENV ${bindir:=.}/trace-process-migration$EXEEXT --cfg=tracing/categorized:yes --cfg=tracing/uncategorized:yes --cfg=tracing/buffer:no --cfg=tracing/filename:procmig.trace --cfg=tracing/msg/process:yes ${srcdir:=.}/small_platform.xml
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
> 16 0 17 0 topology 21 44
> 15 0 17 0 topology 30 45
> 16 0 17 0 topology 28 45
-> 1 20 13 bmigration_order "0.800026 0.545312 0.857926"
-> 1 21 1 pmigration_order "0.800026 0.545312 0.857926"
+> 1 20 1 pmigration_order "0.800026 0.545312 0.857926"
+> 1 21 13 bmigration_order "0.800026 0.545312 0.857926"
> 6 0 32 4 3 "emigrant-1"
> 6 0 33 4 1 "policeman-2"
> 12 0 5 32 7
> 13 18.155073 5 41
> 16 18.155073 12 0 SR 41 p8
> 7 18.155073 4 41
-> 7 18.155073 1 6
-> 7 18.155073 1 3
-> 7 18.155073 13 28
-> 7 18.155073 13 29
-> 7 18.155073 13 23
-> 7 18.155073 13 30
-> 7 18.155073 13 24
-> 7 18.155073 13 18
-> 7 18.155073 1 1
+> 7 18.155073 13 16
+> 7 18.155073 13 14
> 7 18.155073 13 19
> 7 18.155073 13 20
+> 7 18.155073 13 18
> 7 18.155073 13 21
> 7 18.155073 13 22
-> 7 18.155073 13 25
-> 7 18.155073 13 26
-> 7 18.155073 13 31
-> 7 18.155073 13 27
-> 7 18.155073 13 16
-> 7 18.155073 13 14
> 7 18.155073 13 12
> 7 18.155073 13 9
> 7 18.155073 13 15
+> 7 18.155073 13 23
+> 7 18.155073 13 24
> 7 18.155073 13 17
+> 7 18.155073 13 25
+> 7 18.155073 13 26
+> 7 18.155073 13 27
> 7 18.155073 13 8
> 7 18.155073 13 10
+> 7 18.155073 13 28
+> 7 18.155073 13 29
> 7 18.155073 13 13
+> 7 18.155073 13 30
> 7 18.155073 13 11
-> 7 18.155073 1 5
-> 7 18.155073 1 2
> 7 18.155073 1 7
+> 7 18.155073 1 5
+> 7 18.155073 1 3
> 7 18.155073 1 4
+> 7 18.155073 1 6
+> 7 18.155073 1 2
+> 7 18.155073 1 1
+> 7 18.155073 13 31
$ $SG_TEST_EXENV ${bindir:=.}/trace-process-migration$EXEEXT --cfg=tracing:no ${srcdir:=.}/small_platform.xml
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'no'
> 16 0 6 0 topology 21 44
> 15 0 6 0 topology 30 45
> 16 0 6 0 topology 28 45
-> 1 9 3 bmigration_order "0.800026 0.545312 0.857926"
-> 1 10 1 pmigration_order "0.800026 0.545312 0.857926"
-> 7 18.155073 1 6
-> 7 18.155073 1 3
-> 7 18.155073 3 28
-> 7 18.155073 3 29
-> 7 18.155073 3 23
-> 7 18.155073 3 30
-> 7 18.155073 3 24
-> 7 18.155073 3 18
-> 7 18.155073 1 1
+> 1 9 1 pmigration_order "0.800026 0.545312 0.857926"
+> 1 10 3 bmigration_order "0.800026 0.545312 0.857926"
+> 7 18.155073 3 16
+> 7 18.155073 3 14
> 7 18.155073 3 19
> 7 18.155073 3 20
+> 7 18.155073 3 18
> 7 18.155073 3 21
> 7 18.155073 3 22
-> 7 18.155073 3 25
-> 7 18.155073 3 26
-> 7 18.155073 3 31
-> 7 18.155073 3 27
-> 7 18.155073 3 16
-> 7 18.155073 3 14
> 7 18.155073 3 12
> 7 18.155073 3 9
> 7 18.155073 3 15
+> 7 18.155073 3 23
+> 7 18.155073 3 24
> 7 18.155073 3 17
+> 7 18.155073 3 25
+> 7 18.155073 3 26
+> 7 18.155073 3 27
> 7 18.155073 3 8
> 7 18.155073 3 10
+> 7 18.155073 3 28
+> 7 18.155073 3 29
> 7 18.155073 3 13
+> 7 18.155073 3 30
> 7 18.155073 3 11
-> 7 18.155073 1 5
-> 7 18.155073 1 2
> 7 18.155073 1 7
+> 7 18.155073 1 5
+> 7 18.155073 1 3
> 7 18.155073 1 4
+> 7 18.155073 1 6
+> 7 18.155073 1 2
+> 7 18.155073 1 1
+> 7 18.155073 3 31
$ $SG_TEST_EXENV ${bindir:=.}/trace-process-migration$EXEEXT --cfg=tracing:yes --cfg=tracing/uncategorized:yes ${srcdir:=.}/small_platform.xml
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
> 10 18.155073 7 9 466506.488095
> 9 18.155073 7 15 466506.488095
> 10 18.155073 7 15 466506.488095
-> 7 18.155073 1 6
-> 7 18.155073 1 3
-> 7 18.155073 4 28
-> 7 18.155073 4 29
-> 7 18.155073 4 23
-> 7 18.155073 4 30
-> 7 18.155073 4 24
-> 7 18.155073 4 18
-> 7 18.155073 1 1
+> 7 18.155073 4 16
+> 7 18.155073 4 14
> 7 18.155073 4 19
> 7 18.155073 4 20
+> 7 18.155073 4 18
> 7 18.155073 4 21
> 7 18.155073 4 22
-> 7 18.155073 4 25
-> 7 18.155073 4 26
-> 7 18.155073 4 31
-> 7 18.155073 4 27
-> 7 18.155073 4 16
-> 7 18.155073 4 14
> 7 18.155073 4 12
> 7 18.155073 4 9
> 7 18.155073 4 15
+> 7 18.155073 4 23
+> 7 18.155073 4 24
> 7 18.155073 4 17
+> 7 18.155073 4 25
+> 7 18.155073 4 26
+> 7 18.155073 4 27
> 7 18.155073 4 8
> 7 18.155073 4 10
+> 7 18.155073 4 28
+> 7 18.155073 4 29
> 7 18.155073 4 13
+> 7 18.155073 4 30
> 7 18.155073 4 11
-> 7 18.155073 1 5
-> 7 18.155073 1 2
> 7 18.155073 1 7
+> 7 18.155073 1 5
+> 7 18.155073 1 3
> 7 18.155073 1 4
+> 7 18.155073 1 6
+> 7 18.155073 1 2
+> 7 18.155073 1 1
+> 7 18.155073 4 31
$ $SG_TEST_EXENV ${bindir:=.}/trace-process-migration$EXEEXT --cfg=tracing:yes --cfg=tracing/msg/process:yes ${srcdir:=.}/small_platform.xml
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
> 13 18.155073 3 41
> 16 18.155073 10 0 SR 41 p8
> 7 18.155073 2 41
-> 7 18.155073 1 6
-> 7 18.155073 1 3
-> 7 18.155073 11 28
-> 7 18.155073 11 29
-> 7 18.155073 11 23
-> 7 18.155073 11 30
-> 7 18.155073 11 24
-> 7 18.155073 11 18
-> 7 18.155073 1 1
+> 7 18.155073 11 16
+> 7 18.155073 11 14
> 7 18.155073 11 19
> 7 18.155073 11 20
+> 7 18.155073 11 18
> 7 18.155073 11 21
> 7 18.155073 11 22
-> 7 18.155073 11 25
-> 7 18.155073 11 26
-> 7 18.155073 11 31
-> 7 18.155073 11 27
-> 7 18.155073 11 16
-> 7 18.155073 11 14
> 7 18.155073 11 12
> 7 18.155073 11 9
> 7 18.155073 11 15
+> 7 18.155073 11 23
+> 7 18.155073 11 24
> 7 18.155073 11 17
+> 7 18.155073 11 25
+> 7 18.155073 11 26
+> 7 18.155073 11 27
> 7 18.155073 11 8
> 7 18.155073 11 10
+> 7 18.155073 11 28
+> 7 18.155073 11 29
> 7 18.155073 11 13
+> 7 18.155073 11 30
> 7 18.155073 11 11
-> 7 18.155073 1 5
-> 7 18.155073 1 2
> 7 18.155073 1 7
+> 7 18.155073 1 5
+> 7 18.155073 1 3
> 7 18.155073 1 4
+> 7 18.155073 1 6
+> 7 18.155073 1 2
+> 7 18.155073 1 1
+> 7 18.155073 11 31
$ rm -rf procmig.trace simgrid.trace
> 10 0.412439 10 16 5.600000
> 10 0.412439 10 12 5.600000
> 10 0.412439 10 17 5.600000
-> 7 0.412439 1 6
-> 7 0.412439 1 3
-> 7 0.412439 3 28
-> 7 0.412439 3 29
-> 7 0.412439 3 23
-> 7 0.412439 3 30
-> 7 0.412439 3 24
-> 7 0.412439 3 18
-> 7 0.412439 1 1
+> 7 0.412439 3 16
+> 7 0.412439 3 14
> 7 0.412439 3 19
> 7 0.412439 3 20
+> 7 0.412439 3 18
> 7 0.412439 3 21
> 7 0.412439 3 22
-> 7 0.412439 3 25
-> 7 0.412439 3 26
-> 7 0.412439 3 31
-> 7 0.412439 3 27
-> 7 0.412439 3 16
-> 7 0.412439 3 14
> 7 0.412439 3 12
> 7 0.412439 3 9
> 7 0.412439 3 15
+> 7 0.412439 3 23
+> 7 0.412439 3 24
> 7 0.412439 3 17
+> 7 0.412439 3 25
+> 7 0.412439 3 26
+> 7 0.412439 3 27
> 7 0.412439 3 8
> 7 0.412439 3 10
+> 7 0.412439 3 28
+> 7 0.412439 3 29
> 7 0.412439 3 13
+> 7 0.412439 3 30
> 7 0.412439 3 11
-> 7 0.412439 1 5
-> 7 0.412439 1 2
> 7 0.412439 1 7
+> 7 0.412439 1 5
+> 7 0.412439 1 3
> 7 0.412439 1 4
+> 7 0.412439 1 6
+> 7 0.412439 1 2
+> 7 0.412439 1 1
+> 7 0.412439 3 31
$ rm -f simgrid.trace
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
+<platform version="4.1">
+ <zone id="zone0" routing="None">
+ <host id="Tremblay" speed="98.095Mf"/>
+ <host id="Jupiter" speed="76.296Mf"/>
+ <host id="Fafard" speed="76.296Mf"/>
+ <host id="Ginette" speed="48.492Mf"/>
+ <host id="Bourassa" speed="48.492Mf"/>
+ <host id="Jacquelin" speed="137.333Mf"/>
+ <host id="Boivin" speed="98.095Mf"/>
+ </zone>
+</platform>
#include "simgrid/s4u.hpp"
#include "xbt/replay.hpp"
#include "xbt/str.h"
+#include <string>
XBT_LOG_NEW_DEFAULT_CATEGORY(actions, "Messages specific for this msg example");
static void send(const char* const* action)
{
double size = std::stod(action[3]);
- char* payload = xbt_strdup(action[3]);
+ std::string* payload = new std::string(action[3]);
double clock = simgrid::s4u::Engine::getClock();
simgrid::s4u::MailboxPtr to = simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::getName() + "_" + action[2]);
ACT_DEBUG("Entering Send: %s (size: %g) -- Actor %s on mailbox %s", NAME, size,
- simgrid::s4u::this_actor::getName().c_str(), to->getName());
+ simgrid::s4u::this_actor::getCname(), to->getCname());
to->put(payload, size);
- xbt_free(payload);
+ delete payload;
log_action(action, simgrid::s4u::Engine::getClock() - clock);
}
simgrid::s4u::MailboxPtr from =
simgrid::s4u::Mailbox::byName(std::string(action[2]) + "_" + simgrid::s4u::this_actor::getName());
- ACT_DEBUG("Receiving: %s -- Actor %s on mailbox %s", NAME, simgrid::s4u::this_actor::getName().c_str(),
- from->getName());
+ ACT_DEBUG("Receiving: %s -- Actor %s on mailbox %s", NAME, simgrid::s4u::this_actor::getCname(), from->getCname());
from->get();
log_action(action, simgrid::s4u::Engine::getClock() - clock);
}
*/
#include <simgrid/s4u.hpp>
+#include <string>
// This declares a logging channel so that XBT_INFO can be used later
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_create, "The logging channel used in this example");
XBT_INFO("Hello s4u, I have something to send");
simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName("mb42");
- mailbox->put(xbt_strdup(msg.c_str()), msg.size());
+ mailbox->put(new std::string(msg), msg.size());
XBT_INFO("I'm done. See you.");
}
};
}
void operator()()
{
- XBT_INFO("Hello s4u, I'm ready to get any message you'd want on %s", mailbox->getName());
+ XBT_INFO("Hello s4u, I'm ready to get any message you'd want on %s", mailbox->getCname());
- char* msg1 = static_cast<char*>(mailbox->get());
- char* msg2 = static_cast<char*>(mailbox->get());
- XBT_INFO("I received '%s' and '%s'", msg1, msg2);
- xbt_free(msg1);
- xbt_free(msg2);
+ std::string* msg1 = static_cast<std::string*>(mailbox->get());
+ std::string* msg2 = static_cast<std::string*>(mailbox->get());
+ XBT_INFO("I received '%s' and '%s'", msg1->c_str(), msg2->c_str());
+ delete msg1;
+ delete msg2;
XBT_INFO("I'm done. See you.");
}
};
#define MESSAGE_CANCEL_SIZE 17
/** Types of messages exchanged between two peers. */
-typedef enum {
+enum e_message_type {
MESSAGE_HANDSHAKE,
MESSAGE_CHOKE,
MESSAGE_UNCHOKE,
MESSAGE_REQUEST,
MESSAGE_PIECE,
MESSAGE_CANCEL
-} e_message_type;
+};
class Message {
public:
void Peer::sendMessage(simgrid::s4u::MailboxPtr mailbox, e_message_type type, uint64_t size)
{
const char* type_names[6] = {"HANDSHAKE", "CHOKE", "UNCHOKE", "INTERESTED", "NOTINTERESTED", "CANCEL"};
- XBT_DEBUG("Sending %s to %s", type_names[type], mailbox->getName());
+ XBT_DEBUG("Sending %s to %s", type_names[type], mailbox->getCname());
mailbox->put_init(new Message(type, id, bitfield_, mailbox_), size)->detach();
}
void Peer::sendBitfield(simgrid::s4u::MailboxPtr mailbox)
{
- XBT_DEBUG("Sending a BITFIELD to %s", mailbox->getName());
+ XBT_DEBUG("Sending a BITFIELD to %s", mailbox->getCname());
mailbox
->put_init(new Message(MESSAGE_BITFIELD, id, bitfield_, mailbox_),
MESSAGE_BITFIELD_SIZE + BITS_TO_BYTES(FILE_PIECES))
void Peer::sendPiece(simgrid::s4u::MailboxPtr mailbox, unsigned int piece, int block_index, int block_length)
{
xbt_assert(not hasNotPiece(piece), "Tried to send a unavailable piece.");
- XBT_DEBUG("Sending the PIECE %u (%d,%d) to %s", piece, block_index, block_length, mailbox->getName());
+ XBT_DEBUG("Sending the PIECE %u (%d,%d) to %s", piece, block_index, block_length, mailbox->getCname());
mailbox->put_init(new Message(MESSAGE_PIECE, id, mailbox_, piece, block_index, block_length), BLOCK_SIZE)->detach();
}
int block_index = getFirstMissingBlockFrom(piece);
if (block_index != -1) {
int block_length = MIN(BLOCKS_REQUESTED, PIECES_BLOCKS - block_index);
- XBT_DEBUG("Sending a REQUEST to %s for piece %u (%d,%d)", remote_peer->mailbox_->getName(), piece, block_index,
+ XBT_DEBUG("Sending a REQUEST to %s for piece %u (%d,%d)", remote_peer->mailbox_->getCname(), piece, block_index,
block_length);
remote_peer->mailbox_
->put_init(new Message(MESSAGE_REQUEST, id, mailbox_, piece, block_index, block_length), MESSAGE_REQUEST_SIZE)
/* Send a "handshake" message to all the peers it got (since it couldn't have gotten more than 50 peers) */
sendHandshakeToAllPeers();
- XBT_DEBUG("Starting main leech loop listening on mailbox: %s", mailbox_->getName());
+ XBT_DEBUG("Starting main leech loop listening on mailbox: %s", mailbox_->getCname());
void* data = nullptr;
while (simgrid::s4u::Engine::getClock() < deadline && countPieces(bitfield_) < FILE_PIECES) {
const char* type_names[10] = {"HANDSHAKE", "CHOKE", "UNCHOKE", "INTERESTED", "NOTINTERESTED",
"HAVE", "BITFIELD", "REQUEST", "PIECE", "CANCEL"};
- XBT_DEBUG("Received a %s message from %s", type_names[message->type], message->return_mailbox->getName());
+ XBT_DEBUG("Received a %s message from %s", type_names[message->type], message->return_mailbox->getCname());
auto known_peer = connected_peers.find(message->peer_id);
Connection* remote_peer = (known_peer == connected_peers.end()) ? nullptr : known_peer->second;
if (number_of_tasks < 10000 || i % 10000 == 0)
XBT_INFO("Sending \"%s\" (of %ld) to mailbox \"%s\"", (std::string("Task_") + std::to_string(i)).c_str(),
- number_of_tasks, mailbox->getName());
+ number_of_tasks, mailbox->getCname());
/* - Send the computation amount to the @ref worker */
mailbox->put(new double(comp_size), comm_size);
> [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159
> [150.178356] (0:maestro@) Total simulation time: 150.178
+p Testing with default compound Full network optimization
+
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-app-pingpong$EXEEXT ${srcdir:=.}/small_platform.xml "--cfg=network/optim:Full" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:maestro@) Configuration change: Set 'network/optim' to 'Full'
+> [ 0.000000] (1:pinger@Tremblay) Ping -> Jupiter
+> [ 0.000000] (2:ponger@Jupiter) Pong -> Tremblay
+> [ 0.019014] (2:ponger@Jupiter) Task received : small communication (latency bound)
+> [ 0.019014] (2:ponger@Jupiter) Ping time (latency bound) 0.019014
+> [ 0.019014] (2:ponger@Jupiter) task_bw->data = 0.019
+> [150.178356] (1:pinger@Tremblay) Task received : large communication (bandwidth bound)
+> [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159
+> [150.178356] (0:maestro@) Total simulation time: 150.178
+
p Testing the deprecated CM02 network model
$ $SG_TEST_EXENV ${bindir:=.}/s4u-app-pingpong$EXEEXT ${srcdir:=.}/small_platform.xml --cfg=cpu/model:Cas01 --cfg=network/model:CM02 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159
> [150.178356] (0:maestro@) Total simulation time: 150.178
+p Testing the surf network Reno2 fairness model using lagrangian approach
+
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-app-pingpong$EXEEXT ${srcdir:=.}/small_platform.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Reno2" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
+> [ 0.000000] (0:maestro@) Configuration change: Set 'cpu/model' to 'Cas01'
+> [ 0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'Reno2'
+> [ 0.000000] (1:pinger@Tremblay) Ping -> Jupiter
+> [ 0.000000] (2:ponger@Jupiter) Pong -> Tremblay
+> [ 0.019014] (2:ponger@Jupiter) Task received : small communication (latency bound)
+> [ 0.019014] (2:ponger@Jupiter) Ping time (latency bound) 0.019014
+> [ 0.019014] (2:ponger@Jupiter) task_bw->data = 0.019
+> [150.178356] (1:pinger@Tremblay) Task received : large communication (bandwidth bound)
+> [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159
+> [150.178356] (0:maestro@) Total simulation time: 150.178
+
p Testing the surf network Vegas fairness model using lagrangian approach
$ $SG_TEST_EXENV ${bindir:=.}/s4u-app-pingpong$EXEEXT ${srcdir:=.}/small_platform.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [150.178356] (1:pinger@Tremblay) Task received : large communication (bandwidth bound)
> [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159
> [150.178356] (0:maestro@) Total simulation time: 150.178
+
+p Testing the surf network constant model
+
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-app-pingpong$EXEEXT ${srcdir:=.}/small_platform_constant.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Constant" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound'
+> [ 0.000000] (0:maestro@) Configuration change: Set 'cpu/model' to 'Cas01'
+> [ 0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'Constant'
+> [ 0.000000] (1:pinger@Tremblay) Ping -> Jupiter
+> [ 0.000000] (2:ponger@Jupiter) Pong -> Tremblay
+> [ 13.010000] (2:ponger@Jupiter) Task received : small communication (latency bound)
+> [ 13.010000] (2:ponger@Jupiter) Ping time (latency bound) 13.010000
+> [ 13.010000] (2:ponger@Jupiter) task_bw->data = 13.010
+> [ 26.020000] (1:pinger@Tremblay) Task received : large communication (bandwidth bound)
+> [ 26.020000] (1:pinger@Tremblay) Pong time (bandwidth bound): 13.010
+> [ 26.020000] (0:maestro@) Total simulation time: 26.020
if (rank == 0) {
/* The root process (rank 0) first sends the token then waits to receive it back */
- XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->getName());
- neighbor_mailbox->put(xbt_strdup("Token"), task_comm_size);
- char* res = static_cast<char*>(my_mailbox->get());
- XBT_INFO("Host \"%u\" received \"%s\"", rank, res);
- xbt_free(res);
+ XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->getCname());
+ std::string msg = "Token";
+ neighbor_mailbox->put(&msg, task_comm_size);
+ std::string* res = static_cast<std::string*>(my_mailbox->get());
+ XBT_INFO("Host \"%u\" received \"%s\"", rank, res->c_str());
} else {
- char* res = static_cast<char*>(my_mailbox->get());
- XBT_INFO("Host \"%u\" received \"%s\"", rank, res);
- XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->getName());
+ std::string* res = static_cast<std::string*>(my_mailbox->get());
+ XBT_INFO("Host \"%u\" received \"%s\"", rank, res->c_str());
+ XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->getCname());
neighbor_mailbox->put(res, task_comm_size);
}
}
#include "simgrid/s4u.hpp"
#include <cstdlib>
#include <iostream>
+#include <string>
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_wait, "Messages specific for this s4u example");
std::string mboxName = std::string("receiver-") + std::to_string(i % receivers_count);
simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(mboxName);
std::string msgName = std::string("Message ") + std::to_string(i);
- char* payload = xbt_strdup(msgName.c_str()); // copy the data we send: 'msgName' is not a stable storage location
-
+ std::string* payload = new std::string(msgName); // copy the data we send:
+ // 'msgName' is not a stable storage location
XBT_INFO("Send '%s' to '%s'", msgName.c_str(), mboxName.c_str());
/* Create a communication representing the ongoing communication */
- simgrid::s4u::CommPtr comm = mbox->put_async((void*)payload, msg_size);
+ simgrid::s4u::CommPtr comm = mbox->put_async(payload, msg_size);
/* Add this comm to the vector of all known comms */
pending_comms.push_back(comm);
}
for (int i = 0; i < receivers_count; i++) {
std::string mboxName = std::string("receiver-") + std::to_string(i % receivers_count);
simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(mboxName);
- char* payload = xbt_strdup("finalize"); // Make a copy of the data we will send
+ std::string* payload = new std::string("finalize"); // Make a copy of the data we will send
- simgrid::s4u::CommPtr comm = mbox->put_async((void*)payload, 0);
+ simgrid::s4u::CommPtr comm = mbox->put_async(payload, 0);
pending_comms.push_back(comm);
XBT_INFO("Send 'finalize' to 'receiver-%ld'", i % receivers_count);
}
void operator()()
{
XBT_INFO("Wait for my first message");
- while (1) {
- char* received = static_cast<char*>(mbox->get());
- XBT_INFO("I got a '%s'.", received);
- if (std::strcmp(received, "finalize") == 0) { /* If it's a finalize message, we're done */
- xbt_free(received);
- break;
- }
- /* Otherwise receiving the message was all we were supposed to do */
- xbt_free(received);
+ for (bool done = false; not done;) {
+ std::string* received = static_cast<std::string*>(mbox->get());
+ XBT_INFO("I got a '%s'.", received->c_str());
+ done = (*received == "finalize"); // If it's a finalize message, we're done
+ // Receiving the message was all we were supposed to do
+ delete received;
}
}
};
#include "simgrid/s4u.hpp"
#include <cstdlib>
#include <iostream>
+#include <string>
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_waitall, "Messages specific for this s4u example");
std::string mboxName = std::string("receiver-") + std::to_string(i % receivers_count);
simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(mboxName);
std::string msgName = std::string("Message ") + std::to_string(i);
- char* payload = xbt_strdup(msgName.c_str()); // copy the data we send: 'msgName' is not a stable storage location
-
+ std::string* payload = new std::string(msgName); // copy the data we send:
+ // 'msgName' is not a stable storage location
XBT_INFO("Send '%s' to '%s'", msgName.c_str(), mboxName.c_str());
/* Create a communication representing the ongoing communication */
- simgrid::s4u::CommPtr comm = mbox->put_async((void*)payload, msg_size);
+ simgrid::s4u::CommPtr comm = mbox->put_async(payload, msg_size);
/* Add this comm to the vector of all known comms */
pending_comms.push_back(comm);
}
for (int i = 0; i < receivers_count; i++) {
std::string mboxName = std::string("receiver-") + std::to_string(i % receivers_count);
simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(mboxName);
- char* payload = xbt_strdup("finalize"); // Make a copy of the data we will send
+ std::string* payload = new std::string("finalize"); // Make a copy of the data we will send
- simgrid::s4u::CommPtr comm = mbox->put_async((void*)payload, 0);
+ simgrid::s4u::CommPtr comm = mbox->put_async(payload, 0);
pending_comms.push_back(comm);
XBT_INFO("Send 'finalize' to 'receiver-%ld'", i % receivers_count);
}
void operator()()
{
XBT_INFO("Wait for my first message");
- while (1) {
- char* received = static_cast<char*>(mbox->get());
- XBT_INFO("I got a '%s'.", received);
- if (std::strcmp(received, "finalize") == 0) { /* If it's a finalize message, we're done */
- xbt_free(received);
- break;
- }
- /* Otherwise receiving the message was all we were supposed to do */
- xbt_free(received);
+ for (bool done = false; not done;) {
+ std::string* received = static_cast<std::string*>(mbox->get());
+ XBT_INFO("I got a '%s'.", received->c_str());
+ done = (*received == "finalize"); // If it's a finalize message, we're done
+ // Receiving the message was all we were supposed to do
+ delete received;
}
}
};
#include "simgrid/s4u.hpp"
#include <cstdlib>
#include <iostream>
+#include <string>
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_waitall, "Messages specific for this msg example");
std::string mboxName = std::string("receiver-") + std::to_string(i % receivers_count);
simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(mboxName);
std::string msgName = std::string("Message ") + std::to_string(i);
- char* payload = xbt_strdup(msgName.c_str()); // copy the data we send: 'msgName' is not a stable storage location
-
+ std::string* payload = new std::string(msgName); // copy the data we send:
+ // 'msgName' is not a stable storage location
XBT_INFO("Send '%s' to '%s'", msgName.c_str(), mboxName.c_str());
/* Create a communication representing the ongoing communication */
- simgrid::s4u::CommPtr comm = mbox->put_async((void*)payload, msg_size);
+ simgrid::s4u::CommPtr comm = mbox->put_async(payload, msg_size);
/* Add this comm to the vector of all known comms */
pending_comms.push_back(comm);
}
for (int i = 0; i < receivers_count; i++) {
std::string mboxName = std::string("receiver-") + std::to_string(i % receivers_count);
simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(mboxName);
- char* payload = xbt_strdup("finalize"); // Make a copy of the data we will send
+ std::string* payload = new std::string("finalize"); // Make a copy of the data we will send
- simgrid::s4u::CommPtr comm = mbox->put_async((void*)payload, 0);
+ simgrid::s4u::CommPtr comm = mbox->put_async(payload, 0);
pending_comms.push_back(comm);
XBT_INFO("Send 'finalize' to 'receiver-%ld'", i % receivers_count);
}
void operator()()
{
XBT_INFO("Wait for my first message");
- while (1) {
- char* received = static_cast<char*>(mbox->get());
- XBT_INFO("I got a '%s'.", received);
- if (std::strcmp(received, "finalize") == 0) { /* If it's a finalize message, we're done */
- xbt_free(received);
- break;
- }
- /* Otherwise receiving the message was all we were supposed to do */
- xbt_free(received);
+ for (bool done = false; not done;) {
+ std::string* received = static_cast<std::string*>(mbox->get());
+ XBT_INFO("I got a '%s'.", received->c_str());
+ done = (*received == "finalize"); // If it's a finalize message, we're done
+ // Receiving the message was all we were supposed to do
+ delete received;
}
}
};
}
// receive the answer
XBT_DEBUG("Sent 'Predecessor Alive' request to %d, waiting for the answer on my mailbox '%s'", pred_id_,
- message->answer_to->getName());
+ message->answer_to->getCname());
simgrid::s4u::CommPtr comm = return_mailbox->get_async(&data);
try {
// receive the answer
XBT_DEBUG("Sent 'Get Predecessor' request to %d, waiting for the answer on my mailbox '%s'", ask_to,
- message->answer_to->getName());
+ message->answer_to->getCname());
simgrid::s4u::CommPtr comm = return_mailbox->get_async(&data);
try {
message->type = FIND_SUCCESSOR_ANSWER;
message->answer_id = fingers_[0];
XBT_DEBUG("Sending back a 'Find Successor Answer' to %s (mailbox %s): the successor of %d is %d",
- message->issuer_host_name.c_str(), message->answer_to->getName(), message->request_id,
+ message->issuer_host_name.c_str(), message->answer_to->getCname(), message->request_id,
message->answer_id);
message->answer_to->put_init(message, 10)->detach(ChordMessage::destroy);
} else {
message->type = GET_PREDECESSOR_ANSWER;
message->answer_id = pred_id_;
XBT_DEBUG("Sending back a 'Get Predecessor Answer' to %s via mailbox '%s': my predecessor is %d",
- message->issuer_host_name.c_str(), message->answer_to->getName(), message->answer_id);
+ message->issuer_host_name.c_str(), message->answer_to->getCname(), message->answer_id);
message->answer_to->put_init(message, 10)->detach(ChordMessage::destroy);
break;
XBT_DEBUG("Receiving a 'Predecessor Alive' request from %s", message->issuer_host_name.c_str());
message->type = PREDECESSOR_ALIVE_ANSWER;
XBT_DEBUG("Sending back a 'Predecessor Alive Answer' to %s (mailbox %s)", message->issuer_host_name.c_str(),
- message->answer_to->getName());
+ message->answer_to->getCname());
message->answer_to->put_init(message, 10)->detach(ChordMessage::destroy);
break;
};
/* Types of tasks exchanged between nodes. */
-typedef enum {
+enum e_message_type_t {
FIND_SUCCESSOR,
FIND_SUCCESSOR_ANSWER,
GET_PREDECESSOR,
PREDECESSOR_LEAVING,
PREDECESSOR_ALIVE,
PREDECESSOR_ALIVE_ANSWER
-} e_message_type_t;
+};
class ChordMessage {
public:
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <string>
#include <unordered_map>
#include "simgrid/s4u.hpp"
sg_size_t used_size = storage->getSizeUsed();
sg_size_t size = storage->getSize();
- XBT_INFO(" %s (%s) Used: %llu; Free: %llu; Total: %llu.", storage->getName(), mountpoint.c_str(), used_size,
+ XBT_INFO(" %s (%s) Used: %llu; Free: %llu; Total: %llu.", storage->getCname(), mountpoint.c_str(), used_size,
free_size, size);
}
}
file->move(newpath);
// Test attaching some user data to the file
- file->setUserdata(xbt_strdup("777"));
- XBT_INFO("User data attached to the file: %s", static_cast<char*>(file->getUserdata()));
- xbt_free(file->getUserdata());
+ file->setUserdata(new std::string("777"));
+ std::string* file_data = static_cast<std::string*>(file->getUserdata());
+ XBT_INFO("User data attached to the file: %s", file_data->c_str());
+ delete file_data;
// Close the file
delete file;
// Now attach some user data to disk1
- XBT_INFO("Get/set data for storage element: %s", storage->getName());
+ XBT_INFO("Get/set data for storage element: %s", storage->getCname());
XBT_INFO(" Uninitialized storage data: '%s'", static_cast<char*>(storage->getUserdata()));
- storage->setUserdata(xbt_strdup("Some user data"));
- XBT_INFO(" Set and get data: '%s'", static_cast<char*>(storage->getUserdata()));
-
- xbt_free(storage->getUserdata());
+ storage->setUserdata(new std::string("Some user data"));
+ std::string* storage_data = static_cast<std::string*>(storage->getUserdata());
+ XBT_INFO(" Set and get data: '%s'", storage_data->c_str());
+ delete storage_data;
}
};
-/* Copyright (c) 2013-2015. The SimGrid Team.
+/* Copyright (c) 2013-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#define REQUEST_TAG 1
#define RELEASE_TAG 2
-int r, cs;
+int r;
+int cs;
int main(int argc, char **argv){
int size;
-/* Copyright (c) 2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
* @endcode
*
*/
-struct SimulationClock {
+class SimulationClock {
+public:
using rep = double;
using period = std::ratio<1>;
using duration = std::chrono::duration<rep, period>;
typedef struct s_smx_context* smx_context_t;
typedef struct s_smx_actor* smx_actor_t;
+typedef struct s_smx_mutex* smx_mutex_t;
+typedef struct s_smx_mailbox* smx_mailbox_t;
+typedef struct s_surf_file* surf_file_t;
#endif
}
}
-SG_BEGIN_DECL()
-
+extern "C" {
typedef simgrid::jedule::Jedule *jedule_t;
-
-SG_END_DECL()
+}
#endif
#endif /* JEDULE_HPP_ */
-/* Copyright (c) 2010-2012, 2014-2016. The SimGrid Team.
+/* Copyright (c) 2010-2012, 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
}
}
-SG_BEGIN_DECL()
-
+extern "C" {
typedef simgrid::jedule::Event * jed_event_t;
-
-SG_END_DECL()
+}
#endif
-/* Copyright (c) 2010-2012, 2014-2016. The SimGrid Team.
+/* Copyright (c) 2010-2012, 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
}
}
-SG_BEGIN_DECL()
+extern "C" {
typedef simgrid::jedule::Container * jed_container_t;
typedef simgrid::jedule::Subset * jed_subset_t;
void get_resource_selection_by_hosts(std::vector<jed_subset_t>* subset_list, std::vector<sg_host_t> *host_list);
-
-SG_END_DECL()
+}
#endif
template<class T>
void bindPromise(Promise<T> promise, Future<T> future)
{
- struct PromiseBinder {
+ class PromiseBinder {
public:
PromiseBinder(Promise<T> promise) : promise_(std::move(promise)) {}
void operator()(Future<T> future)
XBT_PUBLIC_DATA(int) sg_storage_max_file_descriptors;
/* ******************************** Task ************************************ */
-typedef struct simdata_task *simdata_task_t;
+typedef struct s_simdata_task_t* simdata_task_t;
typedef struct msg_task {
char *name; /**< @brief task name if any */
* @ingroup msg_synchro
* @hideinitializer
*/
-typedef struct s_smx_sem *msg_sem_t; // Yeah that's a rename of the smx_sem_t which doesnt require smx_sem_t to be declared here
+typedef struct s_smx_sem_t* msg_sem_t; // Yeah that's a rename of the smx_sem_t which doesnt require smx_sem_t to be
+ // declared here
XBT_PUBLIC(msg_sem_t) MSG_sem_init(int initial_value);
XBT_PUBLIC(void) MSG_sem_acquire(msg_sem_t sem);
XBT_PUBLIC(msg_error_t) MSG_sem_acquire_timeout(msg_sem_t sem, double timeout);
*/
#define MSG_BARRIER_SERIAL_PROCESS -1
-typedef struct s_msg_bar* msg_bar_t;
+typedef struct s_msg_bar_t* msg_bar_t;
XBT_PUBLIC(msg_bar_t) MSG_barrier_init( unsigned int count);
XBT_PUBLIC(void) MSG_barrier_destroy(msg_bar_t bar);
XBT_PUBLIC(int) MSG_barrier_wait(msg_bar_t bar);
#include <simgrid/s4u/forward.hpp>
#include <simgrid/forward.h>
-typedef enum { inited = 0, started, canceled, errored, finished } e_s4u_activity_state_t;
+enum e_s4u_activity_state_t { inited = 0, started, canceled, errored, finished };
namespace simgrid {
namespace s4u {
-/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/** This actor will be automatically terminated when the last non-daemon process finishes **/
void daemonize();
- /** Retrieves the name of that actor as a C string */
- const char* getCname();
/** Retrieves the name of that actor as a C++ string */
- simgrid::xbt::string getName();
+ const simgrid::xbt::string& getName() const;
+ /** Retrieves the name of that actor as a C string */
+ const char* getCname() const;
/** Retrieves the host on which that actor is running */
s4u::Host* getHost();
/** Retrieves the PID of that actor
{
auto seconds = std::chrono::duration_cast<SimulationClockDuration>(duration);
this_actor::sleep_for(seconds.count());
- }
- template<class Duration>
- inline void sleep_until(const SimulationTimePoint<Duration>& timeout_time)
- {
- auto timeout_native = std::chrono::time_point_cast<SimulationClockDuration>(timeout_time);
- this_actor::sleep_until(timeout_native.time_since_epoch().count());
- }
+}
- XBT_ATTRIB_DEPRECATED_v320("Use sleep_for(): v3.20 will turn this warning into an error.") inline void sleep(
- double duration)
- {
- return sleep_for(duration);
- }
+template <class Duration> inline void sleep_until(const SimulationTimePoint<Duration>& timeout_time)
+{
+ auto timeout_native = std::chrono::time_point_cast<SimulationClockDuration>(timeout_time);
+ this_actor::sleep_until(timeout_native.time_since_epoch().count());
+}
+
+XBT_ATTRIB_DEPRECATED_v320("Use sleep_for(): v3.20 will turn this warning into an error.") inline void sleep(
+ double duration)
+{
+ return sleep_for(duration);
+}
- /** Block the actor, computing the given amount of flops */
- XBT_PUBLIC(void) execute(double flop);
+/** Block the actor, computing the given amount of flops */
+XBT_PUBLIC(void) execute(double flop);
- /** Block the actor until it gets a message from the given mailbox.
- *
- * See \ref Comm for the full communication API (including non blocking communications).
- */
- XBT_PUBLIC(void*)
- XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get(): v3.20 will turn this warning into an error.") recv(MailboxPtr chan);
- XBT_PUBLIC(void*)
- XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get(): v3.20 will turn this warning into an error.")
- recv(MailboxPtr chan, double timeout);
- XBT_PUBLIC(CommPtr)
- XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::recv_async(): v3.20 will turn this warning into an error.")
- irecv(MailboxPtr chan, void** data);
-
- /** Block the actor until it delivers a message of the given simulated size to the given mailbox
- *
- * See \ref Comm for the full communication API (including non blocking communications).
- */
- XBT_PUBLIC(void)
- XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put(): v3.20 will turn this warning into an error.")
- send(MailboxPtr chan, void* payload, double simulatedSize); // 3.17
- XBT_PUBLIC(void)
- XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put(): v3.20 will turn this warning into an error.")
- send(MailboxPtr chan, void* payload, double simulatedSize, double timeout); // 3.17
+/** Block the actor until it gets a message from the given mailbox.
+ *
+ * See \ref Comm for the full communication API (including non blocking communications).
+ */
+XBT_PUBLIC(void*)
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get(): v3.20 will turn this warning into an error.") recv(MailboxPtr chan);
+XBT_PUBLIC(void*)
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get(): v3.20 will turn this warning into an error.")
+ recv(MailboxPtr chan, double timeout);
+XBT_PUBLIC(CommPtr)
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::recv_async(): v3.20 will turn this warning into an error.")
+ irecv(MailboxPtr chan, void** data);
+
+/** Block the actor until it delivers a message of the given simulated size to the given mailbox
+ *
+ * See \ref Comm for the full communication API (including non blocking communications).
+*/
+XBT_PUBLIC(void)
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put(): v3.20 will turn this warning into an error.")
+ send(MailboxPtr chan, void* payload, double simulatedSize); // 3.17
+XBT_PUBLIC(void)
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put(): v3.20 will turn this warning into an error.")
+ send(MailboxPtr chan, void* payload, double simulatedSize, double timeout); // 3.17
- XBT_PUBLIC(CommPtr)
- XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put_async(): v3.20 will turn this warning into an error.")
- isend(MailboxPtr chan, void* payload, double simulatedSize);
+XBT_PUBLIC(CommPtr)
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put_async(): v3.20 will turn this warning into an error.")
+ isend(MailboxPtr chan, void* payload, double simulatedSize);
- /** @brief Returns the actor ID of the current actor (same as pid). */
- XBT_PUBLIC(aid_t) getPid();
+/** @brief Returns the actor ID of the current actor (same as pid). */
+XBT_PUBLIC(aid_t) getPid();
- /** @brief Returns the ancestor's actor ID of the current actor (same as ppid). */
- XBT_PUBLIC(aid_t) getPpid();
+/** @brief Returns the ancestor's actor ID of the current actor (same as ppid). */
+XBT_PUBLIC(aid_t) getPpid();
- /** @brief Returns the name of the current actor. */
- XBT_PUBLIC(std::string) getName();
+/** @brief Returns the name of the current actor. */
+XBT_PUBLIC(std::string) getName();
- /** @brief Returns the name of the host on which the process is running. */
- XBT_PUBLIC(Host*) getHost();
+/** @brief Returns the name of the current actor as a C string. */
+XBT_PUBLIC(const char*) getCname();
- /** @brief Suspend the actor. */
- XBT_PUBLIC(void) suspend();
+/** @brief Returns the name of the host on which the process is running. */
+XBT_PUBLIC(Host*) getHost();
- /** @brief Resume the actor. */
- XBT_PUBLIC(void) resume();
+/** @brief Suspend the actor. */
+XBT_PUBLIC(void) suspend();
- XBT_PUBLIC(bool) isSuspended();
+/** @brief Resume the actor. */
+XBT_PUBLIC(void) resume();
- /** @brief kill the actor. */
- XBT_PUBLIC(void) kill();
+XBT_PUBLIC(bool) isSuspended();
- /** @brief Add a function to the list of "on_exit" functions. */
- XBT_PUBLIC(void) onExit(int_f_pvoid_pvoid_t fun, void* data);
+/** @brief kill the actor. */
+XBT_PUBLIC(void) kill();
- /** @brief Migrate the actor to a new host. */
- XBT_PUBLIC(void) migrate(Host* new_host);
-};
+/** @brief Add a function to the list of "on_exit" functions. */
+XBT_PUBLIC(void) onExit(int_f_pvoid_pvoid_t fun, void* data);
+
+/** @brief Migrate the actor to a new host. */
+XBT_PUBLIC(void) migrate(Host* new_host);
+}
/** @} */
XBT_PUBLIC_CLASS ConditionVariable
{
private:
- friend s_smx_cond;
+ friend s_smx_cond_t;
smx_cond_t cond_;
explicit ConditionVariable(smx_cond_t cond) : cond_(cond) {}
public:
/** Retrieves the host on which the current actor is running */
static s4u::Host* current();
+ /** Retrieves the name of that host as a C++ string */
simgrid::xbt::string const& getName() const { return name_; }
+ /** Retrieves the name of that host as a C string */
const char* getCname() const { return name_.c_str(); }
void actorList(std::vector<ActorPtr> * whereto);
#include <xbt/base.h>
#include <xbt/signal.hpp>
+#include <string>
#include <unordered_map>
/***********
/** @brief Retrieve a link from its name */
static Link* byName(const char* name);
- /** @brief Get da name */
- const char* name();
+ /** @brief Retrieves the name of that link as a C++ string */
+ const std::string& getName() const;
+ /** @brief Retrieves the name of that link as a C string */
+ const char* getCname() const;
/** @brief Get the bandwidth in bytes per second of current Link */
double bandwidth();
/** @brief Callback signal fired when a communication changes it state (ready/done/cancel) */
static simgrid::xbt::signal<void(surf::NetworkAction*)> onCommunicationStateChange;
+
+ const char* XBT_ATTRIB_DEPRECATED_v321("Use getCname(): v3.21 will turn this warning into an error.") name();
};
}
}
#include <string>
#include <xbt/base.h>
+#include <xbt/string.hpp>
#include <simgrid/s4u/forward.hpp>
#include <simgrid/s4u/Actor.hpp>
/** private function, do not use. FIXME: make me protected */
kernel::activity::MailboxImpl* getImpl() { return pimpl_; }
- /** Gets the name of that mailbox */
- const char* getName();
+ /** @brief Retrieves the name of that mailbox as a C++ string */
+ const simgrid::xbt::string& getName() const;
+ /** @brief Retrieves the name of that mailbox as a C string */
+ const char* getCname() const;
/** Retrieve the mailbox associated to the given C string */
static MailboxPtr byName(const char *name);
-/* Copyright (c) 2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
public:
/** @brief Seal your netzone once you're done adding content, and before routing stuff through it */
virtual void seal();
- const char* getCname();
+ /** @brief Retrieves the name of that netzone as a C++ string */
+ const std::string& getName() const { return name_; }
+ /** @brief Retrieves the name of that netzone as a C string */
+ const char* getCname() const;
NetZone* getFather();
std::vector<NetZone*>* getChildren(); // Sub netzones
virtual ~Storage() = default;
/** Retrieve a Storage by its name. It must exist in the platform file */
static Storage* byName(std::string name);
- const char* getName();
+ /** @brief Retrieves the name of that storage as a C++ string */
+ std::string const& getName() const;
+ /** @brief Retrieves the name of that storage as a C string */
+ const char* getCname() const;
const char* getType();
Host* getHost();
sg_size_t getSize(); /** Retrieve the total amount of space of this storage element */
#include "simgrid/s4u/Host.hpp"
#include "simgrid/s4u/forward.hpp"
-typedef enum {
+enum e_surf_vm_state_t {
SURF_VM_STATE_CREATED, /**< created, but not yet started */
SURF_VM_STATE_RUNNING,
SURF_VM_STATE_SUSPENDED, /**< Suspend/resume does not involve disk I/O, so we assume there is no transition states. */
SURF_VM_STATE_DESTROYED
-} e_surf_vm_state_t;
+};
namespace simgrid {
namespace vm {
-/* Copyright (c) 2006-2010, 2012-2016. The SimGrid Team.
+/* Copyright (c) 2006-2010, 2012-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
Each task has a <em>\ref e_SD_task_state_t "state"</em> indicating whether the task is scheduled, running, done, ...
*/
-typedef struct SD_task *SD_task_t;
+typedef struct s_SD_task_t* SD_task_t;
/** @brief Task states
@ingroup SD_task_api */
#include "simgrid/host.h"
#include "xbt/ex.h"
#include "xbt/parmap.h"
+#ifdef __cplusplus
#include <map>
+#endif
+
/* ******************************** Host ************************************ */
/** @brief Host datatype
@ingroup simix_host_management
/**
* \ingroup simix_synchro_management
*/
-typedef struct s_smx_cond *smx_cond_t;
+typedef struct s_smx_cond_t* smx_cond_t;
/**
* \ingroup simix_synchro_management
*/
-typedef struct s_smx_sem *smx_sem_t;
+typedef struct s_smx_sem_t* smx_sem_t;
/* ****************************** Process *********************************** */
XBT_PUBLIC(double) SIMIX_get_clock();
/* Timer functions FIXME: should these be public? */
-typedef struct s_smx_timer* smx_timer_t;
+typedef struct s_smx_timer_t* smx_timer_t;
XBT_PUBLIC(smx_timer_t) SIMIX_timer_set(double date, void (*function)(void*), void *arg);
XBT_PUBLIC(void) SIMIX_timer_remove(smx_timer_t timer);
*/
XBT_PUBLIC(void) SIMIX_maestro_create(void (*code)(void*), void* data);
+#ifdef __cplusplus
XBT_PUBLIC(smx_actor_t)
SIMIX_process_attach(const char* name, void* data, const char* hostname, std::map<std::string, std::string>* properties,
smx_actor_t parent_process);
+#endif
XBT_PUBLIC(void) SIMIX_process_detach();
/*********************************** Host *************************************/
/**************************** Process simcalls ********************************/
SG_BEGIN_DECL()
/* Constructor and Destructor */
+#ifdef __cplusplus
XBT_PUBLIC(smx_actor_t)
simcall_process_create(const char* name, xbt_main_func_t code, void* data, sg_host_t host, int argc, char** argv,
std::map<std::string, std::string>* properties);
+#endif
XBT_PUBLIC(void) simcall_process_killall(int reset_pid);
XBT_PUBLIC(void) SIMIX_process_throw(smx_actor_t process, xbt_errcat_t cat, int value, const char *msg);
/************************** Comunication simcalls *****************************/
+#ifdef __cplusplus
XBT_PUBLIC(void)
simcall_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff,
size_t src_buff_size, int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
XBT_PUBLIC(smx_activity_t)
simcall_comm_iprobe(smx_mailbox_t mbox, int type, int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
void* data);
+#endif
XBT_PUBLIC(void) simcall_comm_cancel(smx_activity_t comm);
/* FIXME: waitany is going to be a vararg function, and should take a timeout */
-/* Copyright (c) 2005-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2005-2017. The SimGrid Team. All rights reserved. */
#ifndef XBT_BACKTRACE_H
#define XBT_BACKTRACE_H
+#ifdef __cplusplus
#include <cstddef>
+#endif
#include <xbt/base.h>
#define XBT_ATTRIB_UNUSED __attribute__((unused))
#define XBT_ATTRIB_DEPRECATED_v319(msg) __attribute__((deprecated(msg))) /* Will be dropped in v3.19 */
#define XBT_ATTRIB_DEPRECATED_v320(msg) __attribute__((deprecated(msg))) /* Will be dropped in v3.20 */
+#define XBT_ATTRIB_DEPRECATED_v321(msg) __attribute__((deprecated(msg))) /* Will be dropped in v3.21 */
/* Constructor priorities exist since gcc 4.3. Apparently, they are however not
* supported on Macs. */
-/* Copyright (c) 2015-2016. The SimGrid Team.
+/* Copyright (c) 2015-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
T get()
{
switch (status_) {
- case ResultStatus::invalid:
- default:
- throw std::logic_error("Invalid result");
case ResultStatus::value: {
T value = std::move(value_);
value_.~T();
std::rethrow_exception(std::move(exception));
break;
}
+ default:
+ throw std::logic_error("Invalid result");
}
}
private:
#if SIMGRID_HAVE_MC
-#include <stdexcept>
+#include <algorithm>
#include <cstddef>
#include <cstring>
#include <iterator>
+#include <stdexcept>
#include <xbt/sysdep.h>
XBT_PUBLIC_CLASS string : private string_data {
static const char NUL;
public:
-
// Types
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
~string()
{
if (string_data::data != &NUL)
- std::free(string_data::data);
+ delete[] string_data::data;
}
// Ctors
string_data::data = const_cast<char*>(&NUL);
} else {
string_data::len = size;
- string_data::data = static_cast<char*>(std::malloc(string_data::len + 1));
- memcpy(string_data::data, s, string_data::len);
+ string_data::data = new char[string_data::len + 1];
+ std::copy_n(s, string_data::len, string_data::data);
string_data::data[string_data::len] = '\0';
}
}
void assign(const char* s, size_t size)
{
if (string_data::data != &NUL) {
- std::free(string_data::data);
+ delete[] string_data::data;
string_data::data = nullptr;
string_data::len = 0;
}
if (size != 0) {
string_data::len = size;
- string_data::data = (char*) std::malloc(string_data::len + 1);
- std::memcpy(string_data::data, s, string_data::len);
+ string_data::data = new char[string_data::len + 1];
+ std::copy_n(s, string_data::len, string_data::data);
string_data::data[string_data::len] = '\0';
}
}
return data()[i];
}
// Conversion
+ static string_data& to_string_data(string& s) { return s; }
operator std::string() const { return std::string(this->c_str(), this->size()); }
// Iterators
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "JavaContext.hpp"
-#include "jxbt_utilities.h"
-#include "src/simix/smx_private.h"
+#include "jxbt_utilities.hpp"
+#include "src/simix/smx_private.hpp"
#include "xbt/ex.hpp"
#include <functional>
// (as the ones created for the VM migration). The Java exception will not be catched anywhere.
// Bad things happen currently if these actors get killed, unfortunately.
jxbt_throw_by_name(env, "org/simgrid/msg/ProcessKilledError",
- std::string("Process ") + this->process()->cname() + " killed from file JavaContext.cpp");
+ std::string("Process ") + this->process()->getCname() + " killed from file JavaContext.cpp");
// (remember that throwing a java exception from C does not break the C execution path.
// Instead, it marks the exception to be raised when returning to the Java world and
#include <jni.h>
#include "simgrid/simix.h"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
#include "xbt/xbt_os_thread.h"
-#include "jmsg.h"
+#include "jmsg.hpp"
namespace simgrid {
namespace kernel {
#include "simgrid/s4u/Host.hpp"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
-#include "jmsg_process.h"
-#include "jmsg_as.h"
+#include "jmsg.hpp"
+#include "jmsg_as.hpp"
#include "jmsg_host.h"
+#include "jmsg_process.h"
#include "jmsg_storage.h"
#include "jmsg_task.h"
-#include "jxbt_utilities.h"
-#include "jmsg.h"
+#include "jxbt_utilities.hpp"
#include "JavaContext.hpp"
#endif
/* end of eclipse-mandated pimple */
-SG_BEGIN_DECL()
+extern "C" {
int JAVA_HOST_LEVEL = -1;
JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit() {
sg_host_energy_plugin_init();
}
-
-SG_END_DECL()
+} // extern "C"
/** Run a Java org.simgrid.msg.Process
*
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef MSG4JAVA_H
-#define MSG4JAVA_H
+#ifndef JMSG_HPP
+#define JMSG_HPP
#include <jni.h>
#include <simgrid/msg.h>
#include <unordered_map>
-SG_BEGIN_DECL()
+extern "C" {
/* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */
#ifndef JNIEXPORT
extern int JAVA_HOST_LEVEL;
static std::unordered_map<msg_storage_t, jobject> java_storage_map;
-JavaVM *get_java_VM();
-JNIEnv *get_current_thread_env();
+JavaVM* get_java_VM();
+JNIEnv* get_current_thread_env();
/**
* This function throws the correct exception according to the status provided.
*/
-void jmsg_throw_status(JNIEnv *env, msg_error_t status);
+void jmsg_throw_status(JNIEnv* env, msg_error_t status);
-JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv * env, jclass cls);
-JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass cls);
+JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv* env, jclass cls);
+JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv* env, jclass cls);
-JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs);
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv* env, jclass cls, jobjectArray jargs);
JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit();
-JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv * env, jclass cls, jstring jargs);
-JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_verb(JNIEnv * env, jclass cls, jstring jargs);
-JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv * env, jclass cls, jstring jargs);
-JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_warn(JNIEnv * env, jclass cls, jstring jargs);
-JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_error(JNIEnv * env, jclass cls, jstring jargs);
-JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_critical(JNIEnv * env, jclass cls, jstring jargs);
-
-JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv * env, jclass cls, jstring jplatformFile);
-JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Msg_environmentGetRoutingRoot(JNIEnv * env, jclass cls);
-JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_deployApplication(JNIEnv * env, jclass cls, jstring jdeploymentFile);
-
-SG_END_DECL()
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv* env, jclass cls, jstring jargs);
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_verb(JNIEnv* env, jclass cls, jstring jargs);
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv* env, jclass cls, jstring jargs);
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_warn(JNIEnv* env, jclass cls, jstring jargs);
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_error(JNIEnv* env, jclass cls, jstring jargs);
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_critical(JNIEnv* env, jclass cls, jstring jargs);
+
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv* env, jclass cls, jstring jplatformFile);
+JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Msg_environmentGetRoutingRoot(JNIEnv* env, jclass cls);
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_deployApplication(JNIEnv* env, jclass cls, jstring jdeploymentFile);
+}
#endif
#include "simgrid/s4u/NetZone.hpp"
#include "src/kernel/routing/NetZoneImpl.hpp"
-#include "jmsg_as.h"
+#include "jmsg.hpp"
+#include "jmsg_as.hpp"
#include "jmsg_host.h"
-#include "jxbt_utilities.h"
-#include "jmsg.h"
+#include "jxbt_utilities.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
-SG_BEGIN_DECL()
+extern "C" {
static jmethodID jas_method_As_constructor;
static jfieldID jas_field_As_bind;
}
return jtable;
}
-
-SG_END_DECL()
+}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef MSG_JAS_H
-#define MSG_JAS_H
-#include <jni.h>
+#ifndef JMSG_AS_HPP
+#define JMSG_AS_HPP
#include "simgrid/msg.h"
+#include <jni.h>
-SG_BEGIN_DECL()
+extern "C" {
/* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */
#ifndef JNIEXPORT
void jnetzone_bind(jobject jas, msg_netzone_t as, JNIEnv* env);
simgrid::s4u::NetZone* jnetzone_get_native(JNIEnv* env, jobject jnetzone);
-JNIEXPORT void JNICALL Java_org_simgrid_msg_As_nativeInit(JNIEnv *env, jclass cls);
-JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getName(JNIEnv * env, jobject jas);
+JNIEXPORT void JNICALL Java_org_simgrid_msg_As_nativeInit(JNIEnv* env, jclass cls);
+JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getName(JNIEnv* env, jobject jas);
JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_As_getSons(JNIEnv* env, jobject jnetzone);
-JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getProperty(JNIEnv *env, jobject jhost, jobject jname);
+JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getProperty(JNIEnv* env, jobject jhost, jobject jname);
JNIEXPORT jobjectArray JNICALL Java_org_simgrid_msg_As_getHosts(JNIEnv* env, jobject jnetzone);
-
-SG_END_DECL()
+}
#endif
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "jmsg_comm.h"
-#include "jxbt_utilities.h"
-#include "jmsg.h"
+#include "jmsg.hpp"
+#include "jxbt_utilities.hpp"
#include <simgrid/msg.h>
#include <string>
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
-SG_BEGIN_DECL()
+extern "C" {
static jfieldID jcomm_field_Comm_bind;
static jfieldID jcomm_field_Comm_finished;
msg_task_t *task_received;
task_received = (msg_task_t*) (uintptr_t) env->GetLongField(jcomm, jcomm_field_Comm_taskBind);
- xbt_free(task_received);
+ delete task_received;
comm = (msg_comm_t) (uintptr_t) env->GetLongField(jcomm, jcomm_field_Comm_bind);
MSG_comm_destroy(comm);
static msg_comm_t* jarray_to_commArray(JNIEnv *env, jobjectArray jcomms, /* OUT */ int *count)
{
*count = env->GetArrayLength(jcomms);
- msg_comm_t* comms = xbt_new(msg_comm_t, *count);
+ msg_comm_t* comms = new msg_comm_t[*count];
for (int i=0; i < *count; i++) {
jobject jcomm = env->GetObjectArrayElement(jcomms, i);
return;
MSG_comm_waitall(comms, count, static_cast<double>(timeout));
- xbt_free(comms);
+ delete[] comms;
}
JNIEXPORT int JNICALL Java_org_simgrid_msg_Comm_waitAny(JNIEnv *env, jclass cls, jobjectArray jcomms)
{
}
int rank = MSG_comm_waitany(dyn);
- xbt_free(comms);
+ delete[] comms;
xbt_dynar_free(&dyn);
return rank;
}
-
-SG_END_DECL()
+}
/* Java bindings of the file API. */
-/* Copyright (c) 2012-2015. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2012-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "jmsg_file.h"
-#include "jxbt_utilities.h"
+#include "jxbt_utilities.hpp"
-SG_BEGIN_DECL()
+extern "C" {
void jfile_bind(JNIEnv *env, jobject jfile, msg_file_t fd) {
env->SetLongField(jfile, jfile_field_bind, reinterpret_cast<std::intptr_t>(fd));
MSG_file_close(file);
jfile_bind(env, jfile, nullptr);
}
-
-SG_END_DECL()
+}
#include "simgrid/s4u/Host.hpp"
#include "simgrid/s4u/Storage.hpp"
-#include "jmsg.h"
+#include "jmsg.hpp"
#include "jmsg_host.h"
-#include "jxbt_utilities.h"
#include "jmsg_storage.h"
+#include "jxbt_utilities.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
-SG_BEGIN_DECL()
+extern "C" {
static jmethodID jhost_method_Host_constructor;
static jfieldID jhost_field_Host_bind;
}
for (auto const& elm : mounted_storages) {
- jname = env->NewStringUTF(elm.second->getName());
+ jname = env->NewStringUTF(elm.second->getCname());
jstorage = Java_org_simgrid_msg_Storage_getByName(env,cls,jname);
env->SetObjectArrayElement(jtable, index, jstorage);
index++;
msg_host_t host = jhost_get_native(env, jhost);
return MSG_host_get_power_peak_at(host, pstate);
}
-
-SG_END_DECL()
+}
#include "jmsg_process.h"
-#include "jmsg.h"
-#include "jmsg_host.h"
-#include "jxbt_utilities.h"
#include "JavaContext.hpp"
+#include "jmsg.hpp"
+#include "jmsg_host.h"
+#include "jxbt_utilities.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
-SG_BEGIN_DECL()
+extern "C" {
jfieldID jprocess_field_Process_bind;
jfieldID jprocess_field_Process_host;
JNIEXPORT jint JNICALL Java_org_simgrid_msg_Process_getCount(JNIEnv * env, jclass cls) {
return (jint) MSG_process_get_number();
}
-
-SG_END_DECL()
+}
#include "xbt/sysdep.h"
#include "jmsg_rngstream.h"
-#include "jxbt_utilities.h"
+#include "jxbt_utilities.hpp"
-SG_BEGIN_DECL()
+extern "C" {
jfieldID jrngstream_bind;
return (jint)RngStream_RandInt(rngstream, (int)i, (int)j);
}
-
-SG_END_DECL()
+}
#include "simgrid/msg.h"
-#include "jmsg.h"
+#include "jmsg.hpp"
#include "jmsg_storage.h"
-#include "jxbt_utilities.h"
+#include "jxbt_utilities.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
-SG_BEGIN_DECL()
+extern "C" {
static jmethodID jstorage_method_Storage_constructor;
static jfieldID jstorage_field_Storage_bind;
xbt_dynar_free(&table);
return jtable;
}
-
-SG_END_DECL()
+}
#include <xbt/ex.hpp>
-#include "jmsg.h"
+#include "jmsg.hpp"
#include "jmsg_synchro.h"
-#include "jxbt_utilities.h"
+#include "jxbt_utilities.hpp"
#include "xbt/synchro.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
-SG_BEGIN_DECL()
+extern "C" {
static jfieldID jsynchro_field_Mutex_bind;
sem = (msg_sem_t)(uintptr_t)env->GetLongField(obj, jsynchro_field_Semaphore_bind);
MSG_sem_destroy(sem);
}
-
-SG_END_DECL()
+}
#include "simgrid/s4u/Host.hpp"
-#include "jmsg.h"
+#include "jmsg.hpp"
#include "jmsg_host.h"
-#include "jmsg_task.h"
#include "jmsg_process.h"
-#include "jxbt_utilities.h"
+#include "jmsg_task.h"
+#include "jxbt_utilities.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
-SG_BEGIN_DECL()
+extern "C" {
static jmethodID jtask_method_Comm_constructor;
int host_count = static_cast<int>(env->GetArrayLength(jhosts));
jdouble* jcomputeDurations = env->GetDoubleArrayElements(jcomputeDurations_arg, 0);
- msg_host_t* hosts = xbt_new0(msg_host_t, host_count);
- double* computeDurations = xbt_new0(double, host_count);
+ msg_host_t* hosts = new msg_host_t[host_count];
+ double* computeDurations = new double[host_count];
for (int index = 0; index < host_count; index++) {
jobject jhost = env->GetObjectArrayElement(jhosts, index);
hosts[index] = jhost_get_native(env, jhost);
env->ReleaseDoubleArrayElements(jcomputeDurations_arg, jcomputeDurations, 0);
jdouble* jmessageSizes = env->GetDoubleArrayElements(jmessageSizes_arg, 0);
- double* messageSizes = xbt_new0(double, host_count* host_count);
+ double* messageSizes = new double[host_count * host_count];
for (int index = 0; index < host_count * host_count; index++) {
messageSizes[index] = jmessageSizes[index];
}
/* associate the java task object and the native task */
jtask_bind(jtask, task, env);
+
+ delete[] hosts;
+ delete[] computeDurations;
+ delete[] messageSizes;
}
JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_cancel(JNIEnv * env, jobject jtask)
return nullptr;
//pointer to store the task object pointer.
- msg_task_t *task = xbt_new(msg_task_t,1);
- *task = nullptr;
+ msg_task_t* task = new msg_task_t(nullptr);
/* There should be a cache here */
jobject jcomm = env->NewObject(comm_class, jtask_method_Comm_constructor);
return nullptr;
// pointer to store the task object pointer.
- msg_task_t* task = xbt_new0(msg_task_t, 1);
+ msg_task_t* task = new msg_task_t(nullptr);
jobject jcomm = env->NewObject(comm_class, jtask_method_Comm_constructor);
if (not jcomm) {
return (jint) rv;
}
-
-SG_END_DECL()
+}
#include "jmsg_vm.h"
#include "jmsg_host.h"
-#include "jxbt_utilities.h"
+#include "jxbt_utilities.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "xbt/ex.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
-SG_BEGIN_DECL()
+extern "C" {
extern int JAVA_HOST_LEVEL;
static jfieldID jvm_field_bind;
return static_cast<jobject>(host->extension(JAVA_HOST_LEVEL));
}
-SG_END_DECL()
+}
// Define a new category
XBT_LOG_NEW_DEFAULT_CATEGORY (jtrace, "TRACE for Java(TM)");
-SG_BEGIN_DECL()
+extern "C" {
JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostStateDeclare(JNIEnv * env, jclass cls, jstring js)
{
JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSubWithTime(JNIEnv *env, jclass cls, jdouble,
jstring, jstring, jstring, jdouble)
*/
-
-SG_END_DECL()
+}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "jxbt_utilities.hpp"
#include "xbt/sysdep.h"
-#include "jxbt_utilities.h"
#include <cstdlib> /* abort */
-SG_BEGIN_DECL()
+extern "C" {
jclass jxbt_get_class(JNIEnv * env, const char *name)
{
{
jxbt_throw_by_name(env, "org/simgrid/msg/TaskCancelledException", details);
}
-
-SG_END_DECL()
+}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef JXBT_UTILITY_H
-#define JXBT_UTILITY_H
+#ifndef JXBT_UTILITIES_HPP
+#define JXBT_UTILITIES_HPP
+#include <cstdint>
#include <jni.h>
-#include <stdint.h>
#include <string>
-SG_BEGIN_DECL()
+extern "C" {
/* Search a class and throw an exception if not found */
-jclass jxbt_get_class(JNIEnv * env, const char *name);
+jclass jxbt_get_class(JNIEnv* env, const char* name);
/* Search a method in a class and throw an exception if not found(it's ok to to pass a NULL class: it's a noop) */
-jmethodID jxbt_get_jmethod(JNIEnv * env, jclass cls, const char *name, const char *signature);
+jmethodID jxbt_get_jmethod(JNIEnv* env, jclass cls, const char* name, const char* signature);
/* Like the jxbt_get_class() but get a static method */
-jmethodID jxbt_get_static_jmethod(JNIEnv * env, jclass cls, const char *name, const char *signature);
+jmethodID jxbt_get_static_jmethod(JNIEnv* env, jclass cls, const char* name, const char* signature);
/* Search a field in a class and throw an exception if not found (it's ok to to pass a NULL class: it's a noop) */
-jfieldID jxbt_get_jfield(JNIEnv * env, jclass cls, const char *name, const char *signature);
+jfieldID jxbt_get_jfield(JNIEnv* env, jclass cls, const char* name, const char* signature);
/* Search a method in a class and throw an exception if not found (it's ok to to pass a NULL class: it's a noop) */
-jmethodID jxbt_get_smethod(JNIEnv * env, const char *classname, const char *name, const char *signature);
+jmethodID jxbt_get_smethod(JNIEnv* env, const char* classname, const char* name, const char* signature);
/* Like the jxbt_get_smethod() but get a static method */
-jmethodID jxbt_get_static_smethod(JNIEnv * env, const char *classname, const char *name, const char *signature);
+jmethodID jxbt_get_static_smethod(JNIEnv* env, const char* classname, const char* name, const char* signature);
/* Search a field in a class and throw an exception if not found (it's ok to to pass a NULL class: it's a noop) */
-jfieldID jxbt_get_sfield(JNIEnv * env, const char *classname, const char *name, const char *signature);
-
-#define jxbt_check_res(fun, res, allowed_exceptions, detail) do {\
- if (res != MSG_OK && (res | allowed_exceptions)) { \
- xbt_die("%s failed with error code %d, which is not an allowed exception. Please fix me.",fun,res); \
- } else if (res == MSG_HOST_FAILURE) { \
- jxbt_throw_host_failure(env, detail); \
- } else if (res == MSG_TRANSFER_FAILURE) { \
- jxbt_throw_transfer_failure(env,detail); \
- } else if (res == MSG_TIMEOUT) { \
- jxbt_throw_time_out_failure(env,detail); \
- } else if (res == MSG_TASK_CANCELED){ \
- jxbt_throw_task_cancelled(env,detail); \
- } } while (0)
+jfieldID jxbt_get_sfield(JNIEnv* env, const char* classname, const char* name, const char* signature);
+
+#define jxbt_check_res(fun, res, allowed_exceptions, detail) \
+ do { \
+ if (res != MSG_OK && (res | allowed_exceptions)) { \
+ xbt_die("%s failed with error code %d, which is not an allowed exception. Please fix me.", fun, res); \
+ } else if (res == MSG_HOST_FAILURE) { \
+ jxbt_throw_host_failure(env, detail); \
+ } else if (res == MSG_TRANSFER_FAILURE) { \
+ jxbt_throw_transfer_failure(env, detail); \
+ } else if (res == MSG_TIMEOUT) { \
+ jxbt_throw_time_out_failure(env, detail); \
+ } else if (res == MSG_TASK_CANCELED) { \
+ jxbt_throw_task_cancelled(env, detail); \
+ } \
+ } while (0)
/* Throws an exception according to its name */
void jxbt_throw_by_name(JNIEnv* env, const char* name, std::string msg);
void jxbt_throw_task_cancelled(JNIEnv* env, std::string details);
/** Thrown when looking for a storage from name does not lead to anything */
void jxbt_throw_storage_not_found(JNIEnv* env, std::string invalid_name);
-
-SG_END_DECL()
+}
#endif
-/* Copyright (c) 2010-2016. The SimGrid Team.
+/* Copyright (c) 2010-2017. The SimGrid Team.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-
/*
* This file contains functions that aid users to debug their lua scripts; for instance,
* tables can be easily output and values are represented in a human-readable way. (For instance,
extern "C" {
#include <lauxlib.h>
}
-#include "lua_utils.h"
+#include "lua_utils.hpp"
#include "xbt.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(lua_debug, "Lua bindings (helper functions)");
/* SimGrid Lua bindings */
-#include "lua_private.h"
+#include "lua_private.hpp"
#include "simgrid/s4u/Host.hpp"
extern "C" {
#include <lauxlib.h>
/* SimGrid Lua bindings */
-#include "lua_private.h"
+#include "lua_private.hpp"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/surf/network_interface.hpp"
#include "src/surf/xml/platf_private.hpp"
#include <lauxlib.h>
}
-#include "src/surf/surf_private.h"
+#include "src/surf/surf_private.hpp"
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <simgrid/s4u/Host.hpp>
+++ /dev/null
-/* Copyright (c) 2010-2015. The SimGrid Team. All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-/* SimGrid Lua bindings */
-
-#ifndef LUA_PRIVATE_H
-#define LUA_PRIVATE_H
-
-#include "simgrid/msg.h"
-#include "simgrid_lua.h"
-
-extern "C" {
-
-void sglua_register_host_functions(lua_State* L);
-msg_host_t sglua_check_host(lua_State* L, int index);
-
-void sglua_register_platf_functions(lua_State* L);
-
-const char* sglua_get_msg_error(msg_error_t err);
-
-}
-
-#define lua_ensure(...) \
- _XBT_IF_ONE_ARG(_lua_ensure_ARG1, _lua_ensure_ARGN, __VA_ARGS__)(__VA_ARGS__)
-#define _lua_ensure_ARG1(cond) \
- _lua_ensure_ARGN(cond, "Assertion %s failed", #cond)
-#define _lua_ensure_ARGN(cond, ...) \
- do { if (!(cond)) { luaL_error(L, __VA_ARGS__); return -1;} } while (0)
-
-#endif
--- /dev/null
+/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+/* SimGrid Lua bindings */
+
+#ifndef LUA_PRIVATE_HPP
+#define LUA_PRIVATE_HPP
+
+#include "simgrid/msg.h"
+#include "simgrid_lua.hpp"
+
+extern "C" {
+
+void sglua_register_host_functions(lua_State* L);
+msg_host_t sglua_check_host(lua_State* L, int index);
+
+void sglua_register_platf_functions(lua_State* L);
+
+const char* sglua_get_msg_error(msg_error_t err);
+}
+
+#define lua_ensure(...) _XBT_IF_ONE_ARG(_lua_ensure_ARG1, _lua_ensure_ARGN, __VA_ARGS__)(__VA_ARGS__)
+#define _lua_ensure_ARG1(cond) _lua_ensure_ARGN(cond, "Assertion %s failed", #cond)
+#define _lua_ensure_ARGN(cond, ...) \
+ do { \
+ if (!(cond)) { \
+ luaL_error(L, __VA_ARGS__); \
+ return -1; \
+ } \
+ } while (0)
+
+#endif
/* SimGrid Lua helper functions */
-#ifndef LUA_UTILS_H
-#define LUA_UTILS_H
+#ifndef LUA_UTILS_HPP
+#define LUA_UTILS_HPP
extern "C" {
*
* This structure is used as the userdata parameter of lua_Writer.
*/
-typedef struct s_sglua_buffer {
+struct s_sglua_buffer_t {
char* data;
size_t size;
size_t capacity;
-} s_sglua_buffer_t, *sglua_buffer_t;
+};
+typedef s_sglua_buffer_t* sglua_buffer_t;
const char* sglua_tostring(lua_State* L, int index);
const char* sglua_keyvalue_tostring(lua_State* L, int key_index, int value_index);
-void sglua_stack_dump(lua_State* L, const char *msg);
+void sglua_stack_dump(lua_State* L, const char* msg);
static int sglua_dump_table(lua_State* L);
void* sglua_checkudata_debug(lua_State* L, int ud, const char* tname);
const char* sglua_get_spaces(int length);
int sglua_memory_writer(lua_State* L, const void* source, size_t size, void* userdata);
-
}
#endif
-/* Copyright (c) 2010-2015. The SimGrid Team.
+/* Copyright (c) 2010-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
/* SimGrid Lua bindings */
-#include "lua_private.h"
-#include "lua_utils.h"
+#include "lua_private.hpp"
+#include "lua_utils.hpp"
#include "src/surf/xml/platf.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMGRID_LUA_H
-#define SIMGRID_LUA_H
+#ifndef SIMGRID_LUA_HPP
+#define SIMGRID_LUA_HPP
extern "C" {
#include <lua.h>
/* Plaftorm functions */
/* ********************************************************************************* */
-int console_open(lua_State *L);
-int console_close(lua_State *L);
+int console_open(lua_State* L);
+int console_close(lua_State* L);
int console_add_backbone(lua_State*);
int console_add_host___link(lua_State*);
int console_add_route(lua_State*);
int console_add_ASroute(lua_State*);
int console_AS_open(lua_State*);
-int console_AS_seal(lua_State *L);
+int console_AS_seal(lua_State* L);
int console_set_function(lua_State*);
int console_host_set_property(lua_State*);
}
#include <cstddef>
#include <vector>
-SG_BEGIN_DECL()
+extern "C" {
// Methods used to parse and store the values for timing injections in smpi
-typedef struct s_smpi_factor *smpi_os_factor_t;
-typedef struct s_smpi_factor{
+struct s_smpi_factor_t {
size_t factor=0;
std::vector<double> values;
-} s_smpi_factor_t;
-
-SG_END_DECL()
+};
+typedef s_smpi_factor_t* smpi_os_factor_t;
+}
XBT_PUBLIC(std::vector<s_smpi_factor_t>) parse_factor(const char *smpi_coef_string);
#ifndef MAXMIN_DATATYPES_H
#define MAXMIN_DATATYPES_H
-typedef struct lmm_element *lmm_element_t;
-typedef struct lmm_variable *lmm_variable_t;
-typedef struct lmm_constraint *lmm_constraint_t;
-typedef struct lmm_constraint_light *lmm_constraint_light_t;
-typedef struct lmm_system *lmm_system_t;
+typedef struct s_lmm_element_t* lmm_element_t;
+typedef struct s_lmm_variable_t* lmm_variable_t;
+typedef struct s_lmm_constraint_t* lmm_constraint_t;
+typedef struct s_lmm_constraint_light_t* lmm_constraint_light_t;
+typedef struct s_lmm_system_t* lmm_system_t;
#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SURF_MAXMIN_H
-#define SURF_MAXMIN_H
+#ifndef SURF_MAXMIN_HPP
+#define SURF_MAXMIN_HPP
#include "src/internal_config.h"
-#include "xbt/misc.h"
-#include "xbt/asserts.h"
#include "surf/datatypes.h"
-#include <math.h>
+#include "xbt/asserts.h"
+#include "xbt/misc.h"
+#include <cmath>
namespace simgrid {
namespace surf {
XBT_PUBLIC_DATA(double) sg_surf_precision;
XBT_PUBLIC_DATA(int) sg_concurrency_limit;
-static inline void double_update(double *variable, double value, double precision)
+static inline void double_update(double* variable, double value, double precision)
{
- //printf("Updating %g -= %g +- %g\n",*variable,value,precision);
- //xbt_assert(value==0 || value>precision);
- //Check that precision is higher than the machine-dependent size of the mantissa. If not, brutal rounding may happen,
- //and the precision mechanism is not active...
- //xbt_assert(*variable< (2<<DBL_MANT_DIG)*precision && FLT_RADIX==2);
+ // printf("Updating %g -= %g +- %g\n",*variable,value,precision);
+ // xbt_assert(value==0 || value>precision);
+ // Check that precision is higher than the machine-dependent size of the mantissa. If not, brutal rounding may
+ // happen, and the precision mechanism is not active...
+ // xbt_assert(*variable< (2<<DBL_MANT_DIG)*precision && FLT_RADIX==2);
*variable -= value;
if (*variable < precision)
*variable = 0.0;
return (fabs(value1 - value2) < precision);
}
-SG_BEGIN_DECL()
+extern "C" {
/** @{ @ingroup SURF_lmm */
/**
* @param id Data associated to the constraint (e.g.: a network link)
* @param bound_value The bound value of the constraint
*/
-XBT_PUBLIC(lmm_constraint_t) lmm_constraint_new(lmm_system_t sys, void *id,double bound_value);
+XBT_PUBLIC(lmm_constraint_t) lmm_constraint_new(lmm_system_t sys, void* id, double bound_value);
/**
* @brief Share a constraint
* @param elem A element of constraint of the constraint or NULL
* @return A variable associated to a constraint
*/
-XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst(lmm_system_t sys, lmm_constraint_t cnst, lmm_element_t * elem);
+XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst(lmm_system_t sys, lmm_constraint_t cnst, lmm_element_t* elem);
/**
* @brief Get a var associated to a constraint
*
* @return A variable associated to a constraint
*/
-XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst_safe(lmm_system_t sys, lmm_constraint_t cnst,
- lmm_element_t * elem, lmm_element_t * nextelem, int * numelem);
+XBT_PUBLIC(lmm_variable_t)
+lmm_get_var_from_cnst_safe(lmm_system_t sys, lmm_constraint_t cnst, lmm_element_t* elem, lmm_element_t* nextelem,
+ int* numelem);
/**
* @brief Get the first active constraint of a system
* @param cnst A constraint
* @return The data associated to the constraint
*/
-XBT_PUBLIC(void *) lmm_constraint_id(lmm_constraint_t cnst);
+XBT_PUBLIC(void*) lmm_constraint_id(lmm_constraint_t cnst);
/**
* @brief Get the data associated to a variable
* @param var A variable
* @return The data associated to the variable
*/
-XBT_PUBLIC(void *) lmm_variable_id(lmm_variable_t var);
+XBT_PUBLIC(void*) lmm_variable_id(lmm_variable_t var);
/**
* @brief Update the value of element linking the constraint and the variable
/** Default functions associated to the chosen protocol. When using the lagrangian approach. */
-XBT_PUBLIC(void) lmm_set_default_protocol_function(double (*func_f)(lmm_variable_t var,double x),
- double (*func_fp)(lmm_variable_t var,double x),
- double (*func_fpi)(lmm_variable_t var,double x));
+XBT_PUBLIC(void)
+lmm_set_default_protocol_function(double (*func_f)(lmm_variable_t var, double x),
+ double (*func_fp)(lmm_variable_t var, double x),
+ double (*func_fpi)(lmm_variable_t var, double x));
-XBT_PUBLIC(double func_reno_f) (lmm_variable_t var, double x);
-XBT_PUBLIC(double func_reno_fp) (lmm_variable_t var, double x);
-XBT_PUBLIC(double func_reno_fpi) (lmm_variable_t var, double x);
+XBT_PUBLIC(double) func_reno_f(lmm_variable_t var, double x);
+XBT_PUBLIC(double) func_reno_fp(lmm_variable_t var, double x);
+XBT_PUBLIC(double) func_reno_fpi(lmm_variable_t var, double x);
-XBT_PUBLIC(double func_reno2_f) (lmm_variable_t var, double x);
-XBT_PUBLIC(double func_reno2_fp) (lmm_variable_t var, double x);
-XBT_PUBLIC(double func_reno2_fpi) (lmm_variable_t var, double x);
+XBT_PUBLIC(double) func_reno2_f(lmm_variable_t var, double x);
+XBT_PUBLIC(double) func_reno2_fp(lmm_variable_t var, double x);
+XBT_PUBLIC(double) func_reno2_fpi(lmm_variable_t var, double x);
-XBT_PUBLIC(double func_vegas_f) (lmm_variable_t var, double x);
-XBT_PUBLIC(double func_vegas_fp) (lmm_variable_t var, double x);
-XBT_PUBLIC(double func_vegas_fpi) (lmm_variable_t var, double x);
+XBT_PUBLIC(double) func_vegas_f(lmm_variable_t var, double x);
+XBT_PUBLIC(double) func_vegas_fp(lmm_variable_t var, double x);
+XBT_PUBLIC(double) func_vegas_fpi(lmm_variable_t var, double x);
/** @} */
-SG_END_DECL()
+}
#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
#include "surf/surf.h"
#include <string>
#include <vector>
}
/* activate trace */
- if (trace_active == 1) {
+ if (trace_active) {
THROWF(tracing_error, 0, "Tracing is already active");
}
- trace_active = 1;
+ trace_active = true;
XBT_DEBUG("Tracing is on");
}
return 0;
/* dump trace buffer */
TRACE_last_timestamp_to_dump = surf_get_clock();
- TRACE_paje_dump_buffer(1);
+ TRACE_paje_dump_buffer(true);
/* destroy all data structures of tracing (and free) */
- PJ_container_free_all();
- delete PJ_type_get_root();
+ delete PJ_container_get_root();
+ delete simgrid::instr::Type::getRootType();
rootType = nullptr;
/* close the trace files */
}
/* de-activate trace */
- trace_active = 0;
+ trace_active = false;
XBT_DEBUG("Tracing is off");
XBT_DEBUG("Tracing system is shutdown");
}
void TRACE_global_init()
{
- static int is_initialised = 0;
+ static bool is_initialised = false;
if (is_initialised)
return;
- is_initialised = 1;
+ is_initialised = true;
/* name of the tracefile */
xbt_cfg_register_string (OPT_TRACING_FILENAME, "simgrid.trace", nullptr, "Trace file created by the instrumented SimGrid.");
xbt_cfg_register_boolean(OPT_TRACING, "no", nullptr, "Enable Tracing.");
xbt_cfg_register_alias(OPT_TRACING_ONELINK_ONLY, "tracing/onelink_only");
/* instrumentation can be considered configured now */
- trace_configured = 1;
+ trace_configured = true;
}
static void print_line (const char *option, const char *desc, const char *longdesc, int detailed)
}else{
XBT_DEBUG ("Tracing is being paused.");
}
- trace_enabled = 0;
+ trace_enabled = false;
XBT_DEBUG ("Tracing is paused.");
}
if (previous_trace_state != -1){
trace_enabled = previous_trace_state;
}else{
- trace_enabled = 1;
+ trace_enabled = true;
}
XBT_DEBUG ("Tracing is resumed.");
previous_trace_state = -1;
-/* Copyright (c) 2010-2015. The SimGrid Team.
+/* Copyright (c) 2010-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid_config.h"
-#include "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
#include "src/kernel/routing/NetPoint.hpp"
#include "src/surf/network_interface.hpp"
-#include "src/surf/surf_private.h"
+#include "src/surf/surf_private.hpp"
#include "surf/surf.h"
#include <algorithm>
-typedef enum {
- INSTR_US_DECLARE,
- INSTR_US_SET,
- INSTR_US_ADD,
- INSTR_US_SUB
-} InstrUserVariable;
+enum InstrUserVariable { INSTR_US_DECLARE, INSTR_US_SET, INSTR_US_ADD, INSTR_US_SUB };
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_api, instr, "API");
}
XBT_DEBUG("MARK,declare %s", mark_type);
- simgrid::instr::Type::eventNew(mark_type, PJ_type_get_root());
+ simgrid::instr::Type::getRootType()->getOrCreateEventType(mark_type);
declared_marks.insert(mark_type);
}
if (not mark_value)
THROWF (tracing_error, 1, "mark_value is nullptr");
- simgrid::instr::Type* type = PJ_type_get_root()->getChild(mark_type);
+ simgrid::instr::Type* type = simgrid::instr::Type::getRootType()->byName(mark_type);
if (not type) {
THROWF (tracing_error, 1, "mark_type with name (%s) is not declared", mark_type);
}
- char white[INSTR_DEFAULT_STR_SIZE] = "1.0 1.0 1.0";
if (not mark_color)
- mark_color = white;
+ mark_color = "1.0 1.0 1.0" /*white*/;
XBT_DEBUG("MARK,declare_value %s %s %s", mark_type, mark_value, mark_color);
- new simgrid::instr::Value(mark_value, mark_color, type);
+ simgrid::instr::Value::byNameOrCreate(mark_value, mark_color, type);
}
/** \ingroup TRACE_mark
THROWF (tracing_error, 1, "mark_value is nullptr");
//check if mark_type is already declared
- simgrid::instr::Type* type = PJ_type_get_root()->getChild(mark_type);
+ simgrid::instr::Type* type = simgrid::instr::Type::getRootType()->byName(mark_type);
if (not type) {
THROWF (tracing_error, 1, "mark_type with name (%s) is not declared", mark_type);
}
XBT_DEBUG("MARK %s %s", mark_type, mark_value);
new simgrid::instr::NewEvent(MSG_get_clock(), PJ_container_get_root(), type,
- simgrid::instr::Value::get(mark_value, type));
+ simgrid::instr::Value::byName(mark_value, type));
}
/** \ingroup TRACE_mark
if (created != filter->end()) { // declared, let's work
char valuestr[100];
snprintf(valuestr, 100, "%g", value);
- container_t container = PJ_container_get(resource);
- simgrid::instr::Type* type = container->type_->getChild(variable);
+ container_t container = simgrid::instr::Container::byName(resource);
+ simgrid::instr::Type* type = container->type_->byName(variable);
switch (what){
case INSTR_US_SET:
new simgrid::instr::SetVariableEvent(time, container, type, value);
std::vector<simgrid::surf::LinkImpl*> route;
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(src_elm, dst_elm, &route, nullptr);
for (auto const& link : route)
- instr_user_variable(time, link->cname(), variable, father_type, value, what, nullptr, &user_link_variables);
+ instr_user_variable(time, link->getCname(), variable, father_type, value, what, nullptr, &user_link_variables);
}
/** \ingroup TRACE_API
*/
void TRACE_host_set_state(const char* host, const char* state, const char* value_str)
{
- container_t container = PJ_container_get(host);
- simgrid::instr::Type* type = container->type_->getChild(state);
- simgrid::instr::Value* val = simgrid::instr::Value::get_or_new(
- value_str, nullptr, type); /* if user didn't declare a value with a color, use nullptr color */
+ container_t container = simgrid::instr::Container::byName(host);
+ simgrid::instr::Type* type = container->type_->byName(state);
+ simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate(
+ value_str, "", type); /* if user didn't declare a value with a color, use no color */
new simgrid::instr::SetStateEvent(MSG_get_clock(), container, type, val);
}
*/
void TRACE_host_push_state(const char* host, const char* state, const char* value_str)
{
- container_t container = PJ_container_get(host);
- simgrid::instr::Type* type = container->type_->getChild(state);
- simgrid::instr::Value* val = simgrid::instr::Value::get_or_new(
- value_str, nullptr, type); /* if user didn't declare a value with a color, use nullptr color */
+ container_t container = simgrid::instr::Container::byName(host);
+ simgrid::instr::Type* type = container->type_->byName(state);
+ simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate(
+ value_str, "", type); /* if user didn't declare a value with a color, use no color */
new simgrid::instr::PushStateEvent(MSG_get_clock(), container, type, val);
}
*/
void TRACE_host_pop_state (const char *host, const char *state)
{
- container_t container = PJ_container_get(host);
- simgrid::instr::Type* type = container->type_->getChild(state);
+ container_t container = simgrid::instr::Container::byName(host);
+ simgrid::instr::Type* type = container->type_->byName(state);
new simgrid::instr::PopStateEvent(MSG_get_clock(), container, type);
}
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Host.hpp"
-
+#include "src/instr/instr_private.hpp"
#include "surf/surf.h"
-
-#include "src/instr/instr_private.h"
-
#include <unordered_map>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_containers, instr, "Paje tracing event system (containers)");
+extern FILE* tracing_file;
+extern std::map<container_t, FILE*> tracing_files; // TI specific
+double prefix = 0.0; // TI specific
+
static container_t rootContainer = nullptr; /* the root container */
-static std::unordered_map<std::string, simgrid::instr::Container*>
- allContainers; /* all created containers indexed by name */
+static std::unordered_map<std::string, container_t> allContainers; /* all created containers indexed by name */
std::set<std::string> trivaNodeTypes; /* all host types defined */
std::set<std::string> trivaEdgeTypes; /* all link types defined */
return type_id++;
}
+container_t PJ_container_get_root()
+{
+ return rootContainer;
+}
+
void PJ_container_set_root (container_t root)
{
rootContainer = root;
}
-simgrid::instr::Container::Container(const char* name, simgrid::instr::e_container_types kind, Container* father)
- : name_(xbt_strdup(name)), father_(father)
-{
- xbt_assert(name != nullptr, "Container name cannot be nullptr");
+namespace simgrid {
+namespace instr {
+Container::Container(std::string name, e_container_types kind, Container* father)
+ : kind_(kind), name_(name), father_(father)
+{
static long long int container_id = 0;
- id_ = bprintf("%lld", container_id); // id (or alias) of the container
+ id_ = std::to_string(container_id); // id (or alias) of the container
container_id++;
- //Search for network_element_t
- switch (kind){
- case simgrid::instr::INSTR_HOST:
- this->netpoint_ = sg_host_by_name(name)->pimpl_netpoint;
- xbt_assert(this->netpoint_, "Element '%s' not found", name);
+ if (father_) {
+ level_ = father_->level_ + 1;
+ XBT_DEBUG("new container %s, child of %s", name.c_str(), father->name_.c_str());
+ }
+
+ // Search for network_element_t for AS, ROUTER and HOST
+ // Name the kind of container. For AS otherwise, the name depends on its level
+ std::string typeNameBuff;
+ switch (kind_) {
+ case INSTR_AS:
+ netpoint_ = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
+ xbt_assert(netpoint_, "Element '%s' not found", name.c_str());
+ typeNameBuff = std::string("L") + std::to_string(level_);
break;
- case simgrid::instr::INSTR_ROUTER:
- this->netpoint_ = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
- xbt_assert(this->netpoint_, "Element '%s' not found", name);
+ case INSTR_ROUTER:
+ netpoint_ = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
+ xbt_assert(netpoint_, "Element '%s' not found", name.c_str());
+ typeNameBuff = std::string("ROUTER");
break;
- case simgrid::instr::INSTR_AS:
- this->netpoint_ = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
- xbt_assert(this->netpoint_, "Element '%s' not found", name);
+ case INSTR_HOST:
+ netpoint_ = sg_host_by_name(name.c_str())->pimpl_netpoint;
+ xbt_assert(netpoint_, "Element '%s' not found", name.c_str());
+ typeNameBuff = std::string("HOST");
+ break;
+ case INSTR_LINK:
+ typeNameBuff = std::string("LINK");
+ break;
+ case INSTR_SMPI:
+ typeNameBuff = std::string("MPI");
+ break;
+ case INSTR_MSG_PROCESS:
+ typeNameBuff = std::string("MSG_PROCESS");
+ break;
+ case INSTR_MSG_VM:
+ typeNameBuff = std::string("MSG_VM");
+ break;
+ case INSTR_MSG_TASK:
+ typeNameBuff = std::string("MSG_TASK");
break;
default:
- this->netpoint_ = nullptr;
+ THROWF(tracing_error, 0, "new container kind is unknown.");
break;
}
if (father_) {
- this->level_ = father_->level_ + 1;
- XBT_DEBUG("new container %s, child of %s", name, father->name_);
- }
-
- // type definition (method depends on kind of this new container)
- this->kind_ = kind;
- if (this->kind_ == simgrid::instr::INSTR_AS) {
- //if this container is of an AS, its type name depends on its level
- char as_typename[INSTR_DEFAULT_STR_SIZE];
- snprintf(as_typename, INSTR_DEFAULT_STR_SIZE, "L%d", this->level_);
- if (this->father_) {
- this->type_ = this->father_->type_->getChildOrNull(as_typename);
- if (this->type_ == nullptr) {
- this->type_ = simgrid::instr::Type::containerNew(as_typename, this->father_->type_);
- }
- }else{
- this->type_ = simgrid::instr::Type::containerNew("0", nullptr);
- }
- }else{
- //otherwise, the name is its kind
- char typeNameBuff[INSTR_DEFAULT_STR_SIZE];
- switch (this->kind_) {
- case simgrid::instr::INSTR_HOST:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "HOST");
- break;
- case simgrid::instr::INSTR_LINK:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "LINK");
- break;
- case simgrid::instr::INSTR_ROUTER:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "ROUTER");
- break;
- case simgrid::instr::INSTR_SMPI:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "MPI");
- break;
- case simgrid::instr::INSTR_MSG_PROCESS:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "MSG_PROCESS");
- break;
- case simgrid::instr::INSTR_MSG_VM:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "MSG_VM");
- break;
- case simgrid::instr::INSTR_MSG_TASK:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "MSG_TASK");
- break;
- default:
- THROWF (tracing_error, 0, "new container kind is unknown.");
- break;
- }
- simgrid::instr::Type* type = this->father_->type_->getChildOrNull(typeNameBuff);
- if (type == nullptr){
- this->type_ = simgrid::instr::Type::containerNew(typeNameBuff, this->father_->type_);
- }else{
- this->type_ = type;
- }
- }
- this->children_ = xbt_dict_new_homogeneous(nullptr);
- if (this->father_) {
- xbt_dict_set(this->father_->children_, this->name_, this, nullptr);
- LogContainerCreation(this);
+ type_ = father_->type_->getOrCreateContainerType(typeNameBuff);
+ father_->children_.insert({name_, this});
+ logCreation();
+ } else if (kind_ == INSTR_AS) {
+ type_ = Type::createRootType();
}
//register all kinds by name
- if (not allContainers.emplace(this->name_, this).second) {
- THROWF(tracing_error, 1, "container %s already present in allContainers data structure", this->name_);
+ if (not allContainers.emplace(name_, this).second) {
+ THROWF(tracing_error, 1, "container %s already present in allContainers data structure", name_.c_str());
}
- XBT_DEBUG("Add container name '%s'", this->name_);
+ XBT_DEBUG("Add container name '%s'", name_.c_str());
//register NODE types for triva configuration
- if (this->kind_ == simgrid::instr::INSTR_HOST || this->kind_ == simgrid::instr::INSTR_LINK ||
- this->kind_ == simgrid::instr::INSTR_ROUTER) {
- trivaNodeTypes.insert(this->type_->name_);
- }
+ if (kind_ == INSTR_HOST || kind_ == INSTR_LINK || kind_ == INSTR_ROUTER)
+ trivaNodeTypes.insert(type_->getName());
}
-simgrid::instr::Container::~Container()
+
+Container::~Container()
{
- XBT_DEBUG("destroy container %s", name_);
+ XBT_DEBUG("destroy container %s", name_.c_str());
+ // Begin with destroying my own children
+ for (auto child : children_) {
+ delete child.second;
+ }
- // obligation to dump previous events because they might
- // reference the container that is about to be destroyed
+ // obligation to dump previous events because they might reference the container that is about to be destroyed
TRACE_last_timestamp_to_dump = surf_get_clock();
- TRACE_paje_dump_buffer(1);
+ TRACE_paje_dump_buffer(true);
// trace my destruction
if (not TRACE_disable_destroy() && this != PJ_container_get_root()) {
- // do not trace the container destruction if user requests
- // or if the container is root
- LogContainerDestruction(this);
+ // do not trace the container destruction if user requests or if the container is root
+ logDestruction();
}
- // remove it from allContainers data structure
+ // remove me from the allContainers data structure
allContainers.erase(name_);
-
- // free
- xbt_free(name_);
- xbt_free(id_);
- xbt_dict_free(&children_);
-}
-
-simgrid::instr::Container* PJ_container_get(const char* name)
-{
- container_t ret = PJ_container_get_or_null (name);
- if (ret == nullptr){
- THROWF(tracing_error, 1, "container with name %s not found", name);
- }
- return ret;
}
-simgrid::instr::Container* PJ_container_get_or_null(const char* name)
+Container* Container::byNameOrNull(std::string name)
{
auto cont = allContainers.find(name);
return cont == allContainers.end() ? nullptr : cont->second;
}
-simgrid::instr::Container* PJ_container_get_root()
+Container* Container::byName(std::string name)
{
- return rootContainer;
+ Container* ret = Container::byNameOrNull(name);
+ if (ret == nullptr)
+ THROWF(tracing_error, 1, "container with name %s not found", name.c_str());
+
+ return ret;
}
-void PJ_container_remove_from_parent (container_t child)
+void Container::removeFromParent()
{
- if (child == nullptr){
- THROWF (tracing_error, 0, "can't remove from parent with a nullptr child");
- }
-
- container_t parent = child->father_;
- if (parent){
- XBT_DEBUG("removeChildContainer (%s) FromContainer (%s) ", child->name_, parent->name_);
- xbt_dict_remove(parent->children_, child->name_);
+ if (father_) {
+ XBT_DEBUG("removeChildContainer (%s) FromContainer (%s) ", name_.c_str(), father_->name_.c_str());
+ father_->children_.erase(name_);
}
}
-static void recursiveDestroyContainer (container_t container)
+void Container::logCreation()
{
- if (container == nullptr){
- THROWF (tracing_error, 0, "trying to recursively destroy a nullptr container");
- }
- XBT_DEBUG("recursiveDestroyContainer %s", container->name_);
- xbt_dict_cursor_t cursor = nullptr;
- container_t child;
- char *child_name;
- xbt_dict_foreach (container->children_, cursor, child_name, child) {
- recursiveDestroyContainer (child);
+ double timestamp = SIMIX_get_clock();
+ std::stringstream stream;
+
+ XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, simgrid::instr::PAJE_CreateContainer, timestamp);
+
+ if (instr_fmt_type == instr_fmt_paje) {
+ stream << std::fixed << std::setprecision(TRACE_precision());
+ stream << simgrid::instr::PAJE_CreateContainer;
+ stream << " ";
+ /* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
+ if (timestamp < 1e-12)
+ stream << 0;
+ else
+ stream << timestamp;
+ stream << " " << id_ << " " << type_->getId() << " " << father_->id_ << " \"" << name_ << "\"" << std::endl;
+ fprintf(tracing_file, "%s", stream.str().c_str());
+ XBT_DEBUG("Dump %s", stream.str().c_str());
+ stream.str("");
+ stream.clear();
+ } else if (instr_fmt_type == instr_fmt_TI) {
+ // if we are in the mode with only one file
+ static FILE* ti_unique_file = nullptr;
+
+ if (tracing_files.empty()) {
+ // generate unique run id with time
+ prefix = xbt_os_time();
+ }
+
+ if (not xbt_cfg_get_boolean("tracing/smpi/format/ti-one-file") || ti_unique_file == nullptr) {
+ char* folder_name = bprintf("%s_files", TRACE_get_filename());
+ char* filename = bprintf("%s/%f_%s.txt", folder_name, prefix, name_.c_str());
+#ifdef WIN32
+ _mkdir(folder_name);
+#else
+ mkdir(folder_name, S_IRWXU | S_IRWXG | S_IRWXO);
+#endif
+ ti_unique_file = fopen(filename, "w");
+ xbt_assert(ti_unique_file, "Tracefile %s could not be opened for writing: %s", filename, strerror(errno));
+ fprintf(tracing_file, "%s\n", filename);
+
+ xbt_free(folder_name);
+ xbt_free(filename);
+ }
+
+ tracing_files.insert({this, ti_unique_file});
+ } else {
+ THROW_IMPOSSIBLE;
}
- delete container;
}
-void PJ_container_free_all ()
+void Container::logDestruction()
{
- container_t root = PJ_container_get_root();
- if (root == nullptr){
- THROWF (tracing_error, 0, "trying to free all containers, but root is nullptr");
- }
- recursiveDestroyContainer (root);
- rootContainer = nullptr;
-
- //checks
- if (not allContainers.empty()) {
- THROWF(tracing_error, 0, "some containers still present even after destroying all of them");
+ std::stringstream stream;
+ double timestamp = SIMIX_get_clock();
+
+ XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, simgrid::instr::PAJE_DestroyContainer, timestamp);
+
+ if (instr_fmt_type == instr_fmt_paje) {
+ stream << std::fixed << std::setprecision(TRACE_precision());
+ stream << simgrid::instr::PAJE_DestroyContainer;
+ stream << " ";
+ /* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
+ if (timestamp < 1e-12)
+ stream << 0;
+ else
+ stream << timestamp;
+ stream << " " << type_->getId() << " " << id_ << std::endl;
+ fprintf(tracing_file, "%s", stream.str().c_str());
+ XBT_DEBUG("Dump %s", stream.str().c_str());
+ stream.str("");
+ stream.clear();
+ } else if (instr_fmt_type == instr_fmt_TI) {
+ if (not xbt_cfg_get_boolean("tracing/smpi/format/ti-one-file") || tracing_files.size() == 1) {
+ FILE* f = tracing_files.at(this);
+ fclose(f);
+ }
+ tracing_files.erase(this);
+ } else {
+ THROW_IMPOSSIBLE;
}
}
+}
+}
-/* Copyright (c) 2010, 2012-2015. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/instr/instr_private.h"
#include "simgrid/sg_config.h"
+#include "src/instr/instr_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_header, instr, "Paje tracing event system (header)");
extern FILE *tracing_file;
-static void TRACE_header_PajeDefineContainerType (int basic, int size)
+static void TRACE_header_PajeDefineContainerType(bool basic)
{
fprintf(tracing_file, "%%EventDef PajeDefineContainerType %d\n", simgrid::instr::PAJE_DefineContainerType);
fprintf(tracing_file, "%% Alias string\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeDefineVariableType (int basic, int size)
+static void TRACE_header_PajeDefineVariableType(bool basic)
{
fprintf(tracing_file, "%%EventDef PajeDefineVariableType %d\n", simgrid::instr::PAJE_DefineVariableType);
fprintf(tracing_file, "%% Alias string\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeDefineStateType (int basic, int size)
+static void TRACE_header_PajeDefineStateType(bool basic)
{
fprintf(tracing_file, "%%EventDef PajeDefineStateType %d\n", simgrid::instr::PAJE_DefineStateType);
fprintf(tracing_file, "%% Alias string\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeDefineEventType (int basic, int size)
+static void TRACE_header_PajeDefineEventType(bool basic)
{
fprintf(tracing_file, "%%EventDef PajeDefineEventType %d\n", simgrid::instr::PAJE_DefineEventType);
fprintf(tracing_file, "%% Alias string\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeDefineLinkType (int basic, int size)
+static void TRACE_header_PajeDefineLinkType(bool basic)
{
fprintf(tracing_file, "%%EventDef PajeDefineLinkType %d\n", simgrid::instr::PAJE_DefineLinkType);
fprintf(tracing_file, "%% Alias string\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeDefineEntityValue (int basic, int size)
+static void TRACE_header_PajeDefineEntityValue(bool basic)
{
fprintf(tracing_file, "%%EventDef PajeDefineEntityValue %d\n", simgrid::instr::PAJE_DefineEntityValue);
fprintf(tracing_file, "%% Alias string\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeCreateContainer (int basic, int size)
+static void TRACE_header_PajeCreateContainer()
{
fprintf(tracing_file, "%%EventDef PajeCreateContainer %d\n", simgrid::instr::PAJE_CreateContainer);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeDestroyContainer (int basic, int size)
+static void TRACE_header_PajeDestroyContainer()
{
fprintf(tracing_file, "%%EventDef PajeDestroyContainer %d\n", simgrid::instr::PAJE_DestroyContainer);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeSetVariable (int basic, int size)
+static void TRACE_header_PajeSetVariable()
{
fprintf(tracing_file, "%%EventDef PajeSetVariable %d\n", simgrid::instr::PAJE_SetVariable);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeAddVariable (int basic, int size)
+static void TRACE_header_PajeAddVariable()
{
fprintf(tracing_file, "%%EventDef PajeAddVariable %d\n", simgrid::instr::PAJE_AddVariable);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeSubVariable (int basic, int size)
+static void TRACE_header_PajeSubVariable()
{
fprintf(tracing_file, "%%EventDef PajeSubVariable %d\n", simgrid::instr::PAJE_SubVariable);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-
-static void TRACE_header_PajeSetState (int basic, int size)
+static void TRACE_header_PajeSetState()
{
fprintf(tracing_file, "%%EventDef PajeSetState %d\n", simgrid::instr::PAJE_SetState);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajePushState (int basic, int size)
+static void TRACE_header_PajePushState(int size)
{
fprintf(tracing_file, "%%EventDef PajePushState %d\n", simgrid::instr::PAJE_PushState);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajePopState (int basic, int size)
+static void TRACE_header_PajePopState()
{
fprintf(tracing_file, "%%EventDef PajePopState %d\n", simgrid::instr::PAJE_PopState);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeResetState (int basic, int size)
+static void TRACE_header_PajeResetState(bool basic)
{
- if (basic) return;
+ if (basic)
+ return;
fprintf(tracing_file, "%%EventDef PajeResetState %d\n", simgrid::instr::PAJE_ResetState);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeStartLink (int basic, int size)
+static void TRACE_header_PajeStartLink(bool basic, int size)
{
fprintf(tracing_file, "%%EventDef PajeStartLink %d\n", simgrid::instr::PAJE_StartLink);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeEndLink (int basic, int size)
+static void TRACE_header_PajeEndLink(bool basic)
{
fprintf(tracing_file, "%%EventDef PajeEndLink %d\n", simgrid::instr::PAJE_EndLink);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-static void TRACE_header_PajeNewEvent (int basic, int size)
+static void TRACE_header_PajeNewEvent()
{
fprintf(tracing_file, "%%EventDef PajeNewEvent %d\n", simgrid::instr::PAJE_NewEvent);
fprintf(tracing_file, "%% Time date\n");
fprintf(tracing_file, "%%EndEventDef\n");
}
-void TRACE_header(int basic, int size)
+void TRACE_header(bool basic, int size)
{
XBT_DEBUG ("Define paje header");
- TRACE_header_PajeDefineContainerType (basic, size);
- TRACE_header_PajeDefineVariableType (basic, size);
- TRACE_header_PajeDefineStateType (basic, size);
- TRACE_header_PajeDefineEventType (basic, size);
- TRACE_header_PajeDefineLinkType (basic, size);
- TRACE_header_PajeDefineEntityValue (basic, size);
- TRACE_header_PajeCreateContainer (basic, size);
- TRACE_header_PajeDestroyContainer (basic, size);
- TRACE_header_PajeSetVariable (basic, size);
- TRACE_header_PajeAddVariable (basic, size);
- TRACE_header_PajeSubVariable (basic, size);
- TRACE_header_PajeSetState (basic, size);
- TRACE_header_PajePushState (basic, size);
- TRACE_header_PajePopState (basic, size);
- TRACE_header_PajeResetState (basic, size);
+ TRACE_header_PajeDefineContainerType(basic);
+ TRACE_header_PajeDefineVariableType(basic);
+ TRACE_header_PajeDefineStateType(basic);
+ TRACE_header_PajeDefineEventType(basic);
+ TRACE_header_PajeDefineLinkType(basic);
+ TRACE_header_PajeDefineEntityValue(basic);
+ TRACE_header_PajeCreateContainer();
+ TRACE_header_PajeDestroyContainer();
+ TRACE_header_PajeSetVariable();
+ TRACE_header_PajeAddVariable();
+ TRACE_header_PajeSubVariable();
+ TRACE_header_PajeSetState();
+ TRACE_header_PajePushState(size);
+ TRACE_header_PajePopState();
+ TRACE_header_PajeResetState(basic);
TRACE_header_PajeStartLink (basic, size);
- TRACE_header_PajeEndLink (basic, size);
- TRACE_header_PajeNewEvent (basic, size);
+ TRACE_header_PajeEndLink(basic);
+ TRACE_header_PajeNewEvent();
}
-/* Copyright (c) 2010-2016. The SimGrid Team.
+/* Copyright (c) 2010-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/instr/instr_private.h"
-#include "src/instr/instr_smpi.h"
+#include "simgrid/sg_config.h"
+#include "src/instr/instr_private.hpp"
+#include "src/instr/instr_smpi.hpp"
#include "src/smpi/include/private.hpp"
#include "typeinfo"
#include "xbt/virtu.h" /* sg_cmdline */
-#include "simgrid/sg_config.h"
-
-#include <sstream>
-#include <vector>
-#include <iomanip> /** std::setprecision **/
-#include <sys/stat.h>
-#ifdef WIN32
-#include <direct.h> // _mkdir
-#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_trace, instr, "tracing event system");
static std::stringstream stream;
FILE *tracing_file = nullptr;
-static xbt_dict_t tracing_files = nullptr; // TI specific
-static double prefix=0.0; // TI specific
+std::map<container_t, FILE*> tracing_files; // TI specific
std::vector<simgrid::instr::PajeEvent*> buffer;
void buffer_debug(std::vector<simgrid::instr::PajeEvent*>* buf);
double TRACE_last_timestamp_to_dump = 0;
//dumps the trace file until the timestamp TRACE_last_timestamp_to_dump
-void TRACE_paje_dump_buffer (int force)
+void TRACE_paje_dump_buffer(bool force)
{
if (not TRACE_is_enabled())
return;
}
/* internal do the instrumentation module */
-static void insert_into_buffer(simgrid::instr::PajeEvent* tbi)
+void simgrid::instr::PajeEvent::insertIntoBuffer()
{
- if (TRACE_buffer() == 0){
- tbi->print ();
- delete tbi;
+ if (not TRACE_buffer()) {
+ print();
+ delete this;
return;
}
buffer_debug(&buffer);
- XBT_DEBUG("%s: insert event_type=%d, timestamp=%f, buffersize=%zu)", __FUNCTION__, (int)tbi->eventType_,
- tbi->timestamp_, buffer.size());
+ XBT_DEBUG("%s: insert event_type=%d, timestamp=%f, buffersize=%zu)", __FUNCTION__, static_cast<int>(eventType_),
+ timestamp_, buffer.size());
std::vector<simgrid::instr::PajeEvent*>::reverse_iterator i;
for (i = buffer.rbegin(); i != buffer.rend(); ++i) {
simgrid::instr::PajeEvent* e1 = *i;
- XBT_DEBUG("compare to %p is of type %d; timestamp:%f", e1, (int)e1->eventType_, e1->timestamp_);
- if (e1->timestamp_ <= tbi->timestamp_)
+ XBT_DEBUG("compare to %p is of type %d; timestamp:%f", e1, static_cast<int>(e1->eventType_), e1->timestamp_);
+ if (e1->timestamp_ <= timestamp_)
break;
}
if (i == buffer.rend())
else if (i == buffer.rbegin())
XBT_DEBUG("%s: inserted at end", __FUNCTION__);
else
- XBT_DEBUG("%s: inserted at pos= %zd from its end", __FUNCTION__,
- std::distance(buffer.rbegin(),i));
- buffer.insert(i.base(), tbi);
+ XBT_DEBUG("%s: inserted at pos= %zd from its end", __FUNCTION__, std::distance(buffer.rbegin(), i));
+ buffer.insert(i.base(), this);
buffer_debug(&buffer);
}
XBT_DEBUG("Filename %s is closed", filename);
}
-void LogContainerTypeDefinition(simgrid::instr::Type* type)
+void simgrid::instr::Type::logContainerTypeDefinition()
{
XBT_DEBUG("%s: event_type=%d", __FUNCTION__, simgrid::instr::PAJE_DefineContainerType);
//print it
TRACE_precision(), 0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineContainerType;
- stream << " " << type->id_ << " " << type->father_->id_ << " " << type->name_;
+ stream << " " << id_ << " " << father_->getId() << " " << name_;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
} else {
THROW_IMPOSSIBLE;
}
- //--
}
-void LogVariableTypeDefinition(simgrid::instr::Type* type)
+void simgrid::instr::Type::logVariableTypeDefinition()
{
-
XBT_DEBUG("%s: event_type=%d", __FUNCTION__, simgrid::instr::PAJE_DefineVariableType);
//print it
-if (instr_fmt_type == instr_fmt_paje) {
- XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, simgrid::instr::PAJE_DefineVariableType,
- TRACE_precision(), 0.);
- stream << std::fixed << std::setprecision(TRACE_precision());
- stream << simgrid::instr::PAJE_DefineVariableType;
- stream << " " << type->id_ << " " << type->father_->id_ << " " << type->name_;
- if (type->color_)
- stream << " \"" << type->color_ << "\"";
- print_row();
+ if (instr_fmt_type == instr_fmt_paje) {
+ XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, simgrid::instr::PAJE_DefineVariableType,
+ TRACE_precision(), 0.);
+ stream << std::fixed << std::setprecision(TRACE_precision());
+ stream << simgrid::instr::PAJE_DefineVariableType;
+ stream << " " << id_ << " " << father_->getId() << " " << name_;
+ if (isColored())
+ stream << " \"" << color_ << "\"";
+ print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
} else {
}
}
-void LogStateTypeDefinition(simgrid::instr::Type* type)
+void simgrid::instr::Type::logStateTypeDefinition()
{
//print it
-if (instr_fmt_type == instr_fmt_paje) {
- XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, simgrid::instr::PAJE_DefineStateType, TRACE_precision(),
- 0.);
- stream << std::fixed << std::setprecision(TRACE_precision());
- stream << simgrid::instr::PAJE_DefineStateType;
- stream << " " << type->id_ << " " << type->father_->id_ << " " << type->name_;
- print_row();
+ if (instr_fmt_type == instr_fmt_paje) {
+ XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, simgrid::instr::PAJE_DefineStateType,
+ TRACE_precision(), 0.);
+ stream << std::fixed << std::setprecision(TRACE_precision());
+ stream << simgrid::instr::PAJE_DefineStateType;
+ stream << " " << id_ << " " << father_->getId() << " " << name_;
+ print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
} else {
}
}
-void LogDefineEventType(simgrid::instr::Type* type)
+void simgrid::instr::Type::logDefineEventType()
{
//print it
if (instr_fmt_type == instr_fmt_paje) {
TRACE_precision(), 0.);
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineEventType;
- stream << " " << type->id_ << " " << type->father_->id_ << " " << type->name_;
+ stream << " " << id_ << " " << father_->getId() << " " << name_;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
}
}
-void LogLinkTypeDefinition(simgrid::instr::Type* type, simgrid::instr::Type* source, simgrid::instr::Type* dest)
+void simgrid::instr::Type::logLinkTypeDefinition(simgrid::instr::Type* source, simgrid::instr::Type* dest)
{
XBT_DEBUG("%s: event_type=%d", __FUNCTION__, simgrid::instr::PAJE_DefineLinkType);
//print it
-if (instr_fmt_type == instr_fmt_paje) {
- XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, simgrid::instr::PAJE_DefineLinkType, TRACE_precision(),
- 0.);
- stream << std::fixed << std::setprecision(TRACE_precision());
- stream << simgrid::instr::PAJE_DefineLinkType;
- stream << " " << type->id_ << " " << type->father_->id_ << " " << source->id_ << " " << dest->id_ << " "
- << type->name_;
- print_row();
+ if (instr_fmt_type == instr_fmt_paje) {
+ XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, simgrid::instr::PAJE_DefineLinkType, TRACE_precision(),
+ 0.);
+ stream << std::fixed << std::setprecision(TRACE_precision());
+ stream << simgrid::instr::PAJE_DefineLinkType;
+ stream << " " << id_ << " " << father_->getId() << " " << source->getId() << " " << dest->getId() << " " << name_;
+ print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
} else {
}
}
-void LogEntityValue(simgrid::instr::Value* val)
+void simgrid::instr::Value::print()
{
XBT_DEBUG("%s: event_type=%d", __FUNCTION__, simgrid::instr::PAJE_DefineEntityValue);
//print it
-if (instr_fmt_type == instr_fmt_paje) {
+ if (instr_fmt_type == instr_fmt_paje) {
stream << std::fixed << std::setprecision(TRACE_precision());
stream << simgrid::instr::PAJE_DefineEntityValue;
- stream << " " << val->id_ << " " << val->father_->id_ << " " << val->name_;
- if (val->color_)
- stream << " \"" << val->color_ << "\"";
+ stream << " " << id_ << " " << father_->getId() << " " << name_;
+ if (isColored())
+ stream << " \"" << color_ << "\"";
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
}
-void LogContainerCreation (container_t container)
-{
- double timestamp = SIMIX_get_clock();
-
- XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, simgrid::instr::PAJE_CreateContainer, timestamp);
-
- if (instr_fmt_type == instr_fmt_paje) {
- stream << std::fixed << std::setprecision(TRACE_precision());
- stream << simgrid::instr::PAJE_CreateContainer;
- stream << " ";
- /* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
- if (timestamp < 1e-12)
- stream << 0;
- else
- stream << timestamp;
- stream << " " << container->id_ << " " << container->type_->id_ << " " << container->father_->id_ << " \""
- << container->name_ << "\"";
-
- print_row();
- } else if (instr_fmt_type == instr_fmt_TI) {
- // if we are in the mode with only one file
- static FILE* ti_unique_file = nullptr;
-
- if (tracing_files == nullptr) {
- tracing_files = xbt_dict_new_homogeneous(nullptr);
- // generate unique run id with time
- prefix = xbt_os_time();
- }
-
- if (not xbt_cfg_get_boolean("tracing/smpi/format/ti-one-file") || ti_unique_file == nullptr) {
- char* folder_name = bprintf("%s_files", TRACE_get_filename());
- char* filename = bprintf("%s/%f_%s.txt", folder_name, prefix, container->name_);
-#ifdef WIN32
- _mkdir(folder_name);
-#else
- mkdir(folder_name, S_IRWXU | S_IRWXG | S_IRWXO);
-#endif
- ti_unique_file = fopen(filename, "w");
- xbt_assert(ti_unique_file, "Tracefile %s could not be opened for writing: %s", filename, strerror(errno));
- fprintf(tracing_file, "%s\n", filename);
-
- xbt_free(folder_name);
- xbt_free(filename);
- }
-
- xbt_dict_set(tracing_files, container->name_, (void*)ti_unique_file, nullptr);
- } else {
- THROW_IMPOSSIBLE;
- }
-}
-
-void LogContainerDestruction(container_t container)
-{
- double timestamp = SIMIX_get_clock();
-
- XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, simgrid::instr::PAJE_DestroyContainer, timestamp);
-
- if (instr_fmt_type == instr_fmt_paje) {
- stream << std::fixed << std::setprecision(TRACE_precision());
- stream << simgrid::instr::PAJE_DestroyContainer;
- stream << " ";
- /* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
- if (timestamp < 1e-12)
- stream << 0;
- else
- stream << timestamp;
- stream << " " << container->type_->id_ << " " << container->id_;
- print_row();
- } else if (instr_fmt_type == instr_fmt_TI) {
- if (not xbt_cfg_get_boolean("tracing/smpi/format/ti-one-file") || xbt_dict_length(tracing_files) == 1) {
- FILE* f = (FILE*)xbt_dict_get_or_null(tracing_files, container->name_);
- fclose(f);
- }
- xbt_dict_remove(tracing_files, container->name_);
- } else {
- THROW_IMPOSSIBLE;
- }
-}
-
simgrid::instr::SetVariableEvent::SetVariableEvent(double timestamp, container_t container, Type* type, double value)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_SetVariable), value(value)
{
- this->eventType_ = PAJE_SetVariable;
- this->timestamp_ = timestamp;
- this->type = type;
- this->container = container;
- this->value = value;
-
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
-
- insert_into_buffer (this);
+ insertIntoBuffer();
}
void simgrid::instr::SetVariableEvent::print()
stream << std::fixed << std::setprecision(TRACE_precision());
stream << (int)this->eventType_;
print_timestamp(this);
- stream << " " << type->id_ << " " << container->id_ << " " << value;
+ stream << " " << type->getId() << " " << container->id_ << " " << value;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
simgrid::instr::AddVariableEvent::AddVariableEvent(double timestamp, container_t container, simgrid::instr::Type* type,
double value)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_AddVariable), value(value)
{
- this->eventType_ = PAJE_AddVariable;
- this->timestamp_ = timestamp;
- this->type = type;
- this->container = container;
- this->value = value;
-
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
-
- insert_into_buffer (this);
+ insertIntoBuffer();
}
void simgrid::instr::AddVariableEvent::print()
stream << std::fixed << std::setprecision(TRACE_precision());
stream << (int)this->eventType_;
print_timestamp(this);
- stream << " " << type->id_ << " " << container->id_ << " " << value;
+ stream << " " << type->getId() << " " << container->id_ << " " << value;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
}
simgrid::instr::SubVariableEvent::SubVariableEvent(double timestamp, container_t container, Type* type, double value)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_SubVariable), value(value)
{
- this->eventType_ = PAJE_SubVariable;
- this->timestamp_ = timestamp;
- this->type = type;
- this->container = container;
- this->value = value;
-
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
-
- insert_into_buffer (this);
+ insertIntoBuffer();
}
void simgrid::instr::SubVariableEvent::print()
stream << std::fixed << std::setprecision(TRACE_precision());
stream << (int)this->eventType_;
print_timestamp(this);
- stream << " " << type->id_ << " " << container->id_ << " " << value;
+ stream << " " << type->getId() << " " << container->id_ << " " << value;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
}
}
-simgrid::instr::SetStateEvent::SetStateEvent(double timestamp, container_t container, Type* type, Value* val)
+simgrid::instr::SetStateEvent::SetStateEvent(double timestamp, container_t container, Type* type, Value* value)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_SetState), value(value)
{
- this->eventType_ = PAJE_SetState;
- this->timestamp_ = timestamp;
- this->type = type;
- this->container = container;
- this->val = val;
-
#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
#endif
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
-
- insert_into_buffer (this);
+ insertIntoBuffer();
}
void simgrid::instr::SetStateEvent::print()
stream << std::fixed << std::setprecision(TRACE_precision());
stream << (int)this->eventType_;
print_timestamp(this);
- stream << " " << type->id_ << " " << container->id_;
- stream << " " << val->id_;
+ stream << " " << type->getId() << " " << container->id_;
+ stream << " " << value->getId();
#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
stream << " \"" << filename << "\" " << linenumber;
}
}
-simgrid::instr::PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, Value* val,
+simgrid::instr::PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, Value* value,
void* extra)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_PushState), value(value), extra_(extra)
{
- this->eventType_ = PAJE_PushState;
- this->timestamp_ = timestamp;
- this->type = type;
- this->container = container;
- this->val = val;
- this->extra_ = extra;
-
#if HAVE_SMPI
if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
- insert_into_buffer (this);
+ insertIntoBuffer();
}
simgrid::instr::PushStateEvent::PushStateEvent(double timestamp, container_t container, Type* type, Value* val)
stream << std::fixed << std::setprecision(TRACE_precision());
stream << (int)this->eventType_;
print_timestamp(this);
- stream << " " << type->id_ << " " << container->id_;
- stream << " " << val->id_;
+ stream << " " << type->getId() << " " << container->id_;
+ stream << " " << value->getId();
if (TRACE_display_sizes()) {
stream << " ";
char* process_id = nullptr;
// FIXME: dirty extract "rank-" from the name, as we want the bare process id here
- if (strstr(container->name_, "rank-") == nullptr)
- process_id = xbt_strdup(container->name_);
+ if (strstr(container->name_.c_str(), "rank-") == nullptr)
+ process_id = xbt_strdup(container->name_.c_str());
else
- process_id = xbt_strdup(container->name_ + 5);
+ process_id = xbt_strdup(container->name_.c_str() + 5);
- FILE* trace_file = (FILE*)xbt_dict_get(tracing_files, container->name_);
+ FILE* trace_file = tracing_files.at(container);
switch (extra->type) {
case TRACING_INIT:
fprintf(trace_file, "%d %s %s\n", extra->root, extra->datatype1, extra->datatype2);
break;
case TRACING_ALLGATHER: // rank allgather sendcount recvcounts (sendtype) (recvtype)
- fprintf(trace_file, "%s allGather %d %d %s %s", process_id, extra->send_size, extra->recv_size, extra->datatype1, extra->datatype2);
+ fprintf(trace_file, "%s allGather %d %d %s %s", process_id, extra->send_size, extra->recv_size,
+ extra->datatype1, extra->datatype2);
break;
case TRACING_WAITANY:
case TRACING_SENDRECV:
case TRACING_SSEND:
case TRACING_ISSEND:
default:
- XBT_WARN("Call from %s impossible to translate into replay command : Not implemented (yet)", val->name_);
+ XBT_WARN("Call from %s impossible to translate into replay command : Not implemented (yet)", value->getCname());
break;
}
}
simgrid::instr::PopStateEvent::PopStateEvent(double timestamp, container_t container, Type* type)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_PopState)
{
- this->eventType_ = PAJE_PopState;
- this->timestamp_ = timestamp;
- this->type = type;
- this->container = container;
-
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
-
- insert_into_buffer (this);
+ insertIntoBuffer();
}
void simgrid::instr::PopStateEvent::print()
stream << std::fixed << std::setprecision(TRACE_precision());
stream << (int)this->eventType_;
print_timestamp(this);
- stream << " " << type->id_ << " " << container->id_;
+ stream << " " << type->getId() << " " << container->id_;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
}
simgrid::instr::ResetStateEvent::ResetStateEvent(double timestamp, container_t container, Type* type)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_ResetState)
{
- this->eventType_ = PAJE_ResetState;
- this->timestamp_ = timestamp;
- this->type = type;
- this->container = container;
-
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
-
- insert_into_buffer (this);
+ insertIntoBuffer();
delete[] this;
}
stream << std::fixed << std::setprecision(TRACE_precision());
stream << (int)this->eventType_;
print_timestamp(this);
- stream << " " << type->id_ << " " << container->id_;
+ stream << " " << type->getId() << " " << container->id_;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
}
simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t container, Type* type,
- container_t sourceContainer, const char* value, const char* key)
+ container_t sourceContainer, std::string value, std::string key)
: StartLinkEvent(timestamp, container, type, sourceContainer, value, key, -1)
{}
simgrid::instr::StartLinkEvent::StartLinkEvent(double timestamp, container_t container, Type* type,
- container_t sourceContainer, const char* value, const char* key,
+ container_t sourceContainer, std::string value, std::string key,
int size)
- : container_(container)
- , type_(type)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_StartLink)
, sourceContainer_(sourceContainer)
, value_(value)
, key_(key)
, size_(size)
{
- eventType_ = PAJE_StartLink;
- this->timestamp_ = timestamp;
-
XBT_DEBUG("%s: event_type=%d, timestamp=%f, value:%s", __FUNCTION__, (int)eventType_, this->timestamp_, this->value_.c_str());
-
- insert_into_buffer (this);
+ insertIntoBuffer();
}
void simgrid::instr::StartLinkEvent::print()
stream << std::fixed << std::setprecision(TRACE_precision());
stream << (int)this->eventType_;
print_timestamp(this);
- stream << " " << type_->id_ << " " << container_->id_ << " " << value_;
+ stream << " " << type->getId() << " " << container->id_ << " " << value_;
stream << " " << sourceContainer_->id_ << " " << key_;
if (TRACE_display_sizes()) {
}
simgrid::instr::EndLinkEvent::EndLinkEvent(double timestamp, container_t container, Type* type,
- container_t destContainer, const char* value, const char* key)
+ container_t destContainer, std::string value, std::string key)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_EndLink)
+ , destContainer(destContainer)
+ , value(value)
+ , key(key)
{
- this->eventType_ = PAJE_EndLink;
- this->timestamp_ = timestamp;
- this->type = type;
- this->container = container;
- this->destContainer = destContainer;
- this->value = xbt_strdup(value);
- this->key = xbt_strdup(key);
-
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
-
- insert_into_buffer (this);
+ insertIntoBuffer();
}
-simgrid::instr::EndLinkEvent::~EndLinkEvent()
-{
- free(value);
- free(key);
-}
void simgrid::instr::EndLinkEvent::print()
{
if (instr_fmt_type == instr_fmt_paje) {
stream << std::fixed << std::setprecision(TRACE_precision());
stream << (int)this->eventType_;
print_timestamp(this);
- stream << " " << type->id_ << " " << container->id_ << " " << value;
+ stream << " " << type->getId() << " " << container->id_ << " " << value;
stream << " " << destContainer->id_ << " " << key;
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
}
simgrid::instr::NewEvent::NewEvent(double timestamp, container_t container, Type* type, Value* val)
+ : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_NewEvent)
{
- this->eventType_ = PAJE_NewEvent;
- this->timestamp_ = timestamp;
- this->type = type;
- this->container = container;
this->val = val;
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)eventType_, this->timestamp_);
- insert_into_buffer (this);
+ insertIntoBuffer();
}
void simgrid::instr::NewEvent::print()
stream << std::fixed << std::setprecision(TRACE_precision());
stream << (int)this->eventType_;
print_timestamp(this);
- stream << " " << type->id_ << " " << container->id_ << " " << val->id_;
+ stream << " " << type->getId() << " " << container->id_ << " " << val->getId();
print_row();
} else if (instr_fmt_type == instr_fmt_TI) {
/* Nothing to do */
}
}
-
void TRACE_TI_start()
{
char *filename = TRACE_get_filename();
void TRACE_TI_end()
{
- xbt_dict_free(&tracing_files);
fclose(tracing_file);
char *filename = TRACE_get_filename();
XBT_DEBUG("Filename %s is closed", filename);
}
-
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_types, instr, "Paje tracing event system (types)");
static simgrid::instr::Type* rootType = nullptr; /* the root type */
-simgrid::instr::Type* PJ_type_get_root()
-{
- return rootType;
-}
+namespace simgrid {
+namespace instr {
-simgrid::instr::Type::Type(const char* typeNameBuff, const char* key, const char* color, e_entity_types kind,
- Type* father)
- : kind_(kind), father_(father)
+Type::Type(std::string name, std::string alias, std::string color, e_entity_types kind, Type* father)
+ : name_(name), color_(color), kind_(kind), father_(father)
{
- if (typeNameBuff == nullptr || key == nullptr){
- THROWF(tracing_error, 0, "can't create a new type with name or key equal nullptr");
+ if (name.empty() || alias.empty()) {
+ THROWF(tracing_error, 0, "can't create a new type with no name or alias");
}
- this->name_ = xbt_strdup(typeNameBuff);
- this->children_ = xbt_dict_new_homogeneous(nullptr);
- this->values_ = xbt_dict_new_homogeneous(nullptr);
- this->color_ = xbt_strdup(color);
-
- this->id_ = bprintf("%lld", instr_new_paje_id());
+ id_ = std::to_string(instr_new_paje_id());
if (father != nullptr){
- xbt_dict_set(father->children_, key, this, nullptr);
- XBT_DEBUG("new type %s, child of %s", typeNameBuff, father->name_);
+ father->children_.insert({alias, this});
+ XBT_DEBUG("new type %s, child of %s", name_.c_str(), father->getCname());
}
}
-simgrid::instr::Type::~Type()
+Type::~Type()
{
- simgrid::instr::Value* val;
- char *value_name;
- xbt_dict_cursor_t cursor = nullptr;
- xbt_dict_foreach (values_, cursor, value_name, val) {
- XBT_DEBUG("free value %s, child of %s", val->name_, val->father_->name_);
- delete val;
- }
- xbt_dict_free(&values_);
- simgrid::instr::Type* child;
- char *child_name;
- xbt_dict_foreach (children_, cursor, child_name, child) {
- delete child;
- }
- xbt_dict_free(&children_);
- xbt_free(name_);
- xbt_free(id_);
- xbt_free(color_);
+ for (auto elm : values_)
+ delete elm.second;
+ for (auto elm : children_)
+ delete elm.second;
}
-simgrid::instr::Type* simgrid::instr::Type::getChild(const char* name)
+Type* Type::byName(std::string name)
{
- simgrid::instr::Type* ret = this->getChildOrNull(name);
- if (ret == nullptr)
- THROWF(tracing_error, 2, "type with name (%s) not found in father type (%s)", name, this->name_);
- return ret;
-}
-
-simgrid::instr::Type* simgrid::instr::Type::getChildOrNull(const char* name)
-{
- xbt_assert(name != nullptr, "can't get type with a nullptr name");
-
- simgrid::instr::Type* ret = nullptr;
- simgrid::instr::Type* child;
- char *child_name;
- xbt_dict_cursor_t cursor = nullptr;
- xbt_dict_foreach (children_, cursor, child_name, child) {
- if (strcmp(child->name_, name) == 0) {
+ Type* ret = nullptr;
+ for (auto elm : children_) {
+ if (elm.second->name_ == name) {
if (ret != nullptr) {
THROWF (tracing_error, 0, "there are two children types with the same name?");
} else {
- ret = child;
+ ret = elm.second;
}
}
}
+ if (ret == nullptr)
+ THROWF(tracing_error, 2, "type with name (%s) not found in father type (%s)", name.c_str(), getCname());
return ret;
}
-simgrid::instr::Type* simgrid::instr::Type::containerNew(const char* name, simgrid::instr::Type* father)
+Type* Type::createRootType()
{
- if (name == nullptr){
- THROWF (tracing_error, 0, "can't create a container type with a nullptr name");
- }
-
- simgrid::instr::Type* ret = new simgrid::instr::Type(name, name, nullptr, TYPE_CONTAINER, father);
- if (father == nullptr) {
- rootType = ret;
- } else {
- XBT_DEBUG("ContainerType %s(%s), child of %s(%s)", ret->name_, ret->id_, father->name_, father->id_);
- LogContainerTypeDefinition(ret);
- }
+ simgrid::instr::Type* ret = new simgrid::instr::Type("0", "0", "", TYPE_CONTAINER, nullptr);
+ rootType = ret;
return ret;
}
-simgrid::instr::Type* simgrid::instr::Type::eventNew(const char* name, simgrid::instr::Type* father)
+Type* Type::getRootType()
{
- if (name == nullptr){
- THROWF (tracing_error, 0, "can't create an event type with a nullptr name");
- }
-
- Type* ret = new Type (name, name, nullptr, TYPE_EVENT, father);
- XBT_DEBUG("EventType %s(%s), child of %s(%s)", ret->name_, ret->id_, father->name_, father->id_);
- LogDefineEventType(ret);
- return ret;
+ return rootType;
}
-simgrid::instr::Type* simgrid::instr::Type::variableNew(const char* name, const char* color,
- simgrid::instr::Type* father)
+Type* Type::getOrCreateContainerType(std::string name)
{
- if (name == nullptr){
- THROWF (tracing_error, 0, "can't create a variable type with a nullptr name");
- }
-
- Type* ret = nullptr;
+ auto it = children_.find(name);
+ if (it == children_.end()) {
+ Type* ret = new simgrid::instr::Type(name, name, "", TYPE_CONTAINER, this);
+ XBT_DEBUG("ContainerType %s(%s), child of %s(%s)", ret->getCname(), ret->getId(), getCname(), getId());
+ ret->logContainerTypeDefinition();
+ return ret;
+ } else
+ return it->second;
+}
- if (not color) {
- char white[INSTR_DEFAULT_STR_SIZE] = "1 1 1";
- ret = new Type (name, name, white, TYPE_VARIABLE, father);
- }else{
- ret = new Type (name, name, color, TYPE_VARIABLE, father);
+Type* Type::getOrCreateEventType(std::string name)
+{
+ auto it = children_.find(name);
+ if (it == children_.end()) {
+ Type* ret = new Type(name, name, "", TYPE_EVENT, this);
+ XBT_DEBUG("EventType %s(%s), child of %s(%s)", ret->getCname(), ret->getId(), getCname(), getId());
+ ret->logDefineEventType();
+ return ret;
+ } else {
+ return it->second;
}
- XBT_DEBUG("VariableType %s(%s), child of %s(%s)", ret->name_, ret->id_, father->name_, father->id_);
- LogVariableTypeDefinition (ret);
- return ret;
}
-simgrid::instr::Type* simgrid::instr::Type::linkNew(const char* name, Type* father, Type* source, Type* dest)
+Type* Type::getOrCreateVariableType(std::string name, std::string color)
{
- if (name == nullptr){
- THROWF (tracing_error, 0, "can't create a link type with a nullptr name");
- }
+ auto it = children_.find(name);
+ if (it == children_.end()) {
+ Type* ret = new Type(name, name, color.empty() ? "1 1 1" : color, TYPE_VARIABLE, this);
- char key[INSTR_DEFAULT_STR_SIZE];
- snprintf(key, INSTR_DEFAULT_STR_SIZE, "%s-%s-%s", name, source->id_, dest->id_);
- Type* ret = new Type(name, key, nullptr, TYPE_LINK, father);
- XBT_DEBUG("LinkType %s(%s), child of %s(%s) %s(%s)->%s(%s)", ret->name_, ret->id_, father->name_, father->id_,
- source->name_, source->id_, dest->name_, dest->id_);
- LogLinkTypeDefinition(ret, source, dest);
- return ret;
+ XBT_DEBUG("VariableType %s(%s), child of %s(%s)", ret->getCname(), ret->getId(), getCname(), getId());
+ ret->logVariableTypeDefinition();
+
+ return ret;
+ } else
+ return it->second;
}
-simgrid::instr::Type* simgrid::instr::Type::stateNew(const char* name, Type* father)
+Type* Type::getOrCreateLinkType(std::string name, Type* source, Type* dest)
{
- if (name == nullptr){
- THROWF (tracing_error, 0, "can't create a state type with a nullptr name");
- }
+ std::string alias = name + "-" + source->id_ + "-" + dest->id_;
+ auto it = children_.find(alias);
+ if (it == children_.end()) {
+ Type* ret = new Type(name, alias, "", TYPE_LINK, this);
+ XBT_DEBUG("LinkType %s(%s), child of %s(%s) %s(%s)->%s(%s)", ret->getCname(), ret->getId(), getCname(), getId(),
+ source->getCname(), source->getId(), dest->getCname(), dest->getId());
+ ret->logLinkTypeDefinition(source, dest);
+ return ret;
+ } else
+ return it->second;
+}
- Type* ret = new Type(name, name, nullptr, TYPE_STATE, father);
- XBT_DEBUG("StateType %s(%s), child of %s(%s)", ret->name_, ret->id_, father->name_, father->id_);
- LogStateTypeDefinition(ret);
- return ret;
+Type* Type::getOrCreateStateType(std::string name)
+{
+ auto it = children_.find(name);
+ if (it == children_.end()) {
+ Type* ret = new Type(name, name, "", TYPE_STATE, this);
+ XBT_DEBUG("StateType %s(%s), child of %s(%s)", ret->getCname(), ret->getId(), getCname(), getId());
+ ret->logStateTypeDefinition();
+ return ret;
+ } else
+ return it->second;
+}
+}
}
-/* Copyright (c) 2012-2015. The SimGrid Team.
+/* Copyright (c) 2012-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <xbt/ex.hpp>
-
-#include "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_values, instr, "Paje tracing event system (values)");
-simgrid::instr::Value::Value(const char* name, const char* color, simgrid::instr::Type* father)
+namespace simgrid {
+namespace instr {
+
+Value::Value(std::string name, std::string color, Type* father) : name_(name), color_(color), father_(father)
{
- if (name == nullptr || father == nullptr){
- THROWF (tracing_error, 0, "can't create a value with a nullptr name (or a nullptr father)");
+ if (name.empty() || father == nullptr) {
+ THROWF(tracing_error, 0, "can't create a value with no name (or a nullptr father)");
}
- this->name_ = xbt_strdup(name);
- this->father_ = father;
- this->color_ = xbt_strdup(color);
+ this->id_ = std::to_string(instr_new_paje_id());
- this->id_ = bprintf("%lld", instr_new_paje_id());
-
- xbt_dict_set(father->values_, name, this, nullptr);
- XBT_DEBUG("new value %s, child of %s", name_, father_->name_);
- LogEntityValue(this);
+ father->values_.insert({name, this});
+ XBT_DEBUG("new value %s, child of %s", name_.c_str(), father_->getCname());
+ print();
};
-simgrid::instr::Value::~Value()
+Value::~Value()
{
- xbt_free(name_);
- xbt_free(color_);
- xbt_free(id_);
+ XBT_DEBUG("free value %s, child of %s", getCname(), father_->getCname());
}
-simgrid::instr::Value* simgrid::instr::Value::get_or_new(const char* name, const char* color,
- simgrid::instr::Type* father)
+Value* Value::byNameOrCreate(std::string name, std::string color, Type* father)
{
- Value* ret = 0;
+ Value* ret = nullptr;
try {
- ret = Value::get(name, father);
- }
- catch(xbt_ex& e) {
+ ret = Value::byName(name, father);
+ } catch (xbt_ex& e) {
ret = new Value(name, color, father);
}
return ret;
}
-simgrid::instr::Value* simgrid::instr::Value::get(const char* name, Type* father)
+Value* Value::byName(std::string name, Type* father)
{
- if (name == nullptr || father == nullptr){
- THROWF (tracing_error, 0, "can't get a value with a nullptr name (or a nullptr father)");
+ if (name.empty() || father == nullptr) {
+ THROWF(tracing_error, 0, "can't get a value with no name (or a nullptr father)");
}
- if (father->kind_ == TYPE_VARIABLE)
- THROWF(tracing_error, 0, "variables can't have different values (%s)", father->name_);
- Value* ret = (Value*)xbt_dict_get_or_null(father->values_, name);
- if (ret == nullptr) {
- THROWF(tracing_error, 2, "value with name (%s) not found in father type (%s)", name, father->name_);
+ if (father->getKind() == TYPE_VARIABLE)
+ THROWF(tracing_error, 0, "variables can't have different values (%s)", father->getCname());
+ auto ret = father->values_.find(name);
+ if (ret == father->values_.end()) {
+ THROWF(tracing_error, 2, "value with name (%s) not found in father type (%s)", name.c_str(), father->getCname());
}
- return ret;
+ return ret->second;
+}
+}
}
+++ /dev/null
-/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef INSTR_PRIVATE_H_
-#define INSTR_PRIVATE_H_
-
-#include <xbt/base.h>
-
-#include "instr/instr_interface.h"
-#include "simgrid/instr.h"
-#include "simgrid_config.h"
-#include "src/internal_config.h"
-#include <set>
-#include <string>
-
-/* Need to define function drand48 for Windows */
-/* FIXME: use _drand48() defined in src/surf/random_mgr.c instead */
-#ifdef _WIN32
-# define drand48() (rand()/(RAND_MAX + 1.0))
-#endif
-
-#define INSTR_DEFAULT_STR_SIZE 500
-
-#include "xbt/graph.h"
-#include "xbt/dict.h"
-
-namespace simgrid {
-namespace instr {
-typedef enum {
- PAJE_DefineContainerType,
- PAJE_DefineVariableType,
- PAJE_DefineStateType,
- PAJE_DefineEventType,
- PAJE_DefineLinkType,
- PAJE_DefineEntityValue,
- PAJE_CreateContainer,
- PAJE_DestroyContainer,
- PAJE_SetVariable,
- PAJE_AddVariable,
- PAJE_SubVariable,
- PAJE_SetState,
- PAJE_PushState,
- PAJE_PopState,
- PAJE_ResetState,
- PAJE_StartLink,
- PAJE_EndLink,
- PAJE_NewEvent
-} e_event_type;
-
-typedef enum {
- TYPE_VARIABLE,
- TYPE_LINK,
- TYPE_CONTAINER,
- TYPE_STATE,
- TYPE_EVENT
-} e_entity_types;
-
-//--------------------------------------------------
-
-class Type {
-public:
- char* id_;
- char* name_;
- char* color_;
-
- e_entity_types kind_;
- Type* father_;
- xbt_dict_t children_;
- xbt_dict_t values_; // valid for all types except variable and container
- Type(const char* typeNameBuff, const char* key, const char* color, e_entity_types kind, Type* father);
- ~Type();
- Type* getChild(const char* name);
- Type* getChildOrNull(const char* name);
-
- static Type* containerNew(const char* name, Type* father);
- static Type* eventNew(const char* name, Type* father);
- static Type* variableNew(const char* name, const char* color, Type* father);
- static Type* linkNew(const char* name, Type* father, Type* source, Type* dest);
- static Type* stateNew(const char* name, Type* father);
-};
-
-//--------------------------------------------------
-class Value {
-public:
- char* id_;
- char* name_;
- char* color_;
-
- Type* father_;
- Value(const char* name, const char* color, Type* father);
- ~Value();
- static Value* get_or_new(const char* name, const char* color, Type* father);
- static Value* get(const char* name, Type* father);
-};
-
-
-//--------------------------------------------------
-typedef enum {
- INSTR_HOST,
- INSTR_LINK,
- INSTR_ROUTER,
- INSTR_AS,
- INSTR_SMPI,
- INSTR_MSG_VM,
- INSTR_MSG_PROCESS,
- INSTR_MSG_TASK
-} e_container_types;
-
-//--------------------------------------------------
-
-class Container {
-public:
- Container(const char* name, simgrid::instr::e_container_types kind, Container* father);
- virtual ~Container();
-
- sg_netpoint_t netpoint_;
- char* name_; /* Unique name of this container */
- char* id_; /* Unique id of this container */
- Type* type_; /* Type of this container */
- int level_ = 0; /* Level in the hierarchy, root level is 0 */
- e_container_types kind_; /* This container is of what kind */
- Container* father_;
- xbt_dict_t children_;
-};
-
-//--------------------------------------------------
-class PajeEvent {
- public:
- double timestamp_;
- e_event_type eventType_;
- virtual void print() = 0;
- virtual ~PajeEvent();
-};
-
-//--------------------------------------------------
-class SetVariableEvent : public PajeEvent {
- private:
- Container* container;
- Type* type;
- double value;
-
- public:
- SetVariableEvent(double timestamp, Container* container, Type* type, double value);
- void print() override;
-};
-
-class AddVariableEvent:public PajeEvent {
- private:
- Container* container;
- Type* type;
- double value;
-
- public:
- AddVariableEvent(double timestamp, Container* container, Type* type, double value);
- void print() override;
-};
-//--------------------------------------------------
-
-
-class SubVariableEvent : public PajeEvent {
- private:
- Container* container;
- Type* type;
- double value;
-
- public:
- SubVariableEvent(double timestamp, Container* container, Type* type, double value);
- void print() override;
-};
-//--------------------------------------------------
-
-class SetStateEvent : public PajeEvent {
- private:
- Container* container;
- Type* type;
- Value* val;
- const char* filename;
- int linenumber;
-
- public:
- SetStateEvent(double timestamp, Container* container, Type* type, Value* val);
- void print() override;
-};
-
-
-class PushStateEvent : public PajeEvent {
- public:
- Container* container;
- Type* type;
- Value* val;
- int size;
- const char* filename;
- int linenumber;
- void* extra_;
-
- public:
- PushStateEvent(double timestamp, Container* container, Type* type, Value* val);
- PushStateEvent(double timestamp, Container* container, Type* type, Value* val, void* extra);
- void print() override;
-};
-
-class PopStateEvent : public PajeEvent {
- Container* container;
- Type* type;
-
-public:
- PopStateEvent(double timestamp, Container* container, Type* type);
- void print() override;
-};
-
-class ResetStateEvent : public PajeEvent {
- Container* container;
- Type* type;
-
-public:
- ResetStateEvent(double timestamp, Container* container, Type* type);
- void print() override;
-};
-
-class StartLinkEvent : public PajeEvent {
- Container* container_;
- Type* type_;
- Container* sourceContainer_;
- std::string value_;
- std::string key_;
- int size_;
-
-public:
- StartLinkEvent(double timestamp, Container* container, Type* type, Container* sourceContainer, const char* value,
- const char* key);
- StartLinkEvent(double timestamp, Container* container, Type* type, Container* sourceContainer, const char* value,
- const char* key, int size);
- void print() override;
-};
-
-class EndLinkEvent : public PajeEvent {
- Container* container;
- Type* type;
- Container* destContainer;
- char *value;
- char *key;
- public:
- EndLinkEvent(double timestamp, Container* container, Type* type, Container* destContainer, const char* value,
- const char* key);
- ~EndLinkEvent();
- void print() override;
-};
-
-
-class NewEvent : public PajeEvent {
- public:
- Container* container;
- Type* type;
- Value* val;
-
- public:
- NewEvent(double timestamp, Container* container, Type* type, Value* val);
- void print() override;
-};
-}
-} // namespace simgrid::instr
-typedef simgrid::instr::Container* container_t;
-
-SG_BEGIN_DECL()
-
-extern XBT_PRIVATE std::set<std::string> created_categories;
-extern XBT_PRIVATE std::set<std::string> declared_marks;
-extern XBT_PRIVATE std::set<std::string> user_host_variables;
-extern XBT_PRIVATE std::set<std::string> user_vm_variables;
-extern XBT_PRIVATE std::set<std::string> user_link_variables;
-extern XBT_PRIVATE double TRACE_last_timestamp_to_dump;
-
-/* instr_paje_header.c */
-XBT_PRIVATE void TRACE_header(int basic, int size);
-
-/* from paje.c */
-XBT_PRIVATE void TRACE_paje_start();
-XBT_PRIVATE void TRACE_paje_end();
-XBT_PRIVATE void TRACE_paje_dump_buffer (int force);
-
-
-/* from instr_config.c */
-XBT_PRIVATE bool TRACE_needs_platform ();
-XBT_PRIVATE bool TRACE_is_enabled();
-XBT_PRIVATE bool TRACE_platform();
-XBT_PRIVATE bool TRACE_platform_topology();
-XBT_PRIVATE bool TRACE_is_configured();
-XBT_PRIVATE bool TRACE_categorized ();
-XBT_PRIVATE bool TRACE_uncategorized ();
-XBT_PRIVATE bool TRACE_msg_process_is_enabled();
-XBT_PRIVATE bool TRACE_msg_vm_is_enabled();
-XBT_PRIVATE bool TRACE_buffer ();
-XBT_PRIVATE bool TRACE_disable_link();
-XBT_PRIVATE bool TRACE_disable_speed();
-XBT_PRIVATE bool TRACE_onelink_only ();
-XBT_PRIVATE bool TRACE_disable_destroy ();
-XBT_PRIVATE bool TRACE_basic ();
-XBT_PRIVATE bool TRACE_display_sizes ();
-XBT_PRIVATE char *TRACE_get_comment ();
-XBT_PRIVATE char *TRACE_get_comment_file ();
-XBT_PRIVATE int TRACE_precision ();
-XBT_PRIVATE char *TRACE_get_filename();
-XBT_PRIVATE char *TRACE_get_viva_uncat_conf ();
-XBT_PRIVATE char *TRACE_get_viva_cat_conf ();
-XBT_PRIVATE void TRACE_generate_viva_uncat_conf ();
-XBT_PRIVATE void TRACE_generate_viva_cat_conf ();
-XBT_PRIVATE void instr_pause_tracing ();
-XBT_PRIVATE void instr_resume_tracing ();
-
-/* Public functions used in SMPI */
-XBT_PUBLIC(bool) TRACE_smpi_is_enabled();
-XBT_PUBLIC(bool) TRACE_smpi_is_grouped();
-XBT_PUBLIC(bool) TRACE_smpi_is_computing();
-XBT_PUBLIC(bool) TRACE_smpi_is_sleeping();
-XBT_PUBLIC(bool) TRACE_smpi_view_internals();
-
-/* from resource_utilization.c */
-XBT_PRIVATE void TRACE_surf_host_set_utilization(const char *resource, const char *category, double value, double now,
- double delta);
-XBT_PRIVATE void TRACE_surf_link_set_utilization(const char *resource,const char *category, double value, double now,
- double delta);
-XBT_PUBLIC(void) TRACE_surf_resource_utilization_alloc();
-
-/* instr_paje.c */
-extern XBT_PRIVATE std::set<std::string> trivaNodeTypes;
-extern XBT_PRIVATE std::set<std::string> trivaEdgeTypes;
-XBT_PRIVATE long long int instr_new_paje_id ();
-XBT_PUBLIC(container_t) PJ_container_get (const char *name);
-XBT_PUBLIC(simgrid::instr::Container*) PJ_container_get_or_null(const char* name);
-XBT_PUBLIC(container_t) PJ_container_get_root ();
-XBT_PUBLIC(void) PJ_container_set_root (container_t root);
-XBT_PUBLIC(void) PJ_container_free_all (void);
-XBT_PUBLIC(void) PJ_container_remove_from_parent (container_t container);
-
-/* instr_paje_types.c */
-XBT_PUBLIC(simgrid::instr::Type*) PJ_type_get_root();
-
-/* instr_config.c */
-XBT_PRIVATE void TRACE_TI_start();
-XBT_PRIVATE void TRACE_TI_end();
-
-XBT_PRIVATE void TRACE_paje_dump_buffer (int force);
-XBT_PRIVATE void dump_comment_file (const char *filename);
-XBT_PRIVATE void dump_comment (const char *comment);
-
-struct s_instr_extra_data;
-typedef struct s_instr_extra_data *instr_extra_data;
-
-typedef enum{
- TRACING_INIT,
- TRACING_FINALIZE,
- TRACING_COMM_SIZE,
- TRACING_COMM_SPLIT,
- TRACING_COMM_DUP,
- TRACING_SEND,
- TRACING_ISEND,
- TRACING_SSEND,
- TRACING_ISSEND,
- TRACING_RECV,
- TRACING_IRECV,
- TRACING_SENDRECV,
- TRACING_TEST,
- TRACING_WAIT,
- TRACING_WAITALL,
- TRACING_WAITANY,
- TRACING_BARRIER,
- TRACING_BCAST,
- TRACING_REDUCE,
- TRACING_ALLREDUCE,
- TRACING_ALLTOALL,
- TRACING_ALLTOALLV,
- TRACING_GATHER,
- TRACING_GATHERV,
- TRACING_SCATTER,
- TRACING_SCATTERV,
- TRACING_ALLGATHER,
- TRACING_ALLGATHERV,
- TRACING_REDUCE_SCATTER,
- TRACING_COMPUTING,
- TRACING_SLEEPING,
- TRACING_SCAN,
- TRACING_EXSCAN
-} e_caller_type ;
-
-typedef struct s_instr_extra_data {
- e_caller_type type;
- int send_size;
- int recv_size;
- double comp_size;
- double sleep_duration;
- int src;
- int dst;
- int root;
- const char* datatype1;
- const char* datatype2;
- int * sendcounts;
- int * recvcounts;
- int num_processes;
-} s_instr_extra_data_t;
-
-/* Format of TRACING output.
- * - paje is the regular format, that we all know
- * - TI is a trick to reuse the tracing functions to generate a time independent trace during the execution. Such trace can easily be replayed with smpi_replay afterward.
- * This trick should be removed and replaced by some code using the signal that we will create to cleanup the TRACING
- */
-typedef enum { instr_fmt_paje, instr_fmt_TI } instr_fmt_type_t;
-extern instr_fmt_type_t instr_fmt_type;
-
-SG_END_DECL()
-
-void LogContainerTypeDefinition(simgrid::instr::Type* type);
-void LogVariableTypeDefinition(simgrid::instr::Type* type);
-void LogStateTypeDefinition(simgrid::instr::Type* type);
-void LogLinkTypeDefinition(simgrid::instr::Type* type, simgrid::instr::Type* source, simgrid::instr::Type* dest);
-void LogEntityValue(simgrid::instr::Value* val);
-void LogContainerCreation (container_t container);
-void LogContainerDestruction (container_t container);
-void LogDefineEventType(simgrid::instr::Type* type);
-
-#endif
--- /dev/null
+/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef INSTR_PRIVATE_HPP
+#define INSTR_PRIVATE_HPP
+
+#include <xbt/base.h>
+
+#include "instr/instr_interface.h"
+#include "simgrid/instr.h"
+#include "simgrid_config.h"
+#include "src/internal_config.h"
+#include "xbt/graph.h"
+#include <iomanip> /** std::setprecision **/
+#include <map>
+#include <set>
+#include <sstream>
+#include <string>
+#include <sys/stat.h>
+#ifdef WIN32
+#include <direct.h> // _mkdir
+/* Need to define function drand48 for Windows */
+/* FIXME: use _drand48() defined in src/surf/random_mgr.c instead */
+#define drand48() (rand() / (RAND_MAX + 1.0))
+#endif
+
+#define INSTR_DEFAULT_STR_SIZE 500
+
+namespace simgrid {
+namespace instr {
+
+class Value;
+
+enum e_event_type {
+ PAJE_DefineContainerType,
+ PAJE_DefineVariableType,
+ PAJE_DefineStateType,
+ PAJE_DefineEventType,
+ PAJE_DefineLinkType,
+ PAJE_DefineEntityValue,
+ PAJE_CreateContainer,
+ PAJE_DestroyContainer,
+ PAJE_SetVariable,
+ PAJE_AddVariable,
+ PAJE_SubVariable,
+ PAJE_SetState,
+ PAJE_PushState,
+ PAJE_PopState,
+ PAJE_ResetState,
+ PAJE_StartLink,
+ PAJE_EndLink,
+ PAJE_NewEvent
+};
+
+//--------------------------------------------------
+enum e_entity_types { TYPE_VARIABLE, TYPE_LINK, TYPE_CONTAINER, TYPE_STATE, TYPE_EVENT };
+
+class Type {
+ std::string id_;
+ std::string name_;
+ std::string color_;
+ e_entity_types kind_;
+ Type* father_;
+
+public:
+ std::map<std::string, Type*> children_;
+ std::map<std::string, Value*> values_; // valid for all types except variable and container
+
+ Type(std::string name, std::string alias, std::string color, e_entity_types kind, Type* father);
+ ~Type();
+
+ std::string getName() { return name_; }
+ const char* getCname() { return name_.c_str(); }
+ const char* getId() { return id_.c_str(); }
+ e_entity_types getKind() { return kind_; }
+ bool isColored() { return not color_.empty(); }
+
+ Type* byName(std::string name);
+
+ Type* getOrCreateContainerType(std::string name);
+ Type* getOrCreateEventType(std::string name);
+ Type* getOrCreateLinkType(std::string name, Type* source, Type* dest);
+ Type* getOrCreateStateType(std::string name);
+ Type* getOrCreateVariableType(std::string name, std::string color);
+
+ void logContainerTypeDefinition();
+ void logVariableTypeDefinition();
+ void logStateTypeDefinition();
+ void logLinkTypeDefinition(simgrid::instr::Type* source, simgrid::instr::Type* dest);
+ void logDefineEventType();
+
+ static Type* createRootType();
+ static Type* getRootType();
+};
+
+//--------------------------------------------------
+class Value {
+ std::string name_;
+ std::string id_;
+ std::string color_;
+ Type* father_;
+
+ explicit Value(std::string name, std::string color, Type* father);
+
+public:
+ ~Value();
+ static Value* byNameOrCreate(std::string name, std::string color, Type* father);
+ static Value* byName(std::string name, Type* father);
+ const char* getCname() { return name_.c_str(); }
+ const char* getId() { return id_.c_str(); }
+ bool isColored() { return not color_.empty(); }
+ void print();
+};
+
+//--------------------------------------------------
+enum e_container_types {
+ INSTR_HOST,
+ INSTR_LINK,
+ INSTR_ROUTER,
+ INSTR_AS,
+ INSTR_SMPI,
+ INSTR_MSG_VM,
+ INSTR_MSG_PROCESS,
+ INSTR_MSG_TASK
+};
+
+class Container {
+ e_container_types kind_; /* This container is of what kind */
+ int level_ = 0; /* Level in the hierarchy, root level is 0 */
+ sg_netpoint_t netpoint_ = nullptr;
+
+public:
+ Container(std::string name, simgrid::instr::e_container_types kind, Container* father);
+ virtual ~Container();
+
+ std::string name_; /* Unique name of this container */
+ std::string id_; /* Unique id of this container */
+ Type* type_; /* Type of this container */
+ Container* father_;
+ std::map<std::string, Container*> children_;
+ static Container* byNameOrNull(std::string name);
+ static Container* byName(std::string name);
+ void removeFromParent();
+ void logCreation();
+ void logDestruction();
+};
+
+//--------------------------------------------------
+class PajeEvent {
+protected:
+ Container* container;
+ Type* type;
+
+public:
+ double timestamp_;
+ e_event_type eventType_;
+ PajeEvent(Container* container, Type* type, double timestamp, e_event_type eventType)
+ : container(container), type(type), timestamp_(timestamp), eventType_(eventType){};
+ virtual void print() = 0;
+ virtual ~PajeEvent();
+ void insertIntoBuffer();
+};
+
+//--------------------------------------------------
+class SetVariableEvent : public PajeEvent {
+ double value;
+
+public:
+ SetVariableEvent(double timestamp, Container* container, Type* type, double value);
+ void print() override;
+};
+
+class AddVariableEvent : public PajeEvent {
+ double value;
+
+public:
+ AddVariableEvent(double timestamp, Container* container, Type* type, double value);
+ void print() override;
+};
+//--------------------------------------------------
+
+class SubVariableEvent : public PajeEvent {
+ double value;
+
+public:
+ SubVariableEvent(double timestamp, Container* container, Type* type, double value);
+ void print() override;
+};
+//--------------------------------------------------
+
+class SetStateEvent : public PajeEvent {
+ Value* value;
+ const char* filename;
+ int linenumber;
+
+public:
+ SetStateEvent(double timestamp, Container* container, Type* type, Value* val);
+ void print() override;
+};
+
+class PushStateEvent : public PajeEvent {
+ Value* value;
+ const char* filename;
+ int linenumber;
+ void* extra_;
+
+public:
+ PushStateEvent(double timestamp, Container* container, Type* type, Value* val);
+ PushStateEvent(double timestamp, Container* container, Type* type, Value* val, void* extra);
+ void print() override;
+};
+
+class PopStateEvent : public PajeEvent {
+public:
+ PopStateEvent(double timestamp, Container* container, Type* type);
+ void print() override;
+};
+
+class ResetStateEvent : public PajeEvent {
+public:
+ ResetStateEvent(double timestamp, Container* container, Type* type);
+ void print() override;
+};
+
+class StartLinkEvent : public PajeEvent {
+ Container* sourceContainer_;
+ std::string value_;
+ std::string key_;
+ int size_;
+
+public:
+ StartLinkEvent(double timestamp, Container* container, Type* type, Container* sourceContainer, std::string value,
+ std::string key);
+ StartLinkEvent(double timestamp, Container* container, Type* type, Container* sourceContainer, std::string value,
+ std::string key, int size);
+ void print() override;
+};
+
+class EndLinkEvent : public PajeEvent {
+ Container* destContainer;
+ std::string value;
+ std::string key;
+
+public:
+ EndLinkEvent(double timestamp, Container* container, Type* type, Container* destContainer, std::string value,
+ std::string key);
+ ~EndLinkEvent() = default;
+ void print() override;
+};
+
+class NewEvent : public PajeEvent {
+ Value* val;
+
+public:
+ NewEvent(double timestamp, Container* container, Type* type, Value* val);
+ void print() override;
+};
+}
+} // namespace simgrid::instr
+typedef simgrid::instr::Container* container_t;
+
+extern "C" {
+
+extern XBT_PRIVATE std::set<std::string> created_categories;
+extern XBT_PRIVATE std::set<std::string> declared_marks;
+extern XBT_PRIVATE std::set<std::string> user_host_variables;
+extern XBT_PRIVATE std::set<std::string> user_vm_variables;
+extern XBT_PRIVATE std::set<std::string> user_link_variables;
+extern XBT_PRIVATE double TRACE_last_timestamp_to_dump;
+
+/* instr_paje_header.c */
+XBT_PRIVATE void TRACE_header(bool basic, int size);
+
+/* from paje.c */
+XBT_PRIVATE void TRACE_paje_start();
+XBT_PRIVATE void TRACE_paje_end();
+
+/* from instr_config.c */
+XBT_PRIVATE bool TRACE_needs_platform();
+XBT_PRIVATE bool TRACE_is_enabled();
+XBT_PRIVATE bool TRACE_platform();
+XBT_PRIVATE bool TRACE_platform_topology();
+XBT_PRIVATE bool TRACE_is_configured();
+XBT_PRIVATE bool TRACE_categorized();
+XBT_PRIVATE bool TRACE_uncategorized();
+XBT_PRIVATE bool TRACE_msg_process_is_enabled();
+XBT_PRIVATE bool TRACE_msg_vm_is_enabled();
+XBT_PRIVATE bool TRACE_buffer();
+XBT_PRIVATE bool TRACE_disable_link();
+XBT_PRIVATE bool TRACE_disable_speed();
+XBT_PRIVATE bool TRACE_onelink_only();
+XBT_PRIVATE bool TRACE_disable_destroy();
+XBT_PRIVATE bool TRACE_basic();
+XBT_PRIVATE bool TRACE_display_sizes();
+XBT_PRIVATE char* TRACE_get_comment();
+XBT_PRIVATE char* TRACE_get_comment_file();
+XBT_PRIVATE int TRACE_precision();
+XBT_PRIVATE char* TRACE_get_filename();
+XBT_PRIVATE char* TRACE_get_viva_uncat_conf();
+XBT_PRIVATE char* TRACE_get_viva_cat_conf();
+XBT_PRIVATE void TRACE_generate_viva_uncat_conf();
+XBT_PRIVATE void TRACE_generate_viva_cat_conf();
+XBT_PRIVATE void instr_pause_tracing();
+XBT_PRIVATE void instr_resume_tracing();
+
+/* Public functions used in SMPI */
+XBT_PUBLIC(bool) TRACE_smpi_is_enabled();
+XBT_PUBLIC(bool) TRACE_smpi_is_grouped();
+XBT_PUBLIC(bool) TRACE_smpi_is_computing();
+XBT_PUBLIC(bool) TRACE_smpi_is_sleeping();
+XBT_PUBLIC(bool) TRACE_smpi_view_internals();
+
+/* from resource_utilization.c */
+XBT_PRIVATE void TRACE_surf_host_set_utilization(const char* resource, const char* category, double value, double now,
+ double delta);
+XBT_PRIVATE void TRACE_surf_link_set_utilization(const char* resource, const char* category, double value, double now,
+ double delta);
+XBT_PUBLIC(void) TRACE_surf_resource_utilization_alloc();
+
+/* instr_paje.c */
+extern XBT_PRIVATE std::set<std::string> trivaNodeTypes;
+extern XBT_PRIVATE std::set<std::string> trivaEdgeTypes;
+XBT_PRIVATE long long int instr_new_paje_id();
+XBT_PUBLIC(container_t) PJ_container_get_root ();
+XBT_PUBLIC(void) PJ_container_set_root (container_t root);
+
+/* instr_config.c */
+XBT_PRIVATE void TRACE_TI_start();
+XBT_PRIVATE void TRACE_TI_end();
+
+XBT_PRIVATE void TRACE_paje_dump_buffer(bool force);
+XBT_PRIVATE void dump_comment_file(const char* filename);
+XBT_PRIVATE void dump_comment(const char* comment);
+
+enum e_caller_type {
+ TRACING_INIT,
+ TRACING_FINALIZE,
+ TRACING_COMM_SIZE,
+ TRACING_COMM_SPLIT,
+ TRACING_COMM_DUP,
+ TRACING_SEND,
+ TRACING_ISEND,
+ TRACING_SSEND,
+ TRACING_ISSEND,
+ TRACING_RECV,
+ TRACING_IRECV,
+ TRACING_SENDRECV,
+ TRACING_TEST,
+ TRACING_WAIT,
+ TRACING_WAITALL,
+ TRACING_WAITANY,
+ TRACING_BARRIER,
+ TRACING_BCAST,
+ TRACING_REDUCE,
+ TRACING_ALLREDUCE,
+ TRACING_ALLTOALL,
+ TRACING_ALLTOALLV,
+ TRACING_GATHER,
+ TRACING_GATHERV,
+ TRACING_SCATTER,
+ TRACING_SCATTERV,
+ TRACING_ALLGATHER,
+ TRACING_ALLGATHERV,
+ TRACING_REDUCE_SCATTER,
+ TRACING_COMPUTING,
+ TRACING_SLEEPING,
+ TRACING_SCAN,
+ TRACING_EXSCAN
+};
+
+struct s_instr_extra_data_t {
+ e_caller_type type;
+ int send_size;
+ int recv_size;
+ double comp_size;
+ double sleep_duration;
+ int src;
+ int dst;
+ int root;
+ const char* datatype1;
+ const char* datatype2;
+ int* sendcounts;
+ int* recvcounts;
+ int num_processes;
+};
+typedef s_instr_extra_data_t* instr_extra_data;
+
+/* Format of TRACING output.
+ * - paje is the regular format, that we all know
+ * - TI is a trick to reuse the tracing functions to generate a time independent trace during the execution. Such
+ * trace can easily be replayed with smpi_replay afterward. This trick should be removed and replaced by some code
+ * using the signal that we will create to cleanup the TRACING
+ */
+enum instr_fmt_type_t { instr_fmt_paje, instr_fmt_TI };
+extern instr_fmt_type_t instr_fmt_type;
+}
+
+#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
#include <string>
#include <unordered_map>
static std::unordered_map<std::string, std::string> platform_variables;
//used by all methods
-static void __TRACE_surf_check_variable_set_to_zero(double now, const char *variable, const char *resource)
+static void __TRACE_surf_check_variable_set_to_zero(double now, const char* variable, std::string resource)
{
/* To trace resource utilization, we use pajeAddVariable and pajeSubVariable only.
* The Paje simulator needs a pajeSetVariable in the first place so it knows the initial value of all variables for
*/
// create a key considering the resource and variable
- std::string key = std::string(resource) + variable;
+ std::string key = resource + variable;
// check if key exists: if it doesn't, set the variable to zero and mark this in the dict
if (platform_variables.find(key) == platform_variables.end()) {
- container_t container = PJ_container_get (resource);
- simgrid::instr::Type* type = container->type_->getChild(variable);
+ container_t container = simgrid::instr::Container::byName(resource);
+ simgrid::instr::Type* type = container->type_->byName(variable);
new simgrid::instr::SetVariableEvent(now, container, type, 0);
platform_variables[key] = std::string("");
}
static void instr_event(double now, double delta, simgrid::instr::Type* variable, container_t resource, double value)
{
- __TRACE_surf_check_variable_set_to_zero(now, variable->name_, resource->name_);
+ __TRACE_surf_check_variable_set_to_zero(now, variable->getCname(), resource->name_);
new simgrid::instr::AddVariableEvent(now, resource, variable, value);
new simgrid::instr::SubVariableEvent(now + delta, resource, variable, value);
}
void TRACE_surf_link_set_utilization(const char *resource, const char *category, double value, double now, double delta)
{
//only trace link utilization if link is known by tracing mechanism
- if (not PJ_container_get_or_null(resource))
+ if (not simgrid::instr::Container::byNameOrNull(resource))
return;
if (not value)
return;
//trace uncategorized link utilization
if (TRACE_uncategorized()){
XBT_DEBUG("UNCAT LINK [%f - %f] %s bandwidth_used %f", now, now+delta, resource, value);
- container_t container = PJ_container_get (resource);
- simgrid::instr::Type* type = container->type_->getChild("bandwidth_used");
+ container_t container = simgrid::instr::Container::byName(resource);
+ simgrid::instr::Type* type = container->type_->byName("bandwidth_used");
instr_event (now, delta, type, container, value);
}
char category_type[INSTR_DEFAULT_STR_SIZE];
snprintf (category_type, INSTR_DEFAULT_STR_SIZE, "b%s", category);
XBT_DEBUG("CAT LINK [%f - %f] %s %s %f", now, now+delta, resource, category_type, value);
- container_t container = PJ_container_get (resource);
- simgrid::instr::Type* type = container->type_->getChild(category_type);
+ container_t container = simgrid::instr::Container::byName(resource);
+ simgrid::instr::Type* type = container->type_->byName(category_type);
instr_event (now, delta, type, container, value);
}
}
void TRACE_surf_host_set_utilization(const char *resource, const char *category, double value, double now, double delta)
{
//only trace host utilization if host is known by tracing mechanism
- container_t container = PJ_container_get_or_null(resource);
+ container_t container = simgrid::instr::Container::byNameOrNull(resource);
if (not container || not value)
return;
//trace uncategorized host utilization
if (TRACE_uncategorized()){
XBT_DEBUG("UNCAT HOST [%f - %f] %s power_used %f", now, now+delta, resource, value);
- simgrid::instr::Type* type = container->type_->getChild("power_used");
+ simgrid::instr::Type* type = container->type_->byName("power_used");
instr_event (now, delta, type, container, value);
}
char category_type[INSTR_DEFAULT_STR_SIZE];
snprintf (category_type, INSTR_DEFAULT_STR_SIZE, "p%s", category);
XBT_DEBUG("CAT HOST [%f - %f] %s %s %f", now, now+delta, resource, category_type, value);
- simgrid::instr::Type* type = container->type_->getChild(category_type);
+ simgrid::instr::Type* type = container->type_->byName(category_type);
instr_event (now, delta, type, container, value);
}
}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef INSTR_SMPI_H_
-#define INSTR_SMPI_H_
-
-#ifdef __cplusplus
-#include <string>
-#endif
+#ifndef INSTR_SMPI_HPP
+#define INSTR_SMPI_HPP
#include "smpi/smpi.h"
-#include "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
+#include <string>
-SG_BEGIN_DECL()
+extern "C" {
XBT_PRIVATE void TRACE_internal_smpi_set_category(const char* category);
XBT_PRIVATE const char* TRACE_internal_smpi_get_category();
XBT_PRIVATE const char* encode_datatype(MPI_Datatype datatype, int* known);
-typedef struct smpi_trace_call_location {
+class smpi_trace_call_location_t {
+public:
const char* filename;
int linenumber;
const char* previous_filename;
int previous_linenumber;
-#ifdef __cplusplus
- std::string get_composed_key() {
- return std::string(previous_filename) + ':' + std::to_string(previous_linenumber) + ':' + filename + ':' + std::to_string(linenumber);
+ std::string get_composed_key()
+ {
+ return std::string(previous_filename) + ':' + std::to_string(previous_linenumber) + ':' + filename + ':' +
+ std::to_string(linenumber);
}
-#endif
-
-} smpi_trace_call_location_t;
-
-SG_END_DECL()
+};
+}
#endif
#include "simgrid/modelchecker.h"
#include "src/mc/mc_replay.h"
-#include "src/simix/smx_network_private.h"
+#include "src/simix/smx_network_private.hpp"
#include "src/surf/surf_interface.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_network);
#include "src/kernel/activity/ActivityImpl.hpp"
#include "surf/surf.h"
-typedef enum { SIMIX_COMM_SEND, SIMIX_COMM_RECEIVE, SIMIX_COMM_READY, SIMIX_COMM_DONE } e_smx_comm_type_t;
+enum e_smx_comm_type_t { SIMIX_COMM_SEND, SIMIX_COMM_RECEIVE, SIMIX_COMM_READY, SIMIX_COMM_DONE };
namespace simgrid {
namespace kernel {
#include "simgrid/s4u/Host.hpp"
#include "src/kernel/activity/ExecImpl.hpp"
-#include "src/simix/smx_host_private.h"
+#include "src/simix/smx_host_private.hpp"
#include "src/surf/surf_interface.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_process);
boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(activity);
xbt_assert(comm->mbox == this, "Comm %p is in mailbox %s, not mailbox %s", comm.get(),
- (comm->mbox ? comm->mbox->name_ : "(null)"), this->name_);
+ (comm->mbox ? comm->mbox->getCname() : "(null)"), this->getCname());
comm->mbox = nullptr;
for (auto it = this->comm_queue.begin(); it != this->comm_queue.end(); it++)
if (*it == comm) {
this->comm_queue.erase(it);
return;
}
- xbt_die("Comm %p not found in mailbox %s", comm.get(), this->name_);
+ xbt_die("Comm %p not found in mailbox %s", comm.get(), this->getCname());
}
}
}
#define SIMIX_MAILBOXIMPL_H
#include <boost/circular_buffer.hpp>
+#include <xbt/string.hpp>
#include "simgrid/s4u/Mailbox.hpp"
#include "src/kernel/activity/CommImpl.hpp"
class MailboxImpl {
explicit MailboxImpl(const char* name)
- : piface_(this), name_(xbt_strdup(name)), comm_queue(MAX_MAILBOX_SIZE), done_comm_queue(MAX_MAILBOX_SIZE)
+ : piface_(this), name_(name), comm_queue(MAX_MAILBOX_SIZE), done_comm_queue(MAX_MAILBOX_SIZE)
{
}
public:
- ~MailboxImpl() { xbt_free(name_); }
-
+ const simgrid::xbt::string& getName() const { return name_; }
+ const char* getCname() const { return name_.c_str(); }
static MailboxImpl* byNameOrNull(const char* name);
static MailboxImpl* byNameOrCreate(const char* name);
void setReceiver(s4u::ActorPtr actor);
void push(activity::CommImplPtr comm);
void remove(smx_activity_t activity);
simgrid::s4u::Mailbox piface_; // Our interface
- char* name_;
+ simgrid::xbt::string name_;
simgrid::simix::ActorImplPtr permanent_receiver; // process which the mailbox is attached to
boost::circular_buffer_space_optimized<smx_activity_t> comm_queue;
#include "src/kernel/context/Context.hpp"
#include "src/simix/ActorImpl.hpp"
-#include "src/simix/popping_private.h"
+#include "src/simix/popping_private.hpp"
#include "src/surf/surf_interface.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_process);
-/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/activity/SynchroIo.hpp"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
#include "src/surf/surf_interface.hpp"
void simgrid::kernel::activity::IoImpl::suspend()
#include "mc/mc.h"
#include "src/kernel/context/Context.hpp"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
/**
* @brief creates a new context for a user level process
#include <xbt/functional.hpp>
#include "simgrid/simix.h"
-#include "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
#include "src/internal_config.h"
-#include "src/simix/popping_private.h"
-#include "src/simix/smx_host_private.h"
-#include "src/simix/smx_io_private.h"
-#include "src/simix/smx_network_private.h"
+#include "src/simix/popping_private.hpp"
+#include "src/simix/smx_host_private.hpp"
+#include "src/simix/smx_io_private.hpp"
+#include "src/simix/smx_network_private.hpp"
#include "src/simix/smx_synchro_private.hpp"
#include "surf/surf.h"
#include "xbt/base.h"
typedef simgrid::kernel::context::ContextFactory *smx_context_factory_t;
-SG_BEGIN_DECL()
-
+extern "C" {
XBT_PRIVATE void SIMIX_context_mod_init();
XBT_PRIVATE void SIMIX_context_mod_exit();
XBT_PUBLIC(int) SIMIX_process_get_maxpid();
XBT_PRIVATE void SIMIX_post_create_environment();
-
-SG_END_DECL()
+}
XBT_PRIVATE simgrid::simix::ActorCodeFactory& SIMIX_get_actor_code_factory(const char *name);
#include <xbt/log.h>
#include <xbt/xbt_os_thread.h>
-#include "src/simix/smx_private.h"
#include "src/internal_config.h"
#include "src/kernel/context/ContextBoost.hpp"
+#include "src/simix/smx_private.hpp"
#if HAVE_SANITIZE_ADDRESS_FIBER_SUPPORT
#include <sanitizer/asan_interface.h>
#include "xbt/parmap.hpp"
-#include "src/simix/smx_private.h"
#include "mc/mc.h"
+#include "src/simix/smx_private.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_context);
xbt_os_thread_key_create(&raw_worker_id_key);
// TODO, lazily init
raw_parmap = nullptr;
- raw_workers_context = xbt_new(RawContext*, nthreads);
+ raw_workers_context = new RawContext*[nthreads];
raw_maestro_context = nullptr;
#endif
// TODO: choose dynamically when SIMIX_context_get_parallel_threshold() > 1
{
#if HAVE_THREAD_CONTEXTS
delete raw_parmap;
- xbt_free(raw_workers_context);
+ delete[] raw_workers_context;
#endif
}
XBT_DEBUG("No more processes to run");
uintptr_t worker_id = (uintptr_t)
xbt_os_thread_get_specific(raw_worker_id_key);
- next_context = static_cast<RawContext*>(raw_workers_context[worker_id]);
+ next_context = raw_workers_context[worker_id];
XBT_DEBUG("Restoring worker stack %zu (working threads = %zu)",
worker_id, raw_threads_working);
}
#include <utility>
#include <functional>
+#include "src/internal_config.h" /* loads context system definitions */
+#include "src/simix/smx_private.hpp"
+#include "src/xbt_modinter.h" /* prototype of os thread module's init/exit in XBT */
#include "xbt/function_types.h"
-#include "src/simix/smx_private.h"
-#include "src/internal_config.h" /* loads context system definitions */
#include "xbt/swag.h"
#include "xbt/xbt_os_thread.h"
-#include "src/xbt_modinter.h" /* prototype of os thread module's init/exit in XBT */
#include "src/kernel/context/ContextThread.hpp"
#include "mc/mc.h"
#include "src/mc/mc_ignore.h"
#include "src/simix/ActorImpl.hpp"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
#include "xbt/parmap.hpp"
/** Many integers are needed to store a pointer
#if HAVE_THREAD_CONTEXTS /* To use parallel ucontexts a thread pool is needed */
int nthreads = SIMIX_context_get_nthreads();
sysv_parmap = nullptr;
- sysv_workers_context = xbt_new(ParallelUContext*, nthreads);
+ sysv_workers_context = new ParallelUContext*[nthreads];
sysv_maestro_context = nullptr;
xbt_os_thread_key_create(&sysv_worker_id_key);
#else
{
#if HAVE_THREAD_CONTEXTS
delete sysv_parmap;
- xbt_free(sysv_workers_context);
+ delete[] sysv_workers_context;
#endif
}
-/* Copyright (c) 2016. The SimGrid Team.
+/* Copyright (c) 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <simgrid/kernel/future.hpp>
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
namespace simgrid {
namespace kernel {
void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
{
- XBT_VERB("cluster getLocalRoute from '%s'[%u] to '%s'[%u]", src->cname(), src->id(), dst->cname(), dst->id());
+ XBT_VERB("cluster getLocalRoute from '%s'[%u] to '%s'[%u]", src->getCname(), src->id(), dst->getCname(), dst->id());
xbt_assert(not privateLinks_.empty(),
"Cluster routing: no links attached to the source node - did you use host_link tag?");
"Malformed cluster. This may be because your platform file is a hypergraph while it must be a graph.");
/* create the router */
- xbt_node_t routerNode = new_xbt_graph_node(graph, router_->cname(), nodes);
+ xbt_node_t routerNode = new_xbt_graph_node(graph, router_->getCname(), nodes);
xbt_node_t backboneNode = nullptr;
if (backbone_) {
- backboneNode = new_xbt_graph_node(graph, backbone_->cname(), nodes);
+ backboneNode = new_xbt_graph_node(graph, backbone_->getCname(), nodes);
new_xbt_graph_edge(graph, routerNode, backboneNode, edges);
}
for (auto const& src : getVertices()) {
if (not src->isRouter()) {
- xbt_node_t previous = new_xbt_graph_node(graph, src->cname(), nodes);
+ xbt_node_t previous = new_xbt_graph_node(graph, src->getCname(), nodes);
std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(src->id());
if (info.first) { // link up
- xbt_node_t current = new_xbt_graph_node(graph, info.first->cname(), nodes);
+ xbt_node_t current = new_xbt_graph_node(graph, info.first->getCname(), nodes);
new_xbt_graph_edge(graph, previous, current, edges);
if (backbone_) {
}
if (info.second) { // link down
- xbt_node_t current = new_xbt_graph_node(graph, info.second->cname(), nodes);
+ xbt_node_t current = new_xbt_graph_node(graph, info.second->getCname(), nodes);
new_xbt_graph_edge(graph, previous, current, edges);
if (backbone_) {
/* Free functions */
-static void route_cache_elem_free(void* e)
+static void graph_node_data_free(void* n)
{
- route_cache_element_t elm = (route_cache_element_t)e;
- if (elm) {
- xbt_free(elm->pred_arr);
- xbt_free(elm);
- }
-}
-
-static void graph_node_map_elem_free(void* e)
-{
- graph_node_map_element_t elm = (graph_node_map_element_t)e;
- xbt_free(elm);
+ graph_node_data_t data = static_cast<graph_node_data_t>(n);
+ delete data;
}
static void graph_edge_data_free(void* e) // FIXME: useless code duplication
{
- sg_platf_route_cbarg_t e_route = (sg_platf_route_cbarg_t)e;
+ sg_platf_route_cbarg_t e_route = static_cast<sg_platf_route_cbarg_t>(e);
if (e_route) {
delete e_route->link_list;
- xbt_free(e_route);
+ delete e_route;
}
}
/* Create the topology graph */
if (not routeGraph_)
routeGraph_ = xbt_graph_new_graph(1, nullptr);
- if (not graphNodeMap_)
- graphNodeMap_ = xbt_dict_new_homogeneous(&graph_node_map_elem_free);
/* Add the loopback if needed */
if (surf_network_model->loopback_ && hierarchy_ == RoutingMode::base) {
}
if (not found) {
- sg_platf_route_cbarg_t e_route = xbt_new0(s_sg_platf_route_cbarg_t, 1);
+ sg_platf_route_cbarg_t e_route = new s_sg_platf_route_cbarg_t;
e_route->link_list = new std::vector<surf::LinkImpl*>();
e_route->link_list->push_back(surf_network_model->loopback_);
xbt_graph_new_edge(routeGraph_, node, node, e_route);
xbt_dynar_t nodes = xbt_graph_get_nodes(routeGraph_);
xbt_dynar_foreach (nodes, cursor, node) {
- graph_node_data_t data = (graph_node_data_t)xbt_graph_node_get_data(node);
+ graph_node_data_t data = static_cast<graph_node_data_t>(xbt_graph_node_get_data(node));
data->graph_id = cursor;
}
}
xbt_node_t DijkstraZone::routeGraphNewNode(int id, int graph_id)
{
- graph_node_data_t data = xbt_new0(struct graph_node_data, 1);
+ graph_node_data_t data = new s_graph_node_data_t;
data->id = id;
data->graph_id = graph_id;
xbt_node_t node = xbt_graph_new_node(routeGraph_, data);
- graph_node_map_element_t elm = xbt_new0(struct graph_node_map_element, 1);
- elm->node = node;
- xbt_dict_set_ext(graphNodeMap_, (char*)(&id), sizeof(int), (xbt_dictelm_t)elm, nullptr);
+ graphNodeMap_.emplace(id, node);
return node;
}
-graph_node_map_element_t DijkstraZone::nodeMapSearch(int id)
+xbt_node_t DijkstraZone::nodeMapSearch(int id)
{
- return (graph_node_map_element_t)xbt_dict_get_or_null_ext(graphNodeMap_, (char*)(&id), sizeof(int));
+ auto ret = graphNodeMap_.find(id);
+ return ret == graphNodeMap_.end() ? nullptr : ret->second;
}
/* Parsing */
xbt_node_t src = nullptr;
xbt_node_t dst = nullptr;
- graph_node_map_element_t src_elm = nodeMapSearch(src_id);
- graph_node_map_element_t dst_elm = nodeMapSearch(dst_id);
+ xbt_node_t src_elm = nodeMapSearch(src_id);
+ xbt_node_t dst_elm = nodeMapSearch(dst_id);
if (src_elm)
- src = src_elm->node;
+ src = src_elm;
if (dst_elm)
- dst = dst_elm->node;
+ dst = dst_elm;
/* add nodes if they don't exist in the graph */
if (src_id == dst_id && src == nullptr && dst == nullptr) {
int src_id = src->id();
int dst_id = dst->id();
- int* pred_arr = nullptr;
- int size = 0;
xbt_dynar_t nodes = xbt_graph_get_nodes(routeGraph_);
/* Use the graph_node id mapping set to quickly find the nodes */
- graph_node_map_element_t src_elm = nodeMapSearch(src_id);
- graph_node_map_element_t dst_elm = nodeMapSearch(dst_id);
+ xbt_node_t src_elm = nodeMapSearch(src_id);
+ xbt_node_t dst_elm = nodeMapSearch(dst_id);
- int src_node_id = ((graph_node_data_t)xbt_graph_node_get_data(src_elm->node))->graph_id;
- int dst_node_id = ((graph_node_data_t)xbt_graph_node_get_data(dst_elm->node))->graph_id;
+ int src_node_id = static_cast<graph_node_data_t>(xbt_graph_node_get_data(src_elm))->graph_id;
+ int dst_node_id = static_cast<graph_node_data_t>(xbt_graph_node_get_data(dst_elm))->graph_id;
/* if the src and dst are the same */
if (src_node_id == dst_node_id) {
xbt_edge_t edge = xbt_graph_get_edge(routeGraph_, node_s_v, node_e_v);
if (edge == nullptr)
- THROWF(arg_error, 0, "No route from '%s' to '%s'", src->name().c_str(), dst->name().c_str());
+ THROWF(arg_error, 0, "No route from '%s' to '%s'", src->getCname(), dst->getCname());
- sg_platf_route_cbarg_t e_route = (sg_platf_route_cbarg_t)xbt_graph_edge_get_data(edge);
+ sg_platf_route_cbarg_t e_route = static_cast<sg_platf_route_cbarg_t>(xbt_graph_edge_get_data(edge));
for (auto const& link : *e_route->link_list) {
route->link_list->insert(route->link_list->begin(), link);
}
}
- route_cache_element_t elm = nullptr;
- if (routeCache_) { /* cache mode */
- elm = (route_cache_element_t)xbt_dict_get_or_null_ext(routeCache_, (char*)(&src_id), sizeof(int));
- }
-
- if (elm) { /* cached mode and cache hit */
- pred_arr = elm->pred_arr;
- } else { /* not cached mode, or cache miss */
+ auto elm = routeCache_.emplace(src_id, std::vector<int>());
+ std::vector<int>& pred_arr = elm.first->second;
+ if (elm.second) { /* new element was inserted (not cached mode, or cache miss) */
int nr_nodes = xbt_dynar_length(nodes);
- double* cost_arr = xbt_new0(double, nr_nodes); /* link cost from src to other hosts */
- pred_arr = xbt_new0(int, nr_nodes); /* predecessors in path from src */
- xbt_heap_t pqueue = xbt_heap_new(nr_nodes, xbt_free_f);
+ std::vector<double> cost_arr(nr_nodes); /* link cost from src to other hosts */
+ pred_arr.resize(nr_nodes); /* predecessors in path from src */
+ xbt_heap_t pqueue = xbt_heap_new(nr_nodes, nullptr);
/* initialize */
cost_arr[src_node_id] = 0.0;
pred_arr[i] = 0;
/* initialize priority queue */
- int* nodeid = xbt_new0(int, 1);
- *nodeid = i;
+ int* nodeid = new int(i);
xbt_heap_push(pqueue, nodeid, cost_arr[i]);
}
xbt_dynar_foreach (xbt_graph_node_get_outedges(v_node), cursor, edge) {
xbt_node_t u_node = xbt_graph_edge_get_target(edge);
- graph_node_data_t data = (graph_node_data_t)xbt_graph_node_get_data(u_node);
+ graph_node_data_t data = static_cast<graph_node_data_t>(xbt_graph_node_get_data(u_node));
int u_id = data->graph_id;
- sg_platf_route_cbarg_t tmp_e_route = (sg_platf_route_cbarg_t)xbt_graph_edge_get_data(edge);
+ sg_platf_route_cbarg_t tmp_e_route = static_cast<sg_platf_route_cbarg_t>(xbt_graph_edge_get_data(edge));
int cost_v_u = tmp_e_route->link_list->size(); /* count of links, old model assume 1 */
if (cost_v_u + cost_arr[*v_id] < cost_arr[u_id]) {
pred_arr[u_id] = *v_id;
cost_arr[u_id] = cost_v_u + cost_arr[*v_id];
- int* nodeid = xbt_new0(int, 1);
- *nodeid = u_id;
+ int* nodeid = new int(u_id);
xbt_heap_push(pqueue, nodeid, cost_arr[u_id]);
}
}
/* free item popped from pqueue */
- xbt_free(v_id);
+ delete v_id;
}
-
- xbt_free(cost_arr);
xbt_heap_free(pqueue);
}
xbt_edge_t edge = xbt_graph_get_edge(routeGraph_, node_pred_v, node_v);
if (edge == nullptr)
- THROWF(arg_error, 0, "No route from '%s' to '%s'", src->name().c_str(), dst->name().c_str());
+ THROWF(arg_error, 0, "No route from '%s' to '%s'", src->getCname(), dst->getCname());
- sg_platf_route_cbarg_t e_route = (sg_platf_route_cbarg_t)xbt_graph_edge_get_data(edge);
+ sg_platf_route_cbarg_t e_route = static_cast<sg_platf_route_cbarg_t>(xbt_graph_edge_get_data(edge));
NetPoint* prev_gw_src = gw_src;
gw_src = e_route->gw_src;
if (v == dst_node_id)
first_gw = gw_dst;
- if (hierarchy_ == RoutingMode::recursive && v != dst_node_id &&
- strcmp(gw_dst->name().c_str(), prev_gw_src->name().c_str())) {
+ if (hierarchy_ == RoutingMode::recursive && v != dst_node_id && gw_dst->getName() != prev_gw_src->getName()) {
std::vector<surf::LinkImpl*> e_route_as_to_as;
NetPoint* gw_dst_net_elm = nullptr;
if (lat)
*lat += static_cast<surf::LinkImpl*>(link)->latency();
}
- size++;
}
if (hierarchy_ == RoutingMode::recursive) {
route->gw_dst = first_gw;
}
- if (routeCache_ && elm == nullptr) {
- /* add to predecessor list of the current src-host to cache */
- elm = xbt_new0(struct route_cache_element, 1);
- elm->pred_arr = pred_arr;
- elm->size = size;
- xbt_dict_set_ext(routeCache_, (char*)(&src_id), sizeof(int), (xbt_dictelm_t)elm, nullptr);
- }
-
- if (not routeCache_)
- xbt_free(pred_arr);
+ if (not cached_)
+ routeCache_.clear();
}
DijkstraZone::~DijkstraZone()
{
- xbt_graph_free_graph(routeGraph_, &xbt_free_f, &graph_edge_data_free, &xbt_free_f);
- xbt_dict_free(&graphNodeMap_);
- xbt_dict_free(&routeCache_);
+ xbt_graph_free_graph(routeGraph_, &graph_node_data_free, &graph_edge_data_free, nullptr);
}
/* Creation routing model functions */
-DijkstraZone::DijkstraZone(NetZone* father, std::string name, bool cached) : RoutedZone(father, name)
+DijkstraZone::DijkstraZone(NetZone* father, std::string name, bool cached) : RoutedZone(father, name), cached_(cached)
{
- if (cached)
- routeCache_ = xbt_dict_new_homogeneous(&route_cache_elem_free);
}
void DijkstraZone::addRoute(sg_platf_route_cbarg_t route)
{
NetPoint* src = route->src;
NetPoint* dst = route->dst;
- const char* srcName = src->name().c_str();
- const char* dstName = dst->name().c_str();
+ const char* srcName = src->getCname();
+ const char* dstName = dst->getCname();
addRouteCheckParams(route);
/* Create the topology graph */
if (not routeGraph_)
routeGraph_ = xbt_graph_new_graph(1, nullptr);
- if (not graphNodeMap_)
- graphNodeMap_ = xbt_dict_new_homogeneous(&graph_node_map_elem_free);
/* we don't check whether the route already exist, because the algorithm may find another path through some other
* nodes */
if (edge)
THROWF(arg_error, 0, "Route from %s to %s already exists", dstName, srcName);
} else {
- XBT_DEBUG("Load NetzoneRoute from %s@%s to %s@%s", dstName, route->gw_dst->name().c_str(), srcName,
- route->gw_src->name().c_str());
+ XBT_DEBUG("Load NetzoneRoute from %s@%s to %s@%s", dstName, route->gw_dst->getCname(), srcName,
+ route->gw_src->getCname());
if (edge)
- THROWF(arg_error, 0, "Route from %s@%s to %s@%s already exists", dstName, route->gw_dst->name().c_str(), srcName,
- route->gw_src->name().c_str());
+ THROWF(arg_error, 0, "Route from %s@%s to %s@%s already exists", dstName, route->gw_dst->getCname(), srcName,
+ route->gw_src->getCname());
}
if (route->gw_dst && route->gw_src) {
-/* Copyright (c) 2013-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/routing/RoutedZone.hpp"
-typedef struct graph_node_data {
+struct s_graph_node_data_t {
int id;
int graph_id; /* used for caching internal graph id's */
-} s_graph_node_data_t;
+};
typedef s_graph_node_data_t* graph_node_data_t;
-typedef struct graph_node_map_element {
- xbt_node_t node;
-} s_graph_node_map_element_t;
-typedef s_graph_node_map_element_t* graph_node_map_element_t;
-
-typedef struct route_cache_element {
- int* pred_arr;
- int size;
-} s_route_cache_element_t;
-typedef s_route_cache_element_t* route_cache_element_t;
-
namespace simgrid {
namespace kernel {
namespace routing {
~DijkstraZone() override;
xbt_node_t routeGraphNewNode(int id, int graph_id);
- graph_node_map_element_t nodeMapSearch(int id);
+ xbt_node_t nodeMapSearch(int id);
void newRoute(int src_id, int dst_id, sg_platf_route_cbarg_t e_route);
/* For each vertex (node) already in the graph,
* make sure it also has a loopback link; this loopback
void addRoute(sg_platf_route_cbarg_t route) override;
xbt_graph_t routeGraph_ = nullptr; /* xbt_graph */
- xbt_dict_t graphNodeMap_ = nullptr; /* map */
- xbt_dict_t routeCache_ = nullptr; /* use in cache mode */
+ std::map<int, xbt_node_t> graphNodeMap_; /* map */
+ bool cached_; /* cache mode */
+ std::map<int, std::vector<int>> routeCache_; /* use in cache mode */
};
}
}
{
if (this->routers_ != nullptr) {
for (unsigned int i = 0; i < this->numGroups_ * this->numChassisPerGroup_ * this->numBladesPerChassis_; i++)
- delete (routers_[i]);
- xbt_free(routers_);
+ delete routers_[i];
+ delete[] routers_;
}
}
std::vector<std::string> tmp;
boost::split(parameters, cluster->topo_parameters, boost::is_any_of(";"));
- // TODO : we have to check for zeros and negative numbers, or it might crash
- if (parameters.size() != 4) {
+ if (parameters.size() != 4 || parameters.empty()) {
surf_parse_error(
"Dragonfly are defined by the number of groups, chassis per groups, blades per chassis, nodes per blade");
}
DragonflyRouter::~DragonflyRouter()
{
- if (this->myNodes_ != nullptr)
- xbt_free(myNodes_);
- if (this->greenLinks_ != nullptr)
- xbt_free(greenLinks_);
- if (this->blackLinks_ != nullptr)
- xbt_free(blackLinks_);
- if (this->blueLinks_ != nullptr)
- xbt_free(blueLinks_);
+ delete[] myNodes_;
+ delete[] greenLinks_;
+ delete[] blackLinks_;
+ delete blueLinks_;
}
void DragonflyZone::generateRouters()
{
- this->routers_ = static_cast<DragonflyRouter**>(xbt_malloc0(this->numGroups_ * this->numChassisPerGroup_ *
- this->numBladesPerChassis_ * sizeof(DragonflyRouter*)));
+ this->routers_ = new DragonflyRouter*[this->numGroups_ * this->numChassisPerGroup_ * this->numBladesPerChassis_];
for (unsigned int i = 0; i < this->numGroups_; i++) {
for (unsigned int j = 0; j < this->numChassisPerGroup_; j++) {
// Links from routers to their local nodes.
for (unsigned int i = 0; i < numRouters; i++) {
// allocate structures
- this->routers_[i]->myNodes_ = static_cast<surf::LinkImpl**>(
- xbt_malloc0(numLinksperLink_ * this->numNodesPerBlade_ * sizeof(surf::LinkImpl*)));
- this->routers_[i]->greenLinks_ =
- static_cast<surf::LinkImpl**>(xbt_malloc0(this->numBladesPerChassis_ * sizeof(surf::LinkImpl*)));
- this->routers_[i]->blackLinks_ =
- static_cast<surf::LinkImpl**>(xbt_malloc0(this->numChassisPerGroup_ * sizeof(surf::LinkImpl*)));
+ this->routers_[i]->myNodes_ = new surf::LinkImpl*[numLinksperLink_ * this->numNodesPerBlade_];
+ this->routers_[i]->greenLinks_ = new surf::LinkImpl*[this->numBladesPerChassis_];
+ this->routers_[i]->blackLinks_ = new surf::LinkImpl*[this->numChassisPerGroup_];
for (unsigned int j = 0; j < numLinksperLink_ * this->numNodesPerBlade_; j += numLinksperLink_) {
std::string id = "local_link_from_router_"+ std::to_string(i) + "_to_node_" +
for (unsigned int j = i + 1; j < this->numGroups_; j++) {
unsigned int routernumi = i * numBladesPerChassis_ * numChassisPerGroup_ + j;
unsigned int routernumj = j * numBladesPerChassis_ * numChassisPerGroup_ + i;
- this->routers_[routernumi]->blueLinks_ = static_cast<surf::LinkImpl**>(xbt_malloc0(sizeof(surf::LinkImpl*)));
- this->routers_[routernumj]->blueLinks_ = static_cast<surf::LinkImpl**>(xbt_malloc0(sizeof(surf::LinkImpl*)));
+ this->routers_[routernumi]->blueLinks_ = new surf::LinkImpl*;
+ this->routers_[routernumj]->blueLinks_ = new surf::LinkImpl*;
std::string id = "blue_link_between_group_"+ std::to_string(i) +"_and_" + std::to_string(j) +"_routers_" +
std::to_string(routernumi) + "_and_" + std::to_string(routernumj) + "_" + std::to_string(uniqueId);
this->createLink(id, this->numLinksBlue_, &linkup, &linkdown);
if (dst->isRouter() || src->isRouter())
return;
- XBT_VERB("dragonfly getLocalRout from '%s'[%u] to '%s'[%u]", src->name().c_str(), src->id(), dst->name().c_str(),
- dst->id());
+ XBT_VERB("dragonfly getLocalRoute from '%s'[%u] to '%s'[%u]", src->getCname(), src->id(), dst->getCname(), dst->id());
if ((src->id() == dst->id()) && hasLoopback_) {
std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(nodePosition(src->id()));
/* Let's find the source and the destination in our internal structure */
auto searchedNode = this->computeNodes_.find(src->id());
xbt_assert(searchedNode != this->computeNodes_.end(), "Could not find the source %s [%u] in the fat tree",
- src->name().c_str(), src->id());
+ src->getCname(), src->id());
FatTreeNode* source = searchedNode->second;
searchedNode = this->computeNodes_.find(dst->id());
xbt_assert(searchedNode != this->computeNodes_.end(), "Could not find the destination %s [%u] in the fat tree",
- dst->name().c_str(), dst->id());
+ dst->getCname(), dst->id());
FatTreeNode* destination = searchedNode->second;
- XBT_VERB("Get route and latency from '%s' [%u] to '%s' [%u] in a fat tree", src->name().c_str(), src->id(),
- dst->name().c_str(), dst->id());
+ XBT_VERB("Get route and latency from '%s' [%u] to '%s' [%u] in a fat tree", src->getCname(), src->id(),
+ dst->getCname(), dst->id());
/* In case destination is the source, and there is a loopback, let's use it instead of going up to a switch */
if (source->id == destination->id && this->hasLoopback_) {
for (unsigned int i = 0; i < table_size; i++)
for (unsigned int j = 0; j < table_size; j++)
routing_route_free(TO_FLOYD_LINK(i, j));
- xbt_free(linkTable_);
+ delete[] linkTable_;
- xbt_free(predecessorTable_);
- xbt_free(costTable_);
+ delete[] predecessorTable_;
+ delete[] costTable_;
}
void FloydZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
do {
int pred = TO_FLOYD_PRED(src->id(), cur);
if (pred == -1)
- THROWF(arg_error, 0, "No route from '%s' to '%s'", src->name().c_str(), dst->name().c_str());
+ THROWF(arg_error, 0, "No route from '%s' to '%s'", src->getCname(), dst->getCname());
route_stack.push_back(TO_FLOYD_LINK(pred, cur));
cur = pred;
} while (cur != src->id());
sg_platf_route_cbarg_t e_route = route_stack.back();
route_stack.pop_back();
if (hierarchy_ == RoutingMode::recursive && prev_dst_gw != nullptr &&
- strcmp(prev_dst_gw->name().c_str(), e_route->gw_src->name().c_str())) {
+ prev_dst_gw->getCname() != e_route->gw_src->getCname()) {
getGlobalRoute(prev_dst_gw, e_route->gw_src, route->link_list, lat);
}
if (not linkTable_) {
/* Create Cost, Predecessor and Link tables */
- costTable_ = xbt_new0(double, table_size* table_size); /* link cost from host to host */
- predecessorTable_ = xbt_new0(int, table_size* table_size); /* predecessor host numbers */
- linkTable_ = xbt_new0(sg_platf_route_cbarg_t, table_size * table_size); /* actual link between src and dst */
+ costTable_ = new double[table_size * table_size]; /* link cost from host to host */
+ predecessorTable_ = new int[table_size * table_size]; /* predecessor host numbers */
+ linkTable_ = new sg_platf_route_cbarg_t[table_size * table_size]; /* actual link between src and dst */
/* Initialize costs and predecessors */
for (unsigned int i = 0; i < table_size; i++)
if (route->gw_dst) // netzone route (to adapt the error message, if any)
xbt_assert(nullptr == TO_FLOYD_LINK(route->src->id(), route->dst->id()),
"The route between %s@%s and %s@%s already exists (Rq: routes are symmetrical by default).",
- route->src->name().c_str(), route->gw_src->name().c_str(), route->dst->name().c_str(),
- route->gw_dst->name().c_str());
+ route->src->getCname(), route->gw_src->getCname(), route->dst->getCname(), route->gw_dst->getCname());
else
xbt_assert(nullptr == TO_FLOYD_LINK(route->src->id(), route->dst->id()),
"The route between %s and %s already exists (Rq: routes are symmetrical by default).",
- route->src->name().c_str(), route->dst->name().c_str());
+ route->src->getCname(), route->dst->getCname());
TO_FLOYD_LINK(route->src->id(), route->dst->id()) = newExtendedRoute(hierarchy_, route, 1);
TO_FLOYD_PRED(route->src->id(), route->dst->id()) = route->src->id();
xbt_assert(
nullptr == TO_FLOYD_LINK(route->dst->id(), route->src->id()),
"The route between %s@%s and %s@%s already exists. You should not declare the reverse path as symmetrical.",
- route->dst->name().c_str(), route->gw_dst->name().c_str(), route->src->name().c_str(),
- route->gw_src->name().c_str());
+ route->dst->getCname(), route->gw_dst->getCname(), route->src->getCname(), route->gw_src->getCname());
else
xbt_assert(nullptr == TO_FLOYD_LINK(route->dst->id(), route->src->id()),
"The route between %s and %s already exists. You should not declare the reverse path as symmetrical.",
- route->dst->name().c_str(), route->src->name().c_str());
+ route->dst->getCname(), route->src->getCname());
if (route->gw_dst && route->gw_src) {
NetPoint* gw_tmp = route->gw_src;
}
if (not route->gw_src || not route->gw_dst)
- XBT_DEBUG("Load Route from \"%s\" to \"%s\"", route->dst->name().c_str(), route->src->name().c_str());
+ XBT_DEBUG("Load Route from \"%s\" to \"%s\"", route->dst->getCname(), route->src->getCname());
else
- XBT_DEBUG("Load NetzoneRoute from \"%s(%s)\" to \"%s(%s)\"", route->dst->name().c_str(), route->gw_src->name().c_str(),
- route->src->name().c_str(), route->gw_dst->name().c_str());
+ XBT_DEBUG("Load NetzoneRoute from \"%s(%s)\" to \"%s(%s)\"", route->dst->getCname(), route->gw_src->getCname(),
+ route->src->getCname(), route->gw_dst->getCname());
TO_FLOYD_LINK(route->dst->id(), route->src->id()) = newExtendedRoute(hierarchy_, route, 0);
TO_FLOYD_PRED(route->dst->id(), route->src->id()) = route->dst->id();
if (not linkTable_) {
/* Create Cost, Predecessor and Link tables */
- costTable_ = xbt_new0(double, table_size* table_size); /* link cost from host to host */
- predecessorTable_ = xbt_new0(int, table_size* table_size); /* predecessor host numbers */
- linkTable_ = xbt_new0(sg_platf_route_cbarg_t, table_size * table_size); /* actual link between src and dst */
+ costTable_ = new double[table_size * table_size]; /* link cost from host to host */
+ predecessorTable_ = new int[table_size * table_size]; /* predecessor host numbers */
+ linkTable_ = new sg_platf_route_cbarg_t[table_size * table_size]; /* actual link between src and dst */
/* Initialize costs and predecessors */
for (unsigned int i = 0; i < table_size; i++)
for (unsigned int i = 0; i < table_size; i++) {
sg_platf_route_cbarg_t e_route = TO_FLOYD_LINK(i, i);
if (not e_route) {
- e_route = xbt_new0(s_sg_platf_route_cbarg_t, 1);
+ e_route = new s_sg_platf_route_cbarg_t;
e_route->gw_src = nullptr;
e_route->gw_dst = nullptr;
e_route->link_list = new std::vector<surf::LinkImpl*>();
/* Create table if needed */
if (not routingTable_)
- routingTable_ = xbt_new0(sg_platf_route_cbarg_t, table_size * table_size);
+ routingTable_ = new sg_platf_route_cbarg_t[table_size * table_size]();
/* Add the loopback if needed */
if (surf_network_model->loopback_ && hierarchy_ == RoutingMode::base) {
for (unsigned int i = 0; i < table_size; i++) {
sg_platf_route_cbarg_t e_route = TO_ROUTE_FULL(i, i);
if (not e_route) {
- e_route = xbt_new0(s_sg_platf_route_cbarg_t, 1);
+ e_route = new s_sg_platf_route_cbarg_t;
e_route->gw_src = nullptr;
e_route->gw_dst = nullptr;
e_route->link_list = new std::vector<surf::LinkImpl*>();
for (unsigned int j = 0; j < table_size; j++) {
if (TO_ROUTE_FULL(i, j)) {
delete TO_ROUTE_FULL(i, j)->link_list;
- xbt_free(TO_ROUTE_FULL(i, j));
+ delete TO_ROUTE_FULL(i, j);
}
}
- xbt_free(routingTable_);
+ delete[] routingTable_;
}
}
void FullZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t res, double* lat)
{
- XBT_DEBUG("full getLocalRoute from %s[%u] to %s[%u]", src->cname(), src->id(), dst->cname(), dst->id());
+ XBT_DEBUG("full getLocalRoute from %s[%u] to %s[%u]", src->getCname(), src->id(), dst->getCname(), dst->id());
unsigned int table_size = getTableSize();
sg_platf_route_cbarg_t e_route = TO_ROUTE_FULL(src->id(), dst->id());
unsigned int table_size = getTableSize();
if (not routingTable_)
- routingTable_ = xbt_new0(sg_platf_route_cbarg_t, table_size * table_size);
+ routingTable_ = new sg_platf_route_cbarg_t[table_size * table_size]();
/* Check that the route does not already exist */
if (route->gw_dst) // inter-zone route (to adapt the error message, if any)
xbt_assert(nullptr == TO_ROUTE_FULL(src->id(), dst->id()),
"The route between %s@%s and %s@%s already exists (Rq: routes are symmetrical by default).",
- src->cname(), route->gw_src->cname(), dst->cname(), route->gw_dst->cname());
+ src->getCname(), route->gw_src->getCname(), dst->getCname(), route->gw_dst->getCname());
else
xbt_assert(nullptr == TO_ROUTE_FULL(src->id(), dst->id()),
- "The route between %s and %s already exists (Rq: routes are symmetrical by default).", src->cname(),
- dst->cname());
+ "The route between %s and %s already exists (Rq: routes are symmetrical by default).", src->getCname(),
+ dst->getCname());
/* Add the route to the base */
TO_ROUTE_FULL(src->id(), dst->id()) = newExtendedRoute(hierarchy_, route, true);
xbt_assert(
nullptr == TO_ROUTE_FULL(dst->id(), src->id()),
"The route between %s@%s and %s@%s already exists. You should not declare the reverse path as symmetrical.",
- dst->cname(), route->gw_dst->cname(), src->cname(), route->gw_src->cname());
+ dst->getCname(), route->gw_dst->getCname(), src->getCname(), route->gw_src->getCname());
else
xbt_assert(nullptr == TO_ROUTE_FULL(dst->id(), src->id()),
"The route between %s and %s already exists. You should not declare the reverse path as symmetrical.",
- dst->cname(), src->cname());
+ dst->getCname(), src->getCname());
TO_ROUTE_FULL(dst->id(), src->id()) = newExtendedRoute(hierarchy_, route, false);
}
// Our rank in the vertices_ array of the netzone that contains us.
unsigned int id() { return id_; }
- std::string name() { return name_; }
- const char* cname() { return name_.c_str(); }
+ const std::string& getName() const { return name_; }
+ const char* getCname() const { return name_.c_str(); }
/** @brief the NetZone in which this NetPoint is included */
NetZoneImpl* netzone() { return netzone_; }
{
/* Argument validity checks */
if (e_route->gw_dst) {
- XBT_DEBUG("Load bypassNetzoneRoute from %s@%s to %s@%s", e_route->src->cname(), e_route->gw_src->cname(),
- e_route->dst->cname(), e_route->gw_dst->cname());
+ XBT_DEBUG("Load bypassNetzoneRoute from %s@%s to %s@%s", e_route->src->getCname(), e_route->gw_src->getCname(),
+ e_route->dst->getCname(), e_route->gw_dst->getCname());
xbt_assert(not e_route->link_list->empty(), "Bypass route between %s@%s and %s@%s cannot be empty.",
- e_route->src->cname(), e_route->gw_src->cname(), e_route->dst->cname(), e_route->gw_dst->cname());
+ e_route->src->getCname(), e_route->gw_src->getCname(), e_route->dst->getCname(),
+ e_route->gw_dst->getCname());
xbt_assert(bypassRoutes_.find({e_route->src, e_route->dst}) == bypassRoutes_.end(),
- "The bypass route between %s@%s and %s@%s already exists.", e_route->src->cname(),
- e_route->gw_src->cname(), e_route->dst->cname(), e_route->gw_dst->cname());
+ "The bypass route between %s@%s and %s@%s already exists.", e_route->src->getCname(),
+ e_route->gw_src->getCname(), e_route->dst->getCname(), e_route->gw_dst->getCname());
} else {
- XBT_DEBUG("Load bypassRoute from %s to %s", e_route->src->cname(), e_route->dst->cname());
+ XBT_DEBUG("Load bypassRoute from %s to %s", e_route->src->getCname(), e_route->dst->getCname());
xbt_assert(not e_route->link_list->empty(), "Bypass route between %s and %s cannot be empty.",
- e_route->src->cname(), e_route->dst->cname());
+ e_route->src->getCname(), e_route->dst->getCname());
xbt_assert(bypassRoutes_.find({e_route->src, e_route->dst}) == bypassRoutes_.end(),
- "The bypass route between %s and %s already exists.", e_route->src->cname(), e_route->dst->cname());
+ "The bypass route between %s and %s already exists.", e_route->src->getCname(),
+ e_route->dst->getCname());
}
/* Build a copy that will be stored in the dict */
NetZoneImpl* src_as = src->netzone();
NetZoneImpl* dst_as = dst->netzone();
- xbt_assert(src_as, "Host %s must be in a netzone", src->cname());
- xbt_assert(dst_as, "Host %s must be in a netzone", dst->cname());
+ xbt_assert(src_as, "Host %s must be in a netzone", src->getCname());
+ xbt_assert(dst_as, "Host %s must be in a netzone", dst->getCname());
/* (2) find the path to the root routing component */
std::vector<NetZoneImpl*> path_src;
if (latency)
*latency += link->latency();
}
- XBT_DEBUG("Found a bypass route from '%s' to '%s' with %zu links", src->cname(), dst->cname(),
+ XBT_DEBUG("Found a bypass route from '%s' to '%s' with %zu links", src->getCname(), dst->getCname(),
bypassedRoute->links.size());
return true;
}
if (bypassedRoute) {
XBT_DEBUG("Found a bypass route from '%s' to '%s' with %zu links. We may have to complete it with recursive "
"calls to getRoute",
- src->cname(), dst->cname(), bypassedRoute->links.size());
+ src->getCname(), dst->getCname(), bypassedRoute->links.size());
if (src != key.first)
getGlobalRoute(src, bypassedRoute->gw_src, links, latency);
for (surf::LinkImpl* const& link : bypassedRoute->links) {
getGlobalRoute(bypassedRoute->gw_dst, dst, links, latency);
return true;
}
- XBT_DEBUG("No bypass route from '%s' to '%s'.", src->cname(), dst->cname());
+ XBT_DEBUG("No bypass route from '%s' to '%s'.", src->getCname(), dst->getCname());
return false;
}
s_sg_platf_route_cbarg_t route;
memset(&route, 0, sizeof(route));
- XBT_DEBUG("Resolve route from '%s' to '%s'", src->cname(), dst->cname());
+ XBT_DEBUG("Resolve route from '%s' to '%s'", src->getCname(), dst->getCname());
/* Find how src and dst are interconnected */
NetZoneImpl *common_ancestor;
common_ancestor->getLocalRoute(src_ancestor->netpoint_, dst_ancestor->netpoint_, &route, latency);
xbt_assert((route.gw_src != nullptr) && (route.gw_dst != nullptr), "bad gateways for route from \"%s\" to \"%s\"",
- src->cname(), dst->cname());
+ src->getCname(), dst->getCname());
/* If source gateway is not our source, we have to recursively find our way up to this point */
if (src != route.gw_src)
{
if (route) {
delete route->link_list;
- xbt_free(route);
+ delete route;
}
}
if (my_src == my_dst)
continue;
- sg_platf_route_cbarg_t route = xbt_new0(s_sg_platf_route_cbarg_t, 1);
+ sg_platf_route_cbarg_t route = new s_sg_platf_route_cbarg_t;
route->link_list = new std::vector<surf::LinkImpl*>();
getLocalRoute(my_src, my_dst, route, nullptr);
- XBT_DEBUG("get_route_and_latency %s -> %s", my_src->cname(), my_dst->cname());
+ XBT_DEBUG("get_route_and_latency %s -> %s", my_src->getCname(), my_dst->getCname());
xbt_node_t current;
xbt_node_t previous;
const char *current_name;
if (route->gw_src) {
- previous = new_xbt_graph_node(graph, route->gw_src->cname(), nodes);
- previous_name = route->gw_src->cname();
+ previous = new_xbt_graph_node(graph, route->gw_src->getCname(), nodes);
+ previous_name = route->gw_src->getCname();
} else {
- previous = new_xbt_graph_node(graph, my_src->cname(), nodes);
- previous_name = my_src->cname();
+ previous = new_xbt_graph_node(graph, my_src->getCname(), nodes);
+ previous_name = my_src->getCname();
}
for (auto const& link : *route->link_list) {
- const char* link_name = link->cname();
+ const char* link_name = link->getCname();
current = new_xbt_graph_node(graph, link_name, nodes);
current_name = link_name;
new_xbt_graph_edge(graph, previous, current, edges);
}
if (route->gw_dst) {
- current = new_xbt_graph_node(graph, route->gw_dst->cname(), nodes);
- current_name = route->gw_dst->cname();
+ current = new_xbt_graph_node(graph, route->gw_dst->getCname(), nodes);
+ current_name = route->gw_dst->getCname();
} else {
- current = new_xbt_graph_node(graph, my_dst->cname(), nodes);
- current_name = my_dst->cname();
+ current = new_xbt_graph_node(graph, my_dst->getCname(), nodes);
+ current_name = my_dst->getCname();
}
new_xbt_graph_edge(graph, previous, current, edges);
XBT_DEBUG(" %s -> %s", previous_name, current_name);
delete route->link_list;
- xbt_free(route);
+ delete route;
}
}
}
{
sg_platf_route_cbarg_t result;
- result = xbt_new0(s_sg_platf_route_cbarg_t, 1);
+ result = new s_sg_platf_route_cbarg_t;
result->link_list = new std::vector<surf::LinkImpl*>();
xbt_assert(hierarchy == RoutingMode::base || hierarchy == RoutingMode::recursive,
void RoutedZone::getRouteCheckParams(NetPoint* src, NetPoint* dst)
{
- xbt_assert(src, "Cannot find a route from nullptr to %s", dst->cname());
- xbt_assert(dst, "Cannot find a route from %s to nullptr", src->cname());
+ xbt_assert(src, "Cannot find a route from nullptr to %s", dst->getCname());
+ xbt_assert(dst, "Cannot find a route from %s to nullptr", src->getCname());
NetZone* src_as = src->netzone();
NetZone* dst_as = dst->netzone();
xbt_assert(src_as == dst_as,
"Internal error: %s@%s and %s@%s are not in the same netzone as expected. Please report that bug.",
- src->cname(), src_as->getCname(), dst->cname(), dst_as->getCname());
+ src->getCname(), src_as->getCname(), dst->getCname(), dst_as->getCname());
xbt_assert(this == dst_as, "Internal error: route destination %s@%s is not in netzone %s as expected (route source: "
"%s@%s). Please report that bug.",
- src->cname(), dst->cname(), src_as->getCname(), dst_as->getCname(), getCname());
+ src->getCname(), dst->getCname(), src_as->getCname(), dst_as->getCname(), getCname());
}
void RoutedZone::addRouteCheckParams(sg_platf_route_cbarg_t route)
{
NetPoint* src = route->src;
NetPoint* dst = route->dst;
- const char* srcName = src->cname();
- const char* dstName = dst->cname();
+ const char* srcName = src->getCname();
+ const char* dstName = dst->getCname();
if (not route->gw_dst || not route->gw_src) {
XBT_DEBUG("Load Route from \"%s\" to \"%s\"", srcName, dstName);
"When defining a route, dst cannot be a netzone such as '%s'. Did you meant to have an NetzoneRoute?",
dstName);
} else {
- XBT_DEBUG("Load NetzoneRoute from %s@%s to %s@%s", srcName, route->gw_src->cname(), dstName, route->gw_dst->cname());
+ XBT_DEBUG("Load NetzoneRoute from %s@%s to %s@%s", srcName, route->gw_src->getCname(), dstName,
+ route->gw_dst->getCname());
xbt_assert(src->isNetZone(), "When defining a NetzoneRoute, src must be a netzone but '%s' is not", srcName);
xbt_assert(dst->isNetZone(), "When defining a NetzoneRoute, dst must be a netzone but '%s' is not", dstName);
xbt_assert(route->gw_dst->isHost() || route->gw_dst->isRouter(),
"When defining a NetzoneRoute, gw_dst must be an host or a router but '%s' is not.", dstName);
- xbt_assert(route->gw_src != route->gw_dst, "Cannot define an NetzoneRoute from '%s' to itself", route->gw_src->cname());
+ xbt_assert(route->gw_src != route->gw_dst, "Cannot define an NetzoneRoute from '%s' to itself",
+ route->gw_src->getCname());
- xbt_assert(src, "Cannot add a route from %s@%s to %s@%s: %s does not exist.", srcName, route->gw_src->cname(),
- dstName, route->gw_dst->cname(), srcName);
- xbt_assert(dst, "Cannot add a route from %s@%s to %s@%s: %s does not exist.", srcName, route->gw_src->cname(),
- dstName, route->gw_dst->cname(), dstName);
+ xbt_assert(src, "Cannot add a route from %s@%s to %s@%s: %s does not exist.", srcName, route->gw_src->getCname(),
+ dstName, route->gw_dst->getCname(), srcName);
+ xbt_assert(dst, "Cannot add a route from %s@%s to %s@%s: %s does not exist.", srcName, route->gw_src->getCname(),
+ dstName, route->gw_dst->getCname(), dstName);
xbt_assert(not route->link_list->empty(), "Empty route (between %s@%s and %s@%s) forbidden.", srcName,
- route->gw_src->cname(), dstName, route->gw_dst->cname());
+ route->gw_src->getCname(), dstName, route->gw_dst->getCname());
}
onRouteCreation(route->symmetrical, route->src, route->dst, route->gw_src, route->gw_dst, route->link_list);
-/* Copyright (c) 2013-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
}
} // namespace
-SG_BEGIN_DECL()
+extern "C" {
XBT_PRIVATE xbt_node_t new_xbt_graph_node(xbt_graph_t graph, const char* name, xbt_dict_t nodes);
XBT_PRIVATE xbt_edge_t new_xbt_graph_edge(xbt_graph_t graph, xbt_node_t s, xbt_node_t d, xbt_dict_t edges);
-SG_END_DECL()
+}
#endif /* SIMGRID_ROUTING_GENERIC_HPP_ */
void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
{
- XBT_VERB("torus getLocalRoute from '%s'[%u] to '%s'[%u]", src->name().c_str(), src->id(), dst->name().c_str(),
- dst->id());
+ XBT_VERB("torus getLocalRoute from '%s'[%u] to '%s'[%u]", src->getCname(), src->id(), dst->getCname(), dst->id());
if (dst->isRouter() || src->isRouter())
return;
std::vector<std::string> string_values;
boost::split(string_values, coordStr, boost::is_any_of(" "));
- xbt_assert(string_values.size() == 3, "Coordinates of %s must have 3 dimensions", netpoint->cname());
+ xbt_assert(string_values.size() == 3, "Coordinates of %s must have 3 dimensions", netpoint->getCname());
for (auto const& str : string_values)
try {
coords.shrink_to_fit();
netpoint->extension_set<Coords>(this);
- XBT_DEBUG("Coords of %s %p: %s", netpoint->cname(), netpoint, coordStr.c_str());
+ XBT_DEBUG("Coords of %s %p: %s", netpoint->getCname(), netpoint, coordStr.c_str());
}
}; // namespace vivaldi
{
simgrid::kernel::routing::vivaldi::Coords* coords = np->extension<simgrid::kernel::routing::vivaldi::Coords>();
xbt_assert(coords, "Please specify the Vivaldi coordinates of %s %s (%p)",
- (np->isNetZone() ? "Netzone" : (np->isHost() ? "Host" : "Router")), np->cname(), np);
+ (np->isNetZone() ? "Netzone" : (np->isHost() ? "Host" : "Router")), np->getCname(), np);
return &coords->coords;
}
new simgrid::kernel::routing::vivaldi::Coords(netpoint, coord);
- std::string link_up = "link_" + netpoint->name() + "_UP";
- std::string link_down = "link_" + netpoint->name() + "_DOWN";
+ std::string link_up = "link_" + netpoint->getName() + "_UP";
+ std::string link_down = "link_" + netpoint->getName() + "_DOWN";
surf::LinkImpl* linkUp = surf_network_model->createLink(link_up, bw_out, 0, SURF_LINK_SHARED);
surf::LinkImpl* linkDown = surf_network_model->createLink(link_down, bw_in, 0, SURF_LINK_SHARED);
privateLinks_.insert({netpoint->id(), {linkUp, linkDown}});
void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
{
- XBT_DEBUG("vivaldi getLocalRoute from '%s'[%u] '%s'[%u]", src->cname(), src->id(), dst->cname(), dst->id());
+ XBT_DEBUG("vivaldi getLocalRoute from '%s'[%u] '%s'[%u]", src->getCname(), src->id(), dst->getCname(), dst->id());
if (src->isNetZone()) {
- std::string srcName = "router_" + src->name();
- std::string dstName = "router_" + dst->name();
+ std::string srcName = "router_" + src->getName();
+ std::string dstName = "router_" + dst->getName();
route->gw_src = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(srcName.c_str());
route->gw_dst = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(dstName.c_str());
}
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <dwarf.h>
#include <elfutils/libdw.h>
+#include <libunwind.h>
-#include "src/mc/mc_private.h"
-#include "src/mc/LocationList.hpp"
#include "src/mc/AddressSpace.hpp"
+#include "src/mc/DwarfExpression.hpp"
#include "src/mc/Frame.hpp"
+#include "src/mc/LocationList.hpp"
#include "src/mc/ObjectInformation.hpp"
-#include "src/mc/DwarfExpression.hpp"
#include "src/mc/mc_dwarf.hpp"
+#include "src/mc/mc_private.hpp"
using simgrid::mc::remote;
* the process memory, etc. All those informations are gathered in
* the evaluation context.
*/
-struct ExpressionContext {
+class ExpressionContext {
+public:
ExpressionContext() :
cursor(nullptr), frame_base(nullptr), address_space(nullptr),
object_info(nullptr), process_index(simgrid::mc::ProcessIndexMissing) {}
-/* Copyright (c) 2008-2015. The SimGrid Team.
+/* Copyright (c) 2008-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "src/mc/PageStore.hpp"
#include "src/mc/Transition.hpp"
#include "src/mc/checker/Checker.hpp"
-#include "src/mc/mc_exit.h"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_record.h"
+#include "src/mc/mc_exit.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_record.hpp"
#include "src/mc/remote/mc_protocol.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ModelChecker, mc, "ModelChecker");
-/* Copyright (c) 2007-2015. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
public:
std::shared_ptr<simgrid::mc::Snapshot> parent_snapshot_;
-public:
ModelChecker(ModelChecker const&) = delete;
ModelChecker& operator=(ModelChecker const&) = delete;
explicit ModelChecker(std::unique_ptr<RemoteClient> process);
-/* Copyright (c) 2007-2015. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "src/mc/Type.hpp"
#include "src/mc/Frame.hpp"
-#include "src/smpi/include/private.h"
+#include "src/smpi/include/private.hpp"
namespace simgrid {
namespace mc {
#include "src/mc/PageStore.hpp"
-#include "src/mc/mc_mmu.h"
+#include "src/mc/mc_mmu.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_page_snapshot, mc, "Logging specific to mc_page_snapshot");
-/* Copyright (c) 2015. The SimGrid Team.
+/* Copyright (c) 2015-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "xbt/base.h"
-#include "src/mc/mc_mmu.h"
#include "src/mc/mc_forward.hpp"
+#include "src/mc/mc_mmu.hpp"
namespace simgrid {
namespace mc {
class PageStore {
public: // Types
typedef std::uint64_t hash_type;
-private: // Types
+
+private:
+ // Types
// We are using a cheap hash to index a page.
// We should expect collision and we need to associate multiple page indices
// to the same hash.
typedef std::unordered_set<std::size_t> page_set_type;
typedef std::unordered_map<hash_type, page_set_type> pages_map_type;
-private: // Fields:
+ // Fields:
/** First page */
void* memory_;
/** Number of available pages in virtual memory */
/** Index from page hash to page index */
pages_map_type hash_index_;
-private: // Methods
+ // Methods
void resize(std::size_t size);
std::size_t alloc_page();
void remove_page(std::size_t pageno);
-public: // Constructors
+public:
+ // Constructors
PageStore(PageStore const&) = delete;
PageStore& operator=(PageStore const&) = delete;
explicit PageStore(std::size_t size);
~PageStore();
-public: // Methods
+ // Methods
/** @brief Decrement the reference count for a given page
*
*/
const void* get_page(std::size_t pageno) const;
-public: // Debug/test methods
+ // Debug/test methods
/** @brief Get the number of references for a page */
std::size_t get_ref(std::size_t pageno);
#endif
#include "mc/mc.h"
-#include "src/mc/mc_snapshot.h"
+#include "src/mc/mc_snapshot.hpp"
#include "src/mc/ChunkedData.hpp"
#include "src/mc/RegionSnapshot.hpp"
void* data_ = nullptr;
std::size_t size_;
Type type_ = Type::Malloc;
-private:
+
Buffer(std::size_t size, Type type = Type::Malloc);
Buffer(void* data, std::size_t size, Type type = Type::Malloc) :
data_(data), size_(size), type_(type) {}
}
}
-typedef class simgrid::mc::RegionSnapshot s_mc_mem_region_t;
+typedef simgrid::mc::RegionSnapshot s_mc_mem_region_t;
typedef s_mc_mem_region_t* mc_mem_region_t;
#endif
#include <simgrid/sg_config.h>
#include "src/mc/Session.hpp"
-#include "src/mc/mc_state.h"
-#include "src/mc/mc_private.h"
#include "src/mc/checker/Checker.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_state.hpp"
#include "src/smpi/include/private.hpp"
-/* Copyright (c) 2016. The SimGrid Team.
+/* Copyright (c) 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
std::unique_ptr<ModelChecker> modelChecker_;
std::shared_ptr<simgrid::mc::Snapshot> initialSnapshot_;
-private:
Session(pid_t pid, int socket);
// No copy:
~Session();
void close();
-public:
void initialize();
void execute(Transition const& transition);
void logState();
void restoreInitialState();
-public: // static constructors
+ // static constructors
/** Create a new session by forking
*
#include "src/mc/VisitedState.hpp"
#include "src/mc/mc_comm_pattern.hpp"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_smx.h"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_smx.hpp"
#include "src/mc/remote/RemoteClient.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_VisitedState, mc, "Logging specific to state equality detection mechanisms");
-/* Copyright (c) 2007-2016. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <memory>
-#include "src/mc/mc_snapshot.h"
-#include "src/mc/mc_state.h"
+#include "src/mc/mc_snapshot.hpp"
+#include "src/mc/mc_state.hpp"
namespace simgrid {
namespace mc {
-struct XBT_PRIVATE VisitedState {
+class XBT_PRIVATE VisitedState {
+public:
std::shared_ptr<simgrid::mc::Snapshot> system_state = nullptr;
std::size_t heap_bytes_used = 0;
int actors_count = 0;
-/* Copyright (c) 2016. The SimGrid Team.
+/* Copyright (c) 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <memory>
#include <string>
-#include "src/mc/mc_forward.hpp"
-#include "src/mc/mc_record.h"
#include "src/mc/Session.hpp"
+#include "src/mc/mc_forward.hpp"
+#include "src/mc/mc_record.hpp"
namespace simgrid {
namespace mc {
#include "src/mc/Transition.hpp"
#include "src/mc/VisitedState.hpp"
#include "src/mc/checker/CommunicationDeterminismChecker.hpp"
-#include "src/mc/mc_exit.h"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_record.h"
-#include "src/mc/mc_request.h"
-#include "src/mc/mc_smx.h"
-#include "src/mc/mc_state.h"
+#include "src/mc/mc_exit.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_record.hpp"
+#include "src/mc/mc_request.hpp"
+#include "src/mc/mc_smx.hpp"
+#include "src/mc/mc_state.hpp"
#include "src/mc/remote/Client.hpp"
#include "smpi_request.hpp"
simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer();
char* remote_name;
- mc_model_checker->process().read(&remote_name, remote(comm->mbox ? &comm->mbox->name_ : &comm->mbox_cpy->name_));
+ mc_model_checker->process().read(
+ &remote_name, remote(comm->mbox ? &simgrid::xbt::string::to_string_data(comm->mbox->name_).data
+ : &simgrid::xbt::string::to_string_data(comm->mbox_cpy->name_).data));
pattern->rdv = mc_model_checker->process().read_string(remote_name);
pattern->dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(comm->dst_proc))->pid;
pattern->dst_host = MC_smx_actor_get_host_name(issuer);
#include "src/mc/Session.hpp"
#include "src/mc/Transition.hpp"
#include "src/mc/checker/LivenessChecker.hpp"
-#include "src/mc/mc_exit.h"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_record.h"
+#include "src/mc/mc_exit.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_record.hpp"
#include "src/mc/mc_replay.h"
-#include "src/mc/mc_request.h"
-#include "src/mc/mc_smx.h"
+#include "src/mc/mc_request.hpp"
+#include "src/mc/mc_smx.hpp"
#include "src/mc/remote/Client.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_liveness, mc, "Logging specific to algorithms for liveness properties verification");
-/* Copyright (c) 2007-2015. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <memory>
#include <vector>
+#include "src/mc/checker/Checker.hpp"
+#include "src/mc/mc_state.hpp"
#include <simgrid_config.h>
-#include <xbt/base.h>
#include <xbt/automaton.h>
-#include "src/mc/mc_state.h"
-#include "src/mc/checker/Checker.hpp"
-
-SG_BEGIN_DECL()
-
-SG_END_DECL()
+#include <xbt/base.h>
namespace simgrid {
namespace mc {
-struct XBT_PRIVATE Pair {
+class XBT_PRIVATE Pair {
+public:
int num = 0;
bool search_cycle = false;
std::shared_ptr<simgrid::mc::State> graph_state = nullptr; /* System state included */
Pair& operator=(Pair const&) = delete;
};
-struct XBT_PRIVATE VisitedPair {
+class XBT_PRIVATE VisitedPair {
+public:
int num;
int other_num = 0; /* Dot output for */
std::shared_ptr<simgrid::mc::State> graph_state = nullptr; /* System state included */
void purgeVisitedPairs();
void backtrack();
std::shared_ptr<Pair> newPair(Pair* pair, xbt_automaton_state_t state, std::shared_ptr<const std::vector<int>> propositions);
-private:
+
// A stack of (application_state, automaton_state) pairs for DFS exploration:
std::list<std::shared_ptr<Pair>> explorationStack_;
std::list<std::shared_ptr<VisitedPair>> acceptancePairs_;
#include "src/mc/Transition.hpp"
#include "src/mc/VisitedState.hpp"
#include "src/mc/checker/SafetyChecker.hpp"
-#include "src/mc/mc_exit.h"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_record.h"
-#include "src/mc/mc_request.h"
-#include "src/mc/mc_smx.h"
+#include "src/mc/mc_exit.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_record.hpp"
+#include "src/mc/mc_request.hpp"
+#include "src/mc/mc_smx.hpp"
#include "src/xbt/mmalloc/mmprivate.h"
-/* Copyright (c) 2008-2016. The SimGrid Team.
+/* Copyright (c) 2008-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "src/mc/VisitedState.hpp"
#include "src/mc/checker/Checker.hpp"
#include "src/mc/mc_forward.hpp"
-#include "src/mc/mc_safety.h"
+#include "src/mc/mc_safety.hpp"
namespace simgrid {
namespace mc {
void checkNonTermination(simgrid::mc::State* current_state);
void backtrack();
void restoreState();
-private:
+
/** Stack representing the position in the exploration graph */
std::list<std::unique_ptr<simgrid::mc::State>> stack_;
simgrid::mc::VisitedStates visitedStates_;
#include "src/mc/checker/Checker.hpp"
#include "src/mc/mc_base.h"
#include "src/mc/mc_comm_pattern.hpp"
-#include "src/mc/mc_exit.h"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_safety.h"
+#include "src/mc/mc_exit.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_safety.hpp"
#include "src/mc/remote/mc_protocol.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_main, mc, "Entry point for simgrid-mc");
#include "src/xbt/mmalloc/mmprivate.h"
#if HAVE_SMPI
-#include "src/smpi/include/private.h"
#include "src/smpi/include/private.hpp"
#endif
-#include "src/mc/mc_forward.hpp"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_smx.h"
-#include "src/mc/mc_dwarf.hpp"
#include "src/mc/Frame.hpp"
#include "src/mc/ObjectInformation.hpp"
+#include "src/mc/Type.hpp"
#include "src/mc/Variable.hpp"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_snapshot.h"
#include "src/mc/mc_dwarf.hpp"
-#include "src/mc/Type.hpp"
+#include "src/mc/mc_forward.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_smx.hpp"
+#include "src/mc/mc_snapshot.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_compare, xbt, "Logging specific to mc_compare in mc");
public:
std::size_t operator()(std::pair<X,Y>const& x) const
{
- struct hash<X> h1;
- struct hash<X> h2;
+ hash<X> h1;
+ hash<X> h2;
return h1(x.first) ^ h2(x.second);
}
};
const malloc_info* heapinfos1 = snapshot1->read(remote((const malloc_info**)heapinfo_address), process_index);
const malloc_info* heapinfos2 = snapshot2->read(remote((const malloc_info**)heapinfo_address), process_index);
- malloc_info heapinfo_temp1, heapinfo_temp2;
+ malloc_info heapinfo_temp1;
+ malloc_info heapinfo_temp2;
simgrid::mc::HeapLocationPairs current;
if (previous == nullptr) {
}
unsigned int cursor = 0;
- local_variable_t current_var1, current_var2;
+ local_variable_t current_var1;
+ local_variable_t current_var2;
while (cursor < stack1->local_variables.size()) {
current_var1 = &stack1->local_variables[cursor];
current_var2 = &stack1->local_variables[cursor];
#include "mc/mc.h"
#include "src/mc/mc_base.h"
#include "src/mc/mc_replay.h"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
#if SIMGRID_HAVE_MC
#include "src/mc/ModelChecker.hpp"
#endif
#include "src/internal_config.h"
-#include "src/mc/mc_private.h"
-#include "src/smpi/include/private.h"
+#include "src/mc/mc_private.hpp"
+#include "src/smpi/include/private.hpp"
#include "xbt/mmalloc.h"
#include "xbt/module.h"
#include "src/xbt/mmalloc/mmprivate.h"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
#include <libunwind.h>
#include <libelf.h>
-#include "src/mc/mc_private.h"
+#include "src/mc/mc_private.hpp"
#include <mc/mc.h>
#include "src/mc/mc_hash.hpp"
-#include "src/mc/mc_mmu.h"
-#include "src/mc/mc_smx.h"
-#include "src/mc/mc_snapshot.h"
-#include "src/mc/mc_unw.h"
+#include "src/mc/mc_mmu.hpp"
+#include "src/mc/mc_smx.hpp"
+#include "src/mc/mc_snapshot.hpp"
+#include "src/mc/mc_unw.hpp"
#include "src/mc/remote/mc_protocol.h"
#include "src/mc/RegionSnapshot.hpp"
static void restore(mc_mem_region_t region)
{
switch(region->storage_type()) {
- case simgrid::mc::StorageType::NoData:
- default:
- xbt_die("Storage type not supported");
- break;
-
case simgrid::mc::StorageType::Flat:
mc_model_checker->process().write_bytes(region->flat_data().get(),
region->size(), region->permanent_address());
for (auto& p : region->privatized_data())
restore(&p);
break;
+
+ default: // includes StorageType::NoData
+ xbt_die("Storage type not supported");
+ break;
}
}
return true;
}
-static void fill_local_variables_values(mc_stack_frame_t stack_frame,
- simgrid::mc::Frame* scope,
- int process_index,
- std::vector<s_local_variable>& result)
+static void fill_local_variables_values(mc_stack_frame_t stack_frame, simgrid::mc::Frame* scope, int process_index,
+ std::vector<s_local_variable_t>& result)
{
simgrid::mc::RemoteClient* process = &mc_model_checker->process();
stack_frame, &nested_scope, process_index, result);
}
-static std::vector<s_local_variable> get_local_variables_values(
- std::vector<s_mc_stack_frame_t>& stack_frames, int process_index)
+static std::vector<s_local_variable_t> get_local_variables_values(std::vector<s_mc_stack_frame_t>& stack_frames,
+ int process_index)
{
- std::vector<s_local_variable> variables;
+ std::vector<s_local_variable_t> variables;
for (s_mc_stack_frame_t& stack_frame : stack_frames)
fill_local_variables_values(&stack_frame, stack_frame.frame, process_index, variables);
return variables;
-/* Copyright (c) 2008-2015. The SimGrid Team.
+/* Copyright (c) 2008-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "src/mc/ModelChecker.hpp"
#include "src/mc/mc_ignore.h"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_record.h"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_record.hpp"
#include "src/mc/remote/Client.hpp"
#include "src/mc/remote/mc_protocol.h"
#include "src/mc/checker/CommunicationDeterminismChecker.hpp"
#include "src/mc/mc_comm_pattern.hpp"
-#include "src/mc/mc_smx.h"
+#include "src/mc/mc_smx.hpp"
#include "src/mc/mc_xbt.hpp"
using simgrid::mc::remote;
#include "smpi/smpi.h"
#include "xbt/dynar.h"
-#include "src/mc/mc_state.h"
+#include "src/mc/mc_state.hpp"
namespace simgrid {
namespace mc {
}
}
-SG_BEGIN_DECL()
+extern "C" {
/**
* Type: `xbt_dynar_t<mc_list_comm_pattern_t>`
*/
extern XBT_PRIVATE xbt_dynar_t incomplete_communications_pattern;
-typedef enum {
+enum e_mc_call_type_t {
MC_CALL_TYPE_NONE,
MC_CALL_TYPE_SEND,
MC_CALL_TYPE_RECV,
MC_CALL_TYPE_WAIT,
MC_CALL_TYPE_WAITANY,
-} e_mc_call_type_t;
+};
-typedef enum {
+enum e_mc_comm_pattern_difference_t {
NONE_DIFF,
TYPE_DIFF,
RDV_DIFF,
DST_PROC_DIFF,
DATA_SIZE_DIFF,
DATA_DIFF,
-} e_mc_comm_pattern_difference_t;
+};
static inline e_mc_call_type_t MC_get_call_type(smx_simcall_t req)
{
XBT_PRIVATE void MC_state_copy_incomplete_communications_pattern(simgrid::mc::State* state);
XBT_PRIVATE void MC_state_copy_index_communications_pattern(simgrid::mc::State* state);
-
-SG_END_DECL()
+}
#endif
#include <simgrid/sg_config.h>
#if SIMGRID_HAVE_MC
-#include "src/mc/mc_safety.h"
-#include "src/mc/mc_private.h"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_safety.hpp"
#endif
-#include "src/mc/mc_record.h"
+#include "src/mc/mc_record.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_config, mc, "Configuration of the Model Checker");
#include "xbt/sysdep.h"
#include <simgrid_config.h>
-#include "src/mc/mc_private.h"
#include "src/mc/mc_dwarf.hpp"
+#include "src/mc/mc_private.hpp"
#include "src/mc/ObjectInformation.hpp"
#include "src/mc/Variable.hpp"
(uint64_t) type->id, type->name.c_str());
break;
}
- case simgrid::dwarf::FormClass::LocListPtr:
- // Reference to a location list:
- // TODO
- case simgrid::dwarf::FormClass::Reference:
- // It's supposed to be possible in DWARF2 but I couldn't find its semantic
- // in the spec.
+
default:
+ // includes FormClass::LocListPtr (reference to a location list: TODO) and FormClass::Reference (it's supposed to be
+ // possible in DWARF2 but I couldn't find its semantic in the spec)
xbt_die("Can't handle form class (%d) / form 0x%x as DW_AT_member_location", (int)form_class, (unsigned)form);
}
int form = dwarf_whatform(&attr);
simgrid::dwarf::FormClass form_class = simgrid::dwarf::classify_form(form);
switch (form_class) {
- case simgrid::dwarf::FormClass::Constant:
- {
+ case simgrid::dwarf::FormClass::Constant: {
Dwarf_Word value;
variable->start_scope =
dwarf_formudata(&attr, &value) == 0 ? (size_t) value : 0;
break;
}
- case simgrid::dwarf::FormClass::RangeListPtr: // TODO
- default:
- xbt_die("Unhandled form 0x%x, class 0x%X for DW_AT_start_scope of variable %s", (unsigned)form,
- (unsigned)form_class, name == nullptr ? "?" : name);
+ default: // includes FormClass::RangeListPtr (TODO)
+ xbt_die("Unhandled form 0x%x, class 0x%X for DW_AT_start_scope of variable %s", (unsigned)form,
+ (unsigned)form_class, name == nullptr ? "?" : name);
}
}
#define SIMGRID_MC_EXIT_HPP
#include "xbt/base.h"
-#define SIMGRID_MC_EXIT_SUCCESS 0
-#define SIMGRID_MC_EXIT_SAFETY 1
+#define SIMGRID_MC_EXIT_SUCCESS 0
+#define SIMGRID_MC_EXIT_SAFETY 1
#define SIMGRID_MC_EXIT_LIVENESS 2
#define SIMGRID_MC_EXIT_DEADLOCK 3
#define SIMGRID_MC_EXIT_NON_TERMINATION 4
#define SIMGRID_MC_EXIT_NON_DETERMINISM 5
#define SIMGRID_MC_EXIT_PROGRAM_CRASH 6
-#define SIMGRID_MC_EXIT_ERROR 63
+#define SIMGRID_MC_EXIT_ERROR 63
namespace simgrid {
namespace mc {
-XBT_PUBLIC_CLASS DeadlockError {};
-XBT_PUBLIC_CLASS TerminationError {};
-XBT_PUBLIC_CLASS LivenessError {};
+XBT_PUBLIC_CLASS DeadlockError{};
+XBT_PUBLIC_CLASS TerminationError{};
+XBT_PUBLIC_CLASS LivenessError{};
}
}
#if SIMGRID_HAVE_MC
#include "src/mc/checker/Checker.hpp"
#include "src/mc/mc_comm_pattern.hpp"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_request.h"
-#include "src/mc/mc_safety.h"
-#include "src/mc/mc_smx.h"
-#include "src/mc/mc_snapshot.h"
-#include "src/mc/mc_unw.h"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_request.hpp"
+#include "src/mc/mc_safety.hpp"
+#include "src/mc/mc_smx.hpp"
+#include "src/mc/mc_snapshot.hpp"
+#include "src/mc/mc_unw.hpp"
#include <libunwind.h>
#endif
#include "src/mc/Transition.hpp"
-#include "src/mc/mc_record.h"
+#include "src/mc/mc_record.hpp"
#include "src/mc/remote/Client.hpp"
#include "src/mc/remote/mc_protocol.h"
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "xbt/log.h"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_snapshot.h"
#include "mc/datatypes.h"
#include "src/mc/mc_hash.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_snapshot.hpp"
#include <mc/mc.h>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_hash, mc, "Logging specific to mc_hash");
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/mc/mc_private.h"
#include "src/mc/Type.hpp"
#include "src/mc/mc_dwarf.hpp"
+#include "src/mc/mc_private.hpp"
namespace simgrid {
namespace dwarf {
-/* Copyright (c) 2008-2015. The SimGrid Team.
+/* Copyright (c) 2008-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "xbt/log.h"
#include "mc/mc.h"
-#include "src/mc/mc_private.h"
+#include "src/mc/mc_private.hpp"
#include "src/xbt/mmalloc/mmprivate.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_memory, mc,
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMGRID_MC_MMU_H
-#define SIMGRID_MC_MMU_H
+#ifndef SIMGRID_MC_MMU_HPP
+#define SIMGRID_MC_MMU_HPP
#include "xbt/misc.h" // xbt_pagesize...
+#include <cstdint>
+#include <utility>
namespace simgrid {
namespace mc {
static XBT_ALWAYS_INLINE std::size_t chunkCount(std::size_t size)
{
size_t page_count = size >> xbt_pagebits;
- if (size & (xbt_pagesize-1))
- page_count ++;
+ if (size & (xbt_pagesize - 1))
+ page_count++;
return page_count;
}
/** @brief Split into chunk number and remaining offset */
static XBT_ALWAYS_INLINE std::pair<std::size_t, std::uintptr_t> split(std::uintptr_t offset)
{
- return {
- offset >> xbt_pagebits,
- offset & (xbt_pagesize-1)
- };
+ return {offset >> xbt_pagebits, offset & (xbt_pagesize - 1)};
}
/** Merge chunk number and remaining offset info a global offset */
static XBT_ALWAYS_INLINE std::uintptr_t join(std::size_t page, std::uintptr_t offset)
{
- return ((std::uintptr_t) page << xbt_pagebits) + offset;
+ return ((std::uintptr_t)page << xbt_pagebits) + offset;
}
static XBT_ALWAYS_INLINE std::uintptr_t join(std::pair<std::size_t, std::uintptr_t> value)
{
return (a >> xbt_pagebits) == (b >> xbt_pagebits);
}
-
}
}
}
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <unistd.h> // pread, pwrite
#include "src/mc/PageStore.hpp"
-#include "src/mc/mc_mmu.h"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_snapshot.h"
+#include "src/mc/mc_mmu.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_snapshot.hpp"
#include <xbt/mmalloc.h>
#include "src/mc/ChunkedData.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMGRID_MC_PRIVATE_H
-#define SIMGRID_MC_PRIVATE_H
+#ifndef SIMGRID_MC_PRIVATE_HPP
+#define SIMGRID_MC_PRIVATE_HPP
#include "mc/mc.h"
#include "xbt/automaton.h"
-#ifdef __cplusplus
#include "src/mc/mc_forward.hpp"
#include "src/xbt/memory_map.hpp"
-#endif
-#ifdef __cplusplus
namespace simgrid {
namespace mc {
struct DerefAndCompareByActorsCountAndUsedHeap {
- template<class X, class Y>
- bool operator()(X const& a, Y const& b)
+ template <class X, class Y> bool operator()(X const& a, Y const& b)
{
return std::make_pair(a->actors_count, a->heap_bytes_used) < std::make_pair(b->actors_count, b->heap_bytes_used);
}
};
-
}
}
-#endif
-SG_BEGIN_DECL()
+extern "C" {
/********************************* MC Global **********************************/
XBT_PRIVATE void MC_init_dot_output();
-XBT_PRIVATE extern FILE *dot_output;
+XBT_PRIVATE extern FILE* dot_output;
XBT_PRIVATE void MC_show_deadlock(void);
#define MC_VERBOSE 1
/********************************** Miscellaneous **********************************/
-
-SG_END_DECL()
-
-#ifdef __cplusplus
+}
namespace simgrid {
namespace mc {
-XBT_PRIVATE void find_object_address(
- std::vector<simgrid::xbt::VmMap> const& maps, simgrid::mc::ObjectInformation* result);
+XBT_PRIVATE void find_object_address(std::vector<simgrid::xbt::VmMap> const& maps,
+ simgrid::mc::ObjectInformation* result);
XBT_PRIVATE
int snapshot_compare(int num1, simgrid::mc::Snapshot* s1, int num2, simgrid::mc::Snapshot* s2);
// Move is somewhere else (in the LivenessChecker class, in the Session class?):
extern XBT_PRIVATE xbt_automaton_t property_automaton;
-
}
}
#endif
-
-#endif
#include "simgrid/simix.h"
#include "src/kernel/context/Context.hpp"
-#include "src/simix/ActorImpl.hpp"
-#include "src/simix/smx_private.h"
+#include "src/mc/mc_record.hpp"
#include "src/mc/mc_replay.h"
-#include "src/mc/mc_record.h"
+#include "src/simix/ActorImpl.hpp"
+#include "src/simix/smx_private.hpp"
#include "src/mc/mc_base.h"
#include "src/mc/Transition.hpp"
#if SIMGRID_HAVE_MC
-#include "src/mc/mc_request.h"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_state.h"
-#include "src/mc/mc_smx.h"
#include "src/mc/checker/Checker.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_request.hpp"
+#include "src/mc/mc_smx.hpp"
+#include "src/mc/mc_state.hpp"
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_record, mc,
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-/** \file mc_record.h
+/** \file mc_record.hpp
*
* This file contains the MC replay/record functionnality.
* A MC path may be recorded by using ``-cfg=model-check/record:1`'`.
* passed to the application (without the MC specific arguments).
*/
-#ifndef SIMGRID_MC_RECORD_H
-#define SIMGRID_MC_RECORD_H
+#ifndef SIMGRID_MC_RECORD_HPP
+#define SIMGRID_MC_RECORD_HPP
#include "src/mc/Transition.hpp"
#include "xbt/base.h"
XBT_PRIVATE void replay(RecordTrace const& trace);
XBT_PRIVATE void replay(const char* trace);
-
}
}
-SG_BEGIN_DECL()
-
/** Whether the MC record mode is enabled
*
* The behaviour is not changed. The only real difference is that
// **** Data conversion
-SG_END_DECL()
-
#endif
#include "src/include/mc/mc.h"
#include "src/mc/ModelChecker.hpp"
-#include "src/mc/mc_request.h"
-#include "src/mc/mc_smx.h"
+#include "src/mc/mc_request.hpp"
+#include "src/mc/mc_smx.hpp"
#include "src/mc/mc_xbt.hpp"
using simgrid::mc::remote;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMGRID_MC_REQUEST_H
-#define SIMGRID_MC_REQUEST_H
+#ifndef SIMGRID_MC_REQUEST_HPP
+#define SIMGRID_MC_REQUEST_HPP
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
namespace simgrid {
namespace mc {
XBT_PRIVATE bool request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx);
XBT_PRIVATE std::string request_get_dot_output(smx_simcall_t req, int value);
-
}
}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMGRID_MC_SAFETY_H
-#define SIMGRID_MC_SAFETY_H
+#ifndef SIMGRID_MC_SAFETY_HPP
+#define SIMGRID_MC_SAFETY_HPP
#include "xbt/base.h"
};
extern XBT_PRIVATE simgrid::mc::ReductionMode reduction_mode;
-
}
}
#include "simgrid/s4u/Host.hpp"
-#include "src/mc/mc_smx.h"
#include "src/mc/ModelChecker.hpp"
+#include "src/mc/mc_smx.hpp"
using simgrid::mc::remote;
s_xbt_dynar_t dynar;
process->read_bytes(&dynar, sizeof(dynar), remote_dynar);
- smx_actor_t* data = (smx_actor_t*)malloc(dynar.elmsize * dynar.used);
+ smx_actor_t* data = static_cast<smx_actor_t*>(::operator new(dynar.elmsize * dynar.used));
process->read_bytes(data, dynar.elmsize * dynar.used, dynar.data);
// Load each element of the vector from the MCed process:
process->read_bytes(&info.copy, sizeof(info.copy), remote(data[i]));
target.push_back(std::move(info));
}
- free(data);
+ ::operator delete(data);
}
namespace simgrid {
namespace mc {
simgrid::mc::ActorInformation* info = actor_info_cast(actor);
if (info->name.empty()) {
- simgrid::xbt::string_data string_data = (simgrid::xbt::string_data&)actor->name;
+ simgrid::xbt::string_data string_data = simgrid::xbt::string::to_string_data(actor->name);
info->name = process->read_string(remote(string_data.data), string_data.len);
}
return info->name.c_str();
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMGRID_MC_SMX_H
-#define SIMGRID_MC_SMX_H
+#ifndef SIMGRID_MC_SMX_HPP
+#define SIMGRID_MC_SMX_HPP
#include "src/mc/remote/RemoteClient.hpp"
* MCed code.
*/
-SG_BEGIN_DECL()
+extern "C" {
/** Get the issuer of a simcall (`req->issuer`)
*
XBT_PRIVATE int MC_smpi_process_count(void);
XBT_PRIVATE unsigned long MC_smx_get_maxpid(void);
-
-SG_END_DECL()
+}
#endif
#include "xbt/sysdep.h"
#include "src/internal_config.h"
-#include "src/smpi/include/private.h"
+#include "src/smpi/include/private.hpp"
-#include "src/mc/mc_snapshot.h"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_mmu.h"
#include "src/mc/PageStore.hpp"
+#include "src/mc/mc_mmu.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_snapshot.hpp"
extern "C" {
bool stack_alloc = size < 64;
const bool region1_need_buffer = region1==nullptr || region1->storage_type()==simgrid::mc::StorageType::Flat;
const bool region2_need_buffer = region2==nullptr || region2->storage_type()==simgrid::mc::StorageType::Flat;
- void* buffer1a = region1_need_buffer ? nullptr : stack_alloc ? alloca(size) : malloc(size);
- void* buffer2a = region2_need_buffer ? nullptr : stack_alloc ? alloca(size) : malloc(size);
+ void* buffer1a = region1_need_buffer ? nullptr : stack_alloc ? alloca(size) : ::operator new(size);
+ void* buffer2a = region2_need_buffer ? nullptr : stack_alloc ? alloca(size) : ::operator new(size);
const void* buffer1 = MC_region_read(region1, buffer1a, addr1, size);
const void* buffer2 = MC_region_read(region2, buffer2a, addr2, size);
int res;
else
res = memcmp(buffer1, buffer2, size);
if (not stack_alloc) {
- free(buffer1a);
- free(buffer2a);
+ ::operator delete(buffer1a);
+ ::operator delete(buffer2a);
}
return res;
}
#include <sys/mman.h>
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_snapshot.h"
-#include "src/mc/mc_mmu.h"
+#include "src/mc/mc_mmu.hpp"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_snapshot.hpp"
XBT_TEST_SUITE("mc_snapshot", "Snapshots");
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMGRID_MC_SNAPSHOT_H
-#define SIMGRID_MC_SNAPSHOT_H
+#ifndef SIMGRID_MC_SNAPSHOT_HPP
+#define SIMGRID_MC_SNAPSHOT_HPP
-#include <vector>
+#include <memory>
#include <set>
#include <string>
-#include <memory>
+#include <vector>
#include "src/mc/ModelChecker.hpp"
#include "src/mc/RegionSnapshot.hpp"
#include "src/mc/mc_forward.hpp"
-#include "src/mc/mc_unw.h"
+#include "src/mc/mc_unw.hpp"
-SG_BEGIN_DECL()
+extern "C" {
// ***** Snapshot region
static XBT_ALWAYS_INLINE void* mc_translate_address_region_chunked(uintptr_t addr, mc_mem_region_t region)
{
- auto split = simgrid::mc::mmu::split(addr - region->start().address());
- auto pageno = split.first;
- auto offset = split.second;
+ auto split = simgrid::mc::mmu::split(addr - region->start().address());
+ auto pageno = split.first;
+ auto offset = split.second;
const void* snapshot_page = region->page_data().page(pageno);
- return (char*) snapshot_page + offset;
+ return (char*)snapshot_page + offset;
}
static XBT_ALWAYS_INLINE void* mc_translate_address_region(uintptr_t addr, mc_mem_region_t region, int process_index)
{
switch (region->storage_type()) {
- case simgrid::mc::StorageType::Flat:
- {
- uintptr_t offset = (uintptr_t) addr - (uintptr_t) region->start().address();
- return (void *) ((uintptr_t) region->flat_data().get() + offset);
+ case simgrid::mc::StorageType::Flat: {
+ uintptr_t offset = (uintptr_t)addr - (uintptr_t)region->start().address();
+ return (void*)((uintptr_t)region->flat_data().get() + offset);
}
- case simgrid::mc::StorageType::Chunked:
- return mc_translate_address_region_chunked(addr, region);
- case simgrid::mc::StorageType::Privatized:
- {
- xbt_assert(process_index >= 0, "Missing process index for privatized region");
- xbt_assert((size_t)process_index < region->privatized_data().size(), "Out of range process index");
- simgrid::mc::RegionSnapshot& subregion = region->privatized_data()[process_index];
- return mc_translate_address_region(addr, &subregion, process_index);
+ case simgrid::mc::StorageType::Chunked:
+ return mc_translate_address_region_chunked(addr, region);
+ case simgrid::mc::StorageType::Privatized: {
+ xbt_assert(process_index >= 0, "Missing process index for privatized region");
+ xbt_assert((size_t)process_index < region->privatized_data().size(), "Out of range process index");
+ simgrid::mc::RegionSnapshot& subregion = region->privatized_data()[process_index];
+ return mc_translate_address_region(addr, &subregion, process_index);
}
- case simgrid::mc::StorageType::NoData:
- default:
+ default: // includes StorageType::NoData
xbt_die("Storage type not supported");
}
}
* Some parts of the snapshot are ignored by zeroing them out: the real
* values is stored here.
* */
-typedef struct s_mc_snapshot_ignored_data {
+struct s_mc_snapshot_ignored_data_t {
void* start;
std::vector<char> data;
-} s_mc_snapshot_ignored_data_t;
+};
-typedef struct s_fd_infos{
+struct s_fd_infos_t {
std::string filename;
int number;
off_t current_position;
int flags;
-} s_fd_infos_t;
+};
/** Information about a given stack frame */
-typedef struct s_mc_stack_frame {
+struct s_mc_stack_frame_t {
/** Instruction pointer */
unw_word_t ip;
/** Stack pointer */
simgrid::mc::Frame* frame;
std::string frame_name;
unw_cursor_t unw_cursor;
-} s_mc_stack_frame_t;
+};
typedef s_mc_stack_frame_t* mc_stack_frame_t;
-typedef struct s_local_variable{
+struct s_local_variable_t {
simgrid::mc::Frame* subprogram;
unsigned long ip;
std::string name;
simgrid::mc::Type* type;
- void *address;
+ void* address;
int region;
-} s_local_variable_t;
+};
typedef s_local_variable_t* local_variable_t;
-typedef struct XBT_PRIVATE s_mc_snapshot_stack {
- std::vector<s_local_variable> local_variables;
+struct XBT_PRIVATE s_mc_snapshot_stack_t {
+ std::vector<s_local_variable_t> local_variables;
simgrid::mc::UnwindContext context;
std::vector<s_mc_stack_frame_t> stack_frames;
int process_index;
-} s_mc_snapshot_stack_t, *mc_snapshot_stack_t;
+};
+typedef s_mc_snapshot_stack_t* mc_snapshot_stack_t;
namespace simgrid {
namespace mc {
public:
Snapshot(RemoteClient* process, int num_state);
~Snapshot() = default;
- const void* read_bytes(void* buffer, std::size_t size,
- RemotePtr<void> address, int process_index = ProcessIndexAny,
- ReadOptions options = ReadOptions::none()) const override;
+ const void* read_bytes(void* buffer, std::size_t size, RemotePtr<void> address, int process_index = ProcessIndexAny,
+ ReadOptions options = ReadOptions::none()) const override;
// To be private
int num_state;
std::vector<s_mc_snapshot_stack_t> stacks;
std::vector<simgrid::mc::IgnoredHeapRegion> to_ignore;
std::uint64_t hash;
- std::vector<s_mc_snapshot_ignored_data> ignored_data;
+ std::vector<s_mc_snapshot_ignored_data_t> ignored_data;
std::vector<s_fd_infos_t> current_fds;
};
-
}
}
}
static const void* mc_snapshot_get_heap_end(simgrid::mc::Snapshot* snapshot);
-
}
-#ifdef __cplusplus
-
namespace simgrid {
namespace mc {
XBT_PRIVATE std::shared_ptr<simgrid::mc::Snapshot> take_snapshot(int num_state);
XBT_PRIVATE void restore_snapshot(std::shared_ptr<simgrid::mc::Snapshot> snapshot);
-
}
}
-#endif
-
extern "C" {
XBT_PRIVATE void mc_restore_page_snapshot_region(simgrid::mc::RemoteClient* process, void* start_addr,
simgrid::mc::ChunkedData const& pagenos);
-const void* MC_region_read_fragmented(
- mc_mem_region_t region, void* target, const void* addr, std::size_t size);
+const void* MC_region_read_fragmented(mc_mem_region_t region, void* target, const void* addr, std::size_t size);
-int MC_snapshot_region_memcmp(
- const void* addr1, mc_mem_region_t region1,
- const void* addr2, mc_mem_region_t region2, std::size_t size);
-XBT_PRIVATE int MC_snapshot_memcmp(
- const void* addr1, simgrid::mc::Snapshot* snapshot1,
- const void* addr2, simgrid::mc::Snapshot* snapshot2, int process_index, std::size_t size);
+int MC_snapshot_region_memcmp(const void* addr1, mc_mem_region_t region1, const void* addr2, mc_mem_region_t region2,
+ std::size_t size);
+XBT_PRIVATE int MC_snapshot_memcmp(const void* addr1, simgrid::mc::Snapshot* snapshot1, const void* addr2,
+ simgrid::mc::Snapshot* snapshot2, int process_index, std::size_t size);
static XBT_ALWAYS_INLINE const void* mc_snapshot_get_heap_end(simgrid::mc::Snapshot* snapshot)
{
- if(snapshot==nullptr)
- xbt_die("snapshot is nullptr");
+ if (snapshot == nullptr)
+ xbt_die("snapshot is nullptr");
return mc_model_checker->process().get_heap()->breakval;
}
xbt_assert(region->contain(simgrid::mc::remote(addr)), "Trying to read out of the region boundary.");
switch (region->storage_type()) {
- case simgrid::mc::StorageType::NoData:
- default:
- xbt_die("Storage type not supported");
+ case simgrid::mc::StorageType::Flat:
+ return (char*)region->flat_data().get() + offset;
- case simgrid::mc::StorageType::Flat:
- return (char*) region->flat_data().get() + offset;
-
- case simgrid::mc::StorageType::Chunked:
- {
+ case simgrid::mc::StorageType::Chunked: {
// Last byte of the region:
- void* end = (char*) addr + size - 1;
- if (simgrid::mc::mmu::sameChunk((std::uintptr_t) addr, (std::uintptr_t) end) ) {
+ void* end = (char*)addr + size - 1;
+ if (simgrid::mc::mmu::sameChunk((std::uintptr_t)addr, (std::uintptr_t)end)) {
// The memory is contained in a single page:
- return mc_translate_address_region_chunked((uintptr_t) addr, region);
+ return mc_translate_address_region_chunked((uintptr_t)addr, region);
} else {
// The memory spans several pages:
return MC_region_read_fragmented(region, target, addr, size);
}
}
- // We currently do not pass the process_index to this function so we assume
- // that the privatized region has been resolved in the callers:
- case simgrid::mc::StorageType::Privatized:
- xbt_die("Storage type not supported");
+ default:
+ // includes StorageType::NoData and StorageType::Privatized (we currently do not pass the process_index to this
+ // function so we assume that the privatized region has been resolved in the callers)
+ xbt_die("Storage type not supported");
}
}
static XBT_ALWAYS_INLINE void* MC_region_read_pointer(mc_mem_region_t region, const void* addr)
{
void* res;
- return *(void**) MC_region_read(region, &res, addr, sizeof(void*));
+ return *(void**)MC_region_read(region, &res, addr, sizeof(void*));
+}
}
-
-SG_END_DECL()
#endif
#include "src/mc/Transition.hpp"
#include "src/mc/mc_comm_pattern.hpp"
-#include "src/mc/mc_private.h"
-#include "src/mc/mc_request.h"
-#include "src/mc/mc_smx.h"
-#include "src/mc/mc_state.h"
+#include "src/mc/mc_private.hpp"
+#include "src/mc/mc_request.hpp"
+#include "src/mc/mc_smx.hpp"
+#include "src/mc/mc_state.hpp"
#include "src/mc/mc_xbt.hpp"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
using simgrid::mc::remote;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMGRID_MC_STATE_H
-#define SIMGRID_MC_STATE_H
+#ifndef SIMGRID_MC_STATE_HPP
+#define SIMGRID_MC_STATE_HPP
#include <list>
#include <memory>
-#include "src/mc/mc_snapshot.h"
-#include "src/mc/mc_record.h"
#include "src/mc/Transition.hpp"
+#include "src/mc/mc_record.hpp"
+#include "src/mc/mc_snapshot.hpp"
namespace simgrid {
namespace mc {
enum class PatternCommunicationType {
- none = 0,
- send = 1,
+ none = 0,
+ send = 1,
receive = 2,
};
-struct PatternCommunication {
+class PatternCommunication {
+public:
int num = 0;
simgrid::kernel::activity::CommImpl* comm_addr;
PatternCommunicationType type = PatternCommunicationType::send;
- unsigned long src_proc = 0;
- unsigned long dst_proc = 0;
- const char *src_host = nullptr;
- const char *dst_host = nullptr;
+ unsigned long src_proc = 0;
+ unsigned long dst_proc = 0;
+ const char* src_host = nullptr;
+ const char* dst_host = nullptr;
std::string rdv;
std::vector<char> data;
- int tag = 0;
+ int tag = 0;
int index = 0;
- PatternCommunication()
- {
- std::memset(&comm_addr, 0, sizeof(comm_addr));
- }
+ PatternCommunication() { std::memset(&comm_addr, 0, sizeof(comm_addr)); }
PatternCommunication dup() const
{
simgrid::mc::PatternCommunication res;
// num?
res.comm_addr = this->comm_addr;
- res.type = this->type;
+ res.type = this->type;
// src_proc?
// dst_proc?
res.dst_proc = this->dst_proc;
res.dst_host = this->dst_host;
- res.rdv = this->rdv;
- res.data = this->data;
+ res.rdv = this->rdv;
+ res.data = this->data;
// tag?
res.index = this->index;
return res;
}
-
};
/* On every state, each process has an entry of the following type.
/** Exploration control information */
InterleavingType state = InterleavingType::disabled;
+
public:
/** Number of times that the process was considered to be executed */
// TODO, make this private
unsigned int times_considered = 0;
- bool isDisabled() const {
- return this->state == InterleavingType::disabled;
- }
- bool isDone() const {
- return this->state == InterleavingType::done;
- }
- bool isTodo() const {
- return this->state == InterleavingType::todo;
- }
+ bool isDisabled() const { return this->state == InterleavingType::disabled; }
+ bool isDone() const { return this->state == InterleavingType::done; }
+ bool isTodo() const { return this->state == InterleavingType::todo; }
/** Mark that we should try executing this process at some point in the future of the checker algorithm */
- void consider() {
+ void consider()
+ {
this->state = InterleavingType::todo;
this->times_considered = 0;
}
- void setDone() {
- this->state = InterleavingType::done;
- }
+ void setDone() { this->state = InterleavingType::done; }
};
/* A node in the exploration graph (kind-of)
*/
-struct XBT_PRIVATE State {
-
+class XBT_PRIVATE State {
+public:
/** Sequential state number (used for debugging) */
int num = 0;
void addInterleavingSet(smx_actor_t actor) { this->actorStates[actor->pid].consider(); }
Transition getTransition() const;
};
-
}
}
#include <libunwind.h>
#include "src/mc/Frame.hpp"
-#include "src/mc/mc_unw.h"
+#include "src/mc/mc_unw.hpp"
#include "src/mc/remote/RemoteClient.hpp"
using simgrid::mc::remote;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMGRID_MC_UNW_H
-#define SIMGRID_MC_UNW_H
+#ifndef SIMGRID_MC_UNW_HPP
+#define SIMGRID_MC_UNW_HPP
/** @file
* Libunwind implementation for the model-checker
#include "src/mc/mc_forward.hpp"
#include "xbt/base.h"
+#include <cstdio>
#include <libunwind.h>
-#include <stdio.h>
#include <sys/types.h>
namespace simgrid {
XBT_PRIVATE unw_addr_space_t create_addr_space();
XBT_PRIVATE void* create_context(unw_addr_space_t as, pid_t pid);
-
}
}
unw_cursor_t cursor();
private: // Methods and virtual table for libunwind
- static int find_proc_info(unw_addr_space_t as,
- unw_word_t ip, unw_proc_info_t *pip,
- int need_unwind_info, void* arg) noexcept;
- static void put_unwind_info(unw_addr_space_t as,
- unw_proc_info_t *pip, void* arg) noexcept;
- static int get_dyn_info_list_addr(unw_addr_space_t as,
- unw_word_t *dilap, void* arg) noexcept;
- static int access_mem(unw_addr_space_t as,
- unw_word_t addr, unw_word_t *valp,
- int write, void* arg) noexcept;
+ static int find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t* pip, int need_unwind_info,
+ void* arg) noexcept;
+ static void put_unwind_info(unw_addr_space_t as, unw_proc_info_t* pip, void* arg) noexcept;
+ static int get_dyn_info_list_addr(unw_addr_space_t as, unw_word_t* dilap, void* arg) noexcept;
+ static int access_mem(unw_addr_space_t as, unw_word_t addr, unw_word_t* valp, int write, void* arg) noexcept;
static void* get_reg(unw_context_t* context, unw_regnum_t regnum) noexcept;
- static int access_reg(unw_addr_space_t as,
- unw_regnum_t regnum, unw_word_t *valp,
- int write, void* arg) noexcept;
- static int access_fpreg(unw_addr_space_t as,
- unw_regnum_t regnum, unw_fpreg_t *fpvalp,
- int write, void* arg) noexcept;
- static int resume(unw_addr_space_t as,
- unw_cursor_t *cp, void* arg) noexcept;
- static int get_proc_name(unw_addr_space_t as,
- unw_word_t addr, char *bufp,
- size_t buf_len, unw_word_t *offp,
- void* arg) noexcept;
+ static int access_reg(unw_addr_space_t as, unw_regnum_t regnum, unw_word_t* valp, int write, void* arg) noexcept;
+ static int access_fpreg(unw_addr_space_t as, unw_regnum_t regnum, unw_fpreg_t* fpvalp, int write, void* arg) noexcept;
+ static int resume(unw_addr_space_t as, unw_cursor_t* cp, void* arg) noexcept;
+ static int get_proc_name(unw_addr_space_t as, unw_word_t addr, char* bufp, size_t buf_len, unw_word_t* offp,
+ void* arg) noexcept;
static unw_accessors_t accessors;
+
public:
// Create a libunwind address space:
static unw_addr_space_t createUnwindAddressSpace();
void MC_dump_stack_unw(FILE* file, unw_cursor_t cursor);
void dumpStack(FILE* file, unw_cursor_t cursor);
void dumpStack(FILE* file, pid_t pid);
-
}
}
#include <libunwind.h>
#include <libunwind-ptrace.h>
-#include "src/mc/mc_unw.h"
+#include "src/mc/mc_unw.hpp"
#include "src/mc/remote/RemoteClient.hpp"
/** \file
static inline
pid_t _UPT_getpid(void* arg)
{
- struct _UPT_info* info = static_cast<_UPT_info*>(arg);
+ _UPT_info* info = static_cast<_UPT_info*>(arg);
return info->pid;
}
#include "src/internal_config.h"
-#include "src/mc/mc_request.h"
+#include "src/mc/mc_request.hpp"
#include "src/mc/remote/Client.hpp"
#include "src/mc/remote/mc_protocol.h"
#include "src/smpi/include/private.hpp"
// We won't need those once the separation MCer/MCed is complete:
-#include "src/mc/mc_smx.h"
+#include "src/mc/mc_smx.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client, mc, "MC client logic");
#include "xbt/log.h"
#include <xbt/mmalloc.h>
-#include "src/mc/mc_smx.h"
-#include "src/mc/mc_snapshot.h"
-#include "src/mc/mc_unw.h"
+#include "src/mc/mc_smx.hpp"
+#include "src/mc/mc_snapshot.hpp"
+#include "src/mc/mc_unw.hpp"
#include "src/mc/AddressSpace.hpp"
#include "src/mc/ObjectInformation.hpp"
regex_t version_re;
};
-static char* get_lib_name(const char* pathname, struct s_mc_memory_map_re* res)
+static char* get_lib_name(const char* pathname, s_mc_memory_map_re* res)
{
char* map_basename = xbt_basename(pathname);
xbt_die("No heap information in the target process");
if (not std_heap_var->address)
xbt_die("No constant address for this variable");
- this->read_bytes(&this->heap_address, sizeof(struct mdesc*), remote(std_heap_var->address),
+ this->read_bytes(&this->heap_address, sizeof(mdesc*), remote(std_heap_var->address),
simgrid::mc::ProcessIndexDisabled);
this->smx_actors_infos.clear();
// Read/dereference/refresh the std_heap pointer:
if (not this->heap)
this->heap = std::unique_ptr<s_xbt_mheap_t>(new s_xbt_mheap_t());
- this->read_bytes(this->heap.get(), sizeof(struct mdesc), remote(this->heap_address),
- simgrid::mc::ProcessIndexDisabled);
+ this->read_bytes(this->heap.get(), sizeof(mdesc), remote(this->heap_address), simgrid::mc::ProcessIndexDisabled);
this->cache_flags_ |= RemoteClient::cache_heap;
}
this->binary_info = nullptr;
this->libsimgrid_info = nullptr;
- struct s_mc_memory_map_re res;
+ s_mc_memory_map_re res;
if (regcomp(&res.so_re, SO_RE, 0) || regcomp(&res.version_re, VERSION_RE, 0))
xbt_die(".so regexp did not compile");
#include "src/mc/remote/Channel.hpp"
#include "src/mc/remote/RemotePtr.hpp"
-#include "src/simix/popping_private.h"
-#include "src/simix/smx_private.h"
+#include "src/simix/popping_private.hpp"
+#include "src/simix/smx_private.hpp"
#include <simgrid/simix.h>
#include "src/xbt/memory_map.hpp"
void refresh_malloc_info();
void refresh_simix();
-private:
pid_t pid_ = -1;
Channel channel_;
bool running_ = false;
std::vector<s_stack_region_t> stack_areas_;
std::vector<IgnoredHeapRegion> ignored_heap_;
-public: // object info
+public:
+ // object info
// TODO, make private (first, objectify simgrid::mc::ObjectInformation*)
std::vector<std::shared_ptr<simgrid::mc::ObjectInformation>> object_infos;
std::shared_ptr<simgrid::mc::ObjectInformation> libsimgrid_info;
std::shared_ptr<simgrid::mc::ObjectInformation> binary_info;
-public: // Copies of MCed SMX data structures
- /** Copy of `simix_global->process_list`
- *
- * See mc_smx.c.
- */
+ // Copies of MCed SMX data structures
+ /** Copy of `simix_global->process_list`
+ *
+ * See mc_smx.c.
+ */
std::vector<ActorInformation> smx_actors_infos;
/** Copy of `simix_global->process_to_destroy`
*/
std::vector<malloc_info> heap_info;
-public: // Libunwind-data
- /** Full-featured MC-aware libunwind address space for the process
- *
- * This address space is using a simgrid::mc::UnwindContext*
- * (with simgrid::mc::Process* / simgrid::mc::AddressSpace*
- * and unw_context_t).
- */
+ // Libunwind-data
+ /** Full-featured MC-aware libunwind address space for the process
+ *
+ * This address space is using a simgrid::mc::UnwindContext*
+ * (with simgrid::mc::Process* / simgrid::mc::AddressSpace*
+ * and unw_context_t).
+ */
unw_addr_space_t unw_addr_space;
/** Underlying libunwind address-space
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/s4u/Host.hpp"
-#include "src/instr/instr_private.h"
-#include "src/msg/msg_private.h"
+#include "src/instr/instr_private.hpp"
+#include "src/msg/msg_private.hpp"
#include "src/simix/ActorImpl.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_msg_process, instr, "MSG process");
char str[INSTR_DEFAULT_STR_SIZE];
//start link
- container_t msg = PJ_container_get (instr_process_id(process, str, len));
- simgrid::instr::Type* type = PJ_type_get_root()->getChild("MSG_PROCESS_LINK");
+ container_t msg = simgrid::instr::Container::byName(instr_process_id(process, str, len));
+ simgrid::instr::Type* type = simgrid::instr::Type::getRootType()->byName("MSG_PROCESS_LINK");
new simgrid::instr::StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
//destroy existing container of this process
TRACE_msg_process_create (MSG_process_get_name (process), MSG_process_get_PID (process), new_host);
//end link
- msg = PJ_container_get(instr_process_id(process, str, len));
- type = PJ_type_get_root()->getChild("MSG_PROCESS_LINK");
+ msg = simgrid::instr::Container::byName(instr_process_id(process, str, len));
+ type = simgrid::instr::Type::getRootType()->byName("MSG_PROCESS_LINK");
new simgrid::instr::EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
}
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t host_container = PJ_container_get(host->getCname());
+ container_t host_container = simgrid::instr::Container::byName(host->getName());
new simgrid::instr::Container(instr_process_id_2(process_name, process_pid, str, len),
simgrid::instr::INSTR_MSG_PROCESS, host_container);
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process = PJ_container_get_or_null(instr_process_id_2(process_name, process_pid, str, len));
+ container_t process =
+ simgrid::instr::Container::byNameOrNull(instr_process_id_2(process_name, process_pid, str, len));
if (process) {
- PJ_container_remove_from_parent (process);
+ process->removeFromParent();
delete process;
}
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(process, str, len));
- simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
- simgrid::instr::Value* val = simgrid::instr::Value::get("suspend", type);
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(process, str, len));
+ simgrid::instr::Type* type = process_container->type_->byName("MSG_PROCESS_STATE");
+ simgrid::instr::Value* val = simgrid::instr::Value::byName("suspend", type);
new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
}
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(process, str, len));
- simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(process, str, len));
+ simgrid::instr::Type* type = process_container->type_->byName("MSG_PROCESS_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
}
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(process, str, len));
- simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
- simgrid::instr::Value* val = simgrid::instr::Value::get("sleep", type);
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(process, str, len));
+ simgrid::instr::Type* type = process_container->type_->byName("MSG_PROCESS_STATE");
+ simgrid::instr::Value* val = simgrid::instr::Value::byName("sleep", type);
new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
}
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(process, str, len));
- simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(process, str, len));
+ simgrid::instr::Type* type = process_container->type_->byName("MSG_PROCESS_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
}
}
-/* Copyright (c) 2010, 2012-2015. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "mc/mc.h"
-#include "src/instr/instr_private.h"
-#include "src/msg/msg_private.h"
+#include "src/instr/instr_private.hpp"
+#include "src/msg/msg_private.hpp"
#include <atomic>
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
- simgrid::instr::Value* val = simgrid::instr::Value::get("task_execute", type);
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
+ simgrid::instr::Type* type = process_container->type_->byName("MSG_PROCESS_STATE");
+ simgrid::instr::Value* val = simgrid::instr::Value::byName("task_execute", type);
new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
}
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
+ simgrid::instr::Type* type = process_container->type_->byName("MSG_PROCESS_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
}
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
- simgrid::instr::Value* val = simgrid::instr::Value::get("receive", type);
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
+ simgrid::instr::Type* type = process_container->type_->byName("MSG_PROCESS_STATE");
+ simgrid::instr::Value* val = simgrid::instr::Value::byName("receive", type);
new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
}
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
+ simgrid::instr::Type* type = process_container->type_->byName("MSG_PROCESS_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
char key[INSTR_DEFAULT_STR_SIZE];
snprintf (key, INSTR_DEFAULT_STR_SIZE, "p%lld", task->counter);
- type = PJ_type_get_root()->getChild("MSG_PROCESS_TASK_LINK");
+ type = simgrid::instr::Type::getRootType()->byName("MSG_PROCESS_TASK_LINK");
new simgrid::instr::EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, process_container, "SR", key);
}
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
- simgrid::instr::Value* val = simgrid::instr::Value::get("send", type);
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
+ simgrid::instr::Type* type = process_container->type_->byName("MSG_PROCESS_STATE");
+ simgrid::instr::Value* val = simgrid::instr::Value::byName("send", type);
new simgrid::instr::PushStateEvent(MSG_get_clock(), process_container, type, val);
char key[INSTR_DEFAULT_STR_SIZE];
snprintf (key, INSTR_DEFAULT_STR_SIZE, "p%lld", task->counter);
- type = PJ_type_get_root()->getChild("MSG_PROCESS_TASK_LINK");
+ type = simgrid::instr::Type::getRootType()->byName("MSG_PROCESS_TASK_LINK");
new simgrid::instr::StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, process_container, "SR", key);
}
int len = INSTR_DEFAULT_STR_SIZE;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t process_container = PJ_container_get (instr_process_id(MSG_process_self(), str, len));
- simgrid::instr::Type* type = process_container->type_->getChild("MSG_PROCESS_STATE");
+ container_t process_container = simgrid::instr::Container::byName(instr_process_id(MSG_process_self(), str, len));
+ simgrid::instr::Type* type = process_container->type_->byName("MSG_PROCESS_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), process_container, type);
}
}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
#include "xbt/replay.hpp"
#include <cerrno>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_action, msg, "MSG actions for trace driven simulation");
-SG_BEGIN_DECL()
+extern "C" {
void MSG_action_init()
{
return res;
}
-
-SG_END_DECL()
+}
-/* Copyright (c) 2004-2014. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
-SG_BEGIN_DECL()
+extern "C" {
/** \ingroup msg_simulation
* \brief An application deployer.
{
SIMIX_process_set_function(host_id, function_name, arguments, -1, -1);
}
-
-SG_END_DECL()
+}
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/NetZone.hpp"
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
#if SIMGRID_HAVE_LUA
#include <lua.h>
#include <lualib.h>
#endif
-SG_BEGIN_DECL()
+extern "C" {
/********************************* MSG **************************************/
for (auto const& host : hosts)
xbt_dynar_push(whereto, &host);
}
-
-SG_END_DECL()
+}
#include "instr/instr_interface.h"
#include "mc/mc.h"
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
XBT_LOG_NEW_CATEGORY(msg, "All MSG categories");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg, "Logging specific to MSG (kernel)");
-SG_BEGIN_DECL()
+extern "C" {
MSG_Global_t msg_global = nullptr;
static void MSG_exit();
{
return msg_global->sent_msg;
}
-
-SG_END_DECL()
+}
#include <xbt/ex.hpp>
#include "src/kernel/activity/ExecImpl.hpp"
-#include "src/msg/msg_private.h"
-#include "src/simix/smx_private.h" /* MSG_task_listen looks inside the rdv directly. Not clean. */
+#include "src/msg/msg_private.hpp"
+#include "src/simix/smx_private.hpp" /* MSG_task_listen looks inside the rdv directly. Not clean. */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg, "Logging specific to MSG (gos)");
-SG_BEGIN_DECL()
+extern "C" {
/** \ingroup msg_task_usage
* \brief Executes a task and waits for its termination.
/* Try to receive it by calling SIMIX network layer */
try {
simcall_comm_recv(MSG_process_self()->getImpl(), mailbox->getImpl(), task, nullptr, nullptr, nullptr, nullptr, timeout, rate);
- XBT_DEBUG("Got task %s from %s", (*task)->name, mailbox->getName());
+ XBT_DEBUG("Got task %s from %s", (*task)->name, mailbox->getCname());
(*task)->simdata->setNotUsed();
}
catch (xbt_ex& e) {
{
return task->category;
}
-
-SG_END_DECL()
+}
#include "simgrid/s4u/Host.hpp"
#include "simgrid/s4u/Storage.hpp"
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
#include "src/simix/ActorImpl.hpp"
-#include "src/simix/smx_host_private.h"
-
+#include "src/simix/smx_host_private.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(msg);
simgrid::xbt::Extension<simgrid::s4u::Host, simgrid::MsgHostExt> simgrid::MsgHostExt::EXTENSION_ID;
-SG_BEGIN_DECL()
+extern "C" {
int sg_storage_max_file_descriptors = 1024;
return contents;
}
-
-SG_END_DECL()
+}
#include "simgrid/s4u/File.hpp"
#include "simgrid/s4u/Host.hpp"
#include "simgrid/s4u/Storage.hpp"
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
#include <numeric>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_io, msg, "Logging specific to MSG (io)");
-SG_BEGIN_DECL()
+extern "C" {
/** @addtogroup msg_file
* (#msg_file_t) and the functions for managing it.
/* Find the host where the file is physically located and read it */
msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
msg_host_t attached_host = storage_src->getHost();
- read_size = fd->read(size); // TODO re-add attached_host
+ read_size = fd->read(size);
if (strcmp(attached_host->getCname(), MSG_host_self()->getCname())) {
/* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
}
}
/* Write file on local or remote host */
- sg_size_t write_size = fd->write(size); // TODO readd attached_host
+ sg_size_t write_size = fd->write(size);
return write_size;
}
{
msg_file_t fd = new simgrid::s4u::File(fullpath, MSG_host_self());
fd->desc_id = MSG_host_get_file_descriptor_id(MSG_host_self());
+ fd->setUserdata(data);
return fd;
}
const char* MSG_storage_get_name(msg_storage_t storage)
{
xbt_assert((storage != nullptr), "Invalid parameters");
- return storage->getName();
+ return storage->getCname();
}
/** \ingroup msg_storage_management
xbt_dict_t MSG_storage_get_content(msg_storage_t storage)
{
std::map<std::string, sg_size_t>* content = storage->getContent();
- xbt_dict_t content_as_dict = xbt_dict_new_homogeneous(xbt_free_f);
+ // Note: ::operator delete is ok here (no destructor called) since the dict elements are of POD type sg_size_t.
+ xbt_dict_t content_as_dict = xbt_dict_new_homogeneous(::operator delete);
for (auto const& entry : *content) {
- sg_size_t* psize = static_cast<sg_size_t*>(malloc(sizeof(sg_size_t)));
+ sg_size_t* psize = new sg_size_t;
*psize = entry.second;
xbt_dict_set(content_as_dict, entry.first.c_str(), psize, nullptr);
}
xbt_assert((storage != nullptr), "Invalid parameters");
return storage->getHost()->getCname();
}
-
-SG_END_DECL()
+}
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/s4u/Mailbox.hpp"
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_mailbox, msg, "Logging specific to MSG (mailbox)");
-SG_BEGIN_DECL()
+extern "C" {
/** \ingroup msg_mailbox_management
* \brief Set the mailbox to receive in asynchronous mode
mailbox->setReceiver(simgrid::s4u::Actor::self());
XBT_VERB("%s mailbox set to receive eagerly for myself\n",alias);
}
-
-SG_END_DECL()
+}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef METASIMGRID_PRIVATE_H
-#define METASIMGRID_PRIVATE_H
+#ifndef MSG_PRIVATE_HPP
+#define MSG_PRIVATE_HPP
#include "simgrid/msg.h"
public:
static simgrid::xbt::Extension<s4u::Host, MsgHostExt> EXTENSION_ID;
- ~MsgHostExt() {
- delete file_descriptor_table;
- }
+ ~MsgHostExt() { delete file_descriptor_table; }
std::vector<int>* file_descriptor_table = nullptr; // Created lazily on need
};
}
/********************************* Task **************************************/
-typedef struct simdata_task {
- ~simdata_task()
+struct s_simdata_task_t {
+ ~s_simdata_task_t()
{
/* parallel tasks only */
- xbt_free(this->host_list);
+ delete[] this->host_list;
+ /* flops_parallel_amount and bytes_parallel_amount are automatically deleted in ~L07Action */
}
void setUsed();
- void setNotUsed()
- {
- this->isused = false;
- }
+ void setNotUsed() { this->isused = false; }
simgrid::kernel::activity::ExecImplPtr compute = nullptr; /* SIMIX modeling of computation */
simgrid::kernel::activity::CommImplPtr comm = nullptr; /* SIMIX modeling of communication */
- double bytes_amount = 0.0; /* Data size */
- double flops_amount = 0.0; /* Computation size */
- msg_process_t sender = nullptr;
- msg_process_t receiver = nullptr;
- msg_host_t source = nullptr;
+ double bytes_amount = 0.0; /* Data size */
+ double flops_amount = 0.0; /* Computation size */
+ msg_process_t sender = nullptr;
+ msg_process_t receiver = nullptr;
+ msg_host_t source = nullptr;
double priority = 1.0;
double bound = 0.0; /* Capping for CPU resource, or 0 for no capping */
double rate = -1; /* Capping for network resource, or -1 for no capping*/
- bool isused = false; /* Indicates whether the task is used in SIMIX currently */
- int host_nb = 0; /* ==0 if sequential task; parallel task if not */
+ bool isused = false; /* Indicates whether the task is used in SIMIX currently */
+ int host_nb = 0; /* ==0 if sequential task; parallel task if not */
/******* Parallel Tasks Only !!!! *******/
- sg_host_t *host_list = nullptr;
- double *flops_parallel_amount = nullptr;
- double *bytes_parallel_amount = nullptr;
+ sg_host_t* host_list = nullptr;
+ double* flops_parallel_amount = nullptr;
+ double* bytes_parallel_amount = nullptr;
private:
void reportMultipleUse() const;
-} s_simdata_task_t;
+};
/******************************* Process *************************************/
public:
explicit ActorExt(void* d) : data(d) {}
msg_error_t errno_ = MSG_OK; /* the last value returned by a MSG_function */
- void* data = nullptr; /* user data */
+ void* data = nullptr; /* user data */
};
class Comm {
public:
- msg_task_t task_sent; /* task sent (NULL for the receiver) */
- msg_task_t *task_received; /* where the task will be received (NULL for the sender) */
- smx_activity_t s_comm; /* SIMIX communication object encapsulated (the same for both processes) */
- msg_error_t status = MSG_OK; /* status of the communication once finished */
+ msg_task_t task_sent; /* task sent (NULL for the receiver) */
+ msg_task_t* task_received; /* where the task will be received (NULL for the sender) */
+ smx_activity_t s_comm; /* SIMIX communication object encapsulated (the same for both processes) */
+ msg_error_t status = MSG_OK; /* status of the communication once finished */
Comm(msg_task_t sent, msg_task_t* received, smx_activity_t comm)
: task_sent(sent), task_received(received), s_comm(std::move(comm))
{
}
/************************** Global variables ********************************/
-typedef struct MSG_Global {
- int debug_multiple_use; /* whether we want an error message when reusing the same Task for 2 things */
+struct s_MSG_Global_t {
+ int debug_multiple_use; /* whether we want an error message when reusing the same Task for 2 things */
std::atomic_int_fast32_t sent_msg; /* Total amount of messages sent during the simulation */
- void (*task_copy_callback) (msg_task_t task, msg_process_t src, msg_process_t dst);
+ void (*task_copy_callback)(msg_task_t task, msg_process_t src, msg_process_t dst);
void_f_pvoid_t process_data_cleanup;
-} s_MSG_Global_t;
+};
typedef s_MSG_Global_t* MSG_Global_t;
-SG_BEGIN_DECL()
+extern "C" {
XBT_PUBLIC_DATA(MSG_Global_t) msg_global;
/********** Tracing **********/
/* declaration of instrumentation functions from msg_task_instr.c */
-XBT_PRIVATE void TRACE_msg_set_task_category(msg_task_t task, const char *category);
+XBT_PRIVATE void TRACE_msg_set_task_category(msg_task_t task, const char* category);
XBT_PRIVATE void TRACE_msg_task_create(msg_task_t task);
XBT_PRIVATE void TRACE_msg_task_execute_start(msg_task_t task);
XBT_PRIVATE void TRACE_msg_task_execute_end(msg_task_t task);
XBT_PRIVATE void TRACE_msg_task_destroy(msg_task_t task);
XBT_PRIVATE void TRACE_msg_task_get_end(double start_time, msg_task_t task);
XBT_PRIVATE void TRACE_msg_task_get_start();
-XBT_PRIVATE int TRACE_msg_task_put_start(msg_task_t task); //returns TRUE if the task_put_end must be called
+XBT_PRIVATE int TRACE_msg_task_put_start(msg_task_t task); // returns TRUE if the task_put_end must be called
XBT_PRIVATE void TRACE_msg_task_put_end();
/* declaration of instrumentation functions from msg_process_instr.c */
-XBT_PRIVATE char *instr_process_id (msg_process_t proc, char *str, int len);
-XBT_PRIVATE char *instr_process_id_2 (const char *process_name, int process_pid, char *str, int len);
+XBT_PRIVATE char* instr_process_id(msg_process_t proc, char* str, int len);
+XBT_PRIVATE char* instr_process_id_2(const char* process_name, int process_pid, char* str, int len);
XBT_PRIVATE void TRACE_msg_process_change_host(msg_process_t process, msg_host_t new_host);
-XBT_PRIVATE void TRACE_msg_process_create (const char *process_name, int process_pid, msg_host_t host);
-XBT_PRIVATE void TRACE_msg_process_destroy (const char *process_name, int process_pid);
+XBT_PRIVATE void TRACE_msg_process_create(const char* process_name, int process_pid, msg_host_t host);
+XBT_PRIVATE void TRACE_msg_process_destroy(const char* process_name, int process_pid);
XBT_PRIVATE void TRACE_msg_process_kill(smx_process_exit_status_t status, msg_process_t process);
XBT_PRIVATE void TRACE_msg_process_suspend(msg_process_t process);
XBT_PRIVATE void TRACE_msg_process_resume(msg_process_t process);
-XBT_PRIVATE void TRACE_msg_process_sleep_in(msg_process_t process); //called from msg/gos.c
+XBT_PRIVATE void TRACE_msg_process_sleep_in(msg_process_t process); // called from msg/gos.c
XBT_PRIVATE void TRACE_msg_process_sleep_out(msg_process_t process);
+}
-SG_END_DECL()
-
-inline void simdata_task::setUsed()
+inline void s_simdata_task_t::setUsed()
{
if (this->isused)
this->reportMultipleUse();
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "msg_private.h"
+#include "msg_private.hpp"
#include "simgrid/s4u/Host.hpp"
#include "src/simix/ActorImpl.hpp"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg, "Logging specific to MSG (process)");
-SG_BEGIN_DECL()
+extern "C" {
/** @addtogroup m_process_management
*
xbt_free(argv);
return res;
}
-
-SG_END_DECL()
+}
msg_process_t MSG_process_create_from_stdfunc(const char* name, std::function<void()> code, void* data, msg_host_t host,
std::map<std::string, std::string>* properties)
return process->ciface();
}
-SG_BEGIN_DECL()
+extern "C" {
/* Become a process in the simulation
*
{
intrusive_ptr_release(process);
}
-
-SG_END_DECL()
+}
#include "xbt/ex.hpp"
-#include "msg_private.h"
-#include "src/simix/smx_private.h"
+#include "msg_private.hpp"
+#include "src/simix/smx_private.hpp"
#include "xbt/synchro.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_synchro, msg, "Logging specific to MSG (synchro)");
}
/*-**** barrier related functions ****-*/
-typedef struct s_msg_bar {
+struct s_msg_bar_t {
xbt_mutex_t mutex;
xbt_cond_t cond;
unsigned int arrived_processes;
unsigned int expected_processes;
-} s_msg_bar_t;
+};
/** @brief Initializes a barrier, with count elements */
msg_bar_t MSG_barrier_init(unsigned int count) {
- msg_bar_t bar = xbt_new0(s_msg_bar, 1);
+ msg_bar_t bar = xbt_new0(s_msg_bar_t, 1);
bar->expected_processes = count;
bar->arrived_processes = 0;
bar->mutex = xbt_mutex_init();
-/* Copyright (c) 2004-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "msg_private.h"
-#include "src/simix/smx_private.h"
+#include "msg_private.hpp"
+#include "src/simix/smx_private.hpp"
+#include <algorithm>
-SG_BEGIN_DECL()
+extern "C" {
/** @addtogroup m_task_management
*
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_task, msg, "Logging specific to MSG (task)");
-void simdata_task::reportMultipleUse() const
+void s_simdata_task_t::reportMultipleUse() const
{
if (msg_global->debug_multiple_use){
XBT_ERROR("This task is already used in there:");
/* Simulator Data specific to parallel tasks */
simdata->host_nb = host_nb;
- simdata->host_list = xbt_new0(sg_host_t, host_nb);
- simdata->flops_parallel_amount = flops_amount;
- simdata->bytes_parallel_amount = bytes_amount;
-
- for (int i = 0; i < host_nb; i++)
- simdata->host_list[i] = host_list[i];
+ simdata->host_list = new sg_host_t[host_nb];
+ std::copy_n(host_list, host_nb, simdata->host_list);
+ if (flops_amount != nullptr) {
+ simdata->flops_parallel_amount = new double[host_nb];
+ std::copy_n(flops_amount, host_nb, simdata->flops_parallel_amount);
+ }
+ if (bytes_amount != nullptr) {
+ simdata->bytes_parallel_amount = new double[host_nb * host_nb];
+ std::copy_n(bytes_amount, host_nb * host_nb, simdata->bytes_parallel_amount);
+ }
return task;
}
if (task->simdata->compute)
simcall_execution_set_bound(task->simdata->compute, task->simdata->bound);
}
-
-SG_END_DECL()
+}
#include <xbt/ex.hpp>
-#include "src/instr/instr_private.h"
-#include "src/msg/msg_private.h"
+#include "src/instr/instr_private.hpp"
+#include "src/msg/msg_private.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/plugins/vm/VmHostExt.hpp"
#include "simgrid/host.h"
#include "simgrid/simix.hpp"
-SG_BEGIN_DECL()
+extern "C" {
-struct dirty_page {
+struct s_dirty_page {
double prev_clock;
double prev_remaining;
msg_task_t task;
};
-typedef struct dirty_page s_dirty_page;
-typedef struct dirty_page* dirty_page_t;
+typedef s_dirty_page* dirty_page_t;
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_vm, msg, "Cloud-oriented parts of the MSG API");
simgrid::simix::kernelImmediate([vm]() { vm->destroy(); });
if (TRACE_msg_vm_is_enabled()) {
- container_t container = PJ_container_get(vm->getCname());
- PJ_container_remove_from_parent(container);
+ container_t container = simgrid::instr::Container::byName(vm->getName());
+ container->removeFromParent();
delete container;
}
}
{
vm->start();
if (TRACE_msg_vm_is_enabled()) {
- container_t vm_container = PJ_container_get(vm->getCname());
- simgrid::instr::Type* type = vm_container->type_->getChild("MSG_VM_STATE");
- simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("start", "0 0 1", type); // start is blue
+ container_t vm_container = simgrid::instr::Container::byName(vm->getName());
+ simgrid::instr::Type* type = vm_container->type_->byName("MSG_VM_STATE");
+ simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("start", "0 0 1", type); // start is blue
new simgrid::instr::PushStateEvent(MSG_get_clock(), vm_container, type, val);
}
}
XBT_DEBUG("mig: rx_start");
// The structure has been created in the do_migration function and should only be freed in the same place ;)
- struct migration_session* ms = static_cast<migration_session*>(MSG_process_get_data(MSG_process_self()));
+ migration_session* ms = static_cast<migration_session*>(MSG_process_get_data(MSG_process_self()));
bool received_finalize = false;
counter++;
// start link
- container_t msg = PJ_container_get(vm->getCname());
- simgrid::instr::Type* type = PJ_type_get_root()->getChild("MSG_VM_LINK");
+ container_t msg = simgrid::instr::Container::byName(vm->getName());
+ simgrid::instr::Type* type = simgrid::instr::Type::getRootType()->byName("MSG_VM_LINK");
new simgrid::instr::StartLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
// destroy existing container of this vm
- container_t existing_container = PJ_container_get(vm->getCname());
- PJ_container_remove_from_parent(existing_container);
+ container_t existing_container = simgrid::instr::Container::byName(vm->getName());
+ existing_container->removeFromParent();
delete existing_container;
// create new container on the new_host location
new simgrid::instr::Container(vm->getCname(), simgrid::instr::INSTR_MSG_VM,
- PJ_container_get(ms->dst_pm->getCname()));
+ simgrid::instr::Container::byName(ms->dst_pm->getName()));
// end link
- msg = PJ_container_get(vm->getCname());
- type = PJ_type_get_root()->getChild("MSG_VM_LINK");
+ msg = simgrid::instr::Container::byName(vm->getName());
+ type = simgrid::instr::Type::getRootType()->byName("MSG_VM_LINK");
new simgrid::instr::EndLinkEvent(MSG_get_clock(), PJ_container_get_root(), type, msg, "M", key);
}
XBT_DEBUG("mig: tx_start");
// Note that the ms structure has been allocated in do_migration and hence should be freed in the same function ;)
- migration_session *ms = static_cast<migration_session *>(MSG_process_get_data(MSG_process_self()));
+ migration_session* ms = static_cast<migration_session*>(MSG_process_get_data(MSG_process_self()));
double host_speed = ms->vm->pimpl_vm_->getPm()->getSpeed();
s_vm_params_t params;
vm->pimpl_vm_->isMigrating = true;
- struct migration_session *ms = xbt_new(struct migration_session, 1);
+ migration_session* ms = xbt_new(migration_session, 1);
ms->vm = vm;
ms->src_pm = src_pm;
ms->dst_pm = dst_pm;
XBT_DEBUG("vm_suspend done");
if (TRACE_msg_vm_is_enabled()) {
- container_t vm_container = PJ_container_get(vm->getCname());
- simgrid::instr::Type* type = vm_container->type_->getChild("MSG_VM_STATE");
- simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("suspend", "1 0 0", type); // suspend is red
+ container_t vm_container = simgrid::instr::Container::byName(vm->getName());
+ simgrid::instr::Type* type = vm_container->type_->byName("MSG_VM_STATE");
+ simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("suspend", "1 0 0", type); // suspend is red
new simgrid::instr::PushStateEvent(MSG_get_clock(), vm_container, type, val);
}
}
vm->pimpl_vm_->resume();
if (TRACE_msg_vm_is_enabled()) {
- container_t vm_container = PJ_container_get(vm->getCname());
- simgrid::instr::Type* type = vm_container->type_->getChild("MSG_VM_STATE");
+ container_t vm_container = simgrid::instr::Container::byName(vm->getName());
+ simgrid::instr::Type* type = vm_container->type_->byName("MSG_VM_STATE");
new simgrid::instr::PopStateEvent(MSG_get_clock(), vm_container, type);
}
}
{
simgrid::simix::kernelImmediate([vm, bound]() { vm->pimpl_vm_->setBound(bound); });
}
-
-SG_END_DECL()
+}
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/simix/ActorImpl.hpp"
-#include "src/simix/smx_host_private.h"
+#include "src/simix/smx_host_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_vm, surf, "Logging specific to the SURF VM module");
if (getState() != SURF_VM_STATE_RUNNING)
THROWF(vm_error, 0, "Cannot suspend VM %s: it is not running.", piface_->getCname());
if (issuer->host == piface_)
- THROWF(vm_error, 0, "Actor %s cannot suspend the VM %s in which it runs", issuer->cname(), piface_->getCname());
+ THROWF(vm_error, 0, "Actor %s cannot suspend the VM %s in which it runs", issuer->getCname(), piface_->getCname());
xbt_swag_t process_list = piface_->extension<simgrid::simix::Host>()->process_list;
XBT_DEBUG("suspend VM(%s), where %d processes exist", piface_->getCname(), xbt_swag_size(process_list));
smx_actor_t smx_process;
smx_actor_t smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, process_list) {
- XBT_DEBUG("resume %s", smx_process->cname());
+ XBT_DEBUG("resume %s", smx_process->getCname());
smx_process->resume();
}
smx_actor_t smx_process;
smx_actor_t smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, process_list) {
- XBT_DEBUG("kill %s@%s on behalf of %s which shutdown that VM.", smx_process->cname(), smx_process->host->getCname(),
- issuer->cname());
+ XBT_DEBUG("kill %s@%s on behalf of %s which shutdown that VM.", smx_process->getCname(),
+ smx_process->host->getCname(), issuer->getCname());
SIMIX_process_kill(smx_process, issuer);
}
-/* Copyright (c) 2004-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
// It corresponds to the cost of a VM running no tasks.
-typedef struct dirty_page* dirty_page_t;
+typedef struct s_dirty_page* dirty_page_t;
namespace simgrid {
namespace vm {
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/plugins/vm/VmHostExt.hpp"
-#include "src/simix/smx_host_private.h"
+#include "src/simix/smx_host_private.hpp"
#include "src/surf/cpu_cas01.hpp"
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_vm, "S4U virtual machines");
extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
if (TRACE_msg_vm_is_enabled()) {
- container_t host_container = PJ_container_get(pm->getCname());
+ container_t host_container = simgrid::instr::Container::byName(pm->getName());
new simgrid::instr::Container(name, simgrid::instr::INSTR_MSG_VM, host_container);
}
}
#include "simgrid/s4u/Mailbox.hpp"
#include "src/kernel/context/Context.hpp"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
#include <sstream>
simgrid::simix::kernelImmediate([this]() { pimpl_->daemonize(); });
}
-const char* Actor::getCname()
+const simgrid::xbt::string& Actor::getName() const
{
- return this->pimpl_->name.c_str();
+ return this->pimpl_->getName();
}
-simgrid::xbt::string Actor::getName()
+const char* Actor::getCname() const
{
- return this->pimpl_->name;
+ return this->pimpl_->getCname();
}
aid_t Actor::getPid()
std::string getName()
{
- return SIMIX_process_self()->name;
+ return SIMIX_process_self()->getName();
+}
+
+const char* getCname()
+{
+ return SIMIX_process_self()->getCname();
}
Host* getHost()
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "src/msg/msg_private.hpp"
#include "xbt/log.h"
-#include "src/msg/msg_private.h"
#include "simgrid/s4u/Comm.hpp"
#include "simgrid/s4u/Mailbox.hpp"
Engine::Engine(int *argc, char **argv) {
xbt_assert(s4u::Engine::instance_ == nullptr, "It is currently forbidden to create more than one instance of s4u::Engine");
- s4u::Engine::instance_ = this;
- pimpl = new kernel::EngineImpl();
-
TRACE_global_init();
SIMIX_global_init(argc, argv);
+
+ pimpl = new kernel::EngineImpl();
+ s4u::Engine::instance_ = this;
}
Engine::~Engine()
Engine* Engine::getInstance()
{
if (s4u::Engine::instance_ == nullptr)
- new Engine(0,nullptr);
- return s4u::Engine::instance_;
+ return new Engine(0, nullptr);
+ else
+ return s4u::Engine::instance_;
}
void Engine::shutdown() {
delete s4u::Engine::instance_;
+ s4u::Engine::instance_ = nullptr;
}
double Engine::getClock()
/** @brief Register a new netpoint to the system */
void Engine::netpointRegister(simgrid::kernel::routing::NetPoint* point)
{
-// simgrid::simix::kernelImmediate([&]{ FIXME: this segfaults in set_thread
- pimpl->netpoints_[point->name()] = point;
-// });
+ // simgrid::simix::kernelImmediate([&]{ FIXME: this segfaults in set_thread
+ pimpl->netpoints_[point->getName()] = point;
+ // });
}
/** @brief Unregister a given netpoint */
void Engine::netpointUnregister(simgrid::kernel::routing::NetPoint* point)
{
simgrid::simix::kernelImmediate([this, point] {
- pimpl->netpoints_.erase(point->name());
+ pimpl->netpoints_.erase(point->getName());
delete point;
});
}
#include "simgrid/s4u/Storage.hpp"
#include "simgrid/simix.hpp"
#include "src/kernel/routing/NetPoint.hpp"
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
#include "src/simix/ActorImpl.hpp"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
#include "src/surf/HostImpl.hpp"
#include "src/surf/cpu_interface.hpp"
#include "xbt/log.h"
XBT_CDEBUG(surf_route, "Route from '%s' to '%s' (latency: %f):", getCname(), dest->getCname(),
(latency == nullptr ? -1 : *latency));
for (auto const& link : *links)
- XBT_CDEBUG(surf_route, "Link %s", link->cname());
+ XBT_CDEBUG(surf_route, "Link %s", link->getCname());
}
}
const char* sg_link_name(sg_link_t link)
{
- return link->name();
+ return link->getCname();
}
sg_link_t sg_link_by_name(const char* name)
{
return nullptr;
return &res->piface_;
}
+const std::string& Link::getName() const
+{
+ return this->pimpl_->getName();
+}
+const char* Link::getCname() const
+{
+ return this->pimpl_->getCname();
+}
const char* Link::name()
{
- return this->pimpl_->cname();
+ return getCname();
}
bool Link::isUsed()
{
#include "simgrid/s4u/Comm.hpp"
#include "simgrid/s4u/Mailbox.hpp"
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
#include "src/simix/ActorImpl.hpp"
-#include "src/simix/smx_network_private.h"
+#include "src/simix/smx_network_private.hpp"
#include "xbt/log.h"
XBT_LOG_EXTERNAL_CATEGORY(s4u);
namespace simgrid {
namespace s4u {
-const char* Mailbox::getName()
+const simgrid::xbt::string& Mailbox::getName() const
{
- return pimpl_->name_;
+ return pimpl_->getName();
+}
+
+const char* Mailbox::getCname() const
+{
+ return pimpl_->getCname();
}
MailboxPtr Mailbox::byName(const char*name)
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
#include "src/simix/smx_synchro_private.hpp"
#include "xbt/log.h"
{
return children_;
}
-const char* NetZone::getCname()
+const char* NetZone::getCname() const
{
return name_.c_str();
}
void NetZone::getHosts(std::vector<s4u::Host*>* whereto)
{
for (auto const& card : vertices_) {
- s4u::Host* host = simgrid::s4u::Host::by_name_or_null(card->name());
+ s4u::Host* host = simgrid::s4u::Host::by_name_or_null(card->getName());
if (host != nullptr)
whereto->push_back(host);
}
return &res->piface_;
}
-const char* Storage::getName()
+const std::string& Storage::getName() const
{
- return pimpl_->cname();
+ return pimpl_->getName();
+}
+
+const char* Storage::getCname() const
+{
+ return pimpl_->getCname();
}
const char* Storage::getType()
-/* Copyright (c) 2006-2016. The SimGrid Team.
+/* Copyright (c) 2006-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "simdag_private.hpp"
#include "src/surf/HostImpl.hpp"
#include "src/surf/surf_interface.hpp"
+#include <algorithm>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_task, sd, "Logging specific to SimDag (task)");
/* Copy the elements of the task into the action */
int host_nb = task->allocation->size();
- sg_host_t *hosts = xbt_new(sg_host_t, host_nb);
- int i =0;
- for (auto const& host : *task->allocation) {
- hosts[i] = host;
- i++;
- }
+ sg_host_t* hosts = new sg_host_t[host_nb];
+ std::copy_n(task->allocation->begin(), host_nb, hosts);
- double *flops_amount = xbt_new0(double, host_nb);
- double *bytes_amount = xbt_new0(double, host_nb * host_nb);
+ double* flops_amount = new double[host_nb]();
+ double* bytes_amount = new double[host_nb * host_nb]();
if(task->flops_amount)
- memcpy(flops_amount, task->flops_amount, sizeof(double) * host_nb);
+ std::copy_n(task->flops_amount, host_nb, flops_amount);
if(task->bytes_amount)
- memcpy(bytes_amount, task->bytes_amount, sizeof(double) * host_nb * host_nb);
+ std::copy_n(task->bytes_amount, host_nb * host_nb, bytes_amount);
task->surf_action = surf_host_model->executeParallelTask(host_nb, hosts, flops_amount, bytes_amount, task->rate);
void SD_task_schedulel(SD_task_t task, int count, ...)
{
va_list ap;
- sg_host_t *list = xbt_new(sg_host_t, count);
+ sg_host_t* list = new sg_host_t[count];
va_start(ap, count);
for (int i=0; i<count; i++)
list[i] = va_arg(ap, sg_host_t);
va_end(ap);
SD_task_schedulev(task, count, list);
- xbt_free(list);
+ delete[] list;
}
}
}
-SG_BEGIN_DECL()
+extern "C" {
extern XBT_PRIVATE simgrid::sd::Global *sd_global;
/* Task */
-typedef struct SD_task {
+struct s_SD_task_t {
e_SD_task_state_t state;
void *data; /* user data */
char *name;
double *flops_amount;
double *bytes_amount;
double rate;
-} s_SD_task_t;
+};
/* SimDag private functions */
XBT_PRIVATE void SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state);
XBT_PRIVATE bool acyclic_graph_detail(xbt_dynar_t dag);
XBT_PRIVATE void uniq_transfer_task_name(SD_task_t task);
XBT_PRIVATE const char *__get_state_name(e_SD_task_state_t state);
-SG_END_DECL()
+}
#endif
#include "xbt/dict.h"
#include "src/kernel/routing/NetPoint.hpp"
-#include "src/simix/smx_host_private.h"
+#include "src/simix/smx_host_private.hpp"
#include "src/surf/HostImpl.hpp"
#include "src/surf/cpu_interface.hpp"
for (auto const& elm : host->getMountedStorages()) {
const char* mount_name = elm.first.c_str();
sg_storage_t storage = elm.second;
- xbt_dict_set(res, mount_name, (void*)storage->getName(), nullptr);
+ xbt_dict_set(res, mount_name, (void*)storage->getCname(), nullptr);
}
return res;
/* sg_config: configuration infrastructure for the simulation world */
-#include "xbt/misc.h"
-#include "xbt/config.h"
-#include "xbt/config.hpp"
-#include "xbt/log.h"
-#include "xbt/mallocator.h"
-#include "xbt/sysdep.h"
-#include "surf/surf.h"
-#include "surf/maxmin.h"
-#include "instr/instr_interface.h"
-#include "simgrid/simix.h"
#include "simgrid/sg_config.h"
-#include "simgrid_config.h" /* what was compiled in? */
+#include "instr/instr_interface.h"
#include "mc/mc.h"
#include "simgrid/instr.h"
+#include "simgrid/simix.h"
+#include "simgrid_config.h" /* what was compiled in? */
#include "src/mc/mc_replay.h"
#include "src/surf/surf_interface.hpp"
+#include "surf/maxmin.hpp"
+#include "surf/surf.h"
+#include "xbt/config.h"
+#include "xbt/config.hpp"
+#include "xbt/log.h"
+#include "xbt/mallocator.h"
+#include "xbt/misc.h"
+#include "xbt/sysdep.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_config, surf, "About the configuration of SimGrid");
#include "mc/mc.h"
-#include "smx_private.h"
+#include "smx_private.hpp"
#include "src/kernel/activity/SleepImpl.hpp"
#include "src/kernel/activity/SynchroIo.hpp"
#include "src/kernel/activity/SynchroRaw.hpp"
#include "src/mc/mc_replay.h"
#include "src/mc/remote/Client.hpp"
-#include "src/msg/msg_private.h"
+#include "src/msg/msg_private.hpp"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/surf_interface.hpp"
simgrid::s4u::Actor* ActorImpl::restart()
{
- XBT_DEBUG("Restarting process %s on %s", cname(), host->getCname());
+ XBT_DEBUG("Restarting process %s on %s", getCname(), host->getCname());
// retrieve the arguments of the old process
// FIXME: Factorize this with SIMIX_host_add_auto_restart_process ?
/* Now insert it in the global process list and in the process to run list */
simix_global->process_list[process->pid] = process;
- XBT_DEBUG("Inserting %s(%s) in the to_run list", process->cname(), host->getCname());
+ XBT_DEBUG("Inserting %s(%s) in the to_run list", process->getCname(), host->getCname());
simix_global->process_to_run.push_back(process);
intrusive_ptr_add_ref(process);
/* Tracing the process creation */
- TRACE_msg_process_create(process->cname(), process->pid, process->host);
+ TRACE_msg_process_create(process->getCname(), process->pid, process->host);
return process;
}
/* Now insert it in the global process list and in the process to run list */
simix_global->process_list[process->pid] = process;
- XBT_DEBUG("Inserting %s(%s) in the to_run list", process->cname(), host->getCname());
+ XBT_DEBUG("Inserting %s(%s) in the to_run list", process->getCname(), host->getCname());
simix_global->process_to_run.push_back(process);
/* Tracing the process creation */
- TRACE_msg_process_create(process->cname(), process->pid, process->host);
+ TRACE_msg_process_create(process->getCname(), process->pid, process->host);
auto context = dynamic_cast<simgrid::kernel::context::AttachContext*>(process->context);
if (not context)
*/
void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer) {
- XBT_DEBUG("Killing process %s@%s", process->cname(), process->host->getCname());
+ XBT_DEBUG("Killing process %s@%s", process->getCname(), process->host->getCname());
process->context->iwannadie = 1;
process->blocked = 0;
*/
void SIMIX_process_yield(smx_actor_t self)
{
- XBT_DEBUG("Yield actor '%s'", self->cname());
+ XBT_DEBUG("Yield actor '%s'", self->getCname());
/* Go into sleep and return control to maestro */
self->context->suspend();
SIMIX_process_on_exit_runall(self);
/* Add the process to the list of process to restart, only if the host is down */
if (self->auto_restart && self->host->isOff()) {
- SIMIX_host_add_auto_restart_process(self->host, self->cname(), self->code, self->userdata,
+ SIMIX_host_add_auto_restart_process(self->host, self->getCname(), self->code, self->userdata,
SIMIX_timer_get_date(self->kill_timer), self->getProperties(),
self->auto_restart);
}
- XBT_DEBUG("Process %s@%s is dead", self->cname(), self->host->getCname());
+ XBT_DEBUG("Process %s@%s is dead", self->getCname(), self->host->getCname());
self->context->stop();
}
-/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#define SIMIX_ACTORIMPL_H
#include "simgrid/s4u/Actor.hpp"
-#include "src/simix/popping_private.h"
+#include "src/simix/popping_private.hpp"
#include "src/surf/PropertyHolder.hpp"
#include "xbt/swag.h"
#include <list>
#include <map>
-typedef struct s_smx_process_exit_fun {
+struct s_smx_process_exit_fun_t {
int_f_pvoid_pvoid_t fun;
void *arg;
-} s_smx_process_exit_fun_t;
+};
typedef s_smx_process_exit_fun_t* smx_process_exit_fun_t;
namespace simgrid {
aid_t pid = 0;
aid_t ppid = -1;
simgrid::xbt::string name;
- const char* cname() { return name.c_str(); }
+ const simgrid::xbt::string& getName() const { return name; }
+ const char* getCname() const { return name.c_str(); }
s4u::Host* host = nullptr; /* the host on which the process is running */
smx_context_t context = nullptr; /* the context (uctx/raw/thread) that executes the user function */
typedef simgrid::simix::ActorImpl* smx_actor_t;
-SG_BEGIN_DECL()
+extern "C" {
XBT_PRIVATE smx_actor_t SIMIX_process_create(const char* name, std::function<void()> code, void* data, sg_host_t host,
std::map<std::string, std::string>* properties,
XBT_PRIVATE void SIMIX_process_auto_restart_set(smx_actor_t process, int auto_restart);
extern void (*SMPI_switch_data_segment)(int dest);
-
-SG_END_DECL()
+}
XBT_PRIVATE void SIMIX_process_sleep_destroy(smx_activity_t synchro);
XBT_PRIVATE smx_activity_t SIMIX_process_join(smx_actor_t issuer, smx_actor_t process, double timeout);
/* */
/* This is somehow the "libc" of SimGrid */
-/* Copyright (c) 2010-2015. The SimGrid Team.
+/* Copyright (c) 2010-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "simgrid/s4u/VirtualMachine.hpp"
#include "simgrid/simix.hpp"
#include "simgrid/simix/blocking_simcall.hpp"
-#include "smx_private.h"
+#include "smx_private.hpp"
#include "src/kernel/activity/CommImpl.hpp"
#include "src/mc/mc_forward.hpp"
#include "src/mc/mc_replay.h"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
-#include "src/simix/smx_host_private.h"
+#include "src/simix/smx_host_private.hpp"
#include "xbt/ex.h"
#include "xbt/functional.hpp"
void simcall_call(smx_actor_t actor)
{
if (actor != simix_global->maestro_process) {
- XBT_DEBUG("Yield actor '%s' on simcall %s (%d)", actor->cname(), SIMIX_simcall_name(actor->simcall.call),
+ XBT_DEBUG("Yield actor '%s' on simcall %s (%d)", actor->getCname(), SIMIX_simcall_name(actor->simcall.call),
(int)actor->simcall.call);
SIMIX_process_yield(actor);
} else {
if (kill_time <= SIMIX_get_clock() || simix_global->kill_process_function == nullptr)
return;
- XBT_DEBUG("Set kill time %f for process %s@%s", kill_time, process->cname(), process->host->getCname());
+ XBT_DEBUG("Set kill time %f for process %s@%s", kill_time, process->getCname(), process->host->getCname());
process->kill_timer = SIMIX_timer_set(kill_time, [process] {
simix_global->kill_process_function(process);
process->kill_timer=nullptr;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "smx_private.h"
+#include "smx_private.hpp"
#include "xbt/xbt_os_thread.h"
#if SIMGRID_HAVE_MC
-#include "src/mc/mc_private.h"
+#include "src/mc/mc_private.hpp"
#endif
#include "src/kernel/activity/CommImpl.hpp"
* That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
*/
-#include "src/simix/popping_private.h"
+#include "src/simix/popping_private.hpp"
static inline int simcall_process_killall__get__reset_pid(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<int>(simcall->args[0]);
{
return simgrid::simix::unmarshal_raw<int>(simcall->result);
}
-static inline void simcall_process_join__set__result(smx_simcall_t simcall, int result){
- simgrid::simix::marshal<int>(simcall->result, result);
+static inline void simcall_process_join__set__result(smx_simcall_t simcall, int result)
+{
+ simgrid::simix::marshal<int>(simcall->result, result);
}
static inline double simcall_process_sleep__get__duration(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal_raw<int>(simcall->result);
}
-static inline void simcall_process_sleep__set__result(smx_simcall_t simcall, int result){
- simgrid::simix::marshal<int>(simcall->result, result);
+static inline void simcall_process_sleep__set__result(smx_simcall_t simcall, int result)
+{
+ simgrid::simix::marshal<int>(simcall->result, result);
}
static inline const char* simcall_execution_start__get__name(smx_simcall_t simcall)
{
simgrid::simix::marshal<double>(simcall->args[3], arg);
}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
-simcall_execution_start__get__result(smx_simcall_t simcall)
+static inline boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> simcall_execution_start__get__result(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(simcall->result);
}
{
return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ExecImpl*>(simcall->result);
}
-static inline void
-simcall_execution_start__set__result(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> result)
+static inline void simcall_execution_start__set__result(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> result)
{
simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(simcall->result, result);
}
{
simgrid::simix::marshal<double>(simcall->args[6], arg);
}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
-simcall_execution_parallel_start__get__result(smx_simcall_t simcall)
+static inline boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> simcall_execution_parallel_start__get__result(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(simcall->result);
}
-static inline simgrid::kernel::activity::ExecImpl*
-simcall_execution_parallel_start__getraw__result(smx_simcall_t simcall)
+static inline simgrid::kernel::activity::ExecImpl* simcall_execution_parallel_start__getraw__result(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ExecImpl*>(simcall->result);
}
-static inline void
-simcall_execution_parallel_start__set__result(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> result)
+static inline void simcall_execution_parallel_start__set__result(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> result)
{
simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(simcall->result, result);
}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
-simcall_execution_wait__get__execution(smx_simcall_t simcall)
+static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_execution_wait__get__execution(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]);
}
{
return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->args[0]);
}
-static inline void
-simcall_execution_wait__set__execution(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> arg)
+static inline void simcall_execution_wait__set__execution(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> arg)
{
simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0], arg);
}
{
return simgrid::simix::unmarshal_raw<int>(simcall->result);
}
-static inline void simcall_execution_wait__set__result(smx_simcall_t simcall, int result){
- simgrid::simix::marshal<int>(simcall->result, result);
+static inline void simcall_execution_wait__set__result(smx_simcall_t simcall, int result)
+{
+ simgrid::simix::marshal<int>(simcall->result, result);
}
static inline smx_actor_t simcall_process_on_exit__get__process(smx_simcall_t simcall)
{
simgrid::simix::marshal<void*>(simcall->args[3], arg);
}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
-simcall_comm_iprobe__get__result(smx_simcall_t simcall)
+static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_comm_iprobe__get__result(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result);
}
{
return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->result);
}
-static inline void
-simcall_comm_iprobe__set__result(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> result)
+static inline void simcall_comm_iprobe__set__result(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> result)
{
simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, result);
}
{
simgrid::simix::marshal<int>(simcall->args[10], arg);
}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
-simcall_comm_isend__get__result(smx_simcall_t simcall)
+static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_comm_isend__get__result(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result);
}
{
return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->result);
}
-static inline void simcall_comm_isend__set__result(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> result)
+static inline void simcall_comm_isend__set__result(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> result)
{
simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, result);
}
{
simgrid::simix::marshal<double>(simcall->args[7], arg);
}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
-simcall_comm_irecv__get__result(smx_simcall_t simcall)
+static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_comm_irecv__get__result(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result);
}
{
return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->result);
}
-static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> result)
+static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> result)
{
simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, result);
}
{
return simgrid::simix::unmarshal_raw<int>(simcall->result);
}
-static inline void simcall_comm_waitany__set__result(smx_simcall_t simcall, int result){
- simgrid::simix::marshal<int>(simcall->result, result);
+static inline void simcall_comm_waitany__set__result(smx_simcall_t simcall, int result)
+{
+ simgrid::simix::marshal<int>(simcall->result, result);
}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
-simcall_comm_wait__get__comm(smx_simcall_t simcall)
+static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_comm_wait__get__comm(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]);
}
{
return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->args[0]);
}
-static inline void simcall_comm_wait__set__comm(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> arg)
+static inline void simcall_comm_wait__set__comm(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> arg)
{
simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0], arg);
}
simgrid::simix::marshal<double>(simcall->args[1], arg);
}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
-simcall_comm_test__get__comm(smx_simcall_t simcall)
+static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_comm_test__get__comm(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]);
}
{
return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->args[0]);
}
-static inline void simcall_comm_test__set__comm(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> arg)
+static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> arg)
{
simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0], arg);
}
{
return simgrid::simix::unmarshal_raw<int>(simcall->result);
}
-static inline void simcall_comm_test__set__result(smx_simcall_t simcall, int result){
- simgrid::simix::marshal<int>(simcall->result, result);
+static inline void simcall_comm_test__set__result(smx_simcall_t simcall, int result)
+{
+ simgrid::simix::marshal<int>(simcall->result, result);
}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>*
-simcall_comm_testany__get__comms(smx_simcall_t simcall)
+static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>* simcall_comm_testany__get__comms(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>*>(simcall->args[0]);
}
{
return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl**>(simcall->args[0]);
}
-static inline void simcall_comm_testany__set__comms(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>* arg)
+static inline void simcall_comm_testany__set__comms(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>* arg)
{
simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>*>(simcall->args[0], arg);
}
{
return simgrid::simix::unmarshal_raw<int>(simcall->result);
}
-static inline void simcall_comm_testany__set__result(smx_simcall_t simcall, int result){
- simgrid::simix::marshal<int>(simcall->result, result);
+static inline void simcall_comm_testany__set__result(smx_simcall_t simcall, int result)
+{
+ simgrid::simix::marshal<int>(simcall->result, result);
}
static inline smx_mutex_t simcall_mutex_lock__get__mutex(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal_raw<int>(simcall->result);
}
-static inline void simcall_mutex_trylock__set__result(smx_simcall_t simcall, int result){
- simgrid::simix::marshal<int>(simcall->result, result);
+static inline void simcall_mutex_trylock__set__result(smx_simcall_t simcall, int result)
+{
+ simgrid::simix::marshal<int>(simcall->result, result);
}
static inline smx_mutex_t simcall_mutex_unlock__get__mutex(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal_raw<smx_cond_t>(simcall->result);
}
-static inline void simcall_cond_init__set__result(smx_simcall_t simcall, smx_cond_t result){
- simgrid::simix::marshal<smx_cond_t>(simcall->result, result);
+static inline void simcall_cond_init__set__result(smx_simcall_t simcall, smx_cond_t result)
+{
+ simgrid::simix::marshal<smx_cond_t>(simcall->result, result);
}
static inline smx_cond_t simcall_cond_signal__get__cond(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal_raw<sg_size_t>(simcall->result);
}
-static inline void simcall_file_read__set__result(smx_simcall_t simcall, sg_size_t result){
- simgrid::simix::marshal<sg_size_t>(simcall->result, result);
+static inline void simcall_file_read__set__result(smx_simcall_t simcall, sg_size_t result)
+{
+ simgrid::simix::marshal<sg_size_t>(simcall->result, result);
}
static inline surf_file_t simcall_file_write__get__fd(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal_raw<sg_size_t>(simcall->result);
}
-static inline void simcall_file_write__set__result(smx_simcall_t simcall, sg_size_t result){
- simgrid::simix::marshal<sg_size_t>(simcall->result, result);
+static inline void simcall_file_write__set__result(smx_simcall_t simcall, sg_size_t result)
+{
+ simgrid::simix::marshal<sg_size_t>(simcall->result, result);
}
static inline int simcall_mc_random__get__min(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal_raw<int>(simcall->result);
}
-static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int result){
- simgrid::simix::marshal<int>(simcall->result, result);
+static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int result)
+{
+ simgrid::simix::marshal<int>(simcall->result, result);
}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
-simcall_set_category__get__synchro(smx_simcall_t simcall)
+static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_set_category__get__synchro(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]);
}
{
return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->args[0]);
}
-static inline void simcall_set_category__set__synchro(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> arg)
+static inline void simcall_set_category__set__synchro(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> arg)
{
simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0], arg);
}
XBT_PRIVATE void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_actor_t process);
XBT_PRIVATE void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_actor_t process, double timeout);
XBT_PRIVATE void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration);
-XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
-simcall_HANDLER_execution_start(smx_simcall_t simcall, const char* name, double flops_amount, double priority,
- double bound);
-XBT_PRIVATE void
-simcall_HANDLER_execution_wait(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution);
-XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
-simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type, simix_match_func_t match_fun,
- void* data);
+XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> simcall_HANDLER_execution_start(smx_simcall_t simcall, const char* name, double flops_amount, double priority, double bound);
+XBT_PRIVATE void simcall_HANDLER_execution_wait(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution);
+XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type, simix_match_func_t match_fun, void* data);
XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout);
-XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
-simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate,
- void* src_buff, size_t src_buff_size, simix_match_func_t match_fun,
- simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data,
- int detached);
+XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached);
XBT_PRIVATE void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate);
-XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
-simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff,
- size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun,
- void* data, double rate);
+XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate);
XBT_PRIVATE void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t comms, double timeout);
-XBT_PRIVATE void simcall_HANDLER_comm_wait(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm,
- double timeout);
-XBT_PRIVATE void simcall_HANDLER_comm_test(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm);
-XBT_PRIVATE void simcall_HANDLER_comm_testany(smx_simcall_t simcall,
- boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>* comms,
- size_t count);
+XBT_PRIVATE void simcall_HANDLER_comm_wait(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm, double timeout);
+XBT_PRIVATE void simcall_HANDLER_comm_test(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm);
+XBT_PRIVATE void simcall_HANDLER_comm_testany(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>* comms, size_t count);
XBT_PRIVATE void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex);
XBT_PRIVATE int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex);
XBT_PRIVATE void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex);
* That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
*/
-#include <functional>
-#include "smx_private.h"
+#include "smx_private.hpp"
#include "src/mc/mc_forward.hpp"
#include "xbt/ex.h"
+#include <functional>
#include <simgrid/simix.hpp>
/** @cond */ // Please Doxygen, don't look at this
return simgrid::simix::unmarshal<R>(self->simcall.result);
}
-inline static void simcall_BODY_process_killall(int reset_pid) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_process_killall(&SIMIX_process_self()->simcall, reset_pid);
- return simcall<void, int>(SIMCALL_PROCESS_KILLALL, reset_pid);
- }
+inline static void simcall_BODY_process_killall(int reset_pid)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_process_killall(&SIMIX_process_self()->simcall, reset_pid);
+ return simcall<void, int>(SIMCALL_PROCESS_KILLALL, reset_pid);
+}
-inline static void simcall_BODY_process_cleanup(smx_actor_t process) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_process_cleanup(process);
- return simcall<void, smx_actor_t>(SIMCALL_PROCESS_CLEANUP, process);
- }
+inline static void simcall_BODY_process_cleanup(smx_actor_t process)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ SIMIX_process_cleanup(process);
+ return simcall<void, smx_actor_t>(SIMCALL_PROCESS_CLEANUP, process);
+}
-inline static void simcall_BODY_process_suspend(smx_actor_t process) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_process_suspend(&SIMIX_process_self()->simcall, process);
- return simcall<void, smx_actor_t>(SIMCALL_PROCESS_SUSPEND, process);
- }
+inline static void simcall_BODY_process_suspend(smx_actor_t process)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_process_suspend(&SIMIX_process_self()->simcall, process);
+ return simcall<void, smx_actor_t>(SIMCALL_PROCESS_SUSPEND, process);
+}
-inline static int simcall_BODY_process_join(smx_actor_t process, double timeout) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_process_join(&SIMIX_process_self()->simcall, process, timeout);
- return simcall<int, smx_actor_t, double>(SIMCALL_PROCESS_JOIN, process, timeout);
- }
+inline static int simcall_BODY_process_join(smx_actor_t process, double timeout)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_process_join(&SIMIX_process_self()->simcall, process, timeout);
+ return simcall<int, smx_actor_t, double>(SIMCALL_PROCESS_JOIN, process, timeout);
+}
-inline static int simcall_BODY_process_sleep(double duration) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_process_sleep(&SIMIX_process_self()->simcall, duration);
- return simcall<int, double>(SIMCALL_PROCESS_SLEEP, duration);
- }
+inline static int simcall_BODY_process_sleep(double duration)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_process_sleep(&SIMIX_process_self()->simcall, duration);
+ return simcall<int, double>(SIMCALL_PROCESS_SLEEP, duration);
+}
- inline static boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
- simcall_BODY_execution_start(const char* name, double flops_amount, double priority, double bound)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_execution_start(&SIMIX_process_self()->simcall, name, flops_amount, priority, bound);
- return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>, const char*, double, double, double>(
- SIMCALL_EXECUTION_START, name, flops_amount, priority, bound);
- }
+inline static boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> simcall_BODY_execution_start(const char* name, double flops_amount, double priority, double bound)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_execution_start(&SIMIX_process_self()->simcall, name, flops_amount, priority, bound);
+ return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>, const char*, double, double, double>(SIMCALL_EXECUTION_START, name, flops_amount, priority, bound);
+}
- inline static boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
- simcall_BODY_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount,
- double* bytes_amount, double rate, double timeout)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0)
- SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout);
- return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>, const char*, int, sg_host_t*, double*,
- double*, double, double>(SIMCALL_EXECUTION_PARALLEL_START, name, host_nb, host_list, flops_amount,
- bytes_amount, rate, timeout);
- }
+inline static boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl> simcall_BODY_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double rate, double timeout)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout);
+ return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>, const char*, int, sg_host_t*, double*, double*, double, double>(SIMCALL_EXECUTION_PARALLEL_START, name, host_nb, host_list, flops_amount, bytes_amount, rate, timeout);
+}
- inline static int simcall_BODY_execution_wait(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_execution_wait(&SIMIX_process_self()->simcall, execution);
- return simcall<int, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(SIMCALL_EXECUTION_WAIT,
- execution);
- }
+inline static int simcall_BODY_execution_wait(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_execution_wait(&SIMIX_process_self()->simcall, execution);
+ return simcall<int, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(SIMCALL_EXECUTION_WAIT, execution);
+}
-inline static void simcall_BODY_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void* data) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_process_on_exit(process, fun, data);
- return simcall<void, smx_actor_t, int_f_pvoid_pvoid_t, void*>(SIMCALL_PROCESS_ON_EXIT, process, fun, data);
- }
+inline static void simcall_BODY_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void* data)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ SIMIX_process_on_exit(process, fun, data);
+ return simcall<void, smx_actor_t, int_f_pvoid_pvoid_t, void*>(SIMCALL_PROCESS_ON_EXIT, process, fun, data);
+}
- inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
- simcall_BODY_comm_iprobe(smx_mailbox_t mbox, int type, simix_match_func_t match_fun, void* data)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0)
- simcall_HANDLER_comm_iprobe(&SIMIX_process_self()->simcall, mbox, type, match_fun, data);
- return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_mailbox_t, int,
- simix_match_func_t, void*>(SIMCALL_COMM_IPROBE, mbox, type, match_fun, data);
- }
+inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_BODY_comm_iprobe(smx_mailbox_t mbox, int type, simix_match_func_t match_fun, void* data)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_comm_iprobe(&SIMIX_process_self()->simcall, mbox, type, match_fun, data);
+ return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_mailbox_t, int, simix_match_func_t, void*>(SIMCALL_COMM_IPROBE, mbox, type, match_fun, data);
+}
-inline static void simcall_BODY_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_send(&SIMIX_process_self()->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
- return simcall<void, smx_actor_t, smx_mailbox_t, double, double, void*, size_t, simix_match_func_t, simix_copy_data_func_t, void*, double>(SIMCALL_COMM_SEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
- }
+inline static void simcall_BODY_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_comm_send(&SIMIX_process_self()->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
+ return simcall<void, smx_actor_t, smx_mailbox_t, double, double, void*, size_t, simix_match_func_t, simix_copy_data_func_t, void*, double>(SIMCALL_COMM_SEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
+}
- inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
- simcall_BODY_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff,
- size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun,
- simix_copy_data_func_t copy_data_fun, void* data, int detached)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_isend(&SIMIX_process_self()->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
- return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_actor_t, smx_mailbox_t, double,
- double, void*, size_t, simix_match_func_t, simix_clean_func_t, simix_copy_data_func_t, void*, int>(
- SIMCALL_COMM_ISEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun,
- data, detached);
- }
+inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_BODY_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_comm_isend(&SIMIX_process_self()->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
+ return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_actor_t, smx_mailbox_t, double, double, void*, size_t, simix_match_func_t, simix_clean_func_t, simix_copy_data_func_t, void*, int>(SIMCALL_COMM_ISEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
+}
-inline static void simcall_BODY_comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_recv(&SIMIX_process_self()->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
- return simcall<void, smx_actor_t, smx_mailbox_t, void*, size_t*, simix_match_func_t, simix_copy_data_func_t, void*, double, double>(SIMCALL_COMM_RECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
- }
+inline static void simcall_BODY_comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_comm_recv(&SIMIX_process_self()->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
+ return simcall<void, smx_actor_t, smx_mailbox_t, void*, size_t*, simix_match_func_t, simix_copy_data_func_t, void*, double, double>(SIMCALL_COMM_RECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
+}
- inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
- simcall_BODY_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size,
- simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_irecv(&SIMIX_process_self()->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
- return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_actor_t, smx_mailbox_t, void*,
- size_t*, simix_match_func_t, simix_copy_data_func_t, void*, double>(
- SIMCALL_COMM_IRECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
- }
+inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_BODY_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_comm_irecv(&SIMIX_process_self()->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
+ return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_actor_t, smx_mailbox_t, void*, size_t*, simix_match_func_t, simix_copy_data_func_t, void*, double>(SIMCALL_COMM_IRECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
+}
-inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms, double timeout) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_waitany(&SIMIX_process_self()->simcall, comms, timeout);
- return simcall<int, xbt_dynar_t, double>(SIMCALL_COMM_WAITANY, comms, timeout);
- }
+inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms, double timeout)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_comm_waitany(&SIMIX_process_self()->simcall, comms, timeout);
+ return simcall<int, xbt_dynar_t, double>(SIMCALL_COMM_WAITANY, comms, timeout);
+}
- inline static void simcall_BODY_comm_wait(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm,
- double timeout)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_wait(&SIMIX_process_self()->simcall, comm, timeout);
- return simcall<void, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, double>(SIMCALL_COMM_WAIT, comm,
- timeout);
- }
+inline static void simcall_BODY_comm_wait(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm, double timeout)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_comm_wait(&SIMIX_process_self()->simcall, comm, timeout);
+ return simcall<void, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, double>(SIMCALL_COMM_WAIT, comm, timeout);
+}
- inline static int simcall_BODY_comm_test(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_test(&SIMIX_process_self()->simcall, comm);
- return simcall<int, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(SIMCALL_COMM_TEST, comm);
- }
+inline static int simcall_BODY_comm_test(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_comm_test(&SIMIX_process_self()->simcall, comm);
+ return simcall<int, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(SIMCALL_COMM_TEST, comm);
+}
- inline static int simcall_BODY_comm_testany(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>* comms,
- size_t count)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_testany(&SIMIX_process_self()->simcall, comms, count);
- return simcall<int, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>*, size_t>(SIMCALL_COMM_TESTANY,
- comms, count);
- }
+inline static int simcall_BODY_comm_testany(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>* comms, size_t count)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_comm_testany(&SIMIX_process_self()->simcall, comms, count);
+ return simcall<int, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>*, size_t>(SIMCALL_COMM_TESTANY, comms, count);
+}
-inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_mutex_lock(&SIMIX_process_self()->simcall, mutex);
- return simcall<void, smx_mutex_t>(SIMCALL_MUTEX_LOCK, mutex);
- }
+inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_mutex_lock(&SIMIX_process_self()->simcall, mutex);
+ return simcall<void, smx_mutex_t>(SIMCALL_MUTEX_LOCK, mutex);
+}
-inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_mutex_trylock(&SIMIX_process_self()->simcall, mutex);
- return simcall<int, smx_mutex_t>(SIMCALL_MUTEX_TRYLOCK, mutex);
- }
+inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_mutex_trylock(&SIMIX_process_self()->simcall, mutex);
+ return simcall<int, smx_mutex_t>(SIMCALL_MUTEX_TRYLOCK, mutex);
+}
-inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_mutex_unlock(&SIMIX_process_self()->simcall, mutex);
- return simcall<void, smx_mutex_t>(SIMCALL_MUTEX_UNLOCK, mutex);
- }
+inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_mutex_unlock(&SIMIX_process_self()->simcall, mutex);
+ return simcall<void, smx_mutex_t>(SIMCALL_MUTEX_UNLOCK, mutex);
+}
-inline static smx_cond_t simcall_BODY_cond_init() {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_cond_init();
- return simcall<smx_cond_t>(SIMCALL_COND_INIT);
- }
+inline static smx_cond_t simcall_BODY_cond_init()
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ SIMIX_cond_init();
+ return simcall<smx_cond_t>(SIMCALL_COND_INIT);
+}
-inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_cond_signal(cond);
- return simcall<void, smx_cond_t>(SIMCALL_COND_SIGNAL, cond);
- }
+inline static void simcall_BODY_cond_signal(smx_cond_t cond)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ SIMIX_cond_signal(cond);
+ return simcall<void, smx_cond_t>(SIMCALL_COND_SIGNAL, cond);
+}
-inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_cond_wait(&SIMIX_process_self()->simcall, cond, mutex);
- return simcall<void, smx_cond_t, smx_mutex_t>(SIMCALL_COND_WAIT, cond, mutex);
- }
+inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_cond_wait(&SIMIX_process_self()->simcall, cond, mutex);
+ return simcall<void, smx_cond_t, smx_mutex_t>(SIMCALL_COND_WAIT, cond, mutex);
+}
-inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_cond_wait_timeout(&SIMIX_process_self()->simcall, cond, mutex, timeout);
- return simcall<void, smx_cond_t, smx_mutex_t, double>(SIMCALL_COND_WAIT_TIMEOUT, cond, mutex, timeout);
- }
+inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_cond_wait_timeout(&SIMIX_process_self()->simcall, cond, mutex, timeout);
+ return simcall<void, smx_cond_t, smx_mutex_t, double>(SIMCALL_COND_WAIT_TIMEOUT, cond, mutex, timeout);
+}
-inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_cond_broadcast(cond);
- return simcall<void, smx_cond_t>(SIMCALL_COND_BROADCAST, cond);
- }
+inline static void simcall_BODY_cond_broadcast(smx_cond_t cond)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ SIMIX_cond_broadcast(cond);
+ return simcall<void, smx_cond_t>(SIMCALL_COND_BROADCAST, cond);
+}
-inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_sem_acquire(&SIMIX_process_self()->simcall, sem);
- return simcall<void, smx_sem_t>(SIMCALL_SEM_ACQUIRE, sem);
- }
+inline static void simcall_BODY_sem_acquire(smx_sem_t sem)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_sem_acquire(&SIMIX_process_self()->simcall, sem);
+ return simcall<void, smx_sem_t>(SIMCALL_SEM_ACQUIRE, sem);
+}
-inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_sem_acquire_timeout(&SIMIX_process_self()->simcall, sem, timeout);
- return simcall<void, smx_sem_t, double>(SIMCALL_SEM_ACQUIRE_TIMEOUT, sem, timeout);
- }
+inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_sem_acquire_timeout(&SIMIX_process_self()->simcall, sem, timeout);
+ return simcall<void, smx_sem_t, double>(SIMCALL_SEM_ACQUIRE_TIMEOUT, sem, timeout);
+}
- inline static sg_size_t simcall_BODY_file_read(surf_file_t fd, sg_size_t size)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0)
- simcall_HANDLER_file_read(&SIMIX_process_self()->simcall, fd, size);
- return simcall<sg_size_t, surf_file_t, sg_size_t>(SIMCALL_FILE_READ, fd, size);
- }
+inline static sg_size_t simcall_BODY_file_read(surf_file_t fd, sg_size_t size)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_file_read(&SIMIX_process_self()->simcall, fd, size);
+ return simcall<sg_size_t, surf_file_t, sg_size_t>(SIMCALL_FILE_READ, fd, size);
+}
- inline static sg_size_t simcall_BODY_file_write(surf_file_t fd, sg_size_t size)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0)
- simcall_HANDLER_file_write(&SIMIX_process_self()->simcall, fd, size);
- return simcall<sg_size_t, surf_file_t, sg_size_t>(SIMCALL_FILE_WRITE, fd, size);
- }
+inline static sg_size_t simcall_BODY_file_write(surf_file_t fd, sg_size_t size)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_file_write(&SIMIX_process_self()->simcall, fd, size);
+ return simcall<sg_size_t, surf_file_t, sg_size_t>(SIMCALL_FILE_WRITE, fd, size);
+}
-inline static int simcall_BODY_mc_random(int min, int max) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_mc_random(&SIMIX_process_self()->simcall, min, max);
- return simcall<int, int, int>(SIMCALL_MC_RANDOM, min, max);
- }
+inline static int simcall_BODY_mc_random(int min, int max)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ simcall_HANDLER_mc_random(&SIMIX_process_self()->simcall, min, max);
+ return simcall<int, int, int>(SIMCALL_MC_RANDOM, min, max);
+}
- inline static void simcall_BODY_set_category(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> synchro,
- const char* category)
- {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_set_category(synchro, category);
- return simcall<void, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, const char*>(
- SIMCALL_SET_CATEGORY, synchro, category);
- }
+inline static void simcall_BODY_set_category(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> synchro, const char* category)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ SIMIX_set_category(synchro, category);
+ return simcall<void, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, const char*>(SIMCALL_SET_CATEGORY, synchro, category);
+}
-inline static void simcall_BODY_run_kernel(std::function<void()> const* code) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_run_kernel(code);
- return simcall<void, std::function<void()> const*>(SIMCALL_RUN_KERNEL, code);
- }
+inline static void simcall_BODY_run_kernel(std::function<void()> const* code)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ SIMIX_run_kernel(code);
+ return simcall<void, std::function<void()> const*>(SIMCALL_RUN_KERNEL, code);
+}
-inline static void simcall_BODY_run_blocking(std::function<void()> const* code) {
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_run_blocking(code);
- return simcall<void, std::function<void()> const*>(SIMCALL_RUN_BLOCKING, code);
- }/** @endcond */
+inline static void simcall_BODY_run_blocking(std::function<void()> const* code)
+{
+ if (0) /* Go to that function to follow the code flow through the simcall barrier */
+ SIMIX_run_blocking(code);
+ return simcall<void, std::function<void()> const*>(SIMCALL_RUN_BLOCKING, code);
+} /** @endcond */
* That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
*/
+#include "smx_private.hpp"
#include <xbt/base.h>
-#include "smx_private.h"
#if SIMGRID_HAVE_MC
#include "src/mc/mc_forward.hpp"
#endif
return;
switch (simcall->call) {
case SIMCALL_PROCESS_KILLALL:
- simcall_HANDLER_process_killall(simcall, simgrid::simix::unmarshal<int>(simcall->args[0]));
- SIMIX_simcall_answer(simcall);
- break;
+ simcall_HANDLER_process_killall(simcall, simgrid::simix::unmarshal<int>(simcall->args[0]));
+ SIMIX_simcall_answer(simcall);
+ break;
case SIMCALL_PROCESS_CLEANUP:
- SIMIX_process_cleanup(simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
- SIMIX_simcall_answer(simcall);
- break;
+ SIMIX_process_cleanup(simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
+ SIMIX_simcall_answer(simcall);
+ break;
case SIMCALL_PROCESS_SUSPEND:
- simcall_HANDLER_process_suspend(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
- break;
+ simcall_HANDLER_process_suspend(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
+ break;
case SIMCALL_PROCESS_JOIN:
- simcall_HANDLER_process_join(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
- break;
+ simcall_HANDLER_process_join(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
+ break;
case SIMCALL_PROCESS_SLEEP:
- simcall_HANDLER_process_sleep(simcall, simgrid::simix::unmarshal<double>(simcall->args[0]));
- break;
+ simcall_HANDLER_process_sleep(simcall, simgrid::simix::unmarshal<double>(simcall->args[0]));
+ break;
case SIMCALL_EXECUTION_START:
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(
- simcall->result,
- simcall_HANDLER_execution_start(simcall, simgrid::simix::unmarshal<const char*>(simcall->args[0]),
- simgrid::simix::unmarshal<double>(simcall->args[1]),
- simgrid::simix::unmarshal<double>(simcall->args[2]),
- simgrid::simix::unmarshal<double>(simcall->args[3])));
+ simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(simcall->result, simcall_HANDLER_execution_start(simcall, simgrid::simix::unmarshal<const char*>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]), simgrid::simix::unmarshal<double>(simcall->args[3])));
SIMIX_simcall_answer(simcall);
break;
case SIMCALL_EXECUTION_PARALLEL_START:
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(
- simcall->result,
- SIMIX_execution_parallel_start(
- simgrid::simix::unmarshal<const char*>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1]),
- simgrid::simix::unmarshal<sg_host_t*>(simcall->args[2]), simgrid::simix::unmarshal<double*>(simcall->args[3]),
- simgrid::simix::unmarshal<double*>(simcall->args[4]), simgrid::simix::unmarshal<double>(simcall->args[5]),
- simgrid::simix::unmarshal<double>(simcall->args[6])));
+ simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>>(simcall->result, SIMIX_execution_parallel_start(simgrid::simix::unmarshal<const char*>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1]), simgrid::simix::unmarshal<sg_host_t*>(simcall->args[2]), simgrid::simix::unmarshal<double*>(simcall->args[3]), simgrid::simix::unmarshal<double*>(simcall->args[4]), simgrid::simix::unmarshal<double>(simcall->args[5]), simgrid::simix::unmarshal<double>(simcall->args[6])));
SIMIX_simcall_answer(simcall);
break;
case SIMCALL_EXECUTION_WAIT:
- simcall_HANDLER_execution_wait(
- simcall,
- simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]));
+ simcall_HANDLER_execution_wait(simcall, simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]));
break;
case SIMCALL_PROCESS_ON_EXIT:
- SIMIX_process_on_exit(simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<int_f_pvoid_pvoid_t>(simcall->args[1]), simgrid::simix::unmarshal<void*>(simcall->args[2]));
- SIMIX_simcall_answer(simcall);
- break;
+ SIMIX_process_on_exit(simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<int_f_pvoid_pvoid_t>(simcall->args[1]), simgrid::simix::unmarshal<void*>(simcall->args[2]));
+ SIMIX_simcall_answer(simcall);
+ break;
case SIMCALL_COMM_IPROBE:
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(
- simcall->result, simcall_HANDLER_comm_iprobe(simcall, simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[0]),
- simgrid::simix::unmarshal<int>(simcall->args[1]),
- simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[2]),
- simgrid::simix::unmarshal<void*>(simcall->args[3])));
+ simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, simcall_HANDLER_comm_iprobe(simcall, simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[2]), simgrid::simix::unmarshal<void*>(simcall->args[3])));
SIMIX_simcall_answer(simcall);
break;
case SIMCALL_COMM_SEND:
- simcall_HANDLER_comm_send(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]), simgrid::simix::unmarshal<double>(simcall->args[3]), simgrid::simix::unmarshal<void*>(simcall->args[4]), simgrid::simix::unmarshal<size_t>(simcall->args[5]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[6]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[7]), simgrid::simix::unmarshal<void*>(simcall->args[8]), simgrid::simix::unmarshal<double>(simcall->args[9]));
- break;
+ simcall_HANDLER_comm_send(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]), simgrid::simix::unmarshal<double>(simcall->args[3]), simgrid::simix::unmarshal<void*>(simcall->args[4]), simgrid::simix::unmarshal<size_t>(simcall->args[5]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[6]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[7]), simgrid::simix::unmarshal<void*>(simcall->args[8]), simgrid::simix::unmarshal<double>(simcall->args[9]));
+ break;
case SIMCALL_COMM_ISEND:
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(
- simcall->result,
- simcall_HANDLER_comm_isend(
- simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]),
- simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]),
- simgrid::simix::unmarshal<double>(simcall->args[2]), simgrid::simix::unmarshal<double>(simcall->args[3]),
- simgrid::simix::unmarshal<void*>(simcall->args[4]), simgrid::simix::unmarshal<size_t>(simcall->args[5]),
- simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[6]),
- simgrid::simix::unmarshal<simix_clean_func_t>(simcall->args[7]),
- simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[8]),
- simgrid::simix::unmarshal<void*>(simcall->args[9]), simgrid::simix::unmarshal<int>(simcall->args[10])));
+ simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, simcall_HANDLER_comm_isend(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]), simgrid::simix::unmarshal<double>(simcall->args[3]), simgrid::simix::unmarshal<void*>(simcall->args[4]), simgrid::simix::unmarshal<size_t>(simcall->args[5]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[6]), simgrid::simix::unmarshal<simix_clean_func_t>(simcall->args[7]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[8]), simgrid::simix::unmarshal<void*>(simcall->args[9]), simgrid::simix::unmarshal<int>(simcall->args[10])));
SIMIX_simcall_answer(simcall);
break;
case SIMCALL_COMM_RECV:
- simcall_HANDLER_comm_recv(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<void*>(simcall->args[2]), simgrid::simix::unmarshal<size_t*>(simcall->args[3]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[5]), simgrid::simix::unmarshal<void*>(simcall->args[6]), simgrid::simix::unmarshal<double>(simcall->args[7]), simgrid::simix::unmarshal<double>(simcall->args[8]));
- break;
+ simcall_HANDLER_comm_recv(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<void*>(simcall->args[2]), simgrid::simix::unmarshal<size_t*>(simcall->args[3]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[5]), simgrid::simix::unmarshal<void*>(simcall->args[6]), simgrid::simix::unmarshal<double>(simcall->args[7]), simgrid::simix::unmarshal<double>(simcall->args[8]));
+ break;
case SIMCALL_COMM_IRECV:
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(
- simcall->result, simcall_HANDLER_comm_irecv(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]),
- simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]),
- simgrid::simix::unmarshal<void*>(simcall->args[2]),
- simgrid::simix::unmarshal<size_t*>(simcall->args[3]),
- simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]),
- simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[5]),
- simgrid::simix::unmarshal<void*>(simcall->args[6]),
- simgrid::simix::unmarshal<double>(simcall->args[7])));
+ simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, simcall_HANDLER_comm_irecv(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<void*>(simcall->args[2]), simgrid::simix::unmarshal<size_t*>(simcall->args[3]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[5]), simgrid::simix::unmarshal<void*>(simcall->args[6]), simgrid::simix::unmarshal<double>(simcall->args[7])));
SIMIX_simcall_answer(simcall);
break;
case SIMCALL_COMM_WAITANY:
- simcall_HANDLER_comm_waitany(simcall, simgrid::simix::unmarshal<xbt_dynar_t>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
- break;
+ simcall_HANDLER_comm_waitany(simcall, simgrid::simix::unmarshal<xbt_dynar_t>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
+ break;
case SIMCALL_COMM_WAIT:
- simcall_HANDLER_comm_wait(
- simcall,
- simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]),
- simgrid::simix::unmarshal<double>(simcall->args[1]));
+ simcall_HANDLER_comm_wait(simcall, simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
break;
case SIMCALL_COMM_TEST:
- simcall_HANDLER_comm_test(
- simcall,
- simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]));
+ simcall_HANDLER_comm_test(simcall, simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]));
break;
case SIMCALL_COMM_TESTANY:
- simcall_HANDLER_comm_testany(
- simcall,
- simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>*>(simcall->args[0]),
- simgrid::simix::unmarshal<size_t>(simcall->args[1]));
+ simcall_HANDLER_comm_testany(simcall, simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>*>(simcall->args[0]), simgrid::simix::unmarshal<size_t>(simcall->args[1]));
break;
case SIMCALL_MUTEX_LOCK:
- simcall_HANDLER_mutex_lock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0]));
- break;
+ simcall_HANDLER_mutex_lock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0]));
+ break;
case SIMCALL_MUTEX_TRYLOCK:
- simgrid::simix::marshal<int>(simcall->result, simcall_HANDLER_mutex_trylock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0])));
- SIMIX_simcall_answer(simcall);
- break;
+ simgrid::simix::marshal<int>(simcall->result, simcall_HANDLER_mutex_trylock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0])));
+ SIMIX_simcall_answer(simcall);
+ break;
case SIMCALL_MUTEX_UNLOCK:
- simcall_HANDLER_mutex_unlock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0]));
- SIMIX_simcall_answer(simcall);
- break;
+ simcall_HANDLER_mutex_unlock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0]));
+ SIMIX_simcall_answer(simcall);
+ break;
case SIMCALL_COND_INIT:
- simgrid::simix::marshal<smx_cond_t>(simcall->result, SIMIX_cond_init());
- SIMIX_simcall_answer(simcall);
- break;
+ simgrid::simix::marshal<smx_cond_t>(simcall->result, SIMIX_cond_init());
+ SIMIX_simcall_answer(simcall);
+ break;
case SIMCALL_COND_SIGNAL:
- SIMIX_cond_signal(simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]));
- SIMIX_simcall_answer(simcall);
- break;
+ SIMIX_cond_signal(simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]));
+ SIMIX_simcall_answer(simcall);
+ break;
case SIMCALL_COND_WAIT:
- simcall_HANDLER_cond_wait(simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[1]));
- break;
+ simcall_HANDLER_cond_wait(simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[1]));
+ break;
case SIMCALL_COND_WAIT_TIMEOUT:
- simcall_HANDLER_cond_wait_timeout(simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]));
- break;
+ simcall_HANDLER_cond_wait_timeout(simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]));
+ break;
case SIMCALL_COND_BROADCAST:
- SIMIX_cond_broadcast(simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]));
- SIMIX_simcall_answer(simcall);
- break;
+ SIMIX_cond_broadcast(simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]));
+ SIMIX_simcall_answer(simcall);
+ break;
case SIMCALL_SEM_ACQUIRE:
- simcall_HANDLER_sem_acquire(simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall->args[0]));
- break;
+ simcall_HANDLER_sem_acquire(simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall->args[0]));
+ break;
case SIMCALL_SEM_ACQUIRE_TIMEOUT:
- simcall_HANDLER_sem_acquire_timeout(simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
- break;
+ simcall_HANDLER_sem_acquire_timeout(simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
+ break;
case SIMCALL_FILE_READ:
- simcall_HANDLER_file_read(simcall, simgrid::simix::unmarshal<surf_file_t>(simcall->args[0]),
- simgrid::simix::unmarshal<sg_size_t>(simcall->args[1]));
+ simcall_HANDLER_file_read(simcall, simgrid::simix::unmarshal<surf_file_t>(simcall->args[0]), simgrid::simix::unmarshal<sg_size_t>(simcall->args[1]));
break;
case SIMCALL_FILE_WRITE:
- simcall_HANDLER_file_write(simcall, simgrid::simix::unmarshal<surf_file_t>(simcall->args[0]),
- simgrid::simix::unmarshal<sg_size_t>(simcall->args[1]));
+ simcall_HANDLER_file_write(simcall, simgrid::simix::unmarshal<surf_file_t>(simcall->args[0]), simgrid::simix::unmarshal<sg_size_t>(simcall->args[1]));
break;
case SIMCALL_MC_RANDOM:
- simgrid::simix::marshal<int>(simcall->result, simcall_HANDLER_mc_random(simcall, simgrid::simix::unmarshal<int>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1])));
- SIMIX_simcall_answer(simcall);
- break;
+ simgrid::simix::marshal<int>(simcall->result, simcall_HANDLER_mc_random(simcall, simgrid::simix::unmarshal<int>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1])));
+ SIMIX_simcall_answer(simcall);
+ break;
case SIMCALL_SET_CATEGORY:
- SIMIX_set_category(
- simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]),
- simgrid::simix::unmarshal<const char*>(simcall->args[1]));
+ SIMIX_set_category(simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]), simgrid::simix::unmarshal<const char*>(simcall->args[1]));
SIMIX_simcall_answer(simcall);
break;
case SIMCALL_RUN_KERNEL:
- SIMIX_run_kernel(simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]));
- SIMIX_simcall_answer(simcall);
- break;
+ SIMIX_run_kernel(simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]));
+ SIMIX_simcall_answer(simcall);
+ break;
case SIMCALL_RUN_BLOCKING:
- SIMIX_run_blocking(simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]));
- break;
+ SIMIX_run_blocking(simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]));
+ break;
case NUM_SIMCALLS:
break;
case SIMCALL_NONE:
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SG_POPPING_PRIVATE_H
-#define SG_POPPING_PRIVATE_H
+#ifndef SG_POPPING_PRIVATE_HPP
+#define SG_POPPING_PRIVATE_HPP
-#include <xbt/base.h>
#include <simgrid/simix.h>
+#include <xbt/base.h>
#include <src/kernel/activity/ActivityImpl.hpp>
#include <src/kernel/activity/CommImpl.hpp>
#include <boost/intrusive_ptr.hpp>
-SG_BEGIN_DECL()
+extern "C" {
/********************************* Simcalls *********************************/
XBT_PUBLIC_DATA(const char*) simcall_names[]; /* Name of each simcall */
typedef int (*simix_match_func_t)(void*, void*, simgrid::kernel::activity::CommImpl*);
typedef void (*simix_copy_data_func_t)(smx_activity_t, void*, size_t);
-typedef void (*simix_clean_func_t)(void *);
+typedef void (*simix_clean_func_t)(void*);
typedef void (*FPtr)(void); // Hide the ugliness
/* Pack all possible scalar types in an union */
union u_smx_scalar {
- char c;
- short s;
- int i;
- long l;
- long long ll;
- unsigned char uc;
- unsigned short us;
- unsigned int ui;
- unsigned long ul;
+ char c;
+ short s;
+ int i;
+ long l;
+ long long ll;
+ unsigned char uc;
+ unsigned short us;
+ unsigned int ui;
+ unsigned long ul;
unsigned long long ull;
- double d;
- void* dp;
- FPtr fp;
+ double d;
+ void* dp;
+ FPtr fp;
};
/**
smx_actor_t issuer;
smx_timer_t timer;
int mc_value;
- union u_smx_scalar args[11];
- union u_smx_scalar result;
+ u_smx_scalar args[11];
+ u_smx_scalar result;
};
#define SIMCALL_SET_MC_VALUE(simcall, value) ((simcall)->mc_value = (value))
XBT_PRIVATE void SIMIX_simcall_answer(smx_simcall_t simcall);
XBT_PRIVATE void SIMIX_simcall_handle(smx_simcall_t simcall, int value);
XBT_PRIVATE void SIMIX_simcall_exit(smx_activity_t synchro);
-XBT_PRIVATE const char *SIMIX_simcall_name(e_smx_simcall_t kind);
+XBT_PRIVATE const char* SIMIX_simcall_name(e_smx_simcall_t kind);
XBT_PRIVATE void SIMIX_run_kernel(std::function<void()> const* code);
XBT_PRIVATE void SIMIX_run_blocking(std::function<void()> const* code);
-
-SG_END_DECL()
-
-#ifdef __cplusplus
+}
/* Defines the marshal/unmarshal functions for each type of parameters.
*
- * They will be used in popping_accessors.h to define the functions allowing
+ * They will be used in popping_accessors.hpp to define the functions allowing
* to retrieve/set each parameter of each simcall.
*
* There is a unmarshal_raw() function, which is exactly similar to unmarshal()
namespace simgrid {
namespace simix {
-template<class T>
-class type {
- constexpr bool operator==(type) const { return true; }
- template<class U>
- constexpr bool operator==(type<U>) const { return false; }
- constexpr bool operator!=(type) const { return false; }
- template<class U>
- constexpr bool operator!=(type<U>) const { return true; }
+template <class T> class type {
+ constexpr bool operator==(type) const { return true; }
+ template <class U> constexpr bool operator==(type<U>) const { return false; }
+ constexpr bool operator!=(type) const { return false; }
+ template <class U> constexpr bool operator!=(type<U>) const { return true; }
};
-template<typename T> struct marshal_t {};
+template <typename T> struct marshal_t {
+};
#define SIMIX_MARSHAL(T, field) \
inline void marshal(type<T>, u_smx_scalar& simcall, T value) { simcall.field = value; } \
inline T unmarshal(type<T>, u_smx_scalar const& simcall) { return simcall.field; } \
/* Nothing to do for void data */
}
-template<class T> inline
-void marshal(type<T*>, u_smx_scalar& simcall, T* value)
+template <class T> inline void marshal(type<T*>, u_smx_scalar& simcall, T* value)
{
- simcall.dp = (void*) value;
+ simcall.dp = (void*)value;
}
-template<class T> inline
-T* unmarshal(type<T*>, u_smx_scalar const& simcall)
+template <class T> inline T* unmarshal(type<T*>, u_smx_scalar const& simcall)
{
return static_cast<T*>(simcall.dp);
}
return static_cast<T*>(simcall.dp);
}
-template<class R, class... T> inline
-void marshal(type<R(*)(T...)>, u_smx_scalar& simcall, R(*value)(T...))
+template <class R, class... T> inline void marshal(type<R (*)(T...)>, u_smx_scalar& simcall, R (*value)(T...))
{
- simcall.fp = (FPtr) value;
+ simcall.fp = (FPtr)value;
}
-template<class R, class... T> inline
-auto unmarshal(type<R(*)(T...)>, u_smx_scalar simcall) -> R(*)(T...)
+template <class R, class... T> inline auto unmarshal(type<R (*)(T...)>, u_smx_scalar simcall) -> R (*)(T...)
{
- return (R(*)(T...)) simcall.fp;
+ return (R(*)(T...))simcall.fp;
}
template <class R, class... T> inline auto unmarshal_raw(type<R (*)(T...)>, u_smx_scalar simcall) -> R (*)(T...)
{
return (R(*)(T...))simcall.fp;
}
-template<class T> inline
-void marshal(u_smx_scalar& simcall, T const& value)
+template <class T> inline void marshal(u_smx_scalar& simcall, T const& value)
{
return marshal(type<T>(), simcall, value);
}
-template<class T> inline
-typename std::remove_reference<T>::type unmarshal(u_smx_scalar& simcall)
+template <class T> inline typename std::remove_reference<T>::type unmarshal(u_smx_scalar& simcall)
{
return unmarshal(type<T>(), simcall);
}
return unmarshal(type<T>(), simcall);
}
-template<std::size_t I>
-inline void marshalArgs(smx_simcall_t simcall) {}
+template <std::size_t I> inline void marshalArgs(smx_simcall_t simcall)
+{
+ /* Nothing to do when no args */
+}
-template<std::size_t I, class A>
-inline void marshalArgs(smx_simcall_t simcall, A const& a)
+template <std::size_t I, class A> inline void marshalArgs(smx_simcall_t simcall, A const& a)
{
marshal(simcall->args[I], a);
}
-template<std::size_t I, class A, class... B>
-inline void marshalArgs(smx_simcall_t simcall, A const& a, B const&... b)
+template <std::size_t I, class A, class... B> inline void marshalArgs(smx_simcall_t simcall, A const& a, B const&... b)
{
marshal(simcall->args[I], a);
- marshalArgs<I+1>(simcall, b...);
+ marshalArgs<I + 1>(simcall, b...);
}
/** Initialize the simcall */
-template<class... A> inline
-void marshal(smx_simcall_t simcall, e_smx_simcall_t call, A const&... a)
+template <class... A> inline void marshal(smx_simcall_t simcall, e_smx_simcall_t call, A const&... a)
{
simcall->call = call;
memset(&simcall->result, 0, sizeof(simcall->result));
memset(simcall->args, 0, sizeof(simcall->args));
marshalArgs<0>(simcall, a...);
}
-
}
}
-#endif
-
-#include "popping_accessors.h"
+#include "popping_accessors.hpp"
#endif
if self.name not in self.simcalls_BODY:
print ('# ERROR: No function calling simcall_BODY_%s' % self.name)
print ('# Add something like this to libsmx.c:')
- print ('%s simcall_%s(%s) {' % (self.res.rettype(), self.name, ', '.
+ print ('%s simcall_%s(%s)' % (self.res.rettype(), self.name, ', '.
join('%s %s' % (arg.rettype(), arg.name) for arg in self.args)))
+ print ('{')
print (' return simcall_BODY_%s(%s);' % (self.name, "..."))
print ('}')
return False
if self.name not in self.simcalls_PRE:
print ('# ERROR: No function called simcall_HANDLER_%s' % self.name)
print ('# Add something like this to the relevant C file (like smx_io.c if it\'s an IO call):')
- print ('%s simcall_HANDLER_%s(smx_simcall_t simcall%s) {' % (self.res.rettype(), self.name, ''.
+ print ('%s simcall_HANDLER_%s(smx_simcall_t simcall%s)' % (self.res.rettype(), self.name, ''.
join(', %s %s' % (arg.rettype(), arg.name)for arg in self.args)))
+ print ('{')
print (' // Your code handling the simcall')
print ('}')
return False
res.append('static inline void simcall_%s__set__%s(smx_simcall_t simcall, %s arg)' % (
self.name, arg.name, arg.rettype()))
res.append('{')
- res.append(' simgrid::simix::marshal<%s>(simcall->args[%i], arg);' % (arg.rettype(), i))
+ res.append(' simgrid::simix::marshal<%s>(simcall->args[%i], arg);' % (arg.rettype(), i))
res.append('}')
# Return value getter/setters
res.append(
'static inline %s simcall_%s__get__result(smx_simcall_t simcall)' % (self.res.rettype(), self.name))
res.append('{')
-
- res.append(' return simgrid::simix::unmarshal<%s>(simcall->result);' % self.res.rettype())
+ res.append(' return simgrid::simix::unmarshal<%s>(simcall->result);' % self.res.rettype())
res.append('}')
- res.append(
- 'static inline %s simcall_%s__getraw__result(smx_simcall_t simcall){' % (rawtype, self.name))
- res.append(' return simgrid::simix::unmarshal_raw<%s>(simcall->result);' % rawtype)
+ res.append('static inline %s simcall_%s__getraw__result(smx_simcall_t simcall)' % (rawtype, self.name))
+ res.append('{')
+ res.append(' return simgrid::simix::unmarshal_raw<%s>(simcall->result);' % rawtype)
res.append('}')
res.append(
- 'static inline void simcall_%s__set__result(smx_simcall_t simcall, %s result){' % (self.name, self.res.rettype()))
- res.append(' simgrid::simix::marshal<%s>(simcall->result, result);' % (self.res.rettype()))
+ 'static inline void simcall_%s__set__result(smx_simcall_t simcall, %s result)' % (self.name, self.res.rettype()))
+ res.append('{')
+ res.append(' simgrid::simix::marshal<%s>(simcall->result, result);' % (self.res.rettype()))
res.append('}')
return '\n'.join(res)
else:
call = "SIMIX_%s(%s)" % (self.name, ', '.join(args))
if self.call_kind == 'Func':
- res.append(" simgrid::simix::marshal<%s>(simcall->result, %s);" % (self.res.rettype(), call))
+ res.append(" simgrid::simix::marshal<%s>(simcall->result, %s);" % (self.res.rettype(), call))
else:
- res.append(" " + call + ";");
+ res.append(" " + call + ";");
if self.call_kind != 'Blck':
- res.append(' SIMIX_simcall_answer(simcall);')
- res.append(' break;')
+ res.append(' SIMIX_simcall_answer(simcall);')
+ res.append(' break;')
res.append('')
return '\n'.join(res)
def body(self):
res = ['']
res.append(
- 'inline static %s simcall_BODY_%s(%s) {' % (self.res.rettype(),
+ 'inline static %s simcall_BODY_%s(%s)' % (self.res.rettype(),
self.name,
', '.join('%s %s' % (arg.rettype(), arg.name) for arg in self.args)))
- res.append(
- ' /* Go to that function to follow the code flow through the simcall barrier */')
+ res.append('{')
+ res.append(' if (0) /* Go to that function to follow the code flow through the simcall barrier */')
if self.need_handler:
- res.append(' if (0) simcall_HANDLER_%s(%s);' % (self.name,
- ', '.join(["&SIMIX_process_self()->simcall"] + [arg.name for arg in self.args])))
+ res.append(' simcall_HANDLER_%s(%s);' % (self.name,
+ ', '.join(["&SIMIX_process_self()->simcall"] + [arg.name for arg in self.args])))
else:
- res.append(' if (0) SIMIX_%s(%s);' % (self.name,
+ res.append(' SIMIX_%s(%s);' % (self.name,
', '.join(arg.name for arg in self.args)))
- res.append(' return simcall<%s%s>(SIMCALL_%s%s);' % (
+ res.append(' return simcall<%s%s>(SIMCALL_%s%s);' % (
self.res.rettype(),
"".join([ ", " + arg.rettype() for i, arg in enumerate(self.args) ]),
self.name.upper(),
"".join([ ", " + arg.name for i, arg in enumerate(self.args) ])
));
- res.append(' }')
+ res.append('}')
return '\n'.join(res)
def handler_prototype(self):
# sys.exit(1)
#
- # smx_popping_accessors.c
+ # popping_accessors.hpp
#
- fd = header('popping_accessors.h')
- fd.write('#include "src/simix/popping_private.h"');
+ fd = header('popping_accessors.hpp')
+ fd.write('#include "src/simix/popping_private.hpp"');
handle(fd, Simcall.accessors, simcalls, simcalls_dict)
fd.write(
"\n\n/* The prototype of all simcall handlers, automatically generated for you */\n\n")
fd.close()
#
- # smx_popping_enum.c
+ # popping_enum.h
#
fd = header("popping_enum.h")
fd.write('/**\n')
fd.close()
#
- # smx_popping_generated.cpp
+ # popping_generated.cpp
#
fd = header("popping_generated.cpp")
+ fd.write('#include "smx_private.hpp"\n')
fd.write('#include <xbt/base.h>\n')
- fd.write('#include "smx_private.h"\n')
fd.write('#if SIMGRID_HAVE_MC\n')
fd.write('#include "src/mc/mc_forward.hpp"\n')
fd.write('#endif\n')
fd.write('/** @private\n')
fd.write(
' * @brief (in kernel mode) unpack the simcall and activate the handler\n')
- fd.write(' * \n')
+ fd.write(' *\n')
fd.write(' * This function is generated from src/simix/simcalls.in\n')
fd.write(' */\n')
fd.write(
fd.close()
#
- # smx_popping_bodies.cpp
+ # popping_bodies.cpp
#
fd = header('popping_bodies.cpp')
- fd.write('#include <functional>\n')
- fd.write('#include "smx_private.h"\n')
+ fd.write('#include "smx_private.hpp"\n')
fd.write('#include "src/mc/mc_forward.hpp"\n')
fd.write('#include "xbt/ex.h"\n')
+ fd.write('#include <functional>\n')
fd.write('#include <simgrid/simix.hpp>\n')
fd.write("/** @cond */ // Please Doxygen, don't look at this\n")
fd.write('''
}
''')
handle(fd, Simcall.body, simcalls, simcalls_dict)
- fd.write("/** @endcond */\n");
+ fd.write(" /** @endcond */\n");
fd.close()
#include <xbt/range.hpp>
#include <xbt/sysdep.h>
+#include "simgrid/modelchecker.h"
+#include "simgrid/sg_config.h"
+#include "smx_private.hpp"
#include "src/internal_config.h"
#include "xbt/log.h"
#include "xbt/swag.h"
#include "xbt/xbt_os_thread.h"
-#include "smx_private.h"
-#include "simgrid/sg_config.h"
-#include "src/internal_config.h"
-#include "simgrid/modelchecker.h"
-
#ifdef _WIN32
#include <windows.h>
#include <vector>
#include "simgrid/s4u/Host.hpp"
-#include "smx_private.h"
+#include "smx_private.hpp"
#include "src/surf/xml/platf_private.hpp" // FIXME: KILLME. There must be a better way than mimicking XML here
#include <xbt/ex.hpp>
-/* Copyright (c) 2007-2015. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "smx_private.h"
-#include <xbt/ex.hpp>
-#include "xbt/sysdep.h"
+#include "smx_private.hpp"
+#include "xbt/config.h"
#include "xbt/log.h"
+#include "xbt/sysdep.h"
#include "xbt/xbt_os_time.h"
-#include "xbt/config.h"
+#include <xbt/ex.hpp>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_environment, simix, "Logging specific to SIMIX (environment)");
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Host.hpp"
+#include "smx_private.hpp"
#include "src/surf/surf_interface.hpp"
#include "src/surf/xml/platf.hpp"
-#include "smx_private.h"
-#include "xbt/ex.h" /* ex_backtrace_display */
+#include "xbt/ex.h" /* ex_backtrace_display */
#include "mc/mc.h"
#include "simgrid/sg_config.h"
#include "src/kernel/activity/SynchroRaw.hpp"
#if SIMGRID_HAVE_MC
-#include "src/mc/mc_private.h"
+#include "src/mc/mc_private.hpp"
#include "src/mc/remote/Client.hpp"
#include "src/mc/remote/mc_protocol.h"
#endif
-#include "src/mc/mc_record.h"
+#include "src/mc/mc_record.hpp"
#if HAVE_SMPI
-#include "src/smpi/include/private.h"
#include "src/smpi/include/private.hpp"
#endif
static xbt_heap_t simix_timers = nullptr;
/** @brief Timer datatype */
-typedef class s_smx_timer {
+class s_smx_timer_t {
double date = 0.0;
- s_smx_timer() = default;
+ s_smx_timer_t() = default;
public:
simgrid::xbt::Task<void()> callback;
double getDate() { return date; }
- s_smx_timer(double date, simgrid::xbt::Task<void()> callback) : date(date), callback(std::move(callback)) {}
-} s_smx_timer_t;
+ s_smx_timer_t(double date, simgrid::xbt::Task<void()> callback) : date(date), callback(std::move(callback)) {}
+};
void (*SMPI_switch_data_segment)(int) = nullptr;
});
simgrid::surf::storageCreatedCallbacks.connect([](simgrid::surf::StorageImpl* storage) {
- sg_storage_t s = simgrid::s4u::Storage::byName(storage->cname());
- xbt_assert(s != nullptr, "Storage not found for name %s", storage->cname());
+ sg_storage_t s = simgrid::s4u::Storage::byName(storage->getCname());
+ xbt_assert(s != nullptr, "Storage not found for name %s", storage->getCname());
});
}
if (smx_cleaned)
return; // to avoid double cleaning by java and C
+ smx_cleaned = 1;
+ XBT_DEBUG("SIMIX_clean called. Simulation's over.");
+ if (not simix_global->process_to_run.empty() && SIMIX_get_clock() <= 0.0) {
+ XBT_CRITICAL(" ");
+ XBT_CRITICAL("The time is still 0, and you still have processes ready to run.");
+ XBT_CRITICAL("It seems that you forgot to run the simulation that you setup.");
+ xbt_die("Bailing out to avoid that stop-before-start madness. Please fix your code.");
+ }
+
#if HAVE_SMPI
if (SIMIX_process_count()>0){
if(smpi_process()->initialized()){
}
#endif
- smx_cleaned = 1;
- XBT_DEBUG("SIMIX_clean called. Simulation's over.");
- if (not simix_global->process_to_run.empty() && SIMIX_get_clock() <= 0.0) {
- XBT_CRITICAL(" ");
- XBT_CRITICAL("The time is still 0, and you still have processes ready to run.");
- XBT_CRITICAL("It seems that you forgot to run the simulation that you setup.");
- xbt_die("Bailing out to avoid that stop-before-start madness. Please fix your code.");
- }
/* Kill all processes (but maestro) */
SIMIX_process_killall(simix_global->maestro_process, 1);
SIMIX_context_runall();
/* If only daemon processes remain, cancel their actions, mark them to die and reschedule them */
if (simix_global->process_list.size() == simix_global->daemons.size())
for (auto const& dmon : simix_global->daemons) {
- XBT_DEBUG("Kill %s", dmon->cname());
+ XBT_DEBUG("Kill %s", dmon->getCname());
SIMIX_process_kill(dmon, simix_global->maestro_process);
}
}
synchro_description = "I/O";
XBT_INFO("Process %lu (%s@%s): waiting for %s synchro %p (%s) in state %d to finish", process->pid,
- process->cname(), process->host->getCname(), synchro_description, process->waiting_synchro.get(),
+ process->getCname(), process->host->getCname(), synchro_description, process->waiting_synchro.get(),
process->waiting_synchro->name.c_str(), (int)process->waiting_synchro->state);
}
else {
- XBT_INFO("Process %lu (%s@%s)", process->pid, process->cname(), process->host->getCname());
+ XBT_INFO("Process %lu (%s@%s)", process->pid, process->getCname(), process->host->getCname());
}
}
}
-/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "mc/mc.h"
-#include "smx_private.h"
+#include "smx_private.hpp"
#include "src/kernel/activity/CommImpl.hpp"
#include "src/mc/mc_replay.h"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/surf/surf_interface.hpp"
#include "xbt/ex.hpp"
+#include <algorithm>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_host, simix, "SIMIX hosts");
smx_actor_t process = nullptr;
xbt_swag_foreach(process, host->process_list) {
SIMIX_process_kill(process, issuer);
- XBT_DEBUG("Killing %s@%s on behalf of %s which turned off that host.", process->cname(),
- process->host->getCname(), issuer->cname());
+ XBT_DEBUG("Killing %s@%s on behalf of %s which turned off that host.", process->getCname(),
+ process->host->getCname(), issuer->getCname());
}
}
} else {
simgrid::kernel::activity::ExecImplPtr exec =
simgrid::kernel::activity::ExecImplPtr(new simgrid::kernel::activity::ExecImpl(name, nullptr));
- /* set surf's synchro */
- sg_host_t *host_list_cpy = xbt_new0(sg_host_t, host_nb);
- for (int i = 0; i < host_nb; i++)
- host_list_cpy[i] = host_list[i];
-
/* Check that we are not mixing VMs and PMs in the parallel task */
bool is_a_vm = (nullptr != dynamic_cast<simgrid::s4u::VirtualMachine*>(host_list[0]));
for (int i = 1; i < host_nb; i++) {
/* set surf's synchro */
if (not MC_is_active() && not MC_record_replay_is_active()) {
+ /* set surf's synchro */
+ sg_host_t* host_list_cpy = new sg_host_t[host_nb];
+ std::copy_n(host_list, host_nb, host_list_cpy);
exec->surf_exec = surf_host_model->executeParallelTask(host_nb, host_list_cpy, flops_amount, bytes_amount, rate);
exec->surf_exec->setData(exec.get());
if (timeout > 0) {
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMIX_HOST_PRIVATE_H
-#define SIMIX_HOST_PRIVATE_H
+#ifndef SIMIX_HOST_PRIVATE_HPP
+#define SIMIX_HOST_PRIVATE_HPP
#include <functional>
#include <map>
#include <vector>
-#include <xbt/base.h>
#include <xbt/Extendable.hpp>
+#include <xbt/base.h>
+#include "popping_private.hpp"
#include "simgrid/simix.h"
-#include "popping_private.h"
#include "src/kernel/activity/ExecImpl.hpp"
/** @brief Host datatype from SIMIX POV */
namespace simgrid {
- namespace simix {
- class ProcessArg;
+namespace simix {
+class ProcessArg;
- class Host {
- public:
- static simgrid::xbt::Extension<simgrid::s4u::Host, Host> EXTENSION_ID;
+class Host {
+public:
+ static simgrid::xbt::Extension<simgrid::s4u::Host, Host> EXTENSION_ID;
- explicit Host();
- virtual ~Host();
+ explicit Host();
+ virtual ~Host();
- xbt_swag_t process_list;
- std::vector<ProcessArg*> auto_restart_processes;
- std::vector<ProcessArg*> boot_processes;
+ xbt_swag_t process_list;
+ std::vector<ProcessArg*> auto_restart_processes;
+ std::vector<ProcessArg*> boot_processes;
- void turnOn();
- };
- }
+ void turnOn();
+};
+}
}
-SG_BEGIN_DECL()
+extern "C" {
XBT_PRIVATE void SIMIX_host_add_auto_restart_process(sg_host_t host, const char* name, std::function<void()> code,
void* data, double kill_time,
std::map<std::string, std::string>* properties, int auto_restart);
XBT_PRIVATE void SIMIX_execution_finish(simgrid::kernel::activity::ExecImplPtr exec);
-XBT_PRIVATE void SIMIX_set_category(smx_activity_t synchro, const char *category);
-
-SG_END_DECL()
+XBT_PRIVATE void SIMIX_set_category(smx_activity_t synchro, const char* category);
+}
XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
SIMIX_execution_start(smx_actor_t issuer, const char* name, double flops_amount, double priority, double bound);
double* bytes_amount, double rate, double timeout);
#endif
-
#include "src/surf/StorageImpl.hpp"
#include "surf/surf.h"
+#include "smx_private.hpp"
#include "src/surf/surf_interface.hpp"
-#include "smx_private.h"
#include "src/kernel/activity/SynchroIo.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMIX_IO_PRIVATE_H
-#define SIMIX_IO_PRIVATE_H
+#ifndef SIMIX_IO_PRIVATE_HPP
+#define SIMIX_IO_PRIVATE_HPP
#include <xbt/base.h>
+#include "popping_private.hpp"
#include "simgrid/simix.h"
-#include "popping_private.h"
XBT_PRIVATE smx_activity_t SIMIX_file_read(surf_file_t fd, sg_size_t size);
XBT_PRIVATE smx_activity_t SIMIX_file_write(surf_file_t fd, sg_size_t size);
#include "simgrid/s4u/Activity.hpp"
#include "simgrid/s4u/Mailbox.hpp"
#include "src/mc/mc_replay.h"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/surf_interface.hpp"
if (comm->src_proc->isSuspended())
XBT_DEBUG("The communication is suspended on startup because src (%s@%s) was suspended since it initiated the "
"communication",
- comm->src_proc->cname(), comm->src_proc->host->getCname());
+ comm->src_proc->getCname(), comm->src_proc->host->getCname());
else
XBT_DEBUG("The communication is suspended on startup because dst (%s@%s) was suspended since it initiated the "
"communication",
- comm->dst_proc->cname(), comm->dst_proc->host->getCname());
+ comm->dst_proc->getCname(), comm->dst_proc->host->getCname());
comm->surf_comm->suspend();
}
XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) "
"detached:%d",
synchro.get(), comm->src_proc ? comm->src_proc->host->getCname() : nullptr,
- comm->dst_proc ? comm->dst_proc->host->getCname() : nullptr, simcall->issuer->cname(),
+ comm->dst_proc ? comm->dst_proc->host->getCname() : nullptr, simcall->issuer->getCname(),
simcall->issuer, comm->detached);
if (comm->src_proc == simcall->issuer) {
XBT_DEBUG("I'm source");
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMIX_NETWORK_PRIVATE_H
-#define SIMIX_NETWORK_PRIVATE_H
+#ifndef SIMIX_NETWORK_PRIVATE_HPP
+#define SIMIX_NETWORK_PRIVATE_HPP
#include "simgrid/s4u/Mailbox.hpp"
#include "src/kernel/activity/MailboxImpl.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SIMIX_PRIVATE_H
-#define SIMIX_PRIVATE_H
+#ifndef SIMIX_PRIVATE_HPP
+#define SIMIX_PRIVATE_HPP
#include "simgrid/s4u/Actor.hpp"
#include "src/kernel/context/Context.hpp"
-#include <signal.h>
+#include <csignal>
#include <map>
#include <vector>
xbt_dynar_t actors_vector = xbt_dynar_new(sizeof(smx_actor_t), nullptr);
#endif
xbt_swag_t process_to_destroy = nullptr;
- smx_actor_t maestro_process = nullptr;
+ smx_actor_t maestro_process = nullptr;
// Maps function names to actor code:
std::unordered_map<std::string, simgrid::simix::ActorCodeFactory> registered_functions;
void_pfn_smxprocess_t kill_process_function = nullptr;
/** Callback used when killing a SMX_process */
void_pfn_smxprocess_t cleanup_process_function = nullptr;
- xbt_os_mutex_t mutex = nullptr;
+ xbt_os_mutex_t mutex = nullptr;
std::vector<simgrid::xbt::Task<void()>> tasks;
std::vector<simgrid::xbt::Task<void()>> tasksTemp;
std::vector<simgrid::simix::ActorImpl*> daemons;
};
-
}
}
-SG_BEGIN_DECL()
+extern "C" {
XBT_PUBLIC_DATA(std::unique_ptr<simgrid::simix::Global>) simix_global;
/******************************** Exceptions *********************************/
/** @brief Ask to the provided simix process to raise the provided exception */
-#define SMX_EXCEPTION(issuer, cat, val, msg) \
- if (1) { \
- smx_actor_t _smx_throw_issuer = (issuer); /* evaluate only once */ \
- xbt_ex e(XBT_THROW_POINT, msg); \
- e.category = cat; \
- e.value = val; \
- _smx_throw_issuer->exception = std::make_exception_ptr(e); \
- } else ((void)0)
-
-SG_END_DECL()
+#define SMX_EXCEPTION(issuer, cat, val, msg) \
+ if (1) { \
+ smx_actor_t _smx_throw_issuer = (issuer); /* evaluate only once */ \
+ xbt_ex e(XBT_THROW_POINT, msg); \
+ e.category = cat; \
+ e.value = val; \
+ _smx_throw_issuer->exception = std::make_exception_ptr(e); \
+ } else \
+ ((void)0)
+}
#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "smx_private.h"
+#include "smx_private.hpp"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/surf_interface.hpp"
#include <xbt/ex.hpp>
/* If the mutex is not owned by the issuer, that's not good */
if (issuer != this->owner)
THROWF(mismatch_error, 0, "Cannot release that mutex: it was locked by %s (pid:%lu), not by you.",
- this->owner->cname(), this->owner->pid);
+ this->owner->getCname(), this->owner->pid);
if (xbt_swag_size(this->sleeping) > 0) {
/*process to wake up */
{
XBT_IN("()");
simgrid::simix::ActorImpl p;
- smx_cond_t cond = new s_smx_cond();
+ smx_cond_t cond = new s_smx_cond_t();
cond->sleeping = xbt_swag_new(xbt_swag_offset(p, synchro_hookup));
cond->refcount_ = 1;
XBT_OUT();
XBT_IN("(%u)",value);
simgrid::simix::ActorImpl p;
- smx_sem_t sem = xbt_new0(s_smx_sem_t, 1);
+ smx_sem_t sem = new s_smx_sem_t;
sem->sleeping = xbt_swag_new(xbt_swag_offset(p, synchro_hookup));
sem->value = value;
XBT_OUT();
xbt_assert(xbt_swag_size(sem->sleeping) == 0,
"Cannot destroy semaphore since someone is still using it");
xbt_swag_free(sem->sleeping);
- xbt_free(sem);
+ delete sem;
}
XBT_OUT();
}
}
}
-typedef struct s_smx_cond {
- s_smx_cond() : cond_(this) {}
+struct s_smx_cond_t {
+ s_smx_cond_t() : cond_(this) {}
std::atomic_int_fast32_t refcount_{1};
smx_mutex_t mutex = nullptr;
xbt_swag_t sleeping = nullptr; /* list of sleeping process */
simgrid::s4u::ConditionVariable cond_;
-} s_smx_cond_t;
+};
-typedef struct s_smx_sem {
+struct s_smx_sem_t {
unsigned int value;
xbt_swag_t sleeping; /* list of sleeping process */
-} s_smx_sem_t;
+};
XBT_PRIVATE void SIMIX_post_synchro(smx_activity_t synchro);
XBT_PRIVATE void SIMIX_synchro_stop_waiting(smx_actor_t process, smx_simcall_t simcall);
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "smpi_comm.hpp"
#include "smpi_datatype.hpp"
#include "smpi_op.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
+#include "smpi_coll.hpp"
#include "smpi_comm.hpp"
#include "smpi_datatype.hpp"
#include "smpi_op.hpp"
-#include "smpi_coll.hpp"
extern "C" { // This should really use the C linkage to be usable from Fortran
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "smpi_comm.hpp"
#include "smpi_info.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "smpi_comm.hpp"
#include "smpi_datatype.hpp"
#include "smpi_request.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "smpi_comm.hpp"
#include "smpi_datatype.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license ,(GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "simgrid/sg_config.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi, "Logging specific to SMPI ,(mpi)");
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Host.hpp"
#include "smpi_comm.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
-#include "smpi_comm.hpp"
+#include "private.hpp"
#include "smpi_coll.hpp"
+#include "smpi_comm.hpp"
#include "smpi_datatype_derived.hpp"
#include "smpi_op.hpp"
#include "smpi_process.hpp"
#include <climits>
-#include "private.h"
+#include "private.hpp"
#include "smpi_comm.hpp"
#include "smpi_process.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
-#include "smpi_comm.hpp"
+#include "private.hpp"
#include "smpi_coll.hpp"
+#include "smpi_comm.hpp"
#include "smpi_datatype_derived.hpp"
#include "smpi_op.hpp"
#include "smpi_process.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "smpi_info.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "smpi_op.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "smpi_comm.hpp"
#include "smpi_datatype.hpp"
-#include "smpi_request.hpp"
#include "smpi_process.hpp"
+#include "smpi_request.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
smpi_bench_end();
//save requests information for tracing
- typedef struct {
+ struct savedvalstype {
int src;
int dst;
int recv;
int tag;
MPI_Comm comm;
- } savedvalstype;
+ };
savedvalstype* savedvals = xbt_new0(savedvalstype, count);
for (int i = 0; i < count; i++) {
{
smpi_bench_end();
//save information from requests
- typedef struct {
+ struct savedvalstype {
int src;
int dst;
int recv;
int tag;
int valid;
MPI_Comm comm;
- } savedvalstype;
+ };
savedvalstype* savedvals=xbt_new0(savedvalstype, count);
for (int i = 0; i < count; i++) {
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "smpi_comm.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "smpi_datatype_derived.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
-#include "smpi_comm.hpp"
+#include "private.hpp"
#include "smpi_coll.hpp"
+#include "smpi_comm.hpp"
#include "smpi_datatype_derived.hpp"
#include "smpi_op.hpp"
#include "smpi_process.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
- #include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
* [5] [5] [5] [5] [5] [5]
*/
- #include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#include "smpi_status.hpp"
namespace simgrid{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
/* Short or medium size message and power-of-two no. of processes. Use
* recursive doubling algorithm */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#include "smpi_status.hpp"
namespace simgrid{
* See COPYRIGHT in top-level directory.
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: allgather_mpich_ring
* Additional copyrights may follow
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*
* ompi_coll_tuned_allgatherv_intra_bruck
*
{
int sendto, recvfrom, blockcount, i;
unsigned int distance;
- int *new_rcounts = NULL, *new_rdispls = NULL;
- int *new_scounts = NULL, *new_sdispls = NULL;
ptrdiff_t slb, rlb, sext, rext;
char *tmpsend = NULL, *tmprecv = NULL;
MPI_Datatype new_rdtype = MPI_DATATYPE_NULL, new_sdtype = MPI_DATATYPE_NULL;
- blockcount doubles until the last step when only the remaining data is
exchanged.
*/
- new_rcounts = (int*) calloc(4*size, sizeof(int));
- new_rdispls = new_rcounts + size;
- new_scounts = new_rdispls + size;
- new_sdispls = new_scounts + size;
+ int* new_rcounts = new int[4 * size];
+ int* new_rdispls = new_rcounts + size;
+ int* new_scounts = new_rdispls + size;
+ int* new_sdispls = new_scounts + size;
for (distance = 1; distance < size; distance<<=1) {
}
- free(new_rcounts);
+ delete[] new_rcounts;
return MPI_SUCCESS;
* [5] [5] [5] [5] [5] [5]
*/
- #include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/* IMPLEMENTED BY PITCH PATARASUK
Non-topoloty-specific all-reduce operation designed bandwidth optimally
*
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
int Coll_allreduce_mvapich2_rs::allreduce(void *sendbuf,
* See COPYRIGHT in top-level directory.
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#define MPIR_Allreduce_pt2pt_rd_MV2 Coll_allreduce_rdb::allreduce
#define MPIR_Allreduce_pt2pt_rs_MV2 Coll_allreduce_mvapich2_rs::allreduce
EARLY_BLOCK_COUNT = EARLY_BLOCK_COUNT + 1; \
} \
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
int Coll_allreduce_rab_rdb::allreduce(void *sbuff, void *rbuff, int count,
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
//#include <star-reduction.c>
namespace simgrid{
namespace smpi{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
//#include <star-reduction.c>
namespace simgrid{
MPI_User_function * uop = MPIR_Op_table[op % 16 - 1];
#else
MPI_User_function *uop;
- struct MPIR_OP *op_ptr;
+ MPIR_OP *op_ptr;
op_ptr = MPIR_ToPointer(op);
uop = op_ptr->op;
#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
//#include <star-reduction.c>
namespace simgrid{
namespace smpi{
MPI_User_function * uop = MPIR_Op_table[op % 16 - 1];
#else
MPI_User_function *uop;
- struct MPIR_OP *op_ptr;
+ MPIR_OP *op_ptr;
op_ptr = MPIR_ToPointer(op);
uop = op_ptr->op;
#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
int Coll_allreduce_redbcast::allreduce(void *buf, void *buf2, int count,
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/* IMPLEMENTED BY PITCH PATARASUK
Non-topoloty-specific (however, number of cores/node need to be changed)
all-reduce operation designed for smp clusters
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/* IMPLEMENTED BY PITCH PATARASUK
Non-topoloty-specific (however, number of cores/node need to be changed)
all-reduce operation designed for smp clusters
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/* IMPLEMENTED BY PITCH PATARASUK
Non-topoloty-specific (however, number of cores/node need to be changed)
all-reduce operation designed for smp clusters
MPI_User_function * uop = MPIR_Op_table[op % 16 - 1];
#else
MPI_User_function *uop;
- struct MPIR_OP *op_ptr;
+ MPIR_OP *op_ptr;
op_ptr = MPIR_ToPointer(op);
uop = op_ptr->op;
#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
//#include <star-reduction.c>
/*
MPI_User_function * uop = MPIR_Op_table[op % 16 - 1];
#else
MPI_User_function *uop;
- struct MPIR_OP *op_ptr;
+ MPIR_OP *op_ptr;
op_ptr = MPIR_ToPointer(op);
uop = op_ptr->op;
#endif
/*
* implemented by Pitch Patarasuk, 07/01/2007
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
//#include <star-reduction.c>
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*
This fucntion performs all-reduce operation as follow.
MPI_User_function * uop = MPIR_Op_table[op % 16 - 1];
#else
MPI_User_function *uop;
- struct MPIR_OP *op_ptr;
+ MPIR_OP *op_ptr;
op_ptr = MPIR_ToPointer(op);
uop = op_ptr->op;
#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#include <cmath>
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#include <cmath>
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
- #include "../colls_private.h"
+#include "../colls_private.hpp"
/*Naive and simple basic alltoall implementation. */
****************************************************************************/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
//correct on stampede
#define MV2_ALLTOALL_THROTTLE_FACTOR 4
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
int Coll_alltoall_mvapich2_scatter_dest::alltoall(
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_pair_light_barrier
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_pair_mpi_barrier
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_pair
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#include "smpi_win.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#include "smpi_status.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_ring_light_barrier
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_ring_mpi_barrier
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_ring
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_ring
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/**
* Alltoall Bruck
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*
* Linear functions are copied from the basic coll module. For
* some small number of nodes and/or small data sizes they are just as
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_pair_light_barrier
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_pair_mpi_barrier
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_pair
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_ring_light_barrier
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_ring_mpi_barrier
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_ring
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
* Function: alltoall_ring
*
*/
-#include "../colls_private.h"
-#include "../coll_tuned_topo.h"
+#include "../coll_tuned_topo.hpp"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
int Coll_barrier_mvapich2_pair::barrier(MPI_Comm comm)
* Additional copyrights may follow
*/
-#include "../colls_private.h"
-#include "../coll_tuned_topo.h"
-
+#include "../coll_tuned_topo.hpp"
+#include "../colls_private.hpp"
/*
* Barrier is ment to be a synchronous operation, as some BTLs can mark
else {
MPI_Request* requests;
- requests = (MPI_Request*)malloc( size * sizeof(MPI_Request) );
+ requests = new MPI_Request[size];
for (i = 1; i < size; ++i) {
requests[i] = Request::irecv(NULL, 0, MPI_BYTE, MPI_ANY_SOURCE,
COLL_TAG_BARRIER, comm
);
}
Request::waitall( size-1, requests+1, MPI_STATUSES_IGNORE );
- free( requests );
+ delete[] requests;
}
/* All done */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
int bcast_NTSB_segment_size_in_byte = 8192;
namespace simgrid{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
static int bcast_NTSL_segment_size_in_byte = 8192;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
static int bcast_NTSL_segment_size_in_byte = 8192;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
-
+#include "../colls_private.hpp"
int bcast_SMP_binary_segment_byte = 8192;
namespace simgrid{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
int Coll_bcast_SMP_binomial::bcast(void *buf, int count,
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
int bcast_SMP_linear_segment_byte = 8192;
namespace simgrid{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
int bcast_arrival_pattern_aware_wait_segment_size_in_byte = 8192;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
static int bcast_NTSL_segment_size_in_byte = 8192;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#ifndef BCAST_ARRIVAL_PATTERN_AWARE_HEADER_SIZE
#define BCAST_ARRIVAL_PATTERN_AWARE_HEADER_SIZE 128
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
int flattree_segment_in_byte = 8192;
namespace simgrid{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
int
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
extern int (*MV2_Bcast_function) (void *buffer, int count, MPI_Datatype datatype,
int root, MPI_Comm comm_ptr);
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
- #include "../colls_private.h"
- #include "../coll_tuned_topo.h"
+#include "../coll_tuned_topo.hpp"
+#include "../colls_private.hpp"
#define MAXTREEFANOUT 32
tmpbuf = (char *) buffer;
if( tree->tree_nextsize != 0 ) {
- send_reqs = xbt_new(MPI_Request, tree->tree_nextsize );
+ send_reqs = new MPI_Request[tree->tree_nextsize];
}
/* Root code */
Request::wait( &recv_reqs[req_index], MPI_STATUS_IGNORE );
}
- if( NULL != send_reqs ) free(send_reqs);
- xbt_free(tree);
+ delete[] send_reqs;
+ ompi_coll_tuned_topo_destroy_tree(&tree);
return (MPI_SUCCESS);
}
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
- #include "../colls_private.h"
- #include "../coll_tuned_topo.h"
- #define MAXTREEFANOUT 32
+#include "../coll_tuned_topo.hpp"
+#include "../colls_private.hpp"
+#define MAXTREEFANOUT 32
namespace simgrid{
namespace smpi{
comm, MPI_STATUS_IGNORE);
}
}
- xbt_free(tree);
+ ompi_coll_tuned_topo_destroy_tree(&tree);
return (MPI_SUCCESS);
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#include "smpi_status.hpp"
/*****************************************************************************
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#include "smpi_status.hpp"
namespace simgrid{
* Additional copyrights may follow
*/
-#include "colls_private.h"
-#include "coll_tuned_topo.h"
+#include "coll_tuned_topo.hpp"
+#include "colls_private.hpp"
/*
* Some static helpers.
*/
size = comm->size();
rank = comm->rank();
- tree = (ompi_coll_tree_t*)malloc(sizeof(ompi_coll_tree_t));
+ tree = new ompi_coll_tree_t;
if (not tree) {
XBT_DEBUG("coll:tuned:topo_build_tree PANIC::out of memory");
return NULL;
size = comm->size();
rank = comm->rank();
- tree = (ompi_coll_tree_t*)malloc(sizeof(ompi_coll_tree_t));
+ tree = new ompi_coll_tree_t;
if (not tree) {
XBT_DEBUG("coll:tuned:topo_build_tree PANIC::out of memory");
return NULL;
ptr = *tree;
- free (ptr);
+ delete ptr;
*tree = NULL; /* mark tree as gone */
return MPI_SUCCESS;
index = rank -root;
- bmtree = (ompi_coll_tree_t*)malloc(sizeof(ompi_coll_tree_t));
+ bmtree = new ompi_coll_tree_t;
if (not bmtree) {
XBT_DEBUG("coll:tuned:topo:build_bmtree PANIC out of memory");
return NULL;
vrank = (rank - root + size) % size;
- bmtree = (ompi_coll_tree_t*)xbt_malloc(sizeof(ompi_coll_tree_t));
+ bmtree = new ompi_coll_tree_t;
if (not bmtree) {
XBT_DEBUG("coll:tuned:topo:build_bmtree PANIC out of memory");
return NULL;
/*
* Allocate space for topology arrays if needed
*/
- chain = (ompi_coll_tree_t*)malloc( sizeof(ompi_coll_tree_t) );
+ chain = new ompi_coll_tree_t;
if (not chain) {
XBT_DEBUG("coll:tuned:topo:build_chain PANIC out of memory");
fflush(stdout);
+++ /dev/null
-/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-/*
- * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
- * University Research and Technology
- * Corporation. All rights reserved.
- * Copyright (c) 2004-2005 The University of Tennessee and The University
- * of Tennessee Research Foundation. All rights
- * reserved.
- * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
- * University of Stuttgart. All rights reserved.
- * Copyright (c) 2004-2005 The Regents of the University of California.
- * All rights reserved.
- *
- * Additional copyrights may follow
- */
-
-#ifndef MCA_COLL_TUNED_TOPO_H_HAS_BEEN_INCLUDED
-#define MCA_COLL_TUNED_TOPO_H_HAS_BEEN_INCLUDED
-
-#include "colls_private.h"
-
-#define MAXTREEFANOUT 32
-
-#define COLL_TUNED_COMPUTED_SEGCOUNT(SEGSIZE, TYPELNG, SEGCOUNT) \
- if( ((SEGSIZE) >= (TYPELNG)) && \
- ((SEGSIZE) < ((TYPELNG) * (SEGCOUNT))) ) { \
- size_t residual; \
- (SEGCOUNT) = (int)((SEGSIZE) / (TYPELNG)); \
- residual = (SEGSIZE) - (SEGCOUNT) * (TYPELNG); \
- if( residual > ((TYPELNG) >> 1) ) \
- (SEGCOUNT)++; \
- } \
-
-
- typedef struct ompi_coll_tree_t {
- int32_t tree_root;
- int32_t tree_fanout;
- int32_t tree_bmtree;
- int32_t tree_prev;
- int32_t tree_next[MAXTREEFANOUT];
- int32_t tree_nextsize;
- } ompi_coll_tree_t;
-
- ompi_coll_tree_t*
- ompi_coll_tuned_topo_build_tree( int fanout,
- MPI_Comm com,
- int root );
- ompi_coll_tree_t*
- ompi_coll_tuned_topo_build_in_order_bintree( MPI_Comm comm );
-
- ompi_coll_tree_t*
- ompi_coll_tuned_topo_build_bmtree( MPI_Comm comm,
- int root );
- ompi_coll_tree_t* ompi_coll_tuned_topo_build_in_order_bmtree(MPI_Comm comm, int root);
- ompi_coll_tree_t*
- ompi_coll_tuned_topo_build_chain( int fanout,
- MPI_Comm com,
- int root );
-
- int ompi_coll_tuned_topo_destroy_tree( ompi_coll_tree_t** tree );
-
- /* debugging stuff, will be removed later */
- int ompi_coll_tuned_topo_dump_tree (ompi_coll_tree_t* tree, int rank);
-
-#endif /* MCA_COLL_TUNED_TOPO_H_HAS_BEEN_INCLUDED */
-
--- /dev/null
+/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+/*
+ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
+ * University Research and Technology
+ * Corporation. All rights reserved.
+ * Copyright (c) 2004-2005 The University of Tennessee and The University
+ * of Tennessee Research Foundation. All rights
+ * reserved.
+ * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
+ * University of Stuttgart. All rights reserved.
+ * Copyright (c) 2004-2005 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Additional copyrights may follow
+ */
+
+#ifndef MCA_COLL_TUNED_TOPO_H_HAS_BEEN_INCLUDED
+#define MCA_COLL_TUNED_TOPO_H_HAS_BEEN_INCLUDED
+
+#include "colls_private.hpp"
+
+#define MAXTREEFANOUT 32
+
+#define COLL_TUNED_COMPUTED_SEGCOUNT(SEGSIZE, TYPELNG, SEGCOUNT) \
+ if (((SEGSIZE) >= (TYPELNG)) && ((SEGSIZE) < ((TYPELNG) * (SEGCOUNT)))) { \
+ size_t residual; \
+ (SEGCOUNT) = (int)((SEGSIZE) / (TYPELNG)); \
+ residual = (SEGSIZE) - (SEGCOUNT) * (TYPELNG); \
+ if (residual > ((TYPELNG) >> 1)) \
+ (SEGCOUNT)++; \
+ }
+
+struct ompi_coll_tree_t {
+ int32_t tree_root;
+ int32_t tree_fanout;
+ int32_t tree_bmtree;
+ int32_t tree_prev;
+ int32_t tree_next[MAXTREEFANOUT];
+ int32_t tree_nextsize;
+};
+
+ompi_coll_tree_t* ompi_coll_tuned_topo_build_tree(int fanout, MPI_Comm com, int root);
+ompi_coll_tree_t* ompi_coll_tuned_topo_build_in_order_bintree(MPI_Comm comm);
+
+ompi_coll_tree_t* ompi_coll_tuned_topo_build_bmtree(MPI_Comm comm, int root);
+ompi_coll_tree_t* ompi_coll_tuned_topo_build_in_order_bmtree(MPI_Comm comm, int root);
+ompi_coll_tree_t* ompi_coll_tuned_topo_build_chain(int fanout, MPI_Comm com, int root);
+
+int ompi_coll_tuned_topo_destroy_tree(ompi_coll_tree_t** tree);
+
+/* debugging stuff, will be removed later */
+int ompi_coll_tuned_topo_dump_tree(ompi_coll_tree_t* tree, int rank);
+
+#endif /* MCA_COLL_TUNED_TOPO_H_HAS_BEEN_INCLUDED */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef SMPI_COLLS_PRIVATE_H
-#define SMPI_COLLS_PRIVATE_H
+#ifndef SMPI_COLLS_PRIVATE_HPP
+#define SMPI_COLLS_PRIVATE_HPP
-#include <math.h>
+#include "private.hpp"
#include "smpi/mpi.h"
-#include "private.h"
#include "smpi_coll.hpp"
#include "smpi_comm.hpp"
#include "smpi_datatype.hpp"
#include "smpi_op.hpp"
#include "smpi_request.hpp"
+#include <cmath>
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_colls);
* See COPYRIGHT in top-level directory.
*/
-#include "../colls_private.h"
-
-
-
-
+#include "../colls_private.hpp"
#define MPIR_Gather_MV2_Direct Coll_gather_ompi_basic_linear::gather
#define MPIR_Gather_MV2_two_level_Direct Coll_gather_ompi_basic_linear::gather
* Additional copyrights may follow
*/
-#include "../colls_private.h"
-#include "../coll_tuned_topo.h"
+#include "../coll_tuned_topo.hpp"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
/* other non-leaf nodes */
smpi_free_tmp_buffer(tempbuf);
}
- xbt_free(bmtree);
+ ompi_coll_tuned_topo_destroy_tree(&bmtree);
return MPI_SUCCESS;
err_hndl:
- Waitall for all the second segments to complete.
*/
char* ptmp;
- MPI_Request *reqs = NULL, first_segment_req;
- reqs = (MPI_Request*)calloc(size, sizeof(MPI_Request));
+ MPI_Request first_segment_req;
+ MPI_Request* reqs = new (std::nothrow) MPI_Request[size];
if (NULL == reqs) {
ret = -1;
line = __LINE__;
ret = Request::waitall(size, reqs, MPI_STATUSES_IGNORE);
if (ret != MPI_SUCCESS) { line = __LINE__; goto error_hndl; }
- free(reqs);
+ delete[] reqs;
}
/* All done */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
//#include <star-reduction.c>
int reduce_NTSL_segment_size_in_byte = 8192;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
//#include <star-reduction.c>
int reduce_arrival_pattern_aware_segment_size_in_byte = 8192;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
//#include <star-reduction.c>
namespace simgrid{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
//#include <star-reduction.c>
namespace simgrid{
namespace smpi{
*
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
extern int mv2_reduce_intra_knomial_factor;
extern int mv2_reduce_inter_knomial_factor;
* See COPYRIGHT in top-level directory.
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#define MV2_INTRA_SHMEM_REDUCE_MSG 2048
#define mv2_g_shmem_coll_max_msg_size (1 << 17)
* Additional copyrights may follow
*/
-#include "../colls_private.h"
-#include "../coll_tuned_topo.h"
+#include "../coll_tuned_topo.hpp"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
else {
int creq = 0;
- MPI_Request* sreq = NULL;
-
- sreq = (MPI_Request*) calloc( max_outstanding_reqs,
- sizeof(MPI_Request ) );
+ MPI_Request* sreq = new (std::nothrow) MPI_Request[max_outstanding_reqs];
if (NULL == sreq) { line = __LINE__; ret = -1; goto error_hndl; }
/* post first group of requests */
MPI_STATUSES_IGNORE );
/* free requests */
- free(sreq);
+ delete[] sreq;
}
}
- free(tree);
+ ompi_coll_tuned_topo_destroy_tree(&tree);
return MPI_SUCCESS;
error_hndl: /* error handler */
* but this header must not be removed.
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#include <cstdio>
#include <cstdlib>
#endif
#endif
-typedef enum {MPIM_SHORT, MPIM_INT, MPIM_LONG, MPIM_UNSIGNED_SHORT,
- MPIM_UNSIGNED, MPIM_UNSIGNED_LONG, MPIM_UNSIGNED_LONG_LONG, MPIM_FLOAT,
- MPIM_DOUBLE, MPIM_BYTE} MPIM_Datatype;
-
-typedef enum {MPIM_MAX, MPIM_MIN, MPIM_SUM, MPIM_PROD,
- MPIM_LAND, MPIM_BAND, MPIM_LOR, MPIM_BOR,
- MPIM_LXOR, MPIM_BXOR} MPIM_Op;
+enum MPIM_Datatype {
+ MPIM_SHORT,
+ MPIM_INT,
+ MPIM_LONG,
+ MPIM_UNSIGNED_SHORT,
+ MPIM_UNSIGNED,
+ MPIM_UNSIGNED_LONG,
+ MPIM_UNSIGNED_LONG_LONG,
+ MPIM_FLOAT,
+ MPIM_DOUBLE,
+ MPIM_BYTE
+};
+
+enum MPIM_Op {
+ MPIM_MAX,
+ MPIM_MIN,
+ MPIM_SUM,
+ MPIM_PROD,
+ MPIM_LAND,
+ MPIM_BAND,
+ MPIM_LOR,
+ MPIM_BOR,
+ MPIM_LXOR,
+ MPIM_BXOR
+};
#define MPI_I_DO_OP_C_INTEGER(MPI_I_do_op_TYPE,TYPE) \
static void MPI_I_do_op_TYPE(TYPE* b1,TYPE* b2,TYPE* rslt, int cnt,MPIM_Op op)\
{ int i; \
MPI_Type_extent(mpi_datatype, &typelng);
scrlng = typelng * count;
#ifdef NO_CACHE_OPTIMIZATION
- scr1buf = static_cast<char*>(xbt_malloc(scrlng));
- scr2buf = static_cast<char*>(xbt_malloc(scrlng));
- scr3buf = static_cast<char*>(xbt_malloc(scrlng));
+ scr1buf = new char[scrlng];
+ scr2buf = new char[scrlng];
+ scr3buf = new char[scrlng];
#else
# ifdef SCR_LNG_OPTIM
scrlng = SCR_LNG_OPTIM(scrlng);
# endif
- scr2buf = static_cast<char*>(xbt_malloc(3*scrlng)); /* To test cache problems. */
+ scr2buf = new char[3 * scrlng]; /* To test cache problems. */
scr1buf = scr2buf + 1*scrlng; /* scr1buf and scr3buf must not*/
scr3buf = scr2buf + 2*scrlng; /* be used for malloc because */
/* they are interchanged below.*/
}
# ifdef NO_CACHE_TESTING
- xbt_free(scr1buf); xbt_free(scr2buf); xbt_free(scr3buf);
+ delete[] scr1buf;
+ delete[] scr2buf;
+ delete[] scr3buf;
# else
- xbt_free(scr2buf); /* scr1buf and scr3buf are part of scr2buf */
+ delete[] scr2buf; /* scr1buf and scr3buf are part of scr2buf */
# endif
return(MPI_SUCCESS);
} /* new_prot */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
/*
reduce
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "../colls_private.h"
+#include "../colls_private.hpp"
static inline int MPIU_Mirror_permutation(unsigned int x, int bits)
{
* Additional copyrights may follow
*/
-#include "../colls_private.h"
-#include "../coll_tuned_topo.h"
+#include "../coll_tuned_topo.hpp"
+#include "../colls_private.hpp"
/*
* Recursive-halving function is (*mostly*) copied from the BASIC coll module.
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#define MPIR_Scatter_MV2_Binomial Coll_scatter_ompi_binomial::scatter
#define MPIR_Scatter_MV2_Direct Coll_scatter_ompi_basic_linear::scatter
* Additional copyrights may follow
*/
-
-#include "../colls_private.h"
-#include "../coll_tuned_topo.h"
+#include "../coll_tuned_topo.hpp"
+#include "../colls_private.hpp"
namespace simgrid{
namespace smpi{
if (NULL != tempbuf)
smpi_free_tmp_buffer(tempbuf);
// not FIXME : store the tree, as done in ompi, instead of calculating it each time ?
- xbt_free(bmtree);
+ ompi_coll_tuned_topo_destroy_tree(&bmtree);
return MPI_SUCCESS;
#include <exception>
-#include "colls_private.h"
+#include "colls_private.hpp"
#include "smpi_process.hpp"
#define TRACE_AUTO_COLL(cat) \
if (TRACE_is_enabled()) { \
- simgrid::instr::Type* type = PJ_type_get_root()->getChildOrNull(#cat); \
- if (not type) { \
- type = simgrid::instr::Type::eventNew(#cat, PJ_type_get_root()); \
- } \
+ simgrid::instr::Type* type = simgrid::instr::Type::getRootType()->getOrCreateEventType(#cat); \
+ \
char cont_name[25]; \
snprintf(cont_name, 25, "rank-%d", smpi_process()->index()); \
simgrid::instr::Value* val = \
- simgrid::instr::Value::get_or_new(Colls::mpi_coll_##cat##_description[i].name, "1.0 1.0 1.0", type); \
- new simgrid::instr::NewEvent(SIMIX_get_clock(), PJ_container_get(cont_name), type, val); \
+ simgrid::instr::Value::byNameOrCreate(Colls::mpi_coll_##cat##_description[i].name, "1.0 1.0 1.0", type); \
+ new simgrid::instr::NewEvent(SIMIX_get_clock(), simgrid::instr::Container::byName(cont_name), type, val); \
}
#define AUTOMATIC_COLL_BENCH(cat, ret, args, args2) \
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
#include "smpi_coll.hpp"
+#include "private.hpp"
#include "smpi_comm.hpp"
#include "smpi_datatype.hpp"
#include "smpi_op.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "colls_private.h"
+#include "colls_private.hpp"
#include "smpi_process.hpp"
namespace simgrid{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "colls_private.h"
+#include "colls_private.hpp"
// This selector is based on information gathered on the Stampede cluster, with Intel MPI 4.1.3.049, and from the intel reference manual. The data was gathered launching runs with 1,2,4,8,16 processes per node.
#define INTEL_MAX_NB_NUMPROCS 12
#define INTEL_MAX_NB_PPN 5 /* 1 2 4 8 16 ppn */
-typedef struct {
+struct intel_tuning_table_size_element {
unsigned int max_size;
int algo;
-} intel_tuning_table_size_element;
+};
-typedef struct {
+struct intel_tuning_table_numproc_element {
int max_num_proc;
int num_elems;
intel_tuning_table_size_element elems[INTEL_MAX_NB_THRESHOLDS];
-} intel_tuning_table_numproc_element;
+};
-typedef struct {
+struct intel_tuning_table_element {
int ppn;
intel_tuning_table_numproc_element elems[INTEL_MAX_NB_NUMPROCS];
-} intel_tuning_table_element;
+};
/*
I_MPI_ADJUST_ALLREDUCE
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "colls_private.h"
+#include "colls_private.hpp"
/* This is the default implementation of allreduce. The algorithm is:
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "colls_private.h"
+#include "colls_private.hpp"
-#include "smpi_mvapich2_selector_stampede.h"
+#include "smpi_mvapich2_selector_stampede.hpp"
namespace simgrid{
namespace smpi{
int range = 0;
int range_threshold = 0;
int is_commutative = 0;
- int *disps = static_cast<int*>(xbt_malloc(comm_size * sizeof (int)));
+ int* disps = new int[comm_size];
if(mv2_red_scat_thresholds_table==NULL)
init_mv2_reduce_scatter_tables_stampede();
recvcnts, datatype,
op, comm);
}
- xbt_free(disps);
+ delete[] disps;
return mpi_errno;
}
void smpi_coll_cleanup_mvapich2()
{
- int i = 0;
if (mv2_alltoall_thresholds_table)
- xbt_free(mv2_alltoall_thresholds_table[i]);
- xbt_free(mv2_alltoall_thresholds_table);
- xbt_free(mv2_size_alltoall_tuning_table);
- xbt_free(mv2_alltoall_table_ppn_conf);
+ delete[] mv2_alltoall_thresholds_table[0];
+ delete[] mv2_alltoall_thresholds_table;
+ delete[] mv2_size_alltoall_tuning_table;
+ delete[] mv2_alltoall_table_ppn_conf;
- xbt_free(mv2_gather_thresholds_table);
+ delete[] mv2_gather_thresholds_table;
if (mv2_allgather_thresholds_table)
- xbt_free(mv2_allgather_thresholds_table[0]);
- xbt_free(mv2_size_allgather_tuning_table);
- xbt_free(mv2_allgather_table_ppn_conf);
- xbt_free(mv2_allgather_thresholds_table);
-
- xbt_free(mv2_allgatherv_thresholds_table);
- xbt_free(mv2_reduce_thresholds_table);
- xbt_free(mv2_red_scat_thresholds_table);
- xbt_free(mv2_allreduce_thresholds_table);
- xbt_free(mv2_bcast_thresholds_table);
+ delete[] mv2_allgather_thresholds_table[0];
+ delete[] mv2_size_allgather_tuning_table;
+ delete[] mv2_allgather_table_ppn_conf;
+ delete[] mv2_allgather_thresholds_table;
+
+ delete[] mv2_allgatherv_thresholds_table;
+ delete[] mv2_reduce_thresholds_table;
+ delete[] mv2_red_scat_thresholds_table;
+ delete[] mv2_allreduce_thresholds_table;
+ delete[] mv2_bcast_thresholds_table;
if (mv2_scatter_thresholds_table)
- xbt_free(mv2_scatter_thresholds_table[0]);
- xbt_free(mv2_scatter_thresholds_table);
- xbt_free(mv2_size_scatter_tuning_table);
- xbt_free(mv2_scatter_table_ppn_conf);
+ delete[] mv2_scatter_thresholds_table[0];
+ delete[] mv2_scatter_thresholds_table;
+ delete[] mv2_size_scatter_tuning_table;
+ delete[] mv2_scatter_table_ppn_conf;
}
+++ /dev/null
-/* selector for collective algorithms based on mvapich decision logic, with calibration from Stampede cluster at TACC*/
-/* This is the tuning used by MVAPICH for Stampede platform based on (MV2_ARCH_INTEL_XEON_E5_2680_16, MV2_HCA_MLX_CX_FDR) */
-
-/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-/************ Alltoall variables and initializers */
-
-#define MV2_MAX_NB_THRESHOLDS 32
-
-
-XBT_PUBLIC(void) smpi_coll_cleanup_mvapich2(void);
-
-typedef struct {
- int min;
- int max;
- int (*MV2_pt_Alltoall_function) (void *sendbuf, int sendcount, MPI_Datatype sendtype,
- void *recvbuf, int recvcount, MPI_Datatype recvtype,
- MPI_Comm comm_ptr );
-} mv2_alltoall_tuning_element;
-
-typedef struct {
- int numproc;
- int size_table;
- mv2_alltoall_tuning_element algo_table[MV2_MAX_NB_THRESHOLDS];
- mv2_alltoall_tuning_element in_place_algo_table[MV2_MAX_NB_THRESHOLDS];
-} mv2_alltoall_tuning_table;
-
-int (*MV2_Alltoall_function) (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm_ptr)=NULL;
-
-/* Indicates number of processes per node */
-int *mv2_alltoall_table_ppn_conf = NULL;
-/* Indicates total number of configurations */
-int mv2_alltoall_num_ppn_conf = 1;
-int *mv2_size_alltoall_tuning_table = NULL;
-mv2_alltoall_tuning_table **mv2_alltoall_thresholds_table = NULL;
-
-
-#define MPIR_Alltoall_bruck_MV2 simgrid::smpi::Coll_alltoall_bruck::alltoall
-#define MPIR_Alltoall_RD_MV2 simgrid::smpi::Coll_alltoall_rdb::alltoall
-#define MPIR_Alltoall_Scatter_dest_MV2 simgrid::smpi::Coll_alltoall_mvapich2_scatter_dest::alltoall
-#define MPIR_Alltoall_pairwise_MV2 simgrid::smpi::Coll_alltoall_pair::alltoall
-#define MPIR_Alltoall_inplace_MV2 simgrid::smpi::Coll_alltoall_ring::alltoall
-
-
-static void init_mv2_alltoall_tables_stampede(){
- int i;
- int agg_table_sum = 0;
- mv2_alltoall_tuning_table **table_ptrs = NULL;
- mv2_alltoall_num_ppn_conf = 3;
- if(simgrid::smpi::Colls::smpi_coll_cleanup_callback==NULL)
- simgrid::smpi::Colls::smpi_coll_cleanup_callback=&smpi_coll_cleanup_mvapich2;
- mv2_alltoall_thresholds_table = static_cast<mv2_alltoall_tuning_table**>(xbt_malloc(sizeof(mv2_alltoall_tuning_table *)
- * mv2_alltoall_num_ppn_conf));
- table_ptrs = static_cast<mv2_alltoall_tuning_table**>(xbt_malloc(sizeof(mv2_alltoall_tuning_table *)
- * mv2_alltoall_num_ppn_conf));
- mv2_size_alltoall_tuning_table = static_cast<int*>(xbt_malloc(sizeof(int) *
- mv2_alltoall_num_ppn_conf));
- mv2_alltoall_table_ppn_conf = static_cast<int*>(xbt_malloc(mv2_alltoall_num_ppn_conf * sizeof(int)));
- mv2_alltoall_table_ppn_conf[0] = 1;
- mv2_size_alltoall_tuning_table[0] = 6;
- mv2_alltoall_tuning_table mv2_tmp_alltoall_thresholds_table_1ppn[] = {
- {2,
- 1,
- {{0, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {4,
- 2,
- {{0, 262144, &MPIR_Alltoall_Scatter_dest_MV2},
- {262144, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {8,
- 2,
- {{0, 8, &MPIR_Alltoall_RD_MV2},
- {8, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {16,
- 3,
- {{0, 64, &MPIR_Alltoall_RD_MV2},
- {64, 512, &MPIR_Alltoall_bruck_MV2},
- {512, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0,-1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {32,
- 3,
- {{0, 32, &MPIR_Alltoall_RD_MV2},
- {32, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {64,
- 3,
- {{0, 8, &MPIR_Alltoall_RD_MV2},
- {8, 1024, &MPIR_Alltoall_bruck_MV2},
- {1024, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
- };
- table_ptrs[0] = mv2_tmp_alltoall_thresholds_table_1ppn;
- mv2_alltoall_table_ppn_conf[1] = 2;
- mv2_size_alltoall_tuning_table[1] = 6;
- mv2_alltoall_tuning_table mv2_tmp_alltoall_thresholds_table_2ppn[] = {
- {4,
- 2,
- {{0, 32, &MPIR_Alltoall_RD_MV2},
- {32, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {8,
- 2,
- {{0, 64, &MPIR_Alltoall_RD_MV2},
- {64, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {16,
- 3,
- {{0, 64, &MPIR_Alltoall_RD_MV2},
- {64, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0,-1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {32,
- 3,
- {{0, 16, &MPIR_Alltoall_RD_MV2},
- {16, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {64,
- 3,
- {{0, 8, &MPIR_Alltoall_RD_MV2},
- {8, 1024, &MPIR_Alltoall_bruck_MV2},
- {1024, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {128,
- 3,
- {{0, 4, &MPIR_Alltoall_RD_MV2},
- {4, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{0, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
- };
- table_ptrs[1] = mv2_tmp_alltoall_thresholds_table_2ppn;
- mv2_alltoall_table_ppn_conf[2] = 16;
- mv2_size_alltoall_tuning_table[2] = 7;
- mv2_alltoall_tuning_table mv2_tmp_alltoall_thresholds_table_16ppn[] = {
- {16,
- 2,
- {{0, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{32768, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {32,
- 2,
- {{0, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
- },
-
- {{16384, -1, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {64,
- 3,
- {{0, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, 16384, &MPIR_Alltoall_Scatter_dest_MV2},
- {16384, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{32768, 131072, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {128,
- 2,
- {{0, 2048, &MPIR_Alltoall_bruck_MV2},
- {2048, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{16384,65536, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {256,
- 2,
- {{0, 1024, &MPIR_Alltoall_bruck_MV2},
- {1024, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{16384, 65536, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- {512,
- 2,
- {{0, 1024, &MPIR_Alltoall_bruck_MV2},
- {1024, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{16384, 65536, &MPIR_Alltoall_inplace_MV2},
- },
- },
- {1024,
- 2,
- {{0, 1024, &MPIR_Alltoall_bruck_MV2},
- {1024, -1, &MPIR_Alltoall_pairwise_MV2},
- },
-
- {{16384, 65536, &MPIR_Alltoall_inplace_MV2},
- },
- },
-
- };
- table_ptrs[2] = mv2_tmp_alltoall_thresholds_table_16ppn;
- agg_table_sum = 0;
- for (i = 0; i < mv2_alltoall_num_ppn_conf; i++) {
- agg_table_sum += mv2_size_alltoall_tuning_table[i];
- }
- mv2_alltoall_thresholds_table[0] =
- static_cast<mv2_alltoall_tuning_table*>(xbt_malloc(agg_table_sum * sizeof (mv2_alltoall_tuning_table)));
- memcpy(mv2_alltoall_thresholds_table[0], table_ptrs[0],
- (sizeof(mv2_alltoall_tuning_table)
- * mv2_size_alltoall_tuning_table[0]));
- for (i = 1; i < mv2_alltoall_num_ppn_conf; i++) {
- mv2_alltoall_thresholds_table[i] =
- mv2_alltoall_thresholds_table[i - 1]
- + mv2_size_alltoall_tuning_table[i - 1];
- memcpy(mv2_alltoall_thresholds_table[i], table_ptrs[i],
- (sizeof(mv2_alltoall_tuning_table)
- * mv2_size_alltoall_tuning_table[i]));
- }
- xbt_free(table_ptrs);
-
-
-}
-
-
-/************ Allgather variables and initializers */
-
-typedef struct {
- int min;
- int max;
- int (*MV2_pt_Allgatherction)(void *sendbuf,
- int sendcount,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcount,
- MPI_Datatype recvtype, MPI_Comm comm_ptr);
-} mv2_allgather_tuning_element;
-
-typedef struct {
- int numproc;
- int two_level[MV2_MAX_NB_THRESHOLDS];
- int size_inter_table;
- mv2_allgather_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
-} mv2_allgather_tuning_table;
-
-int (*MV2_Allgatherction)(void *sendbuf,
- int sendcount,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcount,
- MPI_Datatype recvtype, MPI_Comm comm);
-
-int *mv2_allgather_table_ppn_conf = NULL;
-int mv2_allgather_num_ppn_conf = 1;
-int *mv2_size_allgather_tuning_table = NULL;
-mv2_allgather_tuning_table **mv2_allgather_thresholds_table = NULL;
-
-static int MPIR_Allgather_RD_Allgather_Comm_MV2( void *sendbuf,
- int sendcount,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcount,
- MPI_Datatype recvtype, MPI_Comm comm_ptr)
-{
- return 0;
-}
-
-#define MPIR_Allgather_Bruck_MV2 simgrid::smpi::Coll_allgather_bruck::allgather
-#define MPIR_Allgather_RD_MV2 simgrid::smpi::Coll_allgather_rdb::allgather
-#define MPIR_Allgather_Ring_MV2 simgrid::smpi::Coll_allgather_ring::allgather
-#define MPIR_2lvl_Allgather_MV2 simgrid::smpi::Coll_allgather_mvapich2_smp::allgather
-
-static void init_mv2_allgather_tables_stampede(){
- int i;
- int agg_table_sum = 0;
-
- if(simgrid::smpi::Colls::smpi_coll_cleanup_callback==NULL)
- simgrid::smpi::Colls::smpi_coll_cleanup_callback=&smpi_coll_cleanup_mvapich2;
- mv2_allgather_tuning_table **table_ptrs = NULL;
- mv2_allgather_num_ppn_conf = 3;
- mv2_allgather_thresholds_table
- = static_cast<mv2_allgather_tuning_table**>(xbt_malloc(sizeof(mv2_allgather_tuning_table *)
- * mv2_allgather_num_ppn_conf));
- table_ptrs = static_cast<mv2_allgather_tuning_table**>(xbt_malloc(sizeof(mv2_allgather_tuning_table *)
- * mv2_allgather_num_ppn_conf));
- mv2_size_allgather_tuning_table = static_cast<int*>(xbt_malloc(sizeof(int) *
- mv2_allgather_num_ppn_conf));
- mv2_allgather_table_ppn_conf
- = static_cast<int*>(xbt_malloc(mv2_allgather_num_ppn_conf * sizeof(int)));
- mv2_allgather_table_ppn_conf[0] = 1;
- mv2_size_allgather_tuning_table[0] = 6;
- mv2_allgather_tuning_table mv2_tmp_allgather_thresholds_table_1ppn[] = {
- {
- 2,
- {0},
- 1,
- {
- {0, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 4,
- {0,0},
- 2,
- {
- {0, 262144, &MPIR_Allgather_RD_MV2},
- {262144, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 8,
- {0,0},
- 2,
- {
- {0, 131072, &MPIR_Allgather_RD_MV2},
- {131072, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 16,
- {0,0},
- 2,
- {
- {0, 131072, &MPIR_Allgather_RD_MV2},
- {131072, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 32,
- {0,0},
- 2,
- {
- {0, 65536, &MPIR_Allgather_RD_MV2},
- {65536, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 64,
- {0,0},
- 2,
- {
- {0, 32768, &MPIR_Allgather_RD_MV2},
- {32768, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- };
- table_ptrs[0] = mv2_tmp_allgather_thresholds_table_1ppn;
- mv2_allgather_table_ppn_conf[1] = 2;
- mv2_size_allgather_tuning_table[1] = 6;
- mv2_allgather_tuning_table mv2_tmp_allgather_thresholds_table_2ppn[] = {
- {
- 4,
- {0,0},
- 2,
- {
- {0, 524288, &MPIR_Allgather_RD_MV2},
- {524288, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 8,
- {0,1,0},
- 2,
- {
- {0, 32768, &MPIR_Allgather_RD_MV2},
- {32768, 524288, &MPIR_Allgather_Ring_MV2},
- {524288, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 16,
- {0,1,0},
- 2,
- {
- {0, 16384, &MPIR_Allgather_RD_MV2},
- {16384, 524288, &MPIR_Allgather_Ring_MV2},
- {524288, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 32,
- {1,1,0},
- 2,
- {
- {0, 65536, &MPIR_Allgather_RD_MV2},
- {65536, 524288, &MPIR_Allgather_Ring_MV2},
- {524288, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 64,
- {1,1,0},
- 2,
- {
- {0, 32768, &MPIR_Allgather_RD_MV2},
- {32768, 524288, &MPIR_Allgather_Ring_MV2},
- {524288, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 128,
- {1,1,0},
- 2,
- {
- {0, 65536, &MPIR_Allgather_RD_MV2},
- {65536, 524288, &MPIR_Allgather_Ring_MV2},
- {524288, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- };
- table_ptrs[1] = mv2_tmp_allgather_thresholds_table_2ppn;
- mv2_allgather_table_ppn_conf[2] = 16;
- mv2_size_allgather_tuning_table[2] = 6;
- mv2_allgather_tuning_table mv2_tmp_allgather_thresholds_table_16ppn[] = {
- {
- 16,
- {0,0},
- 2,
- {
- {0, 1024, &MPIR_Allgather_RD_MV2},
- {1024, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 32,
- {0,0},
- 2,
- {
- {0, 1024, &MPIR_Allgather_RD_Allgather_Comm_MV2},
- {1024, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 64,
- {0,0},
- 2,
- {
- {0, 1024, &MPIR_Allgather_RD_Allgather_Comm_MV2},
- {1024, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 128,
- {0,0},
- 2,
- {
- {0, 1024, &MPIR_Allgather_RD_Allgather_Comm_MV2},
- {1024, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 256,
- {0,0},
- 2,
- {
- {0, 1024, &MPIR_Allgather_RD_Allgather_Comm_MV2},
- {1024, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
- {
- 512,
- {0,0},
- 2,
- {
- {0, 1024, &MPIR_Allgather_RD_Allgather_Comm_MV2},
- {1024, -1, &MPIR_Allgather_Ring_MV2},
- },
- },
-
- };
- table_ptrs[2] = mv2_tmp_allgather_thresholds_table_16ppn;
- agg_table_sum = 0;
- for (i = 0; i < mv2_allgather_num_ppn_conf; i++) {
- agg_table_sum += mv2_size_allgather_tuning_table[i];
- }
- mv2_allgather_thresholds_table[0] =
- static_cast<mv2_allgather_tuning_table*>(xbt_malloc(agg_table_sum * sizeof (mv2_allgather_tuning_table)));
- memcpy(mv2_allgather_thresholds_table[0], table_ptrs[0],
- (sizeof(mv2_allgather_tuning_table)
- * mv2_size_allgather_tuning_table[0]));
- for (i = 1; i < mv2_allgather_num_ppn_conf; i++) {
- mv2_allgather_thresholds_table[i] =
- mv2_allgather_thresholds_table[i - 1]
- + mv2_size_allgather_tuning_table[i - 1];
- memcpy(mv2_allgather_thresholds_table[i], table_ptrs[i],
- (sizeof(mv2_allgather_tuning_table)
- * mv2_size_allgather_tuning_table[i]));
- }
- xbt_free(table_ptrs);
-}
-
-
-/************ Gather variables and initializers */
-
-typedef struct {
- int min;
- int max;
- int (*MV2_pt_Gather_function)(void *sendbuf, int sendcnt,
- MPI_Datatype sendtype, void *recvbuf, int recvcnt,
- MPI_Datatype recvtype, int root, MPI_Comm comm_ptr);
-} mv2_gather_tuning_element;
-
-
-typedef struct {
- int numproc;
- int size_inter_table;
- mv2_gather_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
- int size_intra_table;
- mv2_gather_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
-} mv2_gather_tuning_table;
-
-int mv2_size_gather_tuning_table=7;
-mv2_gather_tuning_table * mv2_gather_thresholds_table=NULL;
-
-typedef int (*MV2_Gather_function_ptr) (void *sendbuf,
- int sendcnt,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcnt,
- MPI_Datatype recvtype,
- int root, MPI_Comm comm);
-
-MV2_Gather_function_ptr MV2_Gather_inter_leader_function = NULL;
-MV2_Gather_function_ptr MV2_Gather_intra_node_function = NULL;
-
-
-
-#define MPIR_Gather_MV2_Direct simgrid::smpi::Coll_gather_ompi_basic_linear::gather
-#define MPIR_Gather_MV2_two_level_Direct simgrid::smpi::Coll_gather_mvapich2_two_level::gather
-#define MPIR_Gather_intra simgrid::smpi::Coll_gather_mpich::gather
-
-
-static void init_mv2_gather_tables_stampede(){
-
- if(simgrid::smpi::Colls::smpi_coll_cleanup_callback==NULL)
- simgrid::smpi::Colls::smpi_coll_cleanup_callback=&smpi_coll_cleanup_mvapich2;
- mv2_size_gather_tuning_table=7;
- mv2_gather_thresholds_table = static_cast<mv2_gather_tuning_table*>(xbt_malloc(mv2_size_gather_tuning_table*
- sizeof (mv2_gather_tuning_table)));
- mv2_gather_tuning_table mv2_tmp_gather_thresholds_table[]={
- {16,
- 2,{{0, 524288, &MPIR_Gather_MV2_Direct},
- {524288, -1, &MPIR_Gather_intra}},
- 1,{{0, -1, &MPIR_Gather_MV2_Direct}}},
- {32,
- 3,{{0, 16384, &MPIR_Gather_MV2_Direct},
- {16384, 131072, &MPIR_Gather_intra},
- {131072, -1, &MPIR_Gather_MV2_two_level_Direct}},
- 1,{{0, -1, &MPIR_Gather_intra}}},
- {64,
- 3,{{0, 256, &MPIR_Gather_MV2_two_level_Direct},
- {256, 16384, &MPIR_Gather_MV2_Direct},
- {256, -1, &MPIR_Gather_MV2_two_level_Direct}},
- 1,{{0, -1, &MPIR_Gather_intra}}},
- {128,
- 3,{{0, 512, &MPIR_Gather_MV2_two_level_Direct},
- {512, 16384, &MPIR_Gather_MV2_Direct},
- {16384, -1, &MPIR_Gather_MV2_two_level_Direct}},
- 1,{{0, -1, &MPIR_Gather_intra}}},
- {256,
- 3,{{0, 512, &MPIR_Gather_MV2_two_level_Direct},
- {512, 16384, &MPIR_Gather_MV2_Direct},
- {16384, -1, &MPIR_Gather_MV2_two_level_Direct}},
- 1,{{0, -1, &MPIR_Gather_intra}}},
- {512,
- 3,{{0, 512, &MPIR_Gather_MV2_two_level_Direct},
- {512, 16384, &MPIR_Gather_MV2_Direct},
- {8196, -1, &MPIR_Gather_MV2_two_level_Direct}},
- 1,{{0, -1, &MPIR_Gather_intra}}},
- {1024,
- 3,{{0, 512, &MPIR_Gather_MV2_two_level_Direct},
- {512, 16384, &MPIR_Gather_MV2_Direct},
- {8196, -1, &MPIR_Gather_MV2_two_level_Direct}},
- 1,{{0, -1, &MPIR_Gather_intra}}},
- };
-
- memcpy(mv2_gather_thresholds_table, mv2_tmp_gather_thresholds_table,
- mv2_size_gather_tuning_table * sizeof (mv2_gather_tuning_table));
-
-}
-
-
-/************ Allgatherv variables and initializers */
-
-typedef struct {
- int min;
- int max;
- int (*MV2_pt_Allgatherv_function)(void *sendbuf,
- int sendcount,
- MPI_Datatype sendtype,
- void *recvbuf,
- int *recvcounts,
- int *displs,
- MPI_Datatype recvtype,
- MPI_Comm commg);
-} mv2_allgatherv_tuning_element;
-
-typedef struct {
- int numproc;
- int size_inter_table;
- mv2_allgatherv_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
-} mv2_allgatherv_tuning_table;
-
-int (*MV2_Allgatherv_function)(void *sendbuf,
- int sendcount,
- MPI_Datatype sendtype,
- void *recvbuf,
- int *recvcounts,
- int *displs,
- MPI_Datatype recvtype,
- MPI_Comm comm);
-
-int mv2_size_allgatherv_tuning_table = 0;
-mv2_allgatherv_tuning_table *mv2_allgatherv_thresholds_table = NULL;
-
-#define MPIR_Allgatherv_Rec_Doubling_MV2 simgrid::smpi::Coll_allgatherv_mpich_rdb::allgatherv
-#define MPIR_Allgatherv_Bruck_MV2 simgrid::smpi::Coll_allgatherv_ompi_bruck::allgatherv
-#define MPIR_Allgatherv_Ring_MV2 simgrid::smpi::Coll_allgatherv_mpich_ring::allgatherv
-
-
-static void init_mv2_allgatherv_tables_stampede(){
- if(simgrid::smpi::Colls::smpi_coll_cleanup_callback==NULL)
- simgrid::smpi::Colls::smpi_coll_cleanup_callback=&smpi_coll_cleanup_mvapich2;
- mv2_size_allgatherv_tuning_table = 6;
- mv2_allgatherv_thresholds_table = static_cast<mv2_allgatherv_tuning_table*>(xbt_malloc(mv2_size_allgatherv_tuning_table *
- sizeof (mv2_allgatherv_tuning_table)));
- mv2_allgatherv_tuning_table mv2_tmp_allgatherv_thresholds_table[] = {
- {
- 16,
- 2,
- {
- {0, 512, &MPIR_Allgatherv_Rec_Doubling_MV2},
- {512, -1, &MPIR_Allgatherv_Ring_MV2},
- },
- },
- {
- 32,
- 2,
- {
- {0, 512, &MPIR_Allgatherv_Rec_Doubling_MV2},
- {512, -1, &MPIR_Allgatherv_Ring_MV2},
- },
- },
- {
- 64,
- 2,
- {
- {0, 256, &MPIR_Allgatherv_Rec_Doubling_MV2},
- {256, -1, &MPIR_Allgatherv_Ring_MV2},
- },
- },
- {
- 128,
- 2,
- {
- {0, 256, &MPIR_Allgatherv_Rec_Doubling_MV2},
- {256, -1, &MPIR_Allgatherv_Ring_MV2},
- },
- },
- {
- 256,
- 2,
- {
- {0, 256, &MPIR_Allgatherv_Rec_Doubling_MV2},
- {256, -1, &MPIR_Allgatherv_Ring_MV2},
- },
- },
- {
- 512,
- 2,
- {
- {0, 256, &MPIR_Allgatherv_Rec_Doubling_MV2},
- {256, -1, &MPIR_Allgatherv_Ring_MV2},
- },
- },
-
- };
- memcpy(mv2_allgatherv_thresholds_table, mv2_tmp_allgatherv_thresholds_table,
- mv2_size_allgatherv_tuning_table * sizeof (mv2_allgatherv_tuning_table));
-}
-
-
-/************ Allreduce variables and initializers */
-
-typedef struct {
- int min;
- int max;
- int (*MV2_pt_Allreducection)(void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op, MPI_Comm comm);
-} mv2_allreduce_tuning_element;
-
-typedef struct {
- int numproc;
- int mcast_enabled;
- int is_two_level_allreduce[MV2_MAX_NB_THRESHOLDS];
- int size_inter_table;
- mv2_allreduce_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
- int size_intra_table;
- mv2_allreduce_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
-} mv2_allreduce_tuning_table;
-
-
-int (*MV2_Allreducection)(void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op, MPI_Comm comm)=NULL;
-
-
-int (*MV2_Allreduce_intra_function)( void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op, MPI_Comm comm)=NULL;
-
-int mv2_size_allreduce_tuning_table = 0;
-mv2_allreduce_tuning_table *mv2_allreduce_thresholds_table = NULL;
-
-
-
-
-
-static int MPIR_Allreduce_mcst_reduce_two_level_helper_MV2( void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op, MPI_Comm comm)
-{
- return 0;
-}
-
-static int MPIR_Allreduce_mcst_reduce_redscat_gather_MV2( void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op, MPI_Comm comm)
-{
- return 0;
-}
-
-static int MPIR_Allreduce_reduce_p2p_MV2( void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op, MPI_Comm comm)
-{
- simgrid::smpi::Colls::reduce(sendbuf,recvbuf,count,datatype,op,0,comm);
- return MPI_SUCCESS;
-}
-
-static int MPIR_Allreduce_reduce_shmem_MV2( void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op, MPI_Comm comm)
-{
- simgrid::smpi::Colls::reduce(sendbuf,recvbuf,count,datatype,op,0,comm);
- return MPI_SUCCESS;
-}
-
-#define MPIR_Allreduce_pt2pt_rd_MV2 simgrid::smpi::Coll_allreduce_rdb::allreduce
-#define MPIR_Allreduce_pt2pt_rs_MV2 simgrid::smpi::Coll_allreduce_mvapich2_rs::allreduce
-#define MPIR_Allreduce_two_level_MV2 simgrid::smpi::Coll_allreduce_mvapich2_two_level::allreduce
-
-
-static void init_mv2_allreduce_tables_stampede(){
- if(simgrid::smpi::Colls::smpi_coll_cleanup_callback==NULL)
- simgrid::smpi::Colls::smpi_coll_cleanup_callback=&smpi_coll_cleanup_mvapich2;
- mv2_size_allreduce_tuning_table = 8;
- mv2_allreduce_thresholds_table = static_cast<mv2_allreduce_tuning_table*>(xbt_malloc(mv2_size_allreduce_tuning_table *
- sizeof (mv2_allreduce_tuning_table)));
- mv2_allreduce_tuning_table mv2_tmp_allreduce_thresholds_table[] = {
- {
- 16,
- 0,
- {1, 0},
- 2,
- {
- {0, 1024, &MPIR_Allreduce_pt2pt_rd_MV2},
- {1024, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
- },
- 2,
- {
- {0, 1024, &MPIR_Allreduce_reduce_shmem_MV2},
- {1024, -1, &MPIR_Allreduce_reduce_p2p_MV2},
- },
- },
- {
- 32,
- 0,
- {1, 1, 0},
- 3,
- {
- {0, 1024, &MPIR_Allreduce_pt2pt_rd_MV2},
- {1024, 16384, &MPIR_Allreduce_pt2pt_rd_MV2},
- {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
- },
- 2,
- {
- {0, 1024, &MPIR_Allreduce_reduce_shmem_MV2},
- {1024, 16384, &MPIR_Allreduce_reduce_p2p_MV2},
- },
- },
- {
- 64,
- 0,
- {1, 1, 0},
- 3,
- {
- {0, 512, &MPIR_Allreduce_pt2pt_rd_MV2},
- {512, 16384, &MPIR_Allreduce_pt2pt_rd_MV2},
- {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
- },
- 2,
- {
- {0, 512, &MPIR_Allreduce_reduce_shmem_MV2},
- {512, 16384, &MPIR_Allreduce_reduce_p2p_MV2},
- },
- },
- {
- 128,
- 0,
- {1, 1, 0},
- 3,
- {
- {0, 512, &MPIR_Allreduce_pt2pt_rd_MV2},
- {512, 16384, &MPIR_Allreduce_pt2pt_rd_MV2},
- {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
- },
- 2,
- {
- {0, 512, &MPIR_Allreduce_reduce_shmem_MV2},
- {512, 16384, &MPIR_Allreduce_reduce_p2p_MV2},
- },
- },
- {
- 256,
- 0,
- {1, 1, 0},
- 3,
- {
- {0, 512, &MPIR_Allreduce_pt2pt_rd_MV2},
- {512, 16384, &MPIR_Allreduce_pt2pt_rd_MV2},
- {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
- },
- 2,
- {
- {0, 512, &MPIR_Allreduce_reduce_shmem_MV2},
- {512, -1, &MPIR_Allreduce_reduce_p2p_MV2},
- },
- },
- {
- 512,
- 0,
- {1, 1, 0},
- 3,
- {
- {0, 512, &MPIR_Allreduce_pt2pt_rd_MV2},
- {512, 16384, &MPIR_Allreduce_pt2pt_rd_MV2},
- {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
- },
- 2,
- {
- {0, 512, &MPIR_Allreduce_reduce_shmem_MV2},
- {512, 16384, &MPIR_Allreduce_reduce_p2p_MV2},
- },
- },
- {
- 1024,
- 0,
- {1, 1, 1, 0},
- 4,
- {
- {0, 512, &MPIR_Allreduce_pt2pt_rd_MV2},
- {512, 8192, &MPIR_Allreduce_pt2pt_rd_MV2},
- {8192, 65536, &MPIR_Allreduce_pt2pt_rs_MV2},
- {65536, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
- },
- 2,
- {
- {0, 512, &MPIR_Allreduce_reduce_shmem_MV2},
- {512, -1, &MPIR_Allreduce_reduce_p2p_MV2},
- },
- },
- {
- 2048,
- 0,
- {1, 1, 1, 0},
- 4,
- {
- {0, 64, &MPIR_Allreduce_pt2pt_rd_MV2},
- {64, 512, &MPIR_Allreduce_reduce_p2p_MV2},
- {512, 4096, &MPIR_Allreduce_mcst_reduce_two_level_helper_MV2},
- {4096, 16384, &MPIR_Allreduce_pt2pt_rs_MV2},
- {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
- },
- 2,
- {
- {0, 512, &MPIR_Allreduce_reduce_shmem_MV2},
- {512, -1, &MPIR_Allreduce_reduce_p2p_MV2},
- },
- },
-
- };
- memcpy(mv2_allreduce_thresholds_table, mv2_tmp_allreduce_thresholds_table,
- mv2_size_allreduce_tuning_table * sizeof (mv2_allreduce_tuning_table));
-}
-
-
-
-
-typedef struct {
- int min;
- int max;
- int (*MV2_pt_Bcast_function) (void *buf, int count, MPI_Datatype datatype,
- int root, MPI_Comm comm_ptr);
- int zcpy_pipelined_knomial_factor;
-} mv2_bcast_tuning_element;
-
-typedef struct {
- int numproc;
- int bcast_segment_size;
- int intra_node_knomial_factor;
- int inter_node_knomial_factor;
- int is_two_level_bcast[MV2_MAX_NB_THRESHOLDS];
- int size_inter_table;
- mv2_bcast_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
- int size_intra_table;
- mv2_bcast_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
-} mv2_bcast_tuning_table;
-
-int mv2_size_bcast_tuning_table = 0;
-mv2_bcast_tuning_table *mv2_bcast_thresholds_table = NULL;
-
-
-int (*MV2_Bcast_function) (void *buffer, int count, MPI_Datatype datatype,
- int root, MPI_Comm comm_ptr) = NULL;
-
-int (*MV2_Bcast_intra_node_function) (void *buffer, int count, MPI_Datatype datatype,
- int root, MPI_Comm comm_ptr) = NULL;
-
-int zcpy_knomial_factor = 2;
-int mv2_pipelined_zcpy_knomial_factor = -1;
-int bcast_segment_size = 8192;
-int mv2_inter_node_knomial_factor = 4;
-int mv2_intra_node_knomial_factor = 4;
-#define mv2_bcast_two_level_system_size 64
-#define mv2_bcast_short_msg 16384
-#define mv2_bcast_large_msg 512*1024
-
-#define INTRA_NODE_ROOT 0
-
-#define MPIR_Pipelined_Bcast_Zcpy_MV2 simgrid::smpi::Coll_bcast_mpich::bcast
-#define MPIR_Pipelined_Bcast_MV2 simgrid::smpi::Coll_bcast_mpich::bcast
-#define MPIR_Bcast_binomial_MV2 simgrid::smpi::Coll_bcast_binomial_tree::bcast
-#define MPIR_Bcast_scatter_ring_allgather_shm_MV2 simgrid::smpi::Coll_bcast_scatter_LR_allgather::bcast
-#define MPIR_Bcast_scatter_doubling_allgather_MV2 simgrid::smpi::Coll_bcast_scatter_rdb_allgather::bcast
-#define MPIR_Bcast_scatter_ring_allgather_MV2 simgrid::smpi::Coll_bcast_scatter_LR_allgather::bcast
-#define MPIR_Shmem_Bcast_MV2 simgrid::smpi::Coll_bcast_mpich::bcast
-#define MPIR_Bcast_tune_inter_node_helper_MV2 simgrid::smpi::Coll_bcast_mvapich2_inter_node::bcast
-#define MPIR_Bcast_inter_node_helper_MV2 simgrid::smpi::Coll_bcast_mvapich2_inter_node::bcast
-#define MPIR_Knomial_Bcast_intra_node_MV2 simgrid::smpi::Coll_bcast_mvapich2_knomial_intra_node::bcast
-#define MPIR_Bcast_intra_MV2 simgrid::smpi::Coll_bcast_mvapich2_intra_node::bcast
-
-static void init_mv2_bcast_tables_stampede(){
- //Stampede,
- if(simgrid::smpi::Colls::smpi_coll_cleanup_callback==NULL)
- simgrid::smpi::Colls::smpi_coll_cleanup_callback=&smpi_coll_cleanup_mvapich2;
- mv2_size_bcast_tuning_table=8;
- mv2_bcast_thresholds_table = static_cast<mv2_bcast_tuning_table*>(xbt_malloc(mv2_size_bcast_tuning_table *
- sizeof (mv2_bcast_tuning_table)));
-
- mv2_bcast_tuning_table mv2_tmp_bcast_thresholds_table[]={
- {
- 16,
- 8192, 4, 4,
- {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
- 11,
- {
- {0, 8, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {8, 16, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {16, 1024, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {1024, 8192, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {8192, 16384, &MPIR_Bcast_binomial_MV2, -1},
- {16384, 32768, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {32768, 65536, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {65536, 131072, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1},
- {131072, 262144, &MPIR_Bcast_scatter_ring_allgather_MV2, -1},
- {262144, 524288, &MPIR_Bcast_scatter_doubling_allgather_MV2, -1},
- {524288, -1, &MPIR_Bcast_scatter_ring_allgather_MV2, -1}
- },
- 11,
- {
- {0, 8, &MPIR_Shmem_Bcast_MV2, 2},
- {8, 16, &MPIR_Shmem_Bcast_MV2, 4},
- {16, 1024, &MPIR_Shmem_Bcast_MV2, 2},
- {1024, 8192, &MPIR_Shmem_Bcast_MV2, 4},
- {8192, 16384, &MPIR_Shmem_Bcast_MV2, -1},
- {16384, 32768, &MPIR_Shmem_Bcast_MV2, 4},
- {32768, 65536, &MPIR_Shmem_Bcast_MV2, 2},
- {65536, 131072, &MPIR_Shmem_Bcast_MV2, -1},
- {131072, 262144, &MPIR_Shmem_Bcast_MV2, -1},
- {262144, 524288, &MPIR_Shmem_Bcast_MV2, -1},
- {524288, -1, &MPIR_Shmem_Bcast_MV2, -1}
- }
- },
- {
- 32,
- 8192, 4, 4,
- {1, 1, 1, 1, 1, 1, 1, 1},
- 8,
- {
- {0, 128, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {128, 256, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {256, 32768, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {32768, 65536, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {65536, 131072, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {131072, 262144, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
- {262144, 524288, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {524288, -1, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8}
- },
- 8,
- {
- {0, 128, &MPIR_Shmem_Bcast_MV2, 2},
- {128, 256, &MPIR_Shmem_Bcast_MV2, 4},
- {256, 32768, &MPIR_Shmem_Bcast_MV2, 2},
- {32768, 65536, &MPIR_Shmem_Bcast_MV2, 4},
- {65536, 131072, &MPIR_Shmem_Bcast_MV2, 2},
- {131072, 262144, &MPIR_Shmem_Bcast_MV2, 8},
- {262144, 524288, &MPIR_Shmem_Bcast_MV2, 2},
- {524288, -1, &MPIR_Shmem_Bcast_MV2, 8}
- }
- },
- {
- 64,
- 8192, 4, 4,
- {1, 1, 1, 1, 1, 1, 1, 1, 1},
- 9,
- {
- {0, 2, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {2, 4, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
- {4, 16, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {16, 32, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
- {32, 128, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {128, 256, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
- {256, 4096, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {4096, 32768, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
- {32768, -1, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2}
- },
- 9,
- {
- {0, 2, &MPIR_Shmem_Bcast_MV2, 4},
- {2, 4, &MPIR_Shmem_Bcast_MV2, 8},
- {4, 16, &MPIR_Shmem_Bcast_MV2, 4},
- {16, 32, &MPIR_Shmem_Bcast_MV2, 8},
- {32, 128, &MPIR_Shmem_Bcast_MV2, 4},
- {128, 256, &MPIR_Shmem_Bcast_MV2, 8},
- {256, 4096, &MPIR_Shmem_Bcast_MV2, 4},
- {4096, 32768, &MPIR_Shmem_Bcast_MV2, 8},
- {32768, -1, &MPIR_Shmem_Bcast_MV2, 2}
- }
- },
- {
- 128,
- 8192, 4, 4,
- {1, 1, 1, 0},
- 4,
- {
- {0, 8192, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
- {8192, 16384, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {16384, 524288, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {524288, -1, &MPIR_Bcast_scatter_ring_allgather_MV2, -1}
- },
- 4,
- {
- {0, 8192, &MPIR_Shmem_Bcast_MV2, 8},
- {8192, 16384, &MPIR_Shmem_Bcast_MV2, 4},
- {16384, 524288, &MPIR_Shmem_Bcast_MV2, 2},
- {524288, -1, NULL, -1}
- }
- },
- {
- 256,
- 8192, 4, 4,
- {1, 1, 1, 1, 1},
- 5,
- {
- {0, 16384, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {16384, 131072, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {131072, 262144, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1},
- {262144, 524288, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {524288, -1, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1}
- },
- 5,
- {
- {0, 16384, &MPIR_Shmem_Bcast_MV2, 4},
- {16384, 131072, &MPIR_Shmem_Bcast_MV2, 2},
- {131072, 262144, &MPIR_Shmem_Bcast_MV2, -1},
- {262144, 524288, &MPIR_Shmem_Bcast_MV2, 2},
- {524288, -1, &MPIR_Shmem_Bcast_MV2, -1}
- }
- },
- {
- 512,
- 8192, 4, 4,
- {1, 1, 1, 1, 1},
- 5,
- {
- {0, 4096, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
- {4096, 16384, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {16384, 131072, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {131072, 262144, &MPIR_Pipelined_Bcast_MV2, -1},
- {262144, -1, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1}
- },
- 5,
- {
- {0, 4096, &MPIR_Shmem_Bcast_MV2, 8},
- {4096, 16384, &MPIR_Shmem_Bcast_MV2, 4},
- {16384, 131072, &MPIR_Shmem_Bcast_MV2, 2},
- {131072, 262144, &MPIR_Shmem_Bcast_MV2, -1},
- {262144, -1, &MPIR_Shmem_Bcast_MV2, -1}
- }
- },
- {
- 1024,
- 8192, 4, 4,
- {1, 1, 1, 1, 1},
- 5,
- {
- {0, 8192, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
- {8192, 16384, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {16384, 65536, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {65536, 524288, &MPIR_Pipelined_Bcast_MV2, -1},
- {524288, -1, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1}
- },
- 5,
- {
- {0, 8192, &MPIR_Shmem_Bcast_MV2, 8},
- {8192, 16384, &MPIR_Shmem_Bcast_MV2, 4},
- {16384, 65536, &MPIR_Shmem_Bcast_MV2, 2},
- {65536, 524288, &MPIR_Shmem_Bcast_MV2, -1},
- {524288, -1, &MPIR_Shmem_Bcast_MV2, -1}
- }
- },
- {
- 2048,
- 8192, 4, 4,
- {1, 1, 1, 1, 1, 1, 1},
- 7,
- {
- {0, 16, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
- {16, 32, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {32, 4096, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
- {4096, 16384, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
- {16384, 32768, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
- {32768, 524288, &MPIR_Pipelined_Bcast_MV2, -1},
- {524288, -1, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1}
- },
- 7,
- {
- {0, 16, &MPIR_Shmem_Bcast_MV2, 8},
- {16, 32, &MPIR_Shmem_Bcast_MV2, 4},
- {32, 4096, &MPIR_Shmem_Bcast_MV2, 8},
- {4096, 16384, &MPIR_Shmem_Bcast_MV2, 4},
- {16384, 32768, &MPIR_Shmem_Bcast_MV2, 2},
- {32768, 524288, &MPIR_Shmem_Bcast_MV2, -1},
- {524288, -1, &MPIR_Shmem_Bcast_MV2, -1}
- }
- }
- };
-
- memcpy(mv2_bcast_thresholds_table, mv2_tmp_bcast_thresholds_table,
- mv2_size_bcast_tuning_table * sizeof (mv2_bcast_tuning_table));
-}
-
-
-/************ Reduce variables and initializers */
-
-typedef struct {
- int min;
- int max;
- int (*MV2_pt_Reduce_function)(void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op,
- int root,
- MPI_Comm comm_ptr);
-} mv2_reduce_tuning_element;
-
-typedef struct {
- int numproc;
- int inter_k_degree;
- int intra_k_degree;
- int is_two_level_reduce[MV2_MAX_NB_THRESHOLDS];
- int size_inter_table;
- mv2_reduce_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
- int size_intra_table;
- mv2_reduce_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
-} mv2_reduce_tuning_table;
-
-int mv2_size_reduce_tuning_table = 0;
-mv2_reduce_tuning_table *mv2_reduce_thresholds_table = NULL;
-
-
-int mv2_reduce_intra_knomial_factor = -1;
-int mv2_reduce_inter_knomial_factor = -1;
-
-int (*MV2_Reduce_function)( void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op,
- int root,
- MPI_Comm comm_ptr)=NULL;
-
-int (*MV2_Reduce_intra_function)( void *sendbuf,
- void *recvbuf,
- int count,
- MPI_Datatype datatype,
- MPI_Op op,
- int root,
- MPI_Comm comm_ptr)=NULL;
-
-
-#define MPIR_Reduce_inter_knomial_wrapper_MV2 simgrid::smpi::Coll_reduce_mvapich2_knomial::reduce
-#define MPIR_Reduce_intra_knomial_wrapper_MV2 simgrid::smpi::Coll_reduce_mvapich2_knomial::reduce
-#define MPIR_Reduce_binomial_MV2 simgrid::smpi::Coll_reduce_binomial::reduce
-#define MPIR_Reduce_redscat_gather_MV2 simgrid::smpi::Coll_reduce_scatter_gather::reduce
-#define MPIR_Reduce_shmem_MV2 simgrid::smpi::Coll_reduce_ompi_basic_linear::reduce
-#define MPIR_Reduce_two_level_helper_MV2 simgrid::smpi::Coll_reduce_mvapich2_two_level::reduce
-
-
-static void init_mv2_reduce_tables_stampede(){
- if(simgrid::smpi::Colls::smpi_coll_cleanup_callback==NULL)
- simgrid::smpi::Colls::smpi_coll_cleanup_callback=&smpi_coll_cleanup_mvapich2;
- /*Stampede*/
- mv2_size_reduce_tuning_table = 8;
- mv2_reduce_thresholds_table = static_cast<mv2_reduce_tuning_table*>(xbt_malloc(mv2_size_reduce_tuning_table *
- sizeof (mv2_reduce_tuning_table)));
- mv2_reduce_tuning_table mv2_tmp_reduce_thresholds_table[] = {
- {
- 16,
- 4,
- 4,
- {1, 0, 0},
- 3,
- {
- {0, 262144, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {262144, 1048576, &MPIR_Reduce_binomial_MV2},
- {1048576, -1, &MPIR_Reduce_redscat_gather_MV2},
- },
- 2,
- {
- {0, 65536, &MPIR_Reduce_shmem_MV2},
- {65536,-1, &MPIR_Reduce_binomial_MV2},
- },
- },
- {
- 32,
- 4,
- 4,
- {1, 1, 1, 1, 0, 0, 0},
- 7,
- {
- {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {16384, 32768, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {32768, 65536, &MPIR_Reduce_binomial_MV2},
- {65536, 262144, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {262144, 1048576, &MPIR_Reduce_binomial_MV2},
- {1048576, -1, &MPIR_Reduce_redscat_gather_MV2},
- },
- 6,
- {
- {0, 8192, &MPIR_Reduce_shmem_MV2},
- {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {16384, 32768, &MPIR_Reduce_shmem_MV2},
- {32768, 65536, &MPIR_Reduce_shmem_MV2},
- {65536, 262144, &MPIR_Reduce_shmem_MV2},
- {262144,-1, &MPIR_Reduce_binomial_MV2},
- },
- },
- {
- 64,
- 4,
- 4,
- {1, 1, 1, 1, 0},
- 5,
- {
- {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {16384, 65536, &MPIR_Reduce_binomial_MV2},
- {65536, 262144, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {262144, -1, &MPIR_Reduce_redscat_gather_MV2},
- },
- 5,
- {
- {0, 8192, &MPIR_Reduce_shmem_MV2},
- {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {16384, 65536, &MPIR_Reduce_shmem_MV2},
- {65536, 262144, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {262144, -1, &MPIR_Reduce_binomial_MV2},
- },
- },
- {
- 128,
- 4,
- 4,
- {1, 0, 1, 0, 1, 0},
- 6,
- {
- {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {16384, 65536, &MPIR_Reduce_binomial_MV2},
- {65536, 262144, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {262144, 1048576, &MPIR_Reduce_binomial_MV2},
- {1048576, -1, &MPIR_Reduce_redscat_gather_MV2},
- },
- 5,
- {
- {0, 8192, &MPIR_Reduce_shmem_MV2},
- {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {16384, 65536, &MPIR_Reduce_shmem_MV2},
- {65536, 262144, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {262144, -1, &MPIR_Reduce_binomial_MV2},
- },
- },
- {
- 256,
- 4,
- 4,
- {1, 1, 1, 0, 1, 1, 0},
- 7,
- {
- {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {16384, 32768, &MPIR_Reduce_binomial_MV2},
- {32768, 65536, &MPIR_Reduce_binomial_MV2},
- {65536, 262144, &MPIR_Reduce_binomial_MV2},
- {262144, 1048576, &MPIR_Reduce_binomial_MV2},
- {1048576, -1, &MPIR_Reduce_redscat_gather_MV2},
- },
- 6,
- {
- {0, 8192, &MPIR_Reduce_shmem_MV2},
- {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {16384, 32768, &MPIR_Reduce_shmem_MV2},
- {32768, 65536, &MPIR_Reduce_shmem_MV2},
- {65536, 262144, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {262144, -1, &MPIR_Reduce_binomial_MV2},
- },
- },
- {
- 512,
- 4,
- 4,
- {1, 0, 1, 1, 1, 0},
- 6,
- {
- {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {16384, 65536, &MPIR_Reduce_binomial_MV2},
- {65536, 262144, &MPIR_Reduce_binomial_MV2},
- {262144, 1048576, &MPIR_Reduce_binomial_MV2},
- {1048576, -1, &MPIR_Reduce_redscat_gather_MV2},
- },
- 5,
- {
- {0, 8192, &MPIR_Reduce_shmem_MV2},
- {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {16384, 65536, &MPIR_Reduce_shmem_MV2},
- {65536, 262144, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {262144, -1, &MPIR_Reduce_binomial_MV2},
- },
- },
- {
- 1024,
- 4,
- 4,
- {1, 0, 1, 1, 1},
- 5,
- {
- {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {16384, 65536, &MPIR_Reduce_binomial_MV2},
- {65536, 262144, &MPIR_Reduce_binomial_MV2},
- {262144, -1, &MPIR_Reduce_binomial_MV2},
- },
- 5,
- {
- {0, 8192, &MPIR_Reduce_shmem_MV2},
- {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {16384, 65536, &MPIR_Reduce_shmem_MV2},
- {65536, 262144, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {262144, -1, &MPIR_Reduce_binomial_MV2},
- },
- },
- {
- 2048,
- 4,
- 4,
- {1, 0, 1, 1, 1,1},
- 6,
- {
- {0, 2048, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {2048, 4096, &MPIR_Reduce_inter_knomial_wrapper_MV2},
- {4096, 16384, &MPIR_Reduce_binomial_MV2},
- {16384, 65536, &MPIR_Reduce_binomial_MV2},
- {65536, 131072, &MPIR_Reduce_binomial_MV2},
- {131072, -1, &MPIR_Reduce_binomial_MV2},
- },
- 6,
- {
- {0, 2048, &MPIR_Reduce_shmem_MV2},
- {2048, 4096, &MPIR_Reduce_shmem_MV2},
- {4096, 16384, &MPIR_Reduce_shmem_MV2},
- {16384, 65536, &MPIR_Reduce_intra_knomial_wrapper_MV2},
- {65536, 131072, &MPIR_Reduce_binomial_MV2},
- {131072, -1, &MPIR_Reduce_shmem_MV2},
- },
- },
-
- };
- memcpy(mv2_reduce_thresholds_table, mv2_tmp_reduce_thresholds_table,
- mv2_size_reduce_tuning_table * sizeof (mv2_reduce_tuning_table));
-}
-
-/************ Reduce scatter variables and initializers */
-
-typedef struct {
- int min;
- int max;
- int (*MV2_pt_Red_scat_function)(void *sendbuf,
- void *recvbuf,
- int *recvcnts,
- MPI_Datatype datatype,
- MPI_Op op,
- MPI_Comm comm_ptr);
-} mv2_red_scat_tuning_element;
-
-typedef struct {
- int numproc;
- int size_inter_table;
- mv2_red_scat_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
-} mv2_red_scat_tuning_table;
-
-int mv2_size_red_scat_tuning_table = 0;
-mv2_red_scat_tuning_table *mv2_red_scat_thresholds_table = NULL;
-
-
-int (*MV2_Red_scat_function)(void *sendbuf,
- void *recvbuf,
- int *recvcnts,
- MPI_Datatype datatype,
- MPI_Op op,
- MPI_Comm comm_ptr);
-
-
-
-static int MPIR_Reduce_Scatter_Basic_MV2(void *sendbuf,
- void *recvbuf,
- int *recvcnts,
- MPI_Datatype datatype,
- MPI_Op op,
- MPI_Comm comm)
-{
- simgrid::smpi::Coll_reduce_scatter_default::reduce_scatter(sendbuf,recvbuf,recvcnts,datatype,op,comm);
- return MPI_SUCCESS;
-}
-#define MPIR_Reduce_scatter_non_comm_MV2 simgrid::smpi::Coll_reduce_scatter_mpich_noncomm::reduce_scatter
-#define MPIR_Reduce_scatter_Rec_Halving_MV2 simgrid::smpi::Coll_reduce_scatter_ompi_basic_recursivehalving::reduce_scatter
-#define MPIR_Reduce_scatter_Pair_Wise_MV2 simgrid::smpi::Coll_reduce_scatter_mpich_pair::reduce_scatter
-
-
-
-
-static void init_mv2_reduce_scatter_tables_stampede(){
- if(simgrid::smpi::Colls::smpi_coll_cleanup_callback==NULL)
- simgrid::smpi::Colls::smpi_coll_cleanup_callback=&smpi_coll_cleanup_mvapich2;
- mv2_size_red_scat_tuning_table = 6;
- mv2_red_scat_thresholds_table = static_cast<mv2_red_scat_tuning_table*>(xbt_malloc(mv2_size_red_scat_tuning_table *
- sizeof (mv2_red_scat_tuning_table)));
- mv2_red_scat_tuning_table mv2_tmp_red_scat_thresholds_table[] = {
- {
- 16,
- 3,
- {
- {0, 64, &MPIR_Reduce_Scatter_Basic_MV2},
- {64, 65536, &MPIR_Reduce_scatter_Rec_Halving_MV2},
- {65536, -1, &MPIR_Reduce_scatter_Pair_Wise_MV2},
- },
- },
- {
- 32,
- 3,
- {
- {0, 64, &MPIR_Reduce_Scatter_Basic_MV2},
- {64, 131072, &MPIR_Reduce_scatter_Rec_Halving_MV2},
- {131072, -1, &MPIR_Reduce_scatter_Pair_Wise_MV2},
- },
- },
- {
- 64,
- 3,
- {
- {0, 1024, &MPIR_Reduce_Scatter_Basic_MV2},
- {1024, 262144, &MPIR_Reduce_scatter_Rec_Halving_MV2},
- {262144, -1, &MPIR_Reduce_scatter_Pair_Wise_MV2},
- },
- },
- {
- 128,
- 2,
- {
- {0, 128, &MPIR_Reduce_Scatter_Basic_MV2},
- {128, -1, &MPIR_Reduce_scatter_Rec_Halving_MV2},
- },
- },
- {
- 256,
- 2,
- {
- {0, 128, &MPIR_Reduce_Scatter_Basic_MV2},
- {128, -1, &MPIR_Reduce_scatter_Rec_Halving_MV2},
- },
- },
- {
- 512,
- 2,
- {
- {0, 256, &MPIR_Reduce_Scatter_Basic_MV2},
- {256, -1, &MPIR_Reduce_scatter_Rec_Halving_MV2},
- },
- },
-
- };
- memcpy(mv2_red_scat_thresholds_table, mv2_tmp_red_scat_thresholds_table,
- mv2_size_red_scat_tuning_table * sizeof (mv2_red_scat_tuning_table));
-}
-
-/************ Scatter variables and initializers */
-
-typedef struct {
- int min;
- int max;
- int (*MV2_pt_Scatter_function)(void *sendbuf,
- int sendcnt,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcnt,
- MPI_Datatype recvtype,
- int root, MPI_Comm comm);
-} mv2_scatter_tuning_element;
-
-typedef struct {
- int numproc;
- int size_inter_table;
- mv2_scatter_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
- int size_intra_table;
- mv2_scatter_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
-} mv2_scatter_tuning_table;
-
-
-int *mv2_scatter_table_ppn_conf = NULL;
-int mv2_scatter_num_ppn_conf = 1;
-int *mv2_size_scatter_tuning_table = NULL;
-mv2_scatter_tuning_table **mv2_scatter_thresholds_table = NULL;
-
-int (*MV2_Scatter_function) (void *sendbuf, int sendcount, MPI_Datatype sendtype,
- void *recvbuf, int recvcount, MPI_Datatype recvtype,
- int root, MPI_Comm comm)=NULL;
-
-int (*MV2_Scatter_intra_function) (void *sendbuf, int sendcount, MPI_Datatype sendtype,
- void *recvbuf, int recvcount, MPI_Datatype recvtype,
- int root, MPI_Comm comm)=NULL;
-int MPIR_Scatter_mcst_wrap_MV2(void *sendbuf,
- int sendcnt,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcnt,
- MPI_Datatype recvtype,
- int root, MPI_Comm comm_ptr);
-
-int MPIR_Scatter_mcst_wrap_MV2(void *sendbuf,
- int sendcnt,
- MPI_Datatype sendtype,
- void *recvbuf,
- int recvcnt,
- MPI_Datatype recvtype,
- int root, MPI_Comm comm_ptr)
-{
- return 0;
-}
-
-#define MPIR_Scatter_MV2_Binomial simgrid::smpi::Coll_scatter_ompi_binomial::scatter
-#define MPIR_Scatter_MV2_Direct simgrid::smpi::Coll_scatter_ompi_basic_linear::scatter
-#define MPIR_Scatter_MV2_two_level_Binomial simgrid::smpi::Coll_scatter_mvapich2_two_level_binomial::scatter
-#define MPIR_Scatter_MV2_two_level_Direct simgrid::smpi::Coll_scatter_mvapich2_two_level_direct::scatter
-
-
-
-
-static void init_mv2_scatter_tables_stampede(){
- if(simgrid::smpi::Colls::smpi_coll_cleanup_callback==NULL)
- simgrid::smpi::Colls::smpi_coll_cleanup_callback=&smpi_coll_cleanup_mvapich2;
-
- int agg_table_sum = 0;
- int i;
- mv2_scatter_tuning_table **table_ptrs = NULL;
- mv2_scatter_num_ppn_conf = 3;
- mv2_scatter_thresholds_table
- = static_cast<mv2_scatter_tuning_table**>(xbt_malloc(sizeof(mv2_scatter_tuning_table *)
- * mv2_scatter_num_ppn_conf));
- table_ptrs = static_cast<mv2_scatter_tuning_table**>(xbt_malloc(sizeof(mv2_scatter_tuning_table *)
- * mv2_scatter_num_ppn_conf));
- mv2_size_scatter_tuning_table = static_cast<int*>(xbt_malloc(sizeof(int) *
- mv2_scatter_num_ppn_conf));
- mv2_scatter_table_ppn_conf
- = static_cast<int*>(xbt_malloc(mv2_scatter_num_ppn_conf * sizeof(int)));
- mv2_scatter_table_ppn_conf[0] = 1;
- mv2_size_scatter_tuning_table[0] = 6;
- mv2_scatter_tuning_table mv2_tmp_scatter_thresholds_table_1ppn[] = {
- {2,
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Binomial},
- },
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Binomial},
- },
- },
-
- {4,
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Direct},
- },
- },
-
- {8,
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Direct},
- },
- },
-
- {16,
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Direct},
- },
- },
-
- {32,
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Direct},
- },
- },
-
- {64,
- 2,
- {
- {0, 32, &MPIR_Scatter_MV2_Binomial},
- {32, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Binomial},
- },
- },
- };
- table_ptrs[0] = mv2_tmp_scatter_thresholds_table_1ppn;
- mv2_scatter_table_ppn_conf[1] = 2;
- mv2_size_scatter_tuning_table[1] = 6;
- mv2_scatter_tuning_table mv2_tmp_scatter_thresholds_table_2ppn[] = {
- {4,
- 2,
- {
- {0, 4096, &MPIR_Scatter_MV2_Binomial},
- {4096, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Direct},
- },
- },
-
- {8,
- 2,
- {
- {0, 512, &MPIR_Scatter_MV2_two_level_Direct},
- {512, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Binomial},
- },
- },
-
- {16,
- 2,
- {
- {0, 2048, &MPIR_Scatter_MV2_two_level_Direct},
- {2048, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Binomial},
- },
- },
-
- {32,
- 2,
- {
- {0, 2048, &MPIR_Scatter_MV2_two_level_Direct},
- {2048, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Binomial},
- },
- },
-
- {64,
- 2,
- {
- {0, 8192, &MPIR_Scatter_MV2_two_level_Direct},
- {8192, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- {0, -1, &MPIR_Scatter_MV2_Binomial},
- },
- },
-
- {128,
- 4,
- {
- {0, 16, &MPIR_Scatter_MV2_Binomial},
- {16, 128, &MPIR_Scatter_MV2_two_level_Binomial},
- {128, 16384, &MPIR_Scatter_MV2_two_level_Direct},
- {16384, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- {0, 128, &MPIR_Scatter_MV2_Direct},
- {128, -1, &MPIR_Scatter_MV2_Binomial},
- },
- },
- };
- table_ptrs[1] = mv2_tmp_scatter_thresholds_table_2ppn;
- mv2_scatter_table_ppn_conf[2] = 16;
- mv2_size_scatter_tuning_table[2] = 8;
- mv2_scatter_tuning_table mv2_tmp_scatter_thresholds_table_16ppn[] = {
- {
- 16,
- 2,
- {
- {0, 256, &MPIR_Scatter_MV2_Binomial},
- {256, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- { 0, -1, &MPIR_Scatter_MV2_Direct},
- },
- },
-
- {
- 32,
- 2,
- {
- {0, 512, &MPIR_Scatter_MV2_Binomial},
- {512, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- { 0, -1, &MPIR_Scatter_MV2_Direct},
- },
- },
-
- {
- 64,
- 2,
- {
- {0, 1024, &MPIR_Scatter_MV2_two_level_Direct},
- {1024, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- { 0, -1, &MPIR_Scatter_MV2_Direct},
- },
- },
-
- {
- 128,
- 4,
- {
- {0, 16, &MPIR_Scatter_mcst_wrap_MV2},
- {0, 16, &MPIR_Scatter_MV2_two_level_Direct},
- {16, 2048, &MPIR_Scatter_MV2_two_level_Direct},
- {2048, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- { 0, -1, &MPIR_Scatter_MV2_Direct},
- },
- },
-
- {
- 256,
- 4,
- {
- {0, 16, &MPIR_Scatter_mcst_wrap_MV2},
- {0, 16, &MPIR_Scatter_MV2_two_level_Direct},
- {16, 2048, &MPIR_Scatter_MV2_two_level_Direct},
- {2048, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- { 0, -1, &MPIR_Scatter_MV2_Direct},
- },
- },
-
- {
- 512,
- 4,
- {
- {0, 16, &MPIR_Scatter_mcst_wrap_MV2},
- {16, 16, &MPIR_Scatter_MV2_two_level_Direct},
- {16, 4096, &MPIR_Scatter_MV2_two_level_Direct},
- {4096, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- { 0, -1, &MPIR_Scatter_MV2_Binomial},
- },
- },
- {
- 1024,
- 5,
- {
- {0, 16, &MPIR_Scatter_mcst_wrap_MV2},
- {0, 16, &MPIR_Scatter_MV2_Binomial},
- {16, 32, &MPIR_Scatter_MV2_Binomial},
- {32, 4096, &MPIR_Scatter_MV2_two_level_Direct},
- {4096, -1, &MPIR_Scatter_MV2_Direct},
- },
- 1,
- {
- { 0, -1, &MPIR_Scatter_MV2_Binomial},
- },
- },
- {
- 2048,
- 7,
- {
- {0, 16, &MPIR_Scatter_mcst_wrap_MV2},
- {0, 16, &MPIR_Scatter_MV2_two_level_Binomial},
- {16, 128, &MPIR_Scatter_MV2_two_level_Binomial},
- {128, 1024, &MPIR_Scatter_MV2_two_level_Direct},
- {1024, 16384, &MPIR_Scatter_MV2_two_level_Direct},
- {16384, 65536, &MPIR_Scatter_MV2_Direct},
- {65536, -1, &MPIR_Scatter_MV2_two_level_Direct},
- },
- 6,
- {
- {0, 16, &MPIR_Scatter_MV2_Binomial},
- {16, 128, &MPIR_Scatter_MV2_Binomial},
- {128, 1024, &MPIR_Scatter_MV2_Binomial},
- {1024, 16384, &MPIR_Scatter_MV2_Direct},
- {16384, 65536, &MPIR_Scatter_MV2_Direct},
- {65536, -1, &MPIR_Scatter_MV2_Direct},
- },
- },
- };
- table_ptrs[2] = mv2_tmp_scatter_thresholds_table_16ppn;
- agg_table_sum = 0;
- for (i = 0; i < mv2_scatter_num_ppn_conf; i++) {
- agg_table_sum += mv2_size_scatter_tuning_table[i];
- }
- mv2_scatter_thresholds_table[0] =
- static_cast<mv2_scatter_tuning_table*>(xbt_malloc(agg_table_sum * sizeof (mv2_scatter_tuning_table)));
- memcpy(mv2_scatter_thresholds_table[0], table_ptrs[0],
- (sizeof(mv2_scatter_tuning_table)
- * mv2_size_scatter_tuning_table[0]));
- for (i = 1; i < mv2_scatter_num_ppn_conf; i++) {
- mv2_scatter_thresholds_table[i] =
- mv2_scatter_thresholds_table[i - 1]
- + mv2_size_scatter_tuning_table[i - 1];
- memcpy(mv2_scatter_thresholds_table[i], table_ptrs[i],
- (sizeof(mv2_scatter_tuning_table)
- * mv2_size_scatter_tuning_table[i]));
- }
- xbt_free(table_ptrs);
-
-}
-
--- /dev/null
+/* selector for collective algorithms based on mvapich decision logic, with calibration from Stampede cluster at TACC*/
+/* This is the tuning used by MVAPICH for Stampede platform based on (MV2_ARCH_INTEL_XEON_E5_2680_16,
+ * MV2_HCA_MLX_CX_FDR) */
+
+/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+/************ Alltoall variables and initializers */
+
+#ifndef SMPI_MVAPICH2_SELECTOR_STAMPEDE_HPP
+#define SMPI_MVAPICH2_SELECTOR_STAMPEDE_HPP
+
+#include <algorithm>
+
+#define MV2_MAX_NB_THRESHOLDS 32
+
+XBT_PUBLIC(void) smpi_coll_cleanup_mvapich2(void);
+
+struct mv2_alltoall_tuning_element {
+ int min;
+ int max;
+ int (*MV2_pt_Alltoall_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+ MPI_Datatype recvtype, MPI_Comm comm_ptr);
+};
+
+struct mv2_alltoall_tuning_table {
+ int numproc;
+ int size_table;
+ mv2_alltoall_tuning_element algo_table[MV2_MAX_NB_THRESHOLDS];
+ mv2_alltoall_tuning_element in_place_algo_table[MV2_MAX_NB_THRESHOLDS];
+};
+
+int (*MV2_Alltoall_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+ MPI_Datatype recvtype, MPI_Comm comm_ptr) = NULL;
+
+/* Indicates number of processes per node */
+int* mv2_alltoall_table_ppn_conf = NULL;
+/* Indicates total number of configurations */
+int mv2_alltoall_num_ppn_conf = 1;
+int* mv2_size_alltoall_tuning_table = NULL;
+mv2_alltoall_tuning_table** mv2_alltoall_thresholds_table = NULL;
+
+#define MPIR_Alltoall_bruck_MV2 simgrid::smpi::Coll_alltoall_bruck::alltoall
+#define MPIR_Alltoall_RD_MV2 simgrid::smpi::Coll_alltoall_rdb::alltoall
+#define MPIR_Alltoall_Scatter_dest_MV2 simgrid::smpi::Coll_alltoall_mvapich2_scatter_dest::alltoall
+#define MPIR_Alltoall_pairwise_MV2 simgrid::smpi::Coll_alltoall_pair::alltoall
+#define MPIR_Alltoall_inplace_MV2 simgrid::smpi::Coll_alltoall_ring::alltoall
+
+static void init_mv2_alltoall_tables_stampede()
+{
+ int agg_table_sum = 0;
+ mv2_alltoall_tuning_table** table_ptrs = NULL;
+ mv2_alltoall_num_ppn_conf = 3;
+ if (simgrid::smpi::Colls::smpi_coll_cleanup_callback == NULL)
+ simgrid::smpi::Colls::smpi_coll_cleanup_callback = &smpi_coll_cleanup_mvapich2;
+ mv2_alltoall_thresholds_table = new mv2_alltoall_tuning_table*[mv2_alltoall_num_ppn_conf];
+ table_ptrs = new mv2_alltoall_tuning_table*[mv2_alltoall_num_ppn_conf];
+ mv2_size_alltoall_tuning_table = new int[mv2_alltoall_num_ppn_conf];
+ mv2_alltoall_table_ppn_conf = new int[mv2_alltoall_num_ppn_conf];
+ mv2_alltoall_table_ppn_conf[0] = 1;
+ mv2_size_alltoall_tuning_table[0] = 6;
+ mv2_alltoall_tuning_table mv2_tmp_alltoall_thresholds_table_1ppn[] = {
+ {
+ 2,
+ 1,
+ {
+ {0, -1, &MPIR_Alltoall_pairwise_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 4,
+ 2,
+ {
+ {0, 262144, &MPIR_Alltoall_Scatter_dest_MV2}, {262144, -1, &MPIR_Alltoall_pairwise_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 8,
+ 2,
+ {
+ {0, 8, &MPIR_Alltoall_RD_MV2}, {8, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 16,
+ 3,
+ {
+ {0, 64, &MPIR_Alltoall_RD_MV2},
+ {64, 512, &MPIR_Alltoall_bruck_MV2},
+ {512, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 32,
+ 3,
+ {
+ {0, 32, &MPIR_Alltoall_RD_MV2},
+ {32, 2048, &MPIR_Alltoall_bruck_MV2},
+ {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 64,
+ 3,
+ {
+ {0, 8, &MPIR_Alltoall_RD_MV2},
+ {8, 1024, &MPIR_Alltoall_bruck_MV2},
+ {1024, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+ };
+ table_ptrs[0] = mv2_tmp_alltoall_thresholds_table_1ppn;
+ mv2_alltoall_table_ppn_conf[1] = 2;
+ mv2_size_alltoall_tuning_table[1] = 6;
+ mv2_alltoall_tuning_table mv2_tmp_alltoall_thresholds_table_2ppn[] = {
+ {
+ 4,
+ 2,
+ {
+ {0, 32, &MPIR_Alltoall_RD_MV2}, {32, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 8,
+ 2,
+ {
+ {0, 64, &MPIR_Alltoall_RD_MV2}, {64, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 16,
+ 3,
+ {
+ {0, 64, &MPIR_Alltoall_RD_MV2},
+ {64, 2048, &MPIR_Alltoall_bruck_MV2},
+ {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 32,
+ 3,
+ {
+ {0, 16, &MPIR_Alltoall_RD_MV2},
+ {16, 2048, &MPIR_Alltoall_bruck_MV2},
+ {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 64,
+ 3,
+ {
+ {0, 8, &MPIR_Alltoall_RD_MV2},
+ {8, 1024, &MPIR_Alltoall_bruck_MV2},
+ {1024, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 128,
+ 3,
+ {
+ {0, 4, &MPIR_Alltoall_RD_MV2},
+ {4, 2048, &MPIR_Alltoall_bruck_MV2},
+ {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {0, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+ };
+ table_ptrs[1] = mv2_tmp_alltoall_thresholds_table_2ppn;
+ mv2_alltoall_table_ppn_conf[2] = 16;
+ mv2_size_alltoall_tuning_table[2] = 7;
+ mv2_alltoall_tuning_table mv2_tmp_alltoall_thresholds_table_16ppn[] = {
+ {
+ 16,
+ 2,
+ {
+ {0, 2048, &MPIR_Alltoall_bruck_MV2}, {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {32768, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 32,
+ 2,
+ {
+ {0, 2048, &MPIR_Alltoall_bruck_MV2}, {2048, -1, &MPIR_Alltoall_Scatter_dest_MV2},
+ },
+
+ {
+ {16384, -1, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 64,
+ 3,
+ {
+ {0, 2048, &MPIR_Alltoall_bruck_MV2},
+ {2048, 16384, &MPIR_Alltoall_Scatter_dest_MV2},
+ {16384, -1, &MPIR_Alltoall_pairwise_MV2},
+ },
+
+ {
+ {32768, 131072, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 128,
+ 2,
+ {
+ {0, 2048, &MPIR_Alltoall_bruck_MV2}, {2048, -1, &MPIR_Alltoall_pairwise_MV2},
+ },
+
+ {
+ {16384, 65536, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 256,
+ 2,
+ {
+ {0, 1024, &MPIR_Alltoall_bruck_MV2}, {1024, -1, &MPIR_Alltoall_pairwise_MV2},
+ },
+
+ {
+ {16384, 65536, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ {
+ 512,
+ 2,
+ {
+ {0, 1024, &MPIR_Alltoall_bruck_MV2}, {1024, -1, &MPIR_Alltoall_pairwise_MV2},
+ },
+
+ {
+ {16384, 65536, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+ {
+ 1024,
+ 2,
+ {
+ {0, 1024, &MPIR_Alltoall_bruck_MV2}, {1024, -1, &MPIR_Alltoall_pairwise_MV2},
+ },
+
+ {
+ {16384, 65536, &MPIR_Alltoall_inplace_MV2},
+ },
+ },
+
+ };
+ table_ptrs[2] = mv2_tmp_alltoall_thresholds_table_16ppn;
+ agg_table_sum = 0;
+ for (int i = 0; i < mv2_alltoall_num_ppn_conf; i++) {
+ agg_table_sum += mv2_size_alltoall_tuning_table[i];
+ }
+ mv2_alltoall_thresholds_table[0] = new mv2_alltoall_tuning_table[agg_table_sum];
+ std::copy_n(table_ptrs[0], mv2_size_alltoall_tuning_table[0], mv2_alltoall_thresholds_table[0]);
+ for (int i = 1; i < mv2_alltoall_num_ppn_conf; i++) {
+ mv2_alltoall_thresholds_table[i] = mv2_alltoall_thresholds_table[i - 1] + mv2_size_alltoall_tuning_table[i - 1];
+ std::copy_n(table_ptrs[i], mv2_size_alltoall_tuning_table[i], mv2_alltoall_thresholds_table[i]);
+ }
+ delete[] table_ptrs;
+}
+
+/************ Allgather variables and initializers */
+
+struct mv2_allgather_tuning_element {
+ int min;
+ int max;
+ int (*MV2_pt_Allgatherction)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+ MPI_Datatype recvtype, MPI_Comm comm_ptr);
+};
+
+struct mv2_allgather_tuning_table {
+ int numproc;
+ int two_level[MV2_MAX_NB_THRESHOLDS];
+ int size_inter_table;
+ mv2_allgather_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
+};
+
+int (*MV2_Allgatherction)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+ MPI_Datatype recvtype, MPI_Comm comm);
+
+int* mv2_allgather_table_ppn_conf = NULL;
+int mv2_allgather_num_ppn_conf = 1;
+int* mv2_size_allgather_tuning_table = NULL;
+mv2_allgather_tuning_table** mv2_allgather_thresholds_table = NULL;
+
+static int MPIR_Allgather_RD_Allgather_Comm_MV2(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+ int recvcount, MPI_Datatype recvtype, MPI_Comm comm_ptr)
+{
+ return 0;
+}
+
+#define MPIR_Allgather_Bruck_MV2 simgrid::smpi::Coll_allgather_bruck::allgather
+#define MPIR_Allgather_RD_MV2 simgrid::smpi::Coll_allgather_rdb::allgather
+#define MPIR_Allgather_Ring_MV2 simgrid::smpi::Coll_allgather_ring::allgather
+#define MPIR_2lvl_Allgather_MV2 simgrid::smpi::Coll_allgather_mvapich2_smp::allgather
+
+static void init_mv2_allgather_tables_stampede()
+{
+ int agg_table_sum = 0;
+
+ if (simgrid::smpi::Colls::smpi_coll_cleanup_callback == NULL)
+ simgrid::smpi::Colls::smpi_coll_cleanup_callback = &smpi_coll_cleanup_mvapich2;
+ mv2_allgather_tuning_table** table_ptrs = NULL;
+ mv2_allgather_num_ppn_conf = 3;
+ mv2_allgather_thresholds_table = new mv2_allgather_tuning_table*[mv2_allgather_num_ppn_conf];
+ table_ptrs = new mv2_allgather_tuning_table*[mv2_allgather_num_ppn_conf];
+ mv2_size_allgather_tuning_table = new int[mv2_allgather_num_ppn_conf];
+ mv2_allgather_table_ppn_conf = new int[mv2_allgather_num_ppn_conf];
+ mv2_allgather_table_ppn_conf[0] = 1;
+ mv2_size_allgather_tuning_table[0] = 6;
+ mv2_allgather_tuning_table mv2_tmp_allgather_thresholds_table_1ppn[] = {
+ {
+ 2,
+ {0},
+ 1,
+ {
+ {0, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 4,
+ {0, 0},
+ 2,
+ {
+ {0, 262144, &MPIR_Allgather_RD_MV2}, {262144, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 8,
+ {0, 0},
+ 2,
+ {
+ {0, 131072, &MPIR_Allgather_RD_MV2}, {131072, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 16,
+ {0, 0},
+ 2,
+ {
+ {0, 131072, &MPIR_Allgather_RD_MV2}, {131072, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 32,
+ {0, 0},
+ 2,
+ {
+ {0, 65536, &MPIR_Allgather_RD_MV2}, {65536, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 64,
+ {0, 0},
+ 2,
+ {
+ {0, 32768, &MPIR_Allgather_RD_MV2}, {32768, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ };
+ table_ptrs[0] = mv2_tmp_allgather_thresholds_table_1ppn;
+ mv2_allgather_table_ppn_conf[1] = 2;
+ mv2_size_allgather_tuning_table[1] = 6;
+ mv2_allgather_tuning_table mv2_tmp_allgather_thresholds_table_2ppn[] = {
+ {
+ 4,
+ {0, 0},
+ 2,
+ {
+ {0, 524288, &MPIR_Allgather_RD_MV2}, {524288, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 8,
+ {0, 1, 0},
+ 2,
+ {
+ {0, 32768, &MPIR_Allgather_RD_MV2},
+ {32768, 524288, &MPIR_Allgather_Ring_MV2},
+ {524288, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 16,
+ {0, 1, 0},
+ 2,
+ {
+ {0, 16384, &MPIR_Allgather_RD_MV2},
+ {16384, 524288, &MPIR_Allgather_Ring_MV2},
+ {524288, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 32,
+ {1, 1, 0},
+ 2,
+ {
+ {0, 65536, &MPIR_Allgather_RD_MV2},
+ {65536, 524288, &MPIR_Allgather_Ring_MV2},
+ {524288, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 64,
+ {1, 1, 0},
+ 2,
+ {
+ {0, 32768, &MPIR_Allgather_RD_MV2},
+ {32768, 524288, &MPIR_Allgather_Ring_MV2},
+ {524288, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 128,
+ {1, 1, 0},
+ 2,
+ {
+ {0, 65536, &MPIR_Allgather_RD_MV2},
+ {65536, 524288, &MPIR_Allgather_Ring_MV2},
+ {524288, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ };
+ table_ptrs[1] = mv2_tmp_allgather_thresholds_table_2ppn;
+ mv2_allgather_table_ppn_conf[2] = 16;
+ mv2_size_allgather_tuning_table[2] = 6;
+ mv2_allgather_tuning_table mv2_tmp_allgather_thresholds_table_16ppn[] = {
+ {
+ 16,
+ {0, 0},
+ 2,
+ {
+ {0, 1024, &MPIR_Allgather_RD_MV2}, {1024, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 32,
+ {0, 0},
+ 2,
+ {
+ {0, 1024, &MPIR_Allgather_RD_Allgather_Comm_MV2}, {1024, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 64,
+ {0, 0},
+ 2,
+ {
+ {0, 1024, &MPIR_Allgather_RD_Allgather_Comm_MV2}, {1024, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 128,
+ {0, 0},
+ 2,
+ {
+ {0, 1024, &MPIR_Allgather_RD_Allgather_Comm_MV2}, {1024, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 256,
+ {0, 0},
+ 2,
+ {
+ {0, 1024, &MPIR_Allgather_RD_Allgather_Comm_MV2}, {1024, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+ {
+ 512,
+ {0, 0},
+ 2,
+ {
+ {0, 1024, &MPIR_Allgather_RD_Allgather_Comm_MV2}, {1024, -1, &MPIR_Allgather_Ring_MV2},
+ },
+ },
+
+ };
+ table_ptrs[2] = mv2_tmp_allgather_thresholds_table_16ppn;
+ agg_table_sum = 0;
+ for (int i = 0; i < mv2_allgather_num_ppn_conf; i++) {
+ agg_table_sum += mv2_size_allgather_tuning_table[i];
+ }
+ mv2_allgather_thresholds_table[0] = new mv2_allgather_tuning_table[agg_table_sum];
+ std::copy_n(table_ptrs[0], mv2_size_allgather_tuning_table[0], mv2_allgather_thresholds_table[0]);
+ for (int i = 1; i < mv2_allgather_num_ppn_conf; i++) {
+ mv2_allgather_thresholds_table[i] = mv2_allgather_thresholds_table[i - 1] + mv2_size_allgather_tuning_table[i - 1];
+ std::copy_n(table_ptrs[i], mv2_size_allgather_tuning_table[i], mv2_allgather_thresholds_table[i]);
+ }
+ delete[] table_ptrs;
+}
+
+/************ Gather variables and initializers */
+
+struct mv2_gather_tuning_element {
+ int min;
+ int max;
+ int (*MV2_pt_Gather_function)(void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
+ MPI_Datatype recvtype, int root, MPI_Comm comm_ptr);
+};
+
+struct mv2_gather_tuning_table {
+ int numproc;
+ int size_inter_table;
+ mv2_gather_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
+ int size_intra_table;
+ mv2_gather_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
+};
+
+int mv2_size_gather_tuning_table = 7;
+mv2_gather_tuning_table* mv2_gather_thresholds_table = NULL;
+
+typedef int (*MV2_Gather_function_ptr)(void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
+ MPI_Datatype recvtype, int root, MPI_Comm comm);
+
+MV2_Gather_function_ptr MV2_Gather_inter_leader_function = NULL;
+MV2_Gather_function_ptr MV2_Gather_intra_node_function = NULL;
+
+#define MPIR_Gather_MV2_Direct simgrid::smpi::Coll_gather_ompi_basic_linear::gather
+#define MPIR_Gather_MV2_two_level_Direct simgrid::smpi::Coll_gather_mvapich2_two_level::gather
+#define MPIR_Gather_intra simgrid::smpi::Coll_gather_mpich::gather
+
+static void init_mv2_gather_tables_stampede()
+{
+
+ if (simgrid::smpi::Colls::smpi_coll_cleanup_callback == NULL)
+ simgrid::smpi::Colls::smpi_coll_cleanup_callback = &smpi_coll_cleanup_mvapich2;
+ mv2_size_gather_tuning_table = 7;
+ mv2_gather_thresholds_table = new mv2_gather_tuning_table[mv2_size_gather_tuning_table];
+ mv2_gather_tuning_table mv2_tmp_gather_thresholds_table[] = {
+ {16,
+ 2,
+ {{0, 524288, &MPIR_Gather_MV2_Direct}, {524288, -1, &MPIR_Gather_intra}},
+ 1,
+ {{0, -1, &MPIR_Gather_MV2_Direct}}},
+ {32,
+ 3,
+ {{0, 16384, &MPIR_Gather_MV2_Direct},
+ {16384, 131072, &MPIR_Gather_intra},
+ {131072, -1, &MPIR_Gather_MV2_two_level_Direct}},
+ 1,
+ {{0, -1, &MPIR_Gather_intra}}},
+ {64,
+ 3,
+ {{0, 256, &MPIR_Gather_MV2_two_level_Direct},
+ {256, 16384, &MPIR_Gather_MV2_Direct},
+ {256, -1, &MPIR_Gather_MV2_two_level_Direct}},
+ 1,
+ {{0, -1, &MPIR_Gather_intra}}},
+ {128,
+ 3,
+ {{0, 512, &MPIR_Gather_MV2_two_level_Direct},
+ {512, 16384, &MPIR_Gather_MV2_Direct},
+ {16384, -1, &MPIR_Gather_MV2_two_level_Direct}},
+ 1,
+ {{0, -1, &MPIR_Gather_intra}}},
+ {256,
+ 3,
+ {{0, 512, &MPIR_Gather_MV2_two_level_Direct},
+ {512, 16384, &MPIR_Gather_MV2_Direct},
+ {16384, -1, &MPIR_Gather_MV2_two_level_Direct}},
+ 1,
+ {{0, -1, &MPIR_Gather_intra}}},
+ {512,
+ 3,
+ {{0, 512, &MPIR_Gather_MV2_two_level_Direct},
+ {512, 16384, &MPIR_Gather_MV2_Direct},
+ {8196, -1, &MPIR_Gather_MV2_two_level_Direct}},
+ 1,
+ {{0, -1, &MPIR_Gather_intra}}},
+ {1024,
+ 3,
+ {{0, 512, &MPIR_Gather_MV2_two_level_Direct},
+ {512, 16384, &MPIR_Gather_MV2_Direct},
+ {8196, -1, &MPIR_Gather_MV2_two_level_Direct}},
+ 1,
+ {{0, -1, &MPIR_Gather_intra}}},
+ };
+
+ std::copy_n(mv2_tmp_gather_thresholds_table, mv2_size_gather_tuning_table, mv2_gather_thresholds_table);
+}
+
+/************ Allgatherv variables and initializers */
+
+struct mv2_allgatherv_tuning_element {
+ int min;
+ int max;
+ int (*MV2_pt_Allgatherv_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int* recvcounts,
+ int* displs, MPI_Datatype recvtype, MPI_Comm commg);
+};
+
+struct mv2_allgatherv_tuning_table {
+ int numproc;
+ int size_inter_table;
+ mv2_allgatherv_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
+};
+
+int (*MV2_Allgatherv_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int* recvcounts,
+ int* displs, MPI_Datatype recvtype, MPI_Comm comm);
+
+int mv2_size_allgatherv_tuning_table = 0;
+mv2_allgatherv_tuning_table* mv2_allgatherv_thresholds_table = NULL;
+
+#define MPIR_Allgatherv_Rec_Doubling_MV2 simgrid::smpi::Coll_allgatherv_mpich_rdb::allgatherv
+#define MPIR_Allgatherv_Bruck_MV2 simgrid::smpi::Coll_allgatherv_ompi_bruck::allgatherv
+#define MPIR_Allgatherv_Ring_MV2 simgrid::smpi::Coll_allgatherv_mpich_ring::allgatherv
+
+static void init_mv2_allgatherv_tables_stampede()
+{
+ if (simgrid::smpi::Colls::smpi_coll_cleanup_callback == NULL)
+ simgrid::smpi::Colls::smpi_coll_cleanup_callback = &smpi_coll_cleanup_mvapich2;
+ mv2_size_allgatherv_tuning_table = 6;
+ mv2_allgatherv_thresholds_table = new mv2_allgatherv_tuning_table[mv2_size_allgatherv_tuning_table];
+ mv2_allgatherv_tuning_table mv2_tmp_allgatherv_thresholds_table[] = {
+ {
+ 16,
+ 2,
+ {
+ {0, 512, &MPIR_Allgatherv_Rec_Doubling_MV2}, {512, -1, &MPIR_Allgatherv_Ring_MV2},
+ },
+ },
+ {
+ 32,
+ 2,
+ {
+ {0, 512, &MPIR_Allgatherv_Rec_Doubling_MV2}, {512, -1, &MPIR_Allgatherv_Ring_MV2},
+ },
+ },
+ {
+ 64,
+ 2,
+ {
+ {0, 256, &MPIR_Allgatherv_Rec_Doubling_MV2}, {256, -1, &MPIR_Allgatherv_Ring_MV2},
+ },
+ },
+ {
+ 128,
+ 2,
+ {
+ {0, 256, &MPIR_Allgatherv_Rec_Doubling_MV2}, {256, -1, &MPIR_Allgatherv_Ring_MV2},
+ },
+ },
+ {
+ 256,
+ 2,
+ {
+ {0, 256, &MPIR_Allgatherv_Rec_Doubling_MV2}, {256, -1, &MPIR_Allgatherv_Ring_MV2},
+ },
+ },
+ {
+ 512,
+ 2,
+ {
+ {0, 256, &MPIR_Allgatherv_Rec_Doubling_MV2}, {256, -1, &MPIR_Allgatherv_Ring_MV2},
+ },
+ },
+
+ };
+ std::copy_n(mv2_tmp_allgatherv_thresholds_table, mv2_size_allgatherv_tuning_table, mv2_allgatherv_thresholds_table);
+}
+
+/************ Allreduce variables and initializers */
+
+struct mv2_allreduce_tuning_element {
+ int min;
+ int max;
+ int (*MV2_pt_Allreducection)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
+ MPI_Comm comm);
+};
+
+struct mv2_allreduce_tuning_table {
+ int numproc;
+ int mcast_enabled;
+ int is_two_level_allreduce[MV2_MAX_NB_THRESHOLDS];
+ int size_inter_table;
+ mv2_allreduce_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
+ int size_intra_table;
+ mv2_allreduce_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
+};
+
+int (*MV2_Allreducection)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
+ MPI_Comm comm) = NULL;
+
+int (*MV2_Allreduce_intra_function)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
+ MPI_Comm comm) = NULL;
+
+int mv2_size_allreduce_tuning_table = 0;
+mv2_allreduce_tuning_table* mv2_allreduce_thresholds_table = NULL;
+
+static int MPIR_Allreduce_mcst_reduce_two_level_helper_MV2(void* sendbuf, void* recvbuf, int count,
+ MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
+{
+ return 0;
+}
+
+static int MPIR_Allreduce_mcst_reduce_redscat_gather_MV2(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
+ MPI_Op op, MPI_Comm comm)
+{
+ return 0;
+}
+
+static int MPIR_Allreduce_reduce_p2p_MV2(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
+ MPI_Comm comm)
+{
+ simgrid::smpi::Colls::reduce(sendbuf, recvbuf, count, datatype, op, 0, comm);
+ return MPI_SUCCESS;
+}
+
+static int MPIR_Allreduce_reduce_shmem_MV2(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
+ MPI_Comm comm)
+{
+ simgrid::smpi::Colls::reduce(sendbuf, recvbuf, count, datatype, op, 0, comm);
+ return MPI_SUCCESS;
+}
+
+#define MPIR_Allreduce_pt2pt_rd_MV2 simgrid::smpi::Coll_allreduce_rdb::allreduce
+#define MPIR_Allreduce_pt2pt_rs_MV2 simgrid::smpi::Coll_allreduce_mvapich2_rs::allreduce
+#define MPIR_Allreduce_two_level_MV2 simgrid::smpi::Coll_allreduce_mvapich2_two_level::allreduce
+
+static void init_mv2_allreduce_tables_stampede()
+{
+ if (simgrid::smpi::Colls::smpi_coll_cleanup_callback == NULL)
+ simgrid::smpi::Colls::smpi_coll_cleanup_callback = &smpi_coll_cleanup_mvapich2;
+ mv2_size_allreduce_tuning_table = 8;
+ mv2_allreduce_thresholds_table = new mv2_allreduce_tuning_table[mv2_size_allreduce_tuning_table];
+ mv2_allreduce_tuning_table mv2_tmp_allreduce_thresholds_table[] = {
+ {
+ 16,
+ 0,
+ {1, 0},
+ 2,
+ {
+ {0, 1024, &MPIR_Allreduce_pt2pt_rd_MV2}, {1024, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
+ },
+ 2,
+ {
+ {0, 1024, &MPIR_Allreduce_reduce_shmem_MV2}, {1024, -1, &MPIR_Allreduce_reduce_p2p_MV2},
+ },
+ },
+ {
+ 32,
+ 0,
+ {1, 1, 0},
+ 3,
+ {
+ {0, 1024, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {1024, 16384, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
+ },
+ 2,
+ {
+ {0, 1024, &MPIR_Allreduce_reduce_shmem_MV2}, {1024, 16384, &MPIR_Allreduce_reduce_p2p_MV2},
+ },
+ },
+ {
+ 64,
+ 0,
+ {1, 1, 0},
+ 3,
+ {
+ {0, 512, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {512, 16384, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
+ },
+ 2,
+ {
+ {0, 512, &MPIR_Allreduce_reduce_shmem_MV2}, {512, 16384, &MPIR_Allreduce_reduce_p2p_MV2},
+ },
+ },
+ {
+ 128,
+ 0,
+ {1, 1, 0},
+ 3,
+ {
+ {0, 512, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {512, 16384, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
+ },
+ 2,
+ {
+ {0, 512, &MPIR_Allreduce_reduce_shmem_MV2}, {512, 16384, &MPIR_Allreduce_reduce_p2p_MV2},
+ },
+ },
+ {
+ 256,
+ 0,
+ {1, 1, 0},
+ 3,
+ {
+ {0, 512, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {512, 16384, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
+ },
+ 2,
+ {
+ {0, 512, &MPIR_Allreduce_reduce_shmem_MV2}, {512, -1, &MPIR_Allreduce_reduce_p2p_MV2},
+ },
+ },
+ {
+ 512,
+ 0,
+ {1, 1, 0},
+ 3,
+ {
+ {0, 512, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {512, 16384, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
+ },
+ 2,
+ {
+ {0, 512, &MPIR_Allreduce_reduce_shmem_MV2}, {512, 16384, &MPIR_Allreduce_reduce_p2p_MV2},
+ },
+ },
+ {
+ 1024,
+ 0,
+ {1, 1, 1, 0},
+ 4,
+ {
+ {0, 512, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {512, 8192, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {8192, 65536, &MPIR_Allreduce_pt2pt_rs_MV2},
+ {65536, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
+ },
+ 2,
+ {
+ {0, 512, &MPIR_Allreduce_reduce_shmem_MV2}, {512, -1, &MPIR_Allreduce_reduce_p2p_MV2},
+ },
+ },
+ {
+ 2048,
+ 0,
+ {1, 1, 1, 0},
+ 4,
+ {
+ {0, 64, &MPIR_Allreduce_pt2pt_rd_MV2},
+ {64, 512, &MPIR_Allreduce_reduce_p2p_MV2},
+ {512, 4096, &MPIR_Allreduce_mcst_reduce_two_level_helper_MV2},
+ {4096, 16384, &MPIR_Allreduce_pt2pt_rs_MV2},
+ {16384, -1, &MPIR_Allreduce_pt2pt_rs_MV2},
+ },
+ 2,
+ {
+ {0, 512, &MPIR_Allreduce_reduce_shmem_MV2}, {512, -1, &MPIR_Allreduce_reduce_p2p_MV2},
+ },
+ },
+
+ };
+ std::copy_n(mv2_tmp_allreduce_thresholds_table, mv2_size_allreduce_tuning_table, mv2_allreduce_thresholds_table);
+}
+
+struct mv2_bcast_tuning_element {
+ int min;
+ int max;
+ int (*MV2_pt_Bcast_function)(void* buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm_ptr);
+ int zcpy_pipelined_knomial_factor;
+};
+
+struct mv2_bcast_tuning_table {
+ int numproc;
+ int bcast_segment_size;
+ int intra_node_knomial_factor;
+ int inter_node_knomial_factor;
+ int is_two_level_bcast[MV2_MAX_NB_THRESHOLDS];
+ int size_inter_table;
+ mv2_bcast_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
+ int size_intra_table;
+ mv2_bcast_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
+};
+
+int mv2_size_bcast_tuning_table = 0;
+mv2_bcast_tuning_table* mv2_bcast_thresholds_table = NULL;
+
+int (*MV2_Bcast_function)(void* buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm_ptr) = NULL;
+
+int (*MV2_Bcast_intra_node_function)(void* buffer, int count, MPI_Datatype datatype, int root,
+ MPI_Comm comm_ptr) = NULL;
+
+int zcpy_knomial_factor = 2;
+int mv2_pipelined_zcpy_knomial_factor = -1;
+int bcast_segment_size = 8192;
+int mv2_inter_node_knomial_factor = 4;
+int mv2_intra_node_knomial_factor = 4;
+#define mv2_bcast_two_level_system_size 64
+#define mv2_bcast_short_msg 16384
+#define mv2_bcast_large_msg 512 * 1024
+
+#define INTRA_NODE_ROOT 0
+
+#define MPIR_Pipelined_Bcast_Zcpy_MV2 simgrid::smpi::Coll_bcast_mpich::bcast
+#define MPIR_Pipelined_Bcast_MV2 simgrid::smpi::Coll_bcast_mpich::bcast
+#define MPIR_Bcast_binomial_MV2 simgrid::smpi::Coll_bcast_binomial_tree::bcast
+#define MPIR_Bcast_scatter_ring_allgather_shm_MV2 simgrid::smpi::Coll_bcast_scatter_LR_allgather::bcast
+#define MPIR_Bcast_scatter_doubling_allgather_MV2 simgrid::smpi::Coll_bcast_scatter_rdb_allgather::bcast
+#define MPIR_Bcast_scatter_ring_allgather_MV2 simgrid::smpi::Coll_bcast_scatter_LR_allgather::bcast
+#define MPIR_Shmem_Bcast_MV2 simgrid::smpi::Coll_bcast_mpich::bcast
+#define MPIR_Bcast_tune_inter_node_helper_MV2 simgrid::smpi::Coll_bcast_mvapich2_inter_node::bcast
+#define MPIR_Bcast_inter_node_helper_MV2 simgrid::smpi::Coll_bcast_mvapich2_inter_node::bcast
+#define MPIR_Knomial_Bcast_intra_node_MV2 simgrid::smpi::Coll_bcast_mvapich2_knomial_intra_node::bcast
+#define MPIR_Bcast_intra_MV2 simgrid::smpi::Coll_bcast_mvapich2_intra_node::bcast
+
+static void init_mv2_bcast_tables_stampede()
+{
+ // Stampede,
+ if (simgrid::smpi::Colls::smpi_coll_cleanup_callback == NULL)
+ simgrid::smpi::Colls::smpi_coll_cleanup_callback = &smpi_coll_cleanup_mvapich2;
+ mv2_size_bcast_tuning_table = 8;
+ mv2_bcast_thresholds_table = new mv2_bcast_tuning_table[mv2_size_bcast_tuning_table];
+
+ mv2_bcast_tuning_table mv2_tmp_bcast_thresholds_table[] = {
+ {16,
+ 8192,
+ 4,
+ 4,
+ {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
+ 11,
+ {{0, 8, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {8, 16, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {16, 1024, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {1024, 8192, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {8192, 16384, &MPIR_Bcast_binomial_MV2, -1},
+ {16384, 32768, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {32768, 65536, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {65536, 131072, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1},
+ {131072, 262144, &MPIR_Bcast_scatter_ring_allgather_MV2, -1},
+ {262144, 524288, &MPIR_Bcast_scatter_doubling_allgather_MV2, -1},
+ {524288, -1, &MPIR_Bcast_scatter_ring_allgather_MV2, -1}},
+ 11,
+ {{0, 8, &MPIR_Shmem_Bcast_MV2, 2},
+ {8, 16, &MPIR_Shmem_Bcast_MV2, 4},
+ {16, 1024, &MPIR_Shmem_Bcast_MV2, 2},
+ {1024, 8192, &MPIR_Shmem_Bcast_MV2, 4},
+ {8192, 16384, &MPIR_Shmem_Bcast_MV2, -1},
+ {16384, 32768, &MPIR_Shmem_Bcast_MV2, 4},
+ {32768, 65536, &MPIR_Shmem_Bcast_MV2, 2},
+ {65536, 131072, &MPIR_Shmem_Bcast_MV2, -1},
+ {131072, 262144, &MPIR_Shmem_Bcast_MV2, -1},
+ {262144, 524288, &MPIR_Shmem_Bcast_MV2, -1},
+ {524288, -1, &MPIR_Shmem_Bcast_MV2, -1}}},
+ {32,
+ 8192,
+ 4,
+ 4,
+ {1, 1, 1, 1, 1, 1, 1, 1},
+ 8,
+ {{0, 128, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {128, 256, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {256, 32768, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {32768, 65536, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {65536, 131072, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {131072, 262144, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
+ {262144, 524288, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {524288, -1, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8}},
+ 8,
+ {{0, 128, &MPIR_Shmem_Bcast_MV2, 2},
+ {128, 256, &MPIR_Shmem_Bcast_MV2, 4},
+ {256, 32768, &MPIR_Shmem_Bcast_MV2, 2},
+ {32768, 65536, &MPIR_Shmem_Bcast_MV2, 4},
+ {65536, 131072, &MPIR_Shmem_Bcast_MV2, 2},
+ {131072, 262144, &MPIR_Shmem_Bcast_MV2, 8},
+ {262144, 524288, &MPIR_Shmem_Bcast_MV2, 2},
+ {524288, -1, &MPIR_Shmem_Bcast_MV2, 8}}},
+ {64,
+ 8192,
+ 4,
+ 4,
+ {1, 1, 1, 1, 1, 1, 1, 1, 1},
+ 9,
+ {{0, 2, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {2, 4, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
+ {4, 16, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {16, 32, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
+ {32, 128, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {128, 256, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
+ {256, 4096, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {4096, 32768, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
+ {32768, -1, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2}},
+ 9,
+ {{0, 2, &MPIR_Shmem_Bcast_MV2, 4},
+ {2, 4, &MPIR_Shmem_Bcast_MV2, 8},
+ {4, 16, &MPIR_Shmem_Bcast_MV2, 4},
+ {16, 32, &MPIR_Shmem_Bcast_MV2, 8},
+ {32, 128, &MPIR_Shmem_Bcast_MV2, 4},
+ {128, 256, &MPIR_Shmem_Bcast_MV2, 8},
+ {256, 4096, &MPIR_Shmem_Bcast_MV2, 4},
+ {4096, 32768, &MPIR_Shmem_Bcast_MV2, 8},
+ {32768, -1, &MPIR_Shmem_Bcast_MV2, 2}}},
+ {128,
+ 8192,
+ 4,
+ 4,
+ {1, 1, 1, 0},
+ 4,
+ {{0, 8192, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
+ {8192, 16384, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {16384, 524288, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {524288, -1, &MPIR_Bcast_scatter_ring_allgather_MV2, -1}},
+ 4,
+ {{0, 8192, &MPIR_Shmem_Bcast_MV2, 8},
+ {8192, 16384, &MPIR_Shmem_Bcast_MV2, 4},
+ {16384, 524288, &MPIR_Shmem_Bcast_MV2, 2},
+ {524288, -1, NULL, -1}}},
+ {256,
+ 8192,
+ 4,
+ 4,
+ {1, 1, 1, 1, 1},
+ 5,
+ {{0, 16384, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {16384, 131072, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {131072, 262144, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1},
+ {262144, 524288, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {524288, -1, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1}},
+ 5,
+ {{0, 16384, &MPIR_Shmem_Bcast_MV2, 4},
+ {16384, 131072, &MPIR_Shmem_Bcast_MV2, 2},
+ {131072, 262144, &MPIR_Shmem_Bcast_MV2, -1},
+ {262144, 524288, &MPIR_Shmem_Bcast_MV2, 2},
+ {524288, -1, &MPIR_Shmem_Bcast_MV2, -1}}},
+ {512,
+ 8192,
+ 4,
+ 4,
+ {1, 1, 1, 1, 1},
+ 5,
+ {{0, 4096, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
+ {4096, 16384, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {16384, 131072, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {131072, 262144, &MPIR_Pipelined_Bcast_MV2, -1},
+ {262144, -1, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1}},
+ 5,
+ {{0, 4096, &MPIR_Shmem_Bcast_MV2, 8},
+ {4096, 16384, &MPIR_Shmem_Bcast_MV2, 4},
+ {16384, 131072, &MPIR_Shmem_Bcast_MV2, 2},
+ {131072, 262144, &MPIR_Shmem_Bcast_MV2, -1},
+ {262144, -1, &MPIR_Shmem_Bcast_MV2, -1}}},
+ {1024,
+ 8192,
+ 4,
+ 4,
+ {1, 1, 1, 1, 1},
+ 5,
+ {{0, 8192, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
+ {8192, 16384, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {16384, 65536, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {65536, 524288, &MPIR_Pipelined_Bcast_MV2, -1},
+ {524288, -1, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1}},
+ 5,
+ {{0, 8192, &MPIR_Shmem_Bcast_MV2, 8},
+ {8192, 16384, &MPIR_Shmem_Bcast_MV2, 4},
+ {16384, 65536, &MPIR_Shmem_Bcast_MV2, 2},
+ {65536, 524288, &MPIR_Shmem_Bcast_MV2, -1},
+ {524288, -1, &MPIR_Shmem_Bcast_MV2, -1}}},
+ {2048,
+ 8192,
+ 4,
+ 4,
+ {1, 1, 1, 1, 1, 1, 1},
+ 7,
+ {{0, 16, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
+ {16, 32, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {32, 4096, &MPIR_Pipelined_Bcast_Zcpy_MV2, 8},
+ {4096, 16384, &MPIR_Pipelined_Bcast_Zcpy_MV2, 4},
+ {16384, 32768, &MPIR_Pipelined_Bcast_Zcpy_MV2, 2},
+ {32768, 524288, &MPIR_Pipelined_Bcast_MV2, -1},
+ {524288, -1, &MPIR_Bcast_scatter_ring_allgather_shm_MV2, -1}},
+ 7,
+ {{0, 16, &MPIR_Shmem_Bcast_MV2, 8},
+ {16, 32, &MPIR_Shmem_Bcast_MV2, 4},
+ {32, 4096, &MPIR_Shmem_Bcast_MV2, 8},
+ {4096, 16384, &MPIR_Shmem_Bcast_MV2, 4},
+ {16384, 32768, &MPIR_Shmem_Bcast_MV2, 2},
+ {32768, 524288, &MPIR_Shmem_Bcast_MV2, -1},
+ {524288, -1, &MPIR_Shmem_Bcast_MV2, -1}}}};
+
+ std::copy_n(mv2_tmp_bcast_thresholds_table, mv2_size_bcast_tuning_table, mv2_bcast_thresholds_table);
+}
+
+/************ Reduce variables and initializers */
+
+struct mv2_reduce_tuning_element {
+ int min;
+ int max;
+ int (*MV2_pt_Reduce_function)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
+ MPI_Comm comm_ptr);
+};
+
+struct mv2_reduce_tuning_table {
+ int numproc;
+ int inter_k_degree;
+ int intra_k_degree;
+ int is_two_level_reduce[MV2_MAX_NB_THRESHOLDS];
+ int size_inter_table;
+ mv2_reduce_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
+ int size_intra_table;
+ mv2_reduce_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
+};
+
+int mv2_size_reduce_tuning_table = 0;
+mv2_reduce_tuning_table* mv2_reduce_thresholds_table = NULL;
+
+int mv2_reduce_intra_knomial_factor = -1;
+int mv2_reduce_inter_knomial_factor = -1;
+
+int (*MV2_Reduce_function)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
+ MPI_Comm comm_ptr) = NULL;
+
+int (*MV2_Reduce_intra_function)(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root,
+ MPI_Comm comm_ptr) = NULL;
+
+#define MPIR_Reduce_inter_knomial_wrapper_MV2 simgrid::smpi::Coll_reduce_mvapich2_knomial::reduce
+#define MPIR_Reduce_intra_knomial_wrapper_MV2 simgrid::smpi::Coll_reduce_mvapich2_knomial::reduce
+#define MPIR_Reduce_binomial_MV2 simgrid::smpi::Coll_reduce_binomial::reduce
+#define MPIR_Reduce_redscat_gather_MV2 simgrid::smpi::Coll_reduce_scatter_gather::reduce
+#define MPIR_Reduce_shmem_MV2 simgrid::smpi::Coll_reduce_ompi_basic_linear::reduce
+#define MPIR_Reduce_two_level_helper_MV2 simgrid::smpi::Coll_reduce_mvapich2_two_level::reduce
+
+static void init_mv2_reduce_tables_stampede()
+{
+ if (simgrid::smpi::Colls::smpi_coll_cleanup_callback == NULL)
+ simgrid::smpi::Colls::smpi_coll_cleanup_callback = &smpi_coll_cleanup_mvapich2;
+ /*Stampede*/
+ mv2_size_reduce_tuning_table = 8;
+ mv2_reduce_thresholds_table = new mv2_reduce_tuning_table[mv2_size_reduce_tuning_table];
+ mv2_reduce_tuning_table mv2_tmp_reduce_thresholds_table[] = {
+ {
+ 16,
+ 4,
+ 4,
+ {1, 0, 0},
+ 3,
+ {
+ {0, 262144, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {262144, 1048576, &MPIR_Reduce_binomial_MV2},
+ {1048576, -1, &MPIR_Reduce_redscat_gather_MV2},
+ },
+ 2,
+ {
+ {0, 65536, &MPIR_Reduce_shmem_MV2}, {65536, -1, &MPIR_Reduce_binomial_MV2},
+ },
+ },
+ {
+ 32,
+ 4,
+ 4,
+ {1, 1, 1, 1, 0, 0, 0},
+ 7,
+ {
+ {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {16384, 32768, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {32768, 65536, &MPIR_Reduce_binomial_MV2},
+ {65536, 262144, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {262144, 1048576, &MPIR_Reduce_binomial_MV2},
+ {1048576, -1, &MPIR_Reduce_redscat_gather_MV2},
+ },
+ 6,
+ {
+ {0, 8192, &MPIR_Reduce_shmem_MV2},
+ {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {16384, 32768, &MPIR_Reduce_shmem_MV2},
+ {32768, 65536, &MPIR_Reduce_shmem_MV2},
+ {65536, 262144, &MPIR_Reduce_shmem_MV2},
+ {262144, -1, &MPIR_Reduce_binomial_MV2},
+ },
+ },
+ {
+ 64,
+ 4,
+ 4,
+ {1, 1, 1, 1, 0},
+ 5,
+ {
+ {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {16384, 65536, &MPIR_Reduce_binomial_MV2},
+ {65536, 262144, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {262144, -1, &MPIR_Reduce_redscat_gather_MV2},
+ },
+ 5,
+ {
+ {0, 8192, &MPIR_Reduce_shmem_MV2},
+ {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {16384, 65536, &MPIR_Reduce_shmem_MV2},
+ {65536, 262144, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {262144, -1, &MPIR_Reduce_binomial_MV2},
+ },
+ },
+ {
+ 128,
+ 4,
+ 4,
+ {1, 0, 1, 0, 1, 0},
+ 6,
+ {
+ {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {16384, 65536, &MPIR_Reduce_binomial_MV2},
+ {65536, 262144, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {262144, 1048576, &MPIR_Reduce_binomial_MV2},
+ {1048576, -1, &MPIR_Reduce_redscat_gather_MV2},
+ },
+ 5,
+ {
+ {0, 8192, &MPIR_Reduce_shmem_MV2},
+ {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {16384, 65536, &MPIR_Reduce_shmem_MV2},
+ {65536, 262144, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {262144, -1, &MPIR_Reduce_binomial_MV2},
+ },
+ },
+ {
+ 256,
+ 4,
+ 4,
+ {1, 1, 1, 0, 1, 1, 0},
+ 7,
+ {
+ {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {16384, 32768, &MPIR_Reduce_binomial_MV2},
+ {32768, 65536, &MPIR_Reduce_binomial_MV2},
+ {65536, 262144, &MPIR_Reduce_binomial_MV2},
+ {262144, 1048576, &MPIR_Reduce_binomial_MV2},
+ {1048576, -1, &MPIR_Reduce_redscat_gather_MV2},
+ },
+ 6,
+ {
+ {0, 8192, &MPIR_Reduce_shmem_MV2},
+ {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {16384, 32768, &MPIR_Reduce_shmem_MV2},
+ {32768, 65536, &MPIR_Reduce_shmem_MV2},
+ {65536, 262144, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {262144, -1, &MPIR_Reduce_binomial_MV2},
+ },
+ },
+ {
+ 512,
+ 4,
+ 4,
+ {1, 0, 1, 1, 1, 0},
+ 6,
+ {
+ {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {16384, 65536, &MPIR_Reduce_binomial_MV2},
+ {65536, 262144, &MPIR_Reduce_binomial_MV2},
+ {262144, 1048576, &MPIR_Reduce_binomial_MV2},
+ {1048576, -1, &MPIR_Reduce_redscat_gather_MV2},
+ },
+ 5,
+ {
+ {0, 8192, &MPIR_Reduce_shmem_MV2},
+ {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {16384, 65536, &MPIR_Reduce_shmem_MV2},
+ {65536, 262144, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {262144, -1, &MPIR_Reduce_binomial_MV2},
+ },
+ },
+ {
+ 1024,
+ 4,
+ 4,
+ {1, 0, 1, 1, 1},
+ 5,
+ {
+ {0, 8192, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {8192, 16384, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {16384, 65536, &MPIR_Reduce_binomial_MV2},
+ {65536, 262144, &MPIR_Reduce_binomial_MV2},
+ {262144, -1, &MPIR_Reduce_binomial_MV2},
+ },
+ 5,
+ {
+ {0, 8192, &MPIR_Reduce_shmem_MV2},
+ {8192, 16384, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {16384, 65536, &MPIR_Reduce_shmem_MV2},
+ {65536, 262144, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {262144, -1, &MPIR_Reduce_binomial_MV2},
+ },
+ },
+ {
+ 2048,
+ 4,
+ 4,
+ {1, 0, 1, 1, 1, 1},
+ 6,
+ {
+ {0, 2048, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {2048, 4096, &MPIR_Reduce_inter_knomial_wrapper_MV2},
+ {4096, 16384, &MPIR_Reduce_binomial_MV2},
+ {16384, 65536, &MPIR_Reduce_binomial_MV2},
+ {65536, 131072, &MPIR_Reduce_binomial_MV2},
+ {131072, -1, &MPIR_Reduce_binomial_MV2},
+ },
+ 6,
+ {
+ {0, 2048, &MPIR_Reduce_shmem_MV2},
+ {2048, 4096, &MPIR_Reduce_shmem_MV2},
+ {4096, 16384, &MPIR_Reduce_shmem_MV2},
+ {16384, 65536, &MPIR_Reduce_intra_knomial_wrapper_MV2},
+ {65536, 131072, &MPIR_Reduce_binomial_MV2},
+ {131072, -1, &MPIR_Reduce_shmem_MV2},
+ },
+ },
+
+ };
+ std::copy_n(mv2_tmp_reduce_thresholds_table, mv2_size_reduce_tuning_table, mv2_reduce_thresholds_table);
+}
+
+/************ Reduce scatter variables and initializers */
+
+struct mv2_red_scat_tuning_element {
+ int min;
+ int max;
+ int (*MV2_pt_Red_scat_function)(void* sendbuf, void* recvbuf, int* recvcnts, MPI_Datatype datatype, MPI_Op op,
+ MPI_Comm comm_ptr);
+};
+
+struct mv2_red_scat_tuning_table {
+ int numproc;
+ int size_inter_table;
+ mv2_red_scat_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
+};
+
+int mv2_size_red_scat_tuning_table = 0;
+mv2_red_scat_tuning_table* mv2_red_scat_thresholds_table = NULL;
+
+int (*MV2_Red_scat_function)(void* sendbuf, void* recvbuf, int* recvcnts, MPI_Datatype datatype, MPI_Op op,
+ MPI_Comm comm_ptr);
+
+static int MPIR_Reduce_Scatter_Basic_MV2(void* sendbuf, void* recvbuf, int* recvcnts, MPI_Datatype datatype, MPI_Op op,
+ MPI_Comm comm)
+{
+ simgrid::smpi::Coll_reduce_scatter_default::reduce_scatter(sendbuf, recvbuf, recvcnts, datatype, op, comm);
+ return MPI_SUCCESS;
+}
+#define MPIR_Reduce_scatter_non_comm_MV2 simgrid::smpi::Coll_reduce_scatter_mpich_noncomm::reduce_scatter
+#define MPIR_Reduce_scatter_Rec_Halving_MV2 \
+ simgrid::smpi::Coll_reduce_scatter_ompi_basic_recursivehalving::reduce_scatter
+#define MPIR_Reduce_scatter_Pair_Wise_MV2 simgrid::smpi::Coll_reduce_scatter_mpich_pair::reduce_scatter
+
+static void init_mv2_reduce_scatter_tables_stampede()
+{
+ if (simgrid::smpi::Colls::smpi_coll_cleanup_callback == NULL)
+ simgrid::smpi::Colls::smpi_coll_cleanup_callback = &smpi_coll_cleanup_mvapich2;
+ mv2_size_red_scat_tuning_table = 6;
+ mv2_red_scat_thresholds_table = new mv2_red_scat_tuning_table[mv2_size_red_scat_tuning_table];
+ mv2_red_scat_tuning_table mv2_tmp_red_scat_thresholds_table[] = {
+ {
+ 16,
+ 3,
+ {
+ {0, 64, &MPIR_Reduce_Scatter_Basic_MV2},
+ {64, 65536, &MPIR_Reduce_scatter_Rec_Halving_MV2},
+ {65536, -1, &MPIR_Reduce_scatter_Pair_Wise_MV2},
+ },
+ },
+ {
+ 32,
+ 3,
+ {
+ {0, 64, &MPIR_Reduce_Scatter_Basic_MV2},
+ {64, 131072, &MPIR_Reduce_scatter_Rec_Halving_MV2},
+ {131072, -1, &MPIR_Reduce_scatter_Pair_Wise_MV2},
+ },
+ },
+ {
+ 64,
+ 3,
+ {
+ {0, 1024, &MPIR_Reduce_Scatter_Basic_MV2},
+ {1024, 262144, &MPIR_Reduce_scatter_Rec_Halving_MV2},
+ {262144, -1, &MPIR_Reduce_scatter_Pair_Wise_MV2},
+ },
+ },
+ {
+ 128,
+ 2,
+ {
+ {0, 128, &MPIR_Reduce_Scatter_Basic_MV2}, {128, -1, &MPIR_Reduce_scatter_Rec_Halving_MV2},
+ },
+ },
+ {
+ 256,
+ 2,
+ {
+ {0, 128, &MPIR_Reduce_Scatter_Basic_MV2}, {128, -1, &MPIR_Reduce_scatter_Rec_Halving_MV2},
+ },
+ },
+ {
+ 512,
+ 2,
+ {
+ {0, 256, &MPIR_Reduce_Scatter_Basic_MV2}, {256, -1, &MPIR_Reduce_scatter_Rec_Halving_MV2},
+ },
+ },
+
+ };
+ std::copy_n(mv2_tmp_red_scat_thresholds_table, mv2_size_red_scat_tuning_table, mv2_red_scat_thresholds_table);
+}
+
+/************ Scatter variables and initializers */
+
+struct mv2_scatter_tuning_element {
+ int min;
+ int max;
+ int (*MV2_pt_Scatter_function)(void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
+ MPI_Datatype recvtype, int root, MPI_Comm comm);
+};
+
+struct mv2_scatter_tuning_table {
+ int numproc;
+ int size_inter_table;
+ mv2_scatter_tuning_element inter_leader[MV2_MAX_NB_THRESHOLDS];
+ int size_intra_table;
+ mv2_scatter_tuning_element intra_node[MV2_MAX_NB_THRESHOLDS];
+};
+
+int* mv2_scatter_table_ppn_conf = NULL;
+int mv2_scatter_num_ppn_conf = 1;
+int* mv2_size_scatter_tuning_table = NULL;
+mv2_scatter_tuning_table** mv2_scatter_thresholds_table = NULL;
+
+int (*MV2_Scatter_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+ MPI_Datatype recvtype, int root, MPI_Comm comm) = NULL;
+
+int (*MV2_Scatter_intra_function)(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+ MPI_Datatype recvtype, int root, MPI_Comm comm) = NULL;
+int MPIR_Scatter_mcst_wrap_MV2(void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
+ MPI_Datatype recvtype, int root, MPI_Comm comm_ptr);
+
+int MPIR_Scatter_mcst_wrap_MV2(void* sendbuf, int sendcnt, MPI_Datatype sendtype, void* recvbuf, int recvcnt,
+ MPI_Datatype recvtype, int root, MPI_Comm comm_ptr)
+{
+ return 0;
+}
+
+#define MPIR_Scatter_MV2_Binomial simgrid::smpi::Coll_scatter_ompi_binomial::scatter
+#define MPIR_Scatter_MV2_Direct simgrid::smpi::Coll_scatter_ompi_basic_linear::scatter
+#define MPIR_Scatter_MV2_two_level_Binomial simgrid::smpi::Coll_scatter_mvapich2_two_level_binomial::scatter
+#define MPIR_Scatter_MV2_two_level_Direct simgrid::smpi::Coll_scatter_mvapich2_two_level_direct::scatter
+
+static void init_mv2_scatter_tables_stampede()
+{
+ if (simgrid::smpi::Colls::smpi_coll_cleanup_callback == NULL)
+ simgrid::smpi::Colls::smpi_coll_cleanup_callback = &smpi_coll_cleanup_mvapich2;
+
+ int agg_table_sum = 0;
+ mv2_scatter_tuning_table** table_ptrs = NULL;
+ mv2_scatter_num_ppn_conf = 3;
+ mv2_scatter_thresholds_table = new mv2_scatter_tuning_table*[mv2_scatter_num_ppn_conf];
+ table_ptrs = new mv2_scatter_tuning_table*[mv2_scatter_num_ppn_conf];
+ mv2_size_scatter_tuning_table = new int[mv2_scatter_num_ppn_conf];
+ mv2_scatter_table_ppn_conf = new int[mv2_scatter_num_ppn_conf];
+ mv2_scatter_table_ppn_conf[0] = 1;
+ mv2_size_scatter_tuning_table[0] = 6;
+ mv2_scatter_tuning_table mv2_tmp_scatter_thresholds_table_1ppn[] = {
+ {
+ 2,
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Binomial},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Binomial},
+ },
+ },
+
+ {
+ 4,
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ },
+
+ {
+ 8,
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ },
+
+ {
+ 16,
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ },
+
+ {
+ 32,
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ },
+
+ {
+ 64,
+ 2,
+ {
+ {0, 32, &MPIR_Scatter_MV2_Binomial}, {32, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Binomial},
+ },
+ },
+ };
+ table_ptrs[0] = mv2_tmp_scatter_thresholds_table_1ppn;
+ mv2_scatter_table_ppn_conf[1] = 2;
+ mv2_size_scatter_tuning_table[1] = 6;
+ mv2_scatter_tuning_table mv2_tmp_scatter_thresholds_table_2ppn[] = {
+ {
+ 4,
+ 2,
+ {
+ {0, 4096, &MPIR_Scatter_MV2_Binomial}, {4096, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ },
+
+ {
+ 8,
+ 2,
+ {
+ {0, 512, &MPIR_Scatter_MV2_two_level_Direct}, {512, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Binomial},
+ },
+ },
+
+ {
+ 16,
+ 2,
+ {
+ {0, 2048, &MPIR_Scatter_MV2_two_level_Direct}, {2048, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Binomial},
+ },
+ },
+
+ {
+ 32,
+ 2,
+ {
+ {0, 2048, &MPIR_Scatter_MV2_two_level_Direct}, {2048, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Binomial},
+ },
+ },
+
+ {
+ 64,
+ 2,
+ {
+ {0, 8192, &MPIR_Scatter_MV2_two_level_Direct}, {8192, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Binomial},
+ },
+ },
+
+ {
+ 128,
+ 4,
+ {
+ {0, 16, &MPIR_Scatter_MV2_Binomial},
+ {16, 128, &MPIR_Scatter_MV2_two_level_Binomial},
+ {128, 16384, &MPIR_Scatter_MV2_two_level_Direct},
+ {16384, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, 128, &MPIR_Scatter_MV2_Direct}, {128, -1, &MPIR_Scatter_MV2_Binomial},
+ },
+ },
+ };
+ table_ptrs[1] = mv2_tmp_scatter_thresholds_table_2ppn;
+ mv2_scatter_table_ppn_conf[2] = 16;
+ mv2_size_scatter_tuning_table[2] = 8;
+ mv2_scatter_tuning_table mv2_tmp_scatter_thresholds_table_16ppn[] = {
+ {
+ 16,
+ 2,
+ {
+ {0, 256, &MPIR_Scatter_MV2_Binomial}, {256, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ },
+
+ {
+ 32,
+ 2,
+ {
+ {0, 512, &MPIR_Scatter_MV2_Binomial}, {512, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ },
+
+ {
+ 64,
+ 2,
+ {
+ {0, 1024, &MPIR_Scatter_MV2_two_level_Direct}, {1024, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ },
+
+ {
+ 128,
+ 4,
+ {
+ {0, 16, &MPIR_Scatter_mcst_wrap_MV2},
+ {0, 16, &MPIR_Scatter_MV2_two_level_Direct},
+ {16, 2048, &MPIR_Scatter_MV2_two_level_Direct},
+ {2048, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ },
+
+ {
+ 256,
+ 4,
+ {
+ {0, 16, &MPIR_Scatter_mcst_wrap_MV2},
+ {0, 16, &MPIR_Scatter_MV2_two_level_Direct},
+ {16, 2048, &MPIR_Scatter_MV2_two_level_Direct},
+ {2048, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ },
+
+ {
+ 512,
+ 4,
+ {
+ {0, 16, &MPIR_Scatter_mcst_wrap_MV2},
+ {16, 16, &MPIR_Scatter_MV2_two_level_Direct},
+ {16, 4096, &MPIR_Scatter_MV2_two_level_Direct},
+ {4096, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Binomial},
+ },
+ },
+ {
+ 1024,
+ 5,
+ {
+ {0, 16, &MPIR_Scatter_mcst_wrap_MV2},
+ {0, 16, &MPIR_Scatter_MV2_Binomial},
+ {16, 32, &MPIR_Scatter_MV2_Binomial},
+ {32, 4096, &MPIR_Scatter_MV2_two_level_Direct},
+ {4096, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ 1,
+ {
+ {0, -1, &MPIR_Scatter_MV2_Binomial},
+ },
+ },
+ {
+ 2048,
+ 7,
+ {
+ {0, 16, &MPIR_Scatter_mcst_wrap_MV2},
+ {0, 16, &MPIR_Scatter_MV2_two_level_Binomial},
+ {16, 128, &MPIR_Scatter_MV2_two_level_Binomial},
+ {128, 1024, &MPIR_Scatter_MV2_two_level_Direct},
+ {1024, 16384, &MPIR_Scatter_MV2_two_level_Direct},
+ {16384, 65536, &MPIR_Scatter_MV2_Direct},
+ {65536, -1, &MPIR_Scatter_MV2_two_level_Direct},
+ },
+ 6,
+ {
+ {0, 16, &MPIR_Scatter_MV2_Binomial},
+ {16, 128, &MPIR_Scatter_MV2_Binomial},
+ {128, 1024, &MPIR_Scatter_MV2_Binomial},
+ {1024, 16384, &MPIR_Scatter_MV2_Direct},
+ {16384, 65536, &MPIR_Scatter_MV2_Direct},
+ {65536, -1, &MPIR_Scatter_MV2_Direct},
+ },
+ },
+ };
+ table_ptrs[2] = mv2_tmp_scatter_thresholds_table_16ppn;
+ agg_table_sum = 0;
+ for (int i = 0; i < mv2_scatter_num_ppn_conf; i++) {
+ agg_table_sum += mv2_size_scatter_tuning_table[i];
+ }
+ mv2_scatter_thresholds_table[0] = new mv2_scatter_tuning_table[agg_table_sum];
+ std::copy_n(table_ptrs[0], mv2_size_scatter_tuning_table[0], mv2_scatter_thresholds_table[0]);
+ for (int i = 1; i < mv2_scatter_num_ppn_conf; i++) {
+ mv2_scatter_thresholds_table[i] = mv2_scatter_thresholds_table[i - 1] + mv2_size_scatter_tuning_table[i - 1];
+ std::copy_n(table_ptrs[i], mv2_size_scatter_tuning_table[i], mv2_scatter_thresholds_table[i]);
+ }
+ delete[] table_ptrs;
+}
+
+#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "colls_private.h"
+#include "colls_private.hpp"
namespace simgrid{
namespace smpi{
+++ /dev/null
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef SMPI_PRIVATE_H
-#define SMPI_PRIVATE_H
-
-#include "smpi/smpi.h"
-#include "simgrid/msg.h" // msg_bar_t
-
-SG_BEGIN_DECL()
-
-#define PERSISTENT 0x1
-#define NON_PERSISTENT 0x2
-#define SEND 0x4
-#define RECV 0x8
-#define RECV_DELETE 0x10
-#define ISEND 0x20
-#define SSEND 0x40
-#define PREPARED 0x80
-#define FINISHED 0x100
-#define RMA 0x200
-#define ACCUMULATE 0x400
-
-enum smpi_process_state{
- SMPI_UNINITIALIZED,
- SMPI_INITIALIZED,
- SMPI_FINALIZED
-};
-
-#define COLL_TAG_REDUCE -112
-#define COLL_TAG_SCATTER -223
-#define COLL_TAG_SCATTERV -334
-#define COLL_TAG_GATHER -445
-#define COLL_TAG_ALLGATHER -556
-#define COLL_TAG_ALLGATHERV -667
-#define COLL_TAG_BARRIER -778
-#define COLL_TAG_REDUCE_SCATTER -889
-#define COLL_TAG_ALLTOALLV -1000
-#define COLL_TAG_ALLTOALL -1112
-#define COLL_TAG_GATHERV -2223
-#define COLL_TAG_BCAST -3334
-#define COLL_TAG_ALLREDUCE -4445
-//SMPI_RMA_TAG has to be the smallest one, as it will be decremented for accumulate ordering.
-#define SMPI_RMA_TAG -6666
-
-/* Convert between Fortran and C */
-
-#define FORT_BOTTOM(addr) ((*(int*)addr) == -200 ? MPI_BOTTOM : (void*)addr)
-#define FORT_IN_PLACE(addr) ((*(int*)addr) == -100 ? MPI_IN_PLACE : (void*)addr)
-#define FORT_STATUS_IGNORE(addr) (static_cast<MPI_Status*>((*(int*)addr) == -300 ? MPI_STATUS_IGNORE : (void*)addr))
-#define FORT_STATUSES_IGNORE(addr) (static_cast<MPI_Status*>((*(int*)addr) == -400 ? MPI_STATUSES_IGNORE : (void*)addr))
-
-extern XBT_PRIVATE MPI_Comm MPI_COMM_UNINITIALIZED;
-
-typedef SMPI_Cart_topology *MPIR_Cart_Topology;
-
-typedef SMPI_Graph_topology *MPIR_Graph_Topology;
-
-typedef SMPI_Dist_Graph_topology *MPIR_Dist_Graph_Topology;
-
-XBT_PRIVATE SMPI_Process* smpi_process();
-XBT_PRIVATE SMPI_Process* smpi_process_remote(int index);
-XBT_PRIVATE int smpi_process_count();
-
-XBT_PRIVATE void smpi_deployment_register_process(const char* instance_id, int rank, int index);
-XBT_PRIVATE MPI_Comm* smpi_deployment_comm_world(const char* instance_id);
-XBT_PRIVATE msg_bar_t smpi_deployment_finalization_barrier(const char* instance_id);
-XBT_PRIVATE void smpi_deployment_cleanup_instances();
-
-XBT_PRIVATE void smpi_comm_copy_buffer_callback(smx_activity_t comm, void *buff, size_t buff_size);
-
-XBT_PRIVATE void smpi_comm_null_copy_buffer_callback(smx_activity_t comm, void *buff, size_t buff_size);
-
-XBT_PRIVATE int smpi_enabled();
-XBT_PRIVATE void smpi_global_init();
-XBT_PRIVATE void smpi_global_destroy();
-XBT_PRIVATE double smpi_mpi_wtime();
-XBT_PRIVATE void smpi_mpi_init();
-
-// utilities
-extern XBT_PRIVATE double smpi_cpu_threshold;
-extern XBT_PRIVATE double smpi_host_speed;
-extern XBT_PRIVATE char* smpi_data_exe_start; // start of the data+bss segment of the executable
-extern XBT_PRIVATE int smpi_data_exe_size; // size of the data+bss segment of the executable
-
-typedef enum { shmalloc_none, shmalloc_local, shmalloc_global } shared_malloc_type;
-extern XBT_PRIVATE shared_malloc_type smpi_cfg_shared_malloc; // Whether to activate shared malloc
-
-XBT_PRIVATE void smpi_switch_data_segment(int dest);
-XBT_PRIVATE void smpi_really_switch_data_segment(int dest);
-XBT_PRIVATE int smpi_is_privatization_file(char* file);
-
-XBT_PRIVATE void smpi_get_executable_global_size();
-XBT_PRIVATE void smpi_initialize_global_memory_segments();
-XBT_PRIVATE void smpi_destroy_global_memory_segments();
-XBT_PRIVATE void smpi_bench_destroy();
-XBT_PRIVATE void smpi_bench_begin();
-XBT_PRIVATE void smpi_bench_end();
-XBT_PRIVATE void smpi_shared_destroy();
-
-XBT_PRIVATE void* smpi_get_tmp_sendbuffer(int size);
-XBT_PRIVATE void* smpi_get_tmp_recvbuffer(int size);
-XBT_PRIVATE void smpi_free_tmp_buffer(void* buf);
-
-
-// f77 wrappers
-void mpi_init_(int* ierr);
-void mpi_finalize_(int* ierr);
-void mpi_abort_(int* comm, int* errorcode, int* ierr);
-void mpi_comm_rank_(int* comm, int* rank, int* ierr);
-void mpi_comm_size_(int* comm, int* size, int* ierr);
-double mpi_wtime_();
-double mpi_wtick_();
-void mpi_initialized_(int* flag, int* ierr);
-
-void mpi_comm_dup_(int* comm, int* newcomm, int* ierr);
-void mpi_comm_create_(int* comm, int* group, int* newcomm, int* ierr);
-void mpi_comm_free_(int* comm, int* ierr);
-void mpi_comm_split_(int* comm, int* color, int* key, int* comm_out, int* ierr);
-void mpi_group_incl_(int* group, int* n, int* key, int* group_out, int* ierr) ;
-void mpi_comm_group_(int* comm, int* group_out, int* ierr);
-void mpi_comm_create_group_ (int* comm, int* group, int, int* comm_out, int* ierr);
-void mpi_send_init_(void *buf, int* count, int* datatype, int* dst, int* tag, int* comm, int* request, int* ierr);
-void mpi_isend_(void *buf, int* count, int* datatype, int* dst, int* tag, int* comm, int* request, int* ierr);
-void mpi_irsend_(void *buf, int* count, int* datatype, int* dst, int* tag, int* comm, int* request, int* ierr);
-void mpi_send_(void* buf, int* count, int* datatype, int* dst, int* tag, int* comm, int* ierr);
-void mpi_rsend_(void* buf, int* count, int* datatype, int* dst, int* tag, int* comm, int* ierr);
-void mpi_recv_init_(void *buf, int* count, int* datatype, int* src, int* tag, int* comm, int* request, int* ierr);
-void mpi_irecv_(void *buf, int* count, int* datatype, int* src, int* tag, int* comm, int* request, int* ierr);
-void mpi_recv_(void* buf, int* count, int* datatype, int* src, int* tag, int* comm, MPI_Status* status, int* ierr);
-void mpi_start_(int* request, int* ierr);
-void mpi_startall_(int* count, int* requests, int* ierr);
-void mpi_wait_(int* request, MPI_Status* status, int* ierr);
-void mpi_waitany_(int* count, int* requests, int* index, MPI_Status* status, int* ierr);
-void mpi_waitall_(int* count, int* requests, MPI_Status* status, int* ierr);
-
-void mpi_barrier_(int* comm, int* ierr);
-void mpi_bcast_(void* buf, int* count, int* datatype, int* root, int* comm, int* ierr);
-void mpi_reduce_(void* sendbuf, void* recvbuf, int* count, int* datatype, int* op, int* root, int* comm, int* ierr);
-void mpi_allreduce_(void* sendbuf, void* recvbuf, int* count, int* datatype, int* op, int* comm, int* ierr);
-void mpi_reduce_scatter_(void* sendbuf, void* recvbuf, int* recvcounts, int* datatype, int* op, int* comm, int* ierr) ;
-void mpi_scatter_(void* sendbuf, int* sendcount, int* sendtype, void* recvbuf, int* recvcount, int* recvtype,
- int* root, int* comm, int* ierr);
-void mpi_scatterv_(void* sendbuf, int* sendcounts, int* displs, int* sendtype,
- void* recvbuf, int* recvcount, int* recvtype, int* root, int* comm, int* ierr);
-void mpi_gather_(void* sendbuf, int* sendcount, int* sendtype, void* recvbuf, int* recvcount, int* recvtype,
- int* root, int* comm, int* ierr);
-void mpi_gatherv_(void* sendbuf, int* sendcount, int* sendtype,
- void* recvbuf, int* recvcounts, int* displs, int* recvtype, int* root, int* comm, int* ierr);
-void mpi_allgather_(void* sendbuf, int* sendcount, int* sendtype,
- void* recvbuf, int* recvcount, int* recvtype, int* comm, int* ierr);
-void mpi_allgatherv_(void* sendbuf, int* sendcount, int* sendtype,
- void* recvbuf, int* recvcount,int* displs, int* recvtype, int* comm, int* ierr) ;
-void mpi_type_size_(int* datatype, int *size, int* ierr);
-
-void mpi_scan_(void* sendbuf, void* recvbuf, int* count, int* datatype, int* op, int* comm, int* ierr);
-void mpi_alltoall_(void* sendbuf, int* sendcount, int* sendtype,
- void* recvbuf, int* recvcount, int* recvtype, int* comm, int* ierr);
-void mpi_alltoallv_(void* sendbuf, int* sendcounts, int* senddisps, int* sendtype,
- void* recvbuf, int* recvcounts, int* recvdisps, int* recvtype, int* comm, int* ierr);
-void mpi_get_processor_name_(char *name, int *resultlen, int* ierr);
-void mpi_test_ (int * request, int *flag, MPI_Status * status, int* ierr);
-void mpi_testall_ (int* count, int * requests, int *flag, MPI_Status * statuses, int* ierr);
-void mpi_get_count_(MPI_Status * status, int* datatype, int *count, int* ierr);
-void mpi_type_extent_(int* datatype, MPI_Aint * extent, int* ierr);
-void mpi_attr_get_(int* comm, int* keyval, void* attr_value, int* flag, int* ierr );
-void mpi_type_commit_(int* datatype, int* ierr);
-void mpi_type_vector_(int* count, int* blocklen, int* stride, int* old_type, int* newtype, int* ierr);
-void mpi_type_hvector_(int* count, int* blocklen, MPI_Aint* stride, int* old_type, int* newtype, int* ierr);
-void mpi_type_create_hvector_(int* count, int* blocklen, MPI_Aint* stride, int* old_type, int* newtype, int* ierr);
-void mpi_type_free_(int* datatype, int* ierr);
-void mpi_type_lb_(int* datatype, MPI_Aint * extent, int* ierr);
-void mpi_type_ub_(int* datatype, MPI_Aint * extent, int* ierr);
-void mpi_win_fence_( int* assert, int* win, int* ierr);
-void mpi_win_free_( int* win, int* ierr);
-void mpi_win_create_( int *base, MPI_Aint* size, int* disp_unit, int* info, int* comm, int *win, int* ierr);
-void mpi_win_set_name_ (int* win, char * name, int* ierr, int size);
-void mpi_win_get_name_ (int* win, char * name, int* len, int* ierr);
-void mpi_win_post_(int* group, int assert, int* win, int* ierr);
-void mpi_win_start_(int* group, int assert, int* win, int* ierr);
-void mpi_win_complete_(int* win, int* ierr);
-void mpi_win_wait_(int* win, int* ierr);
-void mpi_win_allocate_( MPI_Aint* size, int* disp_unit, int* info, int* comm, void* base, int* win, int* ierr);
-void mpi_win_attach_(int* win, int* base, MPI_Aint* size, int* ierr);
-void mpi_win_create_dynamic_( int* info, int* comm, int *win, int* ierr);
-void mpi_win_detach_(int* win, int* base, int* ierr);
-void mpi_win_set_info_(int* win, int* info, int* ierr);
-void mpi_win_get_info_(int* win, int* info, int* ierr);
-void mpi_win_get_group_(int* win, int* group, int* ierr);
-void mpi_win_get_attr_(int* win, int* type_keyval, void* attribute_val, int* flag, int* ierr);
-void mpi_win_set_attr_(int* win, int* type_keyval, void* att, int* ierr);
-void mpi_win_delete_attr_(int* win, int* comm_keyval, int* ierr);
-void mpi_win_create_keyval_(void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr);
-void mpi_win_free_keyval_(int* keyval, int* ierr);
-void mpi_win_lock_(int* lock_type, int* rank, int* assert, int* win, int* ierr);
-void mpi_win_lock_all_(int* assert, int* win, int* ierr);
-void mpi_win_unlock_(int* rank, int* win, int* ierr);
-void mpi_win_unlock_all_(int* win, int* ierr);
-void mpi_win_flush_(int* rank, int* win, int* ierr);
-void mpi_win_flush_local_(int* rank, int* win, int* ierr);
-void mpi_win_flush_all_(int* win, int* ierr);
-void mpi_win_flush_local_all_(int* win, int* ierr);
-void mpi_info_create_( int *info, int* ierr);
-void mpi_info_set_( int *info, char *key, char *value, int* ierr, unsigned int keylen, unsigned int valuelen);
-void mpi_info_free_(int* info, int* ierr);
-void mpi_get_( int *origin_addr, int* origin_count, int* origin_datatype, int* target_rank,
- MPI_Aint* target_disp, int* target_count, int* target_datatype, int* win, int* ierr);
-void mpi_put_( int *origin_addr, int* origin_count, int* origin_datatype, int* target_rank,
- MPI_Aint* target_disp, int* target_count, int* target_datatype, int* win, int* ierr);
-void mpi_rget_( int *origin_addr, int* origin_count, int* origin_datatype, int* target_rank,
- MPI_Aint* target_disp, int* target_count, int* target_datatype, int* win, int* request, int* ierr);
-void mpi_rput_( int *origin_addr, int* origin_count, int* origin_datatype, int* target_rank,
- MPI_Aint* target_disp, int* target_count, int* target_datatype, int* win, int* request, int* ierr);
-void mpi_fetch_and_op_( int *origin_addr, int* result_addr, int* datatype, int* target_rank, MPI_Aint* target_disp, int* op, int* win, int* ierr);
-void mpi_compare_and_swap_( int *origin_addr, int* compare_addr, int* result_addr,
- int* datatype, int* target_rank, MPI_Aint* target_disp, int* win, int* ierr);
-void mpi_get_accumulate_(int *origin_addr, int* origin_count, int* origin_datatype, int* result_addr,
- int* result_count, int* result_datatype, int* target_rank, MPI_Aint* target_disp, int* target_count,
- int* target_datatype, int* op, int* win, int* ierr);
-void mpi_rget_accumulate_(int *origin_addr, int* origin_count, int* origin_datatype, int* result_addr,
- int* result_count, int* result_datatype, int* target_rank, MPI_Aint* target_disp, int* target_count,
- int* target_datatype, int* op, int* win, int* request, int* ierr);
-void mpi_accumulate_( int *origin_addr, int* origin_count, int* origin_datatype, int* target_rank,
- MPI_Aint* target_disp, int* target_count, int* target_datatype, int* op, int* win, int* ierr);
-void mpi_raccumulate_( int *origin_addr, int* origin_count, int* origin_datatype, int* target_rank,
- MPI_Aint* target_disp, int* target_count, int* target_datatype, int* op, int* win, int* request, int* ierr);
-void mpi_error_string_(int* errorcode, char* string, int* resultlen, int* ierr);
-void mpi_sendrecv_(void* sendbuf, int* sendcount, int* sendtype, int* dst, int* sendtag, void *recvbuf, int* recvcount,
- int* recvtype, int* src, int* recvtag, int* comm, MPI_Status* status, int* ierr);
-
-void mpi_finalized_ (int * flag, int* ierr);
-void mpi_init_thread_ (int *required, int *provided, int* ierr);
-void mpi_query_thread_ (int *provided, int* ierr);
-void mpi_is_thread_main_ (int *flag, int* ierr);
-void mpi_address_ (void *location, MPI_Aint * address, int* ierr);
-void mpi_get_address_ (void *location, MPI_Aint * address, int* ierr);
-void mpi_type_dup_ (int* datatype, int* newdatatype, int* ierr);
-void mpi_type_set_name_ (int* datatype, char * name, int* ierr, int size);
-void mpi_type_get_name_ (int* datatype, char * name, int* len, int* ierr);
-void mpi_type_get_attr_ (int* type, int* type_keyval, void *attribute_val, int* flag, int* ierr);
-void mpi_type_set_attr_ (int* type, int* type_keyval, void *attribute_val, int* ierr);
-void mpi_type_delete_attr_ (int* type, int* type_keyval, int* ierr);
-void mpi_type_create_keyval_ (void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr);
-void mpi_type_free_keyval_ (int* keyval, int* ierr) ;
-void mpi_pcontrol_ (int* level , int* ierr);
-void mpi_type_get_extent_ (int* datatype, MPI_Aint * lb, MPI_Aint * extent, int* ierr);
-void mpi_type_get_true_extent_ (int* datatype, MPI_Aint * lb, MPI_Aint * extent, int* ierr);
-void mpi_op_create_ (void * function, int* commute, int* op, int* ierr);
-void mpi_op_free_ (int* op, int* ierr);
-void mpi_op_commutative_ (int* op, int* commute, int* ierr);
-void mpi_group_free_ (int* group, int* ierr);
-void mpi_group_size_ (int* group, int *size, int* ierr);
-void mpi_group_rank_ (int* group, int *rank, int* ierr);
-void mpi_group_translate_ranks_ (int* group1, int* n, int *ranks1, int* group2, int *ranks2, int* ierr);
-void mpi_group_compare_ (int* group1, int* group2, int *result, int* ierr);
-void mpi_group_union_ (int* group1, int* group2, int* newgroup, int* ierr);
-void mpi_group_intersection_ (int* group1, int* group2, int* newgroup, int* ierr);
-void mpi_group_difference_ (int* group1, int* group2, int* newgroup, int* ierr);
-void mpi_group_excl_ (int* group, int* n, int *ranks, int* newgroup, int* ierr);
-void mpi_group_range_incl_ (int* group, int* n, int ranges[][3], int* newgroup, int* ierr);
-void mpi_group_range_excl_ (int* group, int* n, int ranges[][3], int* newgroup, int* ierr);
-void mpi_comm_get_attr_ (int* comm, int* comm_keyval, void *attribute_val, int *flag, int* ierr);
-void mpi_comm_set_attr_ (int* comm, int* comm_keyval, void *attribute_val, int* ierr);
-void mpi_comm_delete_attr_ (int* comm, int* comm_keyval, int* ierr);
-void mpi_comm_create_keyval_ (void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr);
-void mpi_comm_free_keyval_ (int* keyval, int* ierr) ;
-void mpi_comm_get_name_ (int* comm, char* name, int* len, int* ierr);
-void mpi_comm_compare_ (int* comm1, int* comm2, int *result, int* ierr);
-void mpi_comm_disconnect_ (int* comm, int* ierr);
-void mpi_request_free_ (int* request, int* ierr);
-void mpi_sendrecv_replace_ (void *buf, int* count, int* datatype, int* dst, int* sendtag, int* src, int* recvtag,
- int* comm, MPI_Status* status, int* ierr);
-void mpi_testany_ (int* count, int* requests, int *index, int *flag, MPI_Status* status, int* ierr);
-void mpi_waitsome_ (int* incount, int* requests, int *outcount, int *indices, MPI_Status* status, int* ierr);
-void mpi_reduce_local_ (void *inbuf, void *inoutbuf, int* count, int* datatype, int* op, int* ierr);
-void mpi_reduce_scatter_block_ (void *sendbuf, void *recvbuf, int* recvcount, int* datatype, int* op, int* comm,
- int* ierr);
-void mpi_pack_size_ (int* incount, int* datatype, int* comm, int* size, int* ierr) ;
-void mpi_cart_coords_ (int* comm, int* rank, int* maxdims, int* coords, int* ierr) ;
-void mpi_cart_create_ (int* comm_old, int* ndims, int* dims, int* periods, int* reorder, int* comm_cart, int* ierr) ;
-void mpi_cart_get_ (int* comm, int* maxdims, int* dims, int* periods, int* coords, int* ierr) ;
-void mpi_cart_map_ (int* comm_old, int* ndims, int* dims, int* periods, int* newrank, int* ierr) ;
-void mpi_cart_rank_ (int* comm, int* coords, int* rank, int* ierr) ;
-void mpi_cart_shift_ (int* comm, int* direction, int* displ, int* source, int* dest, int* ierr) ;
-void mpi_cart_sub_ (int* comm, int* remain_dims, int* comm_new, int* ierr) ;
-void mpi_cartdim_get_ (int* comm, int* ndims, int* ierr) ;
-void mpi_graph_create_ (int* comm_old, int* nnodes, int* index, int* edges, int* reorder, int* comm_graph, int* ierr) ;
-void mpi_graph_get_ (int* comm, int* maxindex, int* maxedges, int* index, int* edges, int* ierr) ;
-void mpi_graph_map_ (int* comm_old, int* nnodes, int* index, int* edges, int* newrank, int* ierr) ;
-void mpi_graph_neighbors_ (int* comm, int* rank, int* maxneighbors, int* neighbors, int* ierr) ;
-void mpi_graph_neighbors_count_ (int* comm, int* rank, int* nneighbors, int* ierr) ;
-void mpi_graphdims_get_ (int* comm, int* nnodes, int* nedges, int* ierr) ;
-void mpi_topo_test_ (int* comm, int* top_type, int* ierr) ;
-void mpi_error_class_ (int* errorcode, int* errorclass, int* ierr) ;
-void mpi_errhandler_create_ (void* function, void* errhandler, int* ierr) ;
-void mpi_errhandler_free_ (void* errhandler, int* ierr) ;
-void mpi_errhandler_get_ (int* comm, void* errhandler, int* ierr) ;
-void mpi_errhandler_set_ (int* comm, void* errhandler, int* ierr) ;
-void mpi_comm_set_errhandler_ (int* comm, void* errhandler, int* ierr) ;
-void mpi_comm_get_errhandler_ (int* comm, void* errhandler, int* ierr) ;
-void mpi_type_contiguous_ (int* count, int* old_type, int* newtype, int* ierr) ;
-void mpi_cancel_ (int* request, int* ierr) ;
-void mpi_buffer_attach_ (void* buffer, int* size, int* ierr) ;
-void mpi_buffer_detach_ (void* buffer, int* size, int* ierr) ;
-void mpi_testsome_ (int* incount, int* requests, int* outcount, int* indices, MPI_Status* statuses, int* ierr) ;
-void mpi_comm_test_inter_ (int* comm, int* flag, int* ierr) ;
-void mpi_unpack_ (void* inbuf, int* insize, int* position, void* outbuf, int* outcount, int* type, int* comm,
- int* ierr) ;
-void mpi_pack_external_size_ (char *datarep, int* incount, int* datatype, MPI_Aint *size, int* ierr);
-void mpi_pack_external_ (char *datarep, void *inbuf, int* incount, int* datatype, void *outbuf, MPI_Aint* outcount,
- MPI_Aint *position, int* ierr);
-void mpi_unpack_external_ (char *datarep, void *inbuf, MPI_Aint* insize, MPI_Aint *position, void *outbuf,
- int* outcount, int* datatype, int* ierr);
-void mpi_type_hindexed_ (int* count, int* blocklens, MPI_Aint* indices, int* old_type, int* newtype, int* ierr) ;
-void mpi_type_create_hindexed_ (int* count, int* blocklens, MPI_Aint* indices, int* old_type, int* newtype, int* ierr);
-void mpi_type_create_hindexed_block_ (int* count, int* blocklength, MPI_Aint* indices, int* old_type, int* newtype,
- int* ierr) ;
-void mpi_type_indexed_ (int* count, int* blocklens, int* indices, int* old_type, int* newtype, int* ierr) ;
-void mpi_type_create_indexed_ (int* count, int* blocklens, int* indices, int* old_type, int* newtype, int* ierr) ;
-void mpi_type_create_indexed_block_ (int* count, int* blocklength, int* indices, int* old_type, int*newtype,
- int* ierr);
-void mpi_type_struct_ (int* count, int* blocklens, MPI_Aint* indices, int* old_types, int* newtype, int* ierr) ;
-void mpi_type_create_struct_ (int* count, int* blocklens, MPI_Aint* indices, int* old_types, int* newtype, int* ierr);
-void mpi_ssend_ (void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* ierr) ;
-void mpi_ssend_init_ (void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* request, int* ierr) ;
-void mpi_intercomm_create_ (int* local_comm, int* local_leader, int* peer_comm, int* remote_leader, int* tag,
- int* comm_out, int* ierr) ;
-void mpi_intercomm_merge_ (int* comm, int* high, int* comm_out, int* ierr) ;
-void mpi_bsend_ (void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* ierr) ;
-void mpi_bsend_init_ (void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* request, int* ierr) ;
-void mpi_ibsend_ (void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* request, int* ierr) ;
-void mpi_comm_remote_group_ (int* comm, int* group, int* ierr) ;
-void mpi_comm_remote_size_ (int* comm, int* size, int* ierr) ;
-void mpi_issend_ (void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* request, int* ierr) ;
-void mpi_probe_ (int* source, int* tag, int* comm, MPI_Status* status, int* ierr) ;
-void mpi_attr_delete_ (int* comm, int* keyval, int* ierr) ;
-void mpi_attr_put_ (int* comm, int* keyval, void* attr_value, int* ierr) ;
-void mpi_rsend_init_ (void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* request, int* ierr) ;
-void mpi_keyval_create_ (void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr) ;
-void mpi_keyval_free_ (int* keyval, int* ierr) ;
-void mpi_test_cancelled_ (MPI_Status* status, int* flag, int* ierr) ;
-void mpi_pack_ (void* inbuf, int* incount, int* type, void* outbuf, int* outcount, int* position, int* comm, int* ierr);
-void mpi_get_elements_ (MPI_Status* status, int* datatype, int* elements, int* ierr) ;
-void mpi_dims_create_ (int* nnodes, int* ndims, int* dims, int* ierr) ;
-void mpi_iprobe_ (int* source, int* tag, int* comm, int* flag, MPI_Status* status, int* ierr) ;
-void mpi_type_get_envelope_ ( int* datatype, int *num_integers, int *num_addresses, int *num_datatypes, int *combiner,
- int* ierr);
-void mpi_type_get_contents_ (int* datatype, int* max_integers, int* max_addresses, int* max_datatypes,
- int* array_of_integers, MPI_Aint* array_of_addresses,
- int*array_of_datatypes, int* ierr);
-void mpi_type_create_darray_ (int* size, int* rank, int* ndims, int* array_of_gsizes, int* array_of_distribs,
- int* array_of_dargs, int* array_of_psizes,
- int* order, int* oldtype, int*newtype, int* ierr) ;
-void mpi_type_create_resized_ (int* oldtype,MPI_Aint* lb, MPI_Aint* extent, int*newtype, int* ierr);
-void mpi_type_create_subarray_ (int* ndims,int *array_of_sizes, int *array_of_subsizes, int *array_of_starts,
- int* order, int* oldtype, int*newtype, int* ierr);
-void mpi_type_match_size_ (int* typeclass,int* size,int*datatype, int* ierr);
-void mpi_alltoallw_ ( void *sendbuf, int *sendcnts, int *sdispls, int*sendtypes, void *recvbuf, int *recvcnts,
- int *rdispls, int*recvtypes, int* comm, int* ierr);
-void mpi_exscan_ (void *sendbuf, void *recvbuf, int* count, int* datatype, int* op, int* comm, int* ierr);
-void mpi_comm_set_name_ (int* comm, char* name, int* ierr, int size);
-void mpi_comm_dup_with_info_ (int* comm, int* info, int* newcomm, int* ierr);
-void mpi_comm_split_type_ (int* comm, int* split_type, int* key, int* info, int*newcomm, int* ierr);
-void mpi_comm_set_info_ (int* comm, int* info, int* ierr);
-void mpi_comm_get_info_ (int* comm, int* info, int* ierr);
-void mpi_info_get_ (int* info,char *key,int* valuelen, char *value, int *flag, int* ierr, unsigned int keylen);
-void mpi_comm_create_errhandler_ ( void *function, void *errhandler, int* ierr);
-void mpi_add_error_class_ ( int *errorclass, int* ierr);
-void mpi_add_error_code_ ( int* errorclass, int *errorcode, int* ierr);
-void mpi_add_error_string_ ( int* errorcode, char *string, int* ierr);
-void mpi_comm_call_errhandler_ (int* comm,int* errorcode, int* ierr);
-void mpi_info_dup_ (int* info, int* newinfo, int* ierr);
-void mpi_info_get_valuelen_ ( int* info, char *key, int *valuelen, int *flag, int* ierr, unsigned int keylen);
-void mpi_info_delete_ (int* info, char *key, int* ierr, unsigned int keylen);
-void mpi_info_get_nkeys_ ( int* info, int *nkeys, int* ierr);
-void mpi_info_get_nthkey_ ( int* info, int* n, char *key, int* ierr, unsigned int keylen);
-void mpi_get_version_ (int *version,int *subversion, int* ierr);
-void mpi_get_library_version_ (char *version,int *len, int* ierr);
-void mpi_request_get_status_ ( int* request, int *flag, MPI_Status* status, int* ierr);
-void mpi_grequest_start_ ( void *query_fn, void *free_fn, void *cancel_fn, void *extra_state, int*request, int* ierr);
-void mpi_grequest_complete_ ( int* request, int* ierr);
-void mpi_status_set_cancelled_ (MPI_Status* status,int* flag, int* ierr);
-void mpi_status_set_elements_ ( MPI_Status* status, int* datatype, int* count, int* ierr);
-void mpi_comm_connect_ ( char *port_name, int* info, int* root, int* comm, int* newcomm, int* ierr);
-void mpi_publish_name_ ( char *service_name, int* info, char *port_name, int* ierr);
-void mpi_unpublish_name_ ( char *service_name, int* info, char *port_name, int* ierr);
-void mpi_lookup_name_ ( char *service_name, int* info, char *port_name, int* ierr);
-void mpi_comm_join_ ( int* fd, int*intercomm, int* ierr);
-void mpi_open_port_ ( int* info, char *port_name, int* ierr);
-void mpi_close_port_ ( char *port_name, int* ierr);
-void mpi_comm_accept_ ( char *port_name, int* info, int* root, int* comm, int* newcomm, int* ierr);
-void mpi_comm_spawn_ ( char *command, char *argv, int* maxprocs, int* info, int* root, int* comm, int*intercomm,
- int* array_of_errcodes, int* ierr);
-void mpi_comm_spawn_multiple_ ( int* count, char *array_of_commands, char** array_of_argv, int* array_of_maxprocs,
- int* array_of_info, int* root, int* comm, int*intercomm, int* array_of_errcodes, int* ierr);
-void mpi_comm_get_parent_ ( int*parent, int* ierr);
-void mpi_file_close_ ( int* file, int* ierr);
-void mpi_file_delete_ ( char* filename, int* info, int* ierr);
-void mpi_file_open_ ( int* comm, char* filename, int* amode, int* info, int* fh, int* ierr);
-void mpi_file_set_view_ ( int* fh, long long int* offset, int* etype, int* filetype, char* datarep, int* info, int* ierr);
-void mpi_file_read_ ( int* fh, void* buf, int* count, int* datatype, MPI_Status* status, int* ierr);
-void mpi_file_write_ ( int* fh, void* buf, int* count, int* datatype, MPI_Status* status, int* ierr);
-
-// TODO, make this static and expose it more cleanly
-
-typedef struct s_smpi_privatization_region {
- void* address;
- int file_descriptor;
-} s_smpi_privatization_region_t;
-typedef s_smpi_privatization_region_t* smpi_privatization_region_t;
-
-extern XBT_PRIVATE smpi_privatization_region_t smpi_privatization_regions;
-extern XBT_PRIVATE int smpi_loaded_page;
-extern XBT_PRIVATE int smpi_universe_size;
-
-SG_END_DECL()
-#endif
-/* Copyright (c) 2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#ifndef SMPI_PRIVATE_HPP
#define SMPI_PRIVATE_HPP
-#include "src/instr/instr_smpi.h"
+#include "simgrid/msg.h" // msg_bar_t
+#include "smpi/smpi.h"
+#include "src/instr/instr_smpi.hpp"
+#include "src/internal_config.h"
#include <unordered_map>
#include <vector>
-#include "src/internal_config.h"
+
+extern "C" {
+
+#define PERSISTENT 0x1
+#define NON_PERSISTENT 0x2
+#define SEND 0x4
+#define RECV 0x8
+#define RECV_DELETE 0x10
+#define ISEND 0x20
+#define SSEND 0x40
+#define PREPARED 0x80
+#define FINISHED 0x100
+#define RMA 0x200
+#define ACCUMULATE 0x400
+
+enum smpi_process_state { SMPI_UNINITIALIZED, SMPI_INITIALIZED, SMPI_FINALIZED };
+
+#define COLL_TAG_REDUCE -112
+#define COLL_TAG_SCATTER -223
+#define COLL_TAG_SCATTERV -334
+#define COLL_TAG_GATHER -445
+#define COLL_TAG_ALLGATHER -556
+#define COLL_TAG_ALLGATHERV -667
+#define COLL_TAG_BARRIER -778
+#define COLL_TAG_REDUCE_SCATTER -889
+#define COLL_TAG_ALLTOALLV -1000
+#define COLL_TAG_ALLTOALL -1112
+#define COLL_TAG_GATHERV -2223
+#define COLL_TAG_BCAST -3334
+#define COLL_TAG_ALLREDUCE -4445
+// SMPI_RMA_TAG has to be the smallest one, as it will be decremented for accumulate ordering.
+#define SMPI_RMA_TAG -6666
+
+/* Convert between Fortran and C */
+
+#define FORT_BOTTOM(addr) ((*(int*)addr) == -200 ? MPI_BOTTOM : (void*)addr)
+#define FORT_IN_PLACE(addr) ((*(int*)addr) == -100 ? MPI_IN_PLACE : (void*)addr)
+#define FORT_STATUS_IGNORE(addr) (static_cast<MPI_Status*>((*(int*)addr) == -300 ? MPI_STATUS_IGNORE : (void*)addr))
+#define FORT_STATUSES_IGNORE(addr) (static_cast<MPI_Status*>((*(int*)addr) == -400 ? MPI_STATUSES_IGNORE : (void*)addr))
+
+extern XBT_PRIVATE MPI_Comm MPI_COMM_UNINITIALIZED;
+
+typedef SMPI_Cart_topology* MPIR_Cart_Topology;
+
+typedef SMPI_Graph_topology* MPIR_Graph_Topology;
+
+typedef SMPI_Dist_Graph_topology* MPIR_Dist_Graph_Topology;
+
+XBT_PRIVATE SMPI_Process* smpi_process();
+XBT_PRIVATE SMPI_Process* smpi_process_remote(int index);
+XBT_PRIVATE int smpi_process_count();
+
+XBT_PRIVATE void smpi_deployment_register_process(const char* instance_id, int rank, int index);
+XBT_PRIVATE MPI_Comm* smpi_deployment_comm_world(const char* instance_id);
+XBT_PRIVATE msg_bar_t smpi_deployment_finalization_barrier(const char* instance_id);
+XBT_PRIVATE void smpi_deployment_cleanup_instances();
+
+XBT_PRIVATE void smpi_comm_copy_buffer_callback(smx_activity_t comm, void* buff, size_t buff_size);
+
+XBT_PRIVATE void smpi_comm_null_copy_buffer_callback(smx_activity_t comm, void* buff, size_t buff_size);
+
+XBT_PRIVATE int smpi_enabled();
+XBT_PRIVATE void smpi_global_init();
+XBT_PRIVATE void smpi_global_destroy();
+XBT_PRIVATE double smpi_mpi_wtime();
+XBT_PRIVATE void smpi_mpi_init();
+
+// utilities
+extern XBT_PRIVATE double smpi_cpu_threshold;
+extern XBT_PRIVATE double smpi_host_speed;
+extern XBT_PRIVATE char* smpi_data_exe_start; // start of the data+bss segment of the executable
+extern XBT_PRIVATE int smpi_data_exe_size; // size of the data+bss segment of the executable
+
+enum shared_malloc_type { shmalloc_none, shmalloc_local, shmalloc_global };
+extern XBT_PRIVATE shared_malloc_type smpi_cfg_shared_malloc; // Whether to activate shared malloc
+
+XBT_PRIVATE void smpi_switch_data_segment(int dest);
+XBT_PRIVATE void smpi_really_switch_data_segment(int dest);
+XBT_PRIVATE int smpi_is_privatization_file(char* file);
+
+XBT_PRIVATE void smpi_get_executable_global_size();
+XBT_PRIVATE void smpi_initialize_global_memory_segments();
+XBT_PRIVATE void smpi_destroy_global_memory_segments();
+XBT_PRIVATE void smpi_bench_destroy();
+XBT_PRIVATE void smpi_bench_begin();
+XBT_PRIVATE void smpi_bench_end();
+XBT_PRIVATE void smpi_shared_destroy();
+
+XBT_PRIVATE void* smpi_get_tmp_sendbuffer(int size);
+XBT_PRIVATE void* smpi_get_tmp_recvbuffer(int size);
+XBT_PRIVATE void smpi_free_tmp_buffer(void* buf);
+
+// f77 wrappers
+void mpi_init_(int* ierr);
+void mpi_finalize_(int* ierr);
+void mpi_abort_(int* comm, int* errorcode, int* ierr);
+void mpi_comm_rank_(int* comm, int* rank, int* ierr);
+void mpi_comm_size_(int* comm, int* size, int* ierr);
+double mpi_wtime_();
+double mpi_wtick_();
+void mpi_initialized_(int* flag, int* ierr);
+
+void mpi_comm_dup_(int* comm, int* newcomm, int* ierr);
+void mpi_comm_create_(int* comm, int* group, int* newcomm, int* ierr);
+void mpi_comm_free_(int* comm, int* ierr);
+void mpi_comm_split_(int* comm, int* color, int* key, int* comm_out, int* ierr);
+void mpi_group_incl_(int* group, int* n, int* key, int* group_out, int* ierr);
+void mpi_comm_group_(int* comm, int* group_out, int* ierr);
+void mpi_comm_create_group_(int* comm, int* group, int, int* comm_out, int* ierr);
+void mpi_send_init_(void* buf, int* count, int* datatype, int* dst, int* tag, int* comm, int* request, int* ierr);
+void mpi_isend_(void* buf, int* count, int* datatype, int* dst, int* tag, int* comm, int* request, int* ierr);
+void mpi_irsend_(void* buf, int* count, int* datatype, int* dst, int* tag, int* comm, int* request, int* ierr);
+void mpi_send_(void* buf, int* count, int* datatype, int* dst, int* tag, int* comm, int* ierr);
+void mpi_rsend_(void* buf, int* count, int* datatype, int* dst, int* tag, int* comm, int* ierr);
+void mpi_recv_init_(void* buf, int* count, int* datatype, int* src, int* tag, int* comm, int* request, int* ierr);
+void mpi_irecv_(void* buf, int* count, int* datatype, int* src, int* tag, int* comm, int* request, int* ierr);
+void mpi_recv_(void* buf, int* count, int* datatype, int* src, int* tag, int* comm, MPI_Status* status, int* ierr);
+void mpi_start_(int* request, int* ierr);
+void mpi_startall_(int* count, int* requests, int* ierr);
+void mpi_wait_(int* request, MPI_Status* status, int* ierr);
+void mpi_waitany_(int* count, int* requests, int* index, MPI_Status* status, int* ierr);
+void mpi_waitall_(int* count, int* requests, MPI_Status* status, int* ierr);
+
+void mpi_barrier_(int* comm, int* ierr);
+void mpi_bcast_(void* buf, int* count, int* datatype, int* root, int* comm, int* ierr);
+void mpi_reduce_(void* sendbuf, void* recvbuf, int* count, int* datatype, int* op, int* root, int* comm, int* ierr);
+void mpi_allreduce_(void* sendbuf, void* recvbuf, int* count, int* datatype, int* op, int* comm, int* ierr);
+void mpi_reduce_scatter_(void* sendbuf, void* recvbuf, int* recvcounts, int* datatype, int* op, int* comm, int* ierr);
+void mpi_scatter_(void* sendbuf, int* sendcount, int* sendtype, void* recvbuf, int* recvcount, int* recvtype, int* root,
+ int* comm, int* ierr);
+void mpi_scatterv_(void* sendbuf, int* sendcounts, int* displs, int* sendtype, void* recvbuf, int* recvcount,
+ int* recvtype, int* root, int* comm, int* ierr);
+void mpi_gather_(void* sendbuf, int* sendcount, int* sendtype, void* recvbuf, int* recvcount, int* recvtype, int* root,
+ int* comm, int* ierr);
+void mpi_gatherv_(void* sendbuf, int* sendcount, int* sendtype, void* recvbuf, int* recvcounts, int* displs,
+ int* recvtype, int* root, int* comm, int* ierr);
+void mpi_allgather_(void* sendbuf, int* sendcount, int* sendtype, void* recvbuf, int* recvcount, int* recvtype,
+ int* comm, int* ierr);
+void mpi_allgatherv_(void* sendbuf, int* sendcount, int* sendtype, void* recvbuf, int* recvcount, int* displs,
+ int* recvtype, int* comm, int* ierr);
+void mpi_type_size_(int* datatype, int* size, int* ierr);
+
+void mpi_scan_(void* sendbuf, void* recvbuf, int* count, int* datatype, int* op, int* comm, int* ierr);
+void mpi_alltoall_(void* sendbuf, int* sendcount, int* sendtype, void* recvbuf, int* recvcount, int* recvtype,
+ int* comm, int* ierr);
+void mpi_alltoallv_(void* sendbuf, int* sendcounts, int* senddisps, int* sendtype, void* recvbuf, int* recvcounts,
+ int* recvdisps, int* recvtype, int* comm, int* ierr);
+void mpi_get_processor_name_(char* name, int* resultlen, int* ierr);
+void mpi_test_(int* request, int* flag, MPI_Status* status, int* ierr);
+void mpi_testall_(int* count, int* requests, int* flag, MPI_Status* statuses, int* ierr);
+void mpi_get_count_(MPI_Status* status, int* datatype, int* count, int* ierr);
+void mpi_type_extent_(int* datatype, MPI_Aint* extent, int* ierr);
+void mpi_attr_get_(int* comm, int* keyval, void* attr_value, int* flag, int* ierr);
+void mpi_type_commit_(int* datatype, int* ierr);
+void mpi_type_vector_(int* count, int* blocklen, int* stride, int* old_type, int* newtype, int* ierr);
+void mpi_type_hvector_(int* count, int* blocklen, MPI_Aint* stride, int* old_type, int* newtype, int* ierr);
+void mpi_type_create_hvector_(int* count, int* blocklen, MPI_Aint* stride, int* old_type, int* newtype, int* ierr);
+void mpi_type_free_(int* datatype, int* ierr);
+void mpi_type_lb_(int* datatype, MPI_Aint* extent, int* ierr);
+void mpi_type_ub_(int* datatype, MPI_Aint* extent, int* ierr);
+void mpi_win_fence_(int* assert, int* win, int* ierr);
+void mpi_win_free_(int* win, int* ierr);
+void mpi_win_create_(int* base, MPI_Aint* size, int* disp_unit, int* info, int* comm, int* win, int* ierr);
+void mpi_win_set_name_(int* win, char* name, int* ierr, int size);
+void mpi_win_get_name_(int* win, char* name, int* len, int* ierr);
+void mpi_win_post_(int* group, int assert, int* win, int* ierr);
+void mpi_win_start_(int* group, int assert, int* win, int* ierr);
+void mpi_win_complete_(int* win, int* ierr);
+void mpi_win_wait_(int* win, int* ierr);
+void mpi_win_allocate_(MPI_Aint* size, int* disp_unit, int* info, int* comm, void* base, int* win, int* ierr);
+void mpi_win_attach_(int* win, int* base, MPI_Aint* size, int* ierr);
+void mpi_win_create_dynamic_(int* info, int* comm, int* win, int* ierr);
+void mpi_win_detach_(int* win, int* base, int* ierr);
+void mpi_win_set_info_(int* win, int* info, int* ierr);
+void mpi_win_get_info_(int* win, int* info, int* ierr);
+void mpi_win_get_group_(int* win, int* group, int* ierr);
+void mpi_win_get_attr_(int* win, int* type_keyval, void* attribute_val, int* flag, int* ierr);
+void mpi_win_set_attr_(int* win, int* type_keyval, void* att, int* ierr);
+void mpi_win_delete_attr_(int* win, int* comm_keyval, int* ierr);
+void mpi_win_create_keyval_(void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr);
+void mpi_win_free_keyval_(int* keyval, int* ierr);
+void mpi_win_lock_(int* lock_type, int* rank, int* assert, int* win, int* ierr);
+void mpi_win_lock_all_(int* assert, int* win, int* ierr);
+void mpi_win_unlock_(int* rank, int* win, int* ierr);
+void mpi_win_unlock_all_(int* win, int* ierr);
+void mpi_win_flush_(int* rank, int* win, int* ierr);
+void mpi_win_flush_local_(int* rank, int* win, int* ierr);
+void mpi_win_flush_all_(int* win, int* ierr);
+void mpi_win_flush_local_all_(int* win, int* ierr);
+void mpi_info_create_(int* info, int* ierr);
+void mpi_info_set_(int* info, char* key, char* value, int* ierr, unsigned int keylen, unsigned int valuelen);
+void mpi_info_free_(int* info, int* ierr);
+void mpi_get_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank, MPI_Aint* target_disp,
+ int* target_count, int* target_datatype, int* win, int* ierr);
+void mpi_put_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank, MPI_Aint* target_disp,
+ int* target_count, int* target_datatype, int* win, int* ierr);
+void mpi_rget_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank, MPI_Aint* target_disp,
+ int* target_count, int* target_datatype, int* win, int* request, int* ierr);
+void mpi_rput_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank, MPI_Aint* target_disp,
+ int* target_count, int* target_datatype, int* win, int* request, int* ierr);
+void mpi_fetch_and_op_(int* origin_addr, int* result_addr, int* datatype, int* target_rank, MPI_Aint* target_disp,
+ int* op, int* win, int* ierr);
+void mpi_compare_and_swap_(int* origin_addr, int* compare_addr, int* result_addr, int* datatype, int* target_rank,
+ MPI_Aint* target_disp, int* win, int* ierr);
+void mpi_get_accumulate_(int* origin_addr, int* origin_count, int* origin_datatype, int* result_addr, int* result_count,
+ int* result_datatype, int* target_rank, MPI_Aint* target_disp, int* target_count,
+ int* target_datatype, int* op, int* win, int* ierr);
+void mpi_rget_accumulate_(int* origin_addr, int* origin_count, int* origin_datatype, int* result_addr,
+ int* result_count, int* result_datatype, int* target_rank, MPI_Aint* target_disp,
+ int* target_count, int* target_datatype, int* op, int* win, int* request, int* ierr);
+void mpi_accumulate_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank, MPI_Aint* target_disp,
+ int* target_count, int* target_datatype, int* op, int* win, int* ierr);
+void mpi_raccumulate_(int* origin_addr, int* origin_count, int* origin_datatype, int* target_rank,
+ MPI_Aint* target_disp, int* target_count, int* target_datatype, int* op, int* win, int* request,
+ int* ierr);
+void mpi_error_string_(int* errorcode, char* string, int* resultlen, int* ierr);
+void mpi_sendrecv_(void* sendbuf, int* sendcount, int* sendtype, int* dst, int* sendtag, void* recvbuf, int* recvcount,
+ int* recvtype, int* src, int* recvtag, int* comm, MPI_Status* status, int* ierr);
+
+void mpi_finalized_(int* flag, int* ierr);
+void mpi_init_thread_(int* required, int* provided, int* ierr);
+void mpi_query_thread_(int* provided, int* ierr);
+void mpi_is_thread_main_(int* flag, int* ierr);
+void mpi_address_(void* location, MPI_Aint* address, int* ierr);
+void mpi_get_address_(void* location, MPI_Aint* address, int* ierr);
+void mpi_type_dup_(int* datatype, int* newdatatype, int* ierr);
+void mpi_type_set_name_(int* datatype, char* name, int* ierr, int size);
+void mpi_type_get_name_(int* datatype, char* name, int* len, int* ierr);
+void mpi_type_get_attr_(int* type, int* type_keyval, void* attribute_val, int* flag, int* ierr);
+void mpi_type_set_attr_(int* type, int* type_keyval, void* attribute_val, int* ierr);
+void mpi_type_delete_attr_(int* type, int* type_keyval, int* ierr);
+void mpi_type_create_keyval_(void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr);
+void mpi_type_free_keyval_(int* keyval, int* ierr);
+void mpi_pcontrol_(int* level, int* ierr);
+void mpi_type_get_extent_(int* datatype, MPI_Aint* lb, MPI_Aint* extent, int* ierr);
+void mpi_type_get_true_extent_(int* datatype, MPI_Aint* lb, MPI_Aint* extent, int* ierr);
+void mpi_op_create_(void* function, int* commute, int* op, int* ierr);
+void mpi_op_free_(int* op, int* ierr);
+void mpi_op_commutative_(int* op, int* commute, int* ierr);
+void mpi_group_free_(int* group, int* ierr);
+void mpi_group_size_(int* group, int* size, int* ierr);
+void mpi_group_rank_(int* group, int* rank, int* ierr);
+void mpi_group_translate_ranks_(int* group1, int* n, int* ranks1, int* group2, int* ranks2, int* ierr);
+void mpi_group_compare_(int* group1, int* group2, int* result, int* ierr);
+void mpi_group_union_(int* group1, int* group2, int* newgroup, int* ierr);
+void mpi_group_intersection_(int* group1, int* group2, int* newgroup, int* ierr);
+void mpi_group_difference_(int* group1, int* group2, int* newgroup, int* ierr);
+void mpi_group_excl_(int* group, int* n, int* ranks, int* newgroup, int* ierr);
+void mpi_group_range_incl_(int* group, int* n, int ranges[][3], int* newgroup, int* ierr);
+void mpi_group_range_excl_(int* group, int* n, int ranges[][3], int* newgroup, int* ierr);
+void mpi_comm_get_attr_(int* comm, int* comm_keyval, void* attribute_val, int* flag, int* ierr);
+void mpi_comm_set_attr_(int* comm, int* comm_keyval, void* attribute_val, int* ierr);
+void mpi_comm_delete_attr_(int* comm, int* comm_keyval, int* ierr);
+void mpi_comm_create_keyval_(void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr);
+void mpi_comm_free_keyval_(int* keyval, int* ierr);
+void mpi_comm_get_name_(int* comm, char* name, int* len, int* ierr);
+void mpi_comm_compare_(int* comm1, int* comm2, int* result, int* ierr);
+void mpi_comm_disconnect_(int* comm, int* ierr);
+void mpi_request_free_(int* request, int* ierr);
+void mpi_sendrecv_replace_(void* buf, int* count, int* datatype, int* dst, int* sendtag, int* src, int* recvtag,
+ int* comm, MPI_Status* status, int* ierr);
+void mpi_testany_(int* count, int* requests, int* index, int* flag, MPI_Status* status, int* ierr);
+void mpi_waitsome_(int* incount, int* requests, int* outcount, int* indices, MPI_Status* status, int* ierr);
+void mpi_reduce_local_(void* inbuf, void* inoutbuf, int* count, int* datatype, int* op, int* ierr);
+void mpi_reduce_scatter_block_(void* sendbuf, void* recvbuf, int* recvcount, int* datatype, int* op, int* comm,
+ int* ierr);
+void mpi_pack_size_(int* incount, int* datatype, int* comm, int* size, int* ierr);
+void mpi_cart_coords_(int* comm, int* rank, int* maxdims, int* coords, int* ierr);
+void mpi_cart_create_(int* comm_old, int* ndims, int* dims, int* periods, int* reorder, int* comm_cart, int* ierr);
+void mpi_cart_get_(int* comm, int* maxdims, int* dims, int* periods, int* coords, int* ierr);
+void mpi_cart_map_(int* comm_old, int* ndims, int* dims, int* periods, int* newrank, int* ierr);
+void mpi_cart_rank_(int* comm, int* coords, int* rank, int* ierr);
+void mpi_cart_shift_(int* comm, int* direction, int* displ, int* source, int* dest, int* ierr);
+void mpi_cart_sub_(int* comm, int* remain_dims, int* comm_new, int* ierr);
+void mpi_cartdim_get_(int* comm, int* ndims, int* ierr);
+void mpi_graph_create_(int* comm_old, int* nnodes, int* index, int* edges, int* reorder, int* comm_graph, int* ierr);
+void mpi_graph_get_(int* comm, int* maxindex, int* maxedges, int* index, int* edges, int* ierr);
+void mpi_graph_map_(int* comm_old, int* nnodes, int* index, int* edges, int* newrank, int* ierr);
+void mpi_graph_neighbors_(int* comm, int* rank, int* maxneighbors, int* neighbors, int* ierr);
+void mpi_graph_neighbors_count_(int* comm, int* rank, int* nneighbors, int* ierr);
+void mpi_graphdims_get_(int* comm, int* nnodes, int* nedges, int* ierr);
+void mpi_topo_test_(int* comm, int* top_type, int* ierr);
+void mpi_error_class_(int* errorcode, int* errorclass, int* ierr);
+void mpi_errhandler_create_(void* function, void* errhandler, int* ierr);
+void mpi_errhandler_free_(void* errhandler, int* ierr);
+void mpi_errhandler_get_(int* comm, void* errhandler, int* ierr);
+void mpi_errhandler_set_(int* comm, void* errhandler, int* ierr);
+void mpi_comm_set_errhandler_(int* comm, void* errhandler, int* ierr);
+void mpi_comm_get_errhandler_(int* comm, void* errhandler, int* ierr);
+void mpi_type_contiguous_(int* count, int* old_type, int* newtype, int* ierr);
+void mpi_cancel_(int* request, int* ierr);
+void mpi_buffer_attach_(void* buffer, int* size, int* ierr);
+void mpi_buffer_detach_(void* buffer, int* size, int* ierr);
+void mpi_testsome_(int* incount, int* requests, int* outcount, int* indices, MPI_Status* statuses, int* ierr);
+void mpi_comm_test_inter_(int* comm, int* flag, int* ierr);
+void mpi_unpack_(void* inbuf, int* insize, int* position, void* outbuf, int* outcount, int* type, int* comm, int* ierr);
+void mpi_pack_external_size_(char* datarep, int* incount, int* datatype, MPI_Aint* size, int* ierr);
+void mpi_pack_external_(char* datarep, void* inbuf, int* incount, int* datatype, void* outbuf, MPI_Aint* outcount,
+ MPI_Aint* position, int* ierr);
+void mpi_unpack_external_(char* datarep, void* inbuf, MPI_Aint* insize, MPI_Aint* position, void* outbuf, int* outcount,
+ int* datatype, int* ierr);
+void mpi_type_hindexed_(int* count, int* blocklens, MPI_Aint* indices, int* old_type, int* newtype, int* ierr);
+void mpi_type_create_hindexed_(int* count, int* blocklens, MPI_Aint* indices, int* old_type, int* newtype, int* ierr);
+void mpi_type_create_hindexed_block_(int* count, int* blocklength, MPI_Aint* indices, int* old_type, int* newtype,
+ int* ierr);
+void mpi_type_indexed_(int* count, int* blocklens, int* indices, int* old_type, int* newtype, int* ierr);
+void mpi_type_create_indexed_(int* count, int* blocklens, int* indices, int* old_type, int* newtype, int* ierr);
+void mpi_type_create_indexed_block_(int* count, int* blocklength, int* indices, int* old_type, int* newtype, int* ierr);
+void mpi_type_struct_(int* count, int* blocklens, MPI_Aint* indices, int* old_types, int* newtype, int* ierr);
+void mpi_type_create_struct_(int* count, int* blocklens, MPI_Aint* indices, int* old_types, int* newtype, int* ierr);
+void mpi_ssend_(void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* ierr);
+void mpi_ssend_init_(void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* request, int* ierr);
+void mpi_intercomm_create_(int* local_comm, int* local_leader, int* peer_comm, int* remote_leader, int* tag,
+ int* comm_out, int* ierr);
+void mpi_intercomm_merge_(int* comm, int* high, int* comm_out, int* ierr);
+void mpi_bsend_(void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* ierr);
+void mpi_bsend_init_(void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* request, int* ierr);
+void mpi_ibsend_(void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* request, int* ierr);
+void mpi_comm_remote_group_(int* comm, int* group, int* ierr);
+void mpi_comm_remote_size_(int* comm, int* size, int* ierr);
+void mpi_issend_(void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* request, int* ierr);
+void mpi_probe_(int* source, int* tag, int* comm, MPI_Status* status, int* ierr);
+void mpi_attr_delete_(int* comm, int* keyval, int* ierr);
+void mpi_attr_put_(int* comm, int* keyval, void* attr_value, int* ierr);
+void mpi_rsend_init_(void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* request, int* ierr);
+void mpi_keyval_create_(void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr);
+void mpi_keyval_free_(int* keyval, int* ierr);
+void mpi_test_cancelled_(MPI_Status* status, int* flag, int* ierr);
+void mpi_pack_(void* inbuf, int* incount, int* type, void* outbuf, int* outcount, int* position, int* comm, int* ierr);
+void mpi_get_elements_(MPI_Status* status, int* datatype, int* elements, int* ierr);
+void mpi_dims_create_(int* nnodes, int* ndims, int* dims, int* ierr);
+void mpi_iprobe_(int* source, int* tag, int* comm, int* flag, MPI_Status* status, int* ierr);
+void mpi_type_get_envelope_(int* datatype, int* num_integers, int* num_addresses, int* num_datatypes, int* combiner,
+ int* ierr);
+void mpi_type_get_contents_(int* datatype, int* max_integers, int* max_addresses, int* max_datatypes,
+ int* array_of_integers, MPI_Aint* array_of_addresses, int* array_of_datatypes, int* ierr);
+void mpi_type_create_darray_(int* size, int* rank, int* ndims, int* array_of_gsizes, int* array_of_distribs,
+ int* array_of_dargs, int* array_of_psizes, int* order, int* oldtype, int* newtype,
+ int* ierr);
+void mpi_type_create_resized_(int* oldtype, MPI_Aint* lb, MPI_Aint* extent, int* newtype, int* ierr);
+void mpi_type_create_subarray_(int* ndims, int* array_of_sizes, int* array_of_subsizes, int* array_of_starts,
+ int* order, int* oldtype, int* newtype, int* ierr);
+void mpi_type_match_size_(int* typeclass, int* size, int* datatype, int* ierr);
+void mpi_alltoallw_(void* sendbuf, int* sendcnts, int* sdispls, int* sendtypes, void* recvbuf, int* recvcnts,
+ int* rdispls, int* recvtypes, int* comm, int* ierr);
+void mpi_exscan_(void* sendbuf, void* recvbuf, int* count, int* datatype, int* op, int* comm, int* ierr);
+void mpi_comm_set_name_(int* comm, char* name, int* ierr, int size);
+void mpi_comm_dup_with_info_(int* comm, int* info, int* newcomm, int* ierr);
+void mpi_comm_split_type_(int* comm, int* split_type, int* key, int* info, int* newcomm, int* ierr);
+void mpi_comm_set_info_(int* comm, int* info, int* ierr);
+void mpi_comm_get_info_(int* comm, int* info, int* ierr);
+void mpi_info_get_(int* info, char* key, int* valuelen, char* value, int* flag, int* ierr, unsigned int keylen);
+void mpi_comm_create_errhandler_(void* function, void* errhandler, int* ierr);
+void mpi_add_error_class_(int* errorclass, int* ierr);
+void mpi_add_error_code_(int* errorclass, int* errorcode, int* ierr);
+void mpi_add_error_string_(int* errorcode, char* string, int* ierr);
+void mpi_comm_call_errhandler_(int* comm, int* errorcode, int* ierr);
+void mpi_info_dup_(int* info, int* newinfo, int* ierr);
+void mpi_info_get_valuelen_(int* info, char* key, int* valuelen, int* flag, int* ierr, unsigned int keylen);
+void mpi_info_delete_(int* info, char* key, int* ierr, unsigned int keylen);
+void mpi_info_get_nkeys_(int* info, int* nkeys, int* ierr);
+void mpi_info_get_nthkey_(int* info, int* n, char* key, int* ierr, unsigned int keylen);
+void mpi_get_version_(int* version, int* subversion, int* ierr);
+void mpi_get_library_version_(char* version, int* len, int* ierr);
+void mpi_request_get_status_(int* request, int* flag, MPI_Status* status, int* ierr);
+void mpi_grequest_start_(void* query_fn, void* free_fn, void* cancel_fn, void* extra_state, int* request, int* ierr);
+void mpi_grequest_complete_(int* request, int* ierr);
+void mpi_status_set_cancelled_(MPI_Status* status, int* flag, int* ierr);
+void mpi_status_set_elements_(MPI_Status* status, int* datatype, int* count, int* ierr);
+void mpi_comm_connect_(char* port_name, int* info, int* root, int* comm, int* newcomm, int* ierr);
+void mpi_publish_name_(char* service_name, int* info, char* port_name, int* ierr);
+void mpi_unpublish_name_(char* service_name, int* info, char* port_name, int* ierr);
+void mpi_lookup_name_(char* service_name, int* info, char* port_name, int* ierr);
+void mpi_comm_join_(int* fd, int* intercomm, int* ierr);
+void mpi_open_port_(int* info, char* port_name, int* ierr);
+void mpi_close_port_(char* port_name, int* ierr);
+void mpi_comm_accept_(char* port_name, int* info, int* root, int* comm, int* newcomm, int* ierr);
+void mpi_comm_spawn_(char* command, char* argv, int* maxprocs, int* info, int* root, int* comm, int* intercomm,
+ int* array_of_errcodes, int* ierr);
+void mpi_comm_spawn_multiple_(int* count, char* array_of_commands, char** array_of_argv, int* array_of_maxprocs,
+ int* array_of_info, int* root, int* comm, int* intercomm, int* array_of_errcodes,
+ int* ierr);
+void mpi_comm_get_parent_(int* parent, int* ierr);
+void mpi_file_close_(int* file, int* ierr);
+void mpi_file_delete_(char* filename, int* info, int* ierr);
+void mpi_file_open_(int* comm, char* filename, int* amode, int* info, int* fh, int* ierr);
+void mpi_file_set_view_(int* fh, long long int* offset, int* etype, int* filetype, char* datarep, int* info, int* ierr);
+void mpi_file_read_(int* fh, void* buf, int* count, int* datatype, MPI_Status* status, int* ierr);
+void mpi_file_write_(int* fh, void* buf, int* count, int* datatype, MPI_Status* status, int* ierr);
+
+// TODO, make this static and expose it more cleanly
+
+struct s_smpi_privatization_region_t {
+ void* address;
+ int file_descriptor;
+};
+typedef s_smpi_privatization_region_t* smpi_privatization_region_t;
+
+extern XBT_PRIVATE smpi_privatization_region_t smpi_privatization_regions;
+extern XBT_PRIVATE int smpi_loaded_page;
+extern XBT_PRIVATE int smpi_universe_size;
+}
/**
* Get the address of the beginning of the memory page where addr is located.
*
* This is used when privatizing.
*/
-#define TOPAGE(addr) (void *)(((unsigned long)(addr) / xbt_pagesize) * xbt_pagesize)
+#define TOPAGE(addr) (void*)(((unsigned long)(addr) / xbt_pagesize) * xbt_pagesize)
#if HAVE_PAPI
-typedef
- std::vector<std::pair</* counter name */std::string, /* counter value */long long>> papi_counter_t;
+typedef std::vector<std::pair</* counter name */ std::string, /* counter value */ long long>> papi_counter_t;
XBT_PRIVATE papi_counter_t& smpi_process_papi_counters();
XBT_PRIVATE int smpi_process_papi_event_set();
#endif
XBT_PUBLIC(smpi_trace_call_location_t*) smpi_trace_get_call_location();
}
-typedef enum {
+enum smpi_priv_strategies {
SMPI_PRIVATIZE_NONE = 0,
SMPI_PRIVATIZE_MMAP = 1,
SMPI_PRIVATIZE_DLOPEN = 2,
SMPI_PRIVATIZE_DEFAULT = SMPI_PRIVATIZE_MMAP
-} smpi_priv_strategies;
+};
extern XBT_PRIVATE int smpi_privatize_global_variables;
#endif
-
#ifndef SMPI_COLL_HPP
#define SMPI_COLL_HPP
+#include "private.hpp"
#include "xbt/base.h"
/** \brief MPI collective description */
namespace simgrid{
namespace smpi{
-struct mpi_coll_description {
+struct s_mpi_coll_description_t {
const char *name;
const char *description;
void *coll;
};
-typedef struct mpi_coll_description s_mpi_coll_description_t;
class Colls{
public:
extern const MPI_Datatype MPI_PTR;
//The following are datatypes for the MPI functions MPI_MAXLOC and MPI_MINLOC.
-typedef struct {
+struct float_int {
float value;
int index;
-} float_int;
-typedef struct {
+};
+struct float_float {
float value;
float index;
-} float_float;
-typedef struct {
+};
+struct long_long {
long value;
long index;
-} long_long;
-typedef struct {
+};
+struct double_double {
double value;
double index;
-} double_double;
-typedef struct {
+};
+struct long_int {
long value;
int index;
-} long_int;
-typedef struct {
+};
+struct double_int {
double value;
int index;
-} double_int;
-typedef struct {
+};
+struct short_int {
short value;
int index;
-} short_int;
-typedef struct {
+};
+struct int_int {
int value;
int index;
-} int_int;
-typedef struct {
+};
+struct long_double_int {
long double value;
int index;
-} long_double_int;
-typedef struct {
+};
+struct integer128_t {
int64_t value;
int64_t index;
-} integer128_t;
-
+};
namespace simgrid{
namespace smpi{
#define SMPI_GROUP_HPP_INCLUDED
#include "smpi_f2c.hpp"
+#include <smpi/smpi.h>
namespace simgrid{
namespace smpi{
#define SMPI_KEYVALS_HPP_INCLUDED
#include "smpi/smpi.h"
-#include "xbt/ex.hpp"
#include <unordered_map>
-typedef struct smpi_delete_fn{
+struct smpi_delete_fn {
MPI_Comm_delete_attr_function *comm_delete_fn;
MPI_Type_delete_attr_function *type_delete_fn;
MPI_Win_delete_attr_function *win_delete_fn;
-} smpi_delete_fn;
+};
-typedef struct smpi_copy_fn{
+struct smpi_copy_fn {
MPI_Comm_copy_attr_function *comm_copy_fn;
MPI_Type_copy_attr_function *type_copy_fn;
MPI_Win_copy_attr_function *win_copy_fn;
-} smpi_copy_fn;
+};
-typedef struct s_smpi_key_elem {
+struct s_smpi_key_elem_t {
smpi_copy_fn copy_fn;
smpi_delete_fn delete_fn;
int refcount;
-} s_smpi_mpi_key_elem_t;
+};
-typedef struct s_smpi_key_elem *smpi_key_elem;
+typedef s_smpi_key_elem_t* smpi_key_elem;
namespace simgrid{
namespace smpi{
template <typename T> int Keyval::keyval_create(smpi_copy_fn copy_fn, smpi_delete_fn delete_fn, int* keyval, void* extra_state){
- smpi_key_elem value = (smpi_key_elem) xbt_new0(s_smpi_mpi_key_elem_t,1);
+ smpi_key_elem value = new s_smpi_key_elem_t;
value->copy_fn=copy_fn;
value->delete_fn=delete_fn;
}
if(elem->refcount==1){
T::keyvals_.erase(*keyval);
- xbt_free(elem);
+ delete elem;
}else{
elem->refcount--;
}
#ifndef SMPI_PROCESS_HPP
#define SMPI_PROCESS_HPP
-#include "src/instr/instr_smpi.h"
#include "simgrid/s4u/Mailbox.hpp"
+#include "src/instr/instr_smpi.hpp"
#include "xbt/synchro.h"
namespace simgrid{
#ifndef SMPI_WIN_HPP_INCLUDED
#define SMPI_WIN_HPP_INCLUDED
+#include "smpi_f2c.hpp"
#include "smpi_keyvals.hpp"
#include "xbt/synchro.h"
+#include <simgrid/msg.h>
#include <vector>
#include <list>
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
#include "private.hpp"
#include <cctype>
#include <cstdarg>
container_t father;
if (TRACE_smpi_is_grouped()){
- father = PJ_container_get(sg_host_self_get_name());
+ father = simgrid::instr::Container::byName(sg_host_self_get_name());
}else{
father = PJ_container_get_root ();
}
* multiple times but only the last one would be used...
*/
if (s_type::getOrNull(it.first.c_str(), container->type_) == nullptr) {
- Type::variableNew(it.first.c_str(), nullptr, container->type_);
+ Type::variableNew(it.first.c_str(), "", container->type_);
}
}
#endif
return;
char str[INSTR_DEFAULT_STR_SIZE];
- container_t container = PJ_container_get(smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE));
- PJ_container_remove_from_parent (container);
+ container_t container = simgrid::instr::Container::byName(smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE));
+ container->removeFromParent();
delete container;
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
const char *color = instr_find_color (operation);
- simgrid::instr::Value* val = simgrid::instr::Value::get_or_new(operation, color, type);
+ simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate(operation, color, type);
new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get(str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
const char* color = instr_find_color("computing");
new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type,
- simgrid::instr::Value::get_or_new("computing", color, type));
+ simgrid::instr::Value::byNameOrCreate("computing", color, type));
}
void TRACE_smpi_computing_in(int rank, instr_extra_data extra)
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
- simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("computing", nullptr, type);
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
+ simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("computing", "", type);
new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
}
return;
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
const char *color = instr_find_color ("sleeping");
- simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("sleeping", color, type);
+ simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("sleeping", color, type);
new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
- simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("sleeping", nullptr, type);
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
+ simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("sleeping", "", type);
new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
}
return;
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
- simgrid::instr::Value* val = simgrid::instr::Value::get_or_new("test", nullptr, type);
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
+ simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate("test", "", type);
new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
}
return;
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
const char *color = instr_find_color (operation);
- simgrid::instr::Value* val = simgrid::instr::Value::get_or_new(operation, color, type);
+ simgrid::instr::Value* val = simgrid::instr::Value::byNameOrCreate(operation, color, type);
new simgrid::instr::PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = container->type_->getChild("MPI_STATE");
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = container->type_->byName("MPI_STATE");
new simgrid::instr::PopStateEvent(SIMIX_get_clock(), container, type);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(src, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = PJ_type_get_root()->getChild("MPI_LINK");
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = simgrid::instr::Type::getRootType()->byName("MPI_LINK");
XBT_DEBUG("Send tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
new simgrid::instr::StartLinkEvent(SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key, size);
}
char str[INSTR_DEFAULT_STR_SIZE];
smpi_container(dst, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- simgrid::instr::Type* type = PJ_type_get_root()->getChild("MPI_LINK");
+ container_t container = simgrid::instr::Container::byName(str);
+ simgrid::instr::Type* type = simgrid::instr::Type::getRootType()->byName("MPI_LINK");
XBT_DEBUG("Recv tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
new simgrid::instr::EndLinkEvent(SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key);
}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
#include "private.hpp"
#include "simgrid/modelchecker.h"
#include "smpi_comm.hpp"
}
#if _POSIX_TIMERS > 0
-int smpi_nanosleep(const struct timespec *tp, struct timespec * t)
+int smpi_nanosleep(const struct timespec* tp, struct timespec* /*t*/)
{
return static_cast<int>(private_sleep(static_cast<double>(tp->tv_sec + tp->tv_nsec / 1000000000.0)));
}
#endif
-int smpi_gettimeofday(struct timeval *tv, void* tz)
+int smpi_gettimeofday(struct timeval* tv, void* /*tz*/)
{
smpi_bench_end();
double now = SIMIX_get_clock();
}
#if _POSIX_TIMERS > 0
-int smpi_clock_gettime(clockid_t clk_id, struct timespec *tp)
+int smpi_clock_gettime(clockid_t /*clk_id*/, struct timespec* tp)
{
//there is only one time in SMPI, so clk_id is ignored.
smpi_bench_end();
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "simgrid/msg.h" /* barrier */
#include "SmpiHost.hpp"
-#include "private.h"
+#include "private.hpp"
+#include "simgrid/msg.h" /* barrier */
#include "smpi_comm.hpp"
#include <map>
typedef short int shortint;
typedef float real;
typedef double doublereal;
-typedef struct {
+struct complex {
real r;
real i;
-} complex;
-typedef struct {
+};
+struct doublecomplex {
doublereal r;
doublereal i;
-} doublecomplex;
+};
extern "C" XBT_PUBLIC(doublereal) smpi_get_host_power_peak_at_(integer *pstate_index);
doublereal smpi_get_host_power_peak_at_(integer *pstate_index)
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "mc/mc.h"
-#include "simgrid/s4u/Mailbox.hpp"
-#include "simgrid/s4u/Host.hpp"
-#include "src/msg/msg_private.h"
-#include "src/simix/smx_private.h"
-#include "src/surf/surf_interface.hpp"
#include "SmpiHost.hpp"
-#include "xbt/config.hpp"
-#include "private.h"
+#include "mc/mc.h"
#include "private.hpp"
+#include "simgrid/s4u/Host.hpp"
+#include "simgrid/s4u/Mailbox.hpp"
#include "smpi_coll.hpp"
#include "smpi_comm.hpp"
#include "smpi_group.hpp"
#include "smpi_info.hpp"
#include "smpi_process.hpp"
+#include "src/msg/msg_private.hpp"
+#include "src/simix/smx_private.hpp"
+#include "src/surf/surf_interface.hpp"
+#include "xbt/config.hpp"
#include <cfloat> /* DBL_MAX */
#include <dlfcn.h>
#include "src/internal_config.h"
#include "src/xbt/memory_map.hpp"
-#include "private.h"
#include "private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_memory, smpi, "Memory layout support for SMPI");
return;
}
- smpi_privatization_regions = static_cast<smpi_privatization_region_t>(
- xbt_malloc(smpi_process_count() * sizeof(struct s_smpi_privatization_region)));
+ smpi_privatization_regions = new s_smpi_privatization_region_t[smpi_process_count()];
for (int i=0; i< smpi_process_count(); i++){
// create SIMIX_process_count() mappings of this size with the same data inside
XBT_WARN("Unmapping of fd %d failed: %s", smpi_privatization_regions[i].file_descriptor, strerror(errno));
close(smpi_privatization_regions[i].file_descriptor);
}
- xbt_free(smpi_privatization_regions);
+ delete[] smpi_privatization_regions;
#endif
}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "smpi_process.hpp"
#include "mc/mc.h"
-#include "src/mc/mc_replay.h"
-#include "src/msg/msg_private.h"
-#include "src/simix/smx_private.h"
-#include "private.h"
#include "private.hpp"
-#include "smpi_process.hpp"
-#include "smpi_group.hpp"
#include "smpi_comm.hpp"
-
+#include "smpi_group.hpp"
+#include "src/mc/mc_replay.h"
+#include "src/msg/msg_private.hpp"
+#include "src/simix/smx_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_process, smpi, "Logging specific to SMPI (kernel)");
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "private.hpp"
#include "smpi_coll.hpp"
#include "smpi_comm.hpp"
#include "smpi_datatype.hpp"
#include <map>
#include <cstring>
-#include "private.h"
#include "private.hpp"
#include <cerrno>
class smpi_source_location : public std::string {
public:
+ smpi_source_location() = default;
smpi_source_location(const char* filename, int line) : std::string(std::string(filename) + ":" + std::to_string(line))
{
}
xbt_free(huge_page_filename);
}
if(smpi_shared_malloc_bogusfile == -1) {
- char *name = xbt_strdup("/tmp/simgrid-shmalloc-XXXXXX");
+ char name[] = "/tmp/simgrid-shmalloc-XXXXXX";
smpi_shared_malloc_bogusfile = mkstemp(name);
XBT_DEBUG("bogusfile : %s\n", name);
unlink(name);
- xbt_free(name);
- char* dumb = (char*)calloc(1, smpi_shared_malloc_blocksize);
+ char* dumb = new char[smpi_shared_malloc_blocksize](); // zero initialized
ssize_t err = write(smpi_shared_malloc_bogusfile, dumb, smpi_shared_malloc_blocksize);
if(err<0)
xbt_die("Could not write bogus file for shared malloc");
- xbt_free(dumb);
+ delete[] dumb;
}
int mmap_base_flag = MAP_FIXED | MAP_SHARED | MAP_POPULATE;
shared_metadata_t newmeta;
//register metadata for memcpy avoidance
- shared_data_key_type* data = (shared_data_key_type*)xbt_malloc(sizeof(shared_data_key_type));
+ shared_data_key_type* data = new shared_data_key_type;
data->second.fd = -1;
data->second.count = 1;
newmeta.size = size;
size_t shared_block_offsets[2] = {0, size};
return smpi_shared_malloc_partial(size, shared_block_offsets, nb_shared_blocks);
}
- XBT_DEBUG("Classic malloc %zu", size);
- return xbt_malloc(size);
+ XBT_DEBUG("Classic allocation of %zu bytes", size);
+ return ::operator new(size);
}
int smpi_is_shared(void* ptr, std::vector<std::pair<size_t, size_t>> &private_blocks, size_t *offset){
if (meta != allocs_metadata.end()){
meta->second.data->second.count--;
if(meta->second.data->second.count==0)
- xbt_free(meta->second.data);
+ delete meta->second.data;
}
munmap(ptr, meta->second.size);
} else {
- XBT_DEBUG("Classic free of %p", ptr);
- xbt_free(ptr);
+ XBT_DEBUG("Classic deallocation of %p", ptr);
+ ::operator delete(ptr);
}
}
#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "private.hpp"
#include <stack>
-#include "private.h"
-typedef struct s_smpi_static {
+struct s_smpi_static_t {
void *ptr;
void_f_pvoid_t free_fn;
-} s_smpi_static_t;
+};
/**
* \brief Holds a reference to all static variables that were registered
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "smpi_comm.hpp"
-#include "private.h"
#include "private.hpp"
#include "simgrid/s4u/Host.hpp"
#include "smpi_coll.hpp"
#include "smpi_request.hpp"
#include "smpi_status.hpp"
#include "smpi_win.hpp"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
#include <algorithm>
#include <climits>
#include <vector>
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/modelchecker.h"
-#include "private.h"
#include "private.hpp"
#include "smpi_datatype_derived.hpp"
#include "smpi_op.hpp"
#include "smpi_datatype_derived.hpp"
#include "smpi_op.hpp"
+#include <xbt/log.h>
XBT_LOG_EXTERNAL_CATEGORY(smpi_datatype);
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
#include "smpi_f2c.hpp"
+#include "private.hpp"
#include "smpi_process.hpp"
#include <cstdio>
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "smpi_comm.hpp"
#include "smpi_group.hpp"
+#include "smpi_comm.hpp"
+#include <string>
+#include <xbt/log.h>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_group, smpi, "Logging specific to SMPI (group)");
int oldsize = size_;
int newsize = oldsize - n;
*newgroup = new Group(newsize);
- int* to_exclude=xbt_new0(int, size_);
+ int* to_exclude = new int[size_];
for (int i = 0; i < oldsize; i++)
to_exclude[i]=0;
for (int i = 0; i < n; i++)
j++;
}
}
- xbt_free(to_exclude);
+ delete[] to_exclude;
return MPI_SUCCESS;
}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-//#include "private.h"
+//#include "private.hpp"
#include "smpi_keyvals.hpp"
namespace simgrid{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
#include "private.hpp"
#include "smpi_datatype.hpp"
#include "smpi_op.hpp"
#include "src/kernel/activity/CommImpl.hpp"
#include "src/mc/mc_replay.h"
#include "SmpiHost.hpp"
-#include "private.h"
#include "private.hpp"
#include "smpi_comm.hpp"
#include "smpi_datatype.hpp"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
-#include "src/simix/smx_private.h"
-#include "smpi_datatype.hpp"
#include "smpi_status.hpp"
+#include "private.hpp"
+#include "smpi_datatype.hpp"
+#include "src/simix/smx_private.hpp"
namespace simgrid{
namespace smpi{
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "smpi/smpi.h"
-#include "private.h"
+#include "private.hpp"
#include "smpi_comm.hpp"
#include "smpi_topo.hpp"
#include "xbt/sysdep.h"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
+#include "smpi_win.hpp"
+#include "private.hpp"
#include "smpi_coll.hpp"
#include "smpi_comm.hpp"
#include "smpi_datatype.hpp"
#include "smpi_keyvals.hpp"
#include "smpi_process.hpp"
#include "smpi_request.hpp"
-#include "smpi_win.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_rma, smpi, "Logging specific to SMPI (RMA operations)");
Action* FileImpl::read(sg_size_t size)
{
- XBT_DEBUG("READ %s on disk '%s'", cname(), location_->cname());
+ XBT_DEBUG("READ %s on disk '%s'", getCname(), location_->getCname());
if (current_position_ + size > size_) {
if (current_position_ > size_) {
size = 0;
Action* FileImpl::write(sg_size_t size)
{
- XBT_DEBUG("WRITE %s on disk '%s'. size '%llu/%llu'", cname(), location_->cname(), size, size_);
+ XBT_DEBUG("WRITE %s on disk '%s'. size '%llu/%llu'", getCname(), location_->getCname(), size, size_);
StorageAction* action = location_->write(size);
action->file_ = this;
{
/* Check if the file is on this storage */
if (location_->getContent()->find(path_) == location_->getContent()->end()) {
- XBT_WARN("File %s is not on disk %s. Impossible to unlink", cname(), location_->cname());
+ XBT_WARN("File %s is not on disk %s. Impossible to unlink", getCname(), location_->getCname());
return -1;
} else {
- XBT_DEBUG("UNLINK %s on disk '%s'", cname(), location_->cname());
+ XBT_DEBUG("UNLINK %s on disk '%s'", getCname(), location_->getCname());
location_->usedSize_ -= size_;
// Remove the file from storage
FileImpl(sg_storage_t st, std::string path, std::string mount);
~FileImpl() = default;
- std::string name() { return path_; }
- const char* cname() { return path_.c_str(); }
+ const std::string& getName() const { return path_; }
+ const char* getCname() const { return path_.c_str(); }
const char* mount() { return mount_point_.c_str(); }
sg_size_t size() { return size_; }
void setSize(sg_size_t size) { size_ = size; }
-/* Copyright (c) 2013-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
xbt_die("Cannot have a communication that is not a simple point-to-point in this model. You should consider "
"using the ptask model");
}
- } else
+ } else {
xbt_die(
"This model only accepts one of the following. You should consider using the ptask model for the other cases.\n"
" - execution with one host only and no communication\n"
" - Self-comms with one host only\n"
" - Communications with two hosts and no computation");
- xbt_free(host_list);
+ }
+ delete[] host_list;
+ delete[] flops_amount;
+ delete[] bytes_amount;
return action;
}
{
for (auto const& s : storage_)
if (s.second->getHost() == piface_->getCname())
- storages->push_back(s.second->piface_.getName());
+ storages->push_back(s.second->piface_.getCname());
}
}
#include "StorageImpl.hpp"
-#include "surf_private.h"
+#include "surf_private.hpp"
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/split.hpp>
/** @ingroup SURF_storage_interface
* @brief The possible type of action for the storage component
*/
-typedef enum {
+enum e_surf_action_storage_type_t {
READ = 0, /**< Read a file */
WRITE /**< Write in a file */
-} e_surf_action_storage_type_t;
+};
/** @ingroup SURF_storage_interface
* @brief SURF storage action interface class
-/* Copyright (c) 2009-2011, 2013-2016. The SimGrid Team.
+/* Copyright (c) 2009-2011, 2013-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
if (duration > 0)
duration = MAX(duration, sg_surf_precision);
- XBT_IN("(%s,%g)", cname(), duration);
+ XBT_IN("(%s,%g)", getCname(), duration);
CpuCas01Action* action = new CpuCas01Action(model(), 1.0, isOff(), speed_.scale * speed_.peak, constraint());
// FIXME: sleep variables should not consume 1.0 in lmm_expand
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <xbt/dynar.h>
#include "cpu_interface.hpp"
-#include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
+#include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
+#include <xbt/dynar.h>
XBT_LOG_EXTERNAL_CATEGORY(surf_kernel);
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu, surf, "Logging specific to the SURF cpu module");
XBT_CDEBUG(surf_kernel, "Something happened to action %p", action);
if (TRACE_is_enabled()) {
Cpu *cpu = static_cast<Cpu*>(lmm_constraint_id(lmm_get_cnst_from_var(getMaxminSystem(), action->getVariable(), 0)));
- TRACE_surf_host_set_utilization(cpu->cname(), action->getCategory(), lmm_variable_getvalue(action->getVariable()),
- action->getLastUpdate(), now - action->getLastUpdate());
+ TRACE_surf_host_set_utilization(cpu->getCname(), action->getCategory(),
+ lmm_variable_getvalue(action->getVariable()), action->getLastUpdate(),
+ now - action->getLastUpdate());
}
action->finish(Action::State::done);
if (TRACE_is_enabled()) {
Cpu *cpu = static_cast<Cpu*> (lmm_constraint_id(lmm_get_cnst_from_var(getMaxminSystem(), action->getVariable(), 0)) );
- TRACE_surf_host_set_utilization(cpu->cname(), action->getCategory(), lmm_variable_getvalue(action->getVariable()),
- now - delta, delta);
+ TRACE_surf_host_set_utilization(cpu->getCname(), action->getCategory(),
+ lmm_variable_getvalue(action->getVariable()), now - delta, delta);
TRACE_last_timestamp_to_dump = now - delta;
}
void Cpu::setPState(int pstate_index)
{
xbt_assert(pstate_index <= static_cast<int>(speedPerPstate_.size()),
- "Invalid parameters for CPU %s (pstate %d > length of pstates %d)", cname(), pstate_index,
+ "Invalid parameters for CPU %s (pstate %d > length of pstates %d)", getCname(), pstate_index,
static_cast<int>(speedPerPstate_.size()));
double new_peak_speed = speedPerPstate_[pstate_index];
}
void Cpu::onSpeedChange() {
- TRACE_surf_host_set_speed(surf_get_clock(), cname(), coresAmount_ * speed_.scale * speed_.peak);
+ TRACE_surf_host_set_speed(surf_get_clock(), getCname(), coresAmount_ * speed_.scale * speed_.peak);
s4u::Host::onSpeedChange(*host_);
}
if (TRACE_is_enabled()) {
Cpu *cpu = static_cast<Cpu*>(lmm_constraint_id(lmm_get_cnst_from_var(getModel()->getMaxminSystem(), getVariable(), 0)));
- TRACE_surf_host_set_utilization(cpu->cname(), getCategory(), lastValue_, lastUpdate_, now - lastUpdate_);
+ TRACE_surf_host_set_utilization(cpu->getCname(), getCategory(), lastValue_, lastUpdate_, now - lastUpdate_);
}
XBT_CDEBUG(surf_kernel, "Updating action(%p): remains is now %f", this, remains_);
}
if (min_finish > NO_MAX_DURATION)
xbt_heap_push(static_cast<CpuTiModel*>(model())->tiActionHeap_, action, min_finish);
- XBT_DEBUG("Update finish time: Cpu(%s) Action: %p, Start Time: %f Finish Time: %f Max duration %f", cname(), action,
- action->getStartTime(), action->finishTime_, action->getMaxDuration());
+ XBT_DEBUG("Update finish time: Cpu(%s) Action: %p, Start Time: %f Finish Time: %f Max duration %f", getCname(),
+ action, action->getStartTime(), action->finishTime_, action->getMaxDuration());
}
/* remove from modified cpu */
modified(false);
CpuAction *CpuTi::execution_start(double size)
{
- XBT_IN("(%s,%g)", cname(), size);
+ XBT_IN("(%s,%g)", getCname(), size);
CpuTiAction* action = new CpuTiAction(static_cast<CpuTiModel*>(model()), size, isOff(), this);
actionSet_->push_back(*action);
if (duration > 0)
duration = MAX(duration, sg_surf_precision);
- XBT_IN("(%s,%g)", cname(), duration);
+ XBT_IN("(%s,%g)", getCname(), duration);
CpuTiAction* action = new CpuTiAction(static_cast<CpuTiModel*>(model()), 1.0, isOff(), this);
action->maxDuration_ = duration;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Host.hpp"
return p;
}
-static void linkContainers (container_t src, container_t dst, xbt_dict_t filter)
+static void linkContainers(container_t src, container_t dst, std::set<std::string>* filter)
{
//ignore loopback
- if (strcmp(src->name_, "__loopback__") == 0 || strcmp(dst->name_, "__loopback__") == 0) {
+ if (src->name_ == "__loopback__" || dst->name_ == "__loopback__") {
XBT_DEBUG (" linkContainers: ignoring loopback link");
return;
}
xbt_die ("common father unknown, this is a tracing problem");
}
- if (filter != nullptr){
- //check if we already register this pair (we only need one direction)
- char aux1[INSTR_DEFAULT_STR_SIZE];
- char aux2[INSTR_DEFAULT_STR_SIZE];
- snprintf(aux1, INSTR_DEFAULT_STR_SIZE, "%s%s", src->name_, dst->name_);
- snprintf(aux2, INSTR_DEFAULT_STR_SIZE, "%s%s", dst->name_, src->name_);
- if (xbt_dict_get_or_null (filter, aux1)){
- XBT_DEBUG(" linkContainers: already registered %s <-> %s (1)", src->name_, dst->name_);
- return;
- }
- if (xbt_dict_get_or_null (filter, aux2)){
- XBT_DEBUG(" linkContainers: already registered %s <-> %s (2)", dst->name_, src->name_);
- return;
- }
-
- //ok, not found, register it
- xbt_dict_set (filter, aux1, xbt_strdup ("1"), nullptr);
- xbt_dict_set (filter, aux2, xbt_strdup ("1"), nullptr);
+ // check if we already register this pair (we only need one direction)
+ std::string aux1 = src->name_ + dst->name_;
+ std::string aux2 = dst->name_ + src->name_;
+ if (filter->find(aux1) != filter->end()) {
+ XBT_DEBUG(" linkContainers: already registered %s <-> %s (1)", src->name_.c_str(), dst->name_.c_str());
+ return;
+ }
+ if (filter->find(aux2) != filter->end()) {
+ XBT_DEBUG(" linkContainers: already registered %s <-> %s (2)", dst->name_.c_str(), src->name_.c_str());
+ return;
}
+ // ok, not found, register it
+ filter->insert(aux1);
+ filter->insert(aux2);
+
//declare type
- char link_typename[INSTR_DEFAULT_STR_SIZE];
- snprintf(link_typename, INSTR_DEFAULT_STR_SIZE, "%s-%s%s-%s%s", father->type_->name_, src->type_->name_,
- src->type_->id_, dst->type_->name_, dst->type_->id_);
- simgrid::instr::Type* link_type = father->type_->getChildOrNull(link_typename);
- if (link_type == nullptr)
- link_type = simgrid::instr::Type::linkNew(link_typename, father->type_, src->type_, dst->type_);
+ std::string link_typename = father->type_->getName() + "-" + src->type_->getName() + src->type_->getId() + "-" +
+ dst->type_->getName() + dst->type_->getId();
+ simgrid::instr::Type* link_type = father->type_->getOrCreateLinkType(link_typename, src->type_, dst->type_);
//register EDGE types for triva configuration
- trivaEdgeTypes.insert(link_type->name_);
+ trivaEdgeTypes.insert(link_type->getName());
//create the link
static long long counter = 0;
new simgrid::instr::StartLinkEvent(SIMIX_get_clock(), father, link_type, src, "topology", key);
new simgrid::instr::EndLinkEvent(SIMIX_get_clock(), father, link_type, dst, "topology", key);
- XBT_DEBUG(" linkContainers %s <-> %s", src->name_, dst->name_);
+ XBT_DEBUG(" linkContainers %s <-> %s", src->name_.c_str(), dst->name_.c_str());
}
-static void recursiveGraphExtraction(simgrid::s4u::NetZone* netzone, container_t container, xbt_dict_t filter)
+static void recursiveGraphExtraction(simgrid::s4u::NetZone* netzone, container_t container,
+ std::set<std::string>* filter)
{
if (not TRACE_platform_topology()) {
XBT_DEBUG("Graph extraction disabled by user.");
if (not netzone->getChildren()->empty()) {
//bottom-up recursion
for (auto const& nz_son : *netzone->getChildren()) {
- container_t child_container = static_cast<container_t>(xbt_dict_get(container->children_, nz_son->getCname()));
+ container_t child_container = container->children_.at(nz_son->getCname());
recursiveGraphExtraction(nz_son, child_container, filter);
}
}
static_cast<simgrid::kernel::routing::NetZoneImpl*>(netzone)->getGraph(graph, nodes, edges);
xbt_dict_foreach(edges,cursor,edge_name,edge) {
- linkContainers(
- PJ_container_get(static_cast<const char*>(edge->src->data)),
- PJ_container_get(static_cast<const char*>(edge->dst->data)), filter);
+ linkContainers(simgrid::instr::Container::byName(static_cast<const char*>(edge->src->data)),
+ simgrid::instr::Container::byName(static_cast<const char*>(edge->dst->data)), filter);
}
xbt_dict_free (&nodes);
xbt_dict_free (&edges);
*/
static void sg_instr_AS_begin(simgrid::s4u::NetZone& netzone)
{
- const char* id = netzone.getCname();
+ std::string id = netzone.getName();
if (PJ_container_get_root() == nullptr){
container_t root = new simgrid::instr::Container(id, simgrid::instr::INSTR_AS, nullptr);
PJ_container_set_root (root);
if (TRACE_smpi_is_enabled()) {
- simgrid::instr::Type* mpi = root->type_->getChildOrNull("MPI");
- if (mpi == nullptr){
- mpi = simgrid::instr::Type::containerNew("MPI", root->type_);
- if (not TRACE_smpi_is_grouped())
- simgrid::instr::Type::stateNew("MPI_STATE", mpi);
- simgrid::instr::Type::linkNew("MPI_LINK", PJ_type_get_root(), mpi, mpi);
- }
+ simgrid::instr::Type* mpi = root->type_->getOrCreateContainerType("MPI");
+ if (not TRACE_smpi_is_grouped())
+ mpi->getOrCreateStateType("MPI_STATE");
+ simgrid::instr::Type::getRootType()->getOrCreateLinkType("MPI_LINK", mpi, mpi);
}
if (TRACE_needs_platform()){
double bandwidth_value = link.bandwidth();
double latency_value = link.latency();
- container_t container = new simgrid::instr::Container(link.name(), simgrid::instr::INSTR_LINK, father);
+ container_t container = new simgrid::instr::Container(link.getCname(), simgrid::instr::INSTR_LINK, father);
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_link())) {
- simgrid::instr::Type* bandwidth = container->type_->getChildOrNull("bandwidth");
- if (bandwidth == nullptr)
- bandwidth = simgrid::instr::Type::variableNew("bandwidth", nullptr, container->type_);
- simgrid::instr::Type* latency = container->type_->getChildOrNull("latency");
- if (latency == nullptr)
- latency = simgrid::instr::Type::variableNew("latency", nullptr, container->type_);
+ simgrid::instr::Type* bandwidth = container->type_->getOrCreateVariableType("bandwidth", "");
+ simgrid::instr::Type* latency = container->type_->getOrCreateVariableType("latency", "");
new simgrid::instr::SetVariableEvent(0, container, bandwidth, bandwidth_value);
new simgrid::instr::SetVariableEvent(0, container, latency, latency_value);
}
if (TRACE_uncategorized()) {
- simgrid::instr::Type* bandwidth_used = container->type_->getChildOrNull("bandwidth_used");
- if (bandwidth_used == nullptr)
- simgrid::instr::Type::variableNew("bandwidth_used", "0.5 0.5 0.5", container->type_);
+ container->type_->getOrCreateVariableType("bandwidth_used", "0.5 0.5 0.5");
}
}
container_t container = new simgrid::instr::Container(host.getCname(), simgrid::instr::INSTR_HOST, father);
if ((TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) && (not TRACE_disable_speed())) {
- simgrid::instr::Type* speed = container->type_->getChildOrNull("power");
- if (speed == nullptr){
- speed = simgrid::instr::Type::variableNew("power", nullptr, container->type_);
- }
+ simgrid::instr::Type* speed = container->type_->getOrCreateVariableType("power", "");
double current_speed_state = host.getSpeed();
new simgrid::instr::SetVariableEvent(0, container, speed, current_speed_state);
}
- if (TRACE_uncategorized()){
- simgrid::instr::Type* speed_used = container->type_->getChildOrNull("power_used");
- if (speed_used == nullptr){
- simgrid::instr::Type::variableNew("power_used", "0.5 0.5 0.5", container->type_);
- }
- }
+ if (TRACE_uncategorized())
+ container->type_->getOrCreateVariableType("power_used", "0.5 0.5 0.5");
- if (TRACE_smpi_is_enabled() && TRACE_smpi_is_grouped()){
- simgrid::instr::Type* mpi = container->type_->getChildOrNull("MPI");
- if (mpi == nullptr){
- mpi = simgrid::instr::Type::containerNew("MPI", container->type_);
- simgrid::instr::Type::stateNew("MPI_STATE", mpi);
- }
- }
+ if (TRACE_smpi_is_enabled() && TRACE_smpi_is_grouped())
+ container->type_->getOrCreateContainerType("MPI")->getOrCreateStateType("MPI_STATE");
if (TRACE_msg_process_is_enabled()) {
- simgrid::instr::Type* msg_process = container->type_->getChildOrNull("MSG_PROCESS");
- if (msg_process == nullptr){
- msg_process = simgrid::instr::Type::containerNew("MSG_PROCESS", container->type_);
- simgrid::instr::Type* state = simgrid::instr::Type::stateNew("MSG_PROCESS_STATE", msg_process);
- new simgrid::instr::Value("suspend", "1 0 1", state);
- simgrid::instr::Value::get_or_new("sleep", "1 1 0", state);
- simgrid::instr::Value::get_or_new("receive", "1 0 0", state);
- simgrid::instr::Value::get_or_new("send", "0 0 1", state);
- simgrid::instr::Value::get_or_new("task_execute", "0 1 1", state);
- simgrid::instr::Type::linkNew("MSG_PROCESS_LINK", PJ_type_get_root(), msg_process, msg_process);
- simgrid::instr::Type::linkNew("MSG_PROCESS_TASK_LINK", PJ_type_get_root(), msg_process, msg_process);
- }
+ simgrid::instr::Type* msg_process = container->type_->getOrCreateContainerType("MSG_PROCESS");
+ simgrid::instr::Type* state = msg_process->getOrCreateStateType("MSG_PROCESS_STATE");
+ simgrid::instr::Value::byNameOrCreate("suspend", "1 0 1", state);
+ simgrid::instr::Value::byNameOrCreate("sleep", "1 1 0", state);
+ simgrid::instr::Value::byNameOrCreate("receive", "1 0 0", state);
+ simgrid::instr::Value::byNameOrCreate("send", "0 0 1", state);
+ simgrid::instr::Value::byNameOrCreate("task_execute", "0 1 1", state);
+ simgrid::instr::Type::getRootType()->getOrCreateLinkType("MSG_PROCESS_LINK", msg_process, msg_process);
+ simgrid::instr::Type::getRootType()->getOrCreateLinkType("MSG_PROCESS_TASK_LINK", msg_process, msg_process);
}
if (TRACE_msg_vm_is_enabled()) {
- simgrid::instr::Type* msg_vm = container->type_->getChildOrNull("MSG_VM");
- if (msg_vm == nullptr){
- msg_vm = simgrid::instr::Type::containerNew("MSG_VM", container->type_);
- simgrid::instr::Type* state = simgrid::instr::Type::stateNew("MSG_VM_STATE", msg_vm);
- new simgrid::instr::Value("suspend", "1 0 1", state);
- simgrid::instr::Value::get_or_new("sleep", "1 1 0", state);
- simgrid::instr::Value::get_or_new("receive", "1 0 0", state);
- simgrid::instr::Value::get_or_new("send", "0 0 1", state);
- simgrid::instr::Value::get_or_new("task_execute", "0 1 1", state);
- simgrid::instr::Type::linkNew("MSG_VM_LINK", PJ_type_get_root(), msg_vm, msg_vm);
- simgrid::instr::Type::linkNew("MSG_VM_PROCESS_LINK", PJ_type_get_root(), msg_vm, msg_vm);
- }
+ simgrid::instr::Type* msg_vm = container->type_->getOrCreateContainerType("MSG_VM");
+ simgrid::instr::Type* state = msg_vm->getOrCreateStateType("MSG_VM_STATE");
+ simgrid::instr::Value::byNameOrCreate("suspend", "1 0 1", state);
+ simgrid::instr::Value::byNameOrCreate("sleep", "1 1 0", state);
+ simgrid::instr::Value::byNameOrCreate("receive", "1 0 0", state);
+ simgrid::instr::Value::byNameOrCreate("send", "0 0 1", state);
+ simgrid::instr::Value::byNameOrCreate("task_execute", "0 1 1", state);
+ simgrid::instr::Type::getRootType()->getOrCreateLinkType("MSG_VM_LINK", msg_vm, msg_vm);
+ simgrid::instr::Type::getRootType()->getOrCreateLinkType("MSG_VM_PROCESS_LINK", msg_vm, msg_vm);
}
-
}
static void sg_instr_new_router(simgrid::kernel::routing::NetPoint * netpoint)
return;
if (TRACE_is_enabled() && TRACE_needs_platform()) {
container_t father = currentContainer.back();
- new simgrid::instr::Container(netpoint->cname(), simgrid::instr::INSTR_ROUTER, father);
+ new simgrid::instr::Container(netpoint->getCname(), simgrid::instr::INSTR_ROUTER, father);
}
}
static void instr_routing_parse_end_platform ()
{
currentContainer.clear();
- xbt_dict_t filter = xbt_dict_new_homogeneous(xbt_free_f);
+ std::set<std::string>* filter = new std::set<std::string>;
XBT_DEBUG ("Starting graph extraction.");
recursiveGraphExtraction(simgrid::s4u::Engine::getInstance()->getNetRoot(), PJ_container_get_root(), filter);
XBT_DEBUG ("Graph extraction finished.");
- xbt_dict_free(&filter);
+ delete filter;
platform_created = 1;
- TRACE_paje_dump_buffer(1);
+ TRACE_paje_dump_buffer(true);
}
void instr_routing_define_callbacks ()
{
- //always need the call backs to ASes (we need only the root AS),
- //to create the rootContainer and the rootType properly
+ // always need the callbacks to ASes (we need only the root AS), to create the rootContainer and the rootType properly
if (not TRACE_is_enabled())
return;
if (TRACE_needs_platform()) {
*/
static void recursiveNewVariableType(const char* new_typename, const char* color, simgrid::instr::Type* root)
{
- if (not strcmp(root->name_, "HOST")) {
- char tnstr[INSTR_DEFAULT_STR_SIZE];
- snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "p%s", new_typename);
- simgrid::instr::Type::variableNew(tnstr, color, root);
- }
- if (not strcmp(root->name_, "MSG_VM")) {
- char tnstr[INSTR_DEFAULT_STR_SIZE];
- snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "p%s", new_typename);
- simgrid::instr::Type::variableNew(tnstr, color, root);
- }
- if (not strcmp(root->name_, "LINK")) {
- char tnstr[INSTR_DEFAULT_STR_SIZE];
- snprintf (tnstr, INSTR_DEFAULT_STR_SIZE, "b%s", new_typename);
- simgrid::instr::Type::variableNew(tnstr, color, root);
- }
- xbt_dict_cursor_t cursor = nullptr;
- simgrid::instr::Type* child_type;
- char *name;
- xbt_dict_foreach (root->children_, cursor, name, child_type) {
- recursiveNewVariableType (new_typename, color, child_type);
+ if (root->getName() == "HOST" || root->getName() == "MSG_VM")
+ root->getOrCreateVariableType(std::string("p") + new_typename, color == nullptr ? "" : color);
+
+ if (root->getName() == "LINK")
+ root->getOrCreateVariableType(std::string("b") + new_typename, color == nullptr ? "" : color);
+
+ for (auto elm : root->children_) {
+ recursiveNewVariableType(new_typename, color == nullptr ? "" : color, elm.second);
}
}
void instr_new_variable_type (const char *new_typename, const char *color)
{
- recursiveNewVariableType (new_typename, color, PJ_type_get_root());
+ recursiveNewVariableType(new_typename, color, simgrid::instr::Type::getRootType());
}
static void recursiveNewUserVariableType(const char* father_type, const char* new_typename, const char* color,
simgrid::instr::Type* root)
{
- if (not strcmp(root->name_, father_type)) {
- simgrid::instr::Type::variableNew(new_typename, color, root);
- }
- xbt_dict_cursor_t cursor = nullptr;
- simgrid::instr::Type* child_type;
- char *name;
- xbt_dict_foreach (root->children_, cursor, name, child_type) {
- recursiveNewUserVariableType (father_type, new_typename, color, child_type);
+ if (root->getName() == father_type) {
+ root->getOrCreateVariableType(new_typename, color == nullptr ? "" : color);
}
+ for (auto elm : root->children_)
+ recursiveNewUserVariableType(father_type, new_typename, color, elm.second);
}
void instr_new_user_variable_type (const char *father_type, const char *new_typename, const char *color)
{
- recursiveNewUserVariableType (father_type, new_typename, color, PJ_type_get_root());
+ recursiveNewUserVariableType(father_type, new_typename, color, simgrid::instr::Type::getRootType());
}
static void recursiveNewUserStateType(const char* father_type, const char* new_typename, simgrid::instr::Type* root)
{
- if (not strcmp(root->name_, father_type)) {
- simgrid::instr::Type::stateNew(new_typename, root);
- }
- xbt_dict_cursor_t cursor = nullptr;
- simgrid::instr::Type* child_type;
- char *name;
- xbt_dict_foreach (root->children_, cursor, name, child_type) {
- recursiveNewUserStateType (father_type, new_typename, child_type);
+ if (root->getName() == father_type) {
+ root->getOrCreateStateType(new_typename);
}
+ for (auto elm : root->children_)
+ recursiveNewUserStateType(father_type, new_typename, elm.second);
}
void instr_new_user_state_type (const char *father_type, const char *new_typename)
{
- recursiveNewUserStateType (father_type, new_typename, PJ_type_get_root());
+ recursiveNewUserStateType(father_type, new_typename, simgrid::instr::Type::getRootType());
}
static void recursiveNewValueForUserStateType(const char* type_name, const char* val, const char* color,
simgrid::instr::Type* root)
{
- if (not strcmp(root->name_, type_name)) {
- new simgrid::instr::Value(val, color, root);
- }
- xbt_dict_cursor_t cursor = nullptr;
- simgrid::instr::Type* child_type;
- char *name;
- xbt_dict_foreach (root->children_, cursor, name, child_type) {
- recursiveNewValueForUserStateType(type_name, val, color, child_type);
- }
+ if (root->getName() == type_name)
+ simgrid::instr::Value::byNameOrCreate(val, color, root);
+
+ for (auto elm : root->children_)
+ recursiveNewValueForUserStateType(type_name, val, color, elm.second);
}
void instr_new_value_for_user_state_type (const char *type_name, const char *value, const char *color)
{
- recursiveNewValueForUserStateType (type_name, value, color, PJ_type_get_root());
+ recursiveNewValueForUserStateType(type_name, value, color, simgrid::instr::Type::getRootType());
}
int instr_platform_traced ()
if (not netzone->getChildren()->empty()) {
//bottom-up recursion
for (auto const& netzone_child : *netzone->getChildren()) {
- container_t child_container =
- static_cast<container_t>(xbt_dict_get(container->children_, netzone_child->getCname()));
+ container_t child_container = container->children_.at(netzone_child->getCname());
recursiveXBTGraphExtraction(graph, nodes, edges, netzone_child, child_container);
}
}
-/* Copyright (c) 2010, 2012-2015. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
#include "src/surf/surf_interface.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_surf, instr, "Tracing Surf");
void TRACE_surf_host_set_speed(double date, const char *resource, double speed)
{
if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
- container_t container = PJ_container_get(resource);
- simgrid::instr::Type* type = container->type_->getChild("power");
+ container_t container = simgrid::instr::Container::byName(resource);
+ simgrid::instr::Type* type = container->type_->byName("power");
new simgrid::instr::SetVariableEvent(date, container, type, speed);
}
}
void TRACE_surf_link_set_bandwidth(double date, const char *resource, double bandwidth)
{
if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
- container_t container = PJ_container_get(resource);
- simgrid::instr::Type* type = container->type_->getChild("bandwidth");
+ container_t container = simgrid::instr::Container::byName(resource);
+ simgrid::instr::Type* type = container->type_->byName("bandwidth");
new simgrid::instr::SetVariableEvent(date, container, type, bandwidth);
}
}
static int __check_feasible(xbt_swag_t cnst_list, xbt_swag_t var_list, int warn)
{
- void *_cnst, *_elem, *_var;
+ void* _cnst;
+ void* _elem;
+ void* _var;
xbt_swag_t elem_list = nullptr;
lmm_element_t elem = nullptr;
lmm_constraint_t cnst = nullptr;
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_maxmin, surf, "Logging specific to SURF (maxmin)");
-typedef struct s_dyn_light {
+struct s_dyn_light_t {
int *data;
int pos;
int size;
-} s_dyn_light_t;
+};
typedef s_dyn_light_t* dyn_light_t;
double sg_maxmin_precision = 0.00001; /* Change this with --cfg=maxmin/precision:VALUE */
}
/* @brief Remove a constraint
- * Currently this is dead code, but it is exposed in maxmin.h
+ * Currently this is dead code, but it is exposed in maxmin.hpp
* Apparently, this call was designed assuming that constraint would no more have elements in it.
* If not the case, assertion will fail, and you need to add calls e.g. to lmm_shrink before effectively removing it.
*/
lmm_variable_t var = (lmm_variable_t)xbt_mallocator_get(sys->variable_mallocator);
var->id = id;
var->id_int = Global_debug_id++;
- var->cnsts = (s_lmm_element_t *) xbt_realloc(var->cnsts, number_of_constraints * sizeof(s_lmm_element_t));
+ var->cnsts = static_cast<s_lmm_element_t*>(xbt_realloc(var->cnsts, number_of_constraints * sizeof(s_lmm_element_t)));
for (int i = 0; i < number_of_constraints; i++) {
var->cnsts[i].enabled_element_set_hookup.next = nullptr;
var->cnsts[i].enabled_element_set_hookup.prev = nullptr;
}
}
- s_lmm_constraint_light_t *cnst_light_tab =
- (s_lmm_constraint_light_t *)xbt_malloc0(xbt_swag_size(cnst_list)*sizeof(s_lmm_constraint_light_t));
+ s_lmm_constraint_light_t* cnst_light_tab =
+ static_cast<s_lmm_constraint_light_t*>(xbt_malloc0(xbt_swag_size(cnst_list) * sizeof(s_lmm_constraint_light_t)));
int cnst_light_num = 0;
dyn_light_t saturated_constraint_set = xbt_new0(s_dyn_light_t,1);
saturated_constraint_set->size = 5;
#ifndef SURF_MAXMIN_PRIVATE_H
#define SURF_MAXMIN_PRIVATE_H
-#include "surf/maxmin.h"
-#include "xbt/swag.h"
-#include "xbt/mallocator.h"
+#include "surf/maxmin.hpp"
#include "surf_interface.hpp"
+#include "xbt/mallocator.h"
+#include "xbt/swag.h"
/** @ingroup SURF_lmm
* @brief LMM element
* Basically, each variable will have a set of elements, one for each constraint where it is involved.
* Then, it is used to list all variables involved in constraint through constraint's xxx_element_set lists, or vice-versa list all constraints for a given variable.
*/
-typedef struct lmm_element {
+struct s_lmm_element_t {
/* hookup to constraint */
s_xbt_swag_hookup_t enabled_element_set_hookup;
s_xbt_swag_hookup_t disabled_element_set_hookup;
// - if CPU, then probably 1.
// - If network, then 1 in forward direction and 0.05 backward for the ACKs
double consumption_weight;
-} s_lmm_element_t;
+};
#define make_elem_active(elem) xbt_swag_insert_at_head(elem,&(elem->constraint->active_element_set))
#define make_elem_inactive(elem) xbt_swag_remove(elem,&(elem->constraint->active_element_set))
-typedef struct lmm_constraint_light {
+struct s_lmm_constraint_light_t {
double remaining_over_usage;
lmm_constraint_t cnst;
-} s_lmm_constraint_light_t;
+};
/** @ingroup SURF_lmm
* @brief LMM constraint
* \li Active elements which variable's weight is non-zero (i.e. it is enabled) AND its element value is non-zero. LMM_solve iterates over active elements during resolution, dynamically making them active or unactive.
*
*/
-typedef struct lmm_constraint {
+struct s_lmm_constraint_t {
/* hookup to system */
s_xbt_swag_hookup_t constraint_set_hookup;
s_xbt_swag_hookup_t active_constraint_set_hookup;
double lambda;
double new_lambda;
lmm_constraint_light_t cnst_light;
-} s_lmm_constraint_t;
+};
/** @ingroup SURF_lmm
* @brief LMM variable
*
* When something prevents us from enabling a variable, we "stage" the weight that we would have like to set, so that as soon as possible we enable the variable with desired weight
*/
-typedef struct lmm_variable {
+struct s_lmm_variable_t {
/* hookup to system */
s_xbt_swag_hookup_t variable_set_hookup;
s_xbt_swag_hookup_t saturated_variable_set_hookup;
/* \begin{For Lagrange only} */
double mu;
double new_mu;
- double (*func_f) (struct lmm_variable * var, double x); /* (f) */
- double (*func_fp) (struct lmm_variable * var, double x); /* (f') */
- double (*func_fpi) (struct lmm_variable * var, double x); /* (f')^{-1} */
+ double (*func_f)(s_lmm_variable_t* var, double x); /* (f) */
+ double (*func_fp)(s_lmm_variable_t* var, double x); /* (f') */
+ double (*func_fpi)(s_lmm_variable_t* var, double x); /* (f')^{-1} */
/* \end{For Lagrange only} */
-} s_lmm_variable_t;
+};
/** @ingroup SURF_lmm
* @brief LMM system
*/
-typedef struct lmm_system {
+struct s_lmm_system_t {
int modified;
bool selective_update_active; /* flag to update partially the system only selecting changed portions */
unsigned visited_counter; /* used by lmm_update_modified_set and lmm_remove_modified_set to cleverly (un-)flag the constraints (more details in these functions)*/
xbt_mallocator_t variable_mallocator;
void (*solve_fun)(lmm_system_t self);
-} s_lmm_system_t;
+};
#define extract_variable(sys) xbt_swag_extract(&(sys->variable_set))
#define extract_constraint(sys) xbt_swag_extract(&(sys->constraint_set))
#include "network_cm02.hpp"
#include "simgrid/s4u/Host.hpp"
#include "simgrid/sg_config.h"
-#include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
+#include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
NetworkCm02Link *link = static_cast<NetworkCm02Link*>(lmm_constraint_id(constraint));
double value = lmm_variable_getvalue(action->getVariable())*
lmm_get_cnst_weight_from_var(maxminSystem_, action->getVariable(), i);
- TRACE_surf_link_set_utilization(link->cname(), action->getCategory(), value, action->getLastUpdate(),
+ TRACE_surf_link_set_utilization(link->getCname(), action->getCategory(), value, action->getLastUpdate(),
now - action->getLastUpdate());
}
}
lmm_constraint_t constraint = lmm_get_cnst_from_var(maxminSystem_, action->getVariable(), i);
NetworkCm02Link* link = static_cast<NetworkCm02Link*>(lmm_constraint_id(constraint));
- TRACE_surf_link_set_utilization(link->cname(), action->getCategory(),
+ TRACE_surf_link_set_utilization(link->getCname(), action->getCategory(),
(lmm_variable_getvalue(action->getVariable()) *
lmm_get_cnst_weight_from_var(maxminSystem_, action->getVariable(), i)),
action->getLastUpdate(), now - action->getLastUpdate());
lmm_update_constraint_bound(model()->getMaxminSystem(), constraint(),
sg_bandwidth_factor * (bandwidth_.peak * bandwidth_.scale));
- TRACE_surf_link_set_bandwidth(surf_get_clock(), cname(), sg_bandwidth_factor * bandwidth_.peak * bandwidth_.scale);
+ TRACE_surf_link_set_bandwidth(surf_get_clock(), getCname(), sg_bandwidth_factor * bandwidth_.peak * bandwidth_.scale);
if (sg_weight_S_parameter > 0) {
double delta = sg_weight_S_parameter / value - sg_weight_S_parameter / (bandwidth_.peak * bandwidth_.scale);
if (action->getMaxDuration() != NO_MAX_DURATION)
action->updateMaxDuration(delta);
- if (((action->getRemainsNoUpdate() <= 0) ||
- ((action->getMaxDuration() != NO_MAX_DURATION) && (action->getMaxDuration() <= 0)))) {
+ if ((action->getRemainsNoUpdate() <= 0) ||
+ ((action->getMaxDuration() != NO_MAX_DURATION) && (action->getMaxDuration() <= 0))) {
action->finish(Action::State::done);
}
}
}
void LinkImpl::setStateTrace(tmgr_trace_t trace)
{
- xbt_assert(stateEvent_ == nullptr, "Cannot set a second state trace to Link %s", cname());
+ xbt_assert(stateEvent_ == nullptr, "Cannot set a second state trace to Link %s", getCname());
stateEvent_ = future_evt_set->add_trace(trace, this);
}
void LinkImpl::setBandwidthTrace(tmgr_trace_t trace)
{
- xbt_assert(bandwidth_.event == nullptr, "Cannot set a second bandwidth trace to Link %s", cname());
+ xbt_assert(bandwidth_.event == nullptr, "Cannot set a second bandwidth trace to Link %s", getCname());
bandwidth_.event = future_evt_set->add_trace(trace, this);
}
void LinkImpl::setLatencyTrace(tmgr_trace_t trace)
{
- xbt_assert(latency_.event == nullptr, "Cannot set a second latency trace to Link %s", cname());
+ xbt_assert(latency_.event == nullptr, "Cannot set a second latency trace to Link %s", getCname());
latency_.event = future_evt_set->add_trace(trace, this);
}
#include "ns3/core-module.h"
#include "ns3/node.h"
-#include "ns3/ns3_simulator.h"
#include "network_ns3.hpp"
+#include "ns3/ns3_simulator.hpp"
-#include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
+#include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
#include "src/kernel/routing/NetPoint.hpp"
#include "simgrid/s4u/Engine.hpp"
if (link_list->size() == 1) {
simgrid::surf::LinkNS3* link = static_cast<simgrid::surf::LinkNS3*>(link_list->at(0));
- XBT_DEBUG("Route from '%s' to '%s' with link '%s' %s", src->cname(), dst->cname(), link->cname(),
+ XBT_DEBUG("Route from '%s' to '%s' with link '%s' %s", src->getCname(), dst->getCname(), link->getCname(),
(symmetrical ? "(symmetrical)" : "(not symmetrical)"));
// XBT_DEBUG("src (%s), dst (%s), src_id = %d, dst_id = %d",src,dst, src_id, dst_id);
- XBT_DEBUG("\tLink (%s) bw:%fbps lat:%fs", link->cname(), link->bandwidth(),
- link->latency());
+ XBT_DEBUG("\tLink (%s) bw:%fbps lat:%fs", link->getCname(), link->bandwidth(), link->latency());
// create link ns3
NetPointNs3* host_src = src->extension<NetPointNs3>();
NetPointNs3* host_dst = dst->extension<NetPointNs3>();
- xbt_assert(host_src != nullptr, "Network element %s does not seem to be NS3-ready", src->cname());
- xbt_assert(host_dst != nullptr, "Network element %s does not seem to be NS3-ready", dst->cname());
+ xbt_assert(host_src != nullptr, "Network element %s does not seem to be NS3-ready", src->getCname());
+ xbt_assert(host_dst != nullptr, "Network element %s does not seem to be NS3-ready", dst->getCname());
ns3_add_link(host_src, host_dst, link->bandwidth(), link->latency());
} else {
"of length 1.\n"
"WARNING: Remove long routes to avoid this harmless message; subsequent long routes will be silently "
"ignored.",
- src->cname(), dst->cname(), link_list->size());
+ src->getCname(), dst->getCname(), link_list->size());
warned_about_long_routes = true;
}
}
simgrid::kernel::routing::NetPoint::onCreation.connect([](simgrid::kernel::routing::NetPoint* pt) {
pt->extension_set<NetPointNs3>(new NetPointNs3());
- XBT_VERB("SimGrid's %s is known as node %d within NS3", pt->cname(), pt->extension<NetPointNs3>()->node_num);
+ XBT_VERB("SimGrid's %s is known as node %d within NS3", pt->getCname(), pt->extension<NetPointNs3>()->node_num);
});
simgrid::surf::on_cluster.connect(&clusterCreation_cb);
simgrid::s4u::onPlatformCreated.connect(&postparse_cb);
action->src_->routeTo(action->dst_, &route, nullptr);
for (auto const& link : route)
- TRACE_surf_link_set_utilization(link->cname(), action->getCategory(), (data_delta_sent) / delta, now - delta,
+ TRACE_surf_link_set_utilization(link->getCname(), action->getCategory(), (data_delta_sent) / delta, now - delta,
delta);
action->lastSent_ = sgFlow->sentBytes_;
ns3::Ptr<ns3::Node> dst_node = nodes.Get(node2);
xbt_assert(node2 < IPV4addr.size(), "Element %s is unknown to NS3. Is it connected to any one-hop link?",
- dst->pimpl_netpoint->cname());
+ dst->pimpl_netpoint->getCname());
char* addr = IPV4addr.at(node2);
xbt_assert(addr != nullptr, "Element %s is unknown to NS3. Is it connected to any one-hop link?",
- dst->pimpl_netpoint->cname());
+ dst->pimpl_netpoint->getCname());
XBT_DEBUG("ns3_create_flow %u Bytes from %u to %u with Interface %s", TotalBytes, node1, node2, addr);
ns3::PacketSinkHelper sink("ns3::TcpSocketFactory", ns3::InetSocketAddress (ns3::Ipv4Address::GetAny(), port_number));
#include "xbt/base.h"
#include "network_interface.hpp"
-#include "src/surf/ns3/ns3_interface.h"
+#include "src/surf/ns3/ns3_interface.hpp"
namespace simgrid {
namespace surf {
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef NS3_INTERFACE_H
-#define NS3_INTERFACE_H
+#ifndef NS3_INTERFACE_HPP
+#define NS3_INTERFACE_HPP
#include "simgrid/s4u/Host.hpp"
int node_num;
};
-SG_BEGIN_DECL()
+extern "C" {
XBT_PUBLIC(void) ns3_initialize(const char* TcpProtocol);
XBT_PUBLIC(void)
-ns3_create_flow(sg_host_t src, sg_host_t dst, u_int32_t TotalBytes,
- simgrid::surf::NetworkNS3Action* action);
+ns3_create_flow(sg_host_t src, sg_host_t dst, u_int32_t TotalBytes, simgrid::surf::NetworkNS3Action* action);
XBT_PUBLIC(void) ns3_simulator(double maxSeconds);
XBT_PUBLIC(void*) ns3_add_router(const char* id);
XBT_PUBLIC(void) ns3_add_link(NetPointNs3* src, NetPointNs3* dst, double bw, double lat);
XBT_PUBLIC(void) ns3_add_cluster(const char* id, double bw, double lat);
-
-SG_END_DECL()
+}
#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/surf/ns3/ns3_simulator.h"
+#include "src/surf/ns3/ns3_simulator.hpp"
#include "xbt/dict.h"
#include "xbt/log.h"
#include "xbt/sysdep.h"
uint32_t toWrite = std::min({flow->remaining_, sock->GetTxAvailable()});
if (toWrite == 0) // buffer full
return;
- int amountSent = sock->Send(0, toWrite, 0);
+ int amountSent = sock->Send(0, toWrite, 0);
xbt_assert(amountSent > 0, "Since TxAvailable>0, amountSent should also >0");
flow->bufferedBytes_ += amountSent;
sock->Connect(serverAddr);
// tell the tcp implementation to call WriteUntilBufferFull again
// if we blocked and new tx buffer space becomes available
- sock->SetSendCallback (MakeCallback(&WriteUntilBufferFull));
+ sock->SetSendCallback(MakeCallback(&WriteUntilBufferFull));
// Note when the send is over
sock->SetRecvCallback(MakeCallback(&receive_callback));
// Keep track of what was used (for the TRACING module)
sock->SetDataSentCallback(MakeCallback(&datasent_callback));
XBT_DEBUG("startFlow of F[%p, %p, %u] dest=%s port=%d", flow, flow->action_, flow->totalBytes_, to, port_number);
- //WriteUntilBufferFull (sock, sock->GetTxAvailable ());
+ // WriteUntilBufferFull (sock, sock->GetTxAvailable ());
/*
sock->SetSendCallback(MakeCallback(&send_callback));
sock->SetConnectCallback(MakeCallback(&succeededConnect_callback), MakeCallback(&failedConnect_callback));
sock->SetCloseCallbacks(MakeCallback(&normalClose_callback), MakeCallback(&errorClose_callback));
send_callback(sock, sock->GetTxAvailable ());
*/
-
}
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#ifndef NS3_SIM_H
-#define NS3_SIM_H
+#ifndef NS3_SIMULATOR_HPP
+#define NS3_SIMULATOR_HPP
#include <cstdint>
-#include "ns3_interface.h"
+#include "ns3_interface.hpp"
#include <ns3/csma-helper.h>
#include <ns3/global-route-manager.h>
double energy_this_step = instantaneous_consumption * (finish_time - start_time);
- // TODO Trace: Trace energy_this_step from start_time to finish_time in host->name()
+ // TODO Trace: Trace energy_this_step from start_time to finish_time in host->getName()
this->total_energy = previous_energy + energy_this_step;
this->last_updated = finish_time;
if (dynamic_cast<simgrid::s4u::VirtualMachine*>(&host)) // Ignore virtual machines
return;
- //TODO Trace: set to zero the energy variable associated to host->name()
+ // TODO Trace: set to zero the energy variable associated to host->getName()
host.extension_set(new HostEnergy(&host));
}
}
/* **************************** Public interface *************************** */
-SG_BEGIN_DECL()
+extern "C" {
/** \ingroup plugin_energy
* \brief Enable host energy plugin
double cpu_load = lmm_constraint_get_usage(host->pimpl_cpu->constraint()) / host->getSpeed();
return host->extension<HostEnergy>()->getCurrentWattsValue(cpu_load);
}
-
-SG_END_DECL()
+}
}
/* **************************** Public interface *************************** */
-SG_BEGIN_DECL()
+extern "C" {
/** \ingroup plugin_load
* \brief Initializes the HostLoad plugin
host->extension<HostLoad>()->reset();
}
-
-SG_END_DECL()
+}
latency = MAX(latency, lat);
for (auto const& link : route)
- affected_links.insert(link->cname());
+ affected_links.insert(link->getCname());
}
}
}
this->setCost(1.0);
this->setRemains(0.0);
}
- xbt_free(host_list);
+ delete[] host_list;
}
Action* NetworkL07Model::communicate(s4u::Host* src, s4u::Host* dst, double size, double rate)
{
- sg_host_t*host_list = xbt_new0(sg_host_t, 2);
- double *flops_amount = xbt_new0(double, 2);
- double *bytes_amount = xbt_new0(double, 4);
+ sg_host_t* host_list = new sg_host_t[2]();
+ double* flops_amount = new double[2]();
+ double* bytes_amount = new double[4]();
host_list[0] = src;
host_list[1] = dst;
Action *CpuL07::execution_start(double size)
{
- sg_host_t*host_list = xbt_new0(sg_host_t, 1);
- double *flops_amount = xbt_new0(double, 1);
+ sg_host_t* host_list = new sg_host_t[1]();
+ double* flops_amount = new double[1]();
host_list[0] = getHost();
flops_amount[0] = size;
void CpuL07::apply_event(tmgr_trace_event_t triggered, double value)
{
- XBT_DEBUG("Updating cpu %s (%p) with value %g", cname(), this, value);
+ XBT_DEBUG("Updating cpu %s (%p) with value %g", getCname(), this, value);
if (triggered == speed_.event) {
speed_.scale = value;
onSpeedChange();
void LinkL07::apply_event(tmgr_trace_event_t triggered, double value)
{
- XBT_DEBUG("Updating link %s (%p) with value=%f", cname(), this, value);
+ XBT_DEBUG("Updating link %s (%p) with value=%f", getCname(), this, value);
if (triggered == bandwidth_.event) {
setBandwidth(value);
tmgr_trace_event_unref(&bandwidth_.event);
L07Action::~L07Action(){
delete hostList_;
- free(communicationAmount_);
- free(computationAmount_);
+ delete[] communicationAmount_;
+ delete[] computationAmount_;
}
void L07Action::updateBound()
#include "simgrid/s4u/Storage.hpp"
#include "src/kernel/EngineImpl.hpp"
-#include "src/simix/smx_private.h"
+#include "src/simix/smx_private.hpp"
#include "src/include/simgrid/sg_config.h"
new_zone = new simgrid::kernel::routing::FatTreeZone(current_routing, zone->id);
break;
case A_surfxml_AS_routing_Dijkstra:
- new_zone = new simgrid::kernel::routing::DijkstraZone(current_routing, zone->id, 0);
+ new_zone = new simgrid::kernel::routing::DijkstraZone(current_routing, zone->id, false);
break;
case A_surfxml_AS_routing_DijkstraCache:
- new_zone = new simgrid::kernel::routing::DijkstraZone(current_routing, zone->id, 1);
+ new_zone = new simgrid::kernel::routing::DijkstraZone(current_routing, zone->id, true);
break;
case A_surfxml_AS_routing_Floyd:
new_zone = new simgrid::kernel::routing::FloydZone(current_routing, zone->id);
if (as_cluster->privateLinks_.find(netpoint->id()) != as_cluster->privateLinks_.end())
surf_parse_error(std::string("Host_link for '") + hostlink->id.c_str() + "' is already defined!");
- XBT_DEBUG("Push Host_link for host '%s' to position %u", netpoint->cname(), netpoint->id());
+ XBT_DEBUG("Push Host_link for host '%s' to position %u", netpoint->getCname(), netpoint->id());
as_cluster->privateLinks_.insert({netpoint->id(), {linkUp, linkDown}});
}
for (auto const& s : *simgrid::surf::StorageImpl::storagesMap()) {
simgrid::kernel::routing::NetPoint* host_elm = sg_netpoint_by_name_or_null(s.second->getHost().c_str());
if (not host_elm)
- surf_parse_error(std::string("Unable to attach storage ") + s.second->cname() + ": host " + s.second->getHost() +
- " does not exist.");
+ surf_parse_error(std::string("Unable to attach storage ") + s.second->getCname() + ": host " +
+ s.second->getHost() + " does not exist.");
else
s.second->piface_.attached_to_ = sg_host_by_name(s.second->getHost().c_str());
}
action->file_->incrPosition(current_progress);
action->file_->setSize(action->file_->tell());
- action->storage_->getContent()->erase(action->file_->cname());
- action->storage_->getContent()->insert({action->file_->cname(), action->file_->size()});
+ action->storage_->getContent()->erase(action->file_->getCname());
+ action->storage_->getContent()->insert({action->file_->getCname(), action->file_->size()});
}
if (action->getMaxDuration() > NO_MAX_DURATION)
e_surf_action_storage_type_t type)
: StorageAction(model, cost, failed, lmm_variable_new(model->getMaxminSystem(), this, 1.0, -1.0, 3), storage, type)
{
- XBT_IN("(%s,%g", storage->cname(), cost);
+ XBT_IN("(%s,%g", storage->getCname(), cost);
// Must be less than the max bandwidth for all actions
lmm_expand(model->getMaxminSystem(), storage->constraint(), getVariable(), 1.0);
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/s4u/Engine.hpp"
-#include "src/instr/instr_private.h"
+#include "src/instr/instr_private.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_kernel);
XBT_DEBUG("Updating models (min = %g, NOW = %g, next_event_date = %g)", time_delta, NOW, next_event_date);
while ((event = future_evt_set->pop_leq(next_event_date, &value, &resource))) {
- if (resource->isUsed() || (watched_hosts.find(resource->cname()) != watched_hosts.end())) {
+ if (resource->isUsed() || (watched_hosts.find(resource->getCname()) != watched_hosts.end())) {
time_delta = next_event_date - NOW;
XBT_DEBUG("This event invalidates the next_occuring_event() computation of models. Next event set to %f", time_delta);
}
NOW = next_event_date;
/* update state of the corresponding resource to the new value. Does not touch lmm.
It will be modified if needed when updating actions */
- XBT_DEBUG("Calling update_resource_state for resource %s", resource->cname());
+ XBT_DEBUG("Calling update_resource_state for resource %s", resource->getCname());
resource->apply_event(event, value);
NOW = round_start;
}
}
simgrid::s4u::onTimeAdvance(time_delta);
- TRACE_paje_dump_buffer (0);
+ TRACE_paje_dump_buffer(false);
return time_delta;
}
#include "mc/mc.h"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/sg_config.h"
-#include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
+#include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
#include "src/kernel/routing/NetPoint.hpp"
#include "src/surf/HostImpl.hpp"
return model_;
}
-const char* Resource::cname() const
+const std::string& Resource::getName() const
+{
+ return name_;
+}
+
+const char* Resource::getCname() const
{
return name_.c_str();
}
return remains_;
}
-//FIXME split code in the right places
-void Action::updateRemainingLazy(double now)
-{
- double delta = 0.0;
-
- if (getModel() == surf_network_model) {
- if (suspended_ != 0)
- return;
- } else {
- xbt_assert(stateSet_ == getModel()->getRunningActionSet(), "You're updating an action that is not running.");
- xbt_assert(sharingWeight_ > 0, "You're updating an action that seems suspended.");
- }
-
- delta = now - lastUpdate_;
-
- if (remains_ > 0) {
- XBT_DEBUG("Updating action(%p): remains was %f, last_update was: %f", this, remains_, lastUpdate_);
- double_update(&remains_, lastValue_ * delta, sg_surf_precision*sg_maxmin_precision);
-
- if (getModel() == surf_cpu_model_pm && TRACE_is_enabled()) {
- simgrid::surf::Resource *cpu = static_cast<simgrid::surf::Resource*>(
- lmm_constraint_id(lmm_get_cnst_from_var(getModel()->getMaxminSystem(), getVariable(), 0)));
- TRACE_surf_host_set_utilization(cpu->cname(), getCategory(), lastValue_, lastUpdate_, now - lastUpdate_);
- }
- XBT_DEBUG("Updating action(%p): remains is now %f", this, remains_);
- }
-
- if (getModel() == surf_network_model) {
- if (maxDuration_ != NO_MAX_DURATION)
- double_update(&maxDuration_, delta, sg_surf_precision);
-
- //FIXME: duplicated code
- if (((remains_ <= 0) && (lmm_get_variable_weight(getVariable()) > 0)) ||
- ((maxDuration_ > NO_MAX_DURATION) && (maxDuration_ <= 0))) {
- finish(Action::State::done);
- heapRemove(getModel()->getActionHeap());
- }
- }
-
- lastUpdate_ = now;
- lastValue_ = lmm_variable_getvalue(getVariable());
-}
-
}
}
#include "xbt/signal.hpp"
-#include "src/surf/surf_private.h"
+#include "src/surf/surf_private.hpp"
#include "surf/surf.h"
#include "xbt/str.h"
/* LMM */
public:
- virtual void updateRemainingLazy(double now);
+ virtual void updateRemainingLazy(double now) { THROW_IMPOSSIBLE; };
void heapInsert(xbt_heap_t heap, double key, enum heap_action_type hat);
void heapRemove(xbt_heap_t heap);
void heapUpdate(xbt_heap_t heap, double key, enum heap_action_type hat);
/** @ingroup SURF_interface
* @brief Resource which have a metric handled by a maxmin system
*/
-typedef struct {
+struct s_surf_metric_t {
double peak; /**< The peak of the metric, ie its max value */
double scale; /**< Current availability of the metric according to the traces, in [0,1] */
tmgr_trace_event_t event; /**< The associated trace event associated to the metric */
-} s_surf_metric_t;
+};
namespace simgrid {
namespace surf {
Model* model() const;
/** @brief Get the name of the current Resource */
- const char* cname() const;
+ const std::string& getName() const;
+ /** @brief Get the name of the current Resource */
+ const char* getCname() const;
bool operator==(const Resource &other) const;
namespace std {
template <> class hash<simgrid::surf::Resource> {
public:
- std::size_t operator()(const simgrid::surf::Resource& r) const { return (std::size_t)xbt_str_hash(r.cname()); }
- };
+ std::size_t operator()(const simgrid::surf::Resource& r) const { return (std::size_t)xbt_str_hash(r.getCname()); }
+};
}
#endif /* SURF_MODEL_H_ */
+++ /dev/null
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef SURF_SURF_PRIVATE_H
-#define SURF_SURF_PRIVATE_H
-
-#include "surf/surf.h"
-#include "surf/maxmin.h"
-#include "src/surf/trace_mgr.hpp"
-
-#define NO_MAX_DURATION -1.0
-
-SG_BEGIN_DECL()
-
-extern XBT_PRIVATE const char *surf_action_state_names[6];
-
-/** @ingroup SURF_interface
- * @brief Possible update mechanisms
- */
-typedef enum {
- UM_FULL, /**< Full update mechanism: the remaining time of every action is recomputed at each step */
- UM_LAZY, /**< Lazy update mechanism: only the modified actions get recomputed.
- It may be slower than full if your system is tightly coupled to the point where every action
- gets recomputed anyway. In that case, you'd better not try to be cleaver with lazy and go for
- a simple full update. */
- UM_UNDEFINED /**< Mechanism not defined */
-} e_UM_t;
-
-/* Generic functions common to all models */
-
-XBT_PRIVATE FILE *surf_fopen(const char *name, const char *mode);
-XBT_PRIVATE std::ifstream* surf_ifsopen(std::string name);
-
-/* The __surf_is_absolute_file_path() returns 1 if
- * file_path is a absolute file path, in the other
- * case the function returns 0.
- */
-XBT_PRIVATE int __surf_is_absolute_file_path(const char *file_path);
-
-extern XBT_PRIVATE simgrid::trace_mgr::future_evt_set *future_evt_set;
-
-
-XBT_PUBLIC(void) storage_register_callbacks();
-
-XBT_PUBLIC(void) generic_get_graph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, sg_netzone_t rc);
-XBT_PRIVATE void parse_after_config();
-
-/********** Tracing **********/
-/* from surf_instr.c */
-void TRACE_surf_host_set_speed(double date, const char *resource, double power);
-void TRACE_surf_link_set_bandwidth(double date, const char *resource, double bandwidth);
-
-SG_END_DECL()
-
-#endif
--- /dev/null
+/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef SURF_SURF_PRIVATE_HPP
+#define SURF_SURF_PRIVATE_HPP
+
+#include "src/surf/trace_mgr.hpp"
+#include "surf/maxmin.hpp"
+#include "surf/surf.h"
+
+#define NO_MAX_DURATION -1.0
+
+extern "C" {
+
+extern XBT_PRIVATE const char* surf_action_state_names[6];
+
+/** @ingroup SURF_interface
+ * @brief Possible update mechanisms
+ */
+enum e_UM_t {
+ UM_FULL, /**< Full update mechanism: the remaining time of every action is recomputed at each step */
+ UM_LAZY, /**< Lazy update mechanism: only the modified actions get recomputed.
+ It may be slower than full if your system is tightly coupled to the point where every action
+ gets recomputed anyway. In that case, you'd better not try to be cleaver with lazy and go for
+ a simple full update. */
+ UM_UNDEFINED /**< Mechanism not defined */
+};
+
+/* Generic functions common to all models */
+
+XBT_PRIVATE FILE* surf_fopen(const char* name, const char* mode);
+XBT_PRIVATE std::ifstream* surf_ifsopen(std::string name);
+
+/* The __surf_is_absolute_file_path() returns 1 if
+ * file_path is a absolute file path, in the other
+ * case the function returns 0.
+ */
+XBT_PRIVATE int __surf_is_absolute_file_path(const char* file_path);
+
+extern XBT_PRIVATE simgrid::trace_mgr::future_evt_set* future_evt_set;
+
+XBT_PUBLIC(void) storage_register_callbacks();
+
+XBT_PUBLIC(void) generic_get_graph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, sg_netzone_t rc);
+XBT_PRIVATE void parse_after_config();
+
+/********** Tracing **********/
+/* from surf_instr.c */
+void TRACE_surf_host_set_speed(double date, const char* resource, double power);
+void TRACE_surf_link_set_bandwidth(double date, const char* resource, double bandwidth);
+}
+
+#endif
#include "src/surf/surf_interface.hpp"
#include "src/surf/trace_mgr.hpp"
-#include "surf_private.h"
+#include "surf_private.hpp"
#include "xbt/RngStream.h"
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/join.hpp>
#include "xbt/sysdep.h"
#include <vector>
-SG_BEGIN_DECL()
+extern "C" {
/* Iterator within a trace */
-typedef struct tmgr_trace_event {
+struct s_tmgr_trace_event_t {
tmgr_trace_t trace;
unsigned int idx;
sg_resource_t resource;
int free_me;
-} s_tmgr_trace_event_t;
-typedef struct tmgr_trace_event* tmgr_trace_event_t;
+};
+typedef s_tmgr_trace_event_t* tmgr_trace_event_t;
/**
* \brief Free a trace event structure
XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new_from_file(std::string filename);
XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new_from_string(std::string id, std::string input, double periodicity);
+}
-SG_END_DECL()
-
-#ifdef __cplusplus
namespace simgrid {
/** @brief Modeling of the availability profile (due to an external load) or the churn
*
};
}} // namespace simgrid::trace_mgr
-#endif /* C++ only */
#endif /* SURF_TMGR_H */
#include <xbt/signal.hpp>
-SG_BEGIN_DECL()
+extern "C" {
/* Module management functions */
XBT_PUBLIC(void) sg_platf_init();;
XBT_PUBLIC(double) surf_parse_get_speed(const char* string, const char* entity_kind, std::string name);
XBT_PUBLIC(int) surf_parse(); /* Entry-point to the parser */
-
-SG_END_DECL()
+}
#endif
#include <string>
#include <vector>
-SG_BEGIN_DECL()
+extern "C" {
#include "src/surf/xml/simgrid_dtd.h"
#ifndef YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
-typedef enum {
- SURF_CLUSTER_DRAGONFLY=3,
- SURF_CLUSTER_FAT_TREE=2,
- SURF_CLUSTER_FLAT = 1,
- SURF_CLUSTER_TORUS = 0
-} e_surf_cluster_topology_t;
+enum e_surf_cluster_topology_t {
+ SURF_CLUSTER_DRAGONFLY = 3,
+ SURF_CLUSTER_FAT_TREE = 2,
+ SURF_CLUSTER_FLAT = 1,
+ SURF_CLUSTER_TORUS = 0
+};
/* ***************************************** */
/*
* used, instead of malloced structures.
*/
-typedef struct {
+struct s_sg_platf_host_cbarg_t {
const char* id;
std::vector<double> speed_per_pstate;
int pstate;
tmgr_trace_t state_trace;
const char* coord;
std::map<std::string, std::string>* properties;
-} s_sg_platf_host_cbarg_t;
+};
typedef s_sg_platf_host_cbarg_t* sg_platf_host_cbarg_t;
class HostLinkCreationArgs {
tmgr_trace_t state_trace;
};
-typedef struct s_sg_platf_route_cbarg *sg_platf_route_cbarg_t;
-typedef struct s_sg_platf_route_cbarg {
- bool symmetrical;
- sg_netpoint_t src;
- sg_netpoint_t dst;
- sg_netpoint_t gw_src;
- sg_netpoint_t gw_dst;
- std::vector<simgrid::surf::LinkImpl*>* link_list;
-} s_sg_platf_route_cbarg_t;
+struct s_sg_platf_route_cbarg_t {
+ bool symmetrical = false;
+ sg_netpoint_t src = nullptr;
+ sg_netpoint_t dst = nullptr;
+ sg_netpoint_t gw_src = nullptr;
+ sg_netpoint_t gw_dst = nullptr;
+ std::vector<simgrid::surf::LinkImpl*>* link_list = nullptr;
+};
+typedef s_sg_platf_route_cbarg_t* sg_platf_route_cbarg_t;
class ClusterCreationArgs {
public:
std::string name;
};
-typedef struct s_sg_platf_prop_cbarg *sg_platf_prop_cbarg_t;
-typedef struct s_sg_platf_prop_cbarg {
+struct s_sg_platf_prop_cbarg_t {
const char *id;
const char *value;
-} s_sg_platf_prop_cbarg_t;
+};
+typedef s_sg_platf_prop_cbarg_t* sg_platf_prop_cbarg_t;
class TraceCreationArgs {
public:
std::string element;
};
-typedef struct s_sg_platf_process_cbarg *sg_platf_process_cbarg_t;
-typedef struct s_sg_platf_process_cbarg {
+struct s_sg_platf_process_cbarg_t {
const char **argv;
int argc;
std::map<std::string, std::string>* properties;
double start_time;
double kill_time;
e_surf_process_on_failure_t on_failure;
-} s_sg_platf_process_cbarg_t;
+};
+typedef s_sg_platf_process_cbarg_t* sg_platf_process_cbarg_t;
class ZoneCreationArgs {
public:
XBT_PUBLIC(int) surf_parse_lex_destroy();
XBT_PUBLIC(void) routing_route_free(sg_platf_route_cbarg_t route);
-
-SG_END_DECL()
+}
namespace simgrid {
namespace surf {
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/instr/instr_private.h" // TRACE_start(). FIXME: remove by subscribing tracing to the surf signals
+#include "src/instr/instr_private.hpp" // TRACE_start(). FIXME: remove by subscribing tracing to the surf signals
#include "src/surf/cpu_interface.hpp"
#include "src/surf/network_interface.hpp"
#include "xbt/log.h"
#if SIMGRID_HAVE_LUA
extern "C" {
-#include "src/bindings/lua/simgrid_lua.h"
+#include "src/bindings/lua/simgrid_lua.hpp"
#include <lua.h> /* Always include this when calling Lua */
#include <lauxlib.h> /* Always include this when calling Lua */
XBT_PRIVATE std::unordered_map<std::string, std::string> trace_connect_list_link_bw;
XBT_PRIVATE std::unordered_map<std::string, std::string> trace_connect_list_link_lat;
-SG_BEGIN_DECL()
+extern "C" {
void sg_platf_trace_connect(TraceConnectCreationArgs* trace_connect)
{
xbt_assert(traces_set_list.find(trace_connect->trace) != traces_set_list.end(),
surf_parse_error(std::string("Parse error in ") + file);
}
}
-
-SG_END_DECL()
+}
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_parse, surf, "Logging specific to the SURF parsing module");
-SG_BEGIN_DECL()
+extern "C" {
int ETag_surfxml_include_state();
std::vector<simgrid::kernel::routing::NetPoint*> list;
simgrid::s4u::Engine::getInstance()->getNetpointList(&list);
- std::sort(list.begin(), list.end(),
- [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
- return a->name() < b->name();
+ std::sort(list.begin(), list.end(), [](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
+ return a->getName() < b->getName();
});
bool first = true;
for (auto const& np : list) {
if (not first)
msg += ",";
first = false;
- msg += "'" + np->name() + "'";
+ msg += "'" + np->getName() + "'";
if (msg.length() > 4096) {
msg.pop_back(); // remove trailing quote
msg += "...(list truncated)......";
};
/* Note: field `unit' for the last element of parameter `units' should be nullptr. */
-static double surf_parse_get_value_with_unit(const char* string, const struct unit_scale* units,
- const char* entity_kind, std::string name, const char* error_msg,
- const char* default_unit)
+static double surf_parse_get_value_with_unit(const char* string, const unit_scale* units, const char* entity_kind,
+ std::string name, const char* error_msg, const char* default_unit)
{
char* ptr;
int i;
double surf_parse_get_time(const char* string, const char* entity_kind, std::string name)
{
- const struct unit_scale units[] = {
- { "w", 7 * 24 * 60 * 60 },
- { "d", 24 * 60 * 60 },
- { "h", 60 * 60 },
- { "m", 60 },
- { "s", 1.0 },
- { "ms", 1e-3 },
- { "us", 1e-6 },
- { "ns", 1e-9 },
- { "ps", 1e-12 },
- { nullptr, 0 }
- };
+ const unit_scale units[] = {{"w", 7 * 24 * 60 * 60},
+ {"d", 24 * 60 * 60},
+ {"h", 60 * 60},
+ {"m", 60},
+ {"s", 1.0},
+ {"ms", 1e-3},
+ {"us", 1e-6},
+ {"ns", 1e-9},
+ {"ps", 1e-12},
+ {nullptr, 0}};
return surf_parse_get_value_with_unit(string, units, entity_kind, name,
"Append 's' to your time to get seconds", "s");
}
double surf_parse_get_size(const char* string, const char* entity_kind, std::string name)
{
- const struct unit_scale units[] = {
- { "EiB", pow(1024, 6) },
- { "PiB", pow(1024, 5) },
- { "TiB", pow(1024, 4) },
- { "GiB", pow(1024, 3) },
- { "MiB", pow(1024, 2) },
- { "KiB", 1024 },
- { "EB", 1e18 },
- { "PB", 1e15 },
- { "TB", 1e12 },
- { "GB", 1e9 },
- { "MB", 1e6 },
- { "kB", 1e3 },
- { "B", 1.0 },
- { "Eib", 0.125 * pow(1024, 6) },
- { "Pib", 0.125 * pow(1024, 5) },
- { "Tib", 0.125 * pow(1024, 4) },
- { "Gib", 0.125 * pow(1024, 3) },
- { "Mib", 0.125 * pow(1024, 2) },
- { "Kib", 0.125 * 1024 },
- { "Eb", 0.125 * 1e18 },
- { "Pb", 0.125 * 1e15 },
- { "Tb", 0.125 * 1e12 },
- { "Gb", 0.125 * 1e9 },
- { "Mb", 0.125 * 1e6 },
- { "kb", 0.125 * 1e3 },
- { "b", 0.125 },
- { nullptr, 0 }
- };
+ const unit_scale units[] = {{"EiB", pow(1024, 6)},
+ {"PiB", pow(1024, 5)},
+ {"TiB", pow(1024, 4)},
+ {"GiB", pow(1024, 3)},
+ {"MiB", pow(1024, 2)},
+ {"KiB", 1024},
+ {"EB", 1e18},
+ {"PB", 1e15},
+ {"TB", 1e12},
+ {"GB", 1e9},
+ {"MB", 1e6},
+ {"kB", 1e3},
+ {"B", 1.0},
+ {"Eib", 0.125 * pow(1024, 6)},
+ {"Pib", 0.125 * pow(1024, 5)},
+ {"Tib", 0.125 * pow(1024, 4)},
+ {"Gib", 0.125 * pow(1024, 3)},
+ {"Mib", 0.125 * pow(1024, 2)},
+ {"Kib", 0.125 * 1024},
+ {"Eb", 0.125 * 1e18},
+ {"Pb", 0.125 * 1e15},
+ {"Tb", 0.125 * 1e12},
+ {"Gb", 0.125 * 1e9},
+ {"Mb", 0.125 * 1e6},
+ {"kb", 0.125 * 1e3},
+ {"b", 0.125},
+ {nullptr, 0}};
return surf_parse_get_value_with_unit(string, units, entity_kind, name,
"Append 'B' to get bytes (or 'b' for bits but 1B = 8b).", "B");
}
double surf_parse_get_bandwidth(const char* string, const char* entity_kind, std::string name)
{
- const struct unit_scale units[] = {
- { "EiBps", pow(1024, 6) },
- { "PiBps", pow(1024, 5) },
- { "TiBps", pow(1024, 4) },
- { "GiBps", pow(1024, 3) },
- { "MiBps", pow(1024, 2) },
- { "KiBps", 1024 },
- { "EBps", 1e18 },
- { "PBps", 1e15 },
- { "TBps", 1e12 },
- { "GBps", 1e9 },
- { "MBps", 1e6 },
- { "kBps", 1e3 },
- { "Bps", 1.0 },
- { "Eibps", 0.125 * pow(1024, 6) },
- { "Pibps", 0.125 * pow(1024, 5) },
- { "Tibps", 0.125 * pow(1024, 4) },
- { "Gibps", 0.125 * pow(1024, 3) },
- { "Mibps", 0.125 * pow(1024, 2) },
- { "Kibps", 0.125 * 1024 },
- { "Tbps", 0.125 * 1e12 },
- { "Gbps", 0.125 * 1e9 },
- { "Mbps", 0.125 * 1e6 },
- { "kbps", 0.125 * 1e3 },
- { "bps", 0.125 },
- { nullptr, 0 }
- };
+ const unit_scale units[] = {{"EiBps", pow(1024, 6)},
+ {"PiBps", pow(1024, 5)},
+ {"TiBps", pow(1024, 4)},
+ {"GiBps", pow(1024, 3)},
+ {"MiBps", pow(1024, 2)},
+ {"KiBps", 1024},
+ {"EBps", 1e18},
+ {"PBps", 1e15},
+ {"TBps", 1e12},
+ {"GBps", 1e9},
+ {"MBps", 1e6},
+ {"kBps", 1e3},
+ {"Bps", 1.0},
+ {"Eibps", 0.125 * pow(1024, 6)},
+ {"Pibps", 0.125 * pow(1024, 5)},
+ {"Tibps", 0.125 * pow(1024, 4)},
+ {"Gibps", 0.125 * pow(1024, 3)},
+ {"Mibps", 0.125 * pow(1024, 2)},
+ {"Kibps", 0.125 * 1024},
+ {"Tbps", 0.125 * 1e12},
+ {"Gbps", 0.125 * 1e9},
+ {"Mbps", 0.125 * 1e6},
+ {"kbps", 0.125 * 1e3},
+ {"bps", 0.125},
+ {nullptr, 0}};
return surf_parse_get_value_with_unit(string, units, entity_kind, name,
"Append 'Bps' to get bytes per second (or 'bps' for bits but 1Bps = 8bps)", "Bps");
}
double surf_parse_get_speed(const char* string, const char* entity_kind, std::string name)
{
- const struct unit_scale units[] = {
- { "yottaflops", 1e24 },
- { "Yf", 1e24 },
- { "zettaflops", 1e21 },
- { "Zf", 1e21 },
- { "exaflops", 1e18 },
- { "Ef", 1e18 },
- { "petaflops", 1e15 },
- { "Pf", 1e15 },
- { "teraflops", 1e12 },
- { "Tf", 1e12 },
- { "gigaflops", 1e9 },
- { "Gf", 1e9 },
- { "megaflops", 1e6 },
- { "Mf", 1e6 },
- { "kiloflops", 1e3 },
- { "kf", 1e3 },
- { "flops", 1.0 },
- { "f", 1.0 },
- { nullptr, 0 }
- };
+ const unit_scale units[] = {{"yottaflops", 1e24}, {"Yf", 1e24}, {"zettaflops", 1e21}, {"Zf", 1e21},
+ {"exaflops", 1e18}, {"Ef", 1e18}, {"petaflops", 1e15}, {"Pf", 1e15},
+ {"teraflops", 1e12}, {"Tf", 1e12}, {"gigaflops", 1e9}, {"Gf", 1e9},
+ {"megaflops", 1e6}, {"Mf", 1e6}, {"kiloflops", 1e3}, {"kf", 1e3},
+ {"flops", 1.0}, {"f", 1.0}, {nullptr, 0}};
return surf_parse_get_value_with_unit(string, units, entity_kind, name,
"Append 'f' or 'flops' to your speed to get flop per second", "f");
}
void STag_surfxml_include()
{
- XBT_ERROR("<include> tag is deprecated, and will be removed in SimGrid v3.19. Please stop using it now (or tell us why you need it).");
+ XBT_ERROR("<include> tag is deprecated, and will be removed in SimGrid v3.18. Please stop using it now (or tell us why you need it).");
parse_after_config();
XBT_DEBUG("STag_surfxml_include '%s'",A_surfxml_include_file);
surf_parsed_filename_stack.push_back(surf_parsed_filename); // save old file name
{
return surf_parse_lex();
}
-
-SG_END_DECL()
+}
int size;
};
-static _Unwind_Reason_Code
-backtrace_helper (struct _Unwind_Context *ctx, void *a)
+static _Unwind_Reason_Code backtrace_helper(_Unwind_Context* ctx, void* a)
{
- struct trace_arg *arg = (struct trace_arg *) a;
+ trace_arg* arg = static_cast<trace_arg*>(a);
/* We are first called with address in the __backtrace function.
Skip it. */
int found = 0;
/* let's look for the offset of this library in our addressing space */
- char* maps_name = bprintf("/proc/%d/maps", (int) getpid());
- FILE* maps = fopen(maps_name, "r");
+ std::string maps_name = std::string("/proc/") + std::to_string(getpid()) + "maps";
+ FILE* maps = fopen(maps_name.c_str(), "r");
unsigned long int addr = strtoul(addrs[i].c_str(), &p, 16);
if (*p != '\0') {
}
}
fclose(maps);
- free(maps_name);
addrs[i].clear();
if (not found) {
*p2 = '\0';
/* Here we go, fire an addr2line up */
- char* subcmd = bprintf("%s -f -e %s %s", ADDR2LINE, p, addrs[i].c_str());
+ std::string subcmd = std::string(ADDR2LINE) + " -f -e " + p + " " + addrs[i];
free(p);
- XBT_VERB("Fire a new command: '%s'", subcmd);
- FILE* subpipe = popen(subcmd, "r");
+ XBT_VERB("Fire a new command: '%s'", subcmd.c_str());
+ FILE* subpipe = popen(subcmd.c_str(), "r");
if (not subpipe) {
xbt_die("Cannot fork addr2line to display the backtrace");
}
if (fgets(line_func, 1024, subpipe)) {
line_func[strlen(line_func) - 1] = '\0';
} else {
- XBT_VERB("Cannot read result of subcommand %s", subcmd);
+ XBT_VERB("Cannot read result of subcommand %s", subcmd.c_str());
strncpy(line_func, "???",3);
}
if (fgets(line_pos, 1024, subpipe)) {
line_pos[strlen(line_pos) - 1] = '\0';
} else {
- XBT_VERB("Cannot read result of subcommand %s", subcmd);
+ XBT_VERB("Cannot read result of subcommand %s", subcmd.c_str());
strncpy(line_pos, backtrace_syms[i],1024);
}
pclose(subpipe);
- free(subcmd);
}
/* check whether the trick worked */
// ***** ConfigType *****
/// A trait which define possible options types:
-template<class T> struct ConfigType;
+template <class T> class ConfigType;
-template<> struct ConfigType<int> {
+template <> class ConfigType<int> {
+public:
static constexpr const char* type_name = "int";
static inline double parse(const char* value)
{
return parseLong(value);
}
};
-template<> struct ConfigType<double> {
+template <> class ConfigType<double> {
+public:
static constexpr const char* type_name = "double";
static inline double parse(const char* value)
{
return parseDouble(value);
}
};
-template<> struct ConfigType<std::string> {
+template <> class ConfigType<std::string> {
+public:
static constexpr const char* type_name = "string";
static inline std::string parse(const char* value)
{
return std::string(value);
}
};
-template<> struct ConfigType<bool> {
+template <> class ConfigType<bool> {
+public:
static constexpr const char* type_name = "boolean";
static inline bool parse(const char* value)
{
xbt_test_unit_t _xbt_test_current_unit = nullptr;
/* test suite test log */
-typedef struct s_xbt_test_log {
+struct s_xbt_test_log {
char *text;
const char *file;
int line;
-} *xbt_test_log_t;
+};
+typedef s_xbt_test_log* xbt_test_log_t;
static void xbt_test_log_dump(xbt_test_log_t log)
{
}
/* test suite test check */
-typedef struct s_xbt_test_test {
+struct s_xbt_test_test {
char *title;
int failed;
int expected_failure;
const char *file;
int line;
xbt_dynar_t logs;
-} *xbt_test_test_t;
+};
+typedef s_xbt_test_test* xbt_test_test_t;
static void xbt_test_test_dump(xbt_test_test_t test)
{
/** @brief create test suite */
xbt_test_suite_t xbt_test_suite_new(const char *name, const char *fmt, ...)
{
- xbt_test_suite_t suite = xbt_new0(struct s_xbt_test_suite, 1);
+ xbt_test_suite_t suite = xbt_new0(s_xbt_test_suite, 1);
va_list ap;
if (_xbt_test_suites == nullptr)
xbt_assert(func);
xbt_assert(fmt);
- unit = xbt_new0(struct s_xbt_test_unit, 1);
+ unit = xbt_new0(s_xbt_test_unit, 1);
va_start(ap, fmt);
unit->title = bvprintf(fmt, ap);
va_end(ap);
xbt_assert(unit);
va_list ap;
- xbt_test_test_t test = xbt_new0(struct s_xbt_test_test, 1);
+ xbt_test_test_t test = xbt_new0(s_xbt_test_test, 1);
va_start(ap, fmt);
test->title = bvprintf(fmt, ap);
va_end(ap);
"Test failed even before being declared (broken unit: %s)", unit->title);
va_list ap;
- xbt_test_log_t log = xbt_new(struct s_xbt_test_log, 1);
+ xbt_test_log_t log = xbt_new(s_xbt_test_log, 1);
va_start(ap, fmt);
log->text = bvprintf(fmt, ap);
va_end(ap);
"Test logged into even before being declared (broken test unit: %s)", unit->title);
va_list ap;
- xbt_test_log_t log = xbt_new(struct s_xbt_test_log, 1);
+ xbt_test_log_t log = xbt_new(s_xbt_test_log, 1);
va_start(ap, fmt);
log->text = bvprintf(fmt, ap);
va_end(ap);
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/internal_config.h"
-#include "xbt/sysdep.h"
#include "src/xbt/log_private.h"
+#include "xbt/sysdep.h"
+#include <errno.h>
#include <stdio.h>
+#include <string.h>
static void append_file(xbt_log_appender_t this_, char *str) {
fputs(str, (FILE *) this_->data);
xbt_log_appender_t res = xbt_new0(s_xbt_log_appender_t, 1);
res->do_append = &append_file;
res->free_ = &free_;
- if (arg)
+ if (arg) {
res->data = (void *) fopen(arg, "w");
- else
+ if (res->data == NULL)
+ xbt_die("Cannot open file: %s: %s", arg, strerror(errno));
+ } else {
res->data = (void *) stderr;
+ }
return res;
}
static void open_append2_file(xbt_log_append2_file_t data){
if(data->count<0) {
//Roll
- if(!data->file)
+ if (!data->file) {
data->file= fopen(data->filename, "w");
- else{
+ if (data->file == NULL)
+ xbt_die("Cannot open file: %s: %s", data->filename, strerror(errno));
+ } else {
fputs(APPEND2_END_TOKEN_CLEAR,data->file);
fseek(data->file,0,SEEK_SET);
}
snprintf(newname,511,"%s%i%s",pre,data->count,post);
data->count++;
data->file= fopen(newname, "w");
- xbt_assert(data->file);
+ if (data->file == NULL)
+ xbt_die("Cannot open file: %s: %s", newname, strerror(errno));
+ xbt_free(pre);
}
}
}
}
-static void free_append2_(xbt_log_appender_t this_) {
- FILE* f=((xbt_log_append2_file_t)(this_->data))->file;
- if (f)
- fclose(f);
+static void free_append2_(xbt_log_appender_t this_)
+{
+ xbt_log_append2_file_t data = this_->data;
+ if (data->file)
+ fclose(data->file);
+ xbt_free(data->filename);
+ xbt_free(data);
}
#include <cstdlib>
#include <cstring>
-#include "src/mc/mc_private.h"
+#include "src/mc/mc_private.hpp"
#include "src/mc/ObjectInformation.hpp"
#include "src/mc/Type.hpp"
#include <mc/mc.h>
#include "mc/datatypes.h"
-#include "src/mc/mc_private.h"
+#include "src/mc/mc_private.hpp"
#include "src/mc/ObjectInformation.hpp"
#include "src/mc/Type.hpp"
int some_local_variable = 0;
-typedef struct foo {int i;} s_foo;
+struct s_foo {
+ int i;
+};
static void test_type_by_name(simgrid::mc::RemoteClient& process, s_foo my_foo)
{
- assert(process.binary_info->full_types_by_name.find("struct foo") != process.binary_info->full_types_by_name.end());
+ assert(process.binary_info->full_types_by_name.find("struct s_foo") != process.binary_info->full_types_by_name.end());
}
int main(int argc, char** argv)
simgrid::s4u::this_actor::getHost()->actorList(actor_list);
for (auto const& actor : *actor_list) {
- XBT_INFO("Actor (pid=%lu, ppid=%lu, name=%s)", actor->getPid(), actor->getPpid(), actor->getName().c_str());
+ XBT_INFO("Actor (pid=%lu, ppid=%lu, name=%s)", actor->getPid(), actor->getPpid(), actor->getCname());
if (simgrid::s4u::this_actor::getPid() != actor->getPid())
actor->kill();
}
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this msg example");
-static int my_onexit(smx_process_exit_status_t status, int* pid)
+static int my_onexit(smx_process_exit_status_t /*status*/, int* pid)
{
XBT_INFO("Process \"%d\" killed.", *pid);
return 0;
{
std::map<std::string, std::string>* props = storage->getProperties();
if (not props->empty()) {
- XBT_INFO("\tProperties of mounted storage: %s", storage->getName());
+ XBT_INFO("\tProperties of mounted storage: %s", storage->getCname());
for (auto const& elm : *props) {
XBT_INFO(" %s->%s", elm.first.c_str(), elm.second.c_str());
simgrid::s4u::File* file = new simgrid::s4u::File(dest, nullptr);
sg_size_t written = file->write(file_size);
XBT_INFO("%llu bytes on %llu bytes have been written by %s on /sd1", written, file_size,
- simgrid::s4u::Actor::self()->getName().c_str());
+ simgrid::s4u::Actor::self()->getCname());
delete file;
return written;
}
sg_size_t file_size = file->size();
sg_size_t read = file->read(file_size);
- XBT_INFO("%s has read %llu on %s", simgrid::s4u::Actor::self()->getName().c_str(), read, src);
+ XBT_INFO("%s has read %llu on %s", simgrid::s4u::Actor::self()->getCname(), read, src);
delete file;
return read;
sg_size_t read_size = read_local_file(src);
// Send file
- XBT_INFO("%s sends %llu to %s", simgrid::s4u::this_actor::getName().c_str(), read_size, remote_host);
+ XBT_INFO("%s sends %llu to %s", simgrid::s4u::this_actor::getCname(), read_size, remote_host);
char* payload = bprintf("%s %llu", dest, read_size);
simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(remote_host);
mailbox->put(payload, static_cast<double>(read_size));
static void display_storage_content(simgrid::s4u::Storage* storage)
{
- XBT_INFO("Print the content of the storage element: %s", storage->getName());
+ XBT_INFO("Print the content of the storage element: %s", storage->getCname());
std::map<std::string, sg_size_t>* content = storage->getContent();
if (not content->empty()) {
for (auto const& entry : *content)
for (auto const& elm : host->getMountedStorages()) {
const char* mount_name = elm.first.c_str();
simgrid::s4u::Storage* storage = elm.second;
- XBT_INFO("\tStorage name: %s, mount name: %s", storage->getName(), mount_name);
+ XBT_INFO("\tStorage name: %s, mount name: %s", storage->getCname(), mount_name);
sg_size_t free_size = storage->getSizeFree();
sg_size_t used_size = storage->getSizeUsed();
XBT_INFO("\t\tUsed size: %llu bytes", used_size);
display_storage_properties(storage);
- dump_storage_by_name(storage->getName());
+ dump_storage_by_name(storage->getCname());
}
}
simgrid::s4u::Engine::getInstance()->getNetpointList(&netcardList);
std::sort(netcardList.begin(), netcardList.end(),
[](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
- return a->name() < b->name();
+ return a->getName() < b->getName();
});
for (auto const& srcCard : netcardList)
if (srcCard->isRouter())
- std::printf(" <router id=\"%s\"/>\n", srcCard->cname());
+ std::printf(" <router id=\"%s\"/>\n", srcCard->getCname());
// Links
unsigned int totalLinks = sg_link_count();
simgrid::s4u::Link* link = links[i];
std::printf(" <link id=\"");
- std::printf("%s\" bandwidth=\"%.0f\" latency=\"%.9f\"", link->name(), link->bandwidth(), link->latency());
+ std::printf("%s\" bandwidth=\"%.0f\" latency=\"%.9f\"", link->getCname(), link->bandwidth(), link->latency());
if (sg_link_is_shared(link)) {
std::printf("/>\n");
} else {
if (not route.empty()) {
std::printf(" <route src=\"%s\" dst=\"%s\">\n ", host1->getCname(), host2->getCname());
for (auto const& link : route)
- std::printf("<link_ctn id=\"%s\"/>", link->cname());
+ std::printf("<link_ctn id=\"%s\"/>", link->getCname());
std::printf("\n </route>\n");
}
}
for (auto const& netcardDst : netcardList) { // to router
if (netcardDst->isRouter()) {
- std::printf(" <route src=\"%s\" dst=\"%s\">\n ", host1->getCname(), netcardDst->cname());
+ std::printf(" <route src=\"%s\" dst=\"%s\">\n ", host1->getCname(), netcardDst->getCname());
std::vector<simgrid::surf::LinkImpl*> route;
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(netcardSrc, netcardDst, &route, nullptr);
for (auto const& link : route)
- std::printf("<link_ctn id=\"%s\"/>", link->cname());
+ std::printf("<link_ctn id=\"%s\"/>", link->getCname());
std::printf("\n </route>\n");
}
}
if (value1->isRouter()) {
for (auto const& value2 : netcardList) { // to router
if (value2->isRouter()) {
- std::printf(" <route src=\"%s\" dst=\"%s\">\n ", value1->cname(), value2->cname());
+ std::printf(" <route src=\"%s\" dst=\"%s\">\n ", value1->getCname(), value2->getCname());
std::vector<simgrid::surf::LinkImpl*> route;
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, value2, &route, nullptr);
for (auto const& link : route)
- std::printf("<link_ctn id=\"%s\"/>", link->cname());
+ std::printf("<link_ctn id=\"%s\"/>", link->getCname());
std::printf("\n </route>\n");
}
}
for (unsigned int it_dst = 0; it_dst < totalHosts; it_dst++) { // Routes to host
simgrid::s4u::Host* host2 = hosts[it_dst];
- std::printf(" <route src=\"%s\" dst=\"%s\">\n ", value1->cname(), host2->getCname());
+ std::printf(" <route src=\"%s\" dst=\"%s\">\n ", value1->getCname(), host2->getCname());
std::vector<simgrid::surf::LinkImpl*> route;
simgrid::kernel::routing::NetPoint* netcardDst = host2->pimpl_netpoint;
simgrid::kernel::routing::NetZoneImpl::getGlobalRoute(value1, netcardDst, &route, nullptr);
for (auto const& link : route)
- std::printf("<link_ctn id=\"%s\"/>", link->cname());
+ std::printf("<link_ctn id=\"%s\"/>", link->getCname());
std::printf("\n </route>\n");
}
}
simgrid::s4u::Engine::getInstance()->getNetpointList(&netcardList);
std::sort(netcardList.begin(), netcardList.end(),
[](simgrid::kernel::routing::NetPoint* a, simgrid::kernel::routing::NetPoint* b) {
- return a->name() < b->name();
+ return a->getName() < b->getName();
});
int it;
std::printf("NetCards count: %zu\n", netcardList.size());
for (auto const& nc : netcardList)
- std::printf(" - Seen: \"%s\". Type: %s\n", nc->cname(),
+ std::printf(" - Seen: \"%s\". Type: %s\n", nc->getCname(),
nc->isRouter() ? "router" : (nc->isNetZone() ? "netzone" : (nc->isHost() ? "host" : "buggy")));
return 0;
#include "simgrid/msg.h"
#include "src/surf/surf_interface.hpp"
-#include "surf/maxmin.h"
+#include "surf/maxmin.hpp"
#include "xbt/log.h"
#include "xbt/module.h"
#include "xbt/sysdep.h"
/* ==l1== L2 ==L3== */
/* ------ */
-typedef enum {
- MAXMIN,
- LAGRANGE_RENO,
- LAGRANGE_VEGAS
-} method_t;
+enum method_t { MAXMIN, LAGRANGE_RENO, LAGRANGE_VEGAS };
static double dichotomy(double func(double), double min, double max, double min_error)
{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "surf/maxmin.h"
+#include "surf/maxmin.hpp"
#include "simgrid/msg.h"
#include "xbt/module.h"
#include "xbt/sysdep.h" /* time manipulation for benchmarking */
ADD_TESH(tesh-xbt-${x} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/${x} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/${x} ${x}.tesh)
endforeach()
-if(NOT enable_debug)
- ADD_TESH(tesh-xbt-log --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/log_usage --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_usage log_usage_ndebug.tesh)
+if(enable_debug)
+ ADD_TESH(tesh-xbt-log --cd ${CMAKE_BINARY_DIR}/teshsuite/xbt/log_usage ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_usage/log_usage.tesh)
+else()
+ ADD_TESH(tesh-xbt-log --cd ${CMAKE_BINARY_DIR}/teshsuite/xbt/log_usage ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_usage/log_usage_ndebug.tesh)
endif()
if(HAVE_MMALLOC)
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "xbt.h"
+#include <simgrid/msg.h>
+#include <xbt.h>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(test, top, "Logging specific to this test");
XBT_LOG_NEW_CATEGORY(top, "Useless test channel");
int main(int argc, char **argv)
{
- xbt_init(&argc, argv);
+ MSG_init(&argc, argv);
dolog("");
dolog(" ");
#! ./tesh
+p Check different log thresholds
$ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n"
> [ 0.000000] [0:maestro@] Test with the settings ''
> [ 0.000000] [0:maestro@] val=2
> [ 0.000000] [0:maestro@] false alarm!
> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
> [ 0.000000] [0:maestro@] false alarm!
+
+p Check the "file" log appender
+$ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --log=root.app:file:${bindir:=.}/log_usage.log
+$ cat ${bindir:=.}/log_usage.log
+> [ 0.000000] [0:maestro@] Test with the settings ''
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' '
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info '
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:debug '
+> [ 0.000000] [0:maestro@] val=1
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
+> [ 0.000000] [0:maestro@] false alarm!
+
+p Check the "rollfile" log appender
+$ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --log=root.app:rollfile:500:${bindir:=.}/log_usage.log
+$ cat ${bindir:=.}/log_usage.log
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
+> [ 0.000000] [0:maestro@] false alarm!
+>
+> [End of log]
+> ] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:debug '
+> [ 0.000000] [0:maestro@] val=1
+>
+>
+
+p Check the "splitfile" log appender
+$ $SG_TEST_EXENV ${bindir:=.}/log_usage "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n" --log=root.app:splitfile:500:${bindir:=.}/log_usage_%.log
+$ cat ${bindir:=.}/log_usage_0.log
+> [ 0.000000] [0:maestro@] Test with the settings ''
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' '
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:info root.thres:info '
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:debug '
+> [ 0.000000] [0:maestro@] val=1
+
+$ cat ${bindir:=.}/log_usage_1.log
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:verbose root.thres:error '
+> [ 0.000000] [0:maestro@] val=2
+> [ 0.000000] [0:maestro@] false alarm!
+> [ 0.000000] [0:maestro@] Test with the settings ' test.thres:critical '
+> [ 0.000000] [0:maestro@] false alarm!
+
+$ rm -f ${bindir:=.}/log_usage.log ${bindir:=.}/log_usage_0.log ${bindir:=.}/log_usage_1.log
+
+# Would be nice for code coverage, but the early exit leads to lots of memory leaks
+#! output ignore
+#$ $SG_TEST_EXENV ${bindir:=.}/log_usage --help --help-log-categories
src/include/simgrid/sg_config.h
src/include/smpi/smpi_utils.hpp
src/include/surf/datatypes.h
- src/include/surf/maxmin.h
+ src/include/surf/maxmin.hpp
src/include/surf/surf.h
src/include/xbt/parmap.hpp
- src/mc/mc_mmu.h
- src/mc/mc_record.h
+ src/mc/mc_mmu.hpp
+ src/mc/mc_record.hpp
src/mc/PageStore.hpp
- src/msg/msg_private.h
+ src/msg/msg_private.hpp
src/simdag/dax.dtd
src/simdag/dax_dtd.c
src/simdag/dax_dtd.h
src/simdag/simdag_private.hpp
src/simix/simcalls.in
src/simix/simcalls.py
- src/simix/popping_private.h
+ src/simix/popping_private.hpp
src/simix/popping_bodies.cpp
src/simix/popping_generated.cpp
src/simix/popping_enum.h
- src/simix/popping_accessors.h
- src/simix/smx_host_private.h
- src/simix/smx_io_private.h
- src/simix/smx_network_private.h
- src/simix/smx_private.h
+ src/simix/popping_accessors.hpp
+ src/simix/smx_host_private.hpp
+ src/simix/smx_io_private.hpp
+ src/simix/smx_network_private.hpp
+ src/simix/smx_private.hpp
src/simix/smx_synchro_private.hpp
- src/smpi/colls/coll_tuned_topo.h
- src/smpi/colls/colls_private.h
- src/smpi/colls/smpi_mvapich2_selector_stampede.h
- src/smpi/include/private.h
+ src/smpi/colls/coll_tuned_topo.hpp
+ src/smpi/colls/colls_private.hpp
+ src/smpi/colls/smpi_mvapich2_selector_stampede.hpp
src/smpi/include/private.hpp
src/surf/cpu_cas01.hpp
src/surf/cpu_interface.hpp
src/surf/network_ns3.hpp
src/surf/network_smpi.hpp
src/surf/network_ib.hpp
- src/surf/ns3/ns3_interface.h
- src/surf/ns3/ns3_simulator.h
+ src/surf/ns3/ns3_interface.hpp
+ src/surf/ns3/ns3_simulator.hpp
src/surf/trace_mgr_test.cpp
src/surf/xml/simgrid.dtd
src/surf/xml/simgrid_dtd.h
src/surf/StorageImpl.hpp
src/surf/storage_n11.hpp
src/surf/surf_interface.hpp
- src/surf/surf_private.h
+ src/surf/surf_private.hpp
src/surf/PropertyHolder.hpp
src/surf/host_clm03.hpp
src/surf/HostImpl.hpp
endif()
set(NS3_SRC src/surf/network_ns3.cpp
- src/surf/ns3/ns3_simulator.cc )
+ src/surf/ns3/ns3_simulator.cpp )
set(SURF_SRC
src/kernel/routing/ClusterZone.cpp
)
set(BINDINGS_SRC
- src/bindings/lua/lua_private.h
- src/bindings/lua/lua_utils.h
- src/bindings/lua/simgrid_lua.h
+ src/bindings/lua/lua_private.hpp
+ src/bindings/lua/lua_utils.hpp
+ src/bindings/lua/simgrid_lua.hpp
)
set(JMSG_C_SRC
src/bindings/java/jmsg.cpp
- src/bindings/java/jmsg.h
+ src/bindings/java/jmsg.hpp
src/bindings/java/jmsg_as.cpp
- src/bindings/java/jmsg_as.h
+ src/bindings/java/jmsg_as.hpp
src/bindings/java/jmsg_comm.cpp
src/bindings/java/jmsg_comm.h
src/bindings/java/jmsg_file.cpp
src/bindings/java/jmsg_vm.cpp
src/bindings/java/jmsg_vm.h
src/bindings/java/jxbt_utilities.cpp
- src/bindings/java/jxbt_utilities.h
+ src/bindings/java/jxbt_utilities.hpp
src/bindings/java/JavaContext.cpp
src/bindings/java/JavaContext.hpp
src/bindings/java/jmsg_storage.cpp
src/instr/instr_paje_trace.cpp
src/instr/instr_paje_types.cpp
src/instr/instr_paje_values.cpp
- src/instr/instr_private.h
- src/instr/instr_smpi.h
+ src/instr/instr_private.hpp
+ src/instr/instr_smpi.hpp
src/instr/instr_resource_utilization.cpp
)
set(MC_SRC_BASE
src/mc/mc_base.cpp
src/mc/mc_base.h
- src/mc/mc_record.h
+ src/mc/mc_record.hpp
src/mc/mc_replay.h
src/mc/mc_record.cpp
src/mc/mc_config.cpp
src/mc/mc_forward.hpp
src/mc/Session.cpp
src/mc/Session.hpp
- src/mc/mc_unw.h
+ src/mc/mc_unw.hpp
src/mc/mc_unw.cpp
src/mc/mc_unw_vmread.cpp
src/mc/mc_checkpoint.cpp
- src/mc/mc_snapshot.h
+ src/mc/mc_snapshot.hpp
src/mc/mc_snapshot.cpp
src/mc/mc_page_snapshot.cpp
src/mc/mc_comm_pattern.cpp
src/mc/mc_record.cpp
src/mc/mc_member.cpp
src/mc/mc_memory.cpp
- src/mc/mc_private.h
- src/mc/mc_request.h
+ src/mc/mc_private.hpp
+ src/mc/mc_request.hpp
src/mc/mc_request.cpp
- src/mc/mc_safety.h
- src/mc/mc_state.h
+ src/mc/mc_safety.hpp
+ src/mc/mc_state.hpp
src/mc/mc_state.cpp
src/mc/VisitedState.cpp
src/mc/VisitedState.hpp
src/mc/mc_client_api.cpp
- src/mc/mc_smx.h
+ src/mc/mc_smx.hpp
src/mc/mc_smx.cpp
src/mc/mc_xbt.hpp
src/mc/mc_xbt.cpp
- src/mc/mc_exit.h
+ src/mc/mc_exit.hpp
src/mc/Transition.hpp
)
examples/platforms/storage/storage.xml
examples/platforms/small_platform.xml
examples/platforms/small_platform.lua
+ examples/platforms/small_platform_constant.xml
examples/platforms/small_platform_fatpipe.xml
examples/platforms/small_platform_one_link_routes.xml
examples/platforms/small_platform_with_failures.xml
${CMAKE_HOME_DIRECTORY}/src/simix/popping_generated.cpp
${CMAKE_HOME_DIRECTORY}/src/simix/popping_bodies.cpp
${CMAKE_HOME_DIRECTORY}/src/simix/popping_enum.h
- ${CMAKE_HOME_DIRECTORY}/src/simix/popping_accessors.h
+ ${CMAKE_HOME_DIRECTORY}/src/simix/popping_accessors.hpp
DEPENDS
${CMAKE_HOME_DIRECTORY}/src/simix/simcalls.py
${CMAKE_HOME_DIRECTORY}/src/simix/popping_generated.cpp
${CMAKE_HOME_DIRECTORY}/src/simix/popping_bodies.cpp
${CMAKE_HOME_DIRECTORY}/src/simix/popping_enum.h
- ${CMAKE_HOME_DIRECTORY}/src/simix/popping_accessors.h
+ ${CMAKE_HOME_DIRECTORY}/src/simix/popping_accessors.hpp
)
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
- "${CMAKE_HOME_DIRECTORY}/src/simix/popping_enum.h;${CMAKE_HOME_DIRECTORY}/src/simix/popping_generated.cpp;${CMAKE_HOME_DIRECTORY}/src/simix/popping_bodies.cpp;${CMAKE_HOME_DIRECTORY}/src/simix/popping_accessors.h"
+ "${CMAKE_HOME_DIRECTORY}/src/simix/popping_enum.h;${CMAKE_HOME_DIRECTORY}/src/simix/popping_generated.cpp;${CMAKE_HOME_DIRECTORY}/src/simix/popping_bodies.cpp;${CMAKE_HOME_DIRECTORY}/src/simix/popping_accessors.hpp"
)
endif()
endif()
set(SIMGRID_DEP "${SIMGRID_DEP} -Wl,-U -Wl,_smpi_simulated_main")
endif()
+# See https://github.com/HewlettPackard/foedus_code/blob/master/foedus-core/cmake/FindGccAtomic.cmake
+FIND_LIBRARY(GCCLIBATOMIC_LIBRARY NAMES atomic atomic.so.1 libatomic.so.1
+ HINTS
+ $ENV{HOME}/local/lib64
+ $ENV{HOME}/local/lib
+ /usr/local/lib64
+ /usr/local/lib
+ /opt/local/lib64
+ /opt/local/lib
+ /usr/lib64
+ /usr/lib
+ /lib64
+ /lib
+)
+
+# Fix a FTBFS on armel, mips, mipsel and friends (Debian's #872881)
+if(CMAKE_COMPILER_IS_GNUCC AND GCCLIBATOMIC_LIBRARY)
+ set(SIMGRID_DEP "${SIMGRID_DEP} -Wl,--as-needed -latomic -Wl,--no-as-needed")
+endif()
+
target_link_libraries(simgrid ${SIMGRID_DEP})
# Dependencies from maintainer mode