Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge before commiting VM changes - Adrien
authorAdrien Lebre <alebre@adsein-4.local>
Wed, 8 Apr 2015 11:27:25 +0000 (13:27 +0200)
committerAdrien Lebre <alebre@adsein-4.local>
Wed, 8 Apr 2015 11:27:25 +0000 (13:27 +0200)
294 files changed:
.cproject
ChangeLog
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/src/internal_config.h.in
doc/Doxyfile.in
doc/msg-tuto-src/masterworker0.c
doc/msg-tuto-src/masterworker1.c
doc/msg-tuto-src/masterworker2.c
doc/msg-tuto-src/masterworker3.c
doc/msg-tuto-src/masterworker4.c
examples/java/bittorrent/Peer.java
examples/java/chord/Node.java
examples/java/cloud/Master.java
examples/java/cloud/Slave.java
examples/java/cloud/migration/Daemon.java
examples/java/io/Client.java
examples/java/mutualExclusion/Node.java
examples/java/tracing/CMakeLists.txt
examples/java/tracing/Receiver.java
examples/java/tracing/Sender.java
examples/msg/actions/actions.c
examples/msg/bittorrent/bittorrent.c
examples/msg/bittorrent/bittorrent_platfgen.c
examples/msg/bittorrent/messages.h
examples/msg/bittorrent/peer.c
examples/msg/bittorrent/peer.h
examples/msg/bittorrent/tracker.c
examples/msg/chainsend/broadcaster.h
examples/msg/chainsend/chainsend.c
examples/msg/chainsend/common.h
examples/msg/chainsend/messages.h
examples/msg/chainsend/peer.h
examples/msg/chord/chord.c
examples/msg/cloud/bound.c
examples/msg/cloud/master_worker_vm.c
examples/msg/cloud/migrate_vm.c
examples/msg/cloud/multicore.c
examples/msg/cloud/scale.c
examples/msg/cloud/simple_vm.c
examples/msg/cloud/two_tasks_vm.c
examples/msg/energy/e2/e2.c
examples/msg/energy/e3/e3.c
examples/msg/energy/pstate/pstate.c
examples/msg/exception/exception.c
examples/msg/gpu/test_MSG_gpu_task_create.c
examples/msg/gtnets/gtnets.c
examples/msg/icomms/peer.c
examples/msg/icomms/peer2.c
examples/msg/icomms/peer3.c
examples/msg/io/file.c
examples/msg/io/file_unlink.c
examples/msg/io/remote.c
examples/msg/io/storage.c
examples/msg/kademlia/kademlia.c
examples/msg/kademlia/node.c
examples/msg/kademlia/node.h
examples/msg/kademlia/routing_table.c
examples/msg/kademlia/task.h
examples/msg/masterslave/masterslave_arg.c
examples/msg/masterslave/masterslave_bypass.c
examples/msg/masterslave/masterslave_cluster.c
examples/msg/masterslave/masterslave_failure.c
examples/msg/masterslave/masterslave_failure_platfgen.c
examples/msg/masterslave/masterslave_forwarder.c
examples/msg/masterslave/masterslave_kill.c
examples/msg/masterslave/masterslave_mailbox.c
examples/msg/masterslave/masterslave_platfgen.c
examples/msg/mc/bugged1_liveness.c
examples/msg/mc/bugged2_liveness.c
examples/msg/mc/centralized_mutex.c
examples/msg/migration/migration.c
examples/msg/ns3/ns3.c
examples/msg/parallel_task/parallel_task.c
examples/msg/parallel_task/test_ptask.c
examples/msg/pastry/pastry.c
examples/msg/pmm/msg_pmm.c
examples/msg/priority/priority.c
examples/msg/properties/msg_prop.c
examples/msg/semaphores/synchro.c
examples/msg/sendrecv/sendrecv.c
examples/msg/start_kill_time/sk_time.c
examples/msg/suspend/suspend.c
examples/msg/token_ring/ring_call.c
examples/msg/token_ring/token_bypass.c
examples/msg/tracing/CMakeLists.txt
examples/msg/tracing/categories.c
examples/msg/tracing/link_srcdst_user_variables.c
examples/msg/tracing/link_user_variables.c
examples/msg/tracing/ms.c
examples/msg/tracing/procmig.c
examples/msg/tracing/simple.c
examples/msg/tracing/trace_platform.c
examples/msg/tracing/user_variables.c
examples/simdag/CMakeLists.txt
examples/simdag/dax/CMakeLists.txt
examples/simdag/dax/dax_test.c
examples/simdag/dax/smalldax_notrace.tesh [deleted file]
examples/simdag/dot/CMakeLists.txt
examples/simdag/dot/dot_test.c
examples/simdag/dot/dot_test2.c
examples/simdag/dot/ptg_test.c
examples/simdag/dot/simulate_dot.c
examples/simdag/dot/test_simdag_dotload_notrace.tesh [deleted file]
examples/simdag/goal/goal_test.c
examples/simdag/io/sd_io.c
examples/simdag/metaxml/sd_meta.c
examples/simdag/properties/sd_prop.c
examples/simdag/scheduling/minmin_test.c
examples/simdag/sd_avail.c
examples/simdag/sd_comm_throttling.c
examples/simdag/sd_fail.c
examples/simdag/sd_seq_access.c
examples/simdag/sd_test.c
examples/simdag/sd_test2.c
examples/simdag/sd_typed_tasks_test.c
examples/simdag/simdag_trace.c
examples/simdag/test_simdag_fail_notrace.tesh [deleted file]
examples/smpi/NAS/DT-trace/dt.c
examples/smpi/NAS/EP-trace/ep-trace.c
examples/smpi/NAS/IS-trace/is-trace.c
examples/smpi/replay_multiple/replay_multiple.c
examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c
examples/smpi/tracing/smpi_traced.c
include/msg/datatypes.h [deleted file]
include/simdag/datatypes.h [deleted file]
include/simgrid/instr.h [moved from include/instr/instr.h with 71% similarity]
include/simgrid/jedule/jedule_events.h [moved from include/instr/jedule/jedule_events.h with 100% similarity]
include/simgrid/jedule/jedule_output.h [moved from include/instr/jedule/jedule_output.h with 100% similarity]
include/simgrid/jedule/jedule_platform.h [moved from include/instr/jedule/jedule_platform.h with 100% similarity]
include/simgrid/jedule/jedule_sd_binding.h [moved from include/instr/jedule/jedule_sd_binding.h with 91% similarity]
include/simgrid/msg.h [moved from include/msg/msg.h with 78% similarity]
include/simgrid/simdag.h [moved from include/simdag/simdag.h with 72% similarity]
include/simgrid/simix.h
include/simgrid_config.h.in
src/bindings/java/jmsg.c
src/bindings/java/jmsg.h
src/bindings/java/jmsg_as.c
src/bindings/java/jmsg_as.h
src/bindings/java/jmsg_comm.c
src/bindings/java/jmsg_comm.h
src/bindings/java/jmsg_file.h
src/bindings/java/jmsg_host.c
src/bindings/java/jmsg_host.h
src/bindings/java/jmsg_process.c
src/bindings/java/jmsg_process.h
src/bindings/java/jmsg_storage.c
src/bindings/java/jmsg_storage.h
src/bindings/java/jmsg_synchro.h
src/bindings/java/jmsg_task.c
src/bindings/java/jmsg_task.h
src/bindings/java/jmsg_vm.c
src/bindings/java/jmsg_vm.h
src/bindings/java/jtrace.c
src/bindings/java/org/simgrid/msg/As.java
src/bindings/java/org/simgrid/msg/Comm.java
src/bindings/java/org/simgrid/msg/File.java
src/bindings/java/org/simgrid/msg/Host.java
src/bindings/java/org/simgrid/msg/Msg.java
src/bindings/java/org/simgrid/msg/MsgException.java
src/bindings/java/org/simgrid/msg/Mutex.java
src/bindings/java/org/simgrid/msg/Process.java
src/bindings/java/org/simgrid/msg/RngStream.java
src/bindings/java/org/simgrid/msg/Semaphore.java
src/bindings/java/org/simgrid/msg/Storage.java
src/bindings/java/org/simgrid/msg/Task.java
src/bindings/java/org/simgrid/msg/VM.java
src/bindings/java/org/simgrid/trace/Trace.java
src/bindings/lua/lua_private.h
src/bindings/lua/lua_task.c
src/bindings/lua/simgrid_lua.c
src/include/surf/maxmin.h
src/include/surf/surf.h
src/instr/instr_config.c
src/instr/instr_interface.c
src/instr/instr_paje_containers.c
src/instr/instr_paje_header.c
src/instr/instr_paje_types.c
src/instr/instr_paje_values.c
src/instr/instr_private.h
src/instr/instr_resource_utilization.c
src/instr/instr_trace.c
src/mc/mc_private.h
src/msg/instr_msg_process.c
src/msg/instr_msg_task.c
src/msg/instr_msg_vm.c
src/msg/msg_global.c
src/msg/msg_gos.c
src/msg/msg_io.c
src/msg/msg_mailbox.c
src/msg/msg_mailbox.h
src/msg/msg_private.h
src/msg/msg_process.c
src/msg/msg_task.c
src/msg/msg_vm.c
src/simdag/instr_sd_task.c
src/simdag/private.h
src/simdag/sd_daxloader.c
src/simdag/sd_dotloader.c
src/simdag/sd_global.c
src/simdag/sd_link.c
src/simdag/sd_task.c
src/simdag/sd_workstation.c
src/simgrid/sg_config.c
src/simix/libsmx.c
src/simix/popping_accessors.h
src/simix/popping_bodies.c
src/simix/popping_enum.h
src/simix/popping_generated.c
src/simix/simcalls.in
src/simix/smx_global.c
src/simix/smx_host.c
src/simix/smx_host_private.h
src/simix/smx_io.c
src/simix/smx_network.c
src/simix/smx_private.h
src/simix/smx_process.c
src/smpi/colls/smpi_automatic_selector.c
src/smpi/instr_smpi.c
src/smpi/private.h
src/smpi/smpi_base.c
src/smpi/smpi_bench.c
src/smpi/smpi_global.c
src/smpi/smpi_pmpi.c
src/smpi/smpi_replay.c
src/surf/cpu_cas01.cpp
src/surf/cpu_interface.cpp
src/surf/instr_routing.c
src/surf/instr_surf.c
src/surf/network_cm02.cpp
src/surf/network_constant.cpp
src/surf/network_gtnets.hpp
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp
src/surf/storage_n11.cpp
src/surf/surf_c_bindings.cpp
src/surf/surf_interface.cpp
src/surf/surf_interface.hpp
src/surf/surf_routing.cpp
src/surf/surf_routing_floyd.cpp
src/surf/surfxml_parse.c
src/surf/surfxml_parseplatf.c
src/surf/vm_workstation_hl13.cpp
src/surf/vm_workstation_hl13.hpp
src/surf/workstation_clm03.cpp
src/surf/workstation_clm03.hpp
src/surf/workstation_interface.hpp
src/surf/workstation_ptask_L07.cpp
src/surf/workstation_ptask_L07.hpp
src/xbt/log.c
teshsuite/mc/replay/random_bug.c
teshsuite/msg/get_sender/get_sender.c
teshsuite/msg/host_on_off/host_on_off.c
teshsuite/msg/host_on_off_processes/host_on_off_processes.c
teshsuite/msg/pid/pid.c
teshsuite/msg/process/process.c
teshsuite/msg/process_join/process_join.c
teshsuite/msg/storage/concurrent_rw.c
teshsuite/msg/storage/storage_basic.c
teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c
teshsuite/msg/trace/test_trace_integration.c
teshsuite/simdag/availability/availability_test.c
teshsuite/simdag/basic/basic0.c
teshsuite/simdag/basic/basic1.c
teshsuite/simdag/basic/basic2.c
teshsuite/simdag/basic/basic3.c
teshsuite/simdag/basic/basic4.c
teshsuite/simdag/basic/basic5.c
teshsuite/simdag/basic/basic6.c
teshsuite/simdag/incomplete/incomplete.c
teshsuite/simdag/network/mxn/test_intra_all2all.c
teshsuite/simdag/network/mxn/test_intra_independent_comm.c
teshsuite/simdag/network/mxn/test_intra_scatter.c
teshsuite/simdag/network/p2p/test_latency1.c
teshsuite/simdag/network/p2p/test_latency2.c
teshsuite/simdag/network/p2p/test_latency3.c
teshsuite/simdag/network/p2p/test_latency_bound.c
teshsuite/simdag/network/test_reinit_costs.c
teshsuite/simdag/partask/test_comp_only_par.c
teshsuite/simdag/partask/test_comp_only_seq.c
teshsuite/simdag/platforms/Evaluate_get_route_time.c
teshsuite/simdag/platforms/Evaluate_parse_time.c
teshsuite/simdag/platforms/basic_link_test.c
teshsuite/simdag/platforms/basic_parsing_test.c
teshsuite/simdag/platforms/basic_tracing.c
teshsuite/simdag/platforms/bogus_disk_attachment.tesh
teshsuite/simdag/platforms/bogus_missing_gateway.tesh
teshsuite/simdag/platforms/bogus_two_hosts_asymetric.tesh
teshsuite/simdag/platforms/flatifier.c
teshsuite/simdag/platforms/is_router_test.c
teshsuite/smpi/mpich3-test/comm/CMakeLists.txt
teshsuite/smpi/mpich3-test/topo/CMakeLists.txt
tools/graphicator/graphicator.c

index e21cad4..11b5c6e 100644 (file)
--- a/.cproject
+++ b/.cproject
                                </extensions>
                        </storageModule>
                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-                               <configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.1011977604" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+                               <configuration buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.1011977604" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
                                        <folderInfo id="cdt.managedbuild.toolchain.gnu.base.1011977604.157358594" name="/" resourcePath="">
                                                <toolChain id="cdt.managedbuild.toolchain.gnu.base.368132295" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
                                                        <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1122260779" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
-                                                       <builder id="cdt.managedbuild.target.gnu.builder.base.1747533038" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+                                                       <builder id="cdt.managedbuild.target.gnu.builder.base.1747533038" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
                                                        <tool id="cdt.managedbuild.tool.gnu.archiver.base.374652938" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
-                                                       <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.738159103" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/>
-                                                       <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1053916774" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.738159103" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
+                                                               <option id="gnu.cpp.compiler.option.include.paths.216814103" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+                                                                       <listOptionValue builtIn="false" value="/usr/lib/jvm/java-7-openjdk-amd64/include"/>
+                                                               </option>
+                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1641160853" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+                                                       </tool>
+                                                       <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1053916774" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
+                                                               <option id="gnu.c.compiler.option.include.paths.100642505" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+                                                                       <listOptionValue builtIn="false" value="/usr/lib/jvm/java-7-openjdk-amd64/include"/>
+                                                               </option>
+                                                               <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.538328935" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+                                                       </tool>
                                                        <tool id="cdt.managedbuild.tool.gnu.c.linker.base.293965464" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
-                                                       <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.277853741" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/>
-                                                       <tool id="cdt.managedbuild.tool.gnu.assembler.base.1593279917" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.277853741" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.144005301" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+                                                                       <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+                                                                       <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+                                                               </inputType>
+                                                       </tool>
+                                                       <tool id="cdt.managedbuild.tool.gnu.assembler.base.1593279917" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
+                                                               <option id="gnu.both.asm.option.include.paths.2076655261" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+                                                                       <listOptionValue builtIn="false" value="/usr/lib/jvm/java-7-openjdk-amd64/include"/>
+                                                               </option>
+                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.2071407067" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                       </tool>
                                                </toolChain>
                                        </folderInfo>
                                </configuration>
        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
                <project id="simgrid.null.30922824" name="simgrid"/>
        </storageModule>
+       <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+       <storageModule moduleId="refreshScope" versionNumber="2">
+               <configuration configurationName="Default">
+                       <resource resourceType="PROJECT" workspacePath="/simgrid"/>
+               </configuration>
+       </storageModule>
        <storageModule moduleId="scannerConfiguration">
                <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+               <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1011977604;cdt.managedbuild.toolchain.gnu.base.1011977604.157358594;cdt.managedbuild.tool.gnu.c.compiler.base.1053916774;cdt.managedbuild.tool.gnu.c.compiler.input.538328935">
+                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+               </scannerConfigBuildInfo>
+               <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1011977604;cdt.managedbuild.toolchain.gnu.base.1011977604.157358594;cdt.managedbuild.tool.gnu.cpp.compiler.base.738159103;cdt.managedbuild.tool.gnu.cpp.compiler.input.1641160853">
+                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+               </scannerConfigBuildInfo>
        </storageModule>
-       <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
 </cproject>
index 5cdf3a6..dc3e85d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,10 +3,19 @@ SimGrid (3.12) NOT RELEASED; urgency=low
  cMSG:
  * Interface improvement:
    - Rename MSG_host_is_avail(h) to MSG_host_is_on(h)
+   - Sanitize the interface in MSG_task_ module:
+     - Merge two functions that were close enough but misleading:
+       set_compute_duration(t)      -> set_flops_amount(t)
+       get_remaining_computation(t) -> set_flops_amount(t)
+     - set_data_size(t) -> set_bytes_amount(t)
+       get_data_size(t) -> get_bytes_amount(t)
    - Massive cleanups in the functions related to the energy
  jMSG:
  * Interface improvement:
    - Rename Host.isAvail() to Host.isOn()
+   - Rename Process.currentProcess() to Process.getCurrentProcess()
+   - Rename Task.setDataSize() to Task.setBytesAmount()
+   - Merge Task.getRemainingDuration() and Task.getComputeDuration() into Task.getFlopsAmount()
    
  SIMIX:
  * New functions
@@ -63,7 +72,15 @@ SimGrid (3.12) NOT RELEASED; urgency=low
    - Add a xbt_heap_update function, to avoid costly xbt_heap_remove+xbt_heap_insert use 
    - Add a xbt wrapper for simcall_mutex_trylock (asked in [#17878])
    - Add two new log appenders : rollfile and splitfile. Patch by Fabien Chaix.
-
+ Build System
+  * Tracing is now always enabled (no way to turn it out)
+  * Move headers around to sort them out on installed systems:
+    - instr/instr.h  -> simgrid/instr.h
+    - instr/jedule/* -> simgrid/jedule
+    - simdag/datatypes.h was removed
+    - simdag/simdag.h -> simgrid/simdag.h
+    - msg/datatypes.h was removed
+    - msg/msg.h -> simgrid/msg.h
 
  -- $date Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
index 103b33e..f24aff1 100644 (file)
@@ -89,10 +89,8 @@ IF(NOT enable_memcheck)
   # test for code coverage
   ADD_TEST(test-help                             ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help)
   ADD_TEST(test-help-models                      ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help-models)
-  IF(HAVE_TRACING)
-    ADD_TEST(test-tracing-help                   ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help-tracing)
-    ADD_TESH(graphicator                         --setenv srcdir=${CMAKE_HOME_DIRECTORY} --setenv bindir=${CMAKE_BINARY_DIR}/bin --cd ${CMAKE_HOME_DIRECTORY}/tools/graphicator graphicator.tesh)
-  ENDIF()
+  ADD_TEST(test-tracing-help                   ${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms/basic_parsing_test --help-tracing)
+  ADD_TESH(graphicator                         --setenv srcdir=${CMAKE_HOME_DIRECTORY} --setenv bindir=${CMAKE_BINARY_DIR}/bin --cd ${CMAKE_HOME_DIRECTORY}/tools/graphicator graphicator.tesh)
   # END TESH TESTS
 
   ADD_TESH(mc-replay-random-bug                  --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/mc/replay --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/mc/replay --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/mc/replay random_bug_replay.tesh)
@@ -256,26 +254,23 @@ IF(NOT enable_memcheck)
     ADD_TESH_FACTORIES(msg-gtnets-onelink        "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-gtnets.tesh)
     ADD_TESH_FACTORIES(msg-gtnets-dogbone-lv08   "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-dogbone-lv08.tesh)
     ADD_TESH_FACTORIES(msg-gtnets-onelink-lv08   "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/gtnets-onelink-lv08.tesh)
-    IF(HAVE_TRACING)
-      ADD_TESH(msg-tracing-gtnets-waxman         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-waxman.tesh)
-      ADD_TESH(msg-tracing-gtnets-dogbone        --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-dogbone-gtnets.tesh)
-      ADD_TESH(msg-tracing-gtnets-onelink        --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-onelink-gtnets.tesh)
-      ADD_TESH(msg-tracing-gtnets-dogbone-lv08   --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-dogbone-lv08.tesh)
-      ADD_TESH(msg-tracing-gtnets-onelink-lv08   --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-onelink-lv08.tesh)
-    ENDIF()
+    ADD_TESH(msg-tracing-gtnets-waxman         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-waxman.tesh)
+    ADD_TESH(msg-tracing-gtnets-dogbone        --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-dogbone-gtnets.tesh)
+    ADD_TESH(msg-tracing-gtnets-onelink        --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-onelink-gtnets.tesh)
+    ADD_TESH(msg-tracing-gtnets-dogbone-lv08   --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-dogbone-lv08.tesh)
+    ADD_TESH(msg-tracing-gtnets-onelink-lv08   --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/gtnets/tracing-gtnets-onelink-lv08.tesh)
   ENDIF()
   IF(HAVE_NS3)
     ADD_TESH_FACTORIES(msg-ns3                   "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/ns3/ns3.tesh)
   ENDIF()
-  IF(HAVE_TRACING)
-    ADD_TESH(tracing-ms                          --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/ms.tesh)
-    ADD_TESH(tracing-trace-platform              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/trace_platform.tesh)
-    ADD_TESH(tracing-user-variables              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/user_variables.tesh)
-    ADD_TESH(tracing-link-user-variables         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/link_user_variables.tesh)
-    ADD_TESH(tracing-link-srcdst-user-variables  --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/link_srcdst_user_variables.tesh)
-    ADD_TESH(tracing-categories                  --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/categories.tesh)
-    ADD_TESH(tracing-process-migration           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/procmig.tesh)
-  ENDIF()
+
+  ADD_TESH(tracing-ms                          --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/ms.tesh)
+  ADD_TESH(tracing-trace-platform              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/trace_platform.tesh)
+  ADD_TESH(tracing-user-variables              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/user_variables.tesh)
+  ADD_TESH(tracing-link-user-variables         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/link_user_variables.tesh)
+  ADD_TESH(tracing-link-srcdst-user-variables  --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/link_srcdst_user_variables.tesh)
+  ADD_TESH(tracing-categories                  --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/categories.tesh)
+  ADD_TESH(tracing-process-migration           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/procmig.tesh)
   ADD_TEST(msg-icomms-waitany                      ${CMAKE_BINARY_DIR}/examples/msg/icomms/peer3 ${CMAKE_HOME_DIRECTORY}/examples/platforms/small_platform.xml ${CMAKE_HOME_DIRECTORY}/examples/msg/icomms/deployment_peer05.xml)
   # END TESH TESTS
 
@@ -290,7 +285,7 @@ IF(NOT enable_memcheck)
     ADD_TESH(tesh-parser-bogus-disk-attachment   --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms bogus_disk_attachment.tesh)
 
     #These tests fail on Windows as the signal returned is not the same as Unix would send.
-    IF(HAVE_TRACING AND WIN32)
+    IF(WIN32)
       set_property(TEST tesh-parser-bogus-symmetric PROPERTY WILL_FAIL TRUE)
       set_property(TEST tesh-parser-bogus-missing-gw PROPERTY WILL_FAIL TRUE)
       set_property(TEST tesh-parser-bogus-disk-attachment PROPERTY WILL_FAIL TRUE)
@@ -328,38 +323,24 @@ IF(NOT enable_memcheck)
 
   # BEGIN TESH TESTS
   IF(HAVE_GRAPHVIZ)
-    IF(HAVE_TRACING)
-      ADD_TESH(simdag-dotload                    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag/dot --cd ${CMAKE_BINARY_DIR}/examples/simdag/dot ${CMAKE_HOME_DIRECTORY}/examples/simdag/dot/test_simdag_dotload.tesh)
-    ELSE()
-      ADD_TESH(simdag-dotload                    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag/dot --cd ${CMAKE_BINARY_DIR}/examples/simdag/dot ${CMAKE_HOME_DIRECTORY}/examples/simdag/dot/test_simdag_dotload_notrace.tesh)
-    ENDIF()
+    ADD_TESH(simdag-dotload                    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag/dot --cd ${CMAKE_BINARY_DIR}/examples/simdag/dot ${CMAKE_HOME_DIRECTORY}/examples/simdag/dot/test_simdag_dotload.tesh)
   ENDIF()
   ADD_TESH(simdag-simdag                         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag.tesh)
   ADD_TESH(simdag-simdag2                        --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag2.tesh)
   ADD_TESH(simdag-seq-access                     --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag_seq_access.tesh)
   ADD_TESH(simdag-typed-tasks                    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag_typed_tasks.tesh)
-  IF(HAVE_TRACING)
-    ADD_TESH(simdag-fail                         --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag test_simdag_fail.tesh)
-  ELSE()
-    ADD_TESH(simdag-fail                         --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag test_simdag_fail_notrace.tesh)
-  ENDIF()
+  ADD_TESH(simdag-fail                         --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag test_simdag_fail.tesh)
   ADD_TESH(simdag-avail                          --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag test_simdag_avail.tesh)
   ADD_TESH(simdag-comm-throttling                --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag_comm_throttling.tesh)
-  IF(HAVE_TRACING)
-    ADD_TESH(simdag-dax                          --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/dax --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax smalldax.tesh)
-  ELSE()
-    ADD_TESH(simdag-dax                          --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/dax --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax smalldax_notrace.tesh)
-  ENDIF()
+  ADD_TESH(simdag-dax                          --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/dax --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax smalldax.tesh)
   ADD_TESH(simdag-dax-cycle                      --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag/dax --cd ${CMAKE_BINARY_DIR}/examples/simdag/dax ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax/simple_dax_with_cycle.tesh)
   ADD_TESH(simdag-prop                           --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/properties/test_prop.tesh)
   ADD_TESH(simdag-minmin-scheduling              --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/scheduling --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/scheduling test_minmin.tesh)
   ADD_TESH(simdag-io                             --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/ --setenv srcdir=${CMAKE_HOME_DIRECTORY}/ --cd ${CMAKE_HOME_DIRECTORY}/examples/ ${CMAKE_HOME_DIRECTORY}/examples/simdag/io/io.tesh)
-  IF(HAVE_TRACING)
-    ADD_TESH(tracing-simdag                      --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag_tracing.tesh)
-  ENDIF()
+  ADD_TESH(tracing-simdag                      --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag_tracing.tesh)
   # END TESH TESTS
 
-  IF(HAVE_TRACING AND WIN32)
+  IF(WIN32)
     # expect this one to fail on Windows, as generated random colors will be different
     set_property(TEST tracing-simdag PROPERTY WILL_FAIL TRUE)
   ENDIF()
@@ -385,9 +366,7 @@ IF(NOT enable_memcheck)
     IF(enable_debug)
       ADD_TESH_FACTORIES(tesh-smpi-bug-17132-surf-debug "thread" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132 --cd ${CMAKE_BINARY_DIR}/teshsuite/bug-17132 ${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132/bug-17132-surf-debug.tesh)
     ENDIF()
-    IF(HAVE_TRACING)
-      ADD_TESH(tesh-smpi-replay-ti-tracing       --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pingpong TI_output.tesh)
-    ENDIF()
+    ADD_TESH(tesh-smpi-replay-ti-tracing       --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pingpong TI_output.tesh)
     FOREACH (GATHER_COLL default ompi mpich ompi_basic_linear ompi_linear_sync ompi_binomial mvapich2 mvapich2_two_level impi)
       ADD_TESH(tesh-smpi-gather-coll-${GATHER_COLL} --cfg smpi/gather:${GATHER_COLL} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/gather --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/gather gather_coll.tesh)
     ENDFOREACH()
@@ -482,10 +461,8 @@ IF(NOT enable_memcheck)
     IF(NOT HAVE_MC)
       ADD_TESH(smpi-replay-multiple      --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple --cd ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple ${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/replay_multiple.tesh)
     ENDIF()
-    IF(HAVE_TRACING)
-      ADD_TESH(smpi-tracing-ptp                  --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/tracing/smpi_traced.tesh)
-      ADD_TESH(smpi-replay                       --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/smpi_replay.tesh)
-    ENDIF()
+    ADD_TESH(smpi-tracing-ptp                  --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/tracing/smpi_traced.tesh)
+    ADD_TESH(smpi-replay                       --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/smpi_replay.tesh)
     IF(HAVE_MC)
       ADD_TESH(smpi-mc-only-send-determinism                  --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/mc --cd ${CMAKE_BINARY_DIR}/examples/smpi/mc ${CMAKE_HOME_DIRECTORY}/examples/smpi/mc/only_send_deterministic.tesh)
     ENDIF()
@@ -542,9 +519,7 @@ IF(NOT enable_memcheck)
     ADD_TESH(java-surf-cpu-model                 --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/surfCpuModel/surf_cpu_model.tesh)
     ADD_TESH(java-surf-plugin                    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/surfPlugin/surf_plugin.tesh)
     ADD_TESH(java-suspend                        --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/suspend/suspend.tesh)
-    IF(HAVE_TRACING)
-      ADD_TESH(java-tracing                      --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/tracing/tracingPingPong.tesh)
-    ENDIF()
+    ADD_TESH(java-tracing                      --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/tracing/tracingPingPong.tesh)
 
     # teshsuite ones
     ADD_TESH(tesh-java-sleep-host-off            --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/teshsuite/java ${CMAKE_HOME_DIRECTORY}/teshsuite/java/sleep_host_off/sleep_host_off.tesh)
index 786550e..d15f1c6 100644 (file)
@@ -207,13 +207,6 @@ endif()
 
 set(CONTEXT_UCONTEXT 0)
 SET(CONTEXT_THREADS 0)
-SET(HAVE_TRACING 1)
-
-if(enable_tracing)
-  SET(HAVE_TRACING 1)
-else()
-  SET(HAVE_TRACING 0)
-endif()
 
 if(enable_jedule)
   SET(HAVE_JEDULE 1)
index e9ad635..7d18a4f 100644 (file)
@@ -539,13 +539,8 @@ set(JTRACE_JAVA_SRC
   src/bindings/java/org/simgrid/trace/Trace.java
 )
 
-if(HAVE_TRACING)
-  list(APPEND JMSG_C_SRC ${JTRACE_C_SRC})
-  list(APPEND JMSG_JAVA_SRC ${JTRACE_JAVA_SRC})
-else()
-  list(APPEND EXTRA_DIST ${JTRACE_C_SRC})
-  list(APPEND EXTRA_DIST ${JTRACE_JAVA_SRC})
-endif()
+list(APPEND JMSG_C_SRC ${JTRACE_C_SRC})
+list(APPEND JMSG_JAVA_SRC ${JTRACE_JAVA_SRC})
 
 set(LUA_SRC
   src/bindings/lua/lua_comm.c
@@ -573,10 +568,10 @@ set(TRACING_SRC
   )
 
 set(JEDULE_SRC
-  include/instr/jedule/jedule_events.h
-  include/instr/jedule/jedule_output.h
-  include/instr/jedule/jedule_platform.h
-  include/instr/jedule/jedule_sd_binding.h
+  include/simgrid/jedule/jedule_events.h
+  include/simgrid/jedule/jedule_output.h
+  include/simgrid/jedule/jedule_platform.h
+  include/simgrid/jedule/jedule_sd_binding.h
   src/instr/jedule/jedule_events.c
   src/instr/jedule/jedule_output.c
   src/instr/jedule/jedule_platform.c
@@ -635,11 +630,9 @@ set(MC_SRC
   )
 
 set(headers_to_install
-  include/instr/instr.h
-  include/msg/datatypes.h
-  include/msg/msg.h
-  include/simdag/datatypes.h
-  include/simdag/simdag.h
+  include/simgrid/instr.h
+  include/simgrid/msg.h
+  include/simgrid/simdag.h
   include/simgrid.h
   include/simgrid/datatypes.h
   include/simgrid/modelchecker.h
@@ -769,17 +762,10 @@ if(enable_smpi)
     )
 endif()
 
-if(${HAVE_TRACING})
-  set(simgrid_sources
+set(simgrid_sources
     ${simgrid_sources}
     ${TRACING_SRC}
     )
-else()
-  set(EXTRA_DIST
-    ${EXTRA_DIST}
-    ${TRACING_SRC}
-    )
-endif()
 
 set(simgrid_sources
   ${simgrid_sources}
index 76f05f8..3158937 100644 (file)
 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
 #cmakedefine TIME_WITH_SYS_TIME @TIME_WITH_SYS_TIME@
 
-/* Tracing SimGrid */
-#cmakedefine HAVE_TRACING @HAVE_TRACING@
-
 /* Tracking of latency bound */
 #cmakedefine HAVE_LATENCY_BOUND_TRACKING @HAVE_LATENCY_BOUND_TRACKING@
 
index 920688e..005aafa 100644 (file)
@@ -678,7 +678,6 @@ INPUT                  = doxygen/index.doc \
                          @top_srcdir@/include/ \
                          @top_srcdir@/include/msg \
                          @top_srcdir@/include/xbt \
-                         @top_srcdir@/include/simdag \
                          @top_srcdir@/include/simgrid \
                          @top_srcdir@/src/include/surf \
                          @top_srcdir@/src/xbt/ \
@@ -1560,7 +1559,6 @@ PREDEFINED             = DOXYGEN \
                          XBT_PUBLIC_DATA(type)="extern type" \
                          XBT_PUBLIC_CLASS=class \
                          XBT_INLINE= \
-                         HAVE_TRACING \
                          MSG_USE_DEPRECATED
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
index b283dc5..328cef1 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 5b240e3..4ace831 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index aa03897..f3b92c6 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index c2891d5..0f6c7a1 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 1f4bb50..c73cc7e 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 6ce5a54..569e8b8 100644 (file)
@@ -201,7 +201,7 @@ public class Peer extends Process {
                                }
                        }                       
                }
-               this.hostname = host.getName();
+               this.hostname = getHost().getName();
        }
        /**
         * Retrieves the peer list from the tracker
index 27cb63a..9309923 100644 (file)
@@ -151,7 +151,7 @@ public class Node extends Process {
                        // is my successor the successor?
                        if (isInInterval(fTask.requestId, this.id + 1, fingers[0])) {
                                //Msg.info("Send the request to " + fTask.answerTo + " with answer " + fingers[0]);
-                               FindSuccessorAnswerTask answer = new FindSuccessorAnswerTask(host.getName(), mailbox, fingers[0]);
+                               FindSuccessorAnswerTask answer = new FindSuccessorAnswerTask(getHost().getName(), mailbox, fingers[0]);
                                answer.dsend(fTask.answerTo);
                        }
                        else {
@@ -164,7 +164,7 @@ public class Node extends Process {
                else if (task instanceof GetPredecessorTask) {
                        GetPredecessorTask gTask = (GetPredecessorTask)(task);
                        Msg.debug("Receiving a 'Get Predecessor' request from " + gTask.issuerHostName);
-                       GetPredecessorAnswerTask answer = new GetPredecessorAnswerTask(host.getName(), mailbox, predId);
+                       GetPredecessorAnswerTask answer = new GetPredecessorAnswerTask(getHost().getName(), mailbox, predId);
                        answer.dsend(gTask.answerTo);
                }
                else if (task instanceof NotifyTask) {
@@ -240,7 +240,7 @@ public class Node extends Process {
                boolean stop = false;
                Msg.debug("Sending a 'Get Predecessor' request to " + askTo);
                String mailboxTo = Integer.toString(askTo);
-               GetPredecessorTask sendTask = new GetPredecessorTask(host.getName(), this.mailbox);
+               GetPredecessorTask sendTask = new GetPredecessorTask(getHost().getName(), this.mailbox);
                try {
                        sendTask.send(mailboxTo, Common.TIMEOUT);                       
                        try {
@@ -294,7 +294,7 @@ public class Node extends Process {
                int successor = -1;
                boolean stop = false;
                String mailbox = Integer.toString(askTo);
-               Task sendTask = new FindSuccessorTask(host.getName(), this.mailbox, id);
+               Task sendTask = new FindSuccessorTask(getHost().getName(), this.mailbox, id);
                Msg.debug("Sending a 'Find Successor' request to " + mailbox + " for id " + id);
                try {
                        sendTask.send(mailbox, Common.TIMEOUT);
@@ -374,7 +374,7 @@ public class Node extends Process {
         */     
        void remoteNotify(int notifyId, int predecessorCandidateId) {
                Msg.debug("Sending a 'Notify' request to " + notifyId);
-               Task sentTask = new NotifyTask(host.getName(), this.mailbox, predecessorCandidateId);
+               Task sentTask = new NotifyTask(getHost().getName(), this.mailbox, predecessorCandidateId);
                sentTask.dsend(Integer.toString(notifyId));
        }
        /**
index 2cb86b5..a581aff 100644 (file)
@@ -34,7 +34,7 @@ public class Master extends Process {
                        vm.start();
                        vms.add(vm);
                        Slave slave = new Slave(vm,i);
-                       Msg.info("Put Worker "+slave.msgName()+ " on "+vm.getName());
+                       Msg.info("Put Worker "+slave.getName()+ " on "+vm.getName());
                        slave.start();
        
                }
index 7aaa48e..d97b0be 100644 (file)
@@ -19,7 +19,7 @@ public class Slave extends Process {
                this.number = number;
        }
        public void main(String[] args) throws MsgException {
-               Msg.info(this.msgName() +" is listenning on MBOX:WRK0"+ number);
+               Msg.info(this.getName() +" is listenning on MBOX:WRK0"+ number);
                while(true) {                   
                        Task task;
                         try {
@@ -38,7 +38,7 @@ public class Slave extends Process {
                        } catch (MsgException e) {
 
                        }
-                       Msg.info(this.msgName() +" executed task (" + task.getName()+")");
+                       Msg.info(this.getName() +" executed task (" + task.getName()+")");
                }
 
                
index 80cf2a8..68a31f3 100644 (file)
@@ -33,6 +33,6 @@ public class Daemon extends Process {
     }
 
     public double getRemaining(){
-        return this.currentTask.getRemainingDuration();
-    }
+        return this.currentTask.getFlopsAmount();
     }
+}
index 487878c..b8d718f 100644 (file)
@@ -36,7 +36,7 @@ public class Client extends Process {
   public void main(String[] args) throws MsgException {
     
        // Retrieve all mount points of current host
-    Storage[] storages = host.getMountedStorage();
+    Storage[] storages = getHost().getMountedStorage();
     
        for (int i = 0; i < storages.length; i++) {
                // For each disk mounted on host
index 0b622fe..55d91e3 100644 (file)
@@ -17,11 +17,11 @@ public class Node extends Process {
                super(host,name,args);
     } 
        public void request(double CStime) throws MsgException {
-               RequestTask req = new RequestTask(this.name);
+               RequestTask req = new RequestTask(getName());
           Msg.info("Send a request to the coordinator");
                req.send("coordinator");
           Msg.info("Wait for a grant from the coordinator");
-               Task.receive(this.name); // FIXME: ensure that this is a grant
+               Task.receive(getName()); // FIXME: ensure that this is a grant
                Task compute = new Task("CS", CStime, 0);
                compute.execute();
                ReleaseTask release = new ReleaseTask();
index 26d6584..ecc7337 100644 (file)
@@ -1,26 +1,24 @@
 cmake_minimum_required(VERSION 2.6)
 
-if(HAVE_TRACING)
-  set(example java_tracing)
-  set(sources
-    ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTask.java
-    ${CMAKE_CURRENT_SOURCE_DIR}/Receiver.java
-    ${CMAKE_CURRENT_SOURCE_DIR}/Sender.java
-    ${CMAKE_CURRENT_SOURCE_DIR}/TracingTest.java
-    )
+set(example java_tracing)
+set(sources
+  ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTask.java
+  ${CMAKE_CURRENT_SOURCE_DIR}/Receiver.java
+  ${CMAKE_CURRENT_SOURCE_DIR}/Sender.java
+  ${CMAKE_CURRENT_SOURCE_DIR}/TracingTest.java
+  )
 
-  if(enable_java)
-    add_custom_command(
-      COMMENT "Building ${example}..."
-      OUTPUT ${example}_compiled
-      DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
-      COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR}
-                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
-      COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
-      COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
-      )
-    add_custom_target(${example} ALL DEPENDS ${example}_compiled)
-  endif()
+if(enable_java)
+  add_custom_command(
+    COMMENT "Building ${example}..."
+    OUTPUT ${example}_compiled
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
+    COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR}
+                            -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
+    COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
+    COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
+    )
+  add_custom_target(${example} ALL DEPENDS ${example}_compiled)
 endif()
 
 set(tesh_files
index dab370f..0cd91d4 100644 (file)
@@ -24,7 +24,7 @@ public class Receiver extends Process {
    public void main(String[] args) throws MsgException {
         
       Msg.info("hello!");
-      Trace.hostPushState (host.getName(), "PM_STATE", "waitingPing");
+      Trace.hostPushState (getHost().getName(), "PM_STATE", "waitingPing");
                        double communicationTime=0;
 
       double time = Msg.getClock();
@@ -46,15 +46,15 @@ public class Receiver extends Process {
       Msg.info(" --- bw "+ commSizeBw/communicationTime + " ----");
       
                        /* Send the pong */
-               Trace.hostPushState (host.getName(), "PM_STATE", "sendingPong");
+               Trace.hostPushState (getHost().getName(), "PM_STATE", "sendingPong");
                        double computeDuration = 0;
                        PingPongTask pong = new PingPongTask("no name",computeDuration,commSizeLat);
                        pong.setTime(time);
                        pong.send(ping.getSource().getName());
 
                /* Pop the two states */
-      Trace.hostPopState (host.getName(), "PM_STATE");
-      Trace.hostPopState (host.getName(), "PM_STATE");
+      Trace.hostPopState (getHost().getName(), "PM_STATE");
+      Trace.hostPopState (getHost().getName(), "PM_STATE");
   
                Msg.info("goodbye!");
     }
index 48a14c4..82930bd 100644 (file)
@@ -26,7 +26,7 @@ public class Sender extends Process {
                                
                                public void main(String[] args) throws MsgException {
                                                                Msg.info("hello !"); 
-                                                               Trace.hostPushState (host.getName(), "PM_STATE", "sendingPing");
+                                                               Trace.hostPushState (getHost().getName(), "PM_STATE", "sendingPing");
                                                                
                                                                int hostCount = args.length;
                                                                Msg.info("host count: " + hostCount);
@@ -51,7 +51,7 @@ public class Sender extends Process {
                                                                                                ping.setTime(time);
                                                                                                ping.send(mailboxes[pos]);
                                                                
-                                                                                               Trace.hostPushState (host.getName(), "PM_STATE", "waitingPong");
+                                                                                               Trace.hostPushState (getHost().getName(), "PM_STATE", "waitingPong");
                                                                                                pong = (PingPongTask)Task.receive(getHost().getName());
                                                                        double timeGot = Msg.getClock();
                                                                        double timeSent = ping.getTime();
@@ -67,11 +67,11 @@ public class Sender extends Process {
                                                                        Msg.info(" --- bw "+ commSizeBw/communicationTime + " ----");
       
                                                                                                /* Pop the last state (going back to sending ping) */   
-                                                                                               Trace.hostPopState (host.getName(), "PM_STATE");
+                                                                                               Trace.hostPopState (getHost().getName(), "PM_STATE");
 
                                                                }
                                                           /* Pop the sendingPong state */      
-                                                               Trace.hostPopState (host.getName(), "PM_STATE");
+                                                               Trace.hostPopState (getHost().getName(), "PM_STATE");
                                                                Msg.info("goodbye!");
                                }
 }
index af24651..c48611f 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "simgrid/simix.h"      /* semaphores for the barrier */
 #include "xbt.h"                /* calloc, printf */
 #include "instr/instr_private.h"
index 0ad4781..a1d9b76 100644 (file)
@@ -7,7 +7,7 @@
 #include "bittorrent.h"
 #include "peer.h"
 #include "tracker.h"
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 #include <xbt/RngStream.h>
 
 /**
index 9afada0..5d333c4 100644 (file)
@@ -7,7 +7,7 @@
 #include "bittorrent.h"
 #include "peer.h"
 #include "tracker.h"
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 #include <simgrid/platf_generator.h>
 /**
  * Bittorrent example launcher, using a generated platform
index dab23af..023e23e 100644 (file)
@@ -6,7 +6,7 @@
 
 #ifndef BITTORRENT_MESSAGES_H_
 #define BITTORRENT_MESSAGES_H_
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 
 /**
  * Message sizes
index 1923233..a614b0d 100644 (file)
@@ -8,7 +8,7 @@
 #include "tracker.h"
 #include "connection.h"
 #include "messages.h"
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 #include <xbt/RngStream.h>
 #include <limits.h>
 
index e64a2d2..5c6dfa3 100644 (file)
@@ -6,7 +6,7 @@
 
 #ifndef BITTORRENT_PEER_H
 #define BITTORRENT_PEER_H
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 #include <xbt/dict.h>
 #include <xbt/dynar.h>
 #include <xbt/RngStream.h>
index 631a456..4c32db8 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "tracker.h"
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 #include <xbt/RngStream.h>
 
 static void task_free(void *data);
index 2b06656..1d1afc9 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef KADEPLOY_BROADCASTER_H
 #define KADEPLOY_BROADCASTER_H
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"
 
 /* Create a log channel to have nice outputs. */
index e8a4d19..05a336d 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc */
 
 /* Create a log channel to have nice outputs. */
index 2336685..2626836 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef KADEPLOY_COMMON_H
 #define KADEPLOY_COMMON_H
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"
 
 static XBT_INLINE void queue_pending_connection(msg_comm_t comm, xbt_dynar_t q)
index b717d5c..4be0fce 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef KADEPLOY_MESSAGES_H
 #define KADEPLOY_MESSAGES_H
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"
 
 #define MESSAGE_BUILD_CHAIN_SIZE 40
index 63f5a0e..5acc81b 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef KADEPLOY_PEER_H
 #define KADEPLOY_PEER_H
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"
 
 #include "messages.h"
index 96105a8..2cf3234 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 #include "xbt/asserts.h"
 #include "simgrid/modelchecker.h"
index ee5fc49..d9c6adc 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
@@ -92,8 +92,8 @@ static void test_dynamic_change(void)
   msg_process_t pr1 = MSG_process_create("worker1", worker_busy_loop_main, &task1, vm1);
 
 
-  double task0_remain_prev = MSG_task_get_remaining_computation(task0);
-  double task1_remain_prev = MSG_task_get_remaining_computation(task1);
+  double task0_remain_prev = MSG_task_get_flops_amount(task0);
+  double task1_remain_prev = MSG_task_get_flops_amount(task1);
 
   {
     const double cpu_speed = MSG_get_host_speed(pm0);
@@ -104,8 +104,8 @@ static void test_dynamic_change(void)
       MSG_vm_set_bound(vm1, new_bound);
       MSG_process_sleep(100);
 
-      double task0_remain_now = MSG_task_get_remaining_computation(task0);
-      double task1_remain_now = MSG_task_get_remaining_computation(task1);
+      double task0_remain_now = MSG_task_get_flops_amount(task0);
+      double task1_remain_now = MSG_task_get_flops_amount(task1);
 
       double task0_flops_per_sec = task0_remain_prev - task0_remain_now;
       double task1_flops_per_sec = task1_remain_prev - task1_remain_now;
index af24f85..3d1fb4c 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 7d263c7..03a08be 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 64a00c3..8fb26bf 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
@@ -37,14 +37,14 @@ struct task_data {
 
 static void task_data_init_clock(struct task_data *t)
 {
-  t->prev_computation_amount = MSG_task_get_remaining_computation(t->task);
+  t->prev_computation_amount = MSG_task_get_flops_amount(t->task);
   t->prev_clock = MSG_get_clock();
 }
 
 
 static void task_data_get_clock(struct task_data *t)
 {
-  double now_computation_amount = MSG_task_get_remaining_computation(t->task);
+  double now_computation_amount = MSG_task_get_flops_amount(t->task);
   double now_clock = MSG_get_clock();
 
   double done = t->prev_computation_amount - now_computation_amount;
index 54a0bfe..69db3e9 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <sys/time.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 624bdc4..3d10a25 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 0e2aaab..a7d61c3 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"
 
 #include "xbt/log.h"
@@ -71,7 +71,7 @@ static int master_main(int argc, char *argv[])
 
   while(MSG_get_clock()<100) {
        if (atask != NULL)
-         XBT_INFO("aTask remaining duration: %g", MSG_task_get_remaining_computation(atask));
+         XBT_INFO("aTask remaining duration: %g", MSG_task_get_flops_amount(atask));
        MSG_process_sleep(1);
   }
 
index dbfe96f..822f1d7 100644 (file)
@@ -6,7 +6,7 @@
 
 #include<stdio.h>
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc */
 #include "simgrid/plugins.h"
 
index 57d3c99..5f31fb1 100644 (file)
@@ -6,7 +6,7 @@
 
 #include<stdio.h>
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc */
 #include "simgrid/plugins.h"
 
index bfbb0c0..f7e7cad 100644 (file)
@@ -4,7 +4,7 @@
 /* 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/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc */
 
 /* Create a log channel to have nice outputs. */
index 044b0f1..8059cd8 100644 (file)
@@ -4,7 +4,7 @@
 /* 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/msg.h"
+#include "simgrid/msg.h"
 #include "xbt.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test_exception,
index c968e89..a7e0d89 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 #include "xbt/asserts.h"
 
index eb7a880..26da94d 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 #include "xbt/asserts.h"
 
index 59f0d3e..4c446e8 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index d754270..0eca928 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 2026f88..7dca7de 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 #include <math.h>
 /* Create a log channel to have nice outputs. */
index 6d7b635..a02ce1c 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "surf/surf_private.h"
 
 int host(int argc, char *argv[]);
index 9fc88ca..4e5e581 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "surf/surf_private.h"
 
 int host(int argc, char *argv[]);
index bb88246..620ab81 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "surf/surf_private.h"
 
 #define INMEGA (1024*1024)
index 821d398..579f061 100644 (file)
@@ -23,7 +23,7 @@
  *
 ******************************************************************************/
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 #include "xbt/dict.h"
 
index 5f9bb6a..f542444 100644 (file)
@@ -8,7 +8,7 @@
 #include "node.h"
 #include "task.h"
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 #include "xbt/asserts.h"
 /** @addtogroup MSG_examples
index 574afbe..49c9345 100644 (file)
@@ -7,7 +7,7 @@
 #include "node.h"
 #include "routing_table.h"
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 #include "xbt/asserts.h"
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_kademlia_node,
index e93549b..2539528 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef _MSG_EXAMPLES_ROUTING_H
 #define _MSG_EXAMPLES_ROUTING_H
 #include "xbt/dynar.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 
 #include "common.h"
 
index 3d1fcb1..774fe0c 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "routing_table.h"
 #include "node.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 #include "xbt/asserts.h"
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_kademlia_routing_table,
index 4924549..4aca312 100644 (file)
@@ -8,7 +8,7 @@
 #define _MSG_KADEMLIA_EXAMPLES_TASK
 #include "common.h"
 #include "node.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 /**
   * Types of tasks exchanged
   */
index 7bf9f87..4facb5a 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index ab3902a..6ba7bc5 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "surf/surfxml_parse.h" /* to override surf_parse and bypass the parser */
 
 /* Create a log channel to have nice outputs. */
index 085d574..dbb760c 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "surf/surfxml_parse.h" /* to override surf_parse and bypass the parser */
 
 /* Create a log channel to have nice outputs. */
index 90ffa87..1591b85 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index ee179e5..3f030c1 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 7aa8861..7754529 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 394bb3f..9c8e09e 100644 (file)
@@ -4,7 +4,7 @@
 /* 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/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc */
 
 /* Create a log channel to have nice outputs. */
index b9f8af6..7a23c47 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 11d3c2f..134fae7 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "simgrid/platf_generator.h"
 #include "xbt.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 
 #include "xbt/log.h"
 XBT_LOG_NEW_DEFAULT_CATEGORY(test_generation,
index 5143623..50ad0ae 100644 (file)
@@ -16,7 +16,7 @@
 #include <unistd.h>
 #endif
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "mc/mc.h"
 #include "xbt/automaton.h"
 #include "bugged1_liveness.h"
index d6beac0..3cdb50a 100644 (file)
@@ -10,7 +10,7 @@
 /* LTL property checked : !(GFcs)                                             */
 /******************************************************************************/
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "mc/mc.h"
 #include "xbt/automaton.h"
 #include "bugged2_liveness.h"
index d7231e1..2d8b231 100644 (file)
@@ -10,7 +10,7 @@
 /* reduction of DPOR.                                                         */
 /******************************************************************************/
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 
 #define AMOUNT_OF_CLIENTS 4
 #define CS_PER_PROCESS 2
index 2319598..ef06bf1 100644 (file)
@@ -4,7 +4,7 @@
 /* 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/msg.h"            /* core library */
+#include "simgrid/msg.h"        /* core library */
 #include "xbt/sysdep.h"         /* calloc */
 #include "xbt/synchro_core.h"
 
index 31ef941..7344039 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 #include "xbt/asserts.h"
 
@@ -169,7 +169,7 @@ int slave(int argc, char *argv[])
   
   XBT_INFO("FLOW[%d] : Receive %.0f bytes from %s to %s",
       id,
-      MSG_task_get_data_size(task),
+      MSG_task_get_bytes_amount(task),
        masternames[id],
        slavenames[id]);
 //  MSG_task_execute(task);
index a3dda64..01d772d 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 8626a98..189a26c 100644 (file)
@@ -5,8 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you
-                                   need to include msg/msg.h */
+#include "simgrid/msg.h"        /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index da3f463..3c33770 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <math.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 #include "xbt/asserts.h"
 
index 59d9e1b..209cc33 100644 (file)
@@ -6,7 +6,7 @@
 /* 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/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/matrix.h"
 #include "xbt/log.h"
 
index 43258dd..2fd25c3 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index c9e881f..d460550 100644 (file)
@@ -4,7 +4,7 @@
 /* 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/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index cc10147..01dcd02 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_semaphore_example,
index cca42ac..2c9c15d 100644 (file)
@@ -6,7 +6,7 @@
 
 #include<stdio.h>
 
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc */
 
 /* Create a log channel to have nice outputs. */
index 72ce30c..af50303 100644 (file)
@@ -4,7 +4,7 @@
 /* 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/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc */
 
 /* Create a log channel to have nice outputs. */
index b12fbf4..ac59867 100644 (file)
@@ -4,7 +4,7 @@
 /* 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/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc */
 
 /* Create a log channel to have nice outputs. */
index dd6107f..dd69d86 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "surf/surf_private.h"
 
 int host(int argc, char *argv[]);
index 7522792..5f97241 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "surf/surf_private.h"
 
 int host(int argc, char *argv[]);
index 4cee270..4df120b 100644 (file)
@@ -1,35 +1,33 @@
 cmake_minimum_required(VERSION 2.6)
 
-if(HAVE_TRACING)
-  set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
-  set(LIBRARY_OUTPUT_PATH "${CMAKE_HOME_DIRECTORY}/lib")
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+set(LIBRARY_OUTPUT_PATH "${CMAKE_HOME_DIRECTORY}/lib")
 
-  add_executable(ms         ${CMAKE_CURRENT_SOURCE_DIR}/ms.c)
-  add_executable(categories ${CMAKE_CURRENT_SOURCE_DIR}/categories.c)
-  add_executable(procmig    ${CMAKE_CURRENT_SOURCE_DIR}/procmig.c)
-  add_executable(simple     ${CMAKE_CURRENT_SOURCE_DIR}/simple.c)
-  add_executable(trace_platform     ${CMAKE_CURRENT_SOURCE_DIR}/trace_platform.c)
-  add_executable(user_variables     ${CMAKE_CURRENT_SOURCE_DIR}/user_variables.c)
-  add_executable(link_user_variables     ${CMAKE_CURRENT_SOURCE_DIR}/link_user_variables.c)
-  add_executable(link_srcdst_user_variables     ${CMAKE_CURRENT_SOURCE_DIR}/link_srcdst_user_variables.c)
+add_executable(ms         ${CMAKE_CURRENT_SOURCE_DIR}/ms.c)
+add_executable(categories ${CMAKE_CURRENT_SOURCE_DIR}/categories.c)
+add_executable(procmig    ${CMAKE_CURRENT_SOURCE_DIR}/procmig.c)
+add_executable(simple     ${CMAKE_CURRENT_SOURCE_DIR}/simple.c)
+add_executable(trace_platform     ${CMAKE_CURRENT_SOURCE_DIR}/trace_platform.c)
+add_executable(user_variables     ${CMAKE_CURRENT_SOURCE_DIR}/user_variables.c)
+add_executable(link_user_variables     ${CMAKE_CURRENT_SOURCE_DIR}/link_user_variables.c)
+add_executable(link_srcdst_user_variables     ${CMAKE_CURRENT_SOURCE_DIR}/link_srcdst_user_variables.c)
 
-  ### Add definitions for compile
-  target_link_libraries(ms simgrid )
-  target_link_libraries(categories simgrid )
-  target_link_libraries(procmig simgrid )
-  target_link_libraries(simple simgrid )
-  target_link_libraries(trace_platform simgrid )
-  target_link_libraries(user_variables simgrid )
-  target_link_libraries(link_user_variables simgrid )
-  target_link_libraries(link_srcdst_user_variables simgrid )
+### Add definitions for compile
+target_link_libraries(ms simgrid )
+target_link_libraries(categories simgrid )
+target_link_libraries(procmig simgrid )
+target_link_libraries(simple simgrid )
+target_link_libraries(trace_platform simgrid )
+target_link_libraries(user_variables simgrid )
+target_link_libraries(link_user_variables simgrid )
+target_link_libraries(link_srcdst_user_variables simgrid )
 
-  ## Clean generated files
-  get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
-  set_directory_properties(
-    PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
-    "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/ms.cat.plist;${CMAKE_CURRENT_BINARY_DIR}/ms.trace;${CMAKE_CURRENT_BINARY_DIR}/ms.uncat.plist;"
-    )
-endif()
+## Clean generated files
+get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
+set_directory_properties(
+  PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
+  "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/ms.cat.plist;${CMAKE_CURRENT_BINARY_DIR}/ms.trace;${CMAKE_CURRENT_BINARY_DIR}/ms.uncat.plist;"
+  )
 
 set(tesh_files
   ${tesh_files}
index 238e8ef..77bd084 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index f9c4c22..b47b1c6 100644 (file)
@@ -4,7 +4,7 @@
 /* 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/msg.h>
+#include <simgrid/msg.h>
 
 /** @addtogroup MSG_examples
  *
index 1ee390d..7170bc1 100644 (file)
@@ -4,7 +4,7 @@
 /* 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/msg.h>
+#include <simgrid/msg.h>
 
 /** @addtogroup MSG_examples
  *
index aed734e..52a45c6 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
@@ -88,7 +88,7 @@ int slave(int argc, char *argv[])
     //to the variable "task_computation"
     TRACE_host_variable_add(MSG_host_get_name(MSG_host_self()),
                             "task_computation",
-                            MSG_task_get_compute_duration(task));
+                            MSG_task_get_flops_amount(task));
     MSG_task_execute(task);
     MSG_task_destroy(task);
     task = NULL;
index 1c832b7..94562ac 100644 (file)
@@ -16,7 +16,7 @@
  * (See \ref tracing_tracing_options for details)
  */
 
-#include "msg/msg.h"            /* core library */
+#include "simgrid/msg.h"            /* core library */
 #include "xbt/sysdep.h"         /* calloc */
 
 /* Create a log channel to have nice outputs. */
index 6f9e686..b79970d 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /** @addtogroup MSG_examples
index 026524f..da2fd44 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 #include "xbt/log.h"
index 4b585c3..e5035db 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 7e89291..e8d50b6 100644 (file)
@@ -10,9 +10,7 @@ add_executable(sd_typed_tasks_test sd_typed_tasks_test.c)
 add_executable(sd_comm_throttling sd_comm_throttling.c)
 add_executable(sd_seq_access sd_seq_access.c)
 
-if (HAVE_TRACING)
-  add_executable(simdag_tracing simdag_trace.c)
-endif()
+add_executable(simdag_tracing simdag_trace.c)
 
 ### Add definitions for compile
 if(NOT WIN32)
@@ -23,9 +21,7 @@ if(NOT WIN32)
   target_link_libraries(sd_typed_tasks_test simgrid pthread )
   target_link_libraries(sd_comm_throttling simgrid pthread )
   target_link_libraries(sd_seq_access simgrid pthread )
-  if (HAVE_TRACING)
   target_link_libraries(simdag_tracing simgrid pthread )
-  endif()
 
   add_custom_command(TARGET ex_sd_test
     POST_BUILD
@@ -45,9 +41,7 @@ else()
   target_link_libraries(sd_typed_tasks_test simgrid)
   target_link_libraries(sd_comm_throttling simgrid)
   target_link_libraries(sd_seq_access simgrid)
-  if (HAVE_TRACING)
-    target_link_libraries(simdag_tracing simgrid)
-  endif()
+  target_link_libraries(simdag_tracing simgrid)
   
   add_custom_command(TARGET ex_sd_test
     POST_BUILD
@@ -70,7 +64,6 @@ set(tesh_files
   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_typed_tasks.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_avail.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_fail.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_fail_notrace.tesh
   PARENT_SCOPE
   )
 set(xml_files
index a824e28..669dd41 100644 (file)
@@ -15,7 +15,6 @@ set(tesh_files
   ${tesh_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/simple_dax_with_cycle.tesh
   ${CMAKE_CURRENT_SOURCE_DIR}/smalldax.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/smalldax_notrace.tesh
   PARENT_SCOPE
   )
 set(xml_files
index d33f9f8..c495481 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 #include "xbt/ex.h"
 #include <string.h>
diff --git a/examples/simdag/dax/smalldax_notrace.tesh b/examples/simdag/dax/smalldax_notrace.tesh
deleted file mode 100644 (file)
index 0021c0c..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-#! ./tesh
-p Test the DAX loader on a small DAX instance
-
-$ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ../2clusters.xml ./smalldax.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
-> [0.000000] [sd_daxparse/WARNING] Ignoring file o1 size redefinition from 1000000 to 304
-> [0.000000] [sd_daxparse/WARNING] Ignoring file o2 size redefinition from 1000000 to 304
-> [0.000000] [test/INFO] ------------------- Display all tasks of the loaded DAG ---------------------------
-> [0.000000] [sd_task/INFO] Displaying task root
-> [0.000000] [sd_task/INFO]   - state:  schedulable  not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 0
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 0
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     root_i2_2@task2
-> [0.000000] [sd_task/INFO]     root_i1_1@task1
-> [0.000000] [sd_task/INFO] Displaying task 1@task1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 42000000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root_i1_1@task1
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     3@task1
-> [0.000000] [sd_task/INFO]     1@task1_o1_3@task1
-> [0.000000] [sd_task/INFO] Displaying task 2@task2
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 42000000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root_i2_2@task2
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     3@task1
-> [0.000000] [sd_task/INFO]     2@task2_o2_3@task1
-> [0.000000] [sd_task/INFO] Displaying task 3@task1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 42000000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 4
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     1@task1
-> [0.000000] [sd_task/INFO]     2@task2
-> [0.000000] [sd_task/INFO]     1@task1_o1_3@task1
-> [0.000000] [sd_task/INFO]     2@task2_o2_3@task1
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     3@task1_o3_end
-> [0.000000] [sd_task/INFO] Displaying task root_i2_2@task2
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 1000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     2@task2
-> [0.000000] [sd_task/INFO] Displaying task 1@task1_o1_3@task1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 1000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     1@task1
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     3@task1
-> [0.000000] [sd_task/INFO] Displaying task 2@task2_o2_3@task1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 1000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     2@task2
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     3@task1
-> [0.000000] [sd_task/INFO] Displaying task 3@task1_o3_end
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 4167312
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     3@task1
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     end
-> [0.000000] [sd_task/INFO] Displaying task root_i1_1@task1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 1000000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     1@task1
-> [0.000000] [sd_task/INFO] Displaying task end
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 0
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     3@task1_o3_end
-> [0.000000] [test/INFO] ------------------- Schedule tasks ---------------------------
-> [0.000000] [test/INFO] ------------------- Run the schedule ---------------------------
-> [84.066238] [test/INFO] ------------------- Produce the trace file---------------------------
-> [84.066238] [test/INFO] Producing the trace of the run into ./smalldax.trace
-
-$ cat ./smalldax.trace
-> [0.000000] C1-00 compute 0.000000 # root
-> [0.016300] C1-01 compute 42000000000.000000 # 1@task1
-> [0.016300] C1-02 compute 42000000000.000000 # 2@task2
-> [42.032600] C1-03 compute 42000000000.000000 # 3@task1
-> [0.000000] C1-00 send C1-02 1000000.000000 # root_i2_2@task2
-> [0.016300] C1-02 recv C1-00 1000000.000000 # root_i2_2@task2
-> [42.016300] C1-01 send C1-03 1000000.000000 # 1@task1_o1_3@task1
-> [42.032600] C1-03 recv C1-01 1000000.000000 # 1@task1_o1_3@task1
-> [42.016300] C1-02 send C1-03 1000000.000000 # 2@task2_o2_3@task1
-> [42.032600] C1-03 recv C1-02 1000000.000000 # 2@task2_o2_3@task1
-> [84.032600] C1-03 send C1-00 4167312.000000 # 3@task1_o3_end
-> [84.066238] C1-00 recv C1-03 4167312.000000 # 3@task1_o3_end
-> [0.000000] C1-00 send C1-01 1000000.000000 # root_i1_1@task1
-> [0.016300] C1-01 recv C1-00 1000000.000000 # root_i1_1@task1
-> [84.066238] C1-00 compute 0.000000 # end
-
-$ cmake -E remove -f ./dax.dot ./smalldax.trace
index 302bdd6..d541688 100644 (file)
@@ -34,7 +34,6 @@ endif()
 set(tesh_files
   ${tesh_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_dotload.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_dotload_notrace.tesh
   PARENT_SCOPE
   )
 set(xml_files
index 6f62578..62a03ed 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 #include "xbt/ex.h"
 #include <string.h>
index d065aad..ece7797 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 #include "xbt/ex.h"
 #include <string.h>
index cdaf555..c55d032 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 #include "xbt/ex.h"
 #include <string.h>
index e16cb56..a94f8fc 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 #include "xbt/ex.h"
 #include <string.h>
diff --git a/examples/simdag/dot/test_simdag_dotload_notrace.tesh b/examples/simdag/dot/test_simdag_dotload_notrace.tesh
deleted file mode 100644 (file)
index d764073..0000000
+++ /dev/null
@@ -1,466 +0,0 @@
-#! ./tesh
-p Test the loader of DAG written in the DOT format
-
-$ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/dag.dot
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
-> [0.000000] [test/INFO] ------------------- Display all tasks of the loaded DAG ---------------------------
-> [0.000000] [sd_task/INFO] Displaying task root
-> [0.000000] [sd_task/INFO]   - state:  schedulable  not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 0
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 0
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     root->5
-> [0.000000] [sd_task/INFO]     0
-> [0.000000] [sd_task/INFO] Displaying task 0
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000129
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     0->1
-> [0.000000] [sd_task/INFO] Displaying task 1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000131
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     0->1
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     1->2
-> [0.000000] [sd_task/INFO] Displaying task 2
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000121
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     1->2
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     2->3
-> [0.000000] [sd_task/INFO] Displaying task 3
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000231
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     2->3
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     4
-> [0.000000] [sd_task/INFO] Displaying task 4
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000005
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     3
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     4->5
-> [0.000000] [sd_task/INFO] Displaying task 5
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000046
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 2
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     4->5
-> [0.000000] [sd_task/INFO]     root->5
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     6
-> [0.000000] [sd_task/INFO] Displaying task 6
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000092
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     5
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     6->7
-> [0.000000] [sd_task/INFO] Displaying task 7
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000041
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     6->7
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     7->8
-> [0.000000] [sd_task/INFO]     7->end
-> [0.000000] [sd_task/INFO] Displaying task 8
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000250
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     7->8
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     9
-> [0.000000] [sd_task/INFO] Displaying task 9
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000079
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     8
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     end
-> [0.000000] [sd_task/INFO] Displaying task 0->1
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10001
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     0
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     1
-> [0.000000] [sd_task/INFO] Displaying task 1->2
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10004
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     1
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     2
-> [0.000000] [sd_task/INFO] Displaying task 2->3
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10002
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     2
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     3
-> [0.000000] [sd_task/INFO] Displaying task 4->5
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10029
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     4
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     5
-> [0.000000] [sd_task/INFO] Displaying task 6->7
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10005
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     6
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     7
-> [0.000000] [sd_task/INFO] Displaying task 7->8
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     7
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     8
-> [0.000000] [sd_task/INFO] Displaying task 7->end
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10014000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     7
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     end
-> [0.000000] [sd_task/INFO] Displaying task root->5
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10014000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     5
-> [0.000000] [sd_task/INFO] Displaying task end
-> [0.000000] [sd_task/INFO]   - state: not scheduled   not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000129
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 2
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     7->end
-> [0.000000] [sd_task/INFO]     9
-> [0.000000] [test/INFO] ------------------- Schedule tasks ---------------------------
-> [0.000000] [test/INFO] ------------------- Run the schedule ---------------------------
-> [62.002281] [test/INFO] ------------------- Produce the trace file---------------------------
-> [62.002281] [test/INFO] Producing the trace of the run into dag.trace
-
-$ cat ${srcdir:=.}/dag.trace
-> [0.000000->0.000000] C2-05 compute 0.000000 flops # root
-> [0.000000->2.000000] C2-06 compute 10000000129.452715 flops # 0
-> [2.000380->4.000380] C2-07 compute 10000000131.133657 flops # 1
-> [4.000760->6.000760] C2-08 compute 10000000121.124870 flops # 2
-> [6.001140->8.001140] C2-09 compute 10000000230.608025 flops # 3
-> [8.001140->18.001140] C1-00 compute 10000000004.994019 flops # 4
-> [18.001520->28.001520] C1-01 compute 10000000046.016401 flops # 5
-> [28.001520->38.001521] C1-02 compute 10000000091.598791 flops # 6
-> [38.001901->48.001901] C1-03 compute 10000000040.679438 flops # 7
-> [48.002281->58.002281] C1-04 compute 10000000250.490017 flops # 8
-> [58.002281->60.002281] C2-05 compute 10000000079.267649 flops # 9
-> [2.000000 -> 2.000380] C2-06 -> C2-07 transfer of 10001 bytes # 0->1
-> [4.000380 -> 4.000760] C2-07 -> C2-08 transfer of 10004 bytes # 1->2
-> [6.000760 -> 6.001140] C2-08 -> C2-09 transfer of 10002 bytes # 2->3
-> [18.001140 -> 18.001520] C1-00 -> C1-01 transfer of 10029 bytes # 4->5
-> [38.001521 -> 38.001901] C1-02 -> C1-03 transfer of 10005 bytes # 6->7
-> [48.001901 -> 48.002281] C1-03 -> C1-04 transfer of 10000 bytes # 7->8
-> [48.001901 -> 48.294118] C1-03 -> C2-05 transfer of 10014000 bytes # 7->end
-> [0.000000 -> 0.292217] C2-05 -> C1-01 transfer of 10014000 bytes # root->5
-> [60.002281->62.002281] C2-05 compute 10000000129.452715 flops # end
-
-$ rm -f dag.trace
-
-! expect return 2
-$ $SG_TEST_EXENV ./simulate_dot --log=no_loc  "--log=sd_dotparse.thres:verbose" ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/dag_with_bad_schedule.dot
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
-> [0.000000] [sd_dotparse/VERBOSE] The schedule is ignored, the task end is not correctly scheduled
-> [0.000000] [sd_dotparse/VERBOSE] The schedule is ignored, the task 1 is not correctly scheduled
-> [0.000000] [sd_dotparse/VERBOSE] The task 0 starts on the computer 1 at the position : 1 like the task 2
-> [0.000000] [sd_dotparse/VERBOSE] The schedule is ignored, the task 3 is not correctly scheduled
-> [0.000000] [sd_dotparse/VERBOSE] The schedule is ignored, the task root is not correctly scheduled
-> [0.000000] [sd_dotparse/WARNING] The scheduling is ignored
-> [0.000000] [test/CRITICAL] The dot file with the provided scheduling is wrong, more information with the option : --log=sd_dotparse.thres:verbose
-
-$ $SG_TEST_EXENV ./simulate_dot --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/dag_with_good_schedule.dot
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
-> [0.000000] [test/INFO] ------------------- Display all tasks of the loaded DAG ---------------------------
-> [0.000000] [sd_task/INFO] Displaying task root
-> [0.000000] [sd_task/INFO]   - state:    runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 0
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 0
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     root->5
-> [0.000000] [sd_task/INFO]     0
-> [0.000000] [sd_task/INFO]     1
-> [0.000000] [sd_task/INFO] Displaying task 0
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000129
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     0->2
-> [0.000000] [sd_task/INFO]     2
-> [0.000000] [sd_task/INFO] Displaying task 1
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000131
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     1->2
-> [0.000000] [sd_task/INFO]     4
-> [0.000000] [sd_task/INFO] Displaying task 2
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000121
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 3
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     0->2
-> [0.000000] [sd_task/INFO]     1->2
-> [0.000000] [sd_task/INFO]     0
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     2->3
-> [0.000000] [sd_task/INFO]     3
-> [0.000000] [sd_task/INFO] Displaying task 3
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000231
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 2
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     2->3
-> [0.000000] [sd_task/INFO]     2
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     4
-> [0.000000] [sd_task/INFO]     8
-> [0.000000] [sd_task/INFO] Displaying task 4
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000005
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 2
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     3
-> [0.000000] [sd_task/INFO]     1
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     4->5
-> [0.000000] [sd_task/INFO]     5
-> [0.000000] [sd_task/INFO] Displaying task 5
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000046
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 3
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root->5
-> [0.000000] [sd_task/INFO]     4->5
-> [0.000000] [sd_task/INFO]     4
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     6
-> [0.000000] [sd_task/INFO] Displaying task 6
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000092
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     5
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     6->7
-> [0.000000] [sd_task/INFO]     7
-> [0.000000] [sd_task/INFO] Displaying task 7
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000041
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 2
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     6->7
-> [0.000000] [sd_task/INFO]     6
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     7->8
-> [0.000000] [sd_task/INFO]     7->end
-> [0.000000] [sd_task/INFO]     end
-> [0.000000] [sd_task/INFO] Displaying task 8
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000250
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 2
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     7->8
-> [0.000000] [sd_task/INFO]     3
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     9
-> [0.000000] [sd_task/INFO] Displaying task 9
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000079
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     8
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     end
-> [0.000000] [sd_task/INFO] Displaying task root->5
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10014000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     root
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     5
-> [0.000000] [sd_task/INFO] Displaying task 0->2
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10001
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     0
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     2
-> [0.000000] [sd_task/INFO] Displaying task 1->2
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10004
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     1
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     2
-> [0.000000] [sd_task/INFO] Displaying task 2->3
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10002
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     2
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     3
-> [0.000000] [sd_task/INFO] Displaying task 4->5
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10029
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     4
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     5
-> [0.000000] [sd_task/INFO] Displaying task 6->7
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10005
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     6
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     7
-> [0.000000] [sd_task/INFO] Displaying task 7->8
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     7
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     8
-> [0.000000] [sd_task/INFO] Displaying task 7->end
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: end-to-end communication
-> [0.000000] [sd_task/INFO]   - amount: 10014000
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     7
-> [0.000000] [sd_task/INFO]   - post-dependencies:
-> [0.000000] [sd_task/INFO]     end
-> [0.000000] [sd_task/INFO] Displaying task end
-> [0.000000] [sd_task/INFO]   - state:   scheduled not runnable    
-> [0.000000] [sd_task/INFO]   - kind: sequential computation
-> [0.000000] [sd_task/INFO]   - amount: 10000000129
-> [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 3
-> [0.000000] [sd_task/INFO]   - pre-dependencies:
-> [0.000000] [sd_task/INFO]     7->end
-> [0.000000] [sd_task/INFO]     9
-> [0.000000] [sd_task/INFO]     7
-> [0.000000] [test/INFO] ------------------- Run the schedule ---------------------------
-> [20.000866] [test/INFO] ------------------- Produce the trace file---------------------------
-> [20.000866] [test/INFO] Producing the trace of the run into dag_with_good_schedule.trace
-
-$ cat ${srcdir:=.}/dag_with_good_schedule.trace
-> [0.000000->0.000000] C2-05 compute 0.000000 flops # root
-> [0.000000->2.000000] C2-06 compute 10000000129.452715 flops # 0
-> [0.000000->2.000000] C2-05 compute 10000000131.133657 flops # 1
-> [2.000380->4.000380] C2-06 compute 10000000121.124870 flops # 2
-> [4.000415->6.000415] C2-06 compute 10000000230.608025 flops # 3
-> [6.000415->8.000415] C2-05 compute 10000000004.994019 flops # 4
-> [8.000450->10.000450] C2-05 compute 10000000046.016401 flops # 5
-> [10.000450->12.000450] C2-05 compute 10000000091.598791 flops # 6
-> [12.000485->14.000485] C2-05 compute 10000000040.679438 flops # 7
-> [14.000865->16.000866] C2-06 compute 10000000250.490017 flops # 8
-> [16.000866->18.000866] C2-06 compute 10000000079.267649 flops # 9
-> [0.000000 -> 0.020123] C2-05 -> C2-05 transfer of 10014000 bytes # root->5
-> [2.000000 -> 2.000035] C2-06 -> C2-06 transfer of 10001 bytes # 0->2
-> [2.000000 -> 2.000380] C2-05 -> C2-06 transfer of 10004 bytes # 1->2
-> [4.000380 -> 4.000415] C2-06 -> C2-06 transfer of 10002 bytes # 2->3
-> [8.000415 -> 8.000450] C2-05 -> C2-05 transfer of 10029 bytes # 4->5
-> [12.000450 -> 12.000485] C2-05 -> C2-05 transfer of 10005 bytes # 6->7
-> [14.000485 -> 14.000865] C2-05 -> C2-06 transfer of 10000 bytes # 7->8
-> [14.000485 -> 14.020609] C2-05 -> C2-05 transfer of 10014000 bytes # 7->end
-> [18.000866->20.000866] C2-05 compute 10000000129.452715 flops # end
-
-$ rm -f ${srcdir:=.}/dag_with_good_schedule.trace
-
-! expect return 2
-$ $SG_TEST_EXENV ./dot_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/dag_with_cycle.dot
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
-> [0.000000] [sd_daxparse/WARNING] the task root is not marked
-> [0.000000] [sd_daxparse/WARNING] the task 0 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 1 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 2 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 3 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 4 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 5 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 6 is in a cycle
-> [0.000000] [sd_dotparse/ERROR] The DOT described in dag_with_cycle.dot is not a DAG. It contains a cycle.
-> [0.000000] [test/CRITICAL] No dot loaded. Do you have a cycle in your graph?
index fa2251f..f326cce 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 #include "xbt/ex.h"
 #include <string.h>
index 990144f..d1f1221 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 
index d126b9d..9cb6620 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 #include "xbt/dynar.h"
index c996fad..bd15ece 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 #include "xbt/dynar.h"
index 8790718..bbdd1b3 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 #include "xbt/ex.h"
 #include <string.h>
index 51eec52..4873c11 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 
index b43af37..b97e811 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 
index eb1fd82..df75380 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 
index e4cb0e6..c43d8fd 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 
index f3e1d5d..e8befc7 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 
index 781a7d4..b566790 100644 (file)
@@ -8,7 +8,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 
 #include "xbt/sysdep.h"         /* calloc, printf */
index c64bacb..758fede 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 
index b93f1a2..f2a64a8 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 
diff --git a/examples/simdag/test_simdag_fail_notrace.tesh b/examples/simdag/test_simdag_fail_notrace.tesh
deleted file mode 100644 (file)
index 9d87dfc..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#! ./tesh
-
-p Test of the management of failed tasks simdag
-
-$ $SG_TEST_EXENV ${bindir:=.}/sd_fail
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
-> [0.000000] [sd_fail/INFO] First test: COMP_SEQ task
-> [0.000000] [sd_fail/INFO] Schedule task 'Poor task' on workstation 'Faulty Host'
-> [10.000000] [sd_task/INFO] Displaying task Poor task
-> [10.000000] [sd_task/INFO]   - state:    not runnable    failed
-> [10.000000] [sd_task/INFO]   - kind: sequential computation
-> [10.000000] [sd_task/INFO]   - amount: 20000000000
-> [10.000000] [sd_task/INFO]   - Dependencies to satisfy: 0
-> [10.000000] [sd_fail/INFO] Task 'Poor task' has failed. 20000000000 flops remain to be done
-> [10.000000] [sd_fail/INFO] let's unschedule task 'Poor task' and reschedule it on the 'Safe Host'
-> [10.000000] [sd_fail/INFO] Run the simulation again
-> [50.000000] [sd_task/INFO] Displaying task Poor task
-> [50.000000] [sd_task/INFO]   - state:    not runnable   done 
-> [50.000000] [sd_task/INFO]   - kind: sequential computation
-> [50.000000] [sd_task/INFO]   - amount: 20000000000
-> [50.000000] [sd_task/INFO]   - Dependencies to satisfy: 0
-> [50.000000] [sd_fail/INFO] Task 'Poor task' start time: 10.000000, finish time: 50.000000
-> [50.000000] [sd_fail/INFO] Second test: NON TYPED task
-> [50.000000] [sd_fail/INFO] Schedule task 'Poor parallel task' on workstation 'Faulty Host'
-> [60.000000] [sd_task/INFO] Displaying task Poor parallel task
-> [60.000000] [sd_task/INFO]   - state:    not runnable    failed
-> [60.000000] [sd_task/INFO]   - amount: 20000000000
-> [60.000000] [sd_task/INFO]   - Dependencies to satisfy: 0
-> [60.000000] [sd_fail/INFO] Task 'Poor parallel task' has failed. 20000000000 flops remain to be done
-> [60.000000] [sd_fail/INFO] let's unschedule task 'Poor parallel task' and reschedule it on the 'Safe Host'
-> [60.000000] [sd_fail/INFO] Run the simulation again
-> [100.000000] [sd_task/INFO] Displaying task Poor parallel task
-> [100.000000] [sd_task/INFO]   - state:    not runnable   done 
-> [100.000000] [sd_task/INFO]   - amount: 20000000000
-> [100.000000] [sd_task/INFO]   - Dependencies to satisfy: 0
-> [100.000000] [sd_fail/INFO] Task 'Poor parallel task' start time: 60.000000, finish time: 100.000000
index 862cf26..1af5cce 100644 (file)
@@ -44,7 +44,7 @@
 #include "mpi.h"
 #include "npbparams.h"
 
-#include "instr/instr.h" //TRACE_
+#include "simgrid/instr.h" //TRACE_
 
 #ifndef CLASS
 #define CLASS 'S'
index 86aba7a..4f606a0 100644 (file)
@@ -6,7 +6,7 @@
 #include "mpi.h"
 #include "npbparams.h"
 
-#include "instr/instr.h" //TRACE_
+#include "simgrid/instr.h" //TRACE_
 
 #include "randlc.h"
 
index 645038c..57b370b 100644 (file)
@@ -44,7 +44,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include "instr/instr.h" //TRACE_
+#include "simgrid/instr.h" //TRACE_
 
 /******************/
 /* default values */
index 9c1340f..e45ac6f 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 #include "mpi.h"
 /* Create a log channel to have nice outputs. */
index f36ee99..79ee7ee 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 #include "mpi.h"
 /* Create a log channel to have nice outputs. */
index 18ee76c..654dbe5 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include "mpi.h"
-#include "instr/instr.h"
+#include "simgrid/instr.h"
 
 #define DATATOSENT 100000
 
diff --git a/include/msg/datatypes.h b/include/msg/datatypes.h
deleted file mode 100644 (file)
index 8f629c6..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/* Copyright (c) 2004-2014. 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 MSG_DATATYPE_H
-#define MSG_DATATYPE_H
-#include "xbt/misc.h"
-#include "xbt/lib.h"
-#include "simgrid/simix.h"
-#include "simgrid_config.h"     // for HAVE_TRACING
-
-SG_BEGIN_DECL()
-
-/* ******************************** Mailbox ************************************ */
-
-/** @brief Mailbox datatype
- *  @ingroup msg_task_usage
- *
- * Object representing a communication rendez-vous point, on which
- * the sender finds the receiver it wants to communicate with. As a
- * MSG user, you will only rarely manipulate any of these objects
- * directly, since most of the public interface (such as
- * #MSG_task_send and friends) hide this object behind a string
- * alias. That mean that you don't provide the mailbox on which you
- * want to send your task, but only the name of this mailbox. */
-typedef struct s_smx_rvpoint *msg_mailbox_t;
-
-/* ******************************** Environment ************************************ */
-typedef struct As *msg_as_t;
-
-/* ******************************** Host ************************************ */
-
-extern int MSG_HOST_LEVEL;
-
-/** @brief Host datatype.
-    @ingroup m_host_management
-
-    A <em>location</em> (or <em>host</em>) is any possible place where
-    a process may run. Thus it is represented as a <em>physical
-    resource with computing capabilities</em>, some <em>mailboxes</em>
-    to enable running process to communicate with remote ones, and
-    some <em>private data</em> that can be only accessed by local
-    process.
- */
-typedef xbt_dictelm_t msg_host_t;
-typedef s_xbt_dictelm_t s_msg_host_t;
-
-typedef struct msg_host_priv {
-  int        dp_enabled;
-  xbt_dict_t dp_objs;
-  double     dp_updated_by_deleted_tasks;
-  int        is_migrating;
-
-  xbt_dict_t affinity_mask_db;
-
-#ifdef MSG_USE_DEPRECATED
-  msg_mailbox_t *mailboxes;     /**< the channels  */
-#endif
-} s_msg_host_priv_t, *msg_host_priv_t;
-
-static inline msg_host_priv_t MSG_host_priv(msg_host_t host){
-  return (msg_host_priv_t )xbt_lib_get_level(host, MSG_HOST_LEVEL);
-}
-
-
-
-/* ******************************** Task ************************************ */
-
-typedef struct simdata_task *simdata_task_t;
-
-typedef struct msg_task {
-  char *name;                   /**< @brief task name if any */
-  simdata_task_t simdata;       /**< @brief simulator data */
-  void *data;                   /**< @brief user data */
-#ifdef HAVE_TRACING
-  long long int counter;        /* task unique identifier for instrumentation */
-  char *category;               /* task category for instrumentation */
-#endif
-} s_msg_task_t;
-
-/** @brief Task datatype.
-    @ingroup m_task_management 
-
-    A <em>task</em> may then be defined by a <em>computing
-    amount</em>, a <em>message size</em> and some <em>private
-    data</em>.
- */
-typedef struct msg_task *msg_task_t;
-
-/* ******************************** VM ************************************* */
-typedef msg_host_t msg_vm_t;
-typedef msg_host_priv_t msg_vm_priv_t;
-
-static inline msg_vm_priv_t MSG_vm_priv(msg_vm_t vm){
-  return (msg_vm_priv_t) xbt_lib_get_level(vm, MSG_HOST_LEVEL);
-}
-
-/** ******************************** File ************************************ */
-
-/** @brief File datatype.
-*  @ingroup msg_file_management
-*
-*  You should consider this as an opaque object.
-*/
-typedef xbt_dictelm_t msg_file_t;
-typedef s_xbt_dictelm_t s_msg_file_t;
-
-extern int MSG_FILE_LEVEL;
-typedef struct simdata_file *simdata_file_t;
-
-typedef struct msg_file_priv  {
-  char *fullpath;
-  sg_size_t size;
-  char* mount_point;
-  char* storageId;
-  char* storage_type;
-  char* content_type;
-  void *data;
-  simdata_file_t simdata;
-} s_msg_file_priv_t, *msg_file_priv_t;
-
-static inline msg_file_priv_t MSG_file_priv(msg_file_t file){
-  return (msg_file_priv_t )xbt_lib_get_level(file, MSG_FILE_LEVEL);
-}
-
-/* ******************************** Storage ************************************ */
-/* TODO: PV: to comment */
-
-extern int MSG_STORAGE_LEVEL;
-
-/** @brief Storage datatype.
- *  @ingroup msg_storage_management
- *
- *  You should consider this as an opaque object.
- */
-typedef xbt_dictelm_t msg_storage_t;
-typedef s_xbt_dictelm_t s_msg_storage_t;
-
-typedef struct msg_storage_priv  {
-  const char *hostname;
-  void *data;
-} s_msg_storage_priv_t, *msg_storage_priv_t;
-
-static inline msg_storage_priv_t MSG_storage_priv(msg_storage_t storage){
-  return (msg_storage_priv_t )xbt_lib_get_level(storage, MSG_STORAGE_LEVEL);
-}
-
-/*************** Begin GPU ***************/
-typedef struct simdata_gpu_task *simdata_gpu_task_t;
-
-typedef struct msg_gpu_task {
-  char *name;                   /**< @brief task name if any */
-  simdata_gpu_task_t simdata;       /**< @brief simulator data */
-#ifdef HAVE_TRACING
-  long long int counter;        /* task unique identifier for instrumentation */
-  char *category;               /* task category for instrumentation */
-#endif
-} s_msg_gpu_task_t;
-
-/** @brief GPU task datatype.
-    @ingroup m_task_management
-
-    A <em>task</em> may then be defined by a <em>computing
-    amount</em>, a <em>dispatch latency</em> and a <em>collect latency</em>.
-    \see m_task_management
-*/
-typedef struct msg_gpu_task *msg_gpu_task_t;
-/*************** End GPU ***************/
-
-/**
- * \brief @brief Communication action.
- * \ingroup msg_task_usage
- *
- * Object representing an ongoing communication between processes. Such beast is usually obtained by using #MSG_task_isend, #MSG_task_irecv or friends.
- */
-typedef struct msg_comm *msg_comm_t;
-
-/** \brief Default value for an uninitialized #msg_task_t.
-    \ingroup m_task_management 
-*/
-#define MSG_TASK_UNINITIALIZED NULL
-
-/* ****************************** Process *********************************** */
-
-/** @brief Process datatype.
-    @ingroup m_process_management
-
-    A process may be defined as a <em>code</em>, with some
-    <em>private data</em>, executing in a <em>location</em>. 
-    You should not access directly to the fields of the pointed
-    structure, but always use the provided API to interact with
-    processes.
- */
-typedef struct s_smx_process *msg_process_t;
-
-#ifdef MSG_USE_DEPRECATED
-
-/* Compatibility typedefs */
-typedef int                     m_channel_t;
-typedef msg_gpu_task_t          m_gpu_task_t;
-typedef msg_host_t              m_host_t;
-typedef msg_process_t           m_process_t;
-typedef msg_task_t              m_task_t;
-typedef s_msg_gpu_task_t        s_m_gpu_task_t;
-typedef s_msg_host_t            s_m_host_t;
-typedef s_msg_task_t            s_m_task_t;
-#endif
-
-SG_END_DECL()
-#endif
diff --git a/include/simdag/datatypes.h b/include/simdag/datatypes.h
deleted file mode 100644 (file)
index b4399cd..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Copyright (c) 2006, 2008-2014. 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 SIMDAG_DATATYPES_H
-#define SIMDAG_DATATYPES_H
-#include "xbt/dict.h"
-
-/** @brief Workstation datatype
-    @ingroup SD_datatypes_management
-    
-    A workstation is a place where a task can be executed.
-    A workstation is represented as a <em>physical
-    resource with computing capabilities</em> and has a <em>name</em>.
-
-    @see SD_workstation_management */
-typedef xbt_dictelm_t SD_workstation_t;
-
-/** @brief Workstation access mode
-    @ingroup SD_datatypes_management
-
-    By default, a workstation resource is shared, i.e. several tasks
-    can be executed at the same time on a workstation. The CPU power of
-    the workstation is shared between the running tasks on the workstation.
-    In sequential mode, only one task can use the workstation, and the other
-    tasks wait in a FIFO.
-
-    @see SD_workstation_get_access_mode(), SD_workstation_set_access_mode() */
-typedef enum {
-  SD_WORKSTATION_SHARED_ACCESS,     /**< @brief Several tasks can be executed at the same time */
-  SD_WORKSTATION_SEQUENTIAL_ACCESS  /**< @brief Only one task can be executed, the others wait in a FIFO. */
-} e_SD_workstation_access_mode_t;
-
-typedef enum {
-  SD_LINK_SHARED,
-  SD_LINK_FATPIPE
-} e_SD_link_sharing_policy_t;
-
-/** @brief Link datatype
-    @ingroup SD_datatypes_management
-
-    A link is a network node represented as a <em>name</em>, a <em>current
-    bandwidth</em> and a <em>current latency</em>. A route is a list of
-    links between two workstations.
-
-    @see SD_link_management */
-typedef struct SD_link *SD_link_t;
-
-/** @brief Task datatype
-    @ingroup SD_datatypes_management
-
-    A task is some <em>computing amount</em> that can be executed
-    in parallel on several workstations. A task may depend on other
-    tasks, this means that the task cannot start until the other tasks are done.
-    Each task has a <em>\ref e_SD_task_state_t "state"</em> indicating whether 
-    the task is scheduled, running, done, etc.
-
-    @see SD_task_management */
-typedef struct SD_task *SD_task_t;
-
-/** @brief Task states
-    @ingroup SD_datatypes_management
-
-    @see SD_task_management */
-typedef enum {
-  SD_NOT_SCHEDULED = 0,      /**< @brief Initial state (not valid for SD_watch and SD_unwatch). */
-  SD_SCHEDULABLE = 0x0001,               /**< @brief A task becomes SD_SCHEDULABLE as soon as its dependencies are satisfied */
-  SD_SCHEDULED = 0x0002,     /**< @brief A task becomes SD_SCHEDULED when you call function
-                                  SD_task_schedule. SD_simulate will execute it when it becomes SD_RUNNABLE. */
-  SD_RUNNABLE = 0x0004,      /**< @brief A scheduled task becomes runnable is SD_simulate as soon as its dependencies are satisfied. */
-  SD_IN_FIFO = 0x0008,       /**< @brief A runnable task can have to wait in a workstation fifo if the workstation is sequential */
-  SD_RUNNING = 0x0010,       /**< @brief An SD_RUNNABLE or SD_IN_FIFO becomes SD_RUNNING when it is launched. */
-  SD_DONE = 0x0020,          /**< @brief The task is successfully finished. */
-  SD_FAILED = 0x0040         /**< @brief A problem occurred during the execution of the task. */
-} e_SD_task_state_t;
-
-/** @brief Task kinds
-    @ingroup SD_datatypes_management
-
-    @see SD_task_management */
-typedef enum {
-  SD_TASK_NOT_TYPED = 0,      /**< @brief no specified type */
-  SD_TASK_COMM_E2E = 1,       /**< @brief end to end communication */
-  SD_TASK_COMP_SEQ = 2,        /**< @brief sequential computation */
-  SD_TASK_COMP_PAR_AMDAHL = 3, /**< @brief parallel computation (Amdahl's law) */
-  SD_TASK_COMM_PAR_MXN_1D_BLOCK = 4 /**< @brief MxN data redistribution (1D Block distribution) */
-} e_SD_task_kind_t;
-
-
-/** @brief Storage datatype
-    @ingroup SD_datatypes_management
-
- TODO PV: comment it !
-
-    @see SD_storage_management */
-typedef xbt_dictelm_t SD_storage_t;
-
-#endif
similarity index 71%
rename from include/instr/instr.h
rename to include/simgrid/instr.h
index 325a0ae..0c37ffe 100644 (file)
@@ -9,12 +9,10 @@
 
 #include "simgrid_config.h"
 
-#ifdef HAVE_TRACING
-
 #include "xbt.h"
 #include "xbt/graph.h"
-#include "msg/msg.h"
-#include "simdag/simdag.h"
+#include "simgrid/msg.h"
+#include "simgrid/simdag.h"
 
 /*
  * Functions to manage tracing categories
@@ -98,60 +96,4 @@ XBT_PUBLIC(xbt_dynar_t) TRACE_get_edge_types (void);
 XBT_PUBLIC(void) TRACE_pause (void);
 XBT_PUBLIC(void) TRACE_resume (void);
 
-
-#else                           /* HAVE_TRACING */
-
-#define TRACE_category(category)
-#define TRACE_category_with_color(category,color)
-#define TRACE_get_categories()
-#define TRACE_smpi_set_category(category)
-
-#define TRACE_declare_mark(mark_type)
-#define TRACE_mark(mark_type,mark_value)
-#define TRACE_get_marks()
-
-#define TRACE_platform_graph_export_graphviz(filename)
-
-#define TRACE_vm_variable_declare(var)
-#define TRACE_vm_variable_declare_with_color(var,color)
-#define TRACE_vm_variable_set(vm,var,value)
-#define TRACE_vm_variable_add(vm,var,value)
-#define TRACE_vm_variable_sub(vm,var,value)
-#define TRACE_vm_variable_set_with_time(time,vm,var,value)
-#define TRACE_vm_variable_add_with_time(time,vm,var,value)
-#define TRACE_vm_variable_sub_with_time(time,vm,var,value)
-#define TRACE_get_vm_variables()
-
-#define TRACE_host_variable_declare(var)
-#define TRACE_host_variable_declare_with_color(var,color)
-#define TRACE_host_variable_set(host,var,value)
-#define TRACE_host_variable_add(host,var,value)
-#define TRACE_host_variable_sub(host,var,value)
-#define TRACE_host_variable_set_with_time(time,host,var,value)
-#define TRACE_host_variable_add_with_time(time,host,var,value)
-#define TRACE_host_variable_sub_with_time(time,host,var,value)
-#define TRACE_get_host_variables()
-
-#define TRACE_link_variable_declare(var)
-#define TRACE_link_variable_declare_with_color(var,color)
-#define TRACE_link_variable_set(link,var,value)
-#define TRACE_link_variable_add(link,var,value)
-#define TRACE_link_variable_sub(link,var,value)
-#define TRACE_link_variable_set_with_time(time,link,var,value)
-#define TRACE_link_variable_add_with_time(time,link,var,value)
-#define TRACE_link_variable_sub_with_time(time,link,var,value)
-
-#define TRACE_link_srcdst_variable_set(src,dst,var,value)
-#define TRACE_link_srcdst_variable_add(src,dst,var,value)
-#define TRACE_link_srcdst_variable_sub(src,dst,var,value)
-#define TRACE_link_srcdst_variable_set_with_time(time,src,dst,var,value)
-#define TRACE_link_srcdst_variable_add_with_time(time,src,dst,var,value)
-#define TRACE_link_srcdst_variable_sub_with_time(time,src,dst,var,value)
-#define TRACE_get_host_variables()
-
-#define TRACE_get_node_types()
-#define TRACE_get_edge_types()
-
-#endif                          /* HAVE_TRACING */
-
 #endif                          /* INSTR_H_ */
similarity index 91%
rename from include/instr/jedule/jedule_sd_binding.h
rename to include/simgrid/jedule/jedule_sd_binding.h
index 4bed8e1..a40f564 100644 (file)
@@ -8,9 +8,7 @@
 #define JEDULE_SD_BINDING_H_
 
 #include "simgrid_config.h"
-
-#include "simdag/datatypes.h"
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 
 #ifdef HAVE_JEDULE
 
similarity index 78%
rename from include/msg/msg.h
rename to include/simgrid/msg.h
index 32a2de4..4193fd2 100644 (file)
 #define MSG_H
 
 #include "xbt.h"
-
-#include "msg/datatypes.h"
-
+#include "xbt/lib.h"
 #include "simgrid/simix.h"
-
 #include "simgrid/platf.h"
 
 SG_BEGIN_DECL()
 
+/* ******************************** Mailbox ************************************ */
+
+/** @brief Mailbox datatype
+ *  @ingroup msg_task_usage
+ *
+ * Object representing a communication rendez-vous point, on which
+ * the sender finds the receiver it wants to communicate with. As a
+ * MSG user, you will only rarely manipulate any of these objects
+ * directly, since most of the public interface (such as
+ * #MSG_task_send and friends) hide this object behind a string
+ * alias. That mean that you don't provide the mailbox on which you
+ * want to send your task, but only the name of this mailbox. */
+typedef struct s_smx_rvpoint *msg_mailbox_t;
+
+/* ******************************** Environment ************************************ */
+typedef struct As *msg_as_t;
+
+/* ******************************** Host ************************************ */
+
+extern int MSG_HOST_LEVEL;
+
+/** @brief Host datatype.
+    @ingroup m_host_management
+
+    A <em>location</em> (or <em>host</em>) is any possible place where
+    a process may run. Thus it is represented as a <em>physical
+    resource with computing capabilities</em>, some <em>mailboxes</em>
+    to enable running process to communicate with remote ones, and
+    some <em>private data</em> that can be only accessed by local
+    process.
+ */
+typedef xbt_dictelm_t msg_host_t;
+typedef s_xbt_dictelm_t s_msg_host_t;
+
+typedef struct msg_host_priv {
+  int        dp_enabled;
+  xbt_dict_t dp_objs;
+  double     dp_updated_by_deleted_tasks;
+  int        is_migrating;
+
+  xbt_dict_t affinity_mask_db;
+
+#ifdef MSG_USE_DEPRECATED
+  msg_mailbox_t *mailboxes;     /**< the channels  */
+#endif
+} s_msg_host_priv_t, *msg_host_priv_t;
+
+static inline msg_host_priv_t MSG_host_priv(msg_host_t host){
+  return (msg_host_priv_t )xbt_lib_get_level(host, MSG_HOST_LEVEL);
+}
+
+
+
+/* ******************************** Task ************************************ */
+
+typedef struct simdata_task *simdata_task_t;
+
+typedef struct msg_task {
+  char *name;                   /**< @brief task name if any */
+  simdata_task_t simdata;       /**< @brief simulator data */
+  void *data;                   /**< @brief user data */
+  long long int counter;        /* task unique identifier for instrumentation */
+  char *category;               /* task category for instrumentation */
+} s_msg_task_t;
+
+/** @brief Task datatype.
+    @ingroup m_task_management
+
+    A <em>task</em> may then be defined by a <em>computing
+    amount</em>, a <em>message size</em> and some <em>private
+    data</em>.
+ */
+typedef struct msg_task *msg_task_t;
+
+/* ******************************** VM ************************************* */
+typedef msg_host_t msg_vm_t;
+typedef msg_host_priv_t msg_vm_priv_t;
+
+static inline msg_vm_priv_t MSG_vm_priv(msg_vm_t vm){
+  return (msg_vm_priv_t) xbt_lib_get_level(vm, MSG_HOST_LEVEL);
+}
+
+/** ******************************** File ************************************ */
+
+/** @brief File datatype.
+*  @ingroup msg_file_management
+*
+*  You should consider this as an opaque object.
+*/
+typedef xbt_dictelm_t msg_file_t;
+typedef s_xbt_dictelm_t s_msg_file_t;
+
+extern int MSG_FILE_LEVEL;
+typedef struct simdata_file *simdata_file_t;
+
+typedef struct msg_file_priv  {
+  char *fullpath;
+  sg_size_t size;
+  char* mount_point;
+  char* storageId;
+  char* storage_type;
+  char* content_type;
+  void *data;
+  simdata_file_t simdata;
+} s_msg_file_priv_t, *msg_file_priv_t;
+
+static inline msg_file_priv_t MSG_file_priv(msg_file_t file){
+  return (msg_file_priv_t )xbt_lib_get_level(file, MSG_FILE_LEVEL);
+}
+
+/* ******************************** Storage ************************************ */
+/* TODO: PV: to comment */
+
+extern int MSG_STORAGE_LEVEL;
+
+/** @brief Storage datatype.
+ *  @ingroup msg_storage_management
+ *
+ *  You should consider this as an opaque object.
+ */
+typedef xbt_dictelm_t msg_storage_t;
+typedef s_xbt_dictelm_t s_msg_storage_t;
+
+typedef struct msg_storage_priv  {
+  const char *hostname;
+  void *data;
+} s_msg_storage_priv_t, *msg_storage_priv_t;
+
+static inline msg_storage_priv_t MSG_storage_priv(msg_storage_t storage){
+  return (msg_storage_priv_t )xbt_lib_get_level(storage, MSG_STORAGE_LEVEL);
+}
+
+/*************** Begin GPU ***************/
+typedef struct simdata_gpu_task *simdata_gpu_task_t;
+
+typedef struct msg_gpu_task {
+  char *name;                   /**< @brief task name if any */
+  simdata_gpu_task_t simdata;       /**< @brief simulator data */
+  long long int counter;        /* task unique identifier for instrumentation */
+  char *category;               /* task category for instrumentation */
+} s_msg_gpu_task_t;
+
+/** @brief GPU task datatype.
+    @ingroup m_task_management
+
+    A <em>task</em> may then be defined by a <em>computing
+    amount</em>, a <em>dispatch latency</em> and a <em>collect latency</em>.
+    \see m_task_management
+*/
+typedef struct msg_gpu_task *msg_gpu_task_t;
+/*************** End GPU ***************/
+
+/**
+ * \brief @brief Communication action.
+ * \ingroup msg_task_usage
+ *
+ * Object representing an ongoing communication between processes. Such beast is usually obtained by using #MSG_task_isend, #MSG_task_irecv or friends.
+ */
+typedef struct msg_comm *msg_comm_t;
+
+/** \brief Default value for an uninitialized #msg_task_t.
+    \ingroup m_task_management
+*/
+#define MSG_TASK_UNINITIALIZED NULL
+
+/* ****************************** Process *********************************** */
+
+/** @brief Process datatype.
+    @ingroup m_process_management
+
+    A process may be defined as a <em>code</em>, with some
+    <em>private data</em>, executing in a <em>location</em>.
+
+    You should not access directly to the fields of the pointed
+    structure, but always use the provided API to interact with
+    processes.
+ */
+typedef struct s_smx_process *msg_process_t;
+
+#ifdef MSG_USE_DEPRECATED
+
+/* Compatibility typedefs */
+typedef int                     m_channel_t;
+typedef msg_gpu_task_t          m_gpu_task_t;
+typedef msg_host_t              m_host_t;
+typedef msg_process_t           m_process_t;
+typedef msg_task_t              m_task_t;
+typedef s_msg_gpu_task_t        s_m_gpu_task_t;
+typedef s_msg_host_t            s_m_host_t;
+typedef s_msg_task_t            s_m_task_t;
+#endif
+
 /** @brief Return code of most MSG functions
     @ingroup msg_simulation
     @{ */
@@ -218,17 +407,17 @@ XBT_PUBLIC(msg_process_t) MSG_process_restart(msg_process_t process);
 
 /************************** Task handling ************************************/
 XBT_PUBLIC(msg_task_t) MSG_task_create(const char *name,
-                                     double compute_duration,
-                                     double message_size, void *data);
+                                     double flops_amount,
+                                     double bytes_amount, void *data);
 XBT_PUBLIC(msg_gpu_task_t) MSG_gpu_task_create(const char *name,
-                                     double compute_duration,
+                                     double flops_amount,
                                      double dispatch_latency,
                                      double collect_latency);
 XBT_PUBLIC(msg_task_t) MSG_parallel_task_create(const char *name,
                                               int host_nb,
                                               const msg_host_t * host_list,
-                                              double *computation_amount,
-                                              double *communication_amount,
+                                              double *flops_amount,
+                                              double *bytes_amount,
                                               void *data);
 XBT_PUBLIC(void *) MSG_task_get_data(msg_task_t task);
 XBT_PUBLIC(void) MSG_task_set_data(msg_task_t task, void *data);
@@ -255,16 +444,15 @@ XBT_PUBLIC(void) MSG_task_set_affinity(msg_task_t task, msg_host_t host, unsigne
 XBT_PUBLIC(msg_error_t) MSG_process_join(msg_process_t process, double timeout);
 XBT_PUBLIC(msg_error_t) MSG_process_sleep(double nb_sec);
 
-XBT_PUBLIC(double) MSG_task_get_compute_duration(msg_task_t task);
-XBT_PUBLIC(void) MSG_task_set_compute_duration(msg_task_t task,
-                                               double compute_duration);
-XBT_PUBLIC(void) MSG_task_set_data_size(msg_task_t task,
-                                        double data_size);
+XBT_PUBLIC(void) MSG_task_set_flops_amount(msg_task_t task,
+                                               double flops_amount);
+XBT_PUBLIC(double) MSG_task_get_flops_amount(msg_task_t task);
+XBT_PUBLIC(void) MSG_task_set_bytes_amount(msg_task_t task,
+                                        double bytes_amount);
 
-XBT_PUBLIC(double) MSG_task_get_remaining_computation(msg_task_t task);
 XBT_PUBLIC(double) MSG_task_get_remaining_communication(msg_task_t task);
 XBT_PUBLIC(int) MSG_task_is_latency_bounded(msg_task_t task);
-XBT_PUBLIC(double) MSG_task_get_data_size(msg_task_t task);
+XBT_PUBLIC(double) MSG_task_get_bytes_amount(msg_task_t task);
 
 
 XBT_PUBLIC(msg_error_t)
@@ -501,7 +689,7 @@ xbt_dynar_t<msg_vm_t> MSG_vm_get_list_from_host(msg_host_t)
 xbt_dynar_t<msg_vm_t> MSG_vm_get_list_from_hosts(msg_dynar_t<msg_host_t>)
 + des fonctions de filtrage sur les dynar
 */
-#include "instr/instr.h"
+#include "simgrid/instr.h"
 
 
 
similarity index 72%
rename from include/simdag/simdag.h
rename to include/simgrid/simdag.h
index 31ed69d..adcc3a0 100644 (file)
 #ifndef SIMDAG_SIMDAG_H
 #define SIMDAG_SIMDAG_H
 
-#include "simdag/datatypes.h"
 #include "xbt/misc.h"
 #include "xbt/dynar.h"
 #include "xbt/dict.h"
 
 
 SG_BEGIN_DECL()
+/** @brief Workstation datatype
+    @ingroup SD_datatypes_management
+
+    A workstation is a place where a task can be executed.
+    A workstation is represented as a <em>physical
+    resource with computing capabilities</em> and has a <em>name</em>.
+
+    @see SD_workstation_management */
+typedef xbt_dictelm_t SD_workstation_t;
+
+/** @brief Workstation access mode
+    @ingroup SD_datatypes_management
+
+    By default, a workstation resource is shared, i.e. several tasks
+    can be executed at the same time on a workstation. The CPU power of
+    the workstation is shared between the running tasks on the workstation.
+    In sequential mode, only one task can use the workstation, and the other
+    tasks wait in a FIFO.
+
+    @see SD_workstation_get_access_mode(), SD_workstation_set_access_mode() */
+typedef enum {
+  SD_WORKSTATION_SHARED_ACCESS,     /**< @brief Several tasks can be executed at the same time */
+  SD_WORKSTATION_SEQUENTIAL_ACCESS  /**< @brief Only one task can be executed, the others wait in a FIFO. */
+} e_SD_workstation_access_mode_t;
+
+typedef enum {
+  SD_LINK_SHARED,
+  SD_LINK_FATPIPE
+} e_SD_link_sharing_policy_t;
+
+/** @brief Link datatype
+    @ingroup SD_datatypes_management
+
+    A link is a network node represented as a <em>name</em>, a <em>current
+    bandwidth</em> and a <em>current latency</em>. A route is a list of
+    links between two workstations.
+
+    @see SD_link_management */
+typedef struct SD_link *SD_link_t;
+
+/** @brief Task datatype
+    @ingroup SD_datatypes_management
+
+    A task is some <em>computing amount</em> that can be executed
+    in parallel on several workstations. A task may depend on other
+    tasks, this means that the task cannot start until the other tasks are done.
+    Each task has a <em>\ref e_SD_task_state_t "state"</em> indicating whether
+    the task is scheduled, running, done, etc.
+
+    @see SD_task_management */
+typedef struct SD_task *SD_task_t;
+
+/** @brief Task states
+    @ingroup SD_datatypes_management
+
+    @see SD_task_management */
+typedef enum {
+  SD_NOT_SCHEDULED = 0,      /**< @brief Initial state (not valid for SD_watch and SD_unwatch). */
+  SD_SCHEDULABLE = 0x0001,               /**< @brief A task becomes SD_SCHEDULABLE as soon as its dependencies are satisfied */
+  SD_SCHEDULED = 0x0002,     /**< @brief A task becomes SD_SCHEDULED when you call function
+                                  SD_task_schedule. SD_simulate will execute it when it becomes SD_RUNNABLE. */
+  SD_RUNNABLE = 0x0004,      /**< @brief A scheduled task becomes runnable is SD_simulate as soon as its dependencies are satisfied. */
+  SD_IN_FIFO = 0x0008,       /**< @brief A runnable task can have to wait in a workstation fifo if the workstation is sequential */
+  SD_RUNNING = 0x0010,       /**< @brief An SD_RUNNABLE or SD_IN_FIFO becomes SD_RUNNING when it is launched. */
+  SD_DONE = 0x0020,          /**< @brief The task is successfully finished. */
+  SD_FAILED = 0x0040         /**< @brief A problem occurred during the execution of the task. */
+} e_SD_task_state_t;
+
+/** @brief Task kinds
+    @ingroup SD_datatypes_management
+
+    @see SD_task_management */
+typedef enum {
+  SD_TASK_NOT_TYPED = 0,      /**< @brief no specified type */
+  SD_TASK_COMM_E2E = 1,       /**< @brief end to end communication */
+  SD_TASK_COMP_SEQ = 2,        /**< @brief sequential computation */
+  SD_TASK_COMP_PAR_AMDAHL = 3, /**< @brief parallel computation (Amdahl's law) */
+  SD_TASK_COMM_PAR_MXN_1D_BLOCK = 4 /**< @brief MxN data redistribution (1D Block distribution) */
+} e_SD_task_kind_t;
+
+
+/** @brief Storage datatype
+    @ingroup SD_datatypes_management
+
+ TODO PV: comment it !
+
+    @see SD_storage_management */
+typedef xbt_dictelm_t SD_storage_t;
 
 /************************** AS handling *************************************/
 XBT_PUBLIC(xbt_dict_t) SD_as_router_get_properties(const char *as);
@@ -91,21 +178,17 @@ XBT_PUBLIC(void) SD_workstation_set_access_mode(SD_workstation_t
                                                 e_SD_workstation_access_mode_t
                                                 access_mode);
 
-XBT_PUBLIC(double) SD_workstation_get_computation_time(SD_workstation_t
-                                                       workstation,
-                                                       double
-                                                       computation_amount);
+XBT_PUBLIC(double) SD_workstation_get_computation_time(SD_workstation_t workstation,
+                                                       double flops_amount);
 XBT_PUBLIC(double) SD_route_get_current_latency(SD_workstation_t src,
                                                 SD_workstation_t dst);
 XBT_PUBLIC(double) SD_route_get_current_bandwidth(SD_workstation_t src,
                                                   SD_workstation_t dst);
 XBT_PUBLIC(double) SD_route_get_communication_time(SD_workstation_t src,
                                                    SD_workstation_t dst,
-                                                   double
-                                                   communication_amount);
+                                                   double bytes_amount);
 
-XBT_PUBLIC(SD_task_t) SD_workstation_get_current_task(SD_workstation_t
-                                                      workstation);
+XBT_PUBLIC(SD_task_t) SD_workstation_get_current_task(SD_workstation_t workstation);
 XBT_PUBLIC(xbt_dict_t)
     SD_workstation_get_mounted_storage_list(SD_workstation_t workstation);
 XBT_PUBLIC(xbt_dynar_t)
@@ -148,15 +231,14 @@ XBT_PUBLIC(double) SD_task_get_execution_time(SD_task_t task,
                                               int workstation_nb,
                                               const SD_workstation_t *
                                               workstation_list,
-                                              const double
-                                              *computation_amount, const double
-                                              *communication_amount);
+                                              const double *flops_amount,
+                                                                                         const double *bytes_amount);
 XBT_PUBLIC(int) SD_task_get_kind(SD_task_t task);
 XBT_PUBLIC(void) SD_task_schedule(SD_task_t task, int workstation_nb,
                                   const SD_workstation_t *
                                   workstation_list,
-                                  const double *computation_amount,
-                                  const double *communication_amount,
+                                  const double *flops_amount,
+                                  const double *bytes_amount,
                                   double rate);
 XBT_PUBLIC(void) SD_task_unschedule(SD_task_t task);
 XBT_PUBLIC(double) SD_task_get_start_time(SD_task_t task);
@@ -194,7 +276,7 @@ XBT_PUBLIC(void) SD_task_schedulel(SD_task_t task, int count, ...);
  *
  *  SD_task_schedule(task, my_workstation_nb,
  *                   my_workstation_list,
- *                   my_computation_amount,
+ *                   my_flops_amount,
  *                   SD_TASK_SCHED_NO_COST,
  *                   my_rate);
  */
@@ -246,7 +328,7 @@ XBT_PUBLIC(void) uniq_transfer_task_name(SD_task_t task);
 
 /** @} */
 
-#include "instr/instr.h"
+#include "simgrid/instr.h"
 
 SG_END_DECL()
 #endif
index 0fac060..a79adf3 100644 (file)
@@ -321,13 +321,13 @@ XBT_PUBLIC(void) simcall_host_set_power_peak_at(smx_host_t host, int pstate_inde
 XBT_PUBLIC(double) simcall_host_get_consumed_energy(smx_host_t host);
 
 XBT_PUBLIC(smx_synchro_t) simcall_host_execute(const char *name, smx_host_t host,
-                                                double computation_amount,
+                                                double flops_amount,
                                                 double priority, double bound, unsigned long affinity_mask);
 XBT_PUBLIC(smx_synchro_t) simcall_host_parallel_execute(const char *name,
                                                      int host_nb,
                                                      smx_host_t *host_list,
-                                                     double *computation_amount,
-                                                     double *communication_amount,
+                                                     double *flops_amount,
+                                                     double *bytes_amount,
                                                      double amount,
                                                      double rate);
 XBT_PUBLIC(void) simcall_host_execution_destroy(smx_synchro_t execution);
@@ -466,13 +466,10 @@ XBT_PUBLIC(smx_process_t) simcall_comm_get_dst_proc(smx_synchro_t comm);
 XBT_PUBLIC(int) simcall_comm_is_latency_bounded(smx_synchro_t comm);
 #endif
 
-#ifdef HAVE_TRACING
 /************************** Tracing handling **********************************/
 XBT_PUBLIC(void) simcall_set_category(smx_synchro_t synchro, const char *category);
-#endif
 
 /************************** Synchro simcalls **********************************/
-
 XBT_PUBLIC(smx_mutex_t) simcall_mutex_init(void);
 XBT_PUBLIC(void) simcall_mutex_destroy(smx_mutex_t mutex);
 XBT_PUBLIC(void) simcall_mutex_lock(smx_mutex_t mutex);
index b3a3fdf..49f6a3a 100644 (file)
@@ -124,9 +124,6 @@ XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2);
 /* Define if xbt contexts are based on our threads implementation or not */
 #cmakedefine CONTEXT_THREADS @CONTEXT_THREADS@
 
-/* Tracing SimGrid */
-#cmakedefine HAVE_TRACING @HAVE_TRACING@
-
 /* Jedule output  */
 #cmakedefine HAVE_JEDULE @HAVE_JEDULE@
 
index c11ba91..b5a7abb 100644 (file)
@@ -6,7 +6,7 @@
 /* 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/msg.h>
+#include <simgrid/msg.h>
 #include <simgrid/simix.h>
 #include <surf/surfxml_parse.h>
 #include <locale.h>
@@ -104,9 +104,7 @@ Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs)
   const char *tmp;
 
   XBT_LOG_CONNECT(jmsg);
-#ifdef HAVE_TRACING
   XBT_LOG_CONNECT(jtrace);
-#endif
 
   (*env)->GetJavaVM(env, &__java_vm);
 
index da2b16f..b9046ab 100644 (file)
@@ -8,7 +8,7 @@
 
 #ifndef MSG4JAVA_H
 #define MSG4JAVA_H
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 #include <jni.h>
 
 extern int JAVA_HOST_LEVEL;
index a3daec6..f3ed319 100644 (file)
@@ -8,9 +8,12 @@
 
 #include "xbt/str.h"
 #include "xbt/dict.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "jmsg_as.h"
+#include "jmsg_host.h"
 #include "jxbt_utilities.h"
+#include "jmsg.h"
+
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
 
index ad928b6..8e9ea42 100644 (file)
@@ -9,19 +9,7 @@
 #ifndef MSG_JAS_H
 #define MSG_JAS_H
 #include <jni.h>
-#include "msg/msg.h"
-
-/* Functions related to the java host instances.                            */
-
-/* Copyright (c) 2007-2013. 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/msg.h"
-#include "jmsg.h"
-#include "jmsg_host.h"
+#include "simgrid/msg.h"
 
 jobject jas_new_instance(JNIEnv * env);
 jobject jas_ref(JNIEnv * env, jobject jas);
index 85b70d6..bf6a09b 100644 (file)
@@ -10,7 +10,7 @@
 #include "jxbt_utilities.h"
 #include "jmsg.h"
 
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
 
 static jfieldID jcomm_field_Comm_bind;
index 5cb7ba5..ec099e9 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef MSG_JCOMM_H
 #define MSG_JCOMM_H
 #include <jni.h>
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 /**
  * This function binds the task associated with the communication to
  * the java communication object.
index e2c0352..0fe72f6 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef MSG_JFILE_H
 #define MSG_JFILE_H
 #include <jni.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 
 jfieldID jfile_field_bind;
 
index 0d4469c..7c013ea 100644 (file)
@@ -7,7 +7,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "xbt/str.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "jmsg.h"
 #include "jmsg_host.h"
 #include "jxbt_utilities.h"
index 609b9a9..f1ea516 100644 (file)
@@ -10,7 +10,7 @@
 #define MSG_JHOST_H
 
 #include <jni.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 
 /**
  * This function returns a new java host instance.
index 8625d25..a65f183 100644 (file)
@@ -225,7 +225,7 @@ Java_org_simgrid_msg_Process_getProperty(JNIEnv *env, jobject jprocess, jobject
   return jproperty;
 }
 JNIEXPORT jobject JNICALL
-Java_org_simgrid_msg_Process_currentProcess(JNIEnv * env, jclass cls)
+Java_org_simgrid_msg_Process_getCurrentProcess(JNIEnv * env, jclass cls)
 {
   msg_process_t process = MSG_process_self();
   jobject jprocess;
index 54b211d..129fba2 100644 (file)
@@ -10,7 +10,7 @@
 #define MSG_JPROCESS_H
 
 #include <jni.h>
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 #include <simgrid/simix.h>
 
 //Cached java fields
@@ -184,7 +184,7 @@ Java_org_simgrid_msg_Process_getProperty(JNIEnv *env, jobject jprocess, jobject
  * Method              currentProcess
  * Signature   ()Lorg/simgrid/msg/Process;
  */
-JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_currentProcess
+JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_getCurrentProcess
     (JNIEnv *, jclass);
 /*
  * Class               org_simgrid_msg_Process
index 150ae14..0fee6cd 100644 (file)
@@ -7,7 +7,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "xbt/str.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "jmsg.h"
 #include "jmsg_storage.h"
 #include "jxbt_utilities.h"
index eeda61e..763dd8f 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef MSG_JSTORAGE_H
 #define MSG_JSTORAGE_H
 #include <jni.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 
 /**
  * This function returns a new java storage instance.
index a42e9b6..d89ebcf 100644 (file)
@@ -10,7 +10,7 @@
 #define MSG_JSYNCHRO_H
 
 #include <jni.h>
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 #include <simgrid/simix.h>
 
 JNIEXPORT void JNICALL
index 77aa315..850a999 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "jxbt_utilities.h"
 
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
 
@@ -64,24 +64,24 @@ Java_org_simgrid_msg_Task_nativeInit(JNIEnv *env, jclass cls) {
 JNIEXPORT void JNICALL
 Java_org_simgrid_msg_Task_create(JNIEnv * env,
                                       jobject jtask, jstring jname,
-                                      jdouble jcomputeDuration,
-                                      jdouble jmessageSize)
+                                      jdouble jflopsAmount,
+                                      jdouble jbytesAmount)
 {
   msg_task_t task;                /* the native task to create                            */
   const char *name = NULL;      /* the name of the task                                 */
 
-  if (jcomputeDuration < 0) {
+  if (jflopsAmount < 0) {
     jxbt_throw_illegal(env,
                        bprintf
-                       ("Task ComputeDuration (%f) cannot be negative",
-                        (double) jcomputeDuration));
+                       ("Task flopsAmount (%f) cannot be negative",
+                        (double) jflopsAmount));
     return;
   }
 
-  if (jmessageSize < 0) {
+  if (jbytesAmount < 0) {
     jxbt_throw_illegal(env,
-                       bprintf("Task MessageSize (%f) cannot be negative",
-                       (double) jmessageSize));
+                       bprintf("Task bytesAmount (%f) cannot be negative",
+                       (double) jbytesAmount));
     return;
   }
 
@@ -92,8 +92,8 @@ Java_org_simgrid_msg_Task_create(JNIEnv * env,
 
   /* create the task */
   task =
-      MSG_task_create(name, (double) jcomputeDuration,
-                     (double) jmessageSize, NULL);
+      MSG_task_create(name, (double) jflopsAmount,
+                     (double) jbytesAmount, NULL);
   if (jname)
     (*env)->ReleaseStringUTFChars(env, jname, name);
   /* sets the task name */
@@ -128,14 +128,14 @@ Java_org_simgrid_msg_Task_parallelCreate(JNIEnv * env,
   if (!jcomputeDurations_arg) {
     jxbt_throw_null(env,
                     xbt_strdup
-                    ("Parallel task compute durations cannot be null"));
+                    ("Parallel task flops amounts cannot be null"));
     return;
   }
 
   if (!jmessageSizes_arg) {
     jxbt_throw_null(env,
                     xbt_strdup
-                    ("Parallel task message sizes cannot be null"));
+                    ("Parallel task bytes amounts cannot be null"));
     return;
   }
 
@@ -294,8 +294,7 @@ Java_org_simgrid_msg_Task_getSource(JNIEnv * env,
 }
 
 JNIEXPORT jdouble JNICALL
-Java_org_simgrid_msg_Task_getComputeDuration(JNIEnv * env,
-                                                  jobject jtask)
+Java_org_simgrid_msg_Task_getFlopsAmount(JNIEnv * env, jobject jtask)
 {
   msg_task_t ptask = jtask_to_native_task(jtask, env);
 
@@ -303,20 +302,9 @@ Java_org_simgrid_msg_Task_getComputeDuration(JNIEnv * env,
     jxbt_throw_notbound(env, "task", jtask);
     return -1;
   }
-  return (jdouble) MSG_task_get_compute_duration(ptask);
+  return (jdouble) MSG_task_get_flops_amount(ptask);
 }
 
-JNIEXPORT jdouble JNICALL
-Java_org_simgrid_msg_Task_getRemainingDuration(JNIEnv * env, jobject jtask)
-{
-  msg_task_t ptask = jtask_to_native_task(jtask, env);
-
-  if (!ptask) {
-    jxbt_throw_notbound(env, "task", jtask);
-    return -1;
-  }
-  return (jdouble) MSG_task_get_remaining_computation(ptask);
-}
 JNIEXPORT void JNICALL
 Java_org_simgrid_msg_Task_setName(JNIEnv *env, jobject jtask, jobject jname) {
        msg_task_t task = jtask_to_native_task(jtask, env);
@@ -345,7 +333,7 @@ Java_org_simgrid_msg_Task_setPriority(JNIEnv * env,
   MSG_task_set_priority(task, (double) priority);
 }
 JNIEXPORT void JNICALL
-Java_org_simgrid_msg_Task_setComputeDuration
+Java_org_simgrid_msg_Task_setFlopsAmount
                (JNIEnv *env, jobject jtask, jdouble computationAmount) {
        msg_task_t task = jtask_to_native_task(jtask, env);
 
@@ -353,10 +341,10 @@ Java_org_simgrid_msg_Task_setComputeDuration
     jxbt_throw_notbound(env, "task", jtask);
     return;
        }
-       MSG_task_set_compute_duration(task, (double) computationAmount);
+       MSG_task_set_flops_amount(task, (double) computationAmount);
 }
 JNIEXPORT void JNICALL
-Java_org_simgrid_msg_Task_setDataSize
+Java_org_simgrid_msg_Task_setBytesAmount
                (JNIEnv *env, jobject jtask, jdouble dataSize) {
        msg_task_t task = jtask_to_native_task(jtask, env);
 
@@ -365,7 +353,7 @@ Java_org_simgrid_msg_Task_setDataSize
     return;
        }
         (*env)->SetDoubleField(env, jtask, jtask_field_Task_messageSize, dataSize);
-       MSG_task_set_data_size(task, (double) dataSize);
+       MSG_task_set_bytes_amount(task, (double) dataSize);
 }
 
 JNIEXPORT void JNICALL
index 068dee0..77daa9f 100644 (file)
 #define MSG_JTASK_H
 
 #include <jni.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 
-/**
- * This function returns a global reference to the  java task instance 
- * specified by the parameter jtask.
- *
- * @param jtask                        The original java task instance.
- * @param env                  The environment of the current thread.
- *
- * @return                             The global reference to the original java task 
- *                                             instance.
- */
-/* jobject jtask_new_global_ref(jobject jtask, JNIEnv * env); */
-
-/**
- * This function delete a global reference to a java task instance.
- *
- * @param                              The global refernce to delete.
- * @param env                  The environment of the current thread.
- */
-/* void jtask_delete_global_ref(jobject jtask, JNIEnv * env); */
 
 /**
  * This function associated a native task to a java task instance.
@@ -156,19 +137,12 @@ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_getSource
     (JNIEnv *, jobject);
 /*
  * Class               org_simgrid_msg_Task
- * Method              getComputeDuration
+ * Method              getFlopsAmount
  * Signature   ()D
  */
-JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Task_getComputeDuration
+JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Task_getFlopsAmount
     (JNIEnv *, jobject);
 
-/*
- * Class               org_simgrid_msg_Task
- * Method              getRemainingDuration
- * Signature   ()D
- */
-JNIEXPORT jdouble JNICALL
-Java_org_simgrid_msg_Task_getRemainingDuration(JNIEnv *, jobject);
 /**
  * Class               org_simgrid_msg_Task
  * Method              setName
@@ -189,7 +163,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_setPriority
  * Signature   (D)V
  */
 JNIEXPORT void JNICALL
-Java_org_simgrid_msg_Task_setComputeDuration
+Java_org_simgrid_msg_Task_setFlopsAmount
                (JNIEnv *env, jobject jtask, jdouble computationAmount);
                
                /**
@@ -198,7 +172,7 @@ Java_org_simgrid_msg_Task_setComputeDuration
  * Signature   (D)V
  */
 JNIEXPORT void JNICALL
-Java_org_simgrid_msg_Task_setDataSize
+Java_org_simgrid_msg_Task_setBytesAmount
                (JNIEnv *env, jobject jtask, jdouble dataSize);
                
 /**
index a86efda..d16c3b0 100644 (file)
@@ -11,7 +11,7 @@
 #include "jmsg_host.h"
 #include "jmsg_process.h"
 #include "jxbt_utilities.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
 
 static jfieldID jvm_field_bind;
@@ -125,11 +125,13 @@ JNIEXPORT void JNICALL
 Java_org_simgrid_msg_VM_internalmig(JNIEnv *env, jobject jvm, jobject jhost) {
   msg_vm_t vm = jvm_get_native(env,jvm);
   msg_host_t host = jhost_get_native(env, jhost);
+  xbt_ex_t e;
   TRY{
   MSG_vm_migrate(vm,host);
-  } CATCH_ANONYMOUS{
-      XBT_INFO("CATCH EXCEPTION MIGRATION");
-      jxbt_throw_host_failure(env, (char*)"during migration");
+  } CATCH(e){
+     XBT_INFO("CATCH EXCEPTION MIGRATION %s",e.msg);
+     xbt_ex_free(e);
+     jxbt_throw_host_failure(env, (char*)"during migration");
   } 
 }
 
index ba07003..5b97777 100644 (file)
@@ -10,7 +10,7 @@
 #define MSG_VM_H
 
 #include <jni.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 
 void jvm_bind(JNIEnv *env, jobject jvm, msg_vm_t vm);
 msg_vm_t jvm_get_native(JNIEnv *env, jobject jvm);
index 4e602b4..2227b7c 100644 (file)
@@ -10,7 +10,7 @@
 // It will be great that a JNI expert gives a look to validate it - Adrien ;)
 
 #include "jtrace.h"
-#include <instr/instr.h>
+#include <simgrid/instr.h>
 
 /* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */
 #ifndef JNIEXPORT
index e8a7a98..35248f8 100644 (file)
@@ -8,29 +8,29 @@ package org.simgrid.msg;
 
 public class As {
 
-    private long bind;
-    
-    protected As() {
+       private long bind;
+
+       protected As() {
        };
 
-    public String toString (){
-       return this.getName(); 
-    }
-    public native String getName();
+       public String toString (){
+               return this.getName(); 
+       }
+       public native String getName();
 
-    public native As[] getSons();
+       public native As[] getSons();
 
-    public native String getProperty(String name);
+       public native String getProperty(String name);
 
-    public native String getModel();
+       public native String getModel();
 
-    public native Host[] getHosts();
+       public native Host[] getHosts();
 
-    /**
-      * Class initializer, to initialize various JNI stuff
-      */
-    public static native void nativeInit();
-    static {
-       nativeInit();
-    }
+       /**
+        * Class initializer, to initialize various JNI stuff
+        */
+       public static native void nativeInit();
+       static {
+               nativeInit();
+       }
 }
index 672e702..ebe63fc 100644 (file)
@@ -68,7 +68,7 @@ public class Comm {
         * @param timeout Time before giving up
         */
        public native void waitCompletion(double timeout) throws TransferFailureException, HostFailureException, TimeoutException;
-               
+
        /**
         * Returns the task associated with the communication.
         * if the communication isn't finished yet, will return null.
index f0c78eb..bd19252 100644 (file)
@@ -44,7 +44,7 @@ public class File {
         * Close the file.      
         */
        public native void close();
-       
+
        /**
         * Class initializer, to initialize various JNI stuff
         */
index 07dace8..bfa1997 100644 (file)
@@ -58,17 +58,17 @@ public class Host {
         * User data.
         */ 
        private Object data;
-    /**
-     *
-     */
-    protected Host() {
+       /**
+        *
+        */
+       protected Host() {
                this.bind = 0;
                this.data = null;
        };
-       
+
        public String toString (){
                return this.name; 
-               
+
        }
 
        /**
@@ -78,11 +78,11 @@ public class Host {
         * @param name          The name of the host to get.
         *
         * @return              The host object with the given name.
-     * @exception              HostNotFoundException if the name of the host is not valid.
+        * @exception           HostNotFoundException if the name of the host is not valid.
         *                                      NativeException if the native version of this method failed.
         */ 
        public native static Host getByName(String name) 
-       throws HostNotFoundException, NullPointerException;
+                       throws HostNotFoundException, NullPointerException;
        /**
         * This static method returns the count of the installed hosts.
         *
@@ -105,18 +105,18 @@ public class Host {
         */ 
        public native static Host[] all();
 
-    /** 
-     * This static method sets a mailbox to receive in asynchronous mode.
-     * 
-     * All messages sent to this mailbox will be transferred to 
-     * the receiver without waiting for the receive call. 
-     * The receive call will still be necessary to use the received data.
-     * If there is a need to receive some messages asynchronously, and some not, 
-     * two different mailboxes should be used.
-     *
-     * @param mailboxName The name of the mailbox
-     */
-    public static native void setAsyncMailbox(String mailboxName);
+       /** 
+        * This static method sets a mailbox to receive in asynchronous mode.
+        
+        * All messages sent to this mailbox will be transferred to 
+        * the receiver without waiting for the receive call. 
+        * The receive call will still be necessary to use the received data.
+        * If there is a need to receive some messages asynchronously, and some not, 
+        * two different mailboxes should be used.
+        *
+        * @param mailboxName The name of the mailbox
+        */
+       public static native void setAsyncMailbox(String mailboxName);
 
 
        /**
@@ -130,25 +130,25 @@ public class Host {
 
        /**
         * Sets the data of the host.
-     * @param data
-     */
+        * @param data
+        */
        public void setData(Object data) {
                this.data = data;
        } 
        /**
         * Gets the data of the host.
-     *
-     * @return The data object associated with the host.
-     */
+        *
+        * @return The data object associated with the host.
+        */
        public Object getData() {
                return this.data;
        }
 
        /**
         * Checks whether a host has data.
-     *
-     * @return True if the host has an associated data object.
-     */
+        *
+        * @return True if the host has an associated data object.
+        */
        public boolean hasData() {
                return null != this.data;
        }
@@ -193,28 +193,28 @@ public class Host {
         * Returns the value of a given host property. 
         */
        public native String getProperty(String name);
-       
+
        /**
         * Change the value of a given host property. 
         */
        public native void setProperty(String name, String value);
-    
+
        /** This method tests if a host is up and running.
         * @return True if the host is available.
         */
        public native boolean isOn();
 
        /** This methods returns the list of mount point names on an host
-     * @return An array containing all mounted storages on the host
-     */
+        * @return An array containing all mounted storages on the host
+        */
        public native Storage[] getMountedStorage();
 
        /** This methods returns the list of storages attached to an host
-     * @return An array containing all storages (name) attached to the host
-     */
+        * @return An array containing all storages (name) attached to the host
+        */
        public native String[] getAttachedStorage();
-       
-       
+
+
        /**
         * Class initializer, to initialize various JNI stuff
         */
index 6cdc894..8153a42 100644 (file)
@@ -9,11 +9,6 @@
 package org.simgrid.msg;
 import org.simgrid.NativeLib;
 
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.File;
-
 
 public final class Msg {
        /* Statically load the library which contains all native functions used in here */
index 166d5e3..bebfe32 100644 (file)
@@ -19,21 +19,21 @@ package org.simgrid.msg;
  *  -->
  */
 public abstract class MsgException extends Exception {
-  private static final long serialVersionUID = 1L;
+       private static final long serialVersionUID = 1L;
 
-  /**
-   * Constructs an <code>MsgException</code> without a 
-   * detail message. 
-   */
-  public MsgException() {
-    super();
-  }
-  /**
-   * Constructs an <code>MsgException</code> with a detail message. 
-   *
-   * @param   s   the detail message.
-   */ 
-  public MsgException(String s) {
-    super(s);
-  }
+       /**
+        * Constructs an <code>MsgException</code> without a 
+        * detail message. 
+        */
+       public MsgException() {
+               super();
+       }
+       /**
+        * Constructs an <code>MsgException</code> with a detail message. 
+        *
+        * @param   s   the detail message.
+        */ 
+       public MsgException(String s) {
+               super(s);
+       }
 }
index 96dca06..fbcb634 100644 (file)
@@ -12,7 +12,7 @@ package org.simgrid.msg;
  */
 public class Mutex {
        private long bind; // The C object -- don't touch it
-       
+
        public Mutex() {
                init();
        }
@@ -23,7 +23,7 @@ public class Mutex {
        private native void init();
        public native void acquire();
        public native void release();
-       
+
        /**
         * Class initializer, to initialize various JNI stuff
         */
index 5791ccd..2e4eace 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
+
 import java.util.Arrays;
 import java.util.Vector;
 
@@ -56,44 +56,33 @@ public abstract class Process implements Runnable {
         * It is used to compute the id of an MSG process.
         */
        public static long nextProcessId = 0;
-       
+
        /**
         * Even if this attribute is public you must never access to it.
         * It is compute automatically during the creation of the object. 
         * The native functions use this identifier to synchronize the process.
         */
-       public long id;
-       
-       /**
-        * Start time of the process
-        */
-       public double startTime = 0;
-       /**
+       private long id;
+
+       /** Time at which the process should be created  */
+       protected double startTime = 0;
+       /** Time at which th
         * Kill time of the process
+        * 
+        * Set at creation, and used internally by SimGrid
         */
-       public double killTime = -1;
+       private double killTime = -1;
+
+       private String name;
        
-       /**
-        * The name of the process.                                                     
-        */
-       protected String name;
-       /**
-         * The PID of the process
-         */
-       protected int pid = -1;
-       /**
-        * The PPID of the process 
-        */
-       protected int ppid = -1;
-       /**
-        * The host of the process
-        */
-       protected Host host = null;
+       private int pid = -1;
+       private int ppid = -1;
+       private Host host = null;
 
        /** The arguments of the method function of the process. */     
        public Vector<String> args;
 
-       
+
        /**
         * Default constructor
         */
@@ -128,8 +117,8 @@ public abstract class Process implements Runnable {
         * @param args                  The arguments of the main function of the process.
         *
         * @exception                   HostNotFoundException  if no host with this name exists.
-     *                      NativeException
-     * @throws NativeException
+        *                      NativeException
+        * @throws NativeException
         *
         */ 
        public Process(String hostname, String name, String args[]) throws HostNotFoundException, NativeException {
@@ -186,7 +175,7 @@ public abstract class Process implements Runnable {
                this.args = new Vector<String>();
                if (null != args)
                        this.args.addAll(Arrays.asList(args));
-                               
+
                this.startTime = startTime;
                this.killTime = killTime;               
        }
@@ -207,49 +196,35 @@ public abstract class Process implements Runnable {
         */ 
        public static native int killAll(int resetPID);
 
-       /**
-        * This method kill a process.
+       /** Simply kills the receiving process.
         *
+        * SimGrid sometimes have issues when you kill processes that are currently communicating and such. We are working on it to fix the issues.
         */
        public native void kill();
-       /**
-        * Suspends the process by suspending the task on which it was
-        * waiting for the completion.
-        */
+       
+       /** Suspends the process. See {@link #resume()} to resume it afterward */
        public native void suspend();
-       /**
-        * Suspends the process by suspending the task on which it was
-        * waiting for the completion.
-        * DEPRECATED: use suspend instead.
-        */
-       @Deprecated
-       public void pause() {
-               suspend();
-       }
-       /**
-        * Sets the "auto-restart" flag of the process.
-        */
-       public native void setAutoRestart(boolean autoRestart);
-       /**
-        * Restarts the process from the beginning
-        */
-       public native void restart();
-       /**
-        * Resumes a suspended process by resuming the task on which it was
-        * waiting for the completion.
-        */
+       /** Resume a process that was suspended by {@link #suspend()}. */
        public native void resume();    
-       /**
-        * Tests if a process is suspended.
+       /** Tests if a process is suspended.
         *
-        * @return                              The method returns true if the process is suspended.
-        *                                              Otherwise the method returns false.
+        * @see {@link #suspend()} and {@link #resume()}
         */ 
        public native boolean isSuspended();
+       
+       /**
+        * Specify whether the process should restart when its host restarts after a failure
+        * 
+        * A process naturally stops when its host stops. It starts again only if autoRestart is set to true.
+        * Otherwise, it just disappears when the host stops.
+        */
+       public native void setAutoRestart(boolean autoRestart);
+       /** Restarts the process from the beginning */
+       public native void restart();
        /**
         * Returns the name of the process
         */
-       public String msgName() {
+       public String getName() {
                return this.name;
        }
        /**
@@ -291,20 +266,20 @@ public abstract class Process implements Runnable {
         * Returns the value of a given process property. 
         */
        public native String getProperty(String name);
-       
+
        /**
         * Set the kill time of the process
         * @param killTime the time when the process is killed
         */
        public native void setKillTime(double killTime);
-       
+
        /**
         * This static method returns the currently running process.
         *
         * @return                              The current process.
         *
         */ 
-       public static native Process currentProcess();
+       public static native Process getCurrentProcess();
        /**
         * Migrates a process to another host.
         *
@@ -336,27 +311,17 @@ public abstract class Process implements Runnable {
         */ 
        public native void waitFor(double seconds) throws HostFailureException;    
        /**
-     *
-     */
-    public void showArgs() {
-               Msg.info("[" + this.name + "/" + this.getHost().getName() + "] argc=" +
-                               this.args.size());
-               for (int i = 0; i < this.args.size(); i++)
-                       Msg.info("[" + this.msgName() + "/" + this.getHost().getName() +
-                                       "] args[" + i + "]=" + this.args.get(i));
+        * This method actually creates and run the process.
+        * It is a noop if the process is already launched.
+        * @throws HostNotFoundException
+        */
+       public final void start() throws HostNotFoundException {
+               if (!started) {
+                       started = true;
+                       create(host.getName());
+               }
        }
-    /**
-     * This method actually creates and run the process.
-     * It is a noop if the process is already launched.
-     * @throws HostNotFoundException
-     */
-    public final void start() throws HostNotFoundException {
-       if (!started) {
-               started = true;
-               create(host.getName());
-       }
-    }
-    
+
        /**
         * This method runs the process. Il calls the method function that you must overwrite.
         */
@@ -377,24 +342,24 @@ public abstract class Process implements Runnable {
                        Msg.info("Unexpected behavior. Stopping now");
                        System.exit(1);
                }
-                catch(ProcessKilledError pk) {
+               catch(ProcessKilledError pk) {
                }       
                exit();
        }
 
        /**
         * The main function of the process (to implement).
-     *
-     * @param args
-     * @throws MsgException
-     */
+        *
+        * @param args
+        * @throws MsgException
+        */
        public abstract void main(String[]args) throws MsgException;
 
        public native void exit();    
        /**
         * Class initializer, to initialize various JNI stuff
         */
-       public static native void nativeInit();
+       private static native void nativeInit();
        static {
                Msg.nativeInit();
                nativeInit();
index 6d5638c..c7d3a5d 100644 (file)
@@ -51,7 +51,7 @@ public class RngStream {
         * Release the C RngStream object
         */
        private native void destroy();
-       
+
        /**
         * Sets the initial seed of the package RngStreams to the six integers in the vector seed. This will
         * be the seed (initial state) of the first stream. If this procedure is not called, the default initial
@@ -79,21 +79,21 @@ public class RngStream {
         */
        public native void setAntithetic(boolean a);
        /**
-         * Sets the initial seed Ig of stream g to the vector seed. This vector must satisfy the same
-         * conditions as in setPackageSeed. The stream is then reset to this initial seed. The
-         * states and seeds of the other streams are not modified. As a result, after calling this procedure,
-         * the initial seeds of the streams are no longer spaced Z values apart. We discourage the use of
-         * this procedure. Returns false for invalid seeds, and true otherwise.
+        * Sets the initial seed Ig of stream g to the vector seed. This vector must satisfy the same
+        * conditions as in setPackageSeed. The stream is then reset to this initial seed. The
+        * states and seeds of the other streams are not modified. As a result, after calling this procedure,
+        * the initial seeds of the streams are no longer spaced Z values apart. We discourage the use of
+        * this procedure. Returns false for invalid seeds, and true otherwise.
         */
        public native boolean setSeed(int seed[]);
        /**
-         * Advances the state of the stream by k values, without modifying the states of other streams (as
-         * in RngStream_SetSeed), nor the values of Bg and Ig associated with this stream. If e > 0, then
-         * k = 2e + c; if e < 0, then k = -2-e + c; and if e = 0, then k = c. Note: c is allowed to take
-         * negative values. We discourage the use of this procedure.    
-         */
+        * Advances the state of the stream by k values, without modifying the states of other streams (as
+        * in RngStream_SetSeed), nor the values of Bg and Ig associated with this stream. If e > 0, then
+        * k = 2e + c; if e < 0, then k = -2-e + c; and if e = 0, then k = c. Note: c is allowed to take
+        * negative values. We discourage the use of this procedure.     
+        */
        public native void advanceState(int e, int g);
-       
+
        /**
         * Returns a (pseudo)random number from the uniform distribution over the interval (0, 1), after advancing the state by one step. The returned number has 32 bits of precision
         * in the sense that it is always a multiple of 1/(232 - 208), unless RngStream_IncreasedPrecis
@@ -105,7 +105,7 @@ public class RngStream {
         * {i, i + 1, . . . , j}
         */
        public native int randInt(int i, int j);
-       
+
        /**
         * Class initializer, to initialize various JNI stuff
         */
index f8e4e14..d74a8bc 100644 (file)
@@ -12,73 +12,73 @@ package org.simgrid.msg;
  */
 
 public class Semaphore {
-    private long bind; // The C object -- don't touch it
-    /**
-     * Semaphore capacity, defined when the semaphore is created. At most capacity 
-     * process can acquire this semaphore at the same time.
-     */
-    protected final int capacity;
-    /**
-     * Creates a new semaphore with the given capacity. At most capacity 
-     * process can acquire this semaphore at the same time.
-     */
-    public Semaphore(int capacity) {
-       init(capacity);
-       this.capacity = capacity;
-    }
-    /** The native implementation of semaphore initialization
-     */
-    private native void init(int capacity);
+       private long bind; // The C object -- don't touch it
+       /**
+        * Semaphore capacity, defined when the semaphore is created. At most capacity 
+        * process can acquire this semaphore at the same time.
+        */
+       protected final int capacity;
+       /**
+        * Creates a new semaphore with the given capacity. At most capacity 
+        * process can acquire this semaphore at the same time.
+        */
+       public Semaphore(int capacity) {
+               init(capacity);
+               this.capacity = capacity;
+       }
+       /** The native implementation of semaphore initialization
+        */
+       private native void init(int capacity);
 
 
-    /** Locks on the semaphore object until the provided timeout expires
-     * @exception TimeoutException if the timeout expired before 
-     *            the semaphore could be acquired.
-     */
-    public native void acquire(double timeout) throws TimeoutException;
-    /** Locks on the semaphore object with no timeout
-     */
-    public void acquire() {
-       try {
-           acquire(-1);
-       } catch (TimeoutException e) {
-           // This should not happen.
-           assert(false);
+       /** Locks on the semaphore object until the provided timeout expires
+        * @exception TimeoutException if the timeout expired before 
+        *            the semaphore could be acquired.
+        */
+       public native void acquire(double timeout) throws TimeoutException;
+       /** Locks on the semaphore object with no timeout
+        */
+       public void acquire() {
+               try {
+                       acquire(-1);
+               } catch (TimeoutException e) {
+                       // This should not happen.
+                       assert(false);
+               }
        }
-    }
-    /** Releases the semaphore object
-     */
-    public native void release();
-    /** returns a boolean indicating it this semaphore would block at this very specific time
-     *
-     * Note that the returned value may be wrong right after the
-     * function call, when you try to use it...  But that's a
-     * classical semaphore issue, and SimGrid's semaphores are not
-     * different to usual ones here.
-     */
-    public native boolean wouldBlock();
+       /** Releases the semaphore object
+        */
+       public native void release();
+       /** returns a boolean indicating it this semaphore would block at this very specific time
+        *
+        * Note that the returned value may be wrong right after the
+        * function call, when you try to use it...  But that's a
+        * classical semaphore issue, and SimGrid's semaphores are not
+        * different to usual ones here.
+        */
+       public native boolean wouldBlock();
 
-    /** Returns the semaphore capacity
-     */
-    public int getCapacity(){
-       return this.capacity;
-    }
+       /** Returns the semaphore capacity
+        */
+       public int getCapacity(){
+               return this.capacity;
+       }
 
 
-    /** Deletes this semaphore 
-     */
-    protected void finalize() {
-       destroy();
-    }
-    /** The native implementation for destroying a semaphore
-     */
-    private native void destroy();
-    /**
-     * Class initializer, to initialize various JNI stuff
-     */
-    public static native void nativeInit();
-    static {
-       Msg.nativeInit();
-       nativeInit();
-    }
+       /** Deletes this semaphore 
+        */
+       protected void finalize() {
+               destroy();
+       }
+       /** The native implementation for destroying a semaphore
+        */
+       private native void destroy();
+       /**
+        * Class initializer, to initialize various JNI stuff
+        */
+       public static native void nativeInit();
+       static {
+               Msg.nativeInit();
+               nativeInit();
+       }
 }
\ No newline at end of file
index 9f5a45a..1b79501 100644 (file)
@@ -16,7 +16,7 @@ public class Storage {
         * access to it.
         */ 
        private long bind;
-       
+
        /**
         * Storage name
         */
@@ -26,19 +26,19 @@ public class Storage {
         * User data.
         */ 
        private Object data;
-    /**
-     *
-     */
-    protected Storage() {
+       /**
+        *
+        */
+       protected Storage() {
                this.bind = 0;
                this.data = null;
        };
-       
+
        public String toString (){
                return this.name; 
-               
+
        }
-       
+
        /**
         * This static method gets a storage instance associated with a native
         * storage of your platform. This is the best way to get a java storage object.
@@ -46,11 +46,11 @@ public class Storage {
         * @param name          The name of the storage to get.
         *
         * @return              The storage object with the given name.
-     * @exception              StorageNotFoundException if the name of the storage is not valid.
+        * @exception           StorageNotFoundException if the name of the storage is not valid.
         *                                      NativeException if the native version of this method failed.
         */ 
        public native static Storage getByName(String name) 
-       throws HostNotFoundException, NullPointerException;
+                       throws HostNotFoundException, NullPointerException;
 
        /**
         * This method returns the name of a storage.
@@ -60,7 +60,7 @@ public class Storage {
        public String getName() {
                return name;
        }
-       
+
        /**
         * This method returns the size (in bytes) of a storage element.
         *
@@ -76,7 +76,7 @@ public class Storage {
         *
         */ 
        public native long getFreeSize();
-       
+
        /**
         * This method returns the used size (in bytes) of a storage element.
         *
@@ -84,18 +84,18 @@ public class Storage {
         *
         */ 
        public native long getUsedSize();
-       
+
        /**
         * Returns the value of a given storage property. 
         */
        public native String getProperty(String name);
-       
+
        /**
         * Change the value of a given storage property. 
         */
        public native void setProperty(String name, String value);
-       
-       
+
+
        /** 
         *
         * Returns the host name the storage is attached to
@@ -103,7 +103,7 @@ public class Storage {
         * @return      the host name the storage is attached to
         */
        public native String getHost();
-       
+
        /**
         * This static method returns all of the storages of the installed platform.
         *
@@ -111,7 +111,7 @@ public class Storage {
         *
         */ 
        public native static Storage[] all();
-       
+
        /**
         * Class initializer, to initialize various JNI stuff
         */
@@ -119,5 +119,5 @@ public class Storage {
        static {
                nativeInit();
        }               
-       
+
 }
\ No newline at end of file
index 4be7046..95893ec 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -25,16 +25,10 @@ public class Task {
 
        private double messageSize;
 
-       static private Long idCpt = 0L;
-
-       private Long id;
-
        /** Default constructor (all fields to 0 or null) */
        public Task() {
                create(null, 0, 0);
                this.messageSize = 0;
-               setId(idCpt);
-               idCpt++;
        }
 
        /* *              * *
@@ -46,19 +40,17 @@ public class Task {
         *
         * @param name  Task's name
         *
-        * @param computeDuration       A value of the processing amount (in flop) needed to process the task. 
+        * @param flopsAmount   A value of the processing amount (in flop) needed to process the task. 
         *                              If 0, then it cannot be executed with the execute() method.
         *                              This value has to be >= 0.
         *
-        * @param messageSize           A value of amount of data (in bytes) needed to transfert this task.
+        * @param bytesAmount           A value of amount of data (in bytes) needed to transfert this task.
         *                              If 0, then it cannot be transfered with the get() and put() methods.
         *                              This value has to be >= 0.
         */ 
-       public Task(String name, double computeDuration, double messageSize) {
-               create(name, computeDuration, messageSize);
-               this.messageSize = messageSize;
-               setId(idCpt);
-               idCpt++;
+       public Task(String name, double flopsAmount, double bytesAmount) {
+               create(name, flopsAmount, bytesAmount);
+               this.messageSize = bytesAmount;
        }
        /**
         * Construct an new parallel task with the specified processing amount and amount for each host
@@ -66,73 +58,67 @@ public class Task {
         *
         * @param name          The name of the parallel task.
         * @param hosts         The list of hosts implied by the parallel task.
-        * @param computeDurations      The amount of operations to be performed by each host of \a hosts.
-        * @param messageSizes  A matrix describing the amount of data to exchange between hosts.
+        * @param flopsAmount   The amount of operations to be performed by each host of \a hosts.
+        * @param bytesAmount   A matrix describing the amount of data to exchange between hosts.
         */ 
-       public Task(String name, Host[]hosts, double[]computeDurations, double[]messageSizes) {
-               parallelCreate(name, hosts, computeDurations, messageSizes);
+       public Task(String name, Host[]hosts, double[]flopsAmount, double[]bytesAmount) {
+               parallelCreate(name, hosts, flopsAmount, bytesAmount);
        }
-       
+
        /**
         * The natively implemented method to create a MSG task.
         *
         * @param name            The name of th task.
-        * @param computeDuration    A value of the processing amount (in flop) needed 
+        * @param flopsAmount    A value of the processing amount (in flop) needed 
         *                        to process the task. If 0, then it cannot be executed
         *                        with the execute() method. This value has to be >= 0.
-        * @param messageSize        A value of amount of data (in bytes) needed to transfert 
+        * @param bytesAmount        A value of amount of data (in bytes) needed to transfert 
         *                        this task. If 0, then it cannot be transfered this task. 
         *                        If 0, then it cannot be transfered with the get() and put() 
         *                        methods. This value has to be >= 0.
         * @exception             IllegalArgumentException if compute duration <0 or message size <0
         */
        private final native void create(String name,
-                       double computeDuration,
-                       double messageSize)
-       throws IllegalArgumentException;                
+                       double flopsAmount,
+                       double bytesAmount)
+                                       throws IllegalArgumentException;                
        /**
         * The natively implemented method to create a MSG parallel task.
         *
         * @param name                The name of the parallel task.
         * @param hosts                The list of hosts implied by the parallel task.
-        * @param computeDurations    The total number of operations that have to be performed
+        * @param flopsAmount         The total number of operations that have to be performed
         *                            on the hosts.
-        * @param messageSizes        An array of doubles
+        * @param bytesAmount        An array of doubles
         *
         */
        private final native void parallelCreate(String name,
                        Host[]hosts,
-                       double[]computeDurations,
-                       double[]messageSizes)
-       throws NullPointerException, IllegalArgumentException;
+                       double[]flopsAmount,
+                       double[]bytesAmount)
+                                       throws NullPointerException, IllegalArgumentException;
        /* *                   * *
         * * Getters / Setters * *
         * *                   * */
-    /** 
-     * Gets the name of a task
-     */
+       /** Gets the name of a task */
        public String getName() {
                return name;
        }
-       /**
-        * Gets the sender of the task 
-        * Returns null if the task hasn't been sent yet
-        */
+
+       /** Gets the sender of the task (or null if not sent yet) */
        public native Process getSender();
-       /** Gets the source of the task.
-        * Returns null if the task hasn't been sent yet.
-     */
+
+       /** Gets the source of the task (or null if not sent yet). */
        public native Host getSource();   
-       /** Gets the computing amount of the task
-     * FIXME: Cache it !
-     */
-       public native double getComputeDuration();
-       /** Gets the remaining computation of the task
-     */
-       public native double getRemainingDuration();
+
+       /** Gets the remaining amount of flops to execute in this task
+        * 
+        * If it's ongoing, you get the exact amount at the present time. If it's already done, it's 0.
+        */
+       public native double getFlopsAmount();
        /**
         * Sets the name of the task
-        * @param name the new task name.c
+        * @param name the new task name
         */
        public native void setName(String name);
        /**
@@ -144,37 +130,37 @@ public class Task {
         * @param priority      The new priority of the task.
         */ 
        public native void setPriority(double priority);
-       /**
-        * Set the computation amount needed to process the task
-        * @param computationAmount the amount of computation needed to process the task
+
+       /** Set the computation amount needed to process the task
+        * 
+        * Warning if the execution is already started and ongoing, this call does nothing.
+        * @param flopsAmount the amount of computation needed to process the task
         */
-       public native void setComputeDuration(double computationAmount);
+       public native void setFlopsAmount(double flopsAmount);
        /**
-        * Set the data size of the task
-        * @param dataSize the size of the task
+        * Set the amount of bytes to exchange the task
+        * 
+        * Warning if the communication is already started and ongoing, this call does nothing.
+        * @param bytesAmount the size of the task
         */
-       public native void setDataSize(double dataSize);
+       public native void setBytesAmount(double bytesAmount);
        /* *                     * *
         * * Computation-related * *
         * *                     * */
        /**
-        * Executes a task on the location on which the process is running.
-        *
-     *
-     * @throws HostFailureException
-     * @throws TaskCancelledException
-     */
-       public native void execute() throws HostFailureException,TaskCancelledException;
-       /**
-        * Bound a computation to a certain load
+        * Executes a task on the location on which the current process is running.
         *
+        * @throws HostFailureException
+        * @throws TaskCancelledException
         */
+       public native void execute() throws HostFailureException,TaskCancelledException;
+
+       /** Bound a computation to a certain load */
        public native void setBound(double load); 
-       /**
-        * Cancels a task.
-        *
-        */ 
+
+       /** Cancels a task. */ 
        public native void cancel();
+
        /** Deletes a task.
         *
         * @exception                   NativeException if the destruction failed.
@@ -190,24 +176,24 @@ public class Task {
         * * Communication-related * *
         * *                       * */
 
-       /** Send the task asynchronously on the mailbox identified by the specified name
+       /** Send the task asynchronously on the specified mailbox
         *  with no way to retrieve whether the communication succeeded or not
         * 
         */
        public native void dsendBounded(String mailbox, double maxrate);
 
 
-       /** Send the task asynchronously on the mailbox identified by the specified name
+       /** Send the task asynchronously on the specified mailbox
         *  with no way to retrieve whether the communication succeeded or not
         * 
         */
        public native void dsend(String mailbox);
-       
+
        /**
-        * Sends the task on the mailbox identified by the specified name 
+        * Sends the task on the specified mailbox 
         *
-     * @param mailbox
-     * @throws TimeoutException
+        * @param mailbox where to send the message
+        * @throws TimeoutException
         * @throws HostFailureException 
         * @throws TransferFailureException 
         */
@@ -216,41 +202,40 @@ public class Task {
        } 
 
        /**
-        * Sends the task on the mailbox identified by the specified name (wait at most \a timeout seconds)
+        * Sends the task on the specified mailbox (wait at most \a timeout seconds)
         *
-     * @param mailbox
-     * @param timeout
-     * @exception  NativeException if the retrieval fails.
+        * @param mailbox where to send the message
+        * @param timeout
+        * @exception  NativeException if the retrieval fails.
         * @throws TimeoutException 
         * @throws HostFailureException 
         * @throws TransferFailureException 
         */
        public native void send(String mailbox, double timeout) throws TransferFailureException, HostFailureException, TimeoutException;
-       /**
-        * Sends the task on the mailbox identified by the specified alias  (capping the sending rate to \a maxrate) 
+
+       /** Sends the task on the specified mailbox (capping the sending rate to \a maxrate) 
         *
-     * @param alias
-     * @param maxrate 
-     * @throws TransferFailureException
-     * @throws HostFailureException
-     * @throws TimeoutException
+        * @param mailbox where to send the message
+        * @param maxrate 
+        * @throws TransferFailureException
+        * @throws HostFailureException
+        * @throws TimeoutException
         */
-       public void sendBounded(String alias, double maxrate) throws TransferFailureException, HostFailureException, TimeoutException {
-              sendBounded(alias,-1,maxrate);
-        }
+       public void sendBounded(String mailbox, double maxrate) throws TransferFailureException, HostFailureException, TimeoutException {
+               sendBounded(mailbox,-1,maxrate);
+       }
 
 
-/**
-        * Sends the task on the mailbox identified by the specified alias  (capping the sending rate to \a maxrate) with a timeout
+       /** Sends the task on the specified mailbox (capping the sending rate to \a maxrate) with a timeout
         *
-     * @param alias
-     * @param timeout
-     * @param maxrate 
-     * @throws TransferFailureException
-     * @throws HostFailureException
-     * @throws TimeoutException
+        * @param mailbox where to send the message
+        * @param timeout
+        * @param maxrate 
+        * @throws TransferFailureException
+        * @throws HostFailureException
+        * @throws TimeoutException
         */
-       public native void sendBounded(String alias, double timeout, double maxrate) throws TransferFailureException, HostFailureException, TimeoutException;
+       public native void sendBounded(String mailbox, double timeout, double maxrate) throws TransferFailureException, HostFailureException, TimeoutException;
 
 
        /**
@@ -262,7 +247,7 @@ public class Task {
         * Sends the task on the mailbox asynchronously (capping the sending rate to \a maxrate)
         */
        public native Comm isendBounded(String mailbox, double maxrate);
-       
+
 
        /**
         * Starts listening for receiving a task from an asynchronous communication
@@ -272,7 +257,7 @@ public class Task {
        /**
         * Retrieves next task from the mailbox identified by the specified name
         *
-     * @param mailbox
+        * @param mailbox
         */
 
        public static Task receive(String mailbox) throws TransferFailureException, HostFailureException, TimeoutException {
@@ -282,8 +267,8 @@ public class Task {
        /**
         * Retrieves next task on the mailbox identified by the specified name (wait at most \a timeout seconds)
         *
-     * @param mailbox
-     * @param timeout
+        * @param mailbox
+        * @param timeout
         */
        public static Task receive(String mailbox, double timeout) throws  TransferFailureException, HostFailureException, TimeoutException {
                return receive(mailbox, timeout, null);
@@ -292,8 +277,8 @@ public class Task {
        /**
         * Retrieves next task sent by a given host on the mailbox identified by the specified alias 
         *
-     * @param mailbox
-     * @param host
+        * @param mailbox
+        * @param host
         */
 
        public static Task receive(String mailbox, Host host) throws TransferFailureException, HostFailureException, TimeoutException {
@@ -303,9 +288,9 @@ public class Task {
        /**
         * Retrieves next task sent by a given host on the mailbox identified by the specified alias (wait at most \a timeout seconds)
         *
-     * @param mailbox
-     * @param timeout 
-     * @param host
+        * @param mailbox
+        * @param timeout 
+        * @param host
         */
        public native static Task receive(String mailbox, double timeout, Host host) throws TransferFailureException, HostFailureException, TimeoutException;
 
@@ -317,7 +302,7 @@ public class Task {
        /**
         * Retrieves next task from the mailbox identified by the specified name with a capped rate
         *
-     * @param mailbox
+        * @param mailbox
         */
 
        public static Task receiveBounded(String mailbox, double rate) throws TransferFailureException, HostFailureException, TimeoutException {
@@ -327,8 +312,8 @@ public class Task {
        /**
         * Retrieves next task on the mailbox identified by the specified name (wait at most \a timeout seconds) with a capped rate
         *
-     * @param mailbox
-     * @param timeout
+        * @param mailbox
+        * @param timeout
         */
        public static Task receiveBounded(String mailbox, double timeout, double rate) throws  TransferFailureException, HostFailureException, TimeoutException {
                return receiveBounded(mailbox, timeout, null, rate);
@@ -337,8 +322,8 @@ public class Task {
        /**
         * Retrieves next task sent by a given host on the mailbox identified by the specified alias with a capped rate
         *
-     * @param mailbox
-     * @param host
+        * @param mailbox
+        * @param host
         */
 
        public static Task receiveBounded(String mailbox, Host host, double rate) throws TransferFailureException, HostFailureException, TimeoutException {
@@ -349,28 +334,28 @@ public class Task {
         * Retrieves next task sent by a given host on the mailbox identified by the specified alias (wait at most \a timeout seconds)
         * with a capped rate
         *
-     * @param mailbox
-     * @param timeout 
-     * @param host
+        * @param mailbox
+        * @param timeout 
+        * @param host
         */
        public native static Task receiveBounded(String mailbox, double timeout, Host host, double rate) throws TransferFailureException, HostFailureException, TimeoutException;
 
-       
-       
+
+
        /**
         * Tests whether there is a pending communication on the mailbox identified by the specified alias, and who sent it
-     */
+        */
        public native static int listenFrom(String mailbox);
        /**
         * Listen whether there is a waiting task on the mailbox identified by the specified alias
-     */
+        */
        public native static boolean listen(String mailbox);
 
        /**
         * Counts the number of tasks waiting to be received on the \a mailbox identified by the specified alia and sended by the specified \a host.
-     */
+        */
        public native static int listenFromHost(String alias, Host host);
-       
+
        /**
         * Class initializer, to initialize various JNI stuff
         */
@@ -383,12 +368,4 @@ public class Task {
        public double getMessageSize() {
                return this.messageSize;
        }
-
-       public Long getId() {
-               return id;
-       }
-
-       public void setId(Long id) {
-               this.id = id;
-       }
 }
index ac8a512..c6a5220 100644 (file)
@@ -8,22 +8,20 @@
 
 package org.simgrid.msg;
 
-import org.simgrid.msg.Host;
-import org.simgrid.msg.Process;
 
 public class VM extends Host{
        // Please note that we are not declaring a new bind variable 
        //(the bind variable has been inherited from the super class Host)
-       
+
        /* Static functions */ 
        // GetByName is inherited from the super class Host
-       
 
-        private static VM[] vms=null;    
-    private Host currentHost; 
+
+       private static VM[] vms=null;     
+       private Host currentHost; 
 
        /* Constructors / destructors */
-    /**
+       /**
         * Create a `basic' VM (i.e. 1 core, 1GB of RAM, other values are not taken into account).
         */
        public VM(Host host, String name) {
@@ -53,41 +51,41 @@ public class VM extends Host{
 
        private static void addVM(VM vm){
                VM[] vmsN=null; 
-               int i=0;
+               int i=0;
                if(VM.vms == null)
                        vmsN = new VM[1]; 
                else
                        vmsN = new VM[vms.length+1]; 
-               
+
                for (i=0; i<vmsN.length-1 ; i ++){
                        vmsN[i]=vms[i]; 
                } 
                vmsN[i]=vm;
                vms=vmsN;
        }
-   public static VM[] all(){
+       public static VM[] all(){
                return vms;
        }
        public static VM getVMByName(String name){
                for (int i=0 ; i < vms.length ; i++){
-                         if (vms[i].getName().equals(name))
-                                       return vms[i];          
+                       if (vms[i].getName().equals(name))
+                               return vms[i];          
                }
                return null; 
        }
        protected void finalize() {
                destroy();
        }
-       
+
 
        /* JNI / Native code */
 
        /* get/set property methods are inherited from the Host class. */
-       
+
        /** Returns whether the given VM is currently suspended
         */     
        public native int isCreated();
-       
+
        /** Returns whether the given VM is currently running
         */
        public native int isRunning();
@@ -95,15 +93,15 @@ public class VM extends Host{
        /** Returns whether the given VM is currently running
         */
        public native int isMigrating();
-       
+
        /** Returns whether the given VM is currently suspended
         */     
        public native int isSuspended();
-               
+
        /** Returns whether the given VM is currently saving
         */
        public native int isSaving();
-       
+
        /** Returns whether the given VM is currently saved
         */
        public native int isSaved();
@@ -111,7 +109,7 @@ public class VM extends Host{
        /** Returns whether the given VM is currently restoring its state
         */
        public native boolean isRestoring();
-       
+
        /**
         * Natively implemented method create the VM.
         * @param nCore number of core
@@ -123,7 +121,7 @@ public class VM extends Host{
         * @param dpIntensity (dirty page intensity, a percentage of migNetSpeed [0-100],  if you don't know put zero ;))
         */
        private native void create(Host host, String name, int nCore, int ramSize, 
-                        int netCap, String diskPath, int diskSize, int migNetSpeed, int dpIntensity);
+                       int netCap, String diskPath, int diskSize, int migNetSpeed, int dpIntensity);
 
 
        /**
@@ -137,20 +135,20 @@ public class VM extends Host{
         */
        public native void start();
 
-       
+
        /**
         * Immediately kills all processes within the given VM. Any memory that they allocated will be leaked.
         * No extra delay occurs. If you want to simulate this too, you want to use a MSG_process_sleep() or something
         */
        public native void shutdown();
-       
+
        /**  
         * Invoke native migration routine
-       */
+        */
        public native void internalmig(Host destination) throws Exception; // TODO add throws DoubleMigrationException (i.e. when you call migrate on a VM that is already migrating);
 
 
-       
+
        /** Change the host on which all processes are running
         * (pre-copy is implemented)
         */     
@@ -164,7 +162,7 @@ public class VM extends Host{
                // If the migration correcly returned, then we should change the currentHost value. 
                this.currentHost = destination; 
        }
-       
+
        /** Immediately suspend the execution of all processes within the given VM
         *
         * No suspension cost occurs. If you want to simulate this too, you want to
@@ -172,7 +170,7 @@ public class VM extends Host{
         * of VM suspend to you.
         */     
        public native void suspend();
-       
+
        /** Immediately resumes the execution of all processes within the given VM
         *
         * No resume cost occurs. If you want to simulate this too, you want to
@@ -180,7 +178,7 @@ public class VM extends Host{
         * of VM resume to you.
         */
        public native void resume();
-       
+
        /** Immediately suspend the execution of all processes within the given VM 
         *  and save its state on the persistent HDD
         *  Not yet implemented (for the moment it behaves like suspend)
@@ -189,7 +187,7 @@ public class VM extends Host{
         *  of VM suspend to you.
         */     
        public native void save();
-       
+
        /** Immediately resumes the execution of all processes previously saved 
         * within the given VM
         *  Not yet implemented (for the moment it behaves like resume)
@@ -199,14 +197,14 @@ public class VM extends Host{
         * of VM resume to you.
         */
        public native void restore();
-       
+
 
        /**
         * Destroy the VM
         */
        public native void destroy();
 
-       
+
 
        /**
         * Class initializer, to initialize various JNI stuff
index 425f708..4892ac3 100644 (file)
@@ -17,7 +17,7 @@ public final class Trace {
        }
 
        // TODO complete the binding of the tracing API 
-       
+
 
        /**
         * Declare a new user variable associated to hosts with a color. 
@@ -26,8 +26,8 @@ public final class Trace {
         * @param color
         */
        public final static native      void hostVariableDeclareWithColor (String variable, String color);
-       
-       
+
+
        /**
         *  Add a value to a variable of a host. 
         *  
@@ -47,8 +47,8 @@ public final class Trace {
        public final static native      void hostVariableSub (String host, String variable, double value);
 
        /**
-        * Set the value of a variable of a host at a given timestamp. 
-        * 
+        * Set the value of a variable of a host at a given timestamp. 
+        * 
         * @param time
         * @param host
         * @param variable
@@ -64,178 +64,178 @@ public final class Trace {
         * @param variable
         * @param value
         */
-       public final static native      void hostVariableAddWithTime (double time, String host, String variable, double value);
-       /**
-        * Subtract a value from a variable of a host at a given timestamp.  
-        * 
-        * @param time
-        * @param host
-        * @param variable
-        * @param value
-        */
-       public final static native      void hostVariableSubWithTime (double time, String host, String variable, double value);
-
-       /**
-        *  Get declared user host variables. 
-        * 
-        */
-       public final static native String[]  getHostVariablesName ();
-
-       /**
-        *  Declare a new user variable associated to links. 
-        *  
-        * @param variable
-        */
-       public final static native      void linkVariableDeclare (String variable);
-
-       /**
-        * Declare a new user variable associated to links with a color. 
-        * @param variable
-        * @param color
-        */
-       public final static native      void linkVariableDeclareWithColor (String variable, String color);
-
-       /**
-        *  Set the value of a variable of a link. 
-        *   
-        * @param link
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkVariableSet (String link, String variable, double value);
-
-       /**
-        * Add a value to a variable of a link. 
-        * 
-        * @param link
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkVariableAdd (String link, String variable, double value);
-       /**
-        * Subtract a value from a variable of a link. 
-        * 
-        * @param link
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkVariableSub (String link, String variable, double value);
-
-       /**
-        *  Set the value of a variable of a link at a given timestamp. 
-        *  
-        * @param time
-        * @param link
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkVariableSetWithTime (double time, String link, String variable, double value);
-
-       /**
-        * Add a value to a variable of a link at a given timestamp.
-        * 
+       public final static native      void hostVariableAddWithTime (double time, String host, String variable, double value);
+
+       /**
+        * Subtract a value from a variable of a host at a given timestamp.  
+        * 
         * @param time
-        * @param link
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkVariableAddWithTime (double time, String link, String variable, double value);
-
-       /**
-        * Subtract a value from a variable of a link at a given timestamp. 
-        *   
-        * @param time
-        * @param link
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkVariableSubWithTime (double time, String link, String variable, double value);
-
-       /**
-        * Set the value of the variable present in the links connecting source and destination. 
-        * 
-        * @param src
-        * @param dst
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkSrcDstVariableSet (String src, String dst, String variable, double value);
-       /**
-        * Add a value to the variable present in the links connecting source and destination. 
-        *  
-        * @param src
-        * @param dst
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkSrcDstVariableAdd (String src, String dst, String variable, double value);
-
-       /**
-        * Subtract a value from the variable present in the links connecting source and destination. 
-        *   
-        * @param src
-        * @param dst
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkSrcDstVariableSub (String src, String dst, String variable, double value);
-
-       /**
-        *  Set the value of the variable present in the links connecting source and destination at a given timestamp. 
-        *   
-        * @param time
-        * @param src
-        * @param dst
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkSrcDstVariableSetWithTime (double time, String src, String dst, String variable, double value);
-
-       /**
-        * Add a value to the variable present in the links connecting source and destination at a given timestamp. 
-        * 
-        * @param time
-        * @param src
-        * @param dst
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkSrcdstVariableAddWithTime (double time, String src, String dst, String variable, double value);
-       /**
-        * Subtract a value from the variable present in the links connecting source and destination at a given timestamp. 
-        *  
-        * @param time
-        * @param src
-        * @param dst
-        * @param variable
-        * @param value
-        */
-       public final static native      void linkSrcDstVariableSubWithTime (double time, String src, String dst, String variable, double value);
-
-       /**
-        *  Get declared user link variables.  
-        */
+        * @param host
+        * @param variable
+        * @param value
+        */
+       public final static native      void hostVariableSubWithTime (double time, String host, String variable, double value);
+
+       /**
+        *  Get declared user host variables. 
+        * 
+        */
+       public final static native String[]  getHostVariablesName ();
+
+       /**
+        *  Declare a new user variable associated to links. 
+        *  
+        * @param variable
+        */
+       public final static native      void linkVariableDeclare (String variable);
+
+       /**
+        * Declare a new user variable associated to links with a color. 
+        * @param variable
+        * @param color
+        */
+       public final static native      void linkVariableDeclareWithColor (String variable, String color);
+
+       /**
+        *  Set the value of a variable of a link. 
+        *   
+        * @param link
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkVariableSet (String link, String variable, double value);
+
+       /**
+        * Add a value to a variable of a link. 
+        * 
+        * @param link
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkVariableAdd (String link, String variable, double value);
+
+       /**
+        * Subtract a value from a variable of a link. 
+        * 
+        * @param link
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkVariableSub (String link, String variable, double value);
+
+       /**
+        *  Set the value of a variable of a link at a given timestamp. 
+        *  
+        * @param time
+        * @param link
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkVariableSetWithTime (double time, String link, String variable, double value);
+
+       /**
+        * Add a value to a variable of a link at a given timestamp.
+        * 
+        * @param time
+        * @param link
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkVariableAddWithTime (double time, String link, String variable, double value);
+
+
+       /**
+        * Subtract a value from a variable of a link at a given timestamp. 
+        *   
+        * @param time
+        * @param link
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkVariableSubWithTime (double time, String link, String variable, double value);
+
+       /**
+        * Set the value of the variable present in the links connecting source and destination. 
+        * 
+        * @param src
+        * @param dst
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkSrcDstVariableSet (String src, String dst, String variable, double value);
+
+       /**
+        * Add a value to the variable present in the links connecting source and destination. 
+        *  
+        * @param src
+        * @param dst
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkSrcDstVariableAdd (String src, String dst, String variable, double value);
+
+       /**
+        * Subtract a value from the variable present in the links connecting source and destination. 
+        *   
+        * @param src
+        * @param dst
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkSrcDstVariableSub (String src, String dst, String variable, double value);
+
+       /**
+        *  Set the value of the variable present in the links connecting source and destination at a given timestamp. 
+        *   
+        * @param time
+        * @param src
+        * @param dst
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkSrcDstVariableSetWithTime (double time, String src, String dst, String variable, double value);
+
+       /**
+        * Add a value to the variable present in the links connecting source and destination at a given timestamp. 
+        * 
+        * @param time
+        * @param src
+        * @param dst
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkSrcdstVariableAddWithTime (double time, String src, String dst, String variable, double value);
+
+       /**
+        * Subtract a value from the variable present in the links connecting source and destination at a given timestamp. 
+        *  
+        * @param time
+        * @param src
+        * @param dst
+        * @param variable
+        * @param value
+        */
+       public final static native      void linkSrcDstVariableSubWithTime (double time, String src, String dst, String variable, double value);
+
+       /**
+        *  Get declared user link variables.  
+        */
        public final static native String[] getLinkVariablesName ();
 
-       
-                       /* **** ******** WARNINGS ************** ***** */       
-                       /* Only the following routines have been       */
-                       /* JNI implemented - Adrien May, 22nd          */
-                       /* **** ******************************** ***** */       
-               
-    /**
-     * Declare a user state that will be associated to hosts. 
-     * A user host state can be used to trace application states.
-     * 
-     * @param name The name of the new state to be declared.
-     */
+
+       /* **** ******** WARNINGS ************** ***** */       
+       /* Only the following routines have been       */
+       /* JNI implemented - Adrien May, 22nd          */
+       /* **** ******************************** ***** */       
+
+       /**
+        * Declare a user state that will be associated to hosts. 
+        * A user host state can be used to trace application states.
+        
+        * @param name The name of the new state to be declared.
+        */
        public final static native void hostStateDeclare(String name);
-       
+
        /**
         * Declare a new value for a user state associated to hosts.
         * The color needs to be a string with three numbers separated by spaces in the range [0,1]. 
@@ -255,24 +255,24 @@ public final class Trace {
         * @param state The name of the state previously declared.
         * @param value The new value of the state.
         */
-       public final static native void hostSetState (String host, String state, String value);
-       /**
-        * Push a new value for a state of a given host. 
-        * 
-        * @param host The name of the host to be considered.
-        * @param state The name of the state previously declared.
-        * @param value The value to be pushed.
-        */
-       public final static native void hostPushState (String host, String state, String value);
-       
-       /**
-        *  Pop the last value of a state of a given host. 
-        *   
-        * @param host The name of the host to be considered.
-        * @param state The name of the state to be popped.
-        */
-       public final static native void hostPopState (String host, String state);
+       public final static native void hostSetState (String host, String state, String value);
+
+       /**
+        * Push a new value for a state of a given host. 
+        * 
+        * @param host The name of the host to be considered.
+        * @param state The name of the state previously declared.
+        * @param value The value to be pushed.
+        */
+       public final static native void hostPushState (String host, String state, String value);
+
+       /**
+        *  Pop the last value of a state of a given host. 
+        *   
+        * @param host The name of the host to be considered.
+        * @param state The name of the state to be popped.
+        */
+       public final static native void hostPopState (String host, String state);
 
        /**
         * Declare a new user variable associated to hosts. 
@@ -280,7 +280,7 @@ public final class Trace {
         * @param variable
         */
        public final static native      void hostVariableDeclare (String variable);
+
 
        /**
         * Set the value of a variable of a host. 
@@ -297,7 +297,7 @@ public final class Trace {
         * @param variable
         */
        public final static native      void vmVariableDeclare (String variable);
+
 
        /**
         * Set the value of a variable of a VM. 
index e551413..ab9cf56 100644 (file)
@@ -7,7 +7,7 @@
 /* SimGrid Lua bindings                                                     */
 
 #include "simgrid_lua.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 
 void sglua_register_task_functions(lua_State* L);
 msg_task_t sglua_check_task(lua_State* L, int index);
index 41c744e..38828db 100644 (file)
@@ -112,7 +112,7 @@ static int l_task_get_name(lua_State* L)
 static int l_task_get_computation_duration(lua_State* L)
 {
   msg_task_t task = sglua_check_task(L, 1);
-  lua_pushnumber(L, MSG_task_get_compute_duration(task));
+  lua_pushnumber(L, MSG_task_get_flops_amount(task));
   return 1;
 }
 
index 2098267..10af0b9 100644 (file)
@@ -10,8 +10,8 @@
 #include "lua_state_cloner.h"
 #include "lua_utils.h"
 #include "xbt.h"
-#include "msg/msg.h"
-#include "simdag/simdag.h"
+#include "simgrid/msg.h"
+#include "simgrid/simdag.h"
 #include "surf/surfxml_parse.h"
 #include <lauxlib.h>
 
index 2a5dc0a..b6a6e96 100644 (file)
@@ -288,7 +288,6 @@ XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst(lmm_system_t sys,
  * @brief Get a var associated to a constraint
  * @details Get the first variable of the next variable of elem if elem is not NULL
  *
- * @param sys The system associated to the variable (not used)
  * @param cnst A constraint
  * @param elem A element of constraint of the constraint or NULL
  * @param nextelem A element of constraint of the constraint or NULL, the one after elem
index c9f19e8..6a887bc 100644 (file)
@@ -271,16 +271,16 @@ XBT_PUBLIC(int) surf_model_running_action_set_size(surf_model_t model);
  * @param model The model which handle the parallelisation
  * @param workstation_nb The number of workstations
  * @param workstation_list The list of workstations on which the task is executed
- * @param computation_amount The processing amount (in flop) needed to process
- * @param communication_amount The amount of data (in bytes) needed to transfer
+ * @param flops_amount The processing amount (in flop) needed to process
+ * @param bytes_amount The amount of data (in bytes) needed to transfer
  * @param rate [description]
  * @return The action corresponding to the parallele execution task
  */
 XBT_PUBLIC(surf_action_t) surf_workstation_model_execute_parallel_task(surf_workstation_model_t model,
                                                    int workstation_nb,
                                             void **workstation_list,
-                                            double *computation_amount,
-                                            double *communication_amount,
+                                            double *flops_amount,
+                                            double *bytes_amount,
                                             double rate);
 
 /**
index 091799b..2db53d2 100644 (file)
@@ -8,8 +8,6 @@
 #include "simgrid/sg_config.h"
 #include "surf/surf.h"
 
-#ifdef HAVE_TRACING
-
 XBT_LOG_NEW_CATEGORY(instr, "Logging the behavior of the tracing system (used for Visualization/Analysis of simulations)");
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_config, instr, "Configuration");
 
@@ -820,5 +818,3 @@ void instr_resume_tracing (void)
 #undef OPT_TRACING_COMMENT_FILE
 #undef OPT_VIVA_UNCAT_CONF
 #undef OPT_VIVA_CAT_CONF
-
-#endif /* HAVE_TRACING */
index a2ff8b3..7fedc83 100644 (file)
@@ -6,7 +6,6 @@
 
 #include "simgrid_config.h"
 
-#ifdef HAVE_TRACING
 #include "instr/instr_private.h"
 #include "surf/surf.h"
 #include "surf/surf_private.h"
@@ -1164,5 +1163,3 @@ void TRACE_resume (void)
 {
   instr_resume_tracing();
 }
-
-#endif /* HAVE_TRACING */
index 3a7ce52..752649e 100644 (file)
@@ -9,8 +9,6 @@
 #include "surf/surf.h"
 #include "surf/surf_routing.h"
 
-#ifdef HAVE_TRACING
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_containers, instr, "Paje tracing event system (containers)");
 
 static container_t rootContainer = NULL;    /* the root container */
@@ -233,5 +231,3 @@ void PJ_container_free_all ()
     THROWF(tracing_error, 0, "some containers still present even after destroying all of them");
   }
 }
-
-#endif /* HAVE_TRACING */
index b4ca75a..38c2a74 100644 (file)
@@ -6,8 +6,6 @@
 
 #include "instr/instr_private.h"
 
-#ifdef HAVE_TRACING
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_header, instr, "Paje tracing event system (header)");
 
 extern FILE *tracing_file;
@@ -253,6 +251,3 @@ void TRACE_header(int basic, int size)
   TRACE_header_PajeEndLink (basic, size);
   TRACE_header_PajeNewEvent (basic, size);
 }
-
-#endif
-
index 32177de..791fdf7 100644 (file)
@@ -6,8 +6,6 @@
 
 #include "instr/instr_private.h"
 
-#ifdef HAVE_TRACING
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_types, instr, "Paje tracing event system (types)");
 
 static type_t rootType = NULL;        /* the root type */
@@ -196,5 +194,3 @@ type_t PJ_type_state_new (const char *name, type_t father)
   new_pajeDefineStateType(ret);
   return ret;
 }
-
-#endif
index 8e81a9f..31bf44d 100644 (file)
@@ -6,8 +6,6 @@
 
 #include "instr/instr_private.h"
 
-#ifdef HAVE_TRACING
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_values, instr, "Paje tracing event system (values)");
 
 val_t PJ_value_new (const char *name, const char *color, type_t father)
@@ -71,6 +69,3 @@ void PJ_value_free (val_t value)
   xbt_free(((val_t)value)->id);
   xbt_free(value);
 }
-
-
-#endif
index 2b56b6d..1f4b694 100644 (file)
@@ -7,13 +7,11 @@
 #ifndef INSTR_PRIVATE_H_
 #define INSTR_PRIVATE_H_
 
-#include "instr/instr.h"
+#include "simgrid/instr.h"
 #include "instr/instr_interface.h"
 #include "internal_config.h"
 #include "simgrid_config.h"
 
-#ifdef HAVE_TRACING
-
 SG_BEGIN_DECL()
 
 /* Need to define function drand48 for Windows */
@@ -466,8 +464,6 @@ typedef struct s_instr_extra_data {
 
 SG_END_DECL()
 
-#endif /* HAVE_TRACING */
-
 #ifdef HAVE_JEDULE
 #include "instr/jedule/jedule_sd_binding.h"
 #endif
index c3be529..fc39007 100644 (file)
@@ -6,8 +6,6 @@
 
 #include "instr/instr_private.h"
 
-#ifdef HAVE_TRACING
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_resource, instr, "tracing (un)-categorized resource utilization");
 
 //to check if variables were previously set to 0, otherwise paje won't simulate them
@@ -133,4 +131,3 @@ void TRACE_surf_resource_utilization_release()
 {
   xbt_dict_free(&platform_variables);
 }
-#endif /* HAVE_TRACING */
index 8481697..dfa616a 100644 (file)
@@ -7,8 +7,6 @@
 #include "instr/instr_private.h"
 #include "xbt/virtu.h" /* sg_cmdline */
 
-#ifdef HAVE_TRACING
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_trace, instr, "tracing event system");
 
 
@@ -494,5 +492,3 @@ void new_pajeNewEvent (double timestamp, container_t container, type_t type, val
 
   insert_into_buffer (event);
 }
-
-#endif /* HAVE_TRACING */
index 86b7e64..997aca0 100644 (file)
@@ -27,7 +27,7 @@
 #include "../xbt/mmalloc/mmprivate.h"
 #include "xbt/automaton.h"
 #include "xbt/hash.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "msg/datatypes.h"
 #include "xbt/strbuff.h"
 #include "xbt/parmap.h"
index 977c0b6..c2307ca 100644 (file)
@@ -5,12 +5,8 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "msg_private.h"
-
-#include "msg/datatypes.h"
 #include "simix/smx_process_private.h"
 
-#ifdef HAVE_TRACING
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_msg_process, instr, "MSG process");
 
 char *instr_process_id (msg_process_t proc, char *str, int len)
@@ -147,5 +143,3 @@ void TRACE_msg_process_end(msg_process_t process)
     PJ_container_free (container);
   }
 }
-
-#endif /* HAVE_TRACING */
index 4334eac..cc98733 100644 (file)
@@ -6,12 +6,8 @@
 
 #include "instr/instr_private.h"
 #include "msg_private.h"
-#include "msg/datatypes.h"
 #include "mc/mc.h"
 
-
-#ifdef HAVE_TRACING
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_msg, instr, "MSG");
 
 void TRACE_msg_set_task_category(msg_task_t task, const char *category)
@@ -157,5 +153,3 @@ void TRACE_msg_task_put_end(void)
     new_pajePopState (MSG_get_clock(), process_container, type);
   }
 }
-
-#endif /* HAVE_TRACING */
index 825b71b..5387c10 100644 (file)
@@ -6,7 +6,6 @@
 
 #include "msg_private.h"
 
-#ifdef HAVE_TRACING
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_msg_vm, instr, "MSG VM");
 
@@ -154,5 +153,3 @@ void TRACE_msg_vm_end(msg_vm_t vm)
     PJ_container_free (container);
   }
 }
-
-#endif /* HAVE_TRACING */
index 9511d5e..b9351e8 100644 (file)
@@ -37,9 +37,7 @@ static void _sg_cfg_cb_msg_debug_multiple_use(const char *name, int pos)
  */
 void MSG_init_nocheck(int *argc, char **argv) {
 
-#ifdef HAVE_TRACING
   TRACE_global_init(argc, argv);
-#endif
 
   xbt_getpid = MSG_process_self_PID;
   if (!msg_global) {
@@ -167,11 +165,8 @@ static void MSG_exit(void) {
   if (msg_global==NULL)
     return;
 
-#ifdef HAVE_TRACING
   TRACE_surf_resource_utilization_release();
   TRACE_end();
-#endif
-
   free(msg_global);
   msg_global = NULL;
 }
index b36b3eb..11218c9 100644 (file)
@@ -52,9 +52,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task)
   e_smx_state_t comp_state;
   msg_error_t status = MSG_OK;
 
-#ifdef HAVE_TRACING
   TRACE_msg_task_execute_start(task);
-#endif
 
   xbt_assert((!simdata->compute) && (task->simdata->isused == 0),
              "This task is executed somewhere else. Go fix your code! %d",
@@ -62,10 +60,8 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task)
 
   XBT_DEBUG("Computing on %s", MSG_process_get_name(MSG_process_self()));
 
-  if (simdata->computation_amount == 0 && !simdata->host_nb) {
-#ifdef HAVE_TRACING
+  if (simdata->flops_amount == 0 && !simdata->host_nb) {
     TRACE_msg_task_execute_end(task);
-#endif
     return MSG_OK;
   }
 
@@ -80,8 +76,8 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task)
       simdata->compute = simcall_host_parallel_execute(task->name,
                                                        simdata->host_nb,
                                                        simdata->host_list,
-                                                       simdata->comp_amount,
-                                                       simdata->comm_amount,
+                                                       simdata->flops_parallel_amount,
+                                                       simdata->bytes_parallel_amount,
                                                        1.0, -1.0);
       XBT_DEBUG("Parallel execution action created: %p", simdata->compute);
     } else {
@@ -90,16 +86,14 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task)
 
       simdata->compute = simcall_host_execute(task->name,
                                               p_simdata->m_host,
-                                              simdata->computation_amount,
+                                              simdata->flops_amount,
                                               simdata->priority,
                                               simdata->bound,
                                               affinity_mask
                                               );
 
     }
-#ifdef HAVE_TRACING
     simcall_set_category(simdata->compute, task->category);
-#endif
     p_simdata->waiting_action = simdata->compute;
     comp_state = simcall_host_execution_wait(simdata->compute);
 
@@ -127,12 +121,10 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task)
   }
   /* action ended, set comm and compute = NULL, the actions is already destroyed
    * in the main function */
-  simdata->computation_amount = 0.0;
+  simdata->flops_amount = 0.0;
   simdata->comm = NULL;
   simdata->compute = NULL;
-#ifdef HAVE_TRACING
   TRACE_msg_task_execute_end(task);
-#endif
 
   MSG_RETURN(status);
 }
@@ -151,17 +143,7 @@ msg_error_t MSG_process_sleep(double nb_sec)
   msg_error_t status = MSG_OK;
   /*msg_process_t proc = MSG_process_self();*/
 
-#ifdef HAVE_TRACING
   TRACE_msg_process_sleep_in(MSG_process_self());
-#endif
-
-  /* create action to sleep */
-
-  /*proc->simdata->waiting_action = act_sleep;
-
-  FIXME: check if not setting the waiting_action breaks something on msg
-
-  proc->simdata->waiting_action = NULL;*/
 
   TRY {
     simcall_process_sleep(nb_sec);
@@ -184,9 +166,7 @@ msg_error_t MSG_process_sleep(double nb_sec)
     xbt_ex_free(e);
   }
 
-  #ifdef HAVE_TRACING
-    TRACE_msg_process_sleep_out(MSG_process_self());
-  #endif
+  TRACE_msg_process_sleep_out(MSG_process_self());
   MSG_RETURN(status);
 }
 
@@ -406,10 +386,7 @@ msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *alias,
   simdata_task_t t_simdata = NULL;
   msg_process_t process = MSG_process_self();
   msg_mailbox_t mailbox = MSG_mailbox_get_by_alias(alias);
-
-#ifdef HAVE_TRACING
   int call_end = TRACE_msg_task_put_start(task);
-#endif
 
   /* Prepare the task to send */
   t_simdata = task->simdata;
@@ -436,7 +413,7 @@ msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *alias,
   msg_global->sent_msg++;
 
   /* Send it by calling SIMIX network layer */
-  smx_synchro_t act = simcall_comm_isend(SIMIX_process_self(), mailbox, t_simdata->message_size,
+  smx_synchro_t act = simcall_comm_isend(SIMIX_process_self(), mailbox, t_simdata->bytes_amount,
                                         t_simdata->rate, task, sizeof(void *),
                                         match_fun, cleanup, NULL, match_data,detached);
   t_simdata->comm = act; /* FIXME: is the field t_simdata->comm still useful? */
@@ -452,14 +429,10 @@ msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *alias,
     comm->s_comm = act;
   }
 
-#ifdef HAVE_TRACING
-  if (TRACE_is_enabled()) {
+  if (TRACE_is_enabled())
     simcall_set_category(act, task->category);
-  }
-
   if (call_end)
     TRACE_msg_task_put_end();
-#endif
 
   return comm;
 }
@@ -1043,9 +1016,7 @@ int MSG_task_listen_from(const char *alias)
  */
 void MSG_task_set_category (msg_task_t task, const char *category)
 {
-#ifdef HAVE_TRACING
   TRACE_msg_set_task_category (task, category);
-#endif
 }
 
 /** \ingroup msg_task_usage
@@ -1060,11 +1031,7 @@ void MSG_task_set_category (msg_task_t task, const char *category)
  */
 const char *MSG_task_get_category (msg_task_t task)
 {
-#ifdef HAVE_TRACING
   return task->category;
-#else
-  return NULL;
-#endif
 }
 
 /**
index a35e598..4e0971f 100644 (file)
@@ -111,10 +111,10 @@ sg_size_t MSG_file_read(msg_file_t fd, sg_size_t size)
 
     m_host_list[0] = MSG_host_self();
     m_host_list[1] = attached_host;
-    double computation_amount[] = { 0, 0 };
-    double communication_amount[] = { 0, 0, (double)read_size, 0 };
+    double flops_amount[] = { 0, 0 };
+    double bytes_amount[] = { 0, 0, (double)read_size, 0 };
 
-    msg_task_t task = MSG_parallel_task_create("file transfer for read", 2, m_host_list, computation_amount, communication_amount, NULL);
+    msg_task_t task = MSG_parallel_task_create("file transfer for read", 2, m_host_list, flops_amount, bytes_amount, NULL);
     msg_error_t transfer = MSG_parallel_task_execute(task);
     MSG_task_destroy(task);
     free(m_host_list);
@@ -155,10 +155,10 @@ sg_size_t MSG_file_write(msg_file_t fd, sg_size_t size)
 
     m_host_list[0] = MSG_host_self();
     m_host_list[1] = attached_host;
-    double computation_amount[] = { 0, 0 };
-    double communication_amount[] = { 0, (double)size, 0, 0 };
+    double flops_amount[] = { 0, 0 };
+    double bytes_amount[] = { 0, (double)size, 0, 0 };
 
-    msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, computation_amount, communication_amount, NULL);
+    msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, flops_amount, bytes_amount, NULL);
     msg_error_t transfer = MSG_parallel_task_execute(task);
     MSG_task_destroy(task);
     free(m_host_list);
@@ -366,10 +366,10 @@ msg_error_t MSG_file_rcopy (msg_file_t file, msg_host_t host, const char* fullpa
 
   m_host_list[0] = attached_host;
   m_host_list[1] = host_dest;
-  double computation_amount[] = { 0, 0 };
-  double communication_amount[] = { 0, (double)read_size, 0, 0 };
+  double flops_amount[] = { 0, 0 };
+  double bytes_amount[] = { 0, (double)read_size, 0, 0 };
 
-  msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, computation_amount, communication_amount, NULL);
+  msg_task_t task = MSG_parallel_task_create("file transfer for write", 2, m_host_list, flops_amount, bytes_amount, NULL);
   msg_error_t transfer = MSG_parallel_task_execute(task);
   MSG_task_destroy(task);
   free(m_host_list);
index 53f99df..cffff60 100644 (file)
@@ -116,10 +116,8 @@ MSG_mailbox_get_task_ext_bounded(msg_mailbox_t mailbox, msg_task_t * task,
   if (host)
     THROW_UNIMPLEMENTED;
 
-#ifdef HAVE_TRACING
   TRACE_msg_task_get_start();
   double start_time = MSG_get_clock();
-#endif
 
   /* Sanity check */
   xbt_assert(task, "Null pointer for the task storage");
@@ -153,13 +151,11 @@ MSG_mailbox_get_task_ext_bounded(msg_mailbox_t mailbox, msg_task_t * task,
     xbt_ex_free(e);
   }
 
-#ifdef HAVE_TRACING
   if (ret != MSG_HOST_FAILURE &&
       ret != MSG_TRANSFER_FAILURE &&
       ret != MSG_TIMEOUT) {
     TRACE_msg_task_get_end(start_time, *task);
   }
-#endif
   MSG_RETURN(ret);
 }
 
@@ -173,9 +169,7 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, msg_task_t task,
   msg_process_t process = MSG_process_self();
   simdata_process_t p_simdata = SIMIX_process_self_get_data(process);
 
-#ifdef HAVE_TRACING
   int call_end = TRACE_msg_task_put_start(task);    //must be after CHECK_HOST()
-#endif
 
   /* Prepare the task to send */
   t_simdata = task->simdata;
@@ -207,14 +201,11 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, msg_task_t task,
   /* Try to send it by calling SIMIX network layer */
   TRY {
     smx_synchro_t comm = NULL; /* MC needs the comm to be set to NULL during the simix call  */
-    comm = simcall_comm_isend(SIMIX_process_self(), mailbox,t_simdata->message_size,
+    comm = simcall_comm_isend(SIMIX_process_self(), mailbox,t_simdata->bytes_amount,
                                   t_simdata->rate, task, sizeof(void *),
                                   NULL, NULL, NULL, task, 0);
-#ifdef HAVE_TRACING
-    if (TRACE_is_enabled()) {
+    if (TRACE_is_enabled())
       simcall_set_category(comm, task->category);
-    }
-#endif
      t_simdata->comm = comm;
      simcall_comm_wait(comm, timeout);
   }
@@ -243,10 +234,8 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, msg_task_t task,
 
 
   p_simdata->waiting_task = NULL;
-#ifdef HAVE_TRACING
   if (call_end)
     TRACE_msg_task_put_end();
-#endif
   MSG_RETURN(ret);
 }
 
index ce93121..6a2bb06 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "xbt/fifo.h"
 #include "simgrid/simix.h"
-#include "msg/datatypes.h"
+#include "simgrid/msg.h"
 
 
 SG_BEGIN_DECL()
index c6c17a3..c806583 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef METASIMGRID_PRIVATE_H
 #define METASIMGRID_PRIVATE_H
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "simgrid/simix.h"
 #include "surf/surf.h"
 #include "xbt/fifo.h"
@@ -41,8 +41,8 @@ SG_BEGIN_DECL()
 typedef struct simdata_task {
   smx_synchro_t compute;         /* SIMIX modeling of computation */
   smx_synchro_t comm;            /* SIMIX modeling of communication */
-  double message_size;          /* Data size */
-  double computation_amount;    /* Computation size */
+  double bytes_amount;    /* Data size */
+  double flops_amount;    /* Computation size */
   msg_process_t sender;
   msg_process_t receiver;
   msg_host_t source;
@@ -57,8 +57,8 @@ typedef struct simdata_task {
   int host_nb;                  /* ==0 if sequential task; parallel task if not */
   /*******  Parallel Tasks Only !!!! *******/
   smx_host_t *host_list;
-  double *comp_amount;
-  double *comm_amount;
+  double *flops_parallel_amount;
+  double *bytes_parallel_amount;
 } s_simdata_task_t;
 
 /********************************* File **************************************/
@@ -68,7 +68,7 @@ typedef struct simdata_file {
 
 /*************** Begin GPU ***************/
 typedef struct simdata_gpu_task {
-  double computation_amount;    /* Computation size */
+  double flops_amount;    /* Computation size */
   double dispatch_latency;
   double collect_latency;
   int isused;  /* Indicates whether the task is used in SIMIX currently */
index 927a4a9..3a38913 100644 (file)
@@ -43,9 +43,7 @@ void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc)
     simcall_process_set_data(smx_proc, NULL);
   }
 
-#ifdef HAVE_TRACING
   TRACE_msg_process_end(smx_proc);
-#endif
   // free the data if a function was provided
   if (msg_proc && msg_proc->data && msg_global->process_data_cleanup) {
     msg_global->process_data_cleanup(msg_proc->data);
@@ -173,9 +171,7 @@ msg_process_t MSG_process_create_with_environment(const char *name,
  simcall_process_create(&process, name, code, simdata, sg_host_name(host), -1,
                            argc, argv, properties,0);
 
-#ifdef HAVE_TRACING
   TRACE_msg_process_create(name, SIMIX_process_get_PID(process), host);
-#endif
 
   if (!process) {
     /* Undo everything we have just changed */
@@ -183,9 +179,7 @@ msg_process_t MSG_process_create_with_environment(const char *name,
     return NULL;
   }
   else {
-    #ifdef HAVE_TRACING
     simcall_process_on_exit(process,(int_f_pvoid_pvoid_t)TRACE_msg_process_kill,process);
-    #endif
   }
   return process;
 }
@@ -229,10 +223,8 @@ msg_error_t MSG_process_migrate(msg_process_t process, msg_host_t host)
 {
   simdata_process_t simdata = simcall_process_get_data(process);
   simdata->m_host = host;
-#ifdef HAVE_TRACING
   msg_host_t now = simdata->m_host;
   TRACE_msg_process_change_host(process, now, host);
-#endif
   simcall_process_change_host(process, host);
   return MSG_OK;
 }
@@ -443,10 +435,7 @@ msg_error_t MSG_process_suspend(msg_process_t process)
 {
   xbt_assert(process != NULL, "Invalid parameter");
 
-#ifdef HAVE_TRACING
   TRACE_msg_process_suspend(process);
-#endif
-
   simcall_process_suspend(process);
   MSG_RETURN(MSG_OK);
 }
@@ -461,10 +450,7 @@ msg_error_t MSG_process_resume(msg_process_t process)
 {
   xbt_assert(process != NULL, "Invalid parameter");
 
-#ifdef HAVE_TRACING
   TRACE_msg_process_resume(process);
-#endif
-
   simcall_process_resume(process);
   MSG_RETURN(MSG_OK);
 }
index 2488dac..c6055c5 100644 (file)
@@ -31,7 +31,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_task, msg,
    corresponding object.
  * \param name a name for the object. It is for user-level information
    and can be NULL.
- * \param compute_duration a value of the processing amount (in flop)
+ * \param flop_amount a value of the processing amount (in flop)
    needed to process this new task. If 0, then it cannot be executed with
    MSG_task_execute(). This value has to be >=0.
  * \param message_size a value of the amount of data (in bytes) needed to
@@ -43,7 +43,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_task, msg,
  * \see msg_task_t
  * \return The new corresponding object.
  */
-msg_task_t MSG_task_create(const char *name, double compute_duration,
+msg_task_t MSG_task_create(const char *name, double flop_amount,
                          double message_size, void *data)
 {
   msg_task_t task = xbt_new(s_msg_task_t, 1);
@@ -57,8 +57,8 @@ msg_task_t MSG_task_create(const char *name, double compute_duration,
   /* Simulator Data */
   simdata->compute = NULL;
   simdata->comm = NULL;
-  simdata->message_size = message_size;
-  simdata->computation_amount = compute_duration;
+  simdata->bytes_amount = message_size;
+  simdata->flops_amount = flop_amount;
   simdata->sender = NULL;
   simdata->receiver = NULL;
   simdata->source = NULL;
@@ -70,11 +70,9 @@ msg_task_t MSG_task_create(const char *name, double compute_duration,
 
   simdata->host_nb = 0;
   simdata->host_list = NULL;
-  simdata->comp_amount = NULL;
-  simdata->comm_amount = NULL;
-#ifdef HAVE_TRACING
+  simdata->flops_parallel_amount = NULL;
+  simdata->bytes_parallel_amount = NULL;
   TRACE_msg_task_create(task);
-#endif
 
   return task;
 }
@@ -88,21 +86,20 @@ msg_task_t MSG_task_create(const char *name, double compute_duration,
  and can be NULL.
  * \param host_nb the number of hosts implied in the parallel task.
  * \param host_list an array of \p host_nb msg_host_t.
- * \param computation_amount an array of \p host_nb
- doubles. computation_amount[i] is the total number of operations
- that have to be performed on host_list[i].
- * \param communication_amount an array of \p host_nb* \p host_nb doubles.
- * \param data a pointer to any data may want to attach to the new
- object.  It is for user-level information and can be NULL. It can
- be retrieved with the function \ref MSG_task_get_data.
+ * \param flops_amount an array of \p host_nb doubles.
+ *                     flops_amount[i] is the total number of operations that have to be performed on host_list[i].
+ * \param bytes_amount an array of \p host_nb* \p host_nb doubles.
+ * \param data a pointer to any data may want to attach to the new object.
+ *             It is for user-level information and can be NULL.
+ *             It can be retrieved with the function \ref MSG_task_get_data.
  * \see msg_task_t
  * \return The new corresponding object.
  */
 msg_task_t
 MSG_parallel_task_create(const char *name, int host_nb,
                          const msg_host_t * host_list,
-                         double *computation_amount,
-                         double *communication_amount, void *data)
+                         double *flops_amount,
+                         double *bytes_amount, void *data)
 {
   msg_task_t task = MSG_task_create(name, 0, 0, data);
   simdata_task_t simdata = task->simdata;
@@ -111,8 +108,8 @@ MSG_parallel_task_create(const char *name, int host_nb,
   /* Simulator Data specific to parallel tasks */
   simdata->host_nb = host_nb;
   simdata->host_list = xbt_new0(smx_host_t, host_nb);
-  simdata->comp_amount = computation_amount;
-  simdata->comm_amount = communication_amount;
+  simdata->flops_parallel_amount = flops_amount;
+  simdata->bytes_parallel_amount = bytes_amount;
 
   for (i = 0; i < host_nb; i++)
     simdata->host_list[i] = host_list[i];
@@ -130,7 +127,7 @@ MSG_parallel_task_create(const char *name, int host_nb,
  * \param name a name for the object. It is for user-level information
    and can be NULL.
 
- * \param compute_duration a value of the processing amount (in flop)
+ * \param flops_amount a value of the processing amount (in flop)
    needed to process this new task. If 0, then it cannot be executed with
    MSG_gpu_task_execute(). This value has to be >=0.
 
@@ -142,7 +139,7 @@ MSG_parallel_task_create(const char *name, int host_nb,
  * \see msg_gpu_task_t
  * \return The new corresponding object.
  */
-msg_gpu_task_t MSG_gpu_task_create(const char *name, double compute_duration,
+msg_gpu_task_t MSG_gpu_task_create(const char *name, double flops_amount,
                          double dispatch_latency, double collect_latency)
 {
   msg_gpu_task_t task = xbt_new(s_msg_gpu_task_t, 1);
@@ -152,14 +149,11 @@ msg_gpu_task_t MSG_gpu_task_create(const char *name, double compute_duration,
   task->name = xbt_strdup(name);
 
   /* Simulator Data */
-  simdata->computation_amount = compute_duration;
+  simdata->flops_amount = flops_amount;
   simdata->dispatch_latency   = dispatch_latency;
   simdata->collect_latency    = collect_latency;
 
-#ifdef HAVE_TRACING
-  //FIXME
-  /* TRACE_msg_gpu_task_create(task); */
-#endif
+  /* TRACE_msg_gpu_task_create(task); FIXME*/
 
   return task;
 }
@@ -273,9 +267,7 @@ msg_error_t MSG_task_destroy(msg_task_t task)
     /* the task is being sent or executed: cancel it first */
     MSG_task_cancel(task);
   }
-#ifdef HAVE_TRACING
   TRACE_msg_task_destroy(task);
-#endif
 
   xbt_free(task->name);
 
@@ -319,17 +311,18 @@ msg_error_t MSG_task_cancel(msg_task_t task)
 }
 
 /** \ingroup m_task_management
- * \brief Returns the computation amount needed to process a task #msg_task_t.
+ * \brief Returns the remaining amount of flops needed to execute a task #msg_task_t.
  *
  * Once a task has been processed, this amount is set to 0. If you want, you
- * can reset this value with #MSG_task_set_compute_duration before restarting the task.
+ * can reset this value with #MSG_task_set_flops_amount before restarting the task.
  */
-double MSG_task_get_compute_duration(msg_task_t task)
-{
-  xbt_assert((task != NULL)
-              && (task->simdata != NULL), "Invalid parameter");
+double MSG_task_get_flops_amount(msg_task_t task) {
 
-  return task->simdata->computation_amount;
+       if (task->simdata->compute) {
+               return simcall_host_execution_get_remains(task->simdata->compute);
+       } else {
+               return task->simdata->flops_amount;
+       }
 }
 
 
@@ -337,17 +330,14 @@ double MSG_task_get_compute_duration(msg_task_t task)
  * \brief set the computation amount needed to process a task #msg_task_t.
  *
  * \warning If the computation is ongoing (already started and not finished),
- * it is not modified by this call. And the termination of the ongoing task with
- * set the computation_amount to zero, overriding any value set during the
- * execution.
+ * it is not modified by this call. Moreover, after its completion, the ongoing
+ * execution with set the flops_amount to zero, overriding any value set during
+ * the execution.
  */
 
-void MSG_task_set_compute_duration(msg_task_t task,
-                                   double computation_amount)
+void MSG_task_set_flops_amount(msg_task_t task, double flops_amount)
 {
-  xbt_assert(task, "Invalid parameter");
-  task->simdata->computation_amount = computation_amount;
-
+  task->simdata->flops_amount = flops_amount;
 }
 
 /** \ingroup m_task_management
@@ -357,35 +347,12 @@ void MSG_task_set_compute_duration(msg_task_t task,
  * it is not modified by this call.
  */
 
-void MSG_task_set_data_size(msg_task_t task,
-                                   double data_size)
+void MSG_task_set_bytes_amount(msg_task_t task, double data_size)
 {
-  xbt_assert(task, "Invalid parameter");
-  task->simdata->message_size = data_size;
-
+  task->simdata->bytes_amount = data_size;
 }
 
 
-
-/** \ingroup m_task_management
- * \brief Returns the remaining computation amount of a task #msg_task_t.
- *
- * If the task is ongoing, this call retrieves the remaining amount of work.
- * If it is not ongoing, it returns the total amount of work that will be
- * executed when the task starts.
- */
-double MSG_task_get_remaining_computation(msg_task_t task)
-{
-  xbt_assert((task != NULL)
-              && (task->simdata != NULL), "Invalid parameter");
-
-  if (task->simdata->compute) {
-    return simcall_host_execution_get_remains(task->simdata->compute);
-  } else {
-    return task->simdata->computation_amount;
-  }
-}
-
 /** \ingroup m_task_management
  * \brief Returns the total amount received by a task #msg_task_t.
  *        If the communication does not exist it will return 0.
@@ -420,12 +387,12 @@ int MSG_task_is_latency_bounded(msg_task_t task)
  * \brief Returns the size of the data attached to a task #msg_task_t.
  *
  */
-double MSG_task_get_data_size(msg_task_t task)
+double MSG_task_get_bytes_amount(msg_task_t task)
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
 
-  return task->simdata->message_size;
+  return task->simdata->bytes_amount;
 }
 
 
index 9bc7ab0..ee3bd54 100644 (file)
@@ -221,9 +221,7 @@ msg_vm_t MSG_vm_create_core(msg_host_t ind_pm, const char *name)
 
   XBT_DEBUG("A new VM (%s) has been created", name);
 
-  #ifdef HAVE_TRACING
   TRACE_msg_vm_create(name, ind_pm);
-  #endif
 
   return ind_vm;
 }
@@ -250,9 +248,7 @@ void MSG_vm_destroy(msg_vm_t vm)
 
   __MSG_host_destroy(vm);
 
-  #ifdef HAVE_TRACING
   TRACE_msg_vm_end(vm);
-  #endif
 }
 
 
@@ -266,9 +262,7 @@ void MSG_vm_start(msg_vm_t vm)
 {
   simcall_vm_start(vm);
 
-  #ifdef HAVE_TRACING
   TRACE_msg_vm_start(vm);
-  #endif
 }
 
 
@@ -284,9 +278,7 @@ void MSG_vm_shutdown(msg_vm_t vm)
   /* msg_vm_t equals to msg_host_t */
   simcall_vm_shutdown(vm);
 
-  // #ifdef HAVE_TRACING
   // TRACE_msg_vm_(vm);
-  // #endif
 }
 
 
@@ -425,10 +417,7 @@ static int migration_rx_fun(int argc, char *argv[])
    msg_host_priv_t priv = msg_host_resource_priv(vm);
    priv->is_migrating = 0;
    XBT_DEBUG("VM(%s) moved from PM(%s) to PM(%s)", ms->vm->key, ms->src_pm->key, ms->dst_pm->key);
-   #ifdef HAVE_TRACING
-    TRACE_msg_vm_change_host(ms->vm, ms->src_pm, ms->dst_pm);
-   #endif
-
+   TRACE_msg_vm_change_host(ms->vm, ms->src_pm, ms->dst_pm);
   }
   // Inform the SRC that the migration has been correctly performed
   {
@@ -464,7 +453,7 @@ static void reset_dirty_pages(msg_vm_t vm)
   xbt_dict_cursor_t cursor = NULL;
   dirty_page_t dp = NULL;
   xbt_dict_foreach(priv->dp_objs, cursor, key, dp) {
-    double remaining = MSG_task_get_remaining_computation(dp->task);
+    double remaining = MSG_task_get_flops_amount(dp->task);
     dp->prev_clock = MSG_get_clock();
     dp->prev_remaining = remaining;
 
@@ -525,7 +514,7 @@ static double lookup_computed_flop_counts(msg_vm_t vm, int stage_for_fancy_debug
   xbt_dict_cursor_t cursor = NULL;
   dirty_page_t dp = NULL;
   xbt_dict_foreach(priv->dp_objs, cursor, key, dp) {
-    double remaining = MSG_task_get_remaining_computation(dp->task);
+    double remaining = MSG_task_get_flops_amount(dp->task);
 
     double clock = MSG_get_clock();
 
@@ -556,7 +545,7 @@ static double lookup_computed_flop_counts(msg_vm_t vm, int stage_for_fancy_debug
 void MSG_host_add_task(msg_host_t host, msg_task_t task)
 {
   msg_host_priv_t priv = msg_host_resource_priv(host);
-  double remaining = MSG_task_get_remaining_computation(task);
+  double remaining = MSG_task_get_flops_amount(task);
   char *key = bprintf("%s-%p", task->name, task);
 
   dirty_page_t dp = xbt_new0(s_dirty_page, 1);
@@ -588,7 +577,7 @@ void MSG_host_del_task(msg_host_t host, msg_task_t task)
    * computation has been done until now, and keep the information for the
    * lookup_() function that will called soon. */
   if (priv->dp_enabled) {
-    double remaining = MSG_task_get_remaining_computation(task);
+    double remaining = MSG_task_get_flops_amount(task);
     double clock = MSG_get_clock();
     // double updated = calc_updated_pages(key, host, dp, remaining, clock);
     double updated = get_computed(key, host, dp, remaining, clock);
@@ -814,7 +803,7 @@ static int migration_tx_fun(int argc, char *argv[])
     sg_size_t sent = 0;
     double clock_prev_send = MSG_get_clock();
     TRY {
-      XBT_INFO("Stage 2, gonna send %llu", updated_size);
+      XBT_DEBUG("Stage 2, gonna send %llu", updated_size);
       sent = send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, updated_size, ms->mbox, 2, stage2_round, mig_speed, mig_timeout);
     } CATCH_ANONYMOUS {
       //hostfailure (if you want to know whether this is the SRC or the DST please check directly in send_migration_data code)
@@ -858,7 +847,7 @@ stage3:
   stop_dirty_page_tracking(ms->vm);
 
   TRY {
-    XBT_INFO("Stage 3: Gonna send %f", remaining_size);
+    XBT_DEBUG("Stage 3: Gonna send %f", remaining_size);
     send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, remaining_size, ms->mbox, 3, 0, mig_speed, -1);
   } CATCH_ANONYMOUS {
     //hostfailure (if you want to know whether this is the SRC or the DST please check directly in send_migration_data code)
@@ -868,7 +857,7 @@ stage3:
   }
 
   // At that point the Migration is considered valid for the SRC node but remind that the DST side should relocate effectively the VM on the DST node.
-  XBT_INFO("mig: tx_done");
+  XBT_DEBUG("mig: tx_done");
 
   return 0;
 }
@@ -975,10 +964,10 @@ void MSG_vm_migrate(msg_vm_t vm, msg_host_t new_pm)
 
   msg_host_t old_pm = simcall_vm_get_pm(vm);
 
-  if(!MSG_host_is_off(old_pm))
+  if(MSG_host_is_off(old_pm))
     THROWF(vm_error, 0, "SRC host(%s) seems off, cannot start a migration", sg_host_name(old_pm));
  
-  if(!MSG_host_is_off(new_pm))
+  if(MSG_host_is_off(new_pm))
     THROWF(vm_error, 0, "DST host(%s) seems off, cannot start a migration", sg_host_name(new_pm));
   
   if (!MSG_vm_is_running(vm))
@@ -1006,9 +995,7 @@ void MSG_vm_migrate(msg_vm_t vm, msg_host_t new_pm)
   // This part is done in the RX code, to handle the corner case where SRC can crash just at the end of the migration process
   // In that case, the VM has been already assigned to the DST node.
   //XBT_DEBUG("VM(%s) moved from PM(%s) to PM(%s)", vm->key, old_pm->key, new_pm->key);
-  //#ifdef HAVE_TRACING
   //TRACE_msg_vm_change_host(vm, old_pm, new_pm);
-  //#endif
 }
 
 
@@ -1029,9 +1016,7 @@ void MSG_vm_suspend(msg_vm_t vm)
 
   XBT_DEBUG("vm_suspend done");
 
-  #ifdef HAVE_TRACING
   TRACE_msg_vm_suspend(vm);
-  #endif
 }
 
 
@@ -1044,9 +1029,7 @@ void MSG_vm_resume(msg_vm_t vm)
 {
   simcall_vm_resume(vm);
 
-  #ifdef HAVE_TRACING
   TRACE_msg_vm_resume(vm);
-  #endif
 }
 
 
@@ -1066,9 +1049,7 @@ void MSG_vm_save(msg_vm_t vm)
     THROWF(vm_error, 0, "VM(%s) is migrating", sg_host_name(vm));
 
   simcall_vm_save(vm);
-  #ifdef HAVE_TRACING
   TRACE_msg_vm_save(vm);
-  #endif
 }
 
 /** @brief Restore the execution of the VM. All processes on the VM run again.
@@ -1082,9 +1063,7 @@ void MSG_vm_restore(msg_vm_t vm)
 {
   simcall_vm_restore(vm);
 
-  #ifdef HAVE_TRACING
   TRACE_msg_vm_restore(vm);
-  #endif
 }
 
 
index be63a53..a30923b 100644 (file)
@@ -6,9 +6,7 @@
 
 #include "instr/instr_private.h"
 #include "private.h"
-#include "simdag/datatypes.h"
-
-#ifdef HAVE_TRACING
+#include "simgrid/simdag.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_sd, instr, "SD");
 
@@ -78,4 +76,3 @@ void TRACE_sd_task_destroy(SD_task_t task)
   return;
 }
 
-#endif /* HAVE_TRACING */
index ada782b..67e9e7b 100644 (file)
@@ -10,8 +10,7 @@
 #include "xbt/dict.h"
 #include "xbt/dynar.h"
 #include "xbt/fifo.h"
-#include "simdag/simdag.h"
-#include "simdag/datatypes.h"
+#include "simgrid/simdag.h"
 #include "surf/surf.h"
 #include "xbt/swag.h"
 #include "xbt/mallocator.h"
@@ -110,14 +109,12 @@ typedef struct SD_task {
   /* scheduling parameters (only exist in state SD_SCHEDULED) */
   int workstation_nb;
   SD_workstation_t *workstation_list;   /* surf workstations */
-  double *computation_amount;
-  double *communication_amount;
+  double *flops_amount;
+  double *bytes_amount;
   double rate;
 
-#ifdef HAVE_TRACING
   long long int counter;        /* task unique identifier for instrumentation */
   char *category;               /* sd task category for instrumentation */
-#endif
 } s_SD_task_t;
 
 /* Task dependencies */
index 6113d3c..a1b942e 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "private.h"
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/misc.h"
 #include "xbt/log.h"
 #include <libgen.h>
@@ -298,7 +298,6 @@ xbt_dynar_t SD_daxload(const char *filename)
         newfile = SD_task_create_comm_e2e(file->name, NULL, file->amount);
         SD_task_dependency_add(NULL, NULL, root_task, newfile);
         SD_task_dependency_add(NULL, NULL, newfile, depafter->dst);
-#ifdef HAVE_TRACING
         if (depafter->src){
           const char *category = depafter->src->category;
           if (category){
@@ -306,7 +305,6 @@ xbt_dynar_t SD_daxload(const char *filename)
             TRACE_sd_set_task_category(newfile, category);
           }
         }
-#endif
         xbt_dynar_push(result, &newfile);
       }
     } else if (xbt_dynar_is_empty(file->tasks_after)) {
@@ -314,7 +312,6 @@ xbt_dynar_t SD_daxload(const char *filename)
         newfile = SD_task_create_comm_e2e(file->name, NULL, file->amount);
         SD_task_dependency_add(NULL, NULL, depbefore->src, newfile);
         SD_task_dependency_add(NULL, NULL, newfile, end_task);
-#ifdef HAVE_TRACING
         if (depbefore->src){
           const char *category = depbefore->src->category;
           if (category){
@@ -322,7 +319,6 @@ xbt_dynar_t SD_daxload(const char *filename)
             TRACE_sd_set_task_category(newfile, category);
           }
         }
-#endif
         xbt_dynar_push(result, &newfile);
       }
     } else {
@@ -336,7 +332,6 @@ xbt_dynar_t SD_daxload(const char *filename)
           newfile = SD_task_create_comm_e2e(file->name, NULL, file->amount);
           SD_task_dependency_add(NULL, NULL, depbefore->src, newfile);
           SD_task_dependency_add(NULL, NULL, newfile, depafter->dst);
-#ifdef HAVE_TRACING
           if (depbefore->src){
             const char *category = depbefore->src->category;
             if (category){
@@ -344,7 +339,6 @@ xbt_dynar_t SD_daxload(const char *filename)
               TRACE_sd_set_task_category(newfile, category);
             }
           }
-#endif
           xbt_dynar_push(result, &newfile);
         }
       }
@@ -402,13 +396,11 @@ void STag_dax__job(void)
   runtime *= 4200000000.;       /* Assume that timings were done on a 4.2GFlops machine. I mean, why not? */
 //  XBT_INFO("See <job id=%s runtime=%s %.0f>",A_dax__job_id,A_dax__job_runtime,runtime);
   current_job = SD_task_create_comp_seq(name, NULL, runtime);
-#ifdef HAVE_TRACING
   char *category = A_dax__job_name;
   if (category){
     TRACE_category (category);
     TRACE_sd_set_task_category(current_job, category);
   }
-#endif
   xbt_dict_set(jobs, A_dax__job_id, current_job, NULL);
   free(name);
   xbt_dynar_push(result, &current_job);
index cc4edd1..e40a053 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "private.h"
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/misc.h"
 #include "xbt/log.h"
 #include <stdbool.h>
@@ -45,7 +45,6 @@ static void dot_task_p_free(void *task) {
   SD_task_destroy(*t);
 }
 
-#ifdef HAVE_TRACING
 static void TRACE_sd_dotloader (SD_task_t task, const char *category) {
   if (category && strlen (category)){
     if (task->category)
@@ -57,7 +56,6 @@ static void TRACE_sd_dotloader (SD_task_t task, const char *category) {
     TRACE_sd_set_task_category(task, category);
   }
 }
-#endif
 
 /** @brief loads a DOT file describing a DAG
  * 
@@ -192,9 +190,7 @@ xbt_dynar_t SD_dotload_generic(const char * filename, seq_par_t seq_or_par){
       } else {
         task = SD_task_create_comp_par_amdahl(name, NULL , amount, alpha);
       }
-#ifdef HAVE_TRACING
       TRACE_sd_dotloader (task, agget (node, (char*)"category"));
-#endif
       xbt_dict_set(jobs, name, task, NULL);
       if (!strcmp(name, "root")){
       /* by design the root task is always SCHEDULABLE */
@@ -334,9 +330,7 @@ xbt_dynar_t SD_dotload_generic(const char * filename, seq_par_t seq_or_par){
             task = SD_task_create_comm_e2e(name, NULL , size);
           else
             task = SD_task_create_comm_par_mxn_1d_block(name, NULL , size);
-#ifdef HAVE_TRACING
           TRACE_sd_dotloader (task, agget (node, (char*)"category"));
-#endif
           SD_task_dependency_add(NULL, NULL, src, task);
           SD_task_dependency_add(NULL, NULL, task, dst);
           xbt_dict_set(jobs, name, task, NULL);
index 0d87b7d..4af1362 100644 (file)
@@ -43,9 +43,7 @@ SD_global_t sd_global = NULL;
  */
 void SD_init(int *argc, char **argv)
 {
-#ifdef HAVE_TRACING
   TRACE_global_init(argc, argv);
-#endif
 
   s_SD_task_t task;
 
@@ -432,9 +430,7 @@ double SD_get_clock(void) {
  */
 void SD_exit(void)
 {
-#ifdef HAVE_TRACING
   TRACE_surf_resource_utilization_release();
-#endif
 
   xbt_mallocator_free(sd_global->task_mallocator);
 
@@ -454,9 +450,7 @@ void SD_exit(void)
   xbt_swag_free(sd_global->failed_task_set);
   xbt_swag_free(sd_global->return_set);
 
-#ifdef HAVE_TRACING
   TRACE_end();
-#endif
 
   xbt_free(sd_global);
   sd_global = NULL;
index b59b1b4..a79cd28 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "private.h"
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/dict.h"
 #include "xbt/sysdep.h"
 #include "surf/surf.h"
index 9c00ca4..9ab54e6 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "private.h"
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/sysdep.h"
 #include "xbt/dynar.h"
 #include "instr/instr_private.h"
@@ -55,8 +55,8 @@ void SD_task_recycle_f(void *t)
   /* scheduling parameters */
   task->workstation_nb = 0;
   task->workstation_list = NULL;
-  task->computation_amount = NULL;
-  task->communication_amount = NULL;
+  task->flops_amount = NULL;
+  task->bytes_amount = NULL;
   task->rate = -1;
 }
 
@@ -90,9 +90,7 @@ SD_task_t SD_task_create(const char *name, void *data, double amount)
 
   sd_global->task_number++;
 
-#ifdef HAVE_TRACING
   TRACE_sd_task_create(task);
-#endif
 
   return task;
 }
@@ -102,8 +100,8 @@ static XBT_INLINE SD_task_t SD_task_create_sized(const char *name,
                                                  int ws_count)
 {
   SD_task_t task = SD_task_create(name, data, amount);
-  task->communication_amount = xbt_new0(double, ws_count * ws_count);
-  task->computation_amount = xbt_new0(double, ws_count);
+  task->bytes_amount = xbt_new0(double, ws_count * ws_count);
+  task->flops_amount = xbt_new0(double, ws_count);
   task->workstation_nb = ws_count;
   task->workstation_list = xbt_new0(SD_workstation_t, ws_count);
   return task;
@@ -123,13 +121,11 @@ SD_task_t SD_task_create_comm_e2e(const char *name, void *data,
                                   double amount)
 {
   SD_task_t res = SD_task_create_sized(name, data, amount, 2);
-  res->communication_amount[2] = amount;
+  res->bytes_amount[2] = amount;
   res->kind = SD_TASK_COMM_E2E;
 
-#ifdef HAVE_TRACING
   TRACE_category("COMM_E2E");
   TRACE_sd_set_task_category(res, "COMM_E2E");
-#endif
 
   return res;
 }
@@ -146,22 +142,20 @@ SD_task_t SD_task_create_comm_e2e(const char *name, void *data,
  *
  * \param name the name of the task (can be \c NULL)
  * \param data the user data you want to associate with the task (can be \c NULL)
- * \param amount amount of compute work to be done by the task
+ * \param flops_amount amount of compute work to be done by the task
  * \return the new SD_TASK_COMP_SEQ typed task
  */
 SD_task_t SD_task_create_comp_seq(const char *name, void *data,
-                                  double amount)
+                                  double flops_amount)
 {
-  SD_task_t res = SD_task_create_sized(name, data, amount, 1);
-  res->computation_amount[0] = amount;
+  SD_task_t res = SD_task_create_sized(name, data, flops_amount, 1);
+  res->flops_amount[0] = flops_amount;
   res->kind = SD_TASK_COMP_SEQ;
 
-#ifdef HAVE_TRACING
   TRACE_category("COMP_SEQ");
   TRACE_sd_set_task_category(res, "COMP_SEQ");
-#endif
 
-return res;
+  return res;
 }
 
 /** @brief create a parallel computation task that can then be auto-scheduled
@@ -177,24 +171,22 @@ return res;
  * first.
  * \param name the name of the task (can be \c NULL)
  * \param data the user data you want to associate with the task (can be \c NULL)
- * \param amount amount of compute work to be done by the task
+ * \param flops_amount amount of compute work to be done by the task
  * \param alpha purely serial fraction of the work to be done (in [0.;1.[)
  * \return the new task
  */
 SD_task_t SD_task_create_comp_par_amdahl(const char *name, void *data,
-                                  double amount, double alpha)
+                                  double flops_amount, double alpha)
 {
   xbt_assert(alpha < 1. && alpha >= 0.,
               "Invalid parameter: alpha must be in [0.;1.[");
   
-  SD_task_t res = SD_task_create(name, data, amount);
+  SD_task_t res = SD_task_create(name, data, flops_amount);
   res->alpha = alpha;
   res->kind = SD_TASK_COMP_PAR_AMDAHL;
 
-#ifdef HAVE_TRACING
   TRACE_category("COMP_PAR_AMDAHL");
   TRACE_sd_set_task_category(res, "COMP_PAR_AMDAHL");
-#endif
 
   return res;
 }
@@ -225,10 +217,8 @@ SD_task_t SD_task_create_comm_par_mxn_1d_block(const char *name, void *data,
   res->workstation_list=NULL;
   res->kind = SD_TASK_COMM_PAR_MXN_1D_BLOCK;
 
-#ifdef HAVE_TRACING
   TRACE_category("COMM_PAR_MXN_1D_BLOCK");
   TRACE_sd_set_task_category(res, "COMM_PAR_MXN_1D_BLOCK");
-#endif
 
   return res;
 }
@@ -260,12 +250,10 @@ void SD_task_destroy(SD_task_t task)
        surf_action_unref(task->surf_action);
 
   xbt_free(task->workstation_list);
-  xbt_free(task->communication_amount);
-  xbt_free(task->computation_amount);
+  xbt_free(task->bytes_amount);
+  xbt_free(task->flops_amount);
 
-#ifdef HAVE_TRACING
   TRACE_sd_task_destroy(task);
-#endif
 
   xbt_mallocator_release(sd_global->task_mallocator,task);
   sd_global->task_number--;
@@ -476,7 +464,7 @@ double SD_task_get_amount(SD_task_t task)
 /**
  * \brief Sets the total amount of work of a task
  * For sequential typed tasks (COMP_SEQ and COMM_E2E), it also sets the
- * appropriate values in the computation_amount and communication_amount arrays
+ * appropriate values in the flops_amount and bytes_amount arrays
  * respectively. Nothing more than modifying task->amount is done for paralle
  * typed tasks (COMP_PAR_AMDAHL and COMM_PAR_MXN_1D_BLOCK) as the distribution
  * of the amount of work is done at scheduling time.
@@ -488,9 +476,9 @@ void SD_task_set_amount(SD_task_t task, double amount)
 {
   task->amount = amount;
   if (task->kind == SD_TASK_COMP_SEQ)
-    task->computation_amount[0] = amount;
+    task->flops_amount[0] = amount;
   if (task->kind == SD_TASK_COMM_E2E)
-    task->communication_amount[2] = amount;
+    task->bytes_amount[2] = amount;
 }
 
 /**
@@ -568,10 +556,8 @@ void SD_task_dump(SD_task_t task)
     }
   }
 
-#ifdef HAVE_TRACING
   if (task->category)
     XBT_INFO("  - tracing category: %s", task->category);
-#endif
 
   XBT_INFO("  - amount: %.0f", SD_task_get_amount(task));
   if (task->kind == SD_TASK_COMP_PAR_AMDAHL)
@@ -923,16 +909,16 @@ void SD_task_unwatch(SD_task_t task, e_SD_task_state_t state)
  * \param task the task to evaluate
  * \param workstation_nb number of workstations on which the task would be executed
  * \param workstation_list the workstations on which the task would be executed
- * \param computation_amount computation amount for each workstation
- * \param communication_amount communication amount between each pair of workstations
+ * \param flops_amount computation amount for each workstation
+ * \param bytes_amount communication amount between each pair of workstations
  * \see SD_schedule()
  */
 double SD_task_get_execution_time(SD_task_t task,
                                   int workstation_nb,
                                   const SD_workstation_t *
                                   workstation_list,
-                                  const double *computation_amount,
-                                  const double *communication_amount)
+                                  const double *flops_amount,
+                                  const double *bytes_amount)
 {
   double time, max_time = 0.0;
   int i, j;
@@ -942,17 +928,17 @@ double SD_task_get_execution_time(SD_task_t task,
 
   for (i = 0; i < workstation_nb; i++) {
     time = 0.0;
-    if (computation_amount != NULL)
+    if (flops_amount != NULL)
       time =
           SD_workstation_get_computation_time(workstation_list[i],
-                                              computation_amount[i]);
+                                              flops_amount[i]);
 
-    if (communication_amount != NULL)
+    if (bytes_amount != NULL)
       for (j = 0; j < workstation_nb; j++) {
         time +=
             SD_route_get_communication_time(workstation_list[i],
                                             workstation_list[j],
-                                            communication_amount[i *
+                                            bytes_amount[i *
                                                                  workstation_nb
                                                                  + j]);
       }
@@ -987,15 +973,15 @@ static XBT_INLINE void SD_task_do_schedule(SD_task_t task)
  * \param task the task you want to schedule
  * \param workstation_count number of workstations on which the task will be executed
  * \param workstation_list the workstations on which the task will be executed
- * \param computation_amount computation amount for each workstation
- * \param communication_amount communication amount between each pair of workstations
+ * \param flops_amount computation amount for each workstation
+ * \param bytes_amount communication amount between each pair of workstations
  * \param rate task execution speed rate
  * \see SD_task_unschedule()
  */
 void SD_task_schedule(SD_task_t task, int workstation_count,
                       const SD_workstation_t * workstation_list,
-                      const double *computation_amount,
-                      const double *communication_amount, double rate)
+                      const double *flops_amount,
+                      const double *bytes_amount, double rate)
 {
   int communication_nb;
   task->workstation_nb = 0;
@@ -1005,25 +991,25 @@ void SD_task_schedule(SD_task_t task, int workstation_count,
   task->workstation_nb = workstation_count;
   task->rate = rate;
 
-  if (computation_amount) {
-    task->computation_amount = xbt_realloc(task->computation_amount,
+  if (flops_amount) {
+    task->flops_amount = xbt_realloc(task->flops_amount,
                                            sizeof(double) * workstation_count);
-    memcpy(task->computation_amount, computation_amount,
+    memcpy(task->flops_amount, flops_amount,
            sizeof(double) * workstation_count);
   } else {
-    xbt_free(task->computation_amount);
-    task->computation_amount = NULL;
+    xbt_free(task->flops_amount);
+    task->flops_amount = NULL;
   }
 
   communication_nb = workstation_count * workstation_count;
-  if (communication_amount) {
-    task->communication_amount = xbt_realloc(task->communication_amount,
+  if (bytes_amount) {
+    task->bytes_amount = xbt_realloc(task->bytes_amount,
                                              sizeof(double) * communication_nb);
-    memcpy(task->communication_amount, communication_amount,
+    memcpy(task->bytes_amount, bytes_amount,
            sizeof(double) * communication_nb);
   } else {
-    xbt_free(task->communication_amount);
-    task->communication_amount = NULL;
+    xbt_free(task->bytes_amount);
+    task->bytes_amount = NULL;
   }
 
   task->workstation_list =
@@ -1087,9 +1073,9 @@ static void __SD_task_destroy_scheduling_data(SD_task_t task)
            "Task '%s' must be SD_SCHEDULED, SD_RUNNABLE or SD_IN_FIFO",
            SD_task_get_name(task));
 
-  xbt_free(task->computation_amount);
-  xbt_free(task->communication_amount);
-  task->computation_amount = task->communication_amount = NULL;
+  xbt_free(task->flops_amount);
+  xbt_free(task->bytes_amount);
+  task->flops_amount = task->bytes_amount = NULL;
 }
 
 /* Runs a task. This function is directly called by __SD_task_try_to_run if
@@ -1134,32 +1120,30 @@ void __SD_task_really_run(SD_task_t task)
   for (i = 0; i < workstation_nb; i++)
     surf_workstations[i] =  surf_workstation_resource_priv(task->workstation_list[i]);
 
-  double *computation_amount = xbt_new0(double, workstation_nb);
-  double *communication_amount = xbt_new0(double, workstation_nb * workstation_nb);
+  double *flops_amount = xbt_new0(double, workstation_nb);
+  double *bytes_amount = xbt_new0(double, workstation_nb * workstation_nb);
 
 
-  if(task->computation_amount)
-    memcpy(computation_amount, task->computation_amount, sizeof(double) *
+  if(task->flops_amount)
+    memcpy(flops_amount, task->flops_amount, sizeof(double) *
            workstation_nb);
-  if(task->communication_amount)
-    memcpy(communication_amount, task->communication_amount,
+  if(task->bytes_amount)
+    memcpy(bytes_amount, task->bytes_amount,
            sizeof(double) * workstation_nb * workstation_nb);
 
   task->surf_action = surf_workstation_model_execute_parallel_task((surf_workstation_model_t)surf_workstation_model,
                                                                     workstation_nb,
                                                                     surf_workstations,
-                                                                    computation_amount,
-                                                                    communication_amount,
+                                                                    flops_amount,
+                                                                    bytes_amount,
                                                                     task->rate);
 
   surf_action_set_data(task->surf_action, task);
 
   XBT_DEBUG("surf_action = %p", task->surf_action);
 
-#ifdef HAVE_TRACING
   if (task->category)
     TRACE_surf_action(task->surf_action, task->category);
-#endif
 
   __SD_task_destroy_scheduling_data(task);      /* now the scheduling data are not useful anymore */
   __SD_task_set_state(task, SD_RUNNING);
@@ -1432,14 +1416,14 @@ void SD_task_distribute_comp_amdahl(SD_task_t task, int ws_count)
               "Task %s is not a SD_TASK_COMP_PAR_AMDAHL typed task."
               "Cannot use this function.",
               SD_task_get_name(task));  
-  task->computation_amount = xbt_new0(double, ws_count);
-  task->communication_amount = xbt_new0(double, ws_count * ws_count);
+  task->flops_amount = xbt_new0(double, ws_count);
+  task->bytes_amount = xbt_new0(double, ws_count * ws_count);
   xbt_free(task->workstation_list);
   task->workstation_nb = ws_count;
   task->workstation_list = xbt_new0(SD_workstation_t, ws_count);
   
   for(i=0;i<ws_count;i++){
-    task->computation_amount[i] = 
+    task->flops_amount[i] = 
       (task->alpha + (1 - task->alpha)/ws_count) * task->amount;
   }
 } 
@@ -1485,10 +1469,10 @@ void SD_task_schedulev(SD_task_t task, int count,
                count,task->workstation_nb);
     for (i = 0; i < count; i++)
       task->workstation_list[i] = list[i];
-    if (SD_task_get_kind(task)== SD_TASK_COMP_SEQ && !task->computation_amount){
-      /*This task has failed and is rescheduled. Reset the computation amount*/
-      task->computation_amount = xbt_new0(double, 1);
-      task->computation_amount[0] = task->remains;
+    if (SD_task_get_kind(task)== SD_TASK_COMP_SEQ && !task->flops_amount){
+      /*This task has failed and is rescheduled. Reset the flops_amount*/
+      task->flops_amount = xbt_new0(double, 1);
+      task->flops_amount[0] = task->remains;
     }
     SD_task_do_schedule(task);
     break;
@@ -1501,7 +1485,7 @@ void SD_task_schedulev(SD_task_t task, int count,
           SD_task_get_name(task),
           SD_workstation_get_name(task->workstation_list[0]),
           SD_workstation_get_name(task->workstation_list[1]),
-          task->communication_amount[2]);
+          task->bytes_amount[2]);
 
   }
 
@@ -1511,7 +1495,7 @@ void SD_task_schedulev(SD_task_t task, int count,
     XBT_VERB("Schedule computation task %s on %s. It costs %.f flops",
           SD_task_get_name(task),
           SD_workstation_get_name(task->workstation_list[0]),
-          task->computation_amount[0]);
+          task->flops_amount[0]);
 
     xbt_dynar_foreach(task->tasks_before, cpt, dep) {
       SD_task_t before = dep->src;
@@ -1527,7 +1511,7 @@ void SD_task_schedulev(SD_task_t task, int count,
                SD_task_get_name(before),
                SD_workstation_get_name(before->workstation_list[0]),
                SD_workstation_get_name(before->workstation_list[1]),
-               before->communication_amount[2]);
+               before->bytes_amount[2]);
         }
       }
     }
@@ -1544,7 +1528,7 @@ void SD_task_schedulev(SD_task_t task, int count,
                SD_task_get_name(after),
                SD_workstation_get_name(after->workstation_list[0]),
                SD_workstation_get_name(after->workstation_list[1]),
-               after->communication_amount[2]);
+               after->bytes_amount[2]);
 
         }
       }
@@ -1556,7 +1540,7 @@ void SD_task_schedulev(SD_task_t task, int count,
     XBT_VERB("Schedule computation task %s on %d workstations. %.f flops"
              " will be distributed following Amdahl's Law",
           SD_task_get_name(task), task->workstation_nb,
-          task->computation_amount[0]);
+          task->flops_amount[0]);
     xbt_dynar_foreach(task->tasks_before, cpt, dep) {
       SD_task_t before = dep->src;
       if (before->kind == SD_TASK_COMM_PAR_MXN_1D_BLOCK){
@@ -1584,11 +1568,11 @@ void SD_task_schedulev(SD_task_t task, int count,
                task->workstation_list[i];
 
           before->workstation_nb += count;
-          xbt_free(before->computation_amount);
-          xbt_free(before->communication_amount);
-          before->computation_amount = xbt_new0(double,
+          xbt_free(before->flops_amount);
+          xbt_free(before->bytes_amount);
+          before->flops_amount = xbt_new0(double,
                                                 before->workstation_nb);
-          before->communication_amount = xbt_new0(double,
+          before->bytes_amount = xbt_new0(double,
                                                   before->workstation_nb*
                                                   before->workstation_nb);
 
@@ -1603,13 +1587,13 @@ void SD_task_schedulev(SD_task_t task, int count,
                   SD_workstation_get_name(before->workstation_list[src_nb+j]),
                   src_start, src_end, dst_start, dst_end);
               if ((src_end <= dst_start) || (dst_end <= src_start)) {
-                before->communication_amount[i*(src_nb+dst_nb)+src_nb+j]=0.0;
+                before->bytes_amount[i*(src_nb+dst_nb)+src_nb+j]=0.0;
               } else {
-                before->communication_amount[i*(src_nb+dst_nb)+src_nb+j] =
+                before->bytes_amount[i*(src_nb+dst_nb)+src_nb+j] =
                   MIN(src_end, dst_end) - MAX(src_start, dst_start);
               }
               XBT_VERB("==> %.2f",
-                 before->communication_amount[i*(src_nb+dst_nb)+src_nb+j]);
+                 before->bytes_amount[i*(src_nb+dst_nb)+src_nb+j]);
             }
           }
 
@@ -1650,11 +1634,11 @@ void SD_task_schedulev(SD_task_t task, int count,
 
           after->workstation_nb += count;
 
-          xbt_free(after->computation_amount);
-          xbt_free(after->communication_amount);
+          xbt_free(after->flops_amount);
+          xbt_free(after->bytes_amount);
 
-          after->computation_amount = xbt_new0(double, after->workstation_nb);
-          after->communication_amount = xbt_new0(double,
+          after->flops_amount = xbt_new0(double, after->workstation_nb);
+          after->bytes_amount = xbt_new0(double,
                                                  after->workstation_nb*
                                                  after->workstation_nb);
 
@@ -1667,13 +1651,13 @@ void SD_task_schedulev(SD_task_t task, int count,
               XBT_VERB("(%d->%d): (%.2f, %.2f)-> (%.2f, %.2f)",
                   i, j, src_start, src_end, dst_start, dst_end);
               if ((src_end <= dst_start) || (dst_end <= src_start)) {
-                after->communication_amount[i*(src_nb+dst_nb)+src_nb+j]=0.0;
+                after->bytes_amount[i*(src_nb+dst_nb)+src_nb+j]=0.0;
               } else {
-                after->communication_amount[i*(src_nb+dst_nb)+src_nb+j] =
+                after->bytes_amount[i*(src_nb+dst_nb)+src_nb+j] =
                    MIN(src_end, dst_end)- MAX(src_start, dst_start);
               }
               XBT_VERB("==> %.2f",
-                 after->communication_amount[i*(src_nb+dst_nb)+src_nb+j]);
+                 after->bytes_amount[i*(src_nb+dst_nb)+src_nb+j]);
             }
           }
 
index 428c71a..5d08726 100644 (file)
@@ -5,13 +5,13 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "private.h"
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/dict.h"
 #include "xbt/lib.h"
 #include "xbt/sysdep.h"
 #include "surf/surf.h"
 #include "surf/surf_resource.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h" //FIXME: why?
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_workstation, sd,
                                 "Logging specific to SimDag (workstation)");
@@ -308,15 +308,15 @@ double SD_workstation_get_available_power(SD_workstation_t workstation)
  * \brief Returns an approximative estimated time for the given computation amount on a workstation
  *
  * \param workstation a workstation
- * \param computation_amount the computation amount you want to evaluate (in flops)
+ * \param flops_amount the computation amount you want to evaluate (in flops)
  * \return an approximative estimated computation time for the given computation amount on this workstation (in seconds)
  */
 double SD_workstation_get_computation_time(SD_workstation_t workstation,
-                                           double computation_amount)
+                                           double flops_amount)
 {
-  xbt_assert(computation_amount >= 0,
-              "computation_amount must be greater than or equal to zero");
-  return computation_amount / SD_workstation_get_power(workstation);
+  xbt_assert(flops_amount >= 0,
+              "flops_amount must be greater than or equal to zero");
+  return flops_amount / SD_workstation_get_power(workstation);
 }
 
 /**
@@ -386,13 +386,13 @@ double SD_route_get_current_bandwidth(SD_workstation_t src,
  *
  * \param src the first workstation
  * \param dst the second workstation
- * \param communication_amount the communication amount you want to evaluate (in bytes)
- * \return an approximative estimated computation time for the given communication amount
+ * \param bytes_amount the communication amount you want to evaluate (in bytes)
+ * \return an approximative estimated communication time for the given bytes amount
  * between the workstations (in seconds)
  */
 double SD_route_get_communication_time(SD_workstation_t src,
                                        SD_workstation_t dst,
-                                       double communication_amount)
+                                       double bytes_amount)
 {
 
 
@@ -405,12 +405,10 @@ double SD_route_get_communication_time(SD_workstation_t src,
   double latency;
   int i;
 
-  xbt_assert(communication_amount >= 0,
-              "communication_amount must be greater than or equal to zero");
+  xbt_assert(bytes_amount >= 0, "bytes_amount must be greater than or equal to zero");
 
 
-
-  if (communication_amount == 0.0)
+  if (bytes_amount == 0.0)
     return 0.0;
 
   links = SD_route_get_list(src, dst);
@@ -425,7 +423,7 @@ double SD_route_get_communication_time(SD_workstation_t src,
       min_bandwidth = bandwidth;
   }
 
-  return latency + (communication_amount / min_bandwidth);
+  return latency + (bytes_amount / min_bandwidth);
 }
 
 /**
index b2bda9f..ac0f9bb 100644 (file)
@@ -21,7 +21,7 @@
 #include "smpi/smpi_interface.h"
 #include "mc/mc.h"
 #include "mc/mc_record.h"
-#include "instr/instr.h"
+#include "simgrid/instr.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_config, surf,
                                 "About the configuration of simgrid");
@@ -70,10 +70,8 @@ static void sg_config_cmd_line(int *argc, char **argv)
 "to the command line.\n"
 "\n"
 "You can also use --help-models to see the details of all models known by this simulator.\n"
-#ifdef HAVE_TRACING
 "\n"
 "You can also use --help-tracing to see the details of all tracing options known by this simulator.\n"
-#endif
 "\n"
 "You can also use --help-logs and --help-log-categories to see the details of logging output.\n"
 "\n"
@@ -96,11 +94,9 @@ static void sg_config_cmd_line(int *argc, char **argv)
                surf_optimization_mode_description[k].description);
       printf("Both network and CPU models have 'Lazy' as default optimization level\n\n");
       shall_exit = 1;
-#ifdef HAVE_TRACING
     } else if (!strcmp(argv[i], "--help-tracing")) {
       TRACE_help (1);
       shall_exit = 1;
-#endif
     } else {
       argv[j++] = argv[i];
     }
index eb50d4d..35b3c8e 100644 (file)
@@ -223,21 +223,21 @@ double simcall_host_get_consumed_energy(smx_host_t host)
  *
  * \param name Name of the execution synchro to create
  * \param host SIMIX host where the synchro will be executed
- * \param computation_amount amount Computation amount (in bytes)
+ * \param flops_amount amount Computation amount (in flops)
  * \param priority computation priority
  * \param bound
  * \param affinity_mask
  * \return A new SIMIX execution synchronization
  */
 smx_synchro_t simcall_host_execute(const char *name, smx_host_t host,
-                                    double computation_amount,
+                                    double flops_amount,
                                     double priority, double bound, unsigned long affinity_mask)
 {
   /* checking for infinite values */
-  xbt_assert(isfinite(computation_amount), "computation_amount is not finite!");
+  xbt_assert(isfinite(flops_amount), "flops_amount is not finite!");
   xbt_assert(isfinite(priority), "priority is not finite!");
 
-  return simcall_BODY_host_execute(name, host, computation_amount, priority, bound, affinity_mask);
+  return simcall_BODY_host_execute(name, host, flops_amount, priority, bound, affinity_mask);
 }
 
 /**
@@ -248,8 +248,8 @@ smx_synchro_t simcall_host_execute(const char *name, smx_host_t host,
  * \param name Name of the execution synchro to create
  * \param host_nb Number of hosts where the synchro will be executed
  * \param host_list Array (of size host_nb) of hosts where the synchro will be executed
- * \param computation_amount Array (of size host_nb) of computation amount of hosts (in bytes)
- * \param communication_amount Array (of size host_nb * host_nb) representing the communication
+ * \param flops_amount Array (of size host_nb) of computation amount of hosts (in bytes)
+ * \param bytes_amount Array (of size host_nb * host_nb) representing the communication
  * amount between each pair of hosts
  * \param amount the SURF action amount
  * \param rate the SURF action rate
@@ -258,18 +258,18 @@ smx_synchro_t simcall_host_execute(const char *name, smx_host_t host,
 smx_synchro_t simcall_host_parallel_execute(const char *name,
                                          int host_nb,
                                          smx_host_t *host_list,
-                                         double *computation_amount,
-                                         double *communication_amount,
+                                         double *flops_amount,
+                                         double *bytes_amount,
                                          double amount,
                                          double rate)
 {
   int i,j;
   /* checking for infinite values */
   for (i = 0 ; i < host_nb ; ++i) {
-     xbt_assert(isfinite(computation_amount[i]), "computation_amount[%d] is not finite!", i);
+     xbt_assert(isfinite(flops_amount[i]), "flops_amount[%d] is not finite!", i);
      for (j = 0 ; j < host_nb ; ++j) {
-        xbt_assert(isfinite(communication_amount[i + host_nb * j]),
-             "communication_amount[%d+%d*%d] is not finite!", i, host_nb, j);
+        xbt_assert(isfinite(bytes_amount[i + host_nb * j]),
+             "bytes_amount[%d+%d*%d] is not finite!", i, host_nb, j);
      }
   }
 
@@ -277,8 +277,8 @@ smx_synchro_t simcall_host_parallel_execute(const char *name,
   xbt_assert(isfinite(rate), "rate is not finite!");
 
   return simcall_BODY_host_parallel_execute(name, host_nb, host_list,
-                                            computation_amount,
-                                            communication_amount,
+                                            flops_amount,
+                                            bytes_amount,
                                             amount, rate);
 
 }
@@ -1048,7 +1048,6 @@ void simcall_comm_wait(smx_synchro_t comm, double timeout)
   simcall_BODY_comm_wait(comm, timeout);
 }
 
-#ifdef HAVE_TRACING
 /**
  * \brief Set the category of an synchro.
  *
@@ -1063,7 +1062,6 @@ void simcall_set_category(smx_synchro_t synchro, const char *category)
   }
   simcall_BODY_set_category(synchro, category);
 }
-#endif
 
 /**
  * \ingroup simix_comm_management
index de024d6..be8bd66 100644 (file)
@@ -215,10 +215,10 @@ static inline smx_host_t simcall_host_execute__get__host(smx_simcall_t simcall)
 static inline void simcall_host_execute__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline double simcall_host_execute__get__computation_amount(smx_simcall_t simcall) {
+static inline double simcall_host_execute__get__flops_amount(smx_simcall_t simcall) {
   return  simcall->args[2].d;
 }
-static inline void simcall_host_execute__set__computation_amount(smx_simcall_t simcall, double arg) {
+static inline void simcall_host_execute__set__flops_amount(smx_simcall_t simcall, double arg) {
     simcall->args[2].d = arg;
 }
 static inline double simcall_host_execute__get__priority(smx_simcall_t simcall) {
@@ -264,16 +264,16 @@ static inline smx_host_t* simcall_host_parallel_execute__get__host_list(smx_simc
 static inline void simcall_host_parallel_execute__set__host_list(smx_simcall_t simcall, void* arg) {
     simcall->args[2].dp = arg;
 }
-static inline double* simcall_host_parallel_execute__get__computation_amount(smx_simcall_t simcall) {
+static inline double* simcall_host_parallel_execute__get__flops_amount(smx_simcall_t simcall) {
   return (double*) simcall->args[3].dp;
 }
-static inline void simcall_host_parallel_execute__set__computation_amount(smx_simcall_t simcall, void* arg) {
+static inline void simcall_host_parallel_execute__set__flops_amount(smx_simcall_t simcall, void* arg) {
     simcall->args[3].dp = arg;
 }
-static inline double* simcall_host_parallel_execute__get__communication_amount(smx_simcall_t simcall) {
+static inline double* simcall_host_parallel_execute__get__bytes_amount(smx_simcall_t simcall) {
   return (double*) simcall->args[4].dp;
 }
-static inline void simcall_host_parallel_execute__set__communication_amount(smx_simcall_t simcall, void* arg) {
+static inline void simcall_host_parallel_execute__set__bytes_amount(smx_simcall_t simcall, void* arg) {
     simcall->args[4].dp = arg;
 }
 static inline double simcall_host_parallel_execute__get__amount(smx_simcall_t simcall) {
@@ -1818,35 +1818,32 @@ static inline int simcall_mc_random__get__result(smx_simcall_t simcall){
 static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int result){
     simcall->result.i = result;
 }
-#ifdef HAVE_LATENCY_BOUND_TRACKING
 
-static inline smx_synchro_t simcall_comm_is_latency_bounded__get__comm(smx_simcall_t simcall) {
+static inline smx_synchro_t simcall_set_category__get__synchro(smx_simcall_t simcall) {
   return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_is_latency_bounded__set__comm(smx_simcall_t simcall, void* arg) {
+static inline void simcall_set_category__set__synchro(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline int simcall_comm_is_latency_bounded__get__result(smx_simcall_t simcall){
-    return  simcall->result.i;
+static inline const char* simcall_set_category__get__category(smx_simcall_t simcall) {
+  return  simcall->args[1].cc;
 }
-static inline void simcall_comm_is_latency_bounded__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
+static inline void simcall_set_category__set__category(smx_simcall_t simcall, const char* arg) {
+    simcall->args[1].cc = arg;
 }
-#endif
-
-#ifdef HAVE_TRACING
+#ifdef HAVE_LATENCY_BOUND_TRACKING
 
-static inline smx_synchro_t simcall_set_category__get__synchro(smx_simcall_t simcall) {
+static inline smx_synchro_t simcall_comm_is_latency_bounded__get__comm(smx_simcall_t simcall) {
   return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_set_category__set__synchro(smx_simcall_t simcall, void* arg) {
+static inline void simcall_comm_is_latency_bounded__set__comm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline const char* simcall_set_category__get__category(smx_simcall_t simcall) {
-  return  simcall->args[1].cc;
+static inline int simcall_comm_is_latency_bounded__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
 }
-static inline void simcall_set_category__set__category(smx_simcall_t simcall, const char* arg) {
-    simcall->args[1].cc = arg;
+static inline void simcall_comm_is_latency_bounded__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
 }
 #endif
 
@@ -1935,10 +1932,6 @@ int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max);
 
 #endif
 
-#ifdef HAVE_TRACING
-
-#endif
-
 #ifdef HAVE_MC
 mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall);
 int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2);
index 81efa33..0b413a2 100644 (file)
@@ -334,11 +334,11 @@ inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) {
     return self->simcall.result.d;
   }
   
-inline static smx_synchro_t simcall_BODY_host_execute(const char* name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask) {
+inline static smx_synchro_t simcall_BODY_host_execute(const char* name, smx_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_host_execute(name, host, computation_amount, priority, bound, affinity_mask);
+    if (0) SIMIX_host_execute(name, host, flops_amount, priority, bound, affinity_mask);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_EXECUTE;
@@ -346,7 +346,7 @@ inline static smx_synchro_t simcall_BODY_host_execute(const char* name, smx_host
     memset(self->simcall.args, 0, sizeof(self->simcall.args));
     self->simcall.args[0].cc = (const char*) name;
     self->simcall.args[1].dp = (void*) host;
-    self->simcall.args[2].d = (double) computation_amount;
+    self->simcall.args[2].d = (double) flops_amount;
     self->simcall.args[3].d = (double) priority;
     self->simcall.args[4].d = (double) bound;
     self->simcall.args[5].ul = (unsigned long) affinity_mask;
@@ -360,11 +360,11 @@ inline static smx_synchro_t simcall_BODY_host_execute(const char* name, smx_host
     return self->simcall.result.dp;
   }
   
-inline static smx_synchro_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* computation_amount, double* communication_amount, double amount, double rate) {
+inline static smx_synchro_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_host_parallel_execute(name, host_nb, host_list, computation_amount, communication_amount, amount, rate);
+    if (0) SIMIX_host_parallel_execute(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_PARALLEL_EXECUTE;
@@ -373,8 +373,8 @@ inline static smx_synchro_t simcall_BODY_host_parallel_execute(const char* name,
     self->simcall.args[0].cc = (const char*) name;
     self->simcall.args[1].i = (int) host_nb;
     self->simcall.args[2].dp = (void*) host_list;
-    self->simcall.args[3].dp = (void*) computation_amount;
-    self->simcall.args[4].dp = (void*) communication_amount;
+    self->simcall.args[3].dp = (void*) flops_amount;
+    self->simcall.args[4].dp = (void*) bytes_amount;
     self->simcall.args[5].d = (double) amount;
     self->simcall.args[6].d = (double) rate;
     if (self != simix_global->maestro_process) {
@@ -2609,19 +2609,19 @@ inline static int simcall_BODY_mc_random(int min, int max) {
     }    
     return self->simcall.result.i;
   }
-#ifdef HAVE_LATENCY_BOUND_TRACKING
   
-inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
+inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_comm_is_latency_bounded(comm);
+    if (0) SIMIX_set_category(synchro, category);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
-    self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
+    self->simcall.call = SIMCALL_SET_CATEGORY;
     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
     memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].dp = (void*) comm;
+    self->simcall.args[0].dp = (void*) synchro;
+    self->simcall.args[1].cc = (const char*) category;
     if (self != simix_global->maestro_process) {
       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
@@ -2629,24 +2629,21 @@ inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
     } else {
       SIMIX_simcall_handle(&self->simcall, 0);
     }    
-    return self->simcall.result.i;
+    
   }
-#endif
-
-#ifdef HAVE_TRACING
+#ifdef HAVE_LATENCY_BOUND_TRACKING
   
-inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
+inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_set_category(synchro, category);
+    if (0) SIMIX_comm_is_latency_bounded(comm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
-    self->simcall.call = SIMCALL_SET_CATEGORY;
+    self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
     memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].dp = (void*) synchro;
-    self->simcall.args[1].cc = (const char*) category;
+    self->simcall.args[0].dp = (void*) comm;
     if (self != simix_global->maestro_process) {
       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
@@ -2654,7 +2651,7 @@ inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char*
     } else {
       SIMIX_simcall_handle(&self->simcall, 0);
     }    
-    
+    return self->simcall.result.i;
   }
 #endif
 
index 634f039..40c949d 100644 (file)
@@ -137,14 +137,11 @@ typedef enum {
   SIMCALL_STORAGE_GET_CONTENT,
   SIMCALL_ASR_GET_PROPERTIES,
   SIMCALL_MC_RANDOM,
+  SIMCALL_SET_CATEGORY,
 #ifdef HAVE_LATENCY_BOUND_TRACKING
   SIMCALL_COMM_IS_LATENCY_BOUNDED,
 #endif
 
-#ifdef HAVE_TRACING
-  SIMCALL_SET_CATEGORY,
-#endif
-
 #ifdef HAVE_MC
   SIMCALL_MC_SNAPSHOT,
   SIMCALL_MC_COMPARE_SNAPSHOTS,
index b339a4a..fb72a40 100644 (file)
@@ -140,14 +140,11 @@ const char* simcall_names[] = {
   [SIMCALL_STORAGE_GET_CONTENT] = "SIMCALL_STORAGE_GET_CONTENT",
   [SIMCALL_ASR_GET_PROPERTIES] = "SIMCALL_ASR_GET_PROPERTIES",
   [SIMCALL_MC_RANDOM] = "SIMCALL_MC_RANDOM",
+  [SIMCALL_SET_CATEGORY] = "SIMCALL_SET_CATEGORY",
 #ifdef HAVE_LATENCY_BOUND_TRACKING
   [SIMCALL_COMM_IS_LATENCY_BOUNDED] = "SIMCALL_COMM_IS_LATENCY_BOUNDED",
 #endif
 
-#ifdef HAVE_TRACING
-  [SIMCALL_SET_CATEGORY] = "SIMCALL_SET_CATEGORY",
-#endif
-
 #ifdef HAVE_MC
   [SIMCALL_MC_SNAPSHOT] = "SIMCALL_MC_SNAPSHOT",
   [SIMCALL_MC_COMPARE_SNAPSHOTS] = "SIMCALL_MC_COMPARE_SNAPSHOTS",
@@ -742,17 +739,14 @@ case SIMCALL_MC_RANDOM:
       SIMIX_simcall_answer(simcall);
       break;  
 
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-case SIMCALL_COMM_IS_LATENCY_BOUNDED:
-      simcall->result.i = SIMIX_comm_is_latency_bounded((smx_synchro_t) simcall->args[0].dp);
+case SIMCALL_SET_CATEGORY:
+       SIMIX_set_category((smx_synchro_t) simcall->args[0].dp, simcall->args[1].cc);
       SIMIX_simcall_answer(simcall);
       break;  
 
-#endif
-
-#ifdef HAVE_TRACING
-case SIMCALL_SET_CATEGORY:
-       SIMIX_set_category((smx_synchro_t) simcall->args[0].dp, simcall->args[1].cc);
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+case SIMCALL_COMM_IS_LATENCY_BOUNDED:
+      simcall->result.i = SIMIX_comm_is_latency_bounded((smx_synchro_t) simcall->args[0].dp);
       SIMIX_simcall_answer(simcall);
       break;  
 
index 22578fd..154c162 100644 (file)
@@ -54,8 +54,8 @@ Func - host_get_nb_pstates (int) (host, void*, smx_host_t)
 Proc - host_set_power_peak_at (void) (host, void*, smx_host_t) (pstate_index, int)
 Func - host_get_consumed_energy (double) (host, void*, smx_host_t)
 
-Func - host_execute (void*, smx_synchro_t) (name, const char*) (host, void*, smx_host_t) (computation_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long)
-Func - host_parallel_execute (void*, smx_synchro_t) (name, const char*) (host_nb, int) (host_list, void*, smx_host_t*) (computation_amount, void*, double*) (communication_amount, void*, double*) (amount, double) (rate, double)
+Func - host_execute (void*, smx_synchro_t) (name, const char*) (host, void*, smx_host_t) (flops_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long)
+Func - host_parallel_execute (void*, smx_synchro_t) (name, const char*) (host_nb, int) (host_list, void*, smx_host_t*) (flops_amount, void*, double*) (bytes_amount, void*, double*) (amount, double) (rate, double)
 Proc - host_execution_destroy (void) (execution, void*, smx_synchro_t)
 Proc - host_execution_cancel (void) (execution, void*, smx_synchro_t)
 Func - host_execution_get_remains (double) (execution, void*, smx_synchro_t)
@@ -159,10 +159,9 @@ Func - storage_get_properties (void*, xbt_dict_t) (storage, void*, smx_storage_t
 Func - storage_get_content (void*, xbt_dict_t) (storage, void*, smx_storage_t)
 Func H asr_get_properties (void*, xbt_dict_t) (name, const char*)
 Func H mc_random (int) (min, int) (max, int)
+Proc - set_category (void) (synchro, void*, smx_synchro_t) (category, const char*)
 ## HAVE_LATENCY_BOUND_TRACKING
 Func - comm_is_latency_bounded (int) (comm, void*, smx_synchro_t)
-## HAVE_TRACING
-Proc - set_category (void) (synchro, void*, smx_synchro_t) (category, const char*)
 ## HAVE_MC
 Func H mc_snapshot (void*, mc_snapshot_t)
 Func H mc_compare_snapshots (int) (s1, void*, mc_snapshot_t) (s2, void*, mc_snapshot_t)
index ecd64f0..cb99d35 100644 (file)
@@ -456,9 +456,7 @@ void SIMIX_run(void)
 
   if (xbt_swag_size(simix_global->process_list) != 0) {
 
-#ifdef HAVE_TRACING
-    TRACE_end();
-#endif
+       TRACE_end();
 
     XBT_CRITICAL("Oops ! Deadlock or code not perfectly clean.");
     SIMIX_display_process_status();
index d05a6be..be58fe5 100644 (file)
@@ -363,7 +363,7 @@ void SIMIX_host_autorestart(smx_host_t host)
 }
 
 smx_synchro_t SIMIX_host_execute(const char *name,
-    smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask){
+    smx_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask){
 
   /* alloc structures and initialize */
   smx_synchro_t synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
@@ -371,15 +371,12 @@ smx_synchro_t SIMIX_host_execute(const char *name,
   synchro->name = xbt_strdup(name);
   synchro->state = SIMIX_RUNNING;
   synchro->execution.host = host;
-
-#ifdef HAVE_TRACING
   synchro->category = NULL;
-#endif
 
   /* set surf's action */
   if (!MC_is_active() && !MC_record_replay_is_active()) {
 
-    synchro->execution.surf_exec = surf_workstation_execute(host, computation_amount);
+    synchro->execution.surf_exec = surf_workstation_execute(host, flops_amount);
     surf_action_set_data(synchro->execution.surf_exec, synchro);
     surf_action_set_priority(synchro->execution.surf_exec, priority);
 
@@ -405,7 +402,7 @@ smx_synchro_t SIMIX_host_execute(const char *name,
 
 smx_synchro_t SIMIX_host_parallel_execute(const char *name,
     int host_nb, smx_host_t *host_list,
-    double *computation_amount, double *communication_amount,
+    double *flops_amount, double *bytes_amount,
     double amount, double rate){
 
   void **workstation_list = NULL;
@@ -417,10 +414,7 @@ smx_synchro_t SIMIX_host_parallel_execute(const char *name,
   synchro->name = xbt_strdup(name);
   synchro->state = SIMIX_RUNNING;
   synchro->execution.host = NULL; /* FIXME: do we need the list of hosts? */
-
-#ifdef HAVE_TRACING
   synchro->category = NULL;
-#endif
 
   /* set surf's synchro */
   workstation_list = xbt_new0(void *, host_nb);
@@ -444,7 +438,7 @@ smx_synchro_t SIMIX_host_parallel_execute(const char *name,
   if (!MC_is_active() && !MC_record_replay_is_active()) {
     synchro->execution.surf_exec =
       surf_workstation_model_execute_parallel_task((surf_workstation_model_t)surf_workstation_model,
-                 host_nb, workstation_list, computation_amount, communication_amount, rate);
+                 host_nb, workstation_list, flops_amount, bytes_amount, rate);
 
     surf_action_set_data(synchro->execution.surf_exec, synchro);
   }
@@ -610,7 +604,6 @@ void SIMIX_post_host_execute(smx_synchro_t synchro)
 }
 
 
-#ifdef HAVE_TRACING
 void SIMIX_set_category(smx_synchro_t synchro, const char *category)
 {
   if (synchro->state != SIMIX_RUNNING) return;
@@ -620,7 +613,6 @@ void SIMIX_set_category(smx_synchro_t synchro, const char *category)
     surf_action_set_category(synchro->comm.surf_comm, category);
   }
 }
-#endif
 
 /**
  * \brief Function to get the parameters of the given the SIMIX host.
index 33316bd..d267baa 100644 (file)
@@ -53,10 +53,10 @@ int SIMIX_host_get_nb_pstates(smx_host_t host);
 double SIMIX_host_get_consumed_energy(smx_host_t host);
 void SIMIX_host_set_power_peak_at(smx_host_t host, int pstate_index);
 smx_synchro_t SIMIX_host_execute(const char *name,
-    smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask);
+    smx_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask);
 smx_synchro_t SIMIX_host_parallel_execute(const char *name,
     int host_nb, smx_host_t *host_list,
-    double *computation_amount, double *communication_amount,
+    double *flops_amount, double *bytes_amount,
     double amount, double rate);
 void SIMIX_host_execution_destroy(smx_synchro_t synchro);
 void SIMIX_host_execution_cancel(smx_synchro_t synchro);
@@ -72,9 +72,8 @@ void SIMIX_host_execution_suspend(smx_synchro_t synchro);
 void SIMIX_host_execution_resume(smx_synchro_t synchro);
 
 void SIMIX_post_host_execute(smx_synchro_t synchro);
-#ifdef HAVE_TRACING
 void SIMIX_set_category(smx_synchro_t synchro, const char *category);
-#endif
+
 /* vm related stuff */
 smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host);
 
index be6a653..118b800 100644 (file)
@@ -70,9 +70,7 @@ smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, smx_host_t host)
   synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
   synchro->type = SIMIX_SYNC_IO;
   synchro->name = NULL;
-#ifdef HAVE_TRACING
   synchro->category = NULL;
-#endif
 
   synchro->io.host = host;
   synchro->io.surf_io = surf_workstation_read(host, fd->surf_file, size);
@@ -104,9 +102,7 @@ smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, smx_host_t host)
   synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
   synchro->type = SIMIX_SYNC_IO;
   synchro->name = NULL;
-#ifdef HAVE_TRACING
   synchro->category = NULL;
-#endif
 
   synchro->io.host = host;
   synchro->io.surf_io = surf_workstation_write(host, fd->surf_file, size);
@@ -138,9 +134,7 @@ smx_synchro_t SIMIX_file_open(const char* fullpath, smx_host_t host)
   synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
   synchro->type = SIMIX_SYNC_IO;
   synchro->name = NULL;
-#ifdef HAVE_TRACING
   synchro->category = NULL;
-#endif
 
   synchro->io.host = host;
   synchro->io.surf_io = surf_workstation_open(host, fullpath);
@@ -172,9 +166,7 @@ smx_synchro_t SIMIX_file_close(smx_file_t fd, smx_host_t host)
   synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
   synchro->type = SIMIX_SYNC_IO;
   synchro->name = NULL;
-#ifdef HAVE_TRACING
   synchro->category = NULL;
-#endif
 
   synchro->io.host = host;
   synchro->io.surf_io = surf_workstation_close(host, fd->surf_file);
index 9f47c97..942deb5 100644 (file)
@@ -258,9 +258,7 @@ smx_synchro_t SIMIX_comm_new(e_smx_comm_type_t type)
   synchro->latency_limited = -1;
 #endif
 
-#ifdef HAVE_TRACING
   synchro->category = NULL;
-#endif
 
   XBT_DEBUG("Create communicate synchro %p", synchro);
   ++smx_total_comms;
index 74f60d1..4a48723 100644 (file)
@@ -193,9 +193,7 @@ typedef struct s_smx_synchro {
   int latency_limited;
 #endif
 
-#ifdef HAVE_TRACING
   char *category;                     /* simix action category for instrumentation */
-#endif
 } s_smx_synchro_t;
 
 void SIMIX_context_mod_init(void);
index d2e80ba..b0c51cd 100644 (file)
@@ -739,9 +739,7 @@ smx_synchro_t SIMIX_process_sleep(smx_process_t process, double duration)
   synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
   synchro->type = SIMIX_SYNC_SLEEP;
   synchro->name = NULL;
-#ifdef HAVE_TRACING
   synchro->category = NULL;
-#endif
 
   synchro->sleep.host = host;
   synchro->sleep.surf_sleep =
index 83e6ac3..b775d4f 100644 (file)
@@ -12,7 +12,6 @@
 
 //attempt to do a quick autotuning version of the collective,
 
-#ifdef HAVE_TRACING
 #define TRACE_AUTO_COLL(cat) if (TRACE_is_enabled()){\
         type_t type = PJ_type_get_or_null (#cat, PJ_type_get_root());\
          if (!type){\
@@ -23,9 +22,6 @@
          val_t value = PJ_value_get_or_new(mpi_coll_##cat##_description[i].name,"1.0 1.0 1.0", type);\
          new_pajeNewEvent (SIMIX_get_clock(), PJ_container_get(cont_name), type, value);\
       }
-#else
-#define TRACE_AUTO_COLL(cat)
-#endif
 
 
 #define AUTOMATIC_COLL_BENCH(cat, ret, args, args2)\
index 1560ae5..fb091bd 100644 (file)
@@ -10,9 +10,6 @@
 #include <stdarg.h>
 #include <simgrid/sg_config.h>
 
-
-#ifdef HAVE_TRACING
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_smpi, instr, "Tracing SMPI");
 
 static xbt_dict_t keys;
@@ -420,4 +417,3 @@ void TRACE_smpi_recv(int rank, int src, int dst)
 
   new_pajeEndLink (SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key);
 }
-#endif /* HAVE_TRACING */
index 7c5be9d..a981757 100644 (file)
@@ -108,10 +108,8 @@ typedef struct s_smpi_mpi_request {
   MPI_Request detached_sender;
   int refcount;
   MPI_Op op;
-#ifdef HAVE_TRACING
   int send;
   int recv;
-#endif
 } s_smpi_mpi_request_t;
 
 typedef struct s_smpi_mpi_comm_key_elem {
@@ -738,7 +736,6 @@ void mpi_comm_spawn_multiple_ ( int* count, char *array_of_commands, char** arra
 void mpi_comm_get_parent_ ( int*parent, int* ierr);
 
 
-#ifdef HAVE_TRACING
 /********** Tracing **********/
 /* from smpi_instr.c */
 void TRACE_internal_smpi_set_category (const char *category);
@@ -761,7 +758,6 @@ void TRACE_smpi_send(int rank, int src, int dst, int size);
 void TRACE_smpi_recv(int rank, int src, int dst);
 void TRACE_smpi_init(int rank);
 void TRACE_smpi_finalize(int rank);
-#endif
 
 const char* encode_datatype(MPI_Datatype datatype, int* known);
 
index 768b13b..bc7ac71 100644 (file)
@@ -250,10 +250,8 @@ static MPI_Request build_request(void *buf, int count,
   else
     request->refcount = 0;
   request->op = MPI_REPLACE;
-#ifdef HAVE_TRACING
   request->send = 0;
   request->recv = 0;
-#endif
   if (flags & SEND) smpi_datatype_unuse(datatype);
 
   return request;
@@ -402,12 +400,10 @@ void smpi_mpi_start(MPI_Request request)
 
     int receiver = request->dst;
 
-    #ifdef HAVE_TRACING
-      int rank = request->src;
-      if (TRACE_smpi_view_internals()) {
-        TRACE_smpi_send(rank, rank, receiver,request->size);
-      }
-    #endif
+    int rank = request->src;
+    if (TRACE_smpi_view_internals()) {
+       TRACE_smpi_send(rank, rank, receiver,request->size);
+    }
     print_request("New send", request);
     
         //if we are giving back the control to the user without waiting for completion, we have to inject timings
@@ -490,12 +486,10 @@ void smpi_mpi_start(MPI_Request request)
 
 
 
-#ifdef HAVE_TRACING
     /* FIXME: detached sends are not traceable (request->action == NULL) */
     if (request->action)
-      simcall_set_category(request->action, TRACE_internal_smpi_get_category());
+       simcall_set_category(request->action, TRACE_internal_smpi_get_category());
 
-#endif
     xbt_mutex_release(mut);
   }
 
@@ -725,7 +719,6 @@ static void finish_wait(MPI_Request * request, MPI_Status * status)
 
   }
 
-#ifdef HAVE_TRACING
   if (TRACE_smpi_view_internals()) {
     if(req->flags & RECV){
       int rank = smpi_process_index();
@@ -733,7 +726,6 @@ static void finish_wait(MPI_Request * request, MPI_Status * status)
       TRACE_smpi_recv(rank, src_traced, rank);
     }
   }
-#endif
 
   if(req->detached_sender!=NULL){
     smpi_mpi_request_free(&(req->detached_sender));
index 26f7c54..79179a7 100644 (file)
@@ -158,9 +158,7 @@ void smpi_execute_flops(double flops) {
   host = SIMIX_host_self();
   XBT_DEBUG("Handle real computation time: %f flops", flops);
   action = simcall_host_execute("computation", host, flops, 1, 0, 0);
-#ifdef HAVE_TRACING
   simcall_set_category (action, TRACE_internal_smpi_get_category());
-#endif
   simcall_host_execution_wait(action);
   smpi_switch_data_segment(smpi_process_index());
 }
@@ -170,18 +168,14 @@ void smpi_execute(double duration)
   if (duration >= smpi_cpu_threshold) {
     XBT_DEBUG("Sleep for %g to handle real computation time", duration);
     double flops = duration * smpi_running_power;
-#ifdef HAVE_TRACING
     int rank = smpi_process_index();
     instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
     extra->type=TRACING_COMPUTING;
     extra->comp_size=flops;
     TRACE_smpi_computing_in(rank, extra);
-#endif
     smpi_execute_flops(flops);
 
-#ifdef HAVE_TRACING
     TRACE_smpi_computing_out(rank);
-#endif
 
   } else {
     XBT_DEBUG("Real computation took %g while option smpi/cpu_threshold is set to %g => ignore it",
@@ -230,17 +224,15 @@ static unsigned int private_sleep(double secs)
   smpi_bench_end();
 
   XBT_DEBUG("Sleep for: %lf secs", secs);
-  #ifdef HAVE_TRACING
   int rank = smpi_comm_rank(MPI_COMM_WORLD);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type=TRACING_SLEEPING;
   extra->sleep_duration=secs;
   TRACE_smpi_sleeping_in(rank, extra);
-#endif
+
   simcall_process_sleep(secs);
-#ifdef HAVE_TRACING
+
   TRACE_smpi_sleeping_out(rank);
-#endif
 
   smpi_bench_begin();
   return 0;
index 585847b..4e8202c 100644 (file)
@@ -528,9 +528,7 @@ static void smpi_init_logs(){
                                    function: xbt_log_appender_file.c depends on it
                                    DO NOT connect this in XBT or so, or it will be
                                    useless to xbt_log_appender_file.c */
-#ifdef HAVE_TRACING
   XBT_LOG_CONNECT(instr_smpi);
-#endif
   XBT_LOG_CONNECT(smpi_base);
   XBT_LOG_CONNECT(smpi_bench);
   XBT_LOG_CONNECT(smpi_coll);
@@ -641,12 +639,10 @@ int smpi_main(int (*realmain) (int argc, char *argv[]), int argc, char *argv[])
 
   smpi_init_logs();
 
-#ifdef HAVE_TRACING
   TRACE_global_init(&argc, argv);
 
   TRACE_add_start_function(TRACE_smpi_alloc);
   TRACE_add_end_function(TRACE_smpi_release);
-#endif
 
   SIMIX_global_init(&argc, argv);
 
@@ -691,9 +687,7 @@ int smpi_main(int (*realmain) (int argc, char *argv[]), int argc, char *argv[])
 
   smpi_global_destroy();
 
-#ifdef HAVE_TRACING
   TRACE_end();
-#endif
 
   return 0;
 }
@@ -705,11 +699,8 @@ void SMPI_init(){
   smpi_init_options();
   smpi_global_init();
   smpi_check_options();
-#ifdef HAVE_TRACING
-  if (TRACE_is_enabled() && TRACE_is_configured()) {
+  if (TRACE_is_enabled() && TRACE_is_configured())
     TRACE_smpi_alloc();
-  }
-#endif
   if(smpi_privatize_global_variables)
     smpi_initialize_global_memory_segments();
 }
index f9c75db..75e2edd 100644 (file)
@@ -11,7 +11,6 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_pmpi, smpi,
                                 "Logging specific to SMPI (pmpi)");
 
-#ifdef HAVE_TRACING
 //this function need to be here because of the calls to smpi_bench
 void TRACE_smpi_set_category(const char *category)
 {
@@ -21,7 +20,6 @@ void TRACE_smpi_set_category(const char *category)
   //begin bench after changing process's category
   smpi_bench_begin();
 }
-#endif
 
 /* PMPI User level calls */
 
@@ -29,7 +27,6 @@ int PMPI_Init(int *argc, char ***argv)
 {
   smpi_process_init(argc, argv);
   smpi_process_mark_as_initialized();
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   TRACE_smpi_init(rank);
   TRACE_smpi_computing_init(rank);
@@ -37,7 +34,6 @@ int PMPI_Init(int *argc, char ***argv)
   extra->type = TRACING_INIT;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   smpi_bench_begin();
   return MPI_SUCCESS;
 }
@@ -45,17 +41,15 @@ int PMPI_Init(int *argc, char ***argv)
 int PMPI_Finalize(void)
 {
   smpi_bench_end();
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_FINALIZE;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
-#endif
+
   smpi_process_finalize();
-#ifdef HAVE_TRACING
+
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
   TRACE_smpi_finalize(smpi_process_index());
-#endif
   smpi_process_destroy();
   return MPI_SUCCESS;
 }
@@ -75,7 +69,7 @@ int PMPI_Get_version (int *version,int *subversion){
 int PMPI_Get_library_version (char *version,int *len){
   int retval = MPI_SUCCESS;
   smpi_bench_end();
-  snprintf(version,MPI_MAX_LIBRARY_VERSION_STRING,"SMPI Version %d.%d. Copyright The Simgrid Team 2007-2014",SIMGRID_VERSION_MAJOR,
+  snprintf(version,MPI_MAX_LIBRARY_VERSION_STRING,"SMPI Version %d.%d. Copyright The Simgrid Team 2007-2015",SIMGRID_VERSION_MAJOR,
           SIMGRID_VERSION_MINOR);
   *len = strlen(version) > MPI_MAX_LIBRARY_VERSION_STRING ? MPI_MAX_LIBRARY_VERSION_STRING : strlen(version);
   smpi_bench_begin();
@@ -999,7 +993,6 @@ int PMPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src,
     retval = MPI_ERR_TAG;
   } else {
 
-#ifdef HAVE_TRACING
     int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
     int src_traced = smpi_group_index(smpi_comm_group(comm), src);
 
@@ -1014,15 +1007,12 @@ int PMPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src,
       dt_size_send = smpi_datatype_size(datatype);
     extra->send_size = count*dt_size_send;
     TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, extra);
-#endif
 
     *request = smpi_mpi_irecv(buf, count, datatype, src, tag, comm);
     retval = MPI_SUCCESS;
 
-#ifdef HAVE_TRACING
     TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
     (*request)->recv = 1;
-#endif
   }
 
   smpi_bench_begin();
@@ -1057,7 +1047,6 @@ int PMPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst,
     retval = MPI_ERR_TAG;
   } else {
 
-#ifdef HAVE_TRACING
     int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
     int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
     instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
@@ -1072,15 +1061,12 @@ int PMPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst,
     extra->send_size = count*dt_size_send;
     TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
     TRACE_smpi_send(rank, rank, dst_traced, count*smpi_datatype_size(datatype));
-#endif
 
     *request = smpi_mpi_isend(buf, count, datatype, dst, tag, comm);
     retval = MPI_SUCCESS;
 
-#ifdef HAVE_TRACING
     TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
     (*request)->send = 1;
-#endif
   }
 
   smpi_bench_begin();
@@ -1114,7 +1100,6 @@ int PMPI_Issend(void* buf, int count, MPI_Datatype datatype,
     retval = MPI_ERR_TAG;
   } else {
 
-#ifdef HAVE_TRACING
     int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
     int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
     instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
@@ -1129,15 +1114,12 @@ int PMPI_Issend(void* buf, int count, MPI_Datatype datatype,
     extra->send_size = count*dt_size_send;
     TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
     TRACE_smpi_send(rank, rank, dst_traced, count*smpi_datatype_size(datatype));
-#endif
 
     *request = smpi_mpi_issend(buf, count, datatype, dst, tag, comm);
     retval = MPI_SUCCESS;
 
-#ifdef HAVE_TRACING
     TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
     (*request)->send = 1;
-#endif
   }
 
   smpi_bench_begin();
@@ -1169,7 +1151,6 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag,
   } else if(tag<0 && tag !=  MPI_ANY_TAG){
     retval = MPI_ERR_TAG;
   } else {
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int src_traced = smpi_group_index(smpi_comm_group(comm), src);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
@@ -1183,19 +1164,16 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag,
     dt_size_send = smpi_datatype_size(datatype);
   extra->send_size = count*dt_size_send;
   TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, extra);
-#endif
 
     smpi_mpi_recv(buf, count, datatype, src, tag, comm, status);
     retval = MPI_SUCCESS;
 
-#ifdef HAVE_TRACING
   //the src may not have been known at the beginning of the recv (MPI_ANY_SOURCE)
   if(status!=MPI_STATUS_IGNORE){
     src_traced = smpi_group_index(smpi_comm_group(comm), status->MPI_SOURCE);
     TRACE_smpi_recv(rank, src_traced, rank);
   }
   TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -1225,7 +1203,6 @@ int PMPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag,
     retval = MPI_ERR_TAG;
   } else {
 
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
@@ -1240,14 +1217,11 @@ int PMPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag,
   extra->send_size = count*dt_size_send;
   TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
   TRACE_smpi_send(rank, rank, dst_traced,count*smpi_datatype_size(datatype));
-#endif
 
     smpi_mpi_send(buf, count, datatype, dst, tag, comm);
     retval = MPI_SUCCESS;
 
-#ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -1277,7 +1251,6 @@ int PMPI_Ssend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, MP
      retval = MPI_ERR_TAG;
    } else {
 
- #ifdef HAVE_TRACING
    int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
    int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
    instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
@@ -1291,14 +1264,11 @@ int PMPI_Ssend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, MP
      dt_size_send = smpi_datatype_size(datatype);
    extra->send_size = count*dt_size_send;
    TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);   TRACE_smpi_send(rank, rank, dst_traced,count*smpi_datatype_size(datatype));
- #endif
 
      smpi_mpi_ssend(buf, count, datatype, dst, tag, comm);
      retval = MPI_SUCCESS;
 
- #ifdef HAVE_TRACING
    TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
- #endif
    }
 
    smpi_bench_begin();
@@ -1334,7 +1304,6 @@ int PMPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     retval = MPI_ERR_TAG;
   } else {
 
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
   int src_traced = smpi_group_index(smpi_comm_group(comm), src);
@@ -1356,18 +1325,13 @@ int PMPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
 
   TRACE_smpi_ptp_in(rank, src_traced, dst_traced, __FUNCTION__, extra);
   TRACE_smpi_send(rank, rank, dst_traced,sendcount*smpi_datatype_size(sendtype));
-#endif
-
 
     smpi_mpi_sendrecv(sendbuf, sendcount, sendtype, dst, sendtag, recvbuf,
                       recvcount, recvtype, src, recvtag, comm, status);
     retval = MPI_SUCCESS;
 
-#ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, src_traced, dst_traced, __FUNCTION__);
   TRACE_smpi_recv(rank, src_traced, rank);
-#endif
-
   }
 
   smpi_bench_begin();
@@ -1411,7 +1375,6 @@ int PMPI_Test(MPI_Request * request, int *flag, MPI_Status * status)
     smpi_empty_status(status);
     retval = MPI_SUCCESS;
   } else {
-#ifdef HAVE_TRACING
     int rank = request && (*request)->comm != MPI_COMM_NULL
       ? smpi_process_index()
       : -1;
@@ -1419,11 +1382,10 @@ int PMPI_Test(MPI_Request * request, int *flag, MPI_Status * status)
     instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
     extra->type = TRACING_TEST;
     TRACE_smpi_testing_in(rank, extra);
-#endif
+
     *flag = smpi_mpi_test(request, status);
-#ifdef HAVE_TRACING
+
     TRACE_smpi_testing_out(rank);
-#endif
     retval = MPI_SUCCESS;
   }
   smpi_bench_begin();
@@ -1519,7 +1481,6 @@ int PMPI_Wait(MPI_Request * request, MPI_Status * status)
     retval = MPI_SUCCESS;
   } else {
 
-#ifdef HAVE_TRACING
     int rank = request && (*request)->comm != MPI_COMM_NULL
       ? smpi_process_index()
       : -1;
@@ -1531,12 +1492,10 @@ int PMPI_Wait(MPI_Request * request, MPI_Status * status)
     instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
     extra->type = TRACING_WAIT;
     TRACE_smpi_ptp_in(rank, src_traced, dst_traced, __FUNCTION__, extra);
-#endif
 
     smpi_mpi_wait(request, status);
     retval = MPI_SUCCESS;
 
-#ifdef HAVE_TRACING
     //the src may not have been known at the beginning of the recv (MPI_ANY_SOURCE)
     TRACE_smpi_ptp_out(rank, src_traced, dst_traced, __FUNCTION__);
     if (is_wait_for_receive) {
@@ -1546,8 +1505,6 @@ int PMPI_Wait(MPI_Request * request, MPI_Status * status)
           src_traced;
       TRACE_smpi_recv(rank, src_traced, dst_traced);
     }
-#endif
-
   }
 
   smpi_bench_begin();
@@ -1560,7 +1517,6 @@ int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta
     return MPI_ERR_ARG;
 
   smpi_bench_end();
-#ifdef HAVE_TRACING
   //save requests information for tracing
   int i;
   int *srcs = xbt_new0(int, count);
@@ -1583,9 +1539,8 @@ int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta
   extra->send_size=count;
   TRACE_smpi_ptp_in(rank_traced, -1, -1, __FUNCTION__,extra);
 
-#endif
   *index = smpi_mpi_waitany(count, requests, status);
-#ifdef HAVE_TRACING
+
   if(*index!=MPI_UNDEFINED){
     int src_traced = srcs[*index];
     //the src may not have been known at the beginning of the recv (MPI_ANY_SOURCE)
@@ -1605,7 +1560,6 @@ int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta
     xbt_free(comms);
 
   }
-#endif
   smpi_bench_begin();
   return MPI_SUCCESS;
 }
@@ -1614,7 +1568,6 @@ int PMPI_Waitall(int count, MPI_Request requests[], MPI_Status status[])
 {
 
   smpi_bench_end();
-#ifdef HAVE_TRACING
   //save information from requests
   int i;
   int *srcs = xbt_new0(int, count);
@@ -1641,9 +1594,9 @@ int PMPI_Waitall(int count, MPI_Request requests[], MPI_Status status[])
   extra->type = TRACING_WAITALL;
   extra->send_size=count;
   TRACE_smpi_ptp_in(rank_traced, -1, -1, __FUNCTION__,extra);
-#endif
+
   int retval = smpi_mpi_waitall(count, requests, status);
-#ifdef HAVE_TRACING
+
   for (i = 0; i < count; i++) {
     if(valid[i]){
     //int src_traced = srcs[*index];
@@ -1667,7 +1620,6 @@ int PMPI_Waitall(int count, MPI_Request requests[], MPI_Status status[])
   xbt_free(valid);
   xbt_free(comms);
 
-#endif
   smpi_bench_begin();
   return retval;
 }
@@ -1716,7 +1668,6 @@ int PMPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm c
   } else if (!is_datatype_valid(datatype)) {
       retval = MPI_ERR_ARG;
   } else {
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
 
@@ -1731,12 +1682,10 @@ int PMPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm c
   extra->send_size = count*dt_size_send;
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__, extra);
 
-#endif
     mpi_coll_bcast_fun(buf, count, datatype, root, comm);
     retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
-  TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-#endif
+
+    TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
   }
 
   smpi_bench_begin();
@@ -1752,17 +1701,15 @@ int PMPI_Barrier(MPI_Comm comm)
   if (comm == MPI_COMM_NULL) {
     retval = MPI_ERR_COMM;
   } else {
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_BARRIER;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
-#endif
-    mpi_coll_barrier_fun(comm);
-    retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
+
+  mpi_coll_barrier_fun(comm);
+  retval = MPI_SUCCESS;
+
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -1794,7 +1741,6 @@ int PMPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
       sendtmpcount=0;
       sendtmptype=recvtype;
     }
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
@@ -1813,15 +1759,13 @@ int PMPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   extra->recv_size = recvcount*dt_size_recv;
 
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__, extra);
-#endif
-    mpi_coll_gather_fun(sendtmpbuf, sendtmpcount, sendtmptype, recvbuf, recvcount,
+
+  mpi_coll_gather_fun(sendtmpbuf, sendtmpcount, sendtmptype, recvbuf, recvcount,
                     recvtype, root, comm);
 
 
     retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -1854,7 +1798,6 @@ int PMPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
       sendtmptype=recvtype;
     }
 
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   int i=0;
@@ -1878,13 +1821,11 @@ int PMPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     extra->recvcounts[i] = recvcounts[i]*dt_size_recv;
 
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
-#endif
-    smpi_mpi_gatherv(sendtmpbuf, sendtmpcount, sendtmptype, recvbuf, recvcounts,
+
+  smpi_mpi_gatherv(sendtmpbuf, sendtmpcount, sendtmptype, recvbuf, recvcounts,
                      displs, recvtype, root, comm);
     retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -1913,7 +1854,6 @@ int PMPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
       sendcount=recvcount;
       sendtype=recvtype;
     }
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLGATHER;
@@ -1930,14 +1870,11 @@ int PMPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   extra->recv_size = recvcount*dt_size_recv;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
-#endif
-    mpi_coll_allgather_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount,
+
+  mpi_coll_allgather_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                            recvtype, comm);
     retval = MPI_SUCCESS;
-
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
   smpi_bench_begin();
   return retval;
@@ -1967,7 +1904,6 @@ int PMPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
       sendcount=recvcounts[smpi_comm_rank(comm)];
       sendtype=recvtype;
     }
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int i=0;
   int size = smpi_comm_size(comm);
@@ -1989,13 +1925,11 @@ int PMPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     extra->recvcounts[i] = recvcounts[i]*dt_size_recv;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
+
     mpi_coll_allgatherv_fun(sendbuf, sendcount, sendtype, recvbuf, recvcounts,
                         displs, recvtype, comm);
     retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -2024,7 +1958,6 @@ int PMPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
         recvtype=sendtype;
         recvcount=sendcount;
     }
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
@@ -2042,13 +1975,11 @@ int PMPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     dt_size_recv = smpi_datatype_size(recvtype);
   extra->recv_size = recvcount*dt_size_recv;
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
-#endif
-    mpi_coll_scatter_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount,
+
+  mpi_coll_scatter_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                      recvtype, root, comm);
     retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -2075,7 +2006,6 @@ int PMPI_Scatterv(void *sendbuf, int *sendcounts, int *displs,
         recvtype=sendtype;
         recvcount=sendcounts[smpi_comm_rank(comm)];
     }
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   int i=0;
@@ -2099,13 +2029,11 @@ int PMPI_Scatterv(void *sendbuf, int *sendcounts, int *displs,
   extra->recv_size = recvcount*dt_size_recv;
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
 
-#endif
     smpi_mpi_scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf,
                       recvcount, recvtype, root, comm);
+
     retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -2124,7 +2052,6 @@ int PMPI_Reduce(void *sendbuf, void *recvbuf, int count,
   } else if (!is_datatype_valid(datatype) || op == MPI_OP_NULL) {
     retval = MPI_ERR_ARG;
   } else {
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
@@ -2138,13 +2065,11 @@ int PMPI_Reduce(void *sendbuf, void *recvbuf, int count,
   extra->root = root_traced;
 
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
-#endif
-    mpi_coll_reduce_fun(sendbuf, recvbuf, count, datatype, op, root, comm);
+
+  mpi_coll_reduce_fun(sendbuf, recvbuf, count, datatype, op, root, comm);
 
     retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -2186,7 +2111,6 @@ int PMPI_Allreduce(void *sendbuf, void *recvbuf, int count,
       sendtmpbuf = (char *)xbt_malloc(count*smpi_datatype_get_extent(datatype));
       smpi_datatype_copy(recvbuf, count, datatype,sendtmpbuf, count, datatype);
     }
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLREDUCE;
@@ -2198,17 +2122,14 @@ int PMPI_Allreduce(void *sendbuf, void *recvbuf, int count,
   extra->send_size = count*dt_size_send;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
-    mpi_coll_allreduce_fun(sendtmpbuf, recvbuf, count, datatype, op, comm);
 
-    if( sendbuf == MPI_IN_PLACE ) {
+  mpi_coll_allreduce_fun(sendtmpbuf, recvbuf, count, datatype, op, comm);
+
+    if( sendbuf == MPI_IN_PLACE )
       xbt_free(sendtmpbuf);
-    }
 
     retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -2229,7 +2150,6 @@ int PMPI_Scan(void *sendbuf, void *recvbuf, int count,
   } else if (op == MPI_OP_NULL) {
     retval = MPI_ERR_OP;
   } else {
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_SCAN;
@@ -2241,12 +2161,11 @@ int PMPI_Scan(void *sendbuf, void *recvbuf, int count,
   extra->send_size = count*dt_size_send;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
-    smpi_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm);
-    retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
+
+  smpi_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm);
+
+  retval = MPI_SUCCESS;
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -2266,7 +2185,6 @@ int PMPI_Exscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
   } else if (op == MPI_OP_NULL) {
     retval = MPI_ERR_OP;
   } else {
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_EXSCAN;
@@ -2277,12 +2195,10 @@ int PMPI_Exscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
     dt_size_send = smpi_datatype_size(datatype);
   extra->send_size = count*dt_size_send;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
-    smpi_mpi_exscan(sendbuf, recvbuf, count, datatype, op, comm);
+
+  smpi_mpi_exscan(sendbuf, recvbuf, count, datatype, op, comm);
     retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -2304,7 +2220,6 @@ int PMPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts,
   } else if (recvcounts == NULL) {
     retval = MPI_ERR_ARG;
   } else {
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int i=0;
   int size = smpi_comm_size(comm);
@@ -2321,18 +2236,15 @@ int PMPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts,
   for(i=0; i< size; i++)//copy data to avoid bad free
     extra->recvcounts[i] = recvcounts[i]*dt_size_send;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
-    void* sendtmpbuf=sendbuf;
-    if(sendbuf==MPI_IN_PLACE){
+
+  void* sendtmpbuf=sendbuf;
+    if(sendbuf==MPI_IN_PLACE)
       sendtmpbuf=recvbuf;
-    }
 
     mpi_coll_reduce_scatter_fun(sendtmpbuf, recvbuf, recvcounts,
                        datatype,  op, comm);
     retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -2356,7 +2268,6 @@ int PMPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount,
   } else {
     int count=smpi_comm_size(comm);
 
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_REDUCE_SCATTER;
@@ -2372,16 +2283,15 @@ int PMPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount,
     extra->recvcounts[i] = recvcount*dt_size_send;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
-    int* recvcounts=(int*)xbt_malloc(count);
+
+  int* recvcounts=(int*)xbt_malloc(count);
     for (i=0; i<count;i++)recvcounts[i]=recvcount;
     mpi_coll_reduce_scatter_fun(sendbuf, recvbuf, recvcounts,
                        datatype,  op, comm);
     xbt_free(recvcounts);
     retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
-  TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
+
+    TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
   }
 
   smpi_bench_begin();
@@ -2402,7 +2312,6 @@ int PMPI_Alltoall(void *sendbuf, int sendcount, MPI_Datatype sendtype,
              || recvtype == MPI_DATATYPE_NULL) {
     retval = MPI_ERR_TYPE;
   } else {
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLTOALL;
@@ -2418,11 +2327,10 @@ int PMPI_Alltoall(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   else
     extra->recv_size = recvcount;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
-    retval = mpi_coll_alltoall_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
-#ifdef HAVE_TRACING
+
+  retval = mpi_coll_alltoall_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
+
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -2446,7 +2354,6 @@ int PMPI_Alltoallv(void *sendbuf, int *sendcounts, int *senddisps,
              || recvdisps == NULL) {
     retval = MPI_ERR_ARG;
   } else {
-#ifdef HAVE_TRACING
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   int i=0;
   int size = smpi_comm_size(comm);
@@ -2474,14 +2381,12 @@ int PMPI_Alltoallv(void *sendbuf, int *sendcounts, int *senddisps,
   }
   extra->num_processes = size;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
-    retval =
+
+  retval =
         mpi_coll_alltoallv_fun(sendbuf, sendcounts, senddisps, sendtype,
                                   recvbuf, recvcounts, recvdisps, recvtype,
                                   comm);
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
 
   smpi_bench_begin();
@@ -2878,14 +2783,10 @@ int PMPI_Win_fence( int assert,  MPI_Win win){
   if (win == MPI_WIN_NULL) {
     retval = MPI_ERR_WIN;
   } else {
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, NULL);
-#endif
   retval = smpi_mpi_win_fence(assert, win);
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
 
   }
   smpi_bench_begin();
@@ -2912,19 +2813,15 @@ int PMPI_Get( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
             (!is_datatype_valid(target_datatype))) {
     retval = MPI_ERR_TYPE;
   } else {
-#ifdef HAVE_TRACING
     int rank = smpi_process_index();
     MPI_Group group;
     smpi_mpi_win_get_group(win, &group);
     int src_traced = smpi_group_index(group, target_rank);
     TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, NULL);
-#endif
 
     retval = smpi_mpi_get( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win);
 
-#ifdef HAVE_TRACING
     TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
-#endif
   }
   smpi_bench_begin();
   return retval;
@@ -2950,21 +2847,16 @@ int PMPI_Put( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
             (!is_datatype_valid(target_datatype))) {
     retval = MPI_ERR_TYPE;
   } else {
-#ifdef HAVE_TRACING
     int rank = smpi_process_index();
     MPI_Group group;
     smpi_mpi_win_get_group(win, &group);
     int dst_traced = smpi_group_index(group, target_rank);
     TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, NULL);
     TRACE_smpi_send(rank, rank, dst_traced, origin_count*smpi_datatype_size(origin_datatype));
-#endif
 
     retval = smpi_mpi_put( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win);
 
-#ifdef HAVE_TRACING
     TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
-#endif
-
   }
   smpi_bench_begin();
   return retval;
@@ -2993,20 +2885,15 @@ int PMPI_Accumulate( void *origin_addr, int origin_count, MPI_Datatype origin_da
   } else if (op == MPI_OP_NULL) {
     retval = MPI_ERR_OP;
   } else {
-#ifdef HAVE_TRACING
     int rank = smpi_process_index();
     MPI_Group group;
     smpi_mpi_win_get_group(win, &group);
     int src_traced = smpi_group_index(group, target_rank);
     TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, NULL);
-#endif
 
     retval = smpi_mpi_accumulate( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win);
 
-#ifdef HAVE_TRACING
     TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
-#endif
-
   }
   smpi_bench_begin();
   return retval;
@@ -3022,14 +2909,10 @@ int PMPI_Win_post(MPI_Group group, int assert, MPI_Win win){
     retval = MPI_ERR_GROUP;
   }
   else {
-#ifdef HAVE_TRACING
     int rank = smpi_process_index();
     TRACE_smpi_collective_in(rank, -1, __FUNCTION__, NULL);
-#endif
     retval = smpi_mpi_win_post(group,assert,win);
-#ifdef HAVE_TRACING
     TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
   smpi_bench_begin();
   return retval;
@@ -3044,14 +2927,10 @@ int PMPI_Win_start(MPI_Group group, int assert, MPI_Win win){
     retval = MPI_ERR_GROUP;
   }
   else {
-#ifdef HAVE_TRACING
     int rank = smpi_process_index();
     TRACE_smpi_collective_in(rank, -1, __FUNCTION__, NULL);
-#endif
     retval = smpi_mpi_win_start(group,assert,win);
-#ifdef HAVE_TRACING
     TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
   smpi_bench_begin();
   return retval;
@@ -3065,14 +2944,12 @@ int PMPI_Win_complete(MPI_Win win){
     retval = MPI_ERR_WIN;
   }
   else {
-#ifdef HAVE_TRACING
     int rank = smpi_process_index();
     TRACE_smpi_collective_in(rank, -1, __FUNCTION__, NULL);
-#endif
+
     retval = smpi_mpi_win_complete(win);
-#ifdef HAVE_TRACING
+
     TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
   smpi_bench_begin();
   return retval;
@@ -3085,14 +2962,12 @@ int PMPI_Win_wait(MPI_Win win){
     retval = MPI_ERR_WIN;
   }
   else {
-#ifdef HAVE_TRACING
     int rank = smpi_process_index();
     TRACE_smpi_collective_in(rank, -1, __FUNCTION__, NULL);
-#endif
+
     retval = smpi_mpi_win_wait(win);
-#ifdef HAVE_TRACING
+
     TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   }
   smpi_bench_begin();
   return retval;
index f08faf1..1636ea5 100644 (file)
@@ -196,18 +196,15 @@ static void action_compute(const char *const *action)
   CHECK_ACTION_PARAMS(action, 1, 0);
   double clock = smpi_process_simulated_elapsed();
   double flops= parse_double(action[2]);
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type=TRACING_COMPUTING;
   extra->comp_size=flops;
   TRACE_smpi_computing_in(rank, extra);
-#endif
+
   smpi_execute_flops(flops);
-#ifdef HAVE_TRACING
-  TRACE_smpi_computing_out(rank);
-#endif
 
+  TRACE_smpi_computing_out(rank);
   log_timed_action (action, clock);
 }
 
@@ -224,7 +221,6 @@ static void action_send(const char *const *action)
     MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
   }
 
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
 
   int dst_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), to);
@@ -236,16 +232,12 @@ static void action_send(const char *const *action)
   extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
   TRACE_smpi_send(rank, rank, dst_traced, size*smpi_datatype_size(MPI_CURRENT_TYPE));
-#endif
 
   smpi_mpi_send(NULL, size, MPI_CURRENT_TYPE, to , 0, MPI_COMM_WORLD);
 
   log_timed_action (action, clock);
 
-  #ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
-#endif
-
 }
 
 static void action_Isend(const char *const *action)
@@ -259,7 +251,6 @@ static void action_Isend(const char *const *action)
   if(action[4]) MPI_CURRENT_TYPE=decode_datatype(action[4]);
   else MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   int dst_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), to);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
@@ -270,14 +261,11 @@ static void action_Isend(const char *const *action)
   extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
   TRACE_smpi_send(rank, rank, dst_traced, size*smpi_datatype_size(MPI_CURRENT_TYPE));
-#endif
 
   request = smpi_mpi_isend(NULL, size, MPI_CURRENT_TYPE, to, 0,MPI_COMM_WORLD);
 
-#ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
   request->send = 1;
-#endif
 
   xbt_dynar_push(reqq[smpi_process_index()],&request);
 
@@ -294,7 +282,6 @@ static void action_recv(const char *const *action) {
   if(action[4]) MPI_CURRENT_TYPE=decode_datatype(action[4]);
   else MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   int src_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), from);
 
@@ -305,7 +292,6 @@ static void action_recv(const char *const *action) {
   extra->dst = rank;
   extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, extra);
-#endif
 
   //unknow size from the receiver pov
   if(size==-1){
@@ -315,10 +301,8 @@ static void action_recv(const char *const *action) {
 
   smpi_mpi_recv(NULL, size, MPI_CURRENT_TYPE, from, 0, MPI_COMM_WORLD, &status);
 
-#ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
   TRACE_smpi_recv(rank, src_traced, rank);
-#endif
 
   log_timed_action (action, clock);
 }
@@ -334,7 +318,6 @@ static void action_Irecv(const char *const *action)
   if(action[4]) MPI_CURRENT_TYPE=decode_datatype(action[4]);
   else MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   int src_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), from);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
@@ -344,7 +327,6 @@ static void action_Irecv(const char *const *action)
   extra->dst = rank;
   extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, extra);
-#endif
   MPI_Status status;
   //unknow size from the receiver pov
   if(size==-1){
@@ -354,10 +336,8 @@ static void action_Irecv(const char *const *action)
 
   request = smpi_mpi_irecv(NULL, size, MPI_CURRENT_TYPE, from, 0, MPI_COMM_WORLD);
 
-#ifdef HAVE_TRACING
   TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
   request->recv = 1;
-#endif
   xbt_dynar_push(reqq[smpi_process_index()],&request);
 
   log_timed_action (action, clock);
@@ -375,24 +355,20 @@ static void action_test(const char *const *action){
   //Different times in traced application and replayed version may lead to this 
   //In this case, ignore the extra calls.
   if(request){
-#ifdef HAVE_TRACING
-  int rank = smpi_process_index();
-  instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
-  extra->type=TRACING_TEST;
-  TRACE_smpi_testing_in(rank, extra);
-#endif
+         int rank = smpi_process_index();
+         instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
+         extra->type=TRACING_TEST;
+         TRACE_smpi_testing_in(rank, extra);
 
-    flag = smpi_mpi_test(&request, &status);
+         flag = smpi_mpi_test(&request, &status);
 
-  XBT_DEBUG("MPI_Test result: %d", flag);
-  /* push back request in dynar to be caught by a subsequent wait. if the test
-   * did succeed, the request is now NULL.
-   */
-  xbt_dynar_push_as(reqq[smpi_process_index()],MPI_Request, request);
+         XBT_DEBUG("MPI_Test result: %d", flag);
+         /* push back request in dynar to be caught by a subsequent wait. if the test
+          * did succeed, the request is now NULL.
+          */
+         xbt_dynar_push_as(reqq[smpi_process_index()],MPI_Request, request);
 
-#ifdef HAVE_TRACING
-  TRACE_smpi_testing_out(rank);
-#endif
+         TRACE_smpi_testing_out(rank);
   }
   log_timed_action (action, clock);
 }
@@ -415,7 +391,6 @@ static void action_wait(const char *const *action){
     return;
   }
 
-#ifdef HAVE_TRACING
   int rank = request->comm != MPI_COMM_NULL
       ? smpi_comm_rank(request->comm)
       : -1;
@@ -427,15 +402,12 @@ static void action_wait(const char *const *action){
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_WAIT;
   TRACE_smpi_ptp_in(rank, src_traced, dst_traced, __FUNCTION__, extra);
-#endif
+
   smpi_mpi_wait(&request, &status);
-#ifdef HAVE_TRACING
+
   TRACE_smpi_ptp_out(rank, src_traced, dst_traced, __FUNCTION__);
-  if (is_wait_for_receive) {
+  if (is_wait_for_receive)
     TRACE_smpi_recv(rank, src_traced, dst_traced);
-  }
-#endif
-
   log_timed_action (action, clock);
 }
 
@@ -455,7 +427,6 @@ static void action_waitall(const char *const *action){
      Thus each rank saves its own requests to the array request. */
     xbt_dynar_foreach(reqq[smpi_process_index()],i,requests[i]); 
 
-  #ifdef HAVE_TRACING
    //save information from requests
 
    xbt_dynar_t srcs = xbt_dynar_new(sizeof(int), NULL);
@@ -488,11 +459,9 @@ static void action_waitall(const char *const *action){
    extra->type = TRACING_WAITALL;
    extra->send_size=count_requests;
    TRACE_smpi_ptp_in(rank_traced, -1, -1, __FUNCTION__,extra);
- #endif
 
-    smpi_mpi_waitall(count_requests, requests, status);
+   smpi_mpi_waitall(count_requests, requests, status);
 
-  #ifdef HAVE_TRACING
    for (i = 0; i < count_requests; i++) {
     int src_traced, dst_traced, is_wait_for_receive;
     xbt_dynar_get_cpy(srcs, i, &src_traced);
@@ -507,7 +476,6 @@ static void action_waitall(const char *const *action){
    xbt_dynar_free(&srcs);
    xbt_dynar_free(&dsts);
    xbt_dynar_free(&recvs);
-  #endif
 
    int freedrank=smpi_process_index();
    xbt_dynar_free_container(&(reqq[freedrank]));
@@ -518,17 +486,14 @@ static void action_waitall(const char *const *action){
 
 static void action_barrier(const char *const *action){
   double clock = smpi_process_simulated_elapsed();
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_BARRIER;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
-#endif
+
   mpi_coll_barrier_fun(MPI_COMM_WORLD);
-#ifdef HAVE_TRACING
-  TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
 
+  TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
   log_timed_action (action, clock);
 }
 
@@ -552,7 +517,6 @@ static void action_bcast(const char *const *action)
     }
   }
 
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   int root_traced = smpi_group_index(smpi_comm_group(MPI_COMM_WORLD), root);
 
@@ -562,13 +526,11 @@ static void action_bcast(const char *const *action)
   extra->root = root_traced;
   extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__, extra);
+  void *sendbuf = smpi_get_tmp_sendbuffer(size* smpi_datatype_size(MPI_CURRENT_TYPE));
 
-#endif
-    void *sendbuf = smpi_get_tmp_sendbuffer(size* smpi_datatype_size(MPI_CURRENT_TYPE));
   mpi_coll_bcast_fun(sendbuf, size, MPI_CURRENT_TYPE, root, MPI_COMM_WORLD);
-#ifdef HAVE_TRACING
+
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-#endif
   log_timed_action (action, clock);
 }
 
@@ -590,7 +552,6 @@ static void action_reduce(const char *const *action)
   
   
 
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   int root_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), root);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
@@ -601,14 +562,13 @@ static void action_reduce(const char *const *action)
   extra->root = root_traced;
 
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
-#endif
-    void *recvbuf = smpi_get_tmp_sendbuffer(comm_size* smpi_datatype_size(MPI_CURRENT_TYPE));
-    void *sendbuf = smpi_get_tmp_sendbuffer(comm_size* smpi_datatype_size(MPI_CURRENT_TYPE));
+
+  void *recvbuf = smpi_get_tmp_sendbuffer(comm_size* smpi_datatype_size(MPI_CURRENT_TYPE));
+  void *sendbuf = smpi_get_tmp_sendbuffer(comm_size* smpi_datatype_size(MPI_CURRENT_TYPE));
    mpi_coll_reduce_fun(sendbuf, recvbuf, comm_size, MPI_CURRENT_TYPE, MPI_OP_NULL, root, MPI_COMM_WORLD);
    smpi_execute_flops(comp_size);
-#ifdef HAVE_TRACING
+
   TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__);
-#endif
   log_timed_action (action, clock);
 }
 
@@ -621,23 +581,20 @@ static void action_allReduce(const char *const *action) {
   else MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
 
   double clock = smpi_process_simulated_elapsed();
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLREDUCE;
   extra->send_size = comm_size;
   extra->comp_size = comp_size;
   extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
-
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
-    void *recvbuf = smpi_get_tmp_sendbuffer(comm_size* smpi_datatype_size(MPI_CURRENT_TYPE));
-    void *sendbuf = smpi_get_tmp_sendbuffer(comm_size* smpi_datatype_size(MPI_CURRENT_TYPE));
+
+  void *recvbuf = smpi_get_tmp_sendbuffer(comm_size* smpi_datatype_size(MPI_CURRENT_TYPE));
+  void *sendbuf = smpi_get_tmp_sendbuffer(comm_size* smpi_datatype_size(MPI_CURRENT_TYPE));
   mpi_coll_allreduce_fun(sendbuf, recvbuf, comm_size, MPI_CURRENT_TYPE, MPI_OP_NULL, MPI_COMM_WORLD);
   smpi_execute_flops(comp_size);
-#ifdef HAVE_TRACING
+
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   log_timed_action (action, clock);
 }
 
@@ -659,7 +616,6 @@ static void action_allToAll(const char *const *action) {
   void *send = smpi_get_tmp_sendbuffer(send_size*comm_size* smpi_datatype_size(MPI_CURRENT_TYPE));
   void *recv = smpi_get_tmp_recvbuffer(recv_size*comm_size* smpi_datatype_size(MPI_CURRENT_TYPE2));
 
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLTOALL;
@@ -669,15 +625,11 @@ static void action_allToAll(const char *const *action) {
   extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2, NULL);
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
 
   mpi_coll_alltoall_fun(send, send_size, MPI_CURRENT_TYPE, recv, recv_size, MPI_CURRENT_TYPE2, MPI_COMM_WORLD);
 
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   log_timed_action (action, clock);
-
 }
 
 
@@ -717,7 +669,6 @@ static void action_gather(const char *const *action) {
   if(rank==root)
     recv = smpi_get_tmp_recvbuffer(recv_size*comm_size* smpi_datatype_size(MPI_CURRENT_TYPE2));
 
-#ifdef HAVE_TRACING
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_GATHER;
   extra->send_size = send_size;
@@ -727,16 +678,13 @@ static void action_gather(const char *const *action) {
   extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2, NULL);
 
   TRACE_smpi_collective_in(smpi_process_index(), root, __FUNCTION__, extra);
-#endif
+
   mpi_coll_gather_fun(send, send_size, MPI_CURRENT_TYPE,
                 recv, recv_size, MPI_CURRENT_TYPE2,
                 root, MPI_COMM_WORLD);
 
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(smpi_process_index(), -1, __FUNCTION__);
-#endif
   log_timed_action (action, clock);
-
 }
 
 
@@ -785,7 +733,6 @@ static void action_gatherv(const char *const *action) {
   if(rank==root)
     recv = smpi_get_tmp_recvbuffer(recv_sum* smpi_datatype_size(MPI_CURRENT_TYPE2));
 
-#ifdef HAVE_TRACING
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_GATHERV;
   extra->send_size = send_size;
@@ -798,15 +745,12 @@ static void action_gatherv(const char *const *action) {
   extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2, NULL);
 
   TRACE_smpi_collective_in(smpi_process_index(), root, __FUNCTION__, extra);
-#endif
-smpi_mpi_gatherv(send, send_size, MPI_CURRENT_TYPE,
+
+  smpi_mpi_gatherv(send, send_size, MPI_CURRENT_TYPE,
                 recv, recvcounts, disps, MPI_CURRENT_TYPE2,
                 root, MPI_COMM_WORLD);
 
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(smpi_process_index(), -1, __FUNCTION__);
-#endif
-
   log_timed_action (action, clock);
   xbt_free(recvcounts);
   xbt_free(disps);
@@ -848,7 +792,6 @@ static void action_reducescatter(const char *const *action) {
     size+=recvcounts[i];
   }
 
-#ifdef HAVE_TRACING
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_REDUCE_SCATTER;
   extra->send_size = 0;
@@ -860,18 +803,16 @@ static void action_reducescatter(const char *const *action) {
   extra->num_processes = comm_size;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
+
   void *sendbuf = smpi_get_tmp_sendbuffer(size* smpi_datatype_size(MPI_CURRENT_TYPE));
-   void *recvbuf = smpi_get_tmp_recvbuffer(size* smpi_datatype_size(MPI_CURRENT_TYPE));
+  void *recvbuf = smpi_get_tmp_recvbuffer(size* smpi_datatype_size(MPI_CURRENT_TYPE));
    
    mpi_coll_reduce_scatter_fun(sendbuf, recvbuf, recvcounts, MPI_CURRENT_TYPE, MPI_OP_NULL,
        MPI_COMM_WORLD);
    smpi_execute_flops(comp_size);
 
 
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
   xbt_free(recvcounts);
   xbt_free(disps);
   log_timed_action (action, clock);
@@ -909,7 +850,6 @@ static void action_allgather(const char *const *action) {
   void *sendbuf = smpi_get_tmp_sendbuffer(sendcount* smpi_datatype_size(MPI_CURRENT_TYPE));
   void *recvbuf = smpi_get_tmp_recvbuffer(recvcount* smpi_datatype_size(MPI_CURRENT_TYPE2));
 
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLGATHER;
@@ -920,14 +860,10 @@ static void action_allgather(const char *const *action) {
   extra->num_processes = smpi_comm_size(MPI_COMM_WORLD);
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
 
   mpi_coll_allgather_fun(sendbuf, sendcount, MPI_CURRENT_TYPE, recvbuf, recvcount, MPI_CURRENT_TYPE2, MPI_COMM_WORLD);
 
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
-
   log_timed_action (action, clock);
 }
 
@@ -972,7 +908,6 @@ static void action_allgatherv(const char *const *action) {
   }
   void *recvbuf = smpi_get_tmp_recvbuffer(recv_sum* smpi_datatype_size(MPI_CURRENT_TYPE2));
 
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLGATHERV;
@@ -985,14 +920,10 @@ static void action_allgatherv(const char *const *action) {
   extra->num_processes = comm_size;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
 
   mpi_coll_allgatherv_fun(sendbuf, sendcount, MPI_CURRENT_TYPE, recvbuf, recvcounts, disps, MPI_CURRENT_TYPE2, MPI_COMM_WORLD);
 
-#ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
-
   log_timed_action (action, clock);
   xbt_free(recvcounts);
   xbt_free(disps);
@@ -1045,7 +976,6 @@ static void action_allToAllv(const char *const *action) {
   }
 
 
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLTOALLV;
@@ -1063,14 +993,12 @@ static void action_allToAllv(const char *const *action) {
   extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2, NULL);
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
+
   mpi_coll_alltoallv_fun(sendbuf, sendcounts, senddisps, MPI_CURRENT_TYPE,
                                recvbuf, recvcounts, recvdisps, MPI_CURRENT_TYPE,
                                MPI_COMM_WORLD);
-#ifdef HAVE_TRACING
-  TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
 
+  TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
   log_timed_action (action, clock);
   xbt_free(sendcounts);
   xbt_free(recvcounts);
@@ -1082,7 +1010,7 @@ void smpi_replay_init(int *argc, char***argv){
   smpi_process_init(argc, argv);
   smpi_process_mark_as_initialized();
   smpi_process_set_replaying(1);
-#ifdef HAVE_TRACING
+
   int rank = smpi_process_index();
   TRACE_smpi_init(rank);
   TRACE_smpi_computing_init(rank);
@@ -1090,7 +1018,6 @@ void smpi_replay_init(int *argc, char***argv){
   extra->type = TRACING_INIT;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
 
   if (!smpi_process_index()){
     _xbt_replay_action_init();
@@ -1169,17 +1096,15 @@ int smpi_replay_finalize(){
   }
   
 
-#ifdef HAVE_TRACING
   int rank = smpi_process_index();
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_FINALIZE;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
-#endif
+
   smpi_process_finalize();
-#ifdef HAVE_TRACING
+
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
   TRACE_smpi_finalize(smpi_process_index());
-#endif
   smpi_process_destroy();
   return MPI_SUCCESS;
 }
index 98ad19a..342c6e5 100644 (file)
@@ -6,7 +6,6 @@
 
 #include "cpu_cas01.hpp"
 #include "cpu_ti.hpp"
-#include "plugins/energy.hpp"
 #include "maxmin_private.hpp"
 #include "simgrid/sg_config.h"
 
@@ -231,11 +230,9 @@ void CpuCas01::updateState(tmgr_trace_event_t event_type, double value, double d
     lmm_update_constraint_bound(getModel()->getMaxminSystem(), getConstraint(),
                                 m_core * m_powerScale *
                                 m_powerPeak);
-#ifdef HAVE_TRACING
     TRACE_surf_host_set_power(date, getName(),
                               m_core * m_powerScale *
                               m_powerPeak);
-#endif
     while ((var = lmm_get_var_from_cnst
             (getModel()->getMaxminSystem(), getConstraint(), &elem))) {
       CpuCas01ActionPtr action = static_cast<CpuCas01ActionPtr>(lmm_variable_id(var));
index 7dc2d1a..906e07e 100644 (file)
@@ -57,7 +57,6 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/)
          && (double_equals(xbt_heap_maxkey(getActionHeap()), now, sg_surf_precision))) {
     action = static_cast<CpuActionPtr>(xbt_heap_pop(getActionHeap()));
     XBT_CDEBUG(surf_kernel, "Something happened to action %p", action);
-#ifdef HAVE_TRACING
     if (TRACE_is_enabled()) {
       CpuPtr cpu = static_cast<CpuPtr>(lmm_constraint_id(lmm_get_cnst_from_var(getMaxminSystem(), action->getVariable(), 0)));
       TRACE_surf_host_set_utilization(cpu->getName(), action->getCategory(),
@@ -65,7 +64,6 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/)
                                       action->getLastUpdate(),
                                       now - action->getLastUpdate());
     }
-#endif
 
     action->finish();
     XBT_CDEBUG(surf_kernel, "Action %p finished", action);
@@ -75,7 +73,6 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/)
     action->setState(SURF_ACTION_DONE);
     action->heapRemove(getActionHeap()); //FIXME: strange call since action was already popped
   }
-#ifdef HAVE_TRACING
   if (TRACE_is_enabled()) {
     //defining the last timestamp that we can safely dump to trace file
     //without losing the event ascending order (considering all CPU's)
@@ -96,7 +93,6 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/)
       TRACE_last_timestamp_to_dump = smaller;
     }
   }
-#endif
   return;
 }
 
@@ -109,7 +105,6 @@ void CpuModel::updateActionsStateFull(double now, double delta)
      ; it != itend ; it=itNext) {
        ++itNext;
     action = static_cast<CpuActionPtr>(&*it);
-#ifdef HAVE_TRACING
     if (TRACE_is_enabled()) {
       CpuPtr x = (CpuPtr) lmm_constraint_id(lmm_get_cnst_from_var
                               (getMaxminSystem(), action->getVariable(), 0));
@@ -121,7 +116,6 @@ void CpuModel::updateActionsStateFull(double now, double delta)
                                       delta);
       TRACE_last_timestamp_to_dump = now - delta;
     }
-#endif
 
     action->updateRemains(lmm_variable_getvalue(action->getVariable()) * delta);
 
@@ -251,12 +245,10 @@ void CpuAction::updateRemainingLazy(double now)
     XBT_CDEBUG(surf_kernel, "Updating action(%p): remains was %f, last_update was: %f", this, m_remains, m_lastUpdate);
     double_update(&(m_remains), m_lastValue * delta, sg_maxmin_precision*sg_surf_precision);
 
-#ifdef HAVE_TRACING
     if (TRACE_is_enabled()) {
       CpuPtr cpu = static_cast<CpuPtr>(lmm_constraint_id(lmm_get_cnst_from_var(getModel()->getMaxminSystem(), getVariable(), 0)));
       TRACE_surf_host_set_utilization(cpu->getName(), getCategory(), m_lastValue, m_lastUpdate, now - m_lastUpdate);
     }
-#endif
     XBT_CDEBUG(surf_kernel, "Updating action(%p): remains is now %f", this, m_remains);
   }
 
index 7dd95b1..11cd8a6 100644 (file)
@@ -6,7 +6,6 @@
 
 #include "instr/instr_private.h"
 
-#ifdef HAVE_TRACING
 #include "surf/surf_private.h"
 #include "xbt/graph.h"
 
@@ -509,6 +508,3 @@ void instr_routing_platform_graph_export_graphviz (xbt_graph_t g, const char *fi
   fclose(file);
 
 }
-
-#endif /* HAVE_TRACING */
-
index 9a2764a..445ffb0 100644 (file)
@@ -7,8 +7,6 @@
 #include "instr/instr_private.h"
 #include "surf/surf_private.h"
 
-#ifdef HAVE_TRACING
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_surf, instr, "Tracing Surf");
 
 void TRACE_surf_alloc(void)
@@ -58,4 +56,3 @@ void TRACE_surf_action(surf_action_t surf_action, const char *category)
 
   surf_action_set_category(surf_action, category);
 }
-#endif /* HAVE_TRACING */
index fe4d32d..adc366b 100644 (file)
@@ -233,7 +233,6 @@ void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)
          && (double_equals(xbt_heap_maxkey(p_actionHeap), now, sg_surf_precision))) {
     action = (NetworkCm02ActionPtr) xbt_heap_pop(p_actionHeap);
     XBT_DEBUG("Something happened to action %p", action);
-#ifdef HAVE_TRACING
     if (TRACE_is_enabled()) {
       int n = lmm_get_number_of_cnst_from_var(p_maxminSystem, action->getVariable());
       int i;
@@ -252,7 +251,6 @@ void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)
                                         now - action->getLastUpdate());
       }
     }
-#endif
 
     // if I am wearing a latency hat
     if (action->getHat() == LATENCY) {
@@ -303,7 +301,6 @@ void NetworkCm02Model::updateActionsStateFull(double now, double delta)
           lmm_update_variable_weight(p_maxminSystem, action->getVariable(),
               action->m_weight);
       }
-  #ifdef HAVE_TRACING
       if (TRACE_is_enabled()) {
         int n = lmm_get_number_of_cnst_from_var(p_maxminSystem, action->getVariable());
         int i;
@@ -322,7 +319,6 @@ void NetworkCm02Model::updateActionsStateFull(double now, double delta)
                                         now - action->getLastUpdate());
         }
       }
-  #endif
       if (!lmm_get_number_of_cnst_from_var
           (p_maxminSystem, action->getVariable())) {
         /* There is actually no link used, hence an infinite bandwidth.
@@ -624,9 +620,7 @@ void NetworkCm02Link::updateBandwidth(double value, double date){
                               getConstraint(),
                               sg_bandwidth_factor *
                               (p_power.peak * p_power.scale));
-#ifdef HAVE_TRACING
   TRACE_surf_link_set_bandwidth(date, getName(), sg_bandwidth_factor * p_power.peak * p_power.scale);
-#endif
   if (sg_weight_S_parameter > 0) {
     while ((var = lmm_get_var_from_cnst_safe(getModel()->getMaxminSystem(), getConstraint(), &elem, &nextelem, &numelem))) {
       action = (NetworkCm02ActionPtr) lmm_variable_id(var);
index 1f17a2c..06001ba 100644 (file)
@@ -141,12 +141,10 @@ void NetworkConstantAction::cancel()
   return;
 }
 
-#ifdef HAVE_TRACING
 void NetworkConstantAction::setCategory(const char */*category*/)
 {
   //ignore completely the categories in constant model, they are not traced
 }
-#endif
 
 void NetworkConstantAction::suspend()
 {
index 2cbcf73..7cc1c5a 100644 (file)
@@ -115,16 +115,12 @@ public:
 
   double m_latency;
   double m_latCurrent;
-#ifdef HAVE_TRACING
   int m_lastRemains;
-#endif
   lmm_variable_t p_variable;
   double m_rate;
   int m_suspended;
-#ifdef HAVE_TRACING
   RoutingEdgePtr src;
   RoutingEdgePtr dst;
-#endif //HAVE_TRACING
 };
 
 #endif /* NETWORK_GTNETS_HPP_ */
index 789dc98..75effec 100644 (file)
@@ -328,11 +328,9 @@ ActionPtr NetworkNS3Model::communicate(RoutingEdgePtr src, RoutingEdgePtr dst,
 
   ns3_create_flow(src->getName(), dst->getName(), surf_get_clock(), size, action);
 
-#ifdef HAVE_TRACING
   action->m_lastSent = 0;
   action->p_srcElm = src;
   action->p_dstElm = dst;
-#endif
   surf_callback_emit(networkCommunicateCallbacks, action, src, dst, size, rate);
 
   return (surf_action_t) action;
@@ -382,27 +380,25 @@ void NetworkNS3Model::updateActionsState(double now, double delta)
     XBT_DEBUG("Processing socket %p (action %p)",data,action);
     action->setRemains(action->getCost() - ns3_get_socket_sent(data));
 
-    #ifdef HAVE_TRACING
-      if (TRACE_is_enabled() &&
-          action->getState() == SURF_ACTION_RUNNING){
-        double data_sent = ns3_get_socket_sent(data);
-        double data_delta_sent = data_sent - action->m_lastSent;
-
-        xbt_dynar_t route = NULL;
-
-        routing_get_route_and_latency (action->p_srcElm, action->p_dstElm, &route, NULL);
-        unsigned int i;
-        for (i = 0; i < xbt_dynar_length (route); i++){
-               NetworkNS3LinkPtr link = ((NetworkNS3LinkPtr)xbt_dynar_get_ptr (route, i));
-          TRACE_surf_link_set_utilization (link->getName(),
-                                           action->getCategory(),
-                                           (data_delta_sent)/delta,
-                                           now-delta,
-                                           delta);
-        }
-        action->m_lastSent = data_sent;
-      }
-    #endif
+    if (TRACE_is_enabled() &&
+               action->getState() == SURF_ACTION_RUNNING){
+       double data_sent = ns3_get_socket_sent(data);
+       double data_delta_sent = data_sent - action->m_lastSent;
+
+       xbt_dynar_t route = NULL;
+
+       routing_get_route_and_latency (action->p_srcElm, action->p_dstElm, &route, NULL);
+       unsigned int i;
+       for (i = 0; i < xbt_dynar_length (route); i++){
+               NetworkNS3LinkPtr link = ((NetworkNS3LinkPtr)xbt_dynar_get_ptr (route, i));
+               TRACE_surf_link_set_utilization (link->getName(),
+                               action->getCategory(),
+                                       (data_delta_sent)/delta,
+                                       now-delta,
+                                       delta);
+       }
+       action->m_lastSent = data_sent;
+    }
 
     if(ns3_get_socket_is_finished(data) == 1){
       xbt_dynar_push(socket_to_destroy,&key);
index dbd1132..8a29dfd 100644 (file)
@@ -93,11 +93,9 @@ void suspend();
 void resume();
 
 //private:
-#ifdef HAVE_TRACING
   double m_lastSent;
   RoutingEdgePtr p_srcElm;
   RoutingEdgePtr p_dstElm;
-#endif //HAVE_TRACING
 };
 
 
index 0449320..e1dc8f1 100644 (file)
@@ -502,9 +502,7 @@ int StorageN11Action::unref()
          p_stateSet->erase(p_stateSet->iterator_to(*this));
     if (getVariable())
       lmm_variable_free(getModel()->getMaxminSystem(), getVariable());
-#ifdef HAVE_TRACING
     xbt_free(getCategory());
-#endif
     delete this;
     return 1;
   }
index 70bd496..4576e1a 100644 (file)
@@ -198,9 +198,7 @@ double surf_solve(double max_date)
     surf_update_actions_state(model);
   }
 
-#ifdef HAVE_TRACING
   TRACE_paje_dump_buffer (0);
-#endif
 
   return surf_min;
 }
@@ -272,10 +270,10 @@ int surf_model_running_action_set_size(surf_model_t model){
 surf_action_t surf_workstation_model_execute_parallel_task(surf_workstation_model_t model,
                                                    int workstation_nb,
                                             void **workstation_list,
-                                            double *computation_amount,
-                                            double *communication_amount,
+                                            double *flops_amount,
+                                            double *bytes_amount,
                                             double rate){
-  return static_cast<ActionPtr>(model->executeParallelTask(workstation_nb, workstation_list, computation_amount, communication_amount, rate));
+  return static_cast<ActionPtr>(model->executeParallelTask(workstation_nb, workstation_list, flops_amount, bytes_amount, rate));
 }
 
 surf_action_t surf_workstation_model_communicate(surf_workstation_model_t model, surf_resource_t src, surf_resource_t dst, double size, double rate){
@@ -557,11 +555,9 @@ void surf_action_set_priority(surf_action_t action, double priority){
   action->setPriority(priority);
 }
 
-#ifdef HAVE_TRACING
 void surf_action_set_category(surf_action_t action, const char *category){
   action->setCategory(category);
 }
-#endif
 
 void *surf_action_get_data(surf_action_t action){
   return action->getData();
index 7d0ce71..db8618d 100644 (file)
@@ -422,10 +422,8 @@ void surf_init(int *argc, char **argv)
   if (!history)
     history = tmgr_history_new();
 
-#ifdef HAVE_TRACING
   TRACE_add_start_function(TRACE_surf_alloc);
   TRACE_add_end_function(TRACE_surf_release);
-#endif
 
   sg_config_init(argc, argv);
 
@@ -438,10 +436,8 @@ void surf_exit(void)
   unsigned int iter;
   ModelPtr model = NULL;
 
-#ifdef HAVE_TRACING
   TRACE_end();                  /* Just in case it was not called by the upper
                                  * layer (or there is no upper layer) */
-#endif
 
   sg_config_finalize();
 
@@ -791,9 +787,7 @@ void Action::initialize(ModelPtr model, double cost, bool failed,
 Action::Action(ModelPtr model, double cost, bool failed)
 {
   initialize(model, cost, failed);
-  #ifdef HAVE_TRACING
-    p_category = NULL;
-  #endif
+  p_category = NULL;
   p_stateHookup.prev = 0;
   p_stateHookup.next = 0;
   if (failed)
@@ -807,9 +801,7 @@ Action::Action(ModelPtr model, double cost, bool failed)
 Action::Action(ModelPtr model, double cost, bool failed, lmm_variable_t var)
 {
   initialize(model, cost, failed, var);
-  #ifdef HAVE_TRACING
-    p_category = NULL;
-  #endif
+  p_category = NULL;
   p_stateHookup.prev = 0;
   p_stateHookup.next = 0;
   if (failed)
@@ -821,9 +813,7 @@ Action::Action(ModelPtr model, double cost, bool failed, lmm_variable_t var)
 }
 
 Action::~Action() {
-#ifdef HAVE_TRACING
   xbt_free(p_category);
-#endif
 }
 
 void Action::finish() {
@@ -896,14 +886,12 @@ void Action::setData(void* data)
   p_data = data;
 }
 
-#ifdef HAVE_TRACING
 void Action::setCategory(const char *category)
 {
   XBT_IN("(%p,%s)", this, category);
   p_category = xbt_strdup(category);
   XBT_OUT();
 }
-#endif
 
 void Action::ref(){
   m_refcount++;
@@ -1068,12 +1056,10 @@ void Action::updateRemainingLazy(double now)
     XBT_DEBUG("Updating action(%p): remains was %f, last_update was: %f", this, m_remains, m_lastUpdate);
     double_update(&m_remains, m_lastValue * delta, sg_surf_precision*sg_maxmin_precision);
 
-#ifdef HAVE_TRACING
     if (getModel() == surf_cpu_model_pm && TRACE_is_enabled()) {
       ResourcePtr cpu = static_cast<ResourcePtr>(lmm_constraint_id(lmm_get_cnst_from_var(getModel()->getMaxminSystem(), getVariable(), 0)));
       TRACE_surf_host_set_utilization(cpu->getName(), getCategory(), m_lastValue, m_lastUpdate, now - m_lastUpdate);
     }
-#endif
     XBT_DEBUG("Updating action(%p): remains is now %f", this, m_remains);
   }
 
index 08d445b..fc954fc 100644 (file)
@@ -594,14 +594,12 @@ public:
    */
   virtual void setPriority(double priority);
 
-#ifdef HAVE_TRACING
   /**
    * @brief Set the category of the current Action
    *
    * @param category The new category of the current Action
    */
   void setCategory(const char *category);
-#endif
 
   /**
    * @brief Get the remaining time of the current action after updating the resource
index 06f6880..3193ec3 100644 (file)
@@ -1307,9 +1307,7 @@ void routing_register_callbacks()
   sg_platf_trace_add_cb(routing_parse_trace);
   sg_platf_trace_connect_add_cb(routing_parse_trace_connect);
 
-#ifdef HAVE_TRACING
   instr_routing_define_callbacks();
-#endif
 }
 
 /**
index 7d4e942..e87df4f 100644 (file)
@@ -33,16 +33,19 @@ AsFloyd::~AsFloyd(){
   int i, j;
   int table_size;
   table_size = (int)xbt_dynar_length(p_indexNetworkElm);
-    /* Delete link_table */
-    for (i = 0; i < table_size; i++)
-      for (j = 0; j < table_size; j++)
-        generic_free_route(TO_FLOYD_LINK(i, j));
-    xbt_free(p_linkTable);
-    /* Delete bypass dict */
-    xbt_dict_free(&p_bypassRoutes);
-    /* Delete predecessor and cost table */
-    xbt_free(p_predecessorTable);
-    xbt_free(p_costTable);
+  if (p_linkTable == NULL) // Dealing with a parse error in the file?
+         return;
+  /* Delete link_table */
+  for (i = 0; i < table_size; i++)
+         for (j = 0; j < table_size; j++) {
+                 generic_free_route(TO_FLOYD_LINK(i, j));
+         }
+  xbt_free(p_linkTable);
+  /* Delete bypass dict */
+  xbt_dict_free(&p_bypassRoutes);
+  /* Delete predecessor and cost table */
+  xbt_free(p_predecessorTable);
+  xbt_free(p_costTable);
 }
 
 /* Business methods */
index 90c3711..34bbc7b 100644 (file)
@@ -38,8 +38,9 @@ void surf_parse_error(const char *fmt, ...) {
   char *msg = bvprintf(fmt,va);
   va_end(va);
   cleanup();
+  XBT_ERROR("Parse error at %s:%d: %s", surf_parsed_filename, lineno, msg);
   surf_exit();
-  xbt_die("Parse error at %s:%d: %s", surf_parsed_filename, lineno, msg);
+  xbt_die("Exiting now");
 }
 void surf_parse_warn(const char *fmt, ...) {
   va_list va;
index f8130cb..1a88c38 100644 (file)
@@ -72,18 +72,15 @@ XBT_PUBLIC(void) gpu_register_callbacks(void){
 static int after_config_done;
 void parse_after_config() {
   if (!after_config_done) {
-    //
-    #ifdef HAVE_TRACING
-      TRACE_start();
-    #endif
+         TRACE_start();
 
     /* Register classical callbacks */
     storage_register_callbacks();
     routing_register_callbacks();
+    gpu_register_callbacks();
 
     /* ***************************************** */
     /* TUTORIAL: New TAG                         */
-    gpu_register_callbacks();
     /* ***************************************** */
     after_config_done = 1;
   }
index 563c3db..725b313 100644 (file)
@@ -183,26 +183,26 @@ double WorkstationVMHL13Model::shareResources(double now)
 
 ActionPtr WorkstationVMHL13Model::executeParallelTask(int workstation_nb,
                                         void **workstation_list,
-                                        double *computation_amount,
-                                        double *communication_amount,
+                                        double *flops_amount,
+                                        double *bytes_amount,
                                         double rate){
 #define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
   if ((workstation_nb == 1)
-      && (cost_or_zero(communication_amount, 0) == 0.0))
-    return ((WorkstationCLM03Ptr)workstation_list[0])->execute(computation_amount[0]);
+      && (cost_or_zero(bytes_amount, 0) == 0.0))
+    return ((WorkstationCLM03Ptr)workstation_list[0])->execute(flops_amount[0]);
   else if ((workstation_nb == 1)
-           && (cost_or_zero(computation_amount, 0) == 0.0))
-    return communicate((WorkstationCLM03Ptr)workstation_list[0], (WorkstationCLM03Ptr)workstation_list[0],communication_amount[0], rate);
+           && (cost_or_zero(flops_amount, 0) == 0.0))
+    return communicate((WorkstationCLM03Ptr)workstation_list[0], (WorkstationCLM03Ptr)workstation_list[0],bytes_amount[0], rate);
   else if ((workstation_nb == 2)
-             && (cost_or_zero(computation_amount, 0) == 0.0)
-             && (cost_or_zero(computation_amount, 1) == 0.0)) {
+             && (cost_or_zero(flops_amount, 0) == 0.0)
+             && (cost_or_zero(flops_amount, 1) == 0.0)) {
     int i,nb = 0;
     double value = 0.0;
 
     for (i = 0; i < workstation_nb * workstation_nb; i++) {
-      if (cost_or_zero(communication_amount, i) > 0.0) {
+      if (cost_or_zero(bytes_amount, i) > 0.0) {
         nb++;
-        value = cost_or_zero(communication_amount, i);
+        value = cost_or_zero(bytes_amount, i);
       }
     }
     if (nb == 1)
@@ -385,7 +385,7 @@ void WorkstationVMHL13::migrate(surf_resource_t ind_dst_pm)
      /* keep the bound value of the cpu action of the VM. */
      double old_bound = p_action->getBound();
      if (old_bound != 0) {
-       XBT_INFO("migrate VM(%s): set bound (%f) at %s", vm_name, old_bound, pm_name_dst);
+       XBT_DEBUG("migrate VM(%s): set bound (%f) at %s", vm_name, old_bound, pm_name_dst);
        new_cpu_action->setBound(old_bound);
      }
 
index a17605c..c09d5f3 100644 (file)
@@ -37,8 +37,8 @@ public:
   ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
   ActionPtr executeParallelTask(int workstation_nb,
                                           void **workstation_list,
-                                          double *computation_amount,
-                                          double *communication_amount,
+                                          double *flops_amount,
+                                          double *bytes_amount,
                                           double rate);
   void updateActionsState(double /*now*/, double /*delta*/);
 };
index f149e7f..1472e15 100644 (file)
@@ -94,28 +94,28 @@ void WorkstationCLM03Model::updateActionsState(double /*now*/, double /*delta*/)
 
 ActionPtr WorkstationCLM03Model::executeParallelTask(int workstation_nb,
                                         void **workstation_list,
-                                        double *computation_amount,
-                                        double *communication_amount,
+                                        double *flops_amount,
+                                        double *bytes_amount,
                                         double rate){
 #define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
   ActionPtr action =NULL;
   if ((workstation_nb == 1)
-      && (cost_or_zero(communication_amount, 0) == 0.0)){
-    action = ((WorkstationCLM03Ptr)workstation_list[0])->execute(computation_amount[0]);
+      && (cost_or_zero(bytes_amount, 0) == 0.0)){
+    action = ((WorkstationCLM03Ptr)workstation_list[0])->execute(flops_amount[0]);
   } else if ((workstation_nb == 1)
-           && (cost_or_zero(computation_amount, 0) == 0.0)) {
+           && (cost_or_zero(flops_amount, 0) == 0.0)) {
     action = communicate((WorkstationCLM03Ptr)workstation_list[0],
-        (WorkstationCLM03Ptr)workstation_list[0],communication_amount[0], rate);
+        (WorkstationCLM03Ptr)workstation_list[0],bytes_amount[0], rate);
   } else if ((workstation_nb == 2)
-             && (cost_or_zero(computation_amount, 0) == 0.0)
-             && (cost_or_zero(computation_amount, 1) == 0.0)) {
+             && (cost_or_zero(flops_amount, 0) == 0.0)
+             && (cost_or_zero(flops_amount, 1) == 0.0)) {
     int i,nb = 0;
     double value = 0.0;
 
     for (i = 0; i < workstation_nb * workstation_nb; i++) {
-      if (cost_or_zero(communication_amount, i) > 0.0) {
+      if (cost_or_zero(bytes_amount, i) > 0.0) {
         nb++;
-        value = cost_or_zero(communication_amount, i);
+        value = cost_or_zero(bytes_amount, i);
       }
     }
     if (nb == 1){
index 88b4854..11e2435 100644 (file)
@@ -40,8 +40,8 @@ public:
 
   ActionPtr executeParallelTask(int workstation_nb,
                                         void **workstation_list,
-                                        double *computation_amount,
-                                        double *communication_amount,
+                                        double *flops_amount,
+                                        double *bytes_amount,
                                         double rate);
  ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
 };
index 967f2e4..13ccd60 100644 (file)
@@ -101,15 +101,15 @@ public:
    *
    * @param workstation_nb [description]
    * @param workstation_list [description]
-   * @param computation_amount [description]
-   * @param communication_amount [description]
+   * @param flops_amount [description]
+   * @param bytes_amount [description]
    * @param rate [description]
    * @return [description]
    */
   virtual ActionPtr executeParallelTask(int workstation_nb,
                                         void **workstation_list,
-                                        double *computation_amount,
-                                        double *communication_amount,
+                                        double *flops_amount,
+                                        double *bytes_amount,
                                         double rate)=0;
 
  /**
@@ -186,11 +186,11 @@ public:
   /**
    * @brief Execute some quantity of computation
    *
-   * @param size The value of the processing amount (in flop) needed to process
+   * @param flops_amount The value of the processing amount (in flop) needed to process
    * @return The CpuAction corresponding to the processing
    * @see Cpu
    */
-  virtual ActionPtr execute(double size)=0;
+  virtual ActionPtr execute(double flops_amount)=0;
 
   /**
    * @brief Make a process sleep for duration seconds
index f7b460a..db86aab 100644 (file)
@@ -169,10 +169,9 @@ void WorkstationL07Model::updateActionsState(double /*now*/, double delta)
 
 ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
                                                    void **workstation_list,
-                                                 double
-                                                 *computation_amount, double
-                                                 *communication_amount,
-                                                 double rate)
+                                                   double *flops_amount,
+                                                                                                  double *bytes_amount,
+                                                   double rate)
 {
   WorkstationL07ActionPtr action;
   int i, j;
@@ -191,7 +190,7 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
     for (j = 0; j < workstation_nb; j++) {
       xbt_dynar_t route=NULL;
 
-      if (communication_amount[i * workstation_nb + j] > 0) {
+      if (bytes_amount[i * workstation_nb + j] > 0) {
         double lat=0.0;
         unsigned int cpt;
         void *_link;
@@ -215,7 +214,7 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
   xbt_dict_reset(ptask_parallel_task_link_set);
 
   for (i = 0; i < workstation_nb; i++)
-    if (computation_amount[i] > 0)
+    if (flops_amount[i] > 0)
       nb_host++;
 
   action = new WorkstationL07Action(this, 1, 0);
@@ -225,8 +224,8 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
                                    calloc but it seems to help valgrind... */
   action->m_workstationNb = workstation_nb;
   action->p_workstationList = (WorkstationPtr *) workstation_list;
-  action->p_computationAmount = computation_amount;
-  action->p_communicationAmount = communication_amount;
+  action->p_computationAmount = flops_amount;
+  action->p_communicationAmount = bytes_amount;
   action->m_latency = latency;
   action->m_rate = rate;
 
@@ -240,7 +239,7 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
   for (i = 0; i < workstation_nb; i++)
     lmm_expand(ptask_maxmin_system,
                 static_cast<WorkstationL07Ptr>(workstation_list[i])->p_cpu->getConstraint(),
-               action->getVariable(), computation_amount[i]);
+               action->getVariable(), flops_amount[i]);
 
   for (i = 0; i < workstation_nb; i++) {
     for (j = 0; j < workstation_nb; j++) {
@@ -248,7 +247,7 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
       LinkL07Ptr link;
 
       xbt_dynar_t route=NULL;
-      if (communication_amount[i * workstation_nb + j] == 0.0)
+      if (bytes_amount[i * workstation_nb + j] == 0.0)
         continue;
 
       routing_platf->getRouteAndLatency(static_cast<WorkstationL07Ptr>(workstation_list[i])->p_netElm,
@@ -259,7 +258,7 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
         link = static_cast<LinkL07Ptr>(_link);
         lmm_expand_add(ptask_maxmin_system, link->getConstraint(),
                        action->getVariable(),
-                       communication_amount[i * workstation_nb + j]);
+                       bytes_amount[i * workstation_nb + j]);
       }
     }
   }
@@ -292,17 +291,17 @@ ActionPtr WorkstationL07Model::communicate(WorkstationPtr src, WorkstationPtr ds
                                        double size, double rate)
 {
   void **workstation_list = xbt_new0(void *, 2);
-  double *computation_amount = xbt_new0(double, 2);
-  double *communication_amount = xbt_new0(double, 4);
+  double *flops_amount = xbt_new0(double, 2);
+  double *bytes_amount = xbt_new0(double, 4);
   ActionPtr res = NULL;
 
   workstation_list[0] = src;
   workstation_list[1] = dst;
-  communication_amount[1] = size;
+  bytes_amount[1] = size;
 
   res = executeParallelTask(2, workstation_list,
-                                    computation_amount,
-                                    communication_amount, rate);
+                                    flops_amount,
+                                    bytes_amount, rate);
 
   return res;
 }
@@ -558,16 +557,16 @@ e_surf_resource_state_t WorkstationL07::getState()
 ActionPtr WorkstationL07::execute(double size)
 {
   void **workstation_list = xbt_new0(void *, 1);
-  double *computation_amount = xbt_new0(double, 1);
-  double *communication_amount = xbt_new0(double, 1);
+  double *flops_amount = xbt_new0(double, 1);
+  double *bytes_amount = xbt_new0(double, 1);
 
   workstation_list[0] = this;
-  communication_amount[0] = 0.0;
-  computation_amount[0] = size;
+  bytes_amount[0] = 0.0;
+  flops_amount[0] = size;
 
   return static_cast<WorkstationL07ModelPtr>(getModel())->executeParallelTask(1, workstation_list,
-                                             computation_amount,
-                                     communication_amount, -1);
+                                             flops_amount,
+                                     bytes_amount, -1);
 }
 
 ActionPtr WorkstationL07::sleep(double duration)
index 364ed78..2b97f71 100644 (file)
@@ -51,8 +51,8 @@ public:
   WorkstationPtr createWorkstation(const char *name);
   ActionPtr executeParallelTask(int workstation_nb,
                                         void **workstation_list,
-                                        double *computation_amount,
-                                        double *communication_amount,
+                                        double *flops_amount,
+                                        double *bytes_amount,
                                         double rate);
   xbt_dynar_t getRoute(WorkstationPtr src, WorkstationPtr dst);
   ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
@@ -170,9 +170,8 @@ class WorkstationL07Action : public WorkstationAction {
   friend ActionPtr WorkstationL07::sleep(double duration);
   friend ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
                                                      void **workstation_list,
-                                                   double
-                                                   *computation_amount, double
-                                                   *communication_amount,
+                                                   double *flops_amount,
+                                                                                                  double *bytes_amount,
                                                    double rate);
 public:
   WorkstationL07Action(ModelPtr model, double cost, bool failed)
index a121bd8..2af7c98 100644 (file)
@@ -606,7 +606,6 @@ static void xbt_log_connect_categories(void)
 #endif
 
   /* instr */
-#ifdef HAVE_TRACING
   XBT_LOG_CONNECT(instr);
   XBT_LOG_CONNECT(instr_api);
   XBT_LOG_CONNECT(instr_config);
@@ -624,7 +623,6 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(instr_surf);
   XBT_LOG_CONNECT(instr_trace);
   XBT_LOG_CONNECT(instr_TI_trace);
-#endif
 
   /* jedule */
 #ifdef HAVE_JEDULE
index 80bcf41..fea8c27 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 #include <simgrid/modelchecker.h>
 
 /** An (fake) application with a bug occuring for some random values
index bc9deb5..5774e91 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include <float.h>
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Messages specific to this example");
index fb812db..530fdd0 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 8c13617..f940ec9 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 0fee70a..015017c 100644 (file)
@@ -4,7 +4,7 @@
 /* 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/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
index e999b4b..f69e8ff 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 8f6e9d8..049ab16 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
index 8d938bb..592715a 100644 (file)
@@ -2,7 +2,7 @@
  * All rights reserved.
 */
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 #include <unistd.h>
 
index 034a0ee..8252c9e 100644 (file)
@@ -4,7 +4,7 @@
 /* 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/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(storage,"Messages specific for this simulation");
@@ -187,7 +187,7 @@ int server(int argc, char *argv[])
     else if(!strcmp(task_name,"hsm_put")){// Receive file to save
       // Write file on local disk
       char *dest = MSG_task_get_data(to_execute);
-      sg_size_t size_to_write = (sg_size_t)MSG_task_get_data_size(to_execute);
+      sg_size_t size_to_write = (sg_size_t)MSG_task_get_bytes_amount(to_execute);
       write_local_file(dest, size_to_write);
     }
 
index 2081663..0ba661d 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include <stdio.h>
-#include "msg/msg.h"            /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h"            /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
 #include "xbt/sysdep.h"         /* calloc, printf */
 
 /* Create a log channel to have nice outputs. */
@@ -126,7 +126,7 @@ int slave(int argc, char *argv[])
     XBT_INFO("Task \"%s\" done in %f (amount %f)"
                , MSG_task_get_name(task)
                , end - start
-               , MSG_task_get_remaining_computation(task));
+               , MSG_task_get_flops_amount(task));
 
     MSG_task_destroy(task);
     task = NULL;
index 96ddc4c..54b2f2f 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/log.h"
 #include "xbt/asserts.h"
 
index 0bec635..9389625 100644 (file)
@@ -9,7 +9,7 @@
 #include <string.h>
 #include <stddef.h>
 #include <unistd.h>
-#include <simdag/simdag.h>
+#include <simgrid/simdag.h>
 #include <xbt/log.h>
 #include <xbt/ex.h>
 #include <signal.h>
index 2961efd..9488361 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic0, sd, "SimDag test basic0");
index 48b7952..6d13dc7 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic1, sd, "SimDag test basic1");
index 44e6d7b..620f47a 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic2, sd, "SimDag test basic2");
index 273e117..f4ebf04 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic3, sd, "SimDag test basic3");
index 0005e04..52da3c9 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic4, sd, "SimDag test basic4");
index 9dfa416..bf94828 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic5, sd, "SimDag test basic5");
index bd1de6c..7f1cbb8 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/asserts.h"
 #include "xbt/log.h"
 
index b82a105..267614a 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(incomplete, sd, "SimDag incomplete test");
index e864eb5..cf95a0a 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 
 /*
  * intra communication test
index e7baa31..58d4837 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 
 /*
  * intra communication test
index c0efc76..00c157b 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 
 /*
  * intra communication test 1
index 51080ce..f3987b1 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 
 /*
  * simple latency test
index 70d584c..077f722 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 
 
 /*
index 5d31420..e224bd9 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 
 /**
  * bw and latency test 3
index 694a5c3..250af33 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 
 #define TASK_NUM 3
 
index fa9e319..9e946a8 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 
 /*
  * This test checks if the reinitialization of
index b1c7480..92e45bf 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 
 int main(int argc, char **argv)
 {
index 5b24395..5898300 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 
 int main(int argc, char **argv)
 {
index 03285b7..8f06e05 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "surf/surf_private.h"
 #include "xbt/xbt_os_time.h"
 
index a291e6d..0e6c645 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "surf/surf_private.h"
 #include "xbt/xbt_os_time.h"
 
index 5a484e3..c7c3b71 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "surf/surf_private.h"
 #include "xbt/log.h"
 
index f34e57f..d701c1d 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "surf/surf_private.h"
 
 int main(int argc, char **argv)
index b0b9a69..92a77b3 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "surf/surf_private.h"
 
 int host(int argc, char *argv[]);
index 02e5e4a..1fe9e50 100644 (file)
@@ -2,3 +2,4 @@
 $ ${bindir:=.}/flatifier bogus_disk_attachment.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n"
 > [  0.000000] [0:@] surf_workstation_model_init_ptask_L07
 > [  0.000000] [0:@] Parse error at bogus_disk_attachment.xml:26: Unable to attach storage cdisk: host plouf doesn't exist.
+> [  0.000000] [0:@] Exiting now
index f571ffa..2313ff6 100644 (file)
@@ -2,8 +2,10 @@
 $ ${bindir:=.}/flatifier bogus_missing_src_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n"
 > [  0.000000] [0:@] surf_workstation_model_init_ptask_L07
 > [  0.000000] [0:@] Parse error at bogus_missing_src_gateway.xml:16: gw_src="nod-cluster_router.cluster.us" not found for ASroute from "us" to "fr"
+> [  0.000000] [0:@] Exiting now
 
 ! expect signal SIGABRT
 $ ${bindir:=.}/flatifier bogus_missing_dst_gateway.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n"
 > [  0.000000] [0:@] surf_workstation_model_init_ptask_L07
 > [  0.000000] [0:@] Parse error at bogus_missing_dst_gateway.xml:16: gw_dst="neud-grappe_router.grappe.fr" not found for ASroute from "us" to "fr"
+> [  0.000000] [0:@] Exiting now
index a18c417..92f6665 100644 (file)
@@ -2,8 +2,10 @@
 $ ${bindir:=.}/flatifier bogus_two_hosts_asymetric.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n"
 > [  0.000000] [0:@] surf_workstation_model_init_ptask_L07
 > [  0.000000] [0:@] Parse error at bogus_two_hosts_asymetric.xml:24: A route between "alice" and "bob" already exists with a different content. If you are trying to define a reverse route, you must set the symmetrical=no attribute to your routes tags.
+> [  0.000000] [0:@] Exiting now
 
 ! expect signal SIGABRT
 $ ${bindir:=.}/flatifier bogus_two_hosts_asymetric-2.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h]%e%m%n"
 > [  0.000000] [0:@] surf_workstation_model_init_ptask_L07
 > [  0.000000] [0:@] Parse error at bogus_two_hosts_asymetric-2.xml:26: A route between "alice" and "bob" already exists with a different content. If you are trying to define a reverse route, you must set the symmetrical=no attribute to your routes tags.
+> [  0.000000] [0:@] Exiting now
index 5c33f70..a9c1c25 100644 (file)
@@ -15,7 +15,7 @@
 #include <math.h>
 
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 #include "xbt/dict.h"
 #include "xbt/ex.h"
index 9ad9de8..ee97d65 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "surf/surf_private.h"
 
 extern routing_platf_t routing_platf;
index 779209f..ca98ccb 100644 (file)
@@ -20,9 +20,9 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   add_executable(comm_create_group comm_create_group.c)
   add_executable(comm_group_half comm_group_half.c)
   add_executable(comm_group_rand comm_group_rand.c)
- # add_executable(comm_idup comm_idup.c)
- # add_executable(comm_idup_mul comm_idup_mul.c)
- # add_executable(comm_idup_overlap comm_idup_overlap.c)
+ add_executable(comm_idup comm_idup.c)
+ add_executable(comm_idup_mul comm_idup_mul.c)
+ add_executable(comm_idup_overlap comm_idup_overlap.c)
   add_executable(comm_info comm_info.c)
 #  add_executable(commname commname.c)
   add_executable(ctxalloc ctxalloc.c)
@@ -46,7 +46,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   target_link_libraries(comm_create_group simgrid mtest_c)
   target_link_libraries(comm_group_half simgrid mtest_c)
   target_link_libraries(comm_group_rand simgrid mtest_c)
- # target_link_libraries(comm_idup simgrid mtest_c)
+ target_link_libraries(comm_idup simgrid mtest_c)
   target_link_libraries(comm_info simgrid mtest_c)
 #  target_link_libraries(commname simgrid mtest_c)
   target_link_libraries(ctxalloc simgrid mtest_c)
index 1170fa0..5224a24 100644 (file)
@@ -14,7 +14,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
 
 
 add_executable(cartcreates cartcreates.c)
- #add_executable(cartmap1 cartmap1.c)
+#add_executable(cartmap1 cartmap1.c)
 add_executable(cartshift1 cartshift1.c)
 add_executable(cartsuball cartsuball.c)
 add_executable(cartzero cartzero.c)
index 5020589..c73fbcc 100644 (file)
@@ -8,7 +8,7 @@
 #include <unistd.h>
 #endif
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/graph.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(graphicator,
@@ -17,7 +17,6 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(graphicator,
 int main(int argc, char **argv)
 {
   XBT_LOG_CONNECT(graphicator);
-#ifdef HAVE_TRACING
   MSG_init(&argc, argv);
 
   if (argc < 3){
@@ -33,8 +32,5 @@ int main(int argc, char **argv)
   if (status == 0){
     XBT_INFO ("%s expects --cfg=tracing:yes --cfg=tracing/platform:yes", argv[0]);
   }
-#else
-  XBT_INFO ("works only if simgrid was compiled with tracing enabled.");
-#endif
   return 0;
 }