From: Adrien Lebre Date: Wed, 8 Apr 2015 11:27:25 +0000 (+0200) Subject: Merge before commiting VM changes - Adrien X-Git-Tag: v3_12~738 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f06041cf2c450457a0b47a49b66b19cb9133c18e?hp=7018d53f4b991df9ddfa5b0c53293118d200efd6 Merge before commiting VM changes - Adrien --- diff --git a/.cproject b/.cproject index e21cad4b5b..11b5c6e6b9 100644 --- a/.cproject +++ b/.cproject @@ -14,17 +14,37 @@ - + - + - - + + + + + + + + - - + + + + + + + + + + @@ -35,8 +55,19 @@ + + + + + + + + + + + + - diff --git a/ChangeLog b/ChangeLog index 5cdf3a6b5a..dc3e85d4e0 100644 --- 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 diff --git a/buildtools/Cmake/AddTests.cmake b/buildtools/Cmake/AddTests.cmake index 103b33ec40..f24aff102a 100644 --- a/buildtools/Cmake/AddTests.cmake +++ b/buildtools/Cmake/AddTests.cmake @@ -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) diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index 786550e17e..d15f1c6ad6 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -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) diff --git a/buildtools/Cmake/DefinePackages.cmake b/buildtools/Cmake/DefinePackages.cmake index e9ad635ddf..7d18a4f464 100644 --- a/buildtools/Cmake/DefinePackages.cmake +++ b/buildtools/Cmake/DefinePackages.cmake @@ -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} diff --git a/buildtools/Cmake/src/internal_config.h.in b/buildtools/Cmake/src/internal_config.h.in index 76f05f8540..31589378e9 100644 --- a/buildtools/Cmake/src/internal_config.h.in +++ b/buildtools/Cmake/src/internal_config.h.in @@ -296,9 +296,6 @@ /* Define to 1 if you can safely include both and . */ #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@ diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 920688eb78..005aafa326 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -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 diff --git a/doc/msg-tuto-src/masterworker0.c b/doc/msg-tuto-src/masterworker0.c index b283dc5285..328cef16c9 100644 --- a/doc/msg-tuto-src/masterworker0.c +++ b/doc/msg-tuto-src/masterworker0.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/doc/msg-tuto-src/masterworker1.c b/doc/msg-tuto-src/masterworker1.c index 5b240e354a..4ace831831 100644 --- a/doc/msg-tuto-src/masterworker1.c +++ b/doc/msg-tuto-src/masterworker1.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/doc/msg-tuto-src/masterworker2.c b/doc/msg-tuto-src/masterworker2.c index aa038972b9..f3b92c6cd9 100644 --- a/doc/msg-tuto-src/masterworker2.c +++ b/doc/msg-tuto-src/masterworker2.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/doc/msg-tuto-src/masterworker3.c b/doc/msg-tuto-src/masterworker3.c index c2891d5d29..0f6c7a194e 100644 --- a/doc/msg-tuto-src/masterworker3.c +++ b/doc/msg-tuto-src/masterworker3.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/doc/msg-tuto-src/masterworker4.c b/doc/msg-tuto-src/masterworker4.c index 1f4bb5073a..c73cc7e9a9 100644 --- a/doc/msg-tuto-src/masterworker4.c +++ b/doc/msg-tuto-src/masterworker4.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/java/bittorrent/Peer.java b/examples/java/bittorrent/Peer.java index 6ce5a5473d..569e8b88b8 100644 --- a/examples/java/bittorrent/Peer.java +++ b/examples/java/bittorrent/Peer.java @@ -201,7 +201,7 @@ public class Peer extends Process { } } } - this.hostname = host.getName(); + this.hostname = getHost().getName(); } /** * Retrieves the peer list from the tracker diff --git a/examples/java/chord/Node.java b/examples/java/chord/Node.java index 27cb63a522..93099237ae 100644 --- a/examples/java/chord/Node.java +++ b/examples/java/chord/Node.java @@ -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)); } /** diff --git a/examples/java/cloud/Master.java b/examples/java/cloud/Master.java index 2cb86b5613..a581aff8cc 100644 --- a/examples/java/cloud/Master.java +++ b/examples/java/cloud/Master.java @@ -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(); } diff --git a/examples/java/cloud/Slave.java b/examples/java/cloud/Slave.java index 7aaa48e10f..d97b0be612 100644 --- a/examples/java/cloud/Slave.java +++ b/examples/java/cloud/Slave.java @@ -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()+")"); } diff --git a/examples/java/cloud/migration/Daemon.java b/examples/java/cloud/migration/Daemon.java index 80cf2a8b55..68a31f3153 100644 --- a/examples/java/cloud/migration/Daemon.java +++ b/examples/java/cloud/migration/Daemon.java @@ -33,6 +33,6 @@ public class Daemon extends Process { } public double getRemaining(){ - return this.currentTask.getRemainingDuration(); - } + return this.currentTask.getFlopsAmount(); } +} diff --git a/examples/java/io/Client.java b/examples/java/io/Client.java index 487878c11d..b8d718f277 100644 --- a/examples/java/io/Client.java +++ b/examples/java/io/Client.java @@ -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 diff --git a/examples/java/mutualExclusion/Node.java b/examples/java/mutualExclusion/Node.java index 0b622fe3e6..55d91e3ffe 100644 --- a/examples/java/mutualExclusion/Node.java +++ b/examples/java/mutualExclusion/Node.java @@ -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(); diff --git a/examples/java/tracing/CMakeLists.txt b/examples/java/tracing/CMakeLists.txt index 26d6584048..ecc73376fc 100644 --- a/examples/java/tracing/CMakeLists.txt +++ b/examples/java/tracing/CMakeLists.txt @@ -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 diff --git a/examples/java/tracing/Receiver.java b/examples/java/tracing/Receiver.java index dab370f233..0cd91d4baa 100644 --- a/examples/java/tracing/Receiver.java +++ b/examples/java/tracing/Receiver.java @@ -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!"); } diff --git a/examples/java/tracing/Sender.java b/examples/java/tracing/Sender.java index 48a14c4184..82930bdcb8 100644 --- a/examples/java/tracing/Sender.java +++ b/examples/java/tracing/Sender.java @@ -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!"); } } diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index af24651272..c48611f1cc 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -6,7 +6,7 @@ #include #include -#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" diff --git a/examples/msg/bittorrent/bittorrent.c b/examples/msg/bittorrent/bittorrent.c index 0ad478188e..a1d9b76897 100644 --- a/examples/msg/bittorrent/bittorrent.c +++ b/examples/msg/bittorrent/bittorrent.c @@ -7,7 +7,7 @@ #include "bittorrent.h" #include "peer.h" #include "tracker.h" -#include +#include #include /** diff --git a/examples/msg/bittorrent/bittorrent_platfgen.c b/examples/msg/bittorrent/bittorrent_platfgen.c index 9afada064b..5d333c412e 100644 --- a/examples/msg/bittorrent/bittorrent_platfgen.c +++ b/examples/msg/bittorrent/bittorrent_platfgen.c @@ -7,7 +7,7 @@ #include "bittorrent.h" #include "peer.h" #include "tracker.h" -#include +#include #include /** * Bittorrent example launcher, using a generated platform diff --git a/examples/msg/bittorrent/messages.h b/examples/msg/bittorrent/messages.h index dab23afb66..023e23e1b2 100644 --- a/examples/msg/bittorrent/messages.h +++ b/examples/msg/bittorrent/messages.h @@ -6,7 +6,7 @@ #ifndef BITTORRENT_MESSAGES_H_ #define BITTORRENT_MESSAGES_H_ -#include +#include /** * Message sizes diff --git a/examples/msg/bittorrent/peer.c b/examples/msg/bittorrent/peer.c index 19232336c5..a614b0daf2 100644 --- a/examples/msg/bittorrent/peer.c +++ b/examples/msg/bittorrent/peer.c @@ -8,7 +8,7 @@ #include "tracker.h" #include "connection.h" #include "messages.h" -#include +#include #include #include diff --git a/examples/msg/bittorrent/peer.h b/examples/msg/bittorrent/peer.h index e64a2d2357..5c6dfa3e1e 100644 --- a/examples/msg/bittorrent/peer.h +++ b/examples/msg/bittorrent/peer.h @@ -6,7 +6,7 @@ #ifndef BITTORRENT_PEER_H #define BITTORRENT_PEER_H -#include +#include #include #include #include diff --git a/examples/msg/bittorrent/tracker.c b/examples/msg/bittorrent/tracker.c index 631a4560b8..4c32db8ada 100644 --- a/examples/msg/bittorrent/tracker.c +++ b/examples/msg/bittorrent/tracker.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "tracker.h" -#include +#include #include static void task_free(void *data); diff --git a/examples/msg/chainsend/broadcaster.h b/examples/msg/chainsend/broadcaster.h index 2b066565f0..1d1afc9559 100644 --- a/examples/msg/chainsend/broadcaster.h +++ b/examples/msg/chainsend/broadcaster.h @@ -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. */ diff --git a/examples/msg/chainsend/chainsend.c b/examples/msg/chainsend/chainsend.c index e8a4d199e3..05a336dfc8 100644 --- a/examples/msg/chainsend/chainsend.c +++ b/examples/msg/chainsend/chainsend.c @@ -7,7 +7,7 @@ #include #include -#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. */ diff --git a/examples/msg/chainsend/common.h b/examples/msg/chainsend/common.h index 2336685f5b..26268361c7 100644 --- a/examples/msg/chainsend/common.h +++ b/examples/msg/chainsend/common.h @@ -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) diff --git a/examples/msg/chainsend/messages.h b/examples/msg/chainsend/messages.h index b717d5c0dc..4be0fcef06 100644 --- a/examples/msg/chainsend/messages.h +++ b/examples/msg/chainsend/messages.h @@ -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 diff --git a/examples/msg/chainsend/peer.h b/examples/msg/chainsend/peer.h index 63f5a0ebe7..5acc81bfb2 100644 --- a/examples/msg/chainsend/peer.h +++ b/examples/msg/chainsend/peer.h @@ -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" diff --git a/examples/msg/chord/chord.c b/examples/msg/chord/chord.c index 96105a851e..2cf32341fc 100644 --- a/examples/msg/chord/chord.c +++ b/examples/msg/chord/chord.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/log.h" #include "xbt/asserts.h" #include "simgrid/modelchecker.h" diff --git a/examples/msg/cloud/bound.c b/examples/msg/cloud/bound.c index ee5fc4971a..d9c6adc689 100644 --- a/examples/msg/cloud/bound.c +++ b/examples/msg/cloud/bound.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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; diff --git a/examples/msg/cloud/master_worker_vm.c b/examples/msg/cloud/master_worker_vm.c index af24f85a88..3d1fb4cbe6 100644 --- a/examples/msg/cloud/master_worker_vm.c +++ b/examples/msg/cloud/master_worker_vm.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/sysdep.h" /* calloc, printf */ /* Create a log channel to have nice outputs. */ diff --git a/examples/msg/cloud/migrate_vm.c b/examples/msg/cloud/migrate_vm.c index 7d263c7953..03a08be718 100644 --- a/examples/msg/cloud/migrate_vm.c +++ b/examples/msg/cloud/migrate_vm.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/sysdep.h" /* calloc, printf */ /* Create a log channel to have nice outputs. */ diff --git a/examples/msg/cloud/multicore.c b/examples/msg/cloud/multicore.c index 64a00c39c9..8fb26bfb3b 100644 --- a/examples/msg/cloud/multicore.c +++ b/examples/msg/cloud/multicore.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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; diff --git a/examples/msg/cloud/scale.c b/examples/msg/cloud/scale.c index 54a0bfec9b..69db3e9b84 100644 --- a/examples/msg/cloud/scale.c +++ b/examples/msg/cloud/scale.c @@ -6,7 +6,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/sysdep.h" /* calloc, printf */ /* Create a log channel to have nice outputs. */ diff --git a/examples/msg/cloud/simple_vm.c b/examples/msg/cloud/simple_vm.c index 624bdc47a8..3d10a25bc8 100644 --- a/examples/msg/cloud/simple_vm.c +++ b/examples/msg/cloud/simple_vm.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/sysdep.h" /* calloc, printf */ /* Create a log channel to have nice outputs. */ diff --git a/examples/msg/cloud/two_tasks_vm.c b/examples/msg/cloud/two_tasks_vm.c index 0e2aaabea3..a7d61c3647 100644 --- a/examples/msg/cloud/two_tasks_vm.c +++ b/examples/msg/cloud/two_tasks_vm.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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); } diff --git a/examples/msg/energy/e2/e2.c b/examples/msg/energy/e2/e2.c index dbfe96f729..822f1d7aad 100644 --- a/examples/msg/energy/e2/e2.c +++ b/examples/msg/energy/e2/e2.c @@ -6,7 +6,7 @@ #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/sysdep.h" /* calloc */ #include "simgrid/plugins.h" diff --git a/examples/msg/energy/e3/e3.c b/examples/msg/energy/e3/e3.c index 57d3c99e62..5f31fb11cc 100644 --- a/examples/msg/energy/e3/e3.c +++ b/examples/msg/energy/e3/e3.c @@ -6,7 +6,7 @@ #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/sysdep.h" /* calloc */ #include "simgrid/plugins.h" diff --git a/examples/msg/energy/pstate/pstate.c b/examples/msg/energy/pstate/pstate.c index bfbb0c0ae8..f7e7cad81e 100644 --- a/examples/msg/energy/pstate/pstate.c +++ b/examples/msg/energy/pstate/pstate.c @@ -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. */ diff --git a/examples/msg/exception/exception.c b/examples/msg/exception/exception.c index 044b0f1f30..8059cd81ad 100644 --- a/examples/msg/exception/exception.c +++ b/examples/msg/exception/exception.c @@ -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, diff --git a/examples/msg/gpu/test_MSG_gpu_task_create.c b/examples/msg/gpu/test_MSG_gpu_task_create.c index c968e89ff9..a7e0d89204 100644 --- a/examples/msg/gpu/test_MSG_gpu_task_create.c +++ b/examples/msg/gpu/test_MSG_gpu_task_create.c @@ -11,7 +11,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/log.h" #include "xbt/asserts.h" diff --git a/examples/msg/gtnets/gtnets.c b/examples/msg/gtnets/gtnets.c index eb7a88054e..26da94d6ab 100644 --- a/examples/msg/gtnets/gtnets.c +++ b/examples/msg/gtnets/gtnets.c @@ -6,7 +6,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/log.h" #include "xbt/asserts.h" diff --git a/examples/msg/icomms/peer.c b/examples/msg/icomms/peer.c index 59f0d3ef0c..4c446e8f7c 100644 --- a/examples/msg/icomms/peer.c +++ b/examples/msg/icomms/peer.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/icomms/peer2.c b/examples/msg/icomms/peer2.c index d7542706b9..0eca9287a1 100644 --- a/examples/msg/icomms/peer2.c +++ b/examples/msg/icomms/peer2.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/icomms/peer3.c b/examples/msg/icomms/peer3.c index 2026f880c4..7dca7de20a 100644 --- a/examples/msg/icomms/peer3.c +++ b/examples/msg/icomms/peer3.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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 /* Create a log channel to have nice outputs. */ diff --git a/examples/msg/io/file.c b/examples/msg/io/file.c index 6d7b63517f..a02ce1c74a 100644 --- a/examples/msg/io/file.c +++ b/examples/msg/io/file.c @@ -22,7 +22,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "surf/surf_private.h" int host(int argc, char *argv[]); diff --git a/examples/msg/io/file_unlink.c b/examples/msg/io/file_unlink.c index 9fc88ca303..4e5e58191c 100644 --- a/examples/msg/io/file_unlink.c +++ b/examples/msg/io/file_unlink.c @@ -13,7 +13,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "surf/surf_private.h" int host(int argc, char *argv[]); diff --git a/examples/msg/io/remote.c b/examples/msg/io/remote.c index bb88246915..620ab8133f 100644 --- a/examples/msg/io/remote.c +++ b/examples/msg/io/remote.c @@ -11,7 +11,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "surf/surf_private.h" #define INMEGA (1024*1024) diff --git a/examples/msg/io/storage.c b/examples/msg/io/storage.c index 821d3987e3..579f0611bd 100644 --- a/examples/msg/io/storage.c +++ b/examples/msg/io/storage.c @@ -23,7 +23,7 @@ * ******************************************************************************/ -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/log.h" #include "xbt/dict.h" diff --git a/examples/msg/kademlia/kademlia.c b/examples/msg/kademlia/kademlia.c index 5f9bb6aec9..f5424445bf 100644 --- a/examples/msg/kademlia/kademlia.c +++ b/examples/msg/kademlia/kademlia.c @@ -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 diff --git a/examples/msg/kademlia/node.c b/examples/msg/kademlia/node.c index 574afbefff..49c9345ecd 100644 --- a/examples/msg/kademlia/node.c +++ b/examples/msg/kademlia/node.c @@ -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, diff --git a/examples/msg/kademlia/node.h b/examples/msg/kademlia/node.h index e93549b7c8..2539528db1 100644 --- a/examples/msg/kademlia/node.h +++ b/examples/msg/kademlia/node.h @@ -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" diff --git a/examples/msg/kademlia/routing_table.c b/examples/msg/kademlia/routing_table.c index 3d1fcb12bc..774fe0c0e2 100644 --- a/examples/msg/kademlia/routing_table.c +++ b/examples/msg/kademlia/routing_table.c @@ -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, diff --git a/examples/msg/kademlia/task.h b/examples/msg/kademlia/task.h index 49245499b6..4aca3126c7 100644 --- a/examples/msg/kademlia/task.h +++ b/examples/msg/kademlia/task.h @@ -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 */ diff --git a/examples/msg/masterslave/masterslave_arg.c b/examples/msg/masterslave/masterslave_arg.c index 7bf9f87e25..4facb5a9fe 100644 --- a/examples/msg/masterslave/masterslave_arg.c +++ b/examples/msg/masterslave/masterslave_arg.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/masterslave/masterslave_bypass.c b/examples/msg/masterslave/masterslave_bypass.c index ab3902a07f..6ba7bc545f 100644 --- a/examples/msg/masterslave/masterslave_bypass.c +++ b/examples/msg/masterslave/masterslave_bypass.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/masterslave/masterslave_cluster.c b/examples/msg/masterslave/masterslave_cluster.c index 085d574a9e..dbb760c2ff 100644 --- a/examples/msg/masterslave/masterslave_cluster.c +++ b/examples/msg/masterslave/masterslave_cluster.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/masterslave/masterslave_failure.c b/examples/msg/masterslave/masterslave_failure.c index 90ffa8752c..1591b85113 100644 --- a/examples/msg/masterslave/masterslave_failure.c +++ b/examples/msg/masterslave/masterslave_failure.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/masterslave/masterslave_failure_platfgen.c b/examples/msg/masterslave/masterslave_failure_platfgen.c index ee179e572a..3f030c17b2 100644 --- a/examples/msg/masterslave/masterslave_failure_platfgen.c +++ b/examples/msg/masterslave/masterslave_failure_platfgen.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/masterslave/masterslave_forwarder.c b/examples/msg/masterslave/masterslave_forwarder.c index 7aa886143c..7754529667 100644 --- a/examples/msg/masterslave/masterslave_forwarder.c +++ b/examples/msg/masterslave/masterslave_forwarder.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/masterslave/masterslave_kill.c b/examples/msg/masterslave/masterslave_kill.c index 394bb3f097..9c8e09ec34 100644 --- a/examples/msg/masterslave/masterslave_kill.c +++ b/examples/msg/masterslave/masterslave_kill.c @@ -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. */ diff --git a/examples/msg/masterslave/masterslave_mailbox.c b/examples/msg/masterslave/masterslave_mailbox.c index b9f8af621a..7a23c471f9 100644 --- a/examples/msg/masterslave/masterslave_mailbox.c +++ b/examples/msg/masterslave/masterslave_mailbox.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/masterslave/masterslave_platfgen.c b/examples/msg/masterslave/masterslave_platfgen.c index 11d3c2fec7..134fae7ae4 100644 --- a/examples/msg/masterslave/masterslave_platfgen.c +++ b/examples/msg/masterslave/masterslave_platfgen.c @@ -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, diff --git a/examples/msg/mc/bugged1_liveness.c b/examples/msg/mc/bugged1_liveness.c index 5143623f2e..50ad0ae3f4 100644 --- a/examples/msg/mc/bugged1_liveness.c +++ b/examples/msg/mc/bugged1_liveness.c @@ -16,7 +16,7 @@ #include #endif -#include "msg/msg.h" +#include "simgrid/msg.h" #include "mc/mc.h" #include "xbt/automaton.h" #include "bugged1_liveness.h" diff --git a/examples/msg/mc/bugged2_liveness.c b/examples/msg/mc/bugged2_liveness.c index d6beac0f42..3cdb50a211 100644 --- a/examples/msg/mc/bugged2_liveness.c +++ b/examples/msg/mc/bugged2_liveness.c @@ -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" diff --git a/examples/msg/mc/centralized_mutex.c b/examples/msg/mc/centralized_mutex.c index d7231e1a2c..2d8b231ab9 100644 --- a/examples/msg/mc/centralized_mutex.c +++ b/examples/msg/mc/centralized_mutex.c @@ -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 diff --git a/examples/msg/migration/migration.c b/examples/msg/migration/migration.c index 23195981ae..ef06bf147e 100644 --- a/examples/msg/migration/migration.c +++ b/examples/msg/migration/migration.c @@ -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" diff --git a/examples/msg/ns3/ns3.c b/examples/msg/ns3/ns3.c index 31ef94156a..734403933b 100644 --- a/examples/msg/ns3/ns3.c +++ b/examples/msg/ns3/ns3.c @@ -6,7 +6,7 @@ #include #include -#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); diff --git a/examples/msg/parallel_task/parallel_task.c b/examples/msg/parallel_task/parallel_task.c index a3dda645e1..01d772d8ee 100644 --- a/examples/msg/parallel_task/parallel_task.c +++ b/examples/msg/parallel_task/parallel_task.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/parallel_task/test_ptask.c b/examples/msg/parallel_task/test_ptask.c index 8626a98026..189a26c754 100644 --- a/examples/msg/parallel_task/test_ptask.c +++ b/examples/msg/parallel_task/test_ptask.c @@ -5,8 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/pastry/pastry.c b/examples/msg/pastry/pastry.c index da3f463757..3c33770c82 100644 --- a/examples/msg/pastry/pastry.c +++ b/examples/msg/pastry/pastry.c @@ -6,7 +6,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/log.h" #include "xbt/asserts.h" diff --git a/examples/msg/pmm/msg_pmm.c b/examples/msg/pmm/msg_pmm.c index 59d9e1b3bb..209cc333f6 100644 --- a/examples/msg/pmm/msg_pmm.c +++ b/examples/msg/pmm/msg_pmm.c @@ -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" diff --git a/examples/msg/priority/priority.c b/examples/msg/priority/priority.c index 43258ddc8a..2fd25c3bb5 100644 --- a/examples/msg/priority/priority.c +++ b/examples/msg/priority/priority.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/msg/properties/msg_prop.c b/examples/msg/properties/msg_prop.c index c9e881f9f7..d46055026c 100644 --- a/examples/msg/properties/msg_prop.c +++ b/examples/msg/properties/msg_prop.c @@ -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. */ diff --git a/examples/msg/semaphores/synchro.c b/examples/msg/semaphores/synchro.c index cc10147595..01dcd02834 100644 --- a/examples/msg/semaphores/synchro.c +++ b/examples/msg/semaphores/synchro.c @@ -6,7 +6,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/log.h" XBT_LOG_NEW_DEFAULT_CATEGORY(msg_semaphore_example, diff --git a/examples/msg/sendrecv/sendrecv.c b/examples/msg/sendrecv/sendrecv.c index cca42acbd5..2c9c15db48 100644 --- a/examples/msg/sendrecv/sendrecv.c +++ b/examples/msg/sendrecv/sendrecv.c @@ -6,7 +6,7 @@ #include -#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. */ diff --git a/examples/msg/start_kill_time/sk_time.c b/examples/msg/start_kill_time/sk_time.c index 72ce30c6fb..af50303903 100644 --- a/examples/msg/start_kill_time/sk_time.c +++ b/examples/msg/start_kill_time/sk_time.c @@ -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. */ diff --git a/examples/msg/suspend/suspend.c b/examples/msg/suspend/suspend.c index b12fbf4a1e..ac59867221 100644 --- a/examples/msg/suspend/suspend.c +++ b/examples/msg/suspend/suspend.c @@ -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. */ diff --git a/examples/msg/token_ring/ring_call.c b/examples/msg/token_ring/ring_call.c index dd6107f523..dd69d862cb 100644 --- a/examples/msg/token_ring/ring_call.c +++ b/examples/msg/token_ring/ring_call.c @@ -6,7 +6,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "surf/surf_private.h" int host(int argc, char *argv[]); diff --git a/examples/msg/token_ring/token_bypass.c b/examples/msg/token_ring/token_bypass.c index 7522792a2e..5f97241d60 100644 --- a/examples/msg/token_ring/token_bypass.c +++ b/examples/msg/token_ring/token_bypass.c @@ -6,7 +6,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "surf/surf_private.h" int host(int argc, char *argv[]); diff --git a/examples/msg/tracing/CMakeLists.txt b/examples/msg/tracing/CMakeLists.txt index 4cee270282..4df120b637 100644 --- a/examples/msg/tracing/CMakeLists.txt +++ b/examples/msg/tracing/CMakeLists.txt @@ -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} diff --git a/examples/msg/tracing/categories.c b/examples/msg/tracing/categories.c index 238e8ef72c..77bd084c94 100644 --- a/examples/msg/tracing/categories.c +++ b/examples/msg/tracing/categories.c @@ -21,7 +21,7 @@ */ #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/sysdep.h" /* calloc, printf */ /* Create a log channel to have nice outputs. */ diff --git a/examples/msg/tracing/link_srcdst_user_variables.c b/examples/msg/tracing/link_srcdst_user_variables.c index f9c4c22b4f..b47b1c6c03 100644 --- a/examples/msg/tracing/link_srcdst_user_variables.c +++ b/examples/msg/tracing/link_srcdst_user_variables.c @@ -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 +#include /** @addtogroup MSG_examples * diff --git a/examples/msg/tracing/link_user_variables.c b/examples/msg/tracing/link_user_variables.c index 1ee390dabe..7170bc15a6 100644 --- a/examples/msg/tracing/link_user_variables.c +++ b/examples/msg/tracing/link_user_variables.c @@ -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 +#include /** @addtogroup MSG_examples * diff --git a/examples/msg/tracing/ms.c b/examples/msg/tracing/ms.c index aed734ede0..52a45c6dbc 100644 --- a/examples/msg/tracing/ms.c +++ b/examples/msg/tracing/ms.c @@ -20,7 +20,7 @@ */ #include -#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; diff --git a/examples/msg/tracing/procmig.c b/examples/msg/tracing/procmig.c index 1c832b7ffb..94562ac7d1 100644 --- a/examples/msg/tracing/procmig.c +++ b/examples/msg/tracing/procmig.c @@ -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. */ diff --git a/examples/msg/tracing/simple.c b/examples/msg/tracing/simple.c index 6f9e6866b2..b79970d046 100644 --- a/examples/msg/tracing/simple.c +++ b/examples/msg/tracing/simple.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/sysdep.h" /* calloc, printf */ /** @addtogroup MSG_examples diff --git a/examples/msg/tracing/trace_platform.c b/examples/msg/tracing/trace_platform.c index 026524ff55..da2fd446d3 100644 --- a/examples/msg/tracing/trace_platform.c +++ b/examples/msg/tracing/trace_platform.c @@ -16,7 +16,7 @@ */ #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/sysdep.h" /* calloc, printf */ #include "xbt/log.h" diff --git a/examples/msg/tracing/user_variables.c b/examples/msg/tracing/user_variables.c index 4b585c344a..e5035dbc5a 100644 --- a/examples/msg/tracing/user_variables.c +++ b/examples/msg/tracing/user_variables.c @@ -15,7 +15,7 @@ */ #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/sysdep.h" /* calloc, printf */ /* Create a log channel to have nice outputs. */ diff --git a/examples/simdag/CMakeLists.txt b/examples/simdag/CMakeLists.txt index 7e89291d43..e8d50b6305 100644 --- a/examples/simdag/CMakeLists.txt +++ b/examples/simdag/CMakeLists.txt @@ -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 diff --git a/examples/simdag/dax/CMakeLists.txt b/examples/simdag/dax/CMakeLists.txt index a824e281f7..669dd41503 100644 --- a/examples/simdag/dax/CMakeLists.txt +++ b/examples/simdag/dax/CMakeLists.txt @@ -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 diff --git a/examples/simdag/dax/dax_test.c b/examples/simdag/dax/dax_test.c index d33f9f8182..c495481099 100644 --- a/examples/simdag/dax/dax_test.c +++ b/examples/simdag/dax/dax_test.c @@ -8,7 +8,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" #include "xbt/ex.h" #include diff --git a/examples/simdag/dax/smalldax_notrace.tesh b/examples/simdag/dax/smalldax_notrace.tesh deleted file mode 100644 index 0021c0cc26..0000000000 --- a/examples/simdag/dax/smalldax_notrace.tesh +++ /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 diff --git a/examples/simdag/dot/CMakeLists.txt b/examples/simdag/dot/CMakeLists.txt index 302bdd625f..d541688b01 100644 --- a/examples/simdag/dot/CMakeLists.txt +++ b/examples/simdag/dot/CMakeLists.txt @@ -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 diff --git a/examples/simdag/dot/dot_test.c b/examples/simdag/dot/dot_test.c index 6f62578c4a..62a03edae1 100644 --- a/examples/simdag/dot/dot_test.c +++ b/examples/simdag/dot/dot_test.c @@ -8,7 +8,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" #include "xbt/ex.h" #include diff --git a/examples/simdag/dot/dot_test2.c b/examples/simdag/dot/dot_test2.c index d065aad847..ece779728f 100644 --- a/examples/simdag/dot/dot_test2.c +++ b/examples/simdag/dot/dot_test2.c @@ -8,7 +8,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" #include "xbt/ex.h" #include diff --git a/examples/simdag/dot/ptg_test.c b/examples/simdag/dot/ptg_test.c index cdaf55547b..c55d032e6b 100644 --- a/examples/simdag/dot/ptg_test.c +++ b/examples/simdag/dot/ptg_test.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" #include "xbt/ex.h" #include diff --git a/examples/simdag/dot/simulate_dot.c b/examples/simdag/dot/simulate_dot.c index e16cb56819..a94f8fcc45 100644 --- a/examples/simdag/dot/simulate_dot.c +++ b/examples/simdag/dot/simulate_dot.c @@ -8,7 +8,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" #include "xbt/ex.h" #include diff --git a/examples/simdag/dot/test_simdag_dotload_notrace.tesh b/examples/simdag/dot/test_simdag_dotload_notrace.tesh deleted file mode 100644 index d764073ece..0000000000 --- a/examples/simdag/dot/test_simdag_dotload_notrace.tesh +++ /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? diff --git a/examples/simdag/goal/goal_test.c b/examples/simdag/goal/goal_test.c index fa2251f6f1..f326cce9a0 100644 --- a/examples/simdag/goal/goal_test.c +++ b/examples/simdag/goal/goal_test.c @@ -13,7 +13,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" #include "xbt/ex.h" #include diff --git a/examples/simdag/io/sd_io.c b/examples/simdag/io/sd_io.c index 990144fbc1..d1f12214f6 100644 --- a/examples/simdag/io/sd_io.c +++ b/examples/simdag/io/sd_io.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/ex.h" #include "xbt/log.h" diff --git a/examples/simdag/metaxml/sd_meta.c b/examples/simdag/metaxml/sd_meta.c index d126b9d5f5..9cb6620e1d 100644 --- a/examples/simdag/metaxml/sd_meta.c +++ b/examples/simdag/metaxml/sd_meta.c @@ -10,7 +10,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/ex.h" #include "xbt/log.h" #include "xbt/dynar.h" diff --git a/examples/simdag/properties/sd_prop.c b/examples/simdag/properties/sd_prop.c index c996fad4c6..bd15ece50e 100644 --- a/examples/simdag/properties/sd_prop.c +++ b/examples/simdag/properties/sd_prop.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/ex.h" #include "xbt/log.h" #include "xbt/dynar.h" diff --git a/examples/simdag/scheduling/minmin_test.c b/examples/simdag/scheduling/minmin_test.c index 87907184d4..bbdd1b3139 100644 --- a/examples/simdag/scheduling/minmin_test.c +++ b/examples/simdag/scheduling/minmin_test.c @@ -8,7 +8,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" #include "xbt/ex.h" #include diff --git a/examples/simdag/sd_avail.c b/examples/simdag/sd_avail.c index 51eec52c09..4873c11290 100644 --- a/examples/simdag/sd_avail.c +++ b/examples/simdag/sd_avail.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/ex.h" #include "xbt/log.h" diff --git a/examples/simdag/sd_comm_throttling.c b/examples/simdag/sd_comm_throttling.c index b43af3709a..b97e8117e4 100644 --- a/examples/simdag/sd_comm_throttling.c +++ b/examples/simdag/sd_comm_throttling.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/ex.h" #include "xbt/log.h" diff --git a/examples/simdag/sd_fail.c b/examples/simdag/sd_fail.c index eb1fd82cd7..df75380e38 100644 --- a/examples/simdag/sd_fail.c +++ b/examples/simdag/sd_fail.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/ex.h" #include "xbt/log.h" diff --git a/examples/simdag/sd_seq_access.c b/examples/simdag/sd_seq_access.c index e4cb0e6bff..c43d8fdb24 100644 --- a/examples/simdag/sd_seq_access.c +++ b/examples/simdag/sd_seq_access.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/ex.h" #include "xbt/log.h" diff --git a/examples/simdag/sd_test.c b/examples/simdag/sd_test.c index f3e1d5da56..e8befc700a 100644 --- a/examples/simdag/sd_test.c +++ b/examples/simdag/sd_test.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/ex.h" #include "xbt/log.h" diff --git a/examples/simdag/sd_test2.c b/examples/simdag/sd_test2.c index 781a7d4ef7..b566790dda 100644 --- a/examples/simdag/sd_test2.c +++ b/examples/simdag/sd_test2.c @@ -8,7 +8,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" #include "xbt/sysdep.h" /* calloc, printf */ diff --git a/examples/simdag/sd_typed_tasks_test.c b/examples/simdag/sd_typed_tasks_test.c index c64bacb89c..758fede7e1 100644 --- a/examples/simdag/sd_typed_tasks_test.c +++ b/examples/simdag/sd_typed_tasks_test.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/ex.h" #include "xbt/log.h" diff --git a/examples/simdag/simdag_trace.c b/examples/simdag/simdag_trace.c index b93f1a219f..f2a64a8f7c 100644 --- a/examples/simdag/simdag_trace.c +++ b/examples/simdag/simdag_trace.c @@ -6,7 +6,7 @@ #include #include -#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 index 9d87dfce86..0000000000 --- a/examples/simdag/test_simdag_fail_notrace.tesh +++ /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 diff --git a/examples/smpi/NAS/DT-trace/dt.c b/examples/smpi/NAS/DT-trace/dt.c index 862cf26a17..1af5ccead4 100644 --- a/examples/smpi/NAS/DT-trace/dt.c +++ b/examples/smpi/NAS/DT-trace/dt.c @@ -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' diff --git a/examples/smpi/NAS/EP-trace/ep-trace.c b/examples/smpi/NAS/EP-trace/ep-trace.c index 86aba7a7f3..4f606a0e39 100644 --- a/examples/smpi/NAS/EP-trace/ep-trace.c +++ b/examples/smpi/NAS/EP-trace/ep-trace.c @@ -6,7 +6,7 @@ #include "mpi.h" #include "npbparams.h" -#include "instr/instr.h" //TRACE_ +#include "simgrid/instr.h" //TRACE_ #include "randlc.h" diff --git a/examples/smpi/NAS/IS-trace/is-trace.c b/examples/smpi/NAS/IS-trace/is-trace.c index 645038c2b7..57b370bb39 100644 --- a/examples/smpi/NAS/IS-trace/is-trace.c +++ b/examples/smpi/NAS/IS-trace/is-trace.c @@ -44,7 +44,7 @@ #include #include -#include "instr/instr.h" //TRACE_ +#include "simgrid/instr.h" //TRACE_ /******************/ /* default values */ diff --git a/examples/smpi/replay_multiple/replay_multiple.c b/examples/smpi/replay_multiple/replay_multiple.c index 9c1340f914..e45ac6fae7 100644 --- a/examples/smpi/replay_multiple/replay_multiple.c +++ b/examples/smpi/replay_multiple/replay_multiple.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c b/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c index f36ee995a1..79ee7eeed9 100644 --- a/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c +++ b/examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/examples/smpi/tracing/smpi_traced.c b/examples/smpi/tracing/smpi_traced.c index 18ee76cc7b..654dbe5285 100644 --- a/examples/smpi/tracing/smpi_traced.c +++ b/examples/smpi/tracing/smpi_traced.c @@ -6,7 +6,7 @@ #include #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 index 8f629c6f38..0000000000 --- a/include/msg/datatypes.h +++ /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 location (or host) is any possible place where - a process may run. Thus it is represented as a physical - resource with computing capabilities, some mailboxes - to enable running process to communicate with remote ones, and - some private data 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 task may then be defined by a computing - amount, a message size and some private - data. - */ -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 task may then be defined by a computing - amount, a dispatch latency and a collect latency. - \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 code, with some - private data, executing in a location. - - 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 index b4399cdfb6..0000000000 --- a/include/simdag/datatypes.h +++ /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 physical - resource with computing capabilities and has a name. - - @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 name, a current - bandwidth and a current latency. 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 computing amount 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 \ref e_SD_task_state_t "state" 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 diff --git a/include/instr/instr.h b/include/simgrid/instr.h similarity index 71% rename from include/instr/instr.h rename to include/simgrid/instr.h index 325a0ae024..0c37ffe7b6 100644 --- a/include/instr/instr.h +++ b/include/simgrid/instr.h @@ -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_ */ diff --git a/include/instr/jedule/jedule_events.h b/include/simgrid/jedule/jedule_events.h similarity index 100% rename from include/instr/jedule/jedule_events.h rename to include/simgrid/jedule/jedule_events.h diff --git a/include/instr/jedule/jedule_output.h b/include/simgrid/jedule/jedule_output.h similarity index 100% rename from include/instr/jedule/jedule_output.h rename to include/simgrid/jedule/jedule_output.h diff --git a/include/instr/jedule/jedule_platform.h b/include/simgrid/jedule/jedule_platform.h similarity index 100% rename from include/instr/jedule/jedule_platform.h rename to include/simgrid/jedule/jedule_platform.h diff --git a/include/instr/jedule/jedule_sd_binding.h b/include/simgrid/jedule/jedule_sd_binding.h similarity index 91% rename from include/instr/jedule/jedule_sd_binding.h rename to include/simgrid/jedule/jedule_sd_binding.h index 4bed8e1510..a40f5640ff 100644 --- a/include/instr/jedule/jedule_sd_binding.h +++ b/include/simgrid/jedule/jedule_sd_binding.h @@ -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 diff --git a/include/msg/msg.h b/include/simgrid/msg.h similarity index 78% rename from include/msg/msg.h rename to include/simgrid/msg.h index 32a2de4507..4193fd27d1 100644 --- a/include/msg/msg.h +++ b/include/simgrid/msg.h @@ -8,15 +8,204 @@ #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 location (or host) is any possible place where + a process may run. Thus it is represented as a physical + resource with computing capabilities, some mailboxes + to enable running process to communicate with remote ones, and + some private data 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 task may then be defined by a computing + amount, a message size and some private + data. + */ +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 task may then be defined by a computing + amount, a dispatch latency and a collect latency. + \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 code, with some + private data, executing in a location. + + 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_get_list_from_host(msg_host_t) xbt_dynar_t MSG_vm_get_list_from_hosts(msg_dynar_t) + des fonctions de filtrage sur les dynar */ -#include "instr/instr.h" +#include "simgrid/instr.h" diff --git a/include/simdag/simdag.h b/include/simgrid/simdag.h similarity index 72% rename from include/simdag/simdag.h rename to include/simgrid/simdag.h index 31ed69d4aa..adcc3a0619 100644 --- a/include/simdag/simdag.h +++ b/include/simgrid/simdag.h @@ -7,13 +7,100 @@ #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 physical + resource with computing capabilities and has a name. + + @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 name, a current + bandwidth and a current latency. 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 computing amount 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 \ref e_SD_task_state_t "state" 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 diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 0fac060d55..a79adf3726 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -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); diff --git a/include/simgrid_config.h.in b/include/simgrid_config.h.in index b3a3fdfe18..49f6a3a98f 100644 --- a/include/simgrid_config.h.in +++ b/include/simgrid_config.h.in @@ -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@ diff --git a/src/bindings/java/jmsg.c b/src/bindings/java/jmsg.c index c11ba91e7b..b5a7abb076 100644 --- a/src/bindings/java/jmsg.c +++ b/src/bindings/java/jmsg.c @@ -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 +#include #include #include #include @@ -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); diff --git a/src/bindings/java/jmsg.h b/src/bindings/java/jmsg.h index da2b16f25e..b9046ab202 100644 --- a/src/bindings/java/jmsg.h +++ b/src/bindings/java/jmsg.h @@ -8,7 +8,7 @@ #ifndef MSG4JAVA_H #define MSG4JAVA_H -#include +#include #include extern int JAVA_HOST_LEVEL; diff --git a/src/bindings/java/jmsg_as.c b/src/bindings/java/jmsg_as.c index a3daec624b..f3ed319498 100644 --- a/src/bindings/java/jmsg_as.c +++ b/src/bindings/java/jmsg_as.c @@ -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); diff --git a/src/bindings/java/jmsg_as.h b/src/bindings/java/jmsg_as.h index ad928b65cb..8e9ea422ec 100644 --- a/src/bindings/java/jmsg_as.h +++ b/src/bindings/java/jmsg_as.h @@ -9,19 +9,7 @@ #ifndef MSG_JAS_H #define MSG_JAS_H #include -#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); diff --git a/src/bindings/java/jmsg_comm.c b/src/bindings/java/jmsg_comm.c index 85b70d673a..bf6a09b6fe 100644 --- a/src/bindings/java/jmsg_comm.c +++ b/src/bindings/java/jmsg_comm.c @@ -10,7 +10,7 @@ #include "jxbt_utilities.h" #include "jmsg.h" -#include +#include XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg); static jfieldID jcomm_field_Comm_bind; diff --git a/src/bindings/java/jmsg_comm.h b/src/bindings/java/jmsg_comm.h index 5cb7ba5d98..ec099e9311 100644 --- a/src/bindings/java/jmsg_comm.h +++ b/src/bindings/java/jmsg_comm.h @@ -9,7 +9,7 @@ #ifndef MSG_JCOMM_H #define MSG_JCOMM_H #include -#include +#include /** * This function binds the task associated with the communication to * the java communication object. diff --git a/src/bindings/java/jmsg_file.h b/src/bindings/java/jmsg_file.h index e2c0352e39..0fe72f636b 100644 --- a/src/bindings/java/jmsg_file.h +++ b/src/bindings/java/jmsg_file.h @@ -9,7 +9,7 @@ #ifndef MSG_JFILE_H #define MSG_JFILE_H #include -#include "msg/msg.h" +#include "simgrid/msg.h" jfieldID jfile_field_bind; diff --git a/src/bindings/java/jmsg_host.c b/src/bindings/java/jmsg_host.c index 0d4469c572..7c013eaedf 100644 --- a/src/bindings/java/jmsg_host.c +++ b/src/bindings/java/jmsg_host.c @@ -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" diff --git a/src/bindings/java/jmsg_host.h b/src/bindings/java/jmsg_host.h index 609b9a95c8..f1ea5165f7 100644 --- a/src/bindings/java/jmsg_host.h +++ b/src/bindings/java/jmsg_host.h @@ -10,7 +10,7 @@ #define MSG_JHOST_H #include -#include "msg/msg.h" +#include "simgrid/msg.h" /** * This function returns a new java host instance. diff --git a/src/bindings/java/jmsg_process.c b/src/bindings/java/jmsg_process.c index 8625d25479..a65f183b7f 100644 --- a/src/bindings/java/jmsg_process.c +++ b/src/bindings/java/jmsg_process.c @@ -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; diff --git a/src/bindings/java/jmsg_process.h b/src/bindings/java/jmsg_process.h index 54b211d702..129fba2f5d 100644 --- a/src/bindings/java/jmsg_process.h +++ b/src/bindings/java/jmsg_process.h @@ -10,7 +10,7 @@ #define MSG_JPROCESS_H #include -#include +#include #include //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 diff --git a/src/bindings/java/jmsg_storage.c b/src/bindings/java/jmsg_storage.c index 150ae146c8..0fee6cdc32 100644 --- a/src/bindings/java/jmsg_storage.c +++ b/src/bindings/java/jmsg_storage.c @@ -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" diff --git a/src/bindings/java/jmsg_storage.h b/src/bindings/java/jmsg_storage.h index eeda61e123..763dd8ff12 100644 --- a/src/bindings/java/jmsg_storage.h +++ b/src/bindings/java/jmsg_storage.h @@ -9,7 +9,7 @@ #ifndef MSG_JSTORAGE_H #define MSG_JSTORAGE_H #include -#include "msg/msg.h" +#include "simgrid/msg.h" /** * This function returns a new java storage instance. diff --git a/src/bindings/java/jmsg_synchro.h b/src/bindings/java/jmsg_synchro.h index a42e9b6dd3..d89ebcf318 100644 --- a/src/bindings/java/jmsg_synchro.h +++ b/src/bindings/java/jmsg_synchro.h @@ -10,7 +10,7 @@ #define MSG_JSYNCHRO_H #include -#include +#include #include JNIEXPORT void JNICALL diff --git a/src/bindings/java/jmsg_task.c b/src/bindings/java/jmsg_task.c index 77aa3158e7..850a999a2c 100644 --- a/src/bindings/java/jmsg_task.c +++ b/src/bindings/java/jmsg_task.c @@ -15,7 +15,7 @@ #include "jxbt_utilities.h" -#include +#include 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 diff --git a/src/bindings/java/jmsg_task.h b/src/bindings/java/jmsg_task.h index 068dee06e8..77daa9fbd0 100644 --- a/src/bindings/java/jmsg_task.h +++ b/src/bindings/java/jmsg_task.h @@ -10,27 +10,8 @@ #define MSG_JTASK_H #include -#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); /** diff --git a/src/bindings/java/jmsg_vm.c b/src/bindings/java/jmsg_vm.c index a86efdacef..d16c3b0fcc 100644 --- a/src/bindings/java/jmsg_vm.c +++ b/src/bindings/java/jmsg_vm.c @@ -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"); } } diff --git a/src/bindings/java/jmsg_vm.h b/src/bindings/java/jmsg_vm.h index ba07003d22..5b97777087 100644 --- a/src/bindings/java/jmsg_vm.h +++ b/src/bindings/java/jmsg_vm.h @@ -10,7 +10,7 @@ #define MSG_VM_H #include -#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); diff --git a/src/bindings/java/jtrace.c b/src/bindings/java/jtrace.c index 4e602b4a7e..2227b7cd4f 100644 --- a/src/bindings/java/jtrace.c +++ b/src/bindings/java/jtrace.c @@ -10,7 +10,7 @@ // It will be great that a JNI expert gives a look to validate it - Adrien ;) #include "jtrace.h" -#include +#include /* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */ #ifndef JNIEXPORT diff --git a/src/bindings/java/org/simgrid/msg/As.java b/src/bindings/java/org/simgrid/msg/As.java index e8a7a983d6..35248f8cb0 100644 --- a/src/bindings/java/org/simgrid/msg/As.java +++ b/src/bindings/java/org/simgrid/msg/As.java @@ -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(); + } } diff --git a/src/bindings/java/org/simgrid/msg/Comm.java b/src/bindings/java/org/simgrid/msg/Comm.java index 672e70289c..ebe63fc16a 100644 --- a/src/bindings/java/org/simgrid/msg/Comm.java +++ b/src/bindings/java/org/simgrid/msg/Comm.java @@ -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. diff --git a/src/bindings/java/org/simgrid/msg/File.java b/src/bindings/java/org/simgrid/msg/File.java index f0c78eb5e4..bd19252e4d 100644 --- a/src/bindings/java/org/simgrid/msg/File.java +++ b/src/bindings/java/org/simgrid/msg/File.java @@ -44,7 +44,7 @@ public class File { * Close the file. */ public native void close(); - + /** * Class initializer, to initialize various JNI stuff */ diff --git a/src/bindings/java/org/simgrid/msg/Host.java b/src/bindings/java/org/simgrid/msg/Host.java index 07dace87a8..bfa1997a57 100644 --- a/src/bindings/java/org/simgrid/msg/Host.java +++ b/src/bindings/java/org/simgrid/msg/Host.java @@ -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 */ diff --git a/src/bindings/java/org/simgrid/msg/Msg.java b/src/bindings/java/org/simgrid/msg/Msg.java index 6cdc8944e1..8153a4241d 100644 --- a/src/bindings/java/org/simgrid/msg/Msg.java +++ b/src/bindings/java/org/simgrid/msg/Msg.java @@ -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 */ diff --git a/src/bindings/java/org/simgrid/msg/MsgException.java b/src/bindings/java/org/simgrid/msg/MsgException.java index 166d5e3a76..bebfe327f4 100644 --- a/src/bindings/java/org/simgrid/msg/MsgException.java +++ b/src/bindings/java/org/simgrid/msg/MsgException.java @@ -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 MsgException without a - * detail message. - */ - public MsgException() { - super(); - } - /** - * Constructs an MsgException with a detail message. - * - * @param s the detail message. - */ - public MsgException(String s) { - super(s); - } + /** + * Constructs an MsgException without a + * detail message. + */ + public MsgException() { + super(); + } + /** + * Constructs an MsgException with a detail message. + * + * @param s the detail message. + */ + public MsgException(String s) { + super(s); + } } diff --git a/src/bindings/java/org/simgrid/msg/Mutex.java b/src/bindings/java/org/simgrid/msg/Mutex.java index 96dca06a4b..fbcb6340a2 100644 --- a/src/bindings/java/org/simgrid/msg/Mutex.java +++ b/src/bindings/java/org/simgrid/msg/Mutex.java @@ -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 */ diff --git a/src/bindings/java/org/simgrid/msg/Process.java b/src/bindings/java/org/simgrid/msg/Process.java index 5791ccdaec..2e4eace031 100644 --- a/src/bindings/java/org/simgrid/msg/Process.java +++ b/src/bindings/java/org/simgrid/msg/Process.java @@ -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 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(); 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(); diff --git a/src/bindings/java/org/simgrid/msg/RngStream.java b/src/bindings/java/org/simgrid/msg/RngStream.java index 6d5638c0f1..c7d3a5d837 100644 --- a/src/bindings/java/org/simgrid/msg/RngStream.java +++ b/src/bindings/java/org/simgrid/msg/RngStream.java @@ -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 */ diff --git a/src/bindings/java/org/simgrid/msg/Semaphore.java b/src/bindings/java/org/simgrid/msg/Semaphore.java index f8e4e1444c..d74a8bcc9d 100644 --- a/src/bindings/java/org/simgrid/msg/Semaphore.java +++ b/src/bindings/java/org/simgrid/msg/Semaphore.java @@ -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 diff --git a/src/bindings/java/org/simgrid/msg/Storage.java b/src/bindings/java/org/simgrid/msg/Storage.java index 9f5a45a2e4..1b7950163c 100644 --- a/src/bindings/java/org/simgrid/msg/Storage.java +++ b/src/bindings/java/org/simgrid/msg/Storage.java @@ -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 diff --git a/src/bindings/java/org/simgrid/msg/Task.java b/src/bindings/java/org/simgrid/msg/Task.java index 4be7046fad..95893ec91a 100644 --- a/src/bindings/java/org/simgrid/msg/Task.java +++ b/src/bindings/java/org/simgrid/msg/Task.java @@ -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; - } } diff --git a/src/bindings/java/org/simgrid/msg/VM.java b/src/bindings/java/org/simgrid/msg/VM.java index ac8a512561..c6a522087f 100644 --- a/src/bindings/java/org/simgrid/msg/VM.java +++ b/src/bindings/java/org/simgrid/msg/VM.java @@ -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 diff --git a/src/include/surf/maxmin.h b/src/include/surf/maxmin.h index 2a5dc0aad2..b6a6e969f0 100644 --- a/src/include/surf/maxmin.h +++ b/src/include/surf/maxmin.h @@ -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 diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index c9f19e8186..6a887bcedb 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -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); /** diff --git a/src/instr/instr_config.c b/src/instr/instr_config.c index 091799b46c..2db53d28fe 100644 --- a/src/instr/instr_config.c +++ b/src/instr/instr_config.c @@ -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 */ diff --git a/src/instr/instr_interface.c b/src/instr/instr_interface.c index a2ff8b3fda..7fedc8349f 100644 --- a/src/instr/instr_interface.c +++ b/src/instr/instr_interface.c @@ -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 */ diff --git a/src/instr/instr_paje_containers.c b/src/instr/instr_paje_containers.c index 3a7ce52fc2..752649eeb3 100644 --- a/src/instr/instr_paje_containers.c +++ b/src/instr/instr_paje_containers.c @@ -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 */ diff --git a/src/instr/instr_paje_header.c b/src/instr/instr_paje_header.c index b4ca75a2fd..38c2a7402a 100644 --- a/src/instr/instr_paje_header.c +++ b/src/instr/instr_paje_header.c @@ -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 - diff --git a/src/instr/instr_paje_types.c b/src/instr/instr_paje_types.c index 32177ded7c..791fdf7e2b 100644 --- a/src/instr/instr_paje_types.c +++ b/src/instr/instr_paje_types.c @@ -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 diff --git a/src/instr/instr_paje_values.c b/src/instr/instr_paje_values.c index 8e81a9ffe1..31bf44d6d4 100644 --- a/src/instr/instr_paje_values.c +++ b/src/instr/instr_paje_values.c @@ -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 diff --git a/src/instr/instr_private.h b/src/instr/instr_private.h index 2b56b6dce8..1f4b694c29 100644 --- a/src/instr/instr_private.h +++ b/src/instr/instr_private.h @@ -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 diff --git a/src/instr/instr_resource_utilization.c b/src/instr/instr_resource_utilization.c index c3be52905d..fc390070b2 100644 --- a/src/instr/instr_resource_utilization.c +++ b/src/instr/instr_resource_utilization.c @@ -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 */ diff --git a/src/instr/instr_trace.c b/src/instr/instr_trace.c index 8481697cda..dfa616ab18 100644 --- a/src/instr/instr_trace.c +++ b/src/instr/instr_trace.c @@ -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 */ diff --git a/src/mc/mc_private.h b/src/mc/mc_private.h index 86b7e64837..997aca035a 100644 --- a/src/mc/mc_private.h +++ b/src/mc/mc_private.h @@ -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" diff --git a/src/msg/instr_msg_process.c b/src/msg/instr_msg_process.c index 977c0b6fbc..c2307ca7c7 100644 --- a/src/msg/instr_msg_process.c +++ b/src/msg/instr_msg_process.c @@ -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 */ diff --git a/src/msg/instr_msg_task.c b/src/msg/instr_msg_task.c index 4334eac303..cc98733b82 100644 --- a/src/msg/instr_msg_task.c +++ b/src/msg/instr_msg_task.c @@ -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 */ diff --git a/src/msg/instr_msg_vm.c b/src/msg/instr_msg_vm.c index 825b71b942..5387c10ff3 100644 --- a/src/msg/instr_msg_vm.c +++ b/src/msg/instr_msg_vm.c @@ -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 */ diff --git a/src/msg/msg_global.c b/src/msg/msg_global.c index 9511d5e150..b9351e8bc1 100644 --- a/src/msg/msg_global.c +++ b/src/msg/msg_global.c @@ -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; } diff --git a/src/msg/msg_gos.c b/src/msg/msg_gos.c index b36b3eb1cf..11218c98b1 100644 --- a/src/msg/msg_gos.c +++ b/src/msg/msg_gos.c @@ -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 } /** diff --git a/src/msg/msg_io.c b/src/msg/msg_io.c index a35e59899b..4e0971f2a6 100644 --- a/src/msg/msg_io.c +++ b/src/msg/msg_io.c @@ -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); diff --git a/src/msg/msg_mailbox.c b/src/msg/msg_mailbox.c index 53f99df9df..cffff60504 100644 --- a/src/msg/msg_mailbox.c +++ b/src/msg/msg_mailbox.c @@ -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); } diff --git a/src/msg/msg_mailbox.h b/src/msg/msg_mailbox.h index ce93121229..6a2bb06d6d 100644 --- a/src/msg/msg_mailbox.h +++ b/src/msg/msg_mailbox.h @@ -9,7 +9,7 @@ #include "xbt/fifo.h" #include "simgrid/simix.h" -#include "msg/datatypes.h" +#include "simgrid/msg.h" SG_BEGIN_DECL() diff --git a/src/msg/msg_private.h b/src/msg/msg_private.h index c6c17a3598..c806583d3f 100644 --- a/src/msg/msg_private.h +++ b/src/msg/msg_private.h @@ -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 */ diff --git a/src/msg/msg_process.c b/src/msg/msg_process.c index 927a4a982f..3a38913527 100644 --- a/src/msg/msg_process.c +++ b/src/msg/msg_process.c @@ -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); } diff --git a/src/msg/msg_task.c b/src/msg/msg_task.c index 2488dac1ef..c6055c5916 100644 --- a/src/msg/msg_task.c +++ b/src/msg/msg_task.c @@ -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; } diff --git a/src/msg/msg_vm.c b/src/msg/msg_vm.c index 9bc7ab0c84..ee3bd5430c 100644 --- a/src/msg/msg_vm.c +++ b/src/msg/msg_vm.c @@ -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 } diff --git a/src/simdag/instr_sd_task.c b/src/simdag/instr_sd_task.c index be63a536e8..a30923bee8 100644 --- a/src/simdag/instr_sd_task.c +++ b/src/simdag/instr_sd_task.c @@ -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 */ diff --git a/src/simdag/private.h b/src/simdag/private.h index ada782bbad..67e9e7beab 100644 --- a/src/simdag/private.h +++ b/src/simdag/private.h @@ -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 */ diff --git a/src/simdag/sd_daxloader.c b/src/simdag/sd_daxloader.c index 6113d3cae6..a1b942ef51 100644 --- a/src/simdag/sd_daxloader.c +++ b/src/simdag/sd_daxloader.c @@ -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 @@ -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 ",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, ¤t_job); diff --git a/src/simdag/sd_dotloader.c b/src/simdag/sd_dotloader.c index cc4edd1abb..e40a053f75 100644 --- a/src/simdag/sd_dotloader.c +++ b/src/simdag/sd_dotloader.c @@ -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 @@ -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); diff --git a/src/simdag/sd_global.c b/src/simdag/sd_global.c index 0d87b7d99a..4af1362a0c 100644 --- a/src/simdag/sd_global.c +++ b/src/simdag/sd_global.c @@ -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; diff --git a/src/simdag/sd_link.c b/src/simdag/sd_link.c index b59b1b407f..a79cd28577 100644 --- a/src/simdag/sd_link.c +++ b/src/simdag/sd_link.c @@ -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" diff --git a/src/simdag/sd_task.c b/src/simdag/sd_task.c index 9c00ca4242..9ab54e6cde 100644 --- a/src/simdag/sd_task.c +++ b/src/simdag/sd_task.c @@ -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;icomputation_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]); } } diff --git a/src/simdag/sd_workstation.c b/src/simdag/sd_workstation.c index 428c71a2ea..5d0872616d 100644 --- a/src/simdag/sd_workstation.c +++ b/src/simdag/sd_workstation.c @@ -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); } /** diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index b2bda9fcef..ac0f9bb8a2 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -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]; } diff --git a/src/simix/libsmx.c b/src/simix/libsmx.c index eb50d4df4c..35b3c8ec62 100644 --- a/src/simix/libsmx.c +++ b/src/simix/libsmx.c @@ -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 diff --git a/src/simix/popping_accessors.h b/src/simix/popping_accessors.h index de024d6e24..be8bd6650f 100644 --- a/src/simix/popping_accessors.h +++ b/src/simix/popping_accessors.h @@ -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); diff --git a/src/simix/popping_bodies.c b/src/simix/popping_bodies.c index 81efa338a2..0b413a2c7b 100644 --- a/src/simix/popping_bodies.c +++ b/src/simix/popping_bodies.c @@ -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 diff --git a/src/simix/popping_enum.h b/src/simix/popping_enum.h index 634f03957a..40c949d44b 100644 --- a/src/simix/popping_enum.h +++ b/src/simix/popping_enum.h @@ -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, diff --git a/src/simix/popping_generated.c b/src/simix/popping_generated.c index b339a4a1a0..fb72a40b29 100644 --- a/src/simix/popping_generated.c +++ b/src/simix/popping_generated.c @@ -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; diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index 22578fd5e2..154c162cbd 100644 --- a/src/simix/simcalls.in +++ b/src/simix/simcalls.in @@ -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) diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index ecd64f0502..cb99d35900 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -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(); diff --git a/src/simix/smx_host.c b/src/simix/smx_host.c index d05a6be7b3..be58fe500e 100644 --- a/src/simix/smx_host.c +++ b/src/simix/smx_host.c @@ -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. diff --git a/src/simix/smx_host_private.h b/src/simix/smx_host_private.h index 33316bd61d..d267baa251 100644 --- a/src/simix/smx_host_private.h +++ b/src/simix/smx_host_private.h @@ -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); diff --git a/src/simix/smx_io.c b/src/simix/smx_io.c index be6a6539a8..118b800db7 100644 --- a/src/simix/smx_io.c +++ b/src/simix/smx_io.c @@ -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); diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 9f47c97395..942deb5779 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -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; diff --git a/src/simix/smx_private.h b/src/simix/smx_private.h index 74f60d11c9..4a48723be7 100644 --- a/src/simix/smx_private.h +++ b/src/simix/smx_private.h @@ -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); diff --git a/src/simix/smx_process.c b/src/simix/smx_process.c index d2e80ba4fe..b0c51cd1b6 100644 --- a/src/simix/smx_process.c +++ b/src/simix/smx_process.c @@ -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 = diff --git a/src/smpi/colls/smpi_automatic_selector.c b/src/smpi/colls/smpi_automatic_selector.c index 83e6ac3cfe..b775d4f86f 100644 --- a/src/smpi/colls/smpi_automatic_selector.c +++ b/src/smpi/colls/smpi_automatic_selector.c @@ -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)\ diff --git a/src/smpi/instr_smpi.c b/src/smpi/instr_smpi.c index 1560ae5d07..fb091bd333 100644 --- a/src/smpi/instr_smpi.c +++ b/src/smpi/instr_smpi.c @@ -10,9 +10,6 @@ #include #include - -#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 */ diff --git a/src/smpi/private.h b/src/smpi/private.h index 7c5be9dac5..a9817576c8 100644 --- a/src/smpi/private.h +++ b/src/smpi/private.h @@ -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); diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index 768b13b8b5..bc7ac717e2 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -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)); diff --git a/src/smpi/smpi_bench.c b/src/smpi/smpi_bench.c index 26f7c542ee..79179a7a42 100644 --- a/src/smpi/smpi_bench.c +++ b/src/smpi/smpi_bench.c @@ -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; diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index 585847b760..4e8202c77b 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -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(); } diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index f9c75dbc6e..75e2eddbe8 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -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; itype = 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; diff --git a/src/smpi/smpi_replay.c b/src/smpi/smpi_replay.c index f08faf1cc6..1636ea5006 100644 --- a/src/smpi/smpi_replay.c +++ b/src/smpi/smpi_replay.c @@ -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; } diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index 98ad19a55c..342c6e5264 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -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(lmm_variable_id(var)); diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 7dc2d1a599..906e07e783 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -57,7 +57,6 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/) && (double_equals(xbt_heap_maxkey(getActionHeap()), now, sg_surf_precision))) { action = static_cast(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(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(&*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(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); } diff --git a/src/surf/instr_routing.c b/src/surf/instr_routing.c index 7dd95b1471..11cd8a6c1b 100644 --- a/src/surf/instr_routing.c +++ b/src/surf/instr_routing.c @@ -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 */ - diff --git a/src/surf/instr_surf.c b/src/surf/instr_surf.c index 9a2764ae00..445ffb00ba 100644 --- a/src/surf/instr_surf.c +++ b/src/surf/instr_surf.c @@ -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 */ diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index fe4d32da08..adc366b6bd 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -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); diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index 1f17a2c0f3..06001baa61 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -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() { diff --git a/src/surf/network_gtnets.hpp b/src/surf/network_gtnets.hpp index 2cbcf7332c..7cc1c5aa6d 100644 --- a/src/surf/network_gtnets.hpp +++ b/src/surf/network_gtnets.hpp @@ -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_ */ diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index 789dc98e83..75effecaf4 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -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); diff --git a/src/surf/network_ns3.hpp b/src/surf/network_ns3.hpp index dbd11326f4..8a29dfd383 100644 --- a/src/surf/network_ns3.hpp +++ b/src/surf/network_ns3.hpp @@ -93,11 +93,9 @@ void suspend(); void resume(); //private: -#ifdef HAVE_TRACING double m_lastSent; RoutingEdgePtr p_srcElm; RoutingEdgePtr p_dstElm; -#endif //HAVE_TRACING }; diff --git a/src/surf/storage_n11.cpp b/src/surf/storage_n11.cpp index 04493201dd..e1dc8f1bd3 100644 --- a/src/surf/storage_n11.cpp +++ b/src/surf/storage_n11.cpp @@ -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; } diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index 70bd4963b0..4576e1a7d0 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -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(model->executeParallelTask(workstation_nb, workstation_list, computation_amount, communication_amount, rate)); + return static_cast(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(); diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 7d0ce714ff..db8618de28 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -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(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); } diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index 08d445b671..fc954fc79c 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -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 diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index 06f68802b2..3193ec3d0c 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -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 } /** diff --git a/src/surf/surf_routing_floyd.cpp b/src/surf/surf_routing_floyd.cpp index 7d4e9423f8..e87df4f4e7 100644 --- a/src/surf/surf_routing_floyd.cpp +++ b/src/surf/surf_routing_floyd.cpp @@ -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 */ diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 90c3711c97..34bbc7b373 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -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; diff --git a/src/surf/surfxml_parseplatf.c b/src/surf/surfxml_parseplatf.c index f8130cbecc..1a88c38027 100644 --- a/src/surf/surfxml_parseplatf.c +++ b/src/surf/surfxml_parseplatf.c @@ -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; } diff --git a/src/surf/vm_workstation_hl13.cpp b/src/surf/vm_workstation_hl13.cpp index 563c3dba29..725b313a38 100644 --- a/src/surf/vm_workstation_hl13.cpp +++ b/src/surf/vm_workstation_hl13.cpp @@ -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); } diff --git a/src/surf/vm_workstation_hl13.hpp b/src/surf/vm_workstation_hl13.hpp index a17605c3c8..c09d5f3eb1 100644 --- a/src/surf/vm_workstation_hl13.hpp +++ b/src/surf/vm_workstation_hl13.hpp @@ -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*/); }; diff --git a/src/surf/workstation_clm03.cpp b/src/surf/workstation_clm03.cpp index f149e7f1e0..1472e155eb 100644 --- a/src/surf/workstation_clm03.cpp +++ b/src/surf/workstation_clm03.cpp @@ -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){ diff --git a/src/surf/workstation_clm03.hpp b/src/surf/workstation_clm03.hpp index 88b485435a..11e24357d2 100644 --- a/src/surf/workstation_clm03.hpp +++ b/src/surf/workstation_clm03.hpp @@ -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); }; diff --git a/src/surf/workstation_interface.hpp b/src/surf/workstation_interface.hpp index 967f2e484e..13ccd603ff 100644 --- a/src/surf/workstation_interface.hpp +++ b/src/surf/workstation_interface.hpp @@ -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 diff --git a/src/surf/workstation_ptask_L07.cpp b/src/surf/workstation_ptask_L07.cpp index f7b460abf8..db86aab305 100644 --- a/src/surf/workstation_ptask_L07.cpp +++ b/src/surf/workstation_ptask_L07.cpp @@ -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(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(workstation_list[i])->p_netElm, @@ -259,7 +258,7 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb, link = static_cast(_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(getModel())->executeParallelTask(1, workstation_list, - computation_amount, - communication_amount, -1); + flops_amount, + bytes_amount, -1); } ActionPtr WorkstationL07::sleep(double duration) diff --git a/src/surf/workstation_ptask_L07.hpp b/src/surf/workstation_ptask_L07.hpp index 364ed78a54..2b97f71882 100644 --- a/src/surf/workstation_ptask_L07.hpp +++ b/src/surf/workstation_ptask_L07.hpp @@ -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) diff --git a/src/xbt/log.c b/src/xbt/log.c index a121bd8776..2af7c987d8 100644 --- a/src/xbt/log.c +++ b/src/xbt/log.c @@ -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 diff --git a/teshsuite/mc/replay/random_bug.c b/teshsuite/mc/replay/random_bug.c index 80bcf410eb..fea8c27ac3 100644 --- a/teshsuite/mc/replay/random_bug.c +++ b/teshsuite/mc/replay/random_bug.c @@ -6,7 +6,7 @@ #include -#include +#include #include /** An (fake) application with a bug occuring for some random values diff --git a/teshsuite/msg/get_sender/get_sender.c b/teshsuite/msg/get_sender/get_sender.c index bc9deb5bb1..5774e91fb4 100644 --- a/teshsuite/msg/get_sender/get_sender.c +++ b/teshsuite/msg/get_sender/get_sender.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Messages specific to this example"); diff --git a/teshsuite/msg/host_on_off/host_on_off.c b/teshsuite/msg/host_on_off/host_on_off.c index fb812dbc79..530fdd0304 100644 --- a/teshsuite/msg/host_on_off/host_on_off.c +++ b/teshsuite/msg/host_on_off/host_on_off.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/teshsuite/msg/host_on_off_processes/host_on_off_processes.c b/teshsuite/msg/host_on_off_processes/host_on_off_processes.c index 8c136170a0..f940ec9744 100644 --- a/teshsuite/msg/host_on_off_processes/host_on_off_processes.c +++ b/teshsuite/msg/host_on_off_processes/host_on_off_processes.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/teshsuite/msg/pid/pid.c b/teshsuite/msg/pid/pid.c index 0fee70ac43..015017c19f 100644 --- a/teshsuite/msg/pid/pid.c +++ b/teshsuite/msg/pid/pid.c @@ -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, diff --git a/teshsuite/msg/process/process.c b/teshsuite/msg/process/process.c index e999b4bed0..f69e8ffa19 100644 --- a/teshsuite/msg/process/process.c +++ b/teshsuite/msg/process/process.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/teshsuite/msg/process_join/process_join.c b/teshsuite/msg/process_join/process_join.c index 8f6e9d8ca8..049ab166e4 100644 --- a/teshsuite/msg/process_join/process_join.c +++ b/teshsuite/msg/process_join/process_join.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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. */ diff --git a/teshsuite/msg/storage/concurrent_rw.c b/teshsuite/msg/storage/concurrent_rw.c index 8d938bb6dd..592715a8da 100644 --- a/teshsuite/msg/storage/concurrent_rw.c +++ b/teshsuite/msg/storage/concurrent_rw.c @@ -2,7 +2,7 @@ * All rights reserved. */ -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/log.h" #include diff --git a/teshsuite/msg/storage/storage_basic.c b/teshsuite/msg/storage/storage_basic.c index 034a0ee72f..8252c9e838 100644 --- a/teshsuite/msg/storage/storage_basic.c +++ b/teshsuite/msg/storage/storage_basic.c @@ -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); } diff --git a/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c b/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c index 20816633f1..0ba661d7b1 100644 --- a/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c +++ b/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#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; diff --git a/teshsuite/msg/trace/test_trace_integration.c b/teshsuite/msg/trace/test_trace_integration.c index 96ddc4cc89..54b2f2f2b2 100644 --- a/teshsuite/msg/trace/test_trace_integration.c +++ b/teshsuite/msg/trace/test_trace_integration.c @@ -6,7 +6,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "xbt/log.h" #include "xbt/asserts.h" diff --git a/teshsuite/simdag/availability/availability_test.c b/teshsuite/simdag/availability/availability_test.c index 0bec635890..9389625db9 100644 --- a/teshsuite/simdag/availability/availability_test.c +++ b/teshsuite/simdag/availability/availability_test.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/teshsuite/simdag/basic/basic0.c b/teshsuite/simdag/basic/basic0.c index 2961efdd87..9488361fd0 100644 --- a/teshsuite/simdag/basic/basic0.c +++ b/teshsuite/simdag/basic/basic0.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic0, sd, "SimDag test basic0"); diff --git a/teshsuite/simdag/basic/basic1.c b/teshsuite/simdag/basic/basic1.c index 48b79528a6..6d13dc7190 100644 --- a/teshsuite/simdag/basic/basic1.c +++ b/teshsuite/simdag/basic/basic1.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic1, sd, "SimDag test basic1"); diff --git a/teshsuite/simdag/basic/basic2.c b/teshsuite/simdag/basic/basic2.c index 44e6d7bde9..620f47a793 100644 --- a/teshsuite/simdag/basic/basic2.c +++ b/teshsuite/simdag/basic/basic2.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic2, sd, "SimDag test basic2"); diff --git a/teshsuite/simdag/basic/basic3.c b/teshsuite/simdag/basic/basic3.c index 273e1177ad..f4ebf046b6 100644 --- a/teshsuite/simdag/basic/basic3.c +++ b/teshsuite/simdag/basic/basic3.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic3, sd, "SimDag test basic3"); diff --git a/teshsuite/simdag/basic/basic4.c b/teshsuite/simdag/basic/basic4.c index 0005e04d3a..52da3c9198 100644 --- a/teshsuite/simdag/basic/basic4.c +++ b/teshsuite/simdag/basic/basic4.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic4, sd, "SimDag test basic4"); diff --git a/teshsuite/simdag/basic/basic5.c b/teshsuite/simdag/basic/basic5.c index 9dfa416dd4..bf94828be1 100644 --- a/teshsuite/simdag/basic/basic5.c +++ b/teshsuite/simdag/basic/basic5.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic5, sd, "SimDag test basic5"); diff --git a/teshsuite/simdag/basic/basic6.c b/teshsuite/simdag/basic/basic6.c index bd1de6cd5f..7f1cbb8cbc 100644 --- a/teshsuite/simdag/basic/basic6.c +++ b/teshsuite/simdag/basic/basic6.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/asserts.h" #include "xbt/log.h" diff --git a/teshsuite/simdag/incomplete/incomplete.c b/teshsuite/simdag/incomplete/incomplete.c index b82a105e86..267614a3da 100644 --- a/teshsuite/simdag/incomplete/incomplete.c +++ b/teshsuite/simdag/incomplete/incomplete.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(incomplete, sd, "SimDag incomplete test"); diff --git a/teshsuite/simdag/network/mxn/test_intra_all2all.c b/teshsuite/simdag/network/mxn/test_intra_all2all.c index e864eb5ab4..cf95a0a1bc 100644 --- a/teshsuite/simdag/network/mxn/test_intra_all2all.c +++ b/teshsuite/simdag/network/mxn/test_intra_all2all.c @@ -9,7 +9,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" /* * intra communication test diff --git a/teshsuite/simdag/network/mxn/test_intra_independent_comm.c b/teshsuite/simdag/network/mxn/test_intra_independent_comm.c index e7baa31af0..58d483757c 100644 --- a/teshsuite/simdag/network/mxn/test_intra_independent_comm.c +++ b/teshsuite/simdag/network/mxn/test_intra_independent_comm.c @@ -9,7 +9,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" /* * intra communication test diff --git a/teshsuite/simdag/network/mxn/test_intra_scatter.c b/teshsuite/simdag/network/mxn/test_intra_scatter.c index c0efc7632f..00c157b94f 100644 --- a/teshsuite/simdag/network/mxn/test_intra_scatter.c +++ b/teshsuite/simdag/network/mxn/test_intra_scatter.c @@ -9,7 +9,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" /* * intra communication test 1 diff --git a/teshsuite/simdag/network/p2p/test_latency1.c b/teshsuite/simdag/network/p2p/test_latency1.c index 51080ceaad..f3987b1fc2 100644 --- a/teshsuite/simdag/network/p2p/test_latency1.c +++ b/teshsuite/simdag/network/p2p/test_latency1.c @@ -9,7 +9,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" /* * simple latency test diff --git a/teshsuite/simdag/network/p2p/test_latency2.c b/teshsuite/simdag/network/p2p/test_latency2.c index 70d584c172..077f722d21 100644 --- a/teshsuite/simdag/network/p2p/test_latency2.c +++ b/teshsuite/simdag/network/p2p/test_latency2.c @@ -9,7 +9,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" /* diff --git a/teshsuite/simdag/network/p2p/test_latency3.c b/teshsuite/simdag/network/p2p/test_latency3.c index 5d314201e9..e224bd9a36 100644 --- a/teshsuite/simdag/network/p2p/test_latency3.c +++ b/teshsuite/simdag/network/p2p/test_latency3.c @@ -9,7 +9,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" /** * bw and latency test 3 diff --git a/teshsuite/simdag/network/p2p/test_latency_bound.c b/teshsuite/simdag/network/p2p/test_latency_bound.c index 694a5c3de5..250af33c53 100644 --- a/teshsuite/simdag/network/p2p/test_latency_bound.c +++ b/teshsuite/simdag/network/p2p/test_latency_bound.c @@ -9,7 +9,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #define TASK_NUM 3 diff --git a/teshsuite/simdag/network/test_reinit_costs.c b/teshsuite/simdag/network/test_reinit_costs.c index fa9e319c4b..9e946a8d04 100644 --- a/teshsuite/simdag/network/test_reinit_costs.c +++ b/teshsuite/simdag/network/test_reinit_costs.c @@ -9,7 +9,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" /* * This test checks if the reinitialization of diff --git a/teshsuite/simdag/partask/test_comp_only_par.c b/teshsuite/simdag/partask/test_comp_only_par.c index b1c7480571..92e45bff05 100644 --- a/teshsuite/simdag/partask/test_comp_only_par.c +++ b/teshsuite/simdag/partask/test_comp_only_par.c @@ -7,7 +7,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" int main(int argc, char **argv) { diff --git a/teshsuite/simdag/partask/test_comp_only_seq.c b/teshsuite/simdag/partask/test_comp_only_seq.c index 5b24395b6f..589830044c 100644 --- a/teshsuite/simdag/partask/test_comp_only_seq.c +++ b/teshsuite/simdag/partask/test_comp_only_seq.c @@ -7,7 +7,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" int main(int argc, char **argv) { diff --git a/teshsuite/simdag/platforms/Evaluate_get_route_time.c b/teshsuite/simdag/platforms/Evaluate_get_route_time.c index 03285b7aa4..8f06e05d8c 100644 --- a/teshsuite/simdag/platforms/Evaluate_get_route_time.c +++ b/teshsuite/simdag/platforms/Evaluate_get_route_time.c @@ -9,7 +9,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "surf/surf_private.h" #include "xbt/xbt_os_time.h" diff --git a/teshsuite/simdag/platforms/Evaluate_parse_time.c b/teshsuite/simdag/platforms/Evaluate_parse_time.c index a291e6d759..0e6c645bc4 100644 --- a/teshsuite/simdag/platforms/Evaluate_parse_time.c +++ b/teshsuite/simdag/platforms/Evaluate_parse_time.c @@ -8,7 +8,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "surf/surf_private.h" #include "xbt/xbt_os_time.h" diff --git a/teshsuite/simdag/platforms/basic_link_test.c b/teshsuite/simdag/platforms/basic_link_test.c index 5a484e3411..c7c3b717bd 100644 --- a/teshsuite/simdag/platforms/basic_link_test.c +++ b/teshsuite/simdag/platforms/basic_link_test.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "surf/surf_private.h" #include "xbt/log.h" diff --git a/teshsuite/simdag/platforms/basic_parsing_test.c b/teshsuite/simdag/platforms/basic_parsing_test.c index f34e57f899..d701c1dc13 100644 --- a/teshsuite/simdag/platforms/basic_parsing_test.c +++ b/teshsuite/simdag/platforms/basic_parsing_test.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "surf/surf_private.h" int main(int argc, char **argv) diff --git a/teshsuite/simdag/platforms/basic_tracing.c b/teshsuite/simdag/platforms/basic_tracing.c index b0b9a695a4..92a77b321a 100644 --- a/teshsuite/simdag/platforms/basic_tracing.c +++ b/teshsuite/simdag/platforms/basic_tracing.c @@ -6,7 +6,7 @@ #include #include -#include "msg/msg.h" +#include "simgrid/msg.h" #include "surf/surf_private.h" int host(int argc, char *argv[]); diff --git a/teshsuite/simdag/platforms/bogus_disk_attachment.tesh b/teshsuite/simdag/platforms/bogus_disk_attachment.tesh index 02e5e4aae3..1fe9e50757 100644 --- a/teshsuite/simdag/platforms/bogus_disk_attachment.tesh +++ b/teshsuite/simdag/platforms/bogus_disk_attachment.tesh @@ -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 diff --git a/teshsuite/simdag/platforms/bogus_missing_gateway.tesh b/teshsuite/simdag/platforms/bogus_missing_gateway.tesh index f571ffa06c..2313ff6143 100644 --- a/teshsuite/simdag/platforms/bogus_missing_gateway.tesh +++ b/teshsuite/simdag/platforms/bogus_missing_gateway.tesh @@ -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 diff --git a/teshsuite/simdag/platforms/bogus_two_hosts_asymetric.tesh b/teshsuite/simdag/platforms/bogus_two_hosts_asymetric.tesh index a18c41736a..92f666587a 100644 --- a/teshsuite/simdag/platforms/bogus_two_hosts_asymetric.tesh +++ b/teshsuite/simdag/platforms/bogus_two_hosts_asymetric.tesh @@ -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 diff --git a/teshsuite/simdag/platforms/flatifier.c b/teshsuite/simdag/platforms/flatifier.c index 5c33f70653..a9c1c256e2 100644 --- a/teshsuite/simdag/platforms/flatifier.c +++ b/teshsuite/simdag/platforms/flatifier.c @@ -15,7 +15,7 @@ #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" #include "xbt/dict.h" #include "xbt/ex.h" diff --git a/teshsuite/simdag/platforms/is_router_test.c b/teshsuite/simdag/platforms/is_router_test.c index 9ad9de83f8..ee97d65a79 100644 --- a/teshsuite/simdag/platforms/is_router_test.c +++ b/teshsuite/simdag/platforms/is_router_test.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "surf/surf_private.h" extern routing_platf_t routing_platf; diff --git a/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt b/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt index 779209f9e5..ca98ccbc6a 100644 --- a/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt @@ -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) diff --git a/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt b/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt index 1170fa0212..5224a242e8 100644 --- a/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt @@ -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) diff --git a/tools/graphicator/graphicator.c b/tools/graphicator/graphicator.c index 502058978f..c73fbcc92a 100644 --- a/tools/graphicator/graphicator.c +++ b/tools/graphicator/graphicator.c @@ -8,7 +8,7 @@ #include #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; }