Browse Source

Document that main has to be redefined in the simgrid case

Samuel Thibault 11 years ago
parent
commit
d25132e68f
1 changed files with 15 additions and 5 deletions
  1. 15 5
      doc/doxygen/chapters/21simgrid.doxy

+ 15 - 5
doc/doxygen/chapters/21simgrid.doxy

@@ -11,6 +11,21 @@
 StarPU can use Simgrid in order to simulate execution on an arbitrary
 platform.
 
+\section Preparing your application for simulation.
+
+There are a few technical details which need to be handled for an application to
+be simulated through Simgrid.
+
+If the application uses <c>gettimeofday</c> to make its
+performance measurements, the real time will be used, which will be bogus. To
+get the simulated time, it has to use starpu_timing_now() which returns the
+virtual timestamp in ms.
+
+For some technical reason, the application's .c file which contains main() has
+to be recompiled with starpu.h, which in the simgrid case will #define main()
+into starpu_main(), and it is libstarpu which will provide the real main() and
+call the application's main().
+
 \section Calibration Calibration
 
 The idea is to first compile StarPU normally, and run the application,
@@ -75,11 +90,6 @@ $ ./example --cfg=contexts/stack_size:8192
 TEST FAILED !!!
 \endverbatim
 
-Note: of course, if the application uses <c>gettimeofday</c> to make its
-performance measurements, the real time will be used, which will be bogus. To
-get the simulated time, it has to use starpu_timing_now() which returns the
-virtual timestamp in ms.
-
 \section SimulationOnAnotherMachine Simulation On Another Machine
 
 The simgrid support even permits to perform simulations on another machine, your