</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.1011977604" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+ <configuration buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.1011977604" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.1011977604.157358594" name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.base.368132295" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1122260779" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
- <builder id="cdt.managedbuild.target.gnu.builder.base.1747533038" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+ <builder id="cdt.managedbuild.target.gnu.builder.base.1747533038" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.374652938" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.738159103" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/>
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1053916774" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.738159103" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
+ <option id="gnu.cpp.compiler.option.include.paths.216814103" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="/usr/lib/jvm/java-7-openjdk-amd64/include"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1641160853" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1053916774" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
+ <option id="gnu.c.compiler.option.include.paths.100642505" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="/usr/lib/jvm/java-7-openjdk-amd64/include"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.538328935" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+ </tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.293965464" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.277853741" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/>
- <tool id="cdt.managedbuild.tool.gnu.assembler.base.1593279917" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.277853741" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.144005301" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.base.1593279917" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
+ <option id="gnu.both.asm.option.include.paths.2076655261" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="/usr/lib/jvm/java-7-openjdk-amd64/include"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.2071407067" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
</toolChain>
</folderInfo>
</configuration>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="simgrid.null.30922824" name="simgrid"/>
</storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="refreshScope" versionNumber="2">
+ <configuration configurationName="Default">
+ <resource resourceType="PROJECT" workspacePath="/simgrid"/>
+ </configuration>
+ </storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1011977604;cdt.managedbuild.toolchain.gnu.base.1011977604.157358594;cdt.managedbuild.tool.gnu.c.compiler.base.1053916774;cdt.managedbuild.tool.gnu.c.compiler.input.538328935">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1011977604;cdt.managedbuild.toolchain.gnu.base.1011977604.157358594;cdt.managedbuild.tool.gnu.cpp.compiler.base.738159103;cdt.managedbuild.tool.gnu.cpp.compiler.input.1641160853">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </scannerConfigBuildInfo>
</storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
</cproject>
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
- Add a xbt_heap_update function, to avoid costly xbt_heap_remove+xbt_heap_insert use
- Add a xbt wrapper for simcall_mutex_trylock (asked in [#17878])
- Add two new log appenders : rollfile and splitfile. Patch by Fabien Chaix.
-
+ Build System
+ * Tracing is now always enabled (no way to turn it out)
+ * Move headers around to sort them out on installed systems:
+ - instr/instr.h -> simgrid/instr.h
+ - instr/jedule/* -> simgrid/jedule
+ - simdag/datatypes.h was removed
+ - simdag/simdag.h -> simgrid/simdag.h
+ - msg/datatypes.h was removed
+ - msg/msg.h -> simgrid/msg.h
-- $date Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
# 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)
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
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)
# 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()
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()
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()
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)
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)
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
)
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
)
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
)
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}
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#cmakedefine TIME_WITH_SYS_TIME @TIME_WITH_SYS_TIME@
-/* Tracing SimGrid */
-#cmakedefine HAVE_TRACING @HAVE_TRACING@
-
/* Tracking of latency bound */
#cmakedefine HAVE_LATENCY_BOUND_TRACKING @HAVE_LATENCY_BOUND_TRACKING@
@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/ \
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
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
}
}
}
- this.hostname = host.getName();
+ this.hostname = getHost().getName();
}
/**
* Retrieves the peer list from the tracker
// 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 {
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) {
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 {
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);
*/
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));
}
/**
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();
}
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 {
} catch (MsgException e) {
}
- Msg.info(this.msgName() +" executed task (" + task.getName()+")");
+ Msg.info(this.getName() +" executed task (" + task.getName()+")");
}
}
public double getRemaining(){
- return this.currentTask.getRemainingDuration();
- }
+ return this.currentTask.getFlopsAmount();
}
+}
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
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();
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
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();
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!");
}
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);
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();
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!");
}
}
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "simgrid/simix.h" /* semaphores for the barrier */
#include "xbt.h" /* calloc, printf */
#include "instr/instr_private.h"
#include "bittorrent.h"
#include "peer.h"
#include "tracker.h"
-#include <msg/msg.h>
+#include <simgrid/msg.h>
#include <xbt/RngStream.h>
/**
#include "bittorrent.h"
#include "peer.h"
#include "tracker.h"
-#include <msg/msg.h>
+#include <simgrid/msg.h>
#include <simgrid/platf_generator.h>
/**
* Bittorrent example launcher, using a generated platform
#ifndef BITTORRENT_MESSAGES_H_
#define BITTORRENT_MESSAGES_H_
-#include <msg/msg.h>
+#include <simgrid/msg.h>
/**
* Message sizes
#include "tracker.h"
#include "connection.h"
#include "messages.h"
-#include <msg/msg.h>
+#include <simgrid/msg.h>
#include <xbt/RngStream.h>
#include <limits.h>
#ifndef BITTORRENT_PEER_H
#define BITTORRENT_PEER_H
-#include <msg/msg.h>
+#include <simgrid/msg.h>
#include <xbt/dict.h>
#include <xbt/dynar.h>
#include <xbt/RngStream.h>
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "tracker.h"
-#include <msg/msg.h>
+#include <simgrid/msg.h>
#include <xbt/RngStream.h>
static void task_free(void *data);
#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. */
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc */
/* Create a log channel to have nice outputs. */
#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)
#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
#ifndef KADEPLOY_PEER_H
#define KADEPLOY_PEER_H
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h"
#include "messages.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
#include "xbt/asserts.h"
#include "simgrid/modelchecker.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
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);
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;
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
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;
#include <stdio.h>
#include <sys/time.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
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);
}
#include<stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc */
#include "simgrid/plugins.h"
#include<stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc */
#include "simgrid/plugins.h"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc */
/* Create a log channel to have nice outputs. */
/* 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,
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
#include "xbt/asserts.h"
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
#include "xbt/asserts.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
#include <math.h>
/* Create a log channel to have nice outputs. */
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "surf/surf_private.h"
int host(int argc, char *argv[]);
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "surf/surf_private.h"
int host(int argc, char *argv[]);
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "surf/surf_private.h"
#define INMEGA (1024*1024)
*
******************************************************************************/
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
#include "xbt/dict.h"
#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
#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,
#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"
#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,
#define _MSG_KADEMLIA_EXAMPLES_TASK
#include "common.h"
#include "node.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
/**
* Types of tasks exchanged
*/
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "surf/surfxml_parse.h" /* to override surf_parse and bypass the parser */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "surf/surfxml_parse.h" /* to override surf_parse and bypass the parser */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
/* 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. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
#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,
#include <unistd.h>
#endif
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "mc/mc.h"
#include "xbt/automaton.h"
#include "bugged1_liveness.h"
/* LTL property checked : !(GFcs) */
/******************************************************************************/
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "mc/mc.h"
#include "xbt/automaton.h"
#include "bugged2_liveness.h"
/* reduction of DPOR. */
/******************************************************************************/
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#define AMOUNT_OF_CLIENTS 4
#define CS_PER_PROCESS 2
/* 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"
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
#include "xbt/asserts.h"
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);
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you
- need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
#include <stdio.h>
#include <math.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
#include "xbt/asserts.h"
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/matrix.h"
#include "xbt/log.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
/* 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. */
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(msg_semaphore_example,
#include<stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc */
/* Create a log channel to have nice outputs. */
/* 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. */
/* 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. */
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "surf/surf_private.h"
int host(int argc, char *argv[]);
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "surf/surf_private.h"
int host(int argc, char *argv[]);
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}
*/
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <msg/msg.h>
+#include <simgrid/msg.h>
/** @addtogroup MSG_examples
*
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <msg/msg.h>
+#include <simgrid/msg.h>
/** @addtogroup MSG_examples
*
*/
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
//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;
* (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. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
/** @addtogroup MSG_examples
*/
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
#include "xbt/log.h"
*/
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
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)
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
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
${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
${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
#include <stdlib.h>
#include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
#include "xbt/ex.h"
#include <string.h>
+++ /dev/null
-#! ./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
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
#include <stdlib.h>
#include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
#include "xbt/ex.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
#include "xbt/ex.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
#include "xbt/ex.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
#include "xbt/ex.h"
#include <string.h>
+++ /dev/null
-#! ./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?
#include <stdlib.h>
#include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
#include "xbt/ex.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/ex.h"
#include "xbt/log.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/ex.h"
#include "xbt/log.h"
#include "xbt/dynar.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/ex.h"
#include "xbt/log.h"
#include "xbt/dynar.h"
#include <stdlib.h>
#include <stdio.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
#include "xbt/ex.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/ex.h"
#include "xbt/log.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/ex.h"
#include "xbt/log.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/ex.h"
#include "xbt/log.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/ex.h"
#include "xbt/log.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/ex.h"
#include "xbt/log.h"
#include <stdlib.h>
#include <string.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
#include "xbt/sysdep.h" /* calloc, printf */
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/ex.h"
#include "xbt/log.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/ex.h"
#include "xbt/log.h"
+++ /dev/null
-#! ./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
#include "mpi.h"
#include "npbparams.h"
-#include "instr/instr.h" //TRACE_
+#include "simgrid/instr.h" //TRACE_
#ifndef CLASS
#define CLASS 'S'
#include "mpi.h"
#include "npbparams.h"
-#include "instr/instr.h" //TRACE_
+#include "simgrid/instr.h" //TRACE_
#include "randlc.h"
#include <stdlib.h>
#include <stdio.h>
-#include "instr/instr.h" //TRACE_
+#include "simgrid/instr.h" //TRACE_
/******************/
/* default values */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
#include "mpi.h"
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
#include "mpi.h"
/* Create a log channel to have nice outputs. */
#include <stdio.h>
#include "mpi.h"
-#include "instr/instr.h"
+#include "simgrid/instr.h"
#define DATATOSENT 100000
+++ /dev/null
-/* Copyright (c) 2004-2014. The SimGrid Team.
- * All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef MSG_DATATYPE_H
-#define MSG_DATATYPE_H
-#include "xbt/misc.h"
-#include "xbt/lib.h"
-#include "simgrid/simix.h"
-#include "simgrid_config.h" // for HAVE_TRACING
-
-SG_BEGIN_DECL()
-
-/* ******************************** Mailbox ************************************ */
-
-/** @brief Mailbox datatype
- * @ingroup msg_task_usage
- *
- * Object representing a communication rendez-vous point, on which
- * the sender finds the receiver it wants to communicate with. As a
- * MSG user, you will only rarely manipulate any of these objects
- * directly, since most of the public interface (such as
- * #MSG_task_send and friends) hide this object behind a string
- * alias. That mean that you don't provide the mailbox on which you
- * want to send your task, but only the name of this mailbox. */
-typedef struct s_smx_rvpoint *msg_mailbox_t;
-
-/* ******************************** Environment ************************************ */
-typedef struct As *msg_as_t;
-
-/* ******************************** Host ************************************ */
-
-extern int MSG_HOST_LEVEL;
-
-/** @brief Host datatype.
- @ingroup m_host_management
-
- A <em>location</em> (or <em>host</em>) is any possible place where
- a process may run. Thus it is represented as a <em>physical
- resource with computing capabilities</em>, some <em>mailboxes</em>
- to enable running process to communicate with remote ones, and
- some <em>private data</em> that can be only accessed by local
- process.
- */
-typedef xbt_dictelm_t msg_host_t;
-typedef s_xbt_dictelm_t s_msg_host_t;
-
-typedef struct msg_host_priv {
- int dp_enabled;
- xbt_dict_t dp_objs;
- double dp_updated_by_deleted_tasks;
- int is_migrating;
-
- xbt_dict_t affinity_mask_db;
-
-#ifdef MSG_USE_DEPRECATED
- msg_mailbox_t *mailboxes; /**< the channels */
-#endif
-} s_msg_host_priv_t, *msg_host_priv_t;
-
-static inline msg_host_priv_t MSG_host_priv(msg_host_t host){
- return (msg_host_priv_t )xbt_lib_get_level(host, MSG_HOST_LEVEL);
-}
-
-
-
-/* ******************************** Task ************************************ */
-
-typedef struct simdata_task *simdata_task_t;
-
-typedef struct msg_task {
- char *name; /**< @brief task name if any */
- simdata_task_t simdata; /**< @brief simulator data */
- void *data; /**< @brief user data */
-#ifdef HAVE_TRACING
- long long int counter; /* task unique identifier for instrumentation */
- char *category; /* task category for instrumentation */
-#endif
-} s_msg_task_t;
-
-/** @brief Task datatype.
- @ingroup m_task_management
-
- A <em>task</em> may then be defined by a <em>computing
- amount</em>, a <em>message size</em> and some <em>private
- data</em>.
- */
-typedef struct msg_task *msg_task_t;
-
-/* ******************************** VM ************************************* */
-typedef msg_host_t msg_vm_t;
-typedef msg_host_priv_t msg_vm_priv_t;
-
-static inline msg_vm_priv_t MSG_vm_priv(msg_vm_t vm){
- return (msg_vm_priv_t) xbt_lib_get_level(vm, MSG_HOST_LEVEL);
-}
-
-/** ******************************** File ************************************ */
-
-/** @brief File datatype.
-* @ingroup msg_file_management
-*
-* You should consider this as an opaque object.
-*/
-typedef xbt_dictelm_t msg_file_t;
-typedef s_xbt_dictelm_t s_msg_file_t;
-
-extern int MSG_FILE_LEVEL;
-typedef struct simdata_file *simdata_file_t;
-
-typedef struct msg_file_priv {
- char *fullpath;
- sg_size_t size;
- char* mount_point;
- char* storageId;
- char* storage_type;
- char* content_type;
- void *data;
- simdata_file_t simdata;
-} s_msg_file_priv_t, *msg_file_priv_t;
-
-static inline msg_file_priv_t MSG_file_priv(msg_file_t file){
- return (msg_file_priv_t )xbt_lib_get_level(file, MSG_FILE_LEVEL);
-}
-
-/* ******************************** Storage ************************************ */
-/* TODO: PV: to comment */
-
-extern int MSG_STORAGE_LEVEL;
-
-/** @brief Storage datatype.
- * @ingroup msg_storage_management
- *
- * You should consider this as an opaque object.
- */
-typedef xbt_dictelm_t msg_storage_t;
-typedef s_xbt_dictelm_t s_msg_storage_t;
-
-typedef struct msg_storage_priv {
- const char *hostname;
- void *data;
-} s_msg_storage_priv_t, *msg_storage_priv_t;
-
-static inline msg_storage_priv_t MSG_storage_priv(msg_storage_t storage){
- return (msg_storage_priv_t )xbt_lib_get_level(storage, MSG_STORAGE_LEVEL);
-}
-
-/*************** Begin GPU ***************/
-typedef struct simdata_gpu_task *simdata_gpu_task_t;
-
-typedef struct msg_gpu_task {
- char *name; /**< @brief task name if any */
- simdata_gpu_task_t simdata; /**< @brief simulator data */
-#ifdef HAVE_TRACING
- long long int counter; /* task unique identifier for instrumentation */
- char *category; /* task category for instrumentation */
-#endif
-} s_msg_gpu_task_t;
-
-/** @brief GPU task datatype.
- @ingroup m_task_management
-
- A <em>task</em> may then be defined by a <em>computing
- amount</em>, a <em>dispatch latency</em> and a <em>collect latency</em>.
- \see m_task_management
-*/
-typedef struct msg_gpu_task *msg_gpu_task_t;
-/*************** End GPU ***************/
-
-/**
- * \brief @brief Communication action.
- * \ingroup msg_task_usage
- *
- * Object representing an ongoing communication between processes. Such beast is usually obtained by using #MSG_task_isend, #MSG_task_irecv or friends.
- */
-typedef struct msg_comm *msg_comm_t;
-
-/** \brief Default value for an uninitialized #msg_task_t.
- \ingroup m_task_management
-*/
-#define MSG_TASK_UNINITIALIZED NULL
-
-/* ****************************** Process *********************************** */
-
-/** @brief Process datatype.
- @ingroup m_process_management
-
- A process may be defined as a <em>code</em>, with some
- <em>private data</em>, executing in a <em>location</em>.
-
- You should not access directly to the fields of the pointed
- structure, but always use the provided API to interact with
- processes.
- */
-typedef struct s_smx_process *msg_process_t;
-
-#ifdef MSG_USE_DEPRECATED
-
-/* Compatibility typedefs */
-typedef int m_channel_t;
-typedef msg_gpu_task_t m_gpu_task_t;
-typedef msg_host_t m_host_t;
-typedef msg_process_t m_process_t;
-typedef msg_task_t m_task_t;
-typedef s_msg_gpu_task_t s_m_gpu_task_t;
-typedef s_msg_host_t s_m_host_t;
-typedef s_msg_task_t s_m_task_t;
-#endif
-
-SG_END_DECL()
-#endif
+++ /dev/null
-/* Copyright (c) 2006, 2008-2014. The SimGrid Team.
- * All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef SIMDAG_DATATYPES_H
-#define SIMDAG_DATATYPES_H
-#include "xbt/dict.h"
-
-/** @brief Workstation datatype
- @ingroup SD_datatypes_management
-
- A workstation is a place where a task can be executed.
- A workstation is represented as a <em>physical
- resource with computing capabilities</em> and has a <em>name</em>.
-
- @see SD_workstation_management */
-typedef xbt_dictelm_t SD_workstation_t;
-
-/** @brief Workstation access mode
- @ingroup SD_datatypes_management
-
- By default, a workstation resource is shared, i.e. several tasks
- can be executed at the same time on a workstation. The CPU power of
- the workstation is shared between the running tasks on the workstation.
- In sequential mode, only one task can use the workstation, and the other
- tasks wait in a FIFO.
-
- @see SD_workstation_get_access_mode(), SD_workstation_set_access_mode() */
-typedef enum {
- SD_WORKSTATION_SHARED_ACCESS, /**< @brief Several tasks can be executed at the same time */
- SD_WORKSTATION_SEQUENTIAL_ACCESS /**< @brief Only one task can be executed, the others wait in a FIFO. */
-} e_SD_workstation_access_mode_t;
-
-typedef enum {
- SD_LINK_SHARED,
- SD_LINK_FATPIPE
-} e_SD_link_sharing_policy_t;
-
-/** @brief Link datatype
- @ingroup SD_datatypes_management
-
- A link is a network node represented as a <em>name</em>, a <em>current
- bandwidth</em> and a <em>current latency</em>. A route is a list of
- links between two workstations.
-
- @see SD_link_management */
-typedef struct SD_link *SD_link_t;
-
-/** @brief Task datatype
- @ingroup SD_datatypes_management
-
- A task is some <em>computing amount</em> that can be executed
- in parallel on several workstations. A task may depend on other
- tasks, this means that the task cannot start until the other tasks are done.
- Each task has a <em>\ref e_SD_task_state_t "state"</em> indicating whether
- the task is scheduled, running, done, etc.
-
- @see SD_task_management */
-typedef struct SD_task *SD_task_t;
-
-/** @brief Task states
- @ingroup SD_datatypes_management
-
- @see SD_task_management */
-typedef enum {
- SD_NOT_SCHEDULED = 0, /**< @brief Initial state (not valid for SD_watch and SD_unwatch). */
- SD_SCHEDULABLE = 0x0001, /**< @brief A task becomes SD_SCHEDULABLE as soon as its dependencies are satisfied */
- SD_SCHEDULED = 0x0002, /**< @brief A task becomes SD_SCHEDULED when you call function
- SD_task_schedule. SD_simulate will execute it when it becomes SD_RUNNABLE. */
- SD_RUNNABLE = 0x0004, /**< @brief A scheduled task becomes runnable is SD_simulate as soon as its dependencies are satisfied. */
- SD_IN_FIFO = 0x0008, /**< @brief A runnable task can have to wait in a workstation fifo if the workstation is sequential */
- SD_RUNNING = 0x0010, /**< @brief An SD_RUNNABLE or SD_IN_FIFO becomes SD_RUNNING when it is launched. */
- SD_DONE = 0x0020, /**< @brief The task is successfully finished. */
- SD_FAILED = 0x0040 /**< @brief A problem occurred during the execution of the task. */
-} e_SD_task_state_t;
-
-/** @brief Task kinds
- @ingroup SD_datatypes_management
-
- @see SD_task_management */
-typedef enum {
- SD_TASK_NOT_TYPED = 0, /**< @brief no specified type */
- SD_TASK_COMM_E2E = 1, /**< @brief end to end communication */
- SD_TASK_COMP_SEQ = 2, /**< @brief sequential computation */
- SD_TASK_COMP_PAR_AMDAHL = 3, /**< @brief parallel computation (Amdahl's law) */
- SD_TASK_COMM_PAR_MXN_1D_BLOCK = 4 /**< @brief MxN data redistribution (1D Block distribution) */
-} e_SD_task_kind_t;
-
-
-/** @brief Storage datatype
- @ingroup SD_datatypes_management
-
- TODO PV: comment it !
-
- @see SD_storage_management */
-typedef xbt_dictelm_t SD_storage_t;
-
-#endif
#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
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_ */
#define JEDULE_SD_BINDING_H_
#include "simgrid_config.h"
-
-#include "simdag/datatypes.h"
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#ifdef HAVE_JEDULE
#define MSG_H
#include "xbt.h"
-
-#include "msg/datatypes.h"
-
+#include "xbt/lib.h"
#include "simgrid/simix.h"
-
#include "simgrid/platf.h"
SG_BEGIN_DECL()
+/* ******************************** Mailbox ************************************ */
+
+/** @brief Mailbox datatype
+ * @ingroup msg_task_usage
+ *
+ * Object representing a communication rendez-vous point, on which
+ * the sender finds the receiver it wants to communicate with. As a
+ * MSG user, you will only rarely manipulate any of these objects
+ * directly, since most of the public interface (such as
+ * #MSG_task_send and friends) hide this object behind a string
+ * alias. That mean that you don't provide the mailbox on which you
+ * want to send your task, but only the name of this mailbox. */
+typedef struct s_smx_rvpoint *msg_mailbox_t;
+
+/* ******************************** Environment ************************************ */
+typedef struct As *msg_as_t;
+
+/* ******************************** Host ************************************ */
+
+extern int MSG_HOST_LEVEL;
+
+/** @brief Host datatype.
+ @ingroup m_host_management
+
+ A <em>location</em> (or <em>host</em>) is any possible place where
+ a process may run. Thus it is represented as a <em>physical
+ resource with computing capabilities</em>, some <em>mailboxes</em>
+ to enable running process to communicate with remote ones, and
+ some <em>private data</em> that can be only accessed by local
+ process.
+ */
+typedef xbt_dictelm_t msg_host_t;
+typedef s_xbt_dictelm_t s_msg_host_t;
+
+typedef struct msg_host_priv {
+ int dp_enabled;
+ xbt_dict_t dp_objs;
+ double dp_updated_by_deleted_tasks;
+ int is_migrating;
+
+ xbt_dict_t affinity_mask_db;
+
+#ifdef MSG_USE_DEPRECATED
+ msg_mailbox_t *mailboxes; /**< the channels */
+#endif
+} s_msg_host_priv_t, *msg_host_priv_t;
+
+static inline msg_host_priv_t MSG_host_priv(msg_host_t host){
+ return (msg_host_priv_t )xbt_lib_get_level(host, MSG_HOST_LEVEL);
+}
+
+
+
+/* ******************************** Task ************************************ */
+
+typedef struct simdata_task *simdata_task_t;
+
+typedef struct msg_task {
+ char *name; /**< @brief task name if any */
+ simdata_task_t simdata; /**< @brief simulator data */
+ void *data; /**< @brief user data */
+ long long int counter; /* task unique identifier for instrumentation */
+ char *category; /* task category for instrumentation */
+} s_msg_task_t;
+
+/** @brief Task datatype.
+ @ingroup m_task_management
+
+ A <em>task</em> may then be defined by a <em>computing
+ amount</em>, a <em>message size</em> and some <em>private
+ data</em>.
+ */
+typedef struct msg_task *msg_task_t;
+
+/* ******************************** VM ************************************* */
+typedef msg_host_t msg_vm_t;
+typedef msg_host_priv_t msg_vm_priv_t;
+
+static inline msg_vm_priv_t MSG_vm_priv(msg_vm_t vm){
+ return (msg_vm_priv_t) xbt_lib_get_level(vm, MSG_HOST_LEVEL);
+}
+
+/** ******************************** File ************************************ */
+
+/** @brief File datatype.
+* @ingroup msg_file_management
+*
+* You should consider this as an opaque object.
+*/
+typedef xbt_dictelm_t msg_file_t;
+typedef s_xbt_dictelm_t s_msg_file_t;
+
+extern int MSG_FILE_LEVEL;
+typedef struct simdata_file *simdata_file_t;
+
+typedef struct msg_file_priv {
+ char *fullpath;
+ sg_size_t size;
+ char* mount_point;
+ char* storageId;
+ char* storage_type;
+ char* content_type;
+ void *data;
+ simdata_file_t simdata;
+} s_msg_file_priv_t, *msg_file_priv_t;
+
+static inline msg_file_priv_t MSG_file_priv(msg_file_t file){
+ return (msg_file_priv_t )xbt_lib_get_level(file, MSG_FILE_LEVEL);
+}
+
+/* ******************************** Storage ************************************ */
+/* TODO: PV: to comment */
+
+extern int MSG_STORAGE_LEVEL;
+
+/** @brief Storage datatype.
+ * @ingroup msg_storage_management
+ *
+ * You should consider this as an opaque object.
+ */
+typedef xbt_dictelm_t msg_storage_t;
+typedef s_xbt_dictelm_t s_msg_storage_t;
+
+typedef struct msg_storage_priv {
+ const char *hostname;
+ void *data;
+} s_msg_storage_priv_t, *msg_storage_priv_t;
+
+static inline msg_storage_priv_t MSG_storage_priv(msg_storage_t storage){
+ return (msg_storage_priv_t )xbt_lib_get_level(storage, MSG_STORAGE_LEVEL);
+}
+
+/*************** Begin GPU ***************/
+typedef struct simdata_gpu_task *simdata_gpu_task_t;
+
+typedef struct msg_gpu_task {
+ char *name; /**< @brief task name if any */
+ simdata_gpu_task_t simdata; /**< @brief simulator data */
+ long long int counter; /* task unique identifier for instrumentation */
+ char *category; /* task category for instrumentation */
+} s_msg_gpu_task_t;
+
+/** @brief GPU task datatype.
+ @ingroup m_task_management
+
+ A <em>task</em> may then be defined by a <em>computing
+ amount</em>, a <em>dispatch latency</em> and a <em>collect latency</em>.
+ \see m_task_management
+*/
+typedef struct msg_gpu_task *msg_gpu_task_t;
+/*************** End GPU ***************/
+
+/**
+ * \brief @brief Communication action.
+ * \ingroup msg_task_usage
+ *
+ * Object representing an ongoing communication between processes. Such beast is usually obtained by using #MSG_task_isend, #MSG_task_irecv or friends.
+ */
+typedef struct msg_comm *msg_comm_t;
+
+/** \brief Default value for an uninitialized #msg_task_t.
+ \ingroup m_task_management
+*/
+#define MSG_TASK_UNINITIALIZED NULL
+
+/* ****************************** Process *********************************** */
+
+/** @brief Process datatype.
+ @ingroup m_process_management
+
+ A process may be defined as a <em>code</em>, with some
+ <em>private data</em>, executing in a <em>location</em>.
+
+ You should not access directly to the fields of the pointed
+ structure, but always use the provided API to interact with
+ processes.
+ */
+typedef struct s_smx_process *msg_process_t;
+
+#ifdef MSG_USE_DEPRECATED
+
+/* Compatibility typedefs */
+typedef int m_channel_t;
+typedef msg_gpu_task_t m_gpu_task_t;
+typedef msg_host_t m_host_t;
+typedef msg_process_t m_process_t;
+typedef msg_task_t m_task_t;
+typedef s_msg_gpu_task_t s_m_gpu_task_t;
+typedef s_msg_host_t s_m_host_t;
+typedef s_msg_task_t s_m_task_t;
+#endif
+
/** @brief Return code of most MSG functions
@ingroup msg_simulation
@{ */
/************************** 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);
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)
xbt_dynar_t<msg_vm_t> MSG_vm_get_list_from_hosts(msg_dynar_t<msg_host_t>)
+ des fonctions de filtrage sur les dynar
*/
-#include "instr/instr.h"
+#include "simgrid/instr.h"
#ifndef SIMDAG_SIMDAG_H
#define SIMDAG_SIMDAG_H
-#include "simdag/datatypes.h"
#include "xbt/misc.h"
#include "xbt/dynar.h"
#include "xbt/dict.h"
SG_BEGIN_DECL()
+/** @brief Workstation datatype
+ @ingroup SD_datatypes_management
+
+ A workstation is a place where a task can be executed.
+ A workstation is represented as a <em>physical
+ resource with computing capabilities</em> and has a <em>name</em>.
+
+ @see SD_workstation_management */
+typedef xbt_dictelm_t SD_workstation_t;
+
+/** @brief Workstation access mode
+ @ingroup SD_datatypes_management
+
+ By default, a workstation resource is shared, i.e. several tasks
+ can be executed at the same time on a workstation. The CPU power of
+ the workstation is shared between the running tasks on the workstation.
+ In sequential mode, only one task can use the workstation, and the other
+ tasks wait in a FIFO.
+
+ @see SD_workstation_get_access_mode(), SD_workstation_set_access_mode() */
+typedef enum {
+ SD_WORKSTATION_SHARED_ACCESS, /**< @brief Several tasks can be executed at the same time */
+ SD_WORKSTATION_SEQUENTIAL_ACCESS /**< @brief Only one task can be executed, the others wait in a FIFO. */
+} e_SD_workstation_access_mode_t;
+
+typedef enum {
+ SD_LINK_SHARED,
+ SD_LINK_FATPIPE
+} e_SD_link_sharing_policy_t;
+
+/** @brief Link datatype
+ @ingroup SD_datatypes_management
+
+ A link is a network node represented as a <em>name</em>, a <em>current
+ bandwidth</em> and a <em>current latency</em>. A route is a list of
+ links between two workstations.
+
+ @see SD_link_management */
+typedef struct SD_link *SD_link_t;
+
+/** @brief Task datatype
+ @ingroup SD_datatypes_management
+
+ A task is some <em>computing amount</em> that can be executed
+ in parallel on several workstations. A task may depend on other
+ tasks, this means that the task cannot start until the other tasks are done.
+ Each task has a <em>\ref e_SD_task_state_t "state"</em> indicating whether
+ the task is scheduled, running, done, etc.
+
+ @see SD_task_management */
+typedef struct SD_task *SD_task_t;
+
+/** @brief Task states
+ @ingroup SD_datatypes_management
+
+ @see SD_task_management */
+typedef enum {
+ SD_NOT_SCHEDULED = 0, /**< @brief Initial state (not valid for SD_watch and SD_unwatch). */
+ SD_SCHEDULABLE = 0x0001, /**< @brief A task becomes SD_SCHEDULABLE as soon as its dependencies are satisfied */
+ SD_SCHEDULED = 0x0002, /**< @brief A task becomes SD_SCHEDULED when you call function
+ SD_task_schedule. SD_simulate will execute it when it becomes SD_RUNNABLE. */
+ SD_RUNNABLE = 0x0004, /**< @brief A scheduled task becomes runnable is SD_simulate as soon as its dependencies are satisfied. */
+ SD_IN_FIFO = 0x0008, /**< @brief A runnable task can have to wait in a workstation fifo if the workstation is sequential */
+ SD_RUNNING = 0x0010, /**< @brief An SD_RUNNABLE or SD_IN_FIFO becomes SD_RUNNING when it is launched. */
+ SD_DONE = 0x0020, /**< @brief The task is successfully finished. */
+ SD_FAILED = 0x0040 /**< @brief A problem occurred during the execution of the task. */
+} e_SD_task_state_t;
+
+/** @brief Task kinds
+ @ingroup SD_datatypes_management
+
+ @see SD_task_management */
+typedef enum {
+ SD_TASK_NOT_TYPED = 0, /**< @brief no specified type */
+ SD_TASK_COMM_E2E = 1, /**< @brief end to end communication */
+ SD_TASK_COMP_SEQ = 2, /**< @brief sequential computation */
+ SD_TASK_COMP_PAR_AMDAHL = 3, /**< @brief parallel computation (Amdahl's law) */
+ SD_TASK_COMM_PAR_MXN_1D_BLOCK = 4 /**< @brief MxN data redistribution (1D Block distribution) */
+} e_SD_task_kind_t;
+
+
+/** @brief Storage datatype
+ @ingroup SD_datatypes_management
+
+ TODO PV: comment it !
+
+ @see SD_storage_management */
+typedef xbt_dictelm_t SD_storage_t;
/************************** AS handling *************************************/
XBT_PUBLIC(xbt_dict_t) SD_as_router_get_properties(const char *as);
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)
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);
*
* SD_task_schedule(task, my_workstation_nb,
* my_workstation_list,
- * my_computation_amount,
+ * my_flops_amount,
* SD_TASK_SCHED_NO_COST,
* my_rate);
*/
/** @} */
-#include "instr/instr.h"
+#include "simgrid/instr.h"
SG_END_DECL()
#endif
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);
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);
/* 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@
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <msg/msg.h>
+#include <simgrid/msg.h>
#include <simgrid/simix.h>
#include <surf/surfxml_parse.h>
#include <locale.h>
const char *tmp;
XBT_LOG_CONNECT(jmsg);
-#ifdef HAVE_TRACING
XBT_LOG_CONNECT(jtrace);
-#endif
(*env)->GetJavaVM(env, &__java_vm);
#ifndef MSG4JAVA_H
#define MSG4JAVA_H
-#include <msg/msg.h>
+#include <simgrid/msg.h>
#include <jni.h>
extern int JAVA_HOST_LEVEL;
#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);
#ifndef MSG_JAS_H
#define MSG_JAS_H
#include <jni.h>
-#include "msg/msg.h"
-
-/* Functions related to the java host instances. */
-
-/* Copyright (c) 2007-2013. The SimGrid Team.
- * All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "msg/msg.h"
-#include "jmsg.h"
-#include "jmsg_host.h"
+#include "simgrid/msg.h"
jobject jas_new_instance(JNIEnv * env);
jobject jas_ref(JNIEnv * env, jobject jas);
#include "jxbt_utilities.h"
#include "jmsg.h"
-#include <msg/msg.h>
+#include <simgrid/msg.h>
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
static jfieldID jcomm_field_Comm_bind;
#ifndef MSG_JCOMM_H
#define MSG_JCOMM_H
#include <jni.h>
-#include <msg/msg.h>
+#include <simgrid/msg.h>
/**
* This function binds the task associated with the communication to
* the java communication object.
#ifndef MSG_JFILE_H
#define MSG_JFILE_H
#include <jni.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
jfieldID jfile_field_bind;
* 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"
#define MSG_JHOST_H
#include <jni.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
/**
* This function returns a new java host instance.
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;
#define MSG_JPROCESS_H
#include <jni.h>
-#include <msg/msg.h>
+#include <simgrid/msg.h>
#include <simgrid/simix.h>
//Cached java fields
* 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
* 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"
#ifndef MSG_JSTORAGE_H
#define MSG_JSTORAGE_H
#include <jni.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
/**
* This function returns a new java storage instance.
#define MSG_JSYNCHRO_H
#include <jni.h>
-#include <msg/msg.h>
+#include <simgrid/msg.h>
#include <simgrid/simix.h>
JNIEXPORT void JNICALL
#include "jxbt_utilities.h"
-#include <msg/msg.h>
+#include <simgrid/msg.h>
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(jmsg);
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;
}
/* 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 */
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;
}
}
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);
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);
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);
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);
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
#define MSG_JTASK_H
#include <jni.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
-/**
- * This function returns a global reference to the java task instance
- * specified by the parameter jtask.
- *
- * @param jtask The original java task instance.
- * @param env The environment of the current thread.
- *
- * @return The global reference to the original java task
- * instance.
- */
-/* jobject jtask_new_global_ref(jobject jtask, JNIEnv * env); */
-
-/**
- * This function delete a global reference to a java task instance.
- *
- * @param The global refernce to delete.
- * @param env The environment of the current thread.
- */
-/* void jtask_delete_global_ref(jobject jtask, JNIEnv * env); */
/**
* This function associated a native task to a java task instance.
(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
* Signature (D)V
*/
JNIEXPORT void JNICALL
-Java_org_simgrid_msg_Task_setComputeDuration
+Java_org_simgrid_msg_Task_setFlopsAmount
(JNIEnv *env, jobject jtask, jdouble computationAmount);
/**
* Signature (D)V
*/
JNIEXPORT void JNICALL
-Java_org_simgrid_msg_Task_setDataSize
+Java_org_simgrid_msg_Task_setBytesAmount
(JNIEnv *env, jobject jtask, jdouble dataSize);
/**
#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;
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");
}
}
#define MSG_VM_H
#include <jni.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
void jvm_bind(JNIEnv *env, jobject jvm, msg_vm_t vm);
msg_vm_t jvm_get_native(JNIEnv *env, jobject jvm);
// It will be great that a JNI expert gives a look to validate it - Adrien ;)
#include "jtrace.h"
-#include <instr/instr.h>
+#include <simgrid/instr.h>
/* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */
#ifndef JNIEXPORT
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();
+ }
}
* @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.
* Close the file.
*/
public native void close();
-
+
/**
* Class initializer, to initialize various JNI stuff
*/
* User data.
*/
private Object data;
- /**
- *
- */
- protected Host() {
+ /**
+ *
+ */
+ protected Host() {
this.bind = 0;
this.data = null;
};
-
+
public String toString (){
return this.name;
-
+
}
/**
* @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.
*
*/
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);
/**
/**
* 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;
}
* 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
*/
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 */
* -->
*/
public abstract class MsgException extends Exception {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
- /**
- * Constructs an <code>MsgException</code> without a
- * detail message.
- */
- public MsgException() {
- super();
- }
- /**
- * Constructs an <code>MsgException</code> with a detail message.
- *
- * @param s the detail message.
- */
- public MsgException(String s) {
- super(s);
- }
+ /**
+ * Constructs an <code>MsgException</code> without a
+ * detail message.
+ */
+ public MsgException() {
+ super();
+ }
+ /**
+ * Constructs an <code>MsgException</code> with a detail message.
+ *
+ * @param s the detail message.
+ */
+ public MsgException(String s) {
+ super(s);
+ }
}
*/
public class Mutex {
private long bind; // The C object -- don't touch it
-
+
public Mutex() {
init();
}
private native void init();
public native void acquire();
public native void release();
-
+
/**
* Class initializer, to initialize various JNI stuff
*/
* 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;
* It is used to compute the id of an MSG process.
*/
public static long nextProcessId = 0;
-
+
/**
* Even if this attribute is public you must never access to it.
* It is compute automatically during the creation of the object.
* The native functions use this identifier to synchronize the process.
*/
- public long id;
-
- /**
- * Start time of the process
- */
- public double startTime = 0;
- /**
+ private long id;
+
+ /** Time at which the process should be created */
+ protected double startTime = 0;
+ /** Time at which th
* Kill time of the process
+ *
+ * Set at creation, and used internally by SimGrid
*/
- public double killTime = -1;
+ private double killTime = -1;
+
+ private String name;
- /**
- * The name of the process.
- */
- protected String name;
- /**
- * The PID of the process
- */
- protected int pid = -1;
- /**
- * The PPID of the process
- */
- protected int ppid = -1;
- /**
- * The host of the process
- */
- protected Host host = null;
+ private int pid = -1;
+ private int ppid = -1;
+ private Host host = null;
/** The arguments of the method function of the process. */
public Vector<String> args;
-
+
/**
* Default constructor
*/
* @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 {
this.args = new Vector<String>();
if (null != args)
this.args.addAll(Arrays.asList(args));
-
+
this.startTime = startTime;
this.killTime = killTime;
}
*/
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;
}
/**
* 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.
*
*/
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.
*/
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();
* 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
*/
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
* {i, i + 1, . . . , j}
*/
public native int randInt(int i, int j);
-
+
/**
* Class initializer, to initialize various JNI stuff
*/
*/
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
* access to it.
*/
private long bind;
-
+
/**
* Storage name
*/
* 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.
* @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.
public String getName() {
return name;
}
-
+
/**
* This method returns the size (in bytes) of a storage element.
*
*
*/
public native long getFreeSize();
-
+
/**
* This method returns the used size (in bytes) of a storage element.
*
*
*/
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
* @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.
*
*
*/
public native static Storage[] all();
-
+
/**
* Class initializer, to initialize various JNI stuff
*/
static {
nativeInit();
}
-
+
}
\ No newline at end of file
-/* 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
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++;
}
/* * * *
*
* @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
*
* @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);
/**
* @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.
* * 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
*/
}
/**
- * 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;
/**
* 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
/**
* 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 {
/**
* 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);
/**
* 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 {
/**
* 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;
/**
* 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 {
/**
* 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);
/**
* 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 {
* 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
*/
public double getMessageSize() {
return this.messageSize;
}
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
}
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) {
private static void addVM(VM vm){
VM[] vmsN=null;
- int i=0;
+ int i=0;
if(VM.vms == null)
vmsN = new VM[1];
else
vmsN = new VM[vms.length+1];
-
+
for (i=0; i<vmsN.length-1 ; i ++){
vmsN[i]=vms[i];
}
vmsN[i]=vm;
vms=vmsN;
}
- public static VM[] all(){
+ public static VM[] all(){
return vms;
}
public static VM getVMByName(String name){
for (int i=0 ; i < vms.length ; i++){
- if (vms[i].getName().equals(name))
- return vms[i];
+ if (vms[i].getName().equals(name))
+ return vms[i];
}
return null;
}
protected void finalize() {
destroy();
}
-
+
/* JNI / Native code */
/* get/set property methods are inherited from the Host class. */
-
+
/** Returns whether the given VM is currently suspended
*/
public native int isCreated();
-
+
/** Returns whether the given VM is currently running
*/
public native int isRunning();
/** Returns whether the given VM is currently running
*/
public native int isMigrating();
-
+
/** Returns whether the given VM is currently suspended
*/
public native int isSuspended();
-
+
/** Returns whether the given VM is currently saving
*/
public native int isSaving();
-
+
/** Returns whether the given VM is currently saved
*/
public native int isSaved();
/** Returns whether the given VM is currently restoring its state
*/
public native boolean isRestoring();
-
+
/**
* Natively implemented method create the VM.
* @param nCore number of core
* @param dpIntensity (dirty page intensity, a percentage of migNetSpeed [0-100], if you don't know put zero ;))
*/
private native void create(Host host, String name, int nCore, int ramSize,
- int netCap, String diskPath, int diskSize, int migNetSpeed, int dpIntensity);
+ int netCap, String diskPath, int diskSize, int migNetSpeed, int dpIntensity);
/**
*/
public native void start();
-
+
/**
* Immediately kills all processes within the given VM. Any memory that they allocated will be leaked.
* No extra delay occurs. If you want to simulate this too, you want to use a MSG_process_sleep() or something
*/
public native void shutdown();
-
+
/**
* Invoke native migration routine
- */
+ */
public native void internalmig(Host destination) throws Exception; // TODO add throws DoubleMigrationException (i.e. when you call migrate on a VM that is already migrating);
-
+
/** Change the host on which all processes are running
* (pre-copy is implemented)
*/
// If the migration correcly returned, then we should change the currentHost value.
this.currentHost = destination;
}
-
+
/** Immediately suspend the execution of all processes within the given VM
*
* No suspension cost occurs. If you want to simulate this too, you want to
* of VM suspend to you.
*/
public native void suspend();
-
+
/** Immediately resumes the execution of all processes within the given VM
*
* No resume cost occurs. If you want to simulate this too, you want to
* of VM resume to you.
*/
public native void resume();
-
+
/** Immediately suspend the execution of all processes within the given VM
* and save its state on the persistent HDD
* Not yet implemented (for the moment it behaves like suspend)
* of VM suspend to you.
*/
public native void save();
-
+
/** Immediately resumes the execution of all processes previously saved
* within the given VM
* Not yet implemented (for the moment it behaves like resume)
* of VM resume to you.
*/
public native void restore();
-
+
/**
* Destroy the VM
*/
public native void destroy();
-
+
/**
* Class initializer, to initialize various JNI stuff
}
// TODO complete the binding of the tracing API
-
+
/**
* Declare a new user variable associated to hosts with a color.
* @param color
*/
public final static native void hostVariableDeclareWithColor (String variable, String color);
-
-
+
+
/**
* Add a value to a variable of a host.
*
public final static native void hostVariableSub (String host, String variable, double value);
/**
- * Set the value of a variable of a host at a given timestamp.
- *
+ * Set the value of a variable of a host at a given timestamp.
+ *
* @param time
* @param host
* @param variable
* @param variable
* @param value
*/
- public final static native void hostVariableAddWithTime (double time, String host, String variable, double value);
-
- /**
- * Subtract a value from a variable of a host at a given timestamp.
- *
- * @param time
- * @param host
- * @param variable
- * @param value
- */
- public final static native void hostVariableSubWithTime (double time, String host, String variable, double value);
-
- /**
- * Get declared user host variables.
- *
- */
- public final static native String[] getHostVariablesName ();
-
- /**
- * Declare a new user variable associated to links.
- *
- * @param variable
- */
- public final static native void linkVariableDeclare (String variable);
-
- /**
- * Declare a new user variable associated to links with a color.
- * @param variable
- * @param color
- */
- public final static native void linkVariableDeclareWithColor (String variable, String color);
-
- /**
- * Set the value of a variable of a link.
- *
- * @param link
- * @param variable
- * @param value
- */
- public final static native void linkVariableSet (String link, String variable, double value);
-
- /**
- * Add a value to a variable of a link.
- *
- * @param link
- * @param variable
- * @param value
- */
- public final static native void linkVariableAdd (String link, String variable, double value);
-
- /**
- * Subtract a value from a variable of a link.
- *
- * @param link
- * @param variable
- * @param value
- */
- public final static native void linkVariableSub (String link, String variable, double value);
-
- /**
- * Set the value of a variable of a link at a given timestamp.
- *
- * @param time
- * @param link
- * @param variable
- * @param value
- */
- public final static native void linkVariableSetWithTime (double time, String link, String variable, double value);
-
- /**
- * Add a value to a variable of a link at a given timestamp.
- *
+ public final static native void hostVariableAddWithTime (double time, String host, String variable, double value);
+
+ /**
+ * Subtract a value from a variable of a host at a given timestamp.
+ *
* @param time
- * @param link
- * @param variable
- * @param value
- */
- public final static native void linkVariableAddWithTime (double time, String link, String variable, double value);
-
-
- /**
- * Subtract a value from a variable of a link at a given timestamp.
- *
- * @param time
- * @param link
- * @param variable
- * @param value
- */
- public final static native void linkVariableSubWithTime (double time, String link, String variable, double value);
-
- /**
- * Set the value of the variable present in the links connecting source and destination.
- *
- * @param src
- * @param dst
- * @param variable
- * @param value
- */
- public final static native void linkSrcDstVariableSet (String src, String dst, String variable, double value);
-
- /**
- * Add a value to the variable present in the links connecting source and destination.
- *
- * @param src
- * @param dst
- * @param variable
- * @param value
- */
- public final static native void linkSrcDstVariableAdd (String src, String dst, String variable, double value);
-
- /**
- * Subtract a value from the variable present in the links connecting source and destination.
- *
- * @param src
- * @param dst
- * @param variable
- * @param value
- */
- public final static native void linkSrcDstVariableSub (String src, String dst, String variable, double value);
-
- /**
- * Set the value of the variable present in the links connecting source and destination at a given timestamp.
- *
- * @param time
- * @param src
- * @param dst
- * @param variable
- * @param value
- */
- public final static native void linkSrcDstVariableSetWithTime (double time, String src, String dst, String variable, double value);
-
- /**
- * Add a value to the variable present in the links connecting source and destination at a given timestamp.
- *
- * @param time
- * @param src
- * @param dst
- * @param variable
- * @param value
- */
- public final static native void linkSrcdstVariableAddWithTime (double time, String src, String dst, String variable, double value);
-
- /**
- * Subtract a value from the variable present in the links connecting source and destination at a given timestamp.
- *
- * @param time
- * @param src
- * @param dst
- * @param variable
- * @param value
- */
- public final static native void linkSrcDstVariableSubWithTime (double time, String src, String dst, String variable, double value);
-
- /**
- * Get declared user link variables.
- */
+ * @param host
+ * @param variable
+ * @param value
+ */
+ public final static native void hostVariableSubWithTime (double time, String host, String variable, double value);
+
+ /**
+ * Get declared user host variables.
+ *
+ */
+ public final static native String[] getHostVariablesName ();
+
+ /**
+ * Declare a new user variable associated to links.
+ *
+ * @param variable
+ */
+ public final static native void linkVariableDeclare (String variable);
+
+ /**
+ * Declare a new user variable associated to links with a color.
+ * @param variable
+ * @param color
+ */
+ public final static native void linkVariableDeclareWithColor (String variable, String color);
+
+ /**
+ * Set the value of a variable of a link.
+ *
+ * @param link
+ * @param variable
+ * @param value
+ */
+ public final static native void linkVariableSet (String link, String variable, double value);
+
+ /**
+ * Add a value to a variable of a link.
+ *
+ * @param link
+ * @param variable
+ * @param value
+ */
+ public final static native void linkVariableAdd (String link, String variable, double value);
+
+ /**
+ * Subtract a value from a variable of a link.
+ *
+ * @param link
+ * @param variable
+ * @param value
+ */
+ public final static native void linkVariableSub (String link, String variable, double value);
+
+ /**
+ * Set the value of a variable of a link at a given timestamp.
+ *
+ * @param time
+ * @param link
+ * @param variable
+ * @param value
+ */
+ public final static native void linkVariableSetWithTime (double time, String link, String variable, double value);
+
+ /**
+ * Add a value to a variable of a link at a given timestamp.
+ *
+ * @param time
+ * @param link
+ * @param variable
+ * @param value
+ */
+ public final static native void linkVariableAddWithTime (double time, String link, String variable, double value);
+
+
+ /**
+ * Subtract a value from a variable of a link at a given timestamp.
+ *
+ * @param time
+ * @param link
+ * @param variable
+ * @param value
+ */
+ public final static native void linkVariableSubWithTime (double time, String link, String variable, double value);
+
+ /**
+ * Set the value of the variable present in the links connecting source and destination.
+ *
+ * @param src
+ * @param dst
+ * @param variable
+ * @param value
+ */
+ public final static native void linkSrcDstVariableSet (String src, String dst, String variable, double value);
+
+ /**
+ * Add a value to the variable present in the links connecting source and destination.
+ *
+ * @param src
+ * @param dst
+ * @param variable
+ * @param value
+ */
+ public final static native void linkSrcDstVariableAdd (String src, String dst, String variable, double value);
+
+ /**
+ * Subtract a value from the variable present in the links connecting source and destination.
+ *
+ * @param src
+ * @param dst
+ * @param variable
+ * @param value
+ */
+ public final static native void linkSrcDstVariableSub (String src, String dst, String variable, double value);
+
+ /**
+ * Set the value of the variable present in the links connecting source and destination at a given timestamp.
+ *
+ * @param time
+ * @param src
+ * @param dst
+ * @param variable
+ * @param value
+ */
+ public final static native void linkSrcDstVariableSetWithTime (double time, String src, String dst, String variable, double value);
+
+ /**
+ * Add a value to the variable present in the links connecting source and destination at a given timestamp.
+ *
+ * @param time
+ * @param src
+ * @param dst
+ * @param variable
+ * @param value
+ */
+ public final static native void linkSrcdstVariableAddWithTime (double time, String src, String dst, String variable, double value);
+
+ /**
+ * Subtract a value from the variable present in the links connecting source and destination at a given timestamp.
+ *
+ * @param time
+ * @param src
+ * @param dst
+ * @param variable
+ * @param value
+ */
+ public final static native void linkSrcDstVariableSubWithTime (double time, String src, String dst, String variable, double value);
+
+ /**
+ * Get declared user link variables.
+ */
public final static native String[] getLinkVariablesName ();
-
- /* **** ******** WARNINGS ************** ***** */
- /* Only the following routines have been */
- /* JNI implemented - Adrien May, 22nd */
- /* **** ******************************** ***** */
-
- /**
- * Declare a user state that will be associated to hosts.
- * A user host state can be used to trace application states.
- *
- * @param name The name of the new state to be declared.
- */
+
+ /* **** ******** WARNINGS ************** ***** */
+ /* Only the following routines have been */
+ /* JNI implemented - Adrien May, 22nd */
+ /* **** ******************************** ***** */
+
+ /**
+ * Declare a user state that will be associated to hosts.
+ * A user host state can be used to trace application states.
+ *
+ * @param name The name of the new state to be declared.
+ */
public final static native void hostStateDeclare(String name);
-
+
/**
* Declare a new value for a user state associated to hosts.
* The color needs to be a string with three numbers separated by spaces in the range [0,1].
* @param state The name of the state previously declared.
* @param value The new value of the state.
*/
- public final static native void hostSetState (String host, String state, String value);
-
- /**
- * Push a new value for a state of a given host.
- *
- * @param host The name of the host to be considered.
- * @param state The name of the state previously declared.
- * @param value The value to be pushed.
- */
- public final static native void hostPushState (String host, String state, String value);
-
- /**
- * Pop the last value of a state of a given host.
- *
- * @param host The name of the host to be considered.
- * @param state The name of the state to be popped.
- */
- public final static native void hostPopState (String host, String state);
+ public final static native void hostSetState (String host, String state, String value);
+
+ /**
+ * Push a new value for a state of a given host.
+ *
+ * @param host The name of the host to be considered.
+ * @param state The name of the state previously declared.
+ * @param value The value to be pushed.
+ */
+ public final static native void hostPushState (String host, String state, String value);
+
+ /**
+ * Pop the last value of a state of a given host.
+ *
+ * @param host The name of the host to be considered.
+ * @param state The name of the state to be popped.
+ */
+ public final static native void hostPopState (String host, String state);
/**
* Declare a new user variable associated to hosts.
* @param variable
*/
public final static native void hostVariableDeclare (String variable);
-
+
/**
* Set the value of a variable of a host.
* @param variable
*/
public final static native void vmVariableDeclare (String variable);
-
+
/**
* Set the value of a variable of a VM.
/* SimGrid Lua bindings */
#include "simgrid_lua.h"
-#include "msg/msg.h"
+#include "simgrid/msg.h"
void sglua_register_task_functions(lua_State* L);
msg_task_t sglua_check_task(lua_State* L, int index);
static int l_task_get_computation_duration(lua_State* L)
{
msg_task_t task = sglua_check_task(L, 1);
- lua_pushnumber(L, MSG_task_get_compute_duration(task));
+ lua_pushnumber(L, MSG_task_get_flops_amount(task));
return 1;
}
#include "lua_state_cloner.h"
#include "lua_utils.h"
#include "xbt.h"
-#include "msg/msg.h"
-#include "simdag/simdag.h"
+#include "simgrid/msg.h"
+#include "simgrid/simdag.h"
#include "surf/surfxml_parse.h"
#include <lauxlib.h>
* @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
* @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);
/**
#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");
#undef OPT_TRACING_COMMENT_FILE
#undef OPT_VIVA_UNCAT_CONF
#undef OPT_VIVA_CAT_CONF
-
-#endif /* HAVE_TRACING */
#include "simgrid_config.h"
-#ifdef HAVE_TRACING
#include "instr/instr_private.h"
#include "surf/surf.h"
#include "surf/surf_private.h"
{
instr_resume_tracing();
}
-
-#endif /* HAVE_TRACING */
#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 */
THROWF(tracing_error, 0, "some containers still present even after destroying all of them");
}
}
-
-#endif /* HAVE_TRACING */
#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;
TRACE_header_PajeEndLink (basic, size);
TRACE_header_PajeNewEvent (basic, size);
}
-
-#endif
-
#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 */
new_pajeDefineStateType(ret);
return ret;
}
-
-#endif
#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)
xbt_free(((val_t)value)->id);
xbt_free(value);
}
-
-
-#endif
#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 */
SG_END_DECL()
-#endif /* HAVE_TRACING */
-
#ifdef HAVE_JEDULE
#include "instr/jedule/jedule_sd_binding.h"
#endif
#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
{
xbt_dict_free(&platform_variables);
}
-#endif /* HAVE_TRACING */
#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");
insert_into_buffer (event);
}
-
-#endif /* HAVE_TRACING */
#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"
* 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)
PJ_container_free (container);
}
}
-
-#endif /* HAVE_TRACING */
#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)
new_pajePopState (MSG_get_clock(), process_container, type);
}
}
-
-#endif /* HAVE_TRACING */
#include "msg_private.h"
-#ifdef HAVE_TRACING
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_msg_vm, instr, "MSG VM");
PJ_container_free (container);
}
}
-
-#endif /* HAVE_TRACING */
*/
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) {
if (msg_global==NULL)
return;
-#ifdef HAVE_TRACING
TRACE_surf_resource_utilization_release();
TRACE_end();
-#endif
-
free(msg_global);
msg_global = NULL;
}
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",
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;
}
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 {
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);
}
/* 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);
}
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);
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);
}
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;
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? */
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;
}
*/
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
*/
const char *MSG_task_get_category (msg_task_t task)
{
-#ifdef HAVE_TRACING
return task->category;
-#else
- return NULL;
-#endif
}
/**
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);
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);
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);
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");
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);
}
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;
/* 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);
}
p_simdata->waiting_task = NULL;
-#ifdef HAVE_TRACING
if (call_end)
TRACE_msg_task_put_end();
-#endif
MSG_RETURN(ret);
}
#include "xbt/fifo.h"
#include "simgrid/simix.h"
-#include "msg/datatypes.h"
+#include "simgrid/msg.h"
SG_BEGIN_DECL()
#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"
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;
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 **************************************/
/*************** 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 */
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);
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 */
return NULL;
}
else {
- #ifdef HAVE_TRACING
simcall_process_on_exit(process,(int_f_pvoid_pvoid_t)TRACE_msg_process_kill,process);
- #endif
}
return process;
}
{
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;
}
{
xbt_assert(process != NULL, "Invalid parameter");
-#ifdef HAVE_TRACING
TRACE_msg_process_suspend(process);
-#endif
-
simcall_process_suspend(process);
MSG_RETURN(MSG_OK);
}
{
xbt_assert(process != NULL, "Invalid parameter");
-#ifdef HAVE_TRACING
TRACE_msg_process_resume(process);
-#endif
-
simcall_process_resume(process);
MSG_RETURN(MSG_OK);
}
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
* \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);
/* 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;
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;
}
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;
/* 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];
* \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.
* \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);
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;
}
/* 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);
}
/** \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;
+ }
}
* \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
* 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.
* \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;
}
XBT_DEBUG("A new VM (%s) has been created", name);
- #ifdef HAVE_TRACING
TRACE_msg_vm_create(name, ind_pm);
- #endif
return ind_vm;
}
__MSG_host_destroy(vm);
- #ifdef HAVE_TRACING
TRACE_msg_vm_end(vm);
- #endif
}
{
simcall_vm_start(vm);
- #ifdef HAVE_TRACING
TRACE_msg_vm_start(vm);
- #endif
}
/* msg_vm_t equals to msg_host_t */
simcall_vm_shutdown(vm);
- // #ifdef HAVE_TRACING
// TRACE_msg_vm_(vm);
- // #endif
}
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
{
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;
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();
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);
* 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);
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)
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)
}
// 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;
}
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))
// 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
}
XBT_DEBUG("vm_suspend done");
- #ifdef HAVE_TRACING
TRACE_msg_vm_suspend(vm);
- #endif
}
{
simcall_vm_resume(vm);
- #ifdef HAVE_TRACING
TRACE_msg_vm_resume(vm);
- #endif
}
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.
{
simcall_vm_restore(vm);
- #ifdef HAVE_TRACING
TRACE_msg_vm_restore(vm);
- #endif
}
#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");
return;
}
-#endif /* HAVE_TRACING */
#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"
/* 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 */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "private.h"
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/misc.h"
#include "xbt/log.h"
#include <libgen.h>
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){
TRACE_sd_set_task_category(newfile, category);
}
}
-#endif
xbt_dynar_push(result, &newfile);
}
} else if (xbt_dynar_is_empty(file->tasks_after)) {
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){
TRACE_sd_set_task_category(newfile, category);
}
}
-#endif
xbt_dynar_push(result, &newfile);
}
} else {
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){
TRACE_sd_set_task_category(newfile, category);
}
}
-#endif
xbt_dynar_push(result, &newfile);
}
}
runtime *= 4200000000.; /* Assume that timings were done on a 4.2GFlops machine. I mean, why not? */
// XBT_INFO("See <job id=%s runtime=%s %.0f>",A_dax__job_id,A_dax__job_runtime,runtime);
current_job = SD_task_create_comp_seq(name, NULL, runtime);
-#ifdef HAVE_TRACING
char *category = A_dax__job_name;
if (category){
TRACE_category (category);
TRACE_sd_set_task_category(current_job, category);
}
-#endif
xbt_dict_set(jobs, A_dax__job_id, current_job, NULL);
free(name);
xbt_dynar_push(result, ¤t_job);
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "private.h"
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/misc.h"
#include "xbt/log.h"
#include <stdbool.h>
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)
TRACE_sd_set_task_category(task, category);
}
}
-#endif
/** @brief loads a DOT file describing a DAG
*
} 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 */
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);
*/
void SD_init(int *argc, char **argv)
{
-#ifdef HAVE_TRACING
TRACE_global_init(argc, argv);
-#endif
s_SD_task_t task;
*/
void SD_exit(void)
{
-#ifdef HAVE_TRACING
TRACE_surf_resource_utilization_release();
-#endif
xbt_mallocator_free(sd_global->task_mallocator);
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;
* 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"
* 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"
/* 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;
}
sd_global->task_number++;
-#ifdef HAVE_TRACING
TRACE_sd_task_create(task);
-#endif
return task;
}
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;
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;
}
*
* \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
* 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;
}
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;
}
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--;
/**
* \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.
{
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;
}
/**
}
}
-#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)
* \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;
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]);
}
* \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;
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 =
"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
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);
"Task %s is not a SD_TASK_COMP_PAR_AMDAHL typed task."
"Cannot use this function.",
SD_task_get_name(task));
- task->computation_amount = xbt_new0(double, ws_count);
- task->communication_amount = xbt_new0(double, ws_count * ws_count);
+ task->flops_amount = xbt_new0(double, ws_count);
+ task->bytes_amount = xbt_new0(double, ws_count * ws_count);
xbt_free(task->workstation_list);
task->workstation_nb = ws_count;
task->workstation_list = xbt_new0(SD_workstation_t, ws_count);
for(i=0;i<ws_count;i++){
- task->computation_amount[i] =
+ task->flops_amount[i] =
(task->alpha + (1 - task->alpha)/ws_count) * task->amount;
}
}
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;
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]);
}
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;
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]);
}
}
}
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]);
}
}
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){
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);
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]);
}
}
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);
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]);
}
}
* 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)");
* \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);
}
/**
*
* \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)
{
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);
min_bandwidth = bandwidth;
}
- return latency + (communication_amount / min_bandwidth);
+ return latency + (bytes_amount / min_bandwidth);
}
/**
#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");
"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"
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];
}
*
* \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);
}
/**
* \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
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);
}
}
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);
}
simcall_BODY_comm_wait(comm, timeout);
}
-#ifdef HAVE_TRACING
/**
* \brief Set the category of an synchro.
*
}
simcall_BODY_set_category(synchro, category);
}
-#endif
/**
* \ingroup simix_comm_management
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) {
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) {
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
#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);
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;
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;
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;
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) {
}
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);
} 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);
} else {
SIMIX_simcall_handle(&self->simcall, 0);
}
-
+ return self->simcall.result.i;
}
#endif
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,
[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",
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;
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)
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)
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();
}
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);
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);
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;
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);
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);
}
}
-#ifdef HAVE_TRACING
void SIMIX_set_category(smx_synchro_t synchro, const char *category)
{
if (synchro->state != SIMIX_RUNNING) return;
surf_action_set_category(synchro->comm.surf_comm, category);
}
}
-#endif
/**
* \brief Function to get the parameters of the given the SIMIX 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);
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);
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);
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);
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);
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);
synchro->latency_limited = -1;
#endif
-#ifdef HAVE_TRACING
synchro->category = NULL;
-#endif
XBT_DEBUG("Create communicate synchro %p", synchro);
++smx_total_comms;
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);
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 =
//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){\
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)\
#include <stdarg.h>
#include <simgrid/sg_config.h>
-
-#ifdef HAVE_TRACING
-
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_smpi, instr, "Tracing SMPI");
static xbt_dict_t keys;
new_pajeEndLink (SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key);
}
-#endif /* HAVE_TRACING */
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 {
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);
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);
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;
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
-#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);
}
}
-#ifdef HAVE_TRACING
if (TRACE_smpi_view_internals()) {
if(req->flags & RECV){
int rank = smpi_process_index();
TRACE_smpi_recv(rank, src_traced, rank);
}
}
-#endif
if(req->detached_sender!=NULL){
smpi_mpi_request_free(&(req->detached_sender));
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());
}
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",
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;
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);
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);
smpi_global_destroy();
-#ifdef HAVE_TRACING
TRACE_end();
-#endif
return 0;
}
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();
}
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)
{
//begin bench after changing process's category
smpi_bench_begin();
}
-#endif
/* PMPI User level calls */
{
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);
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;
}
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;
}
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();
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);
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();
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);
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();
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);
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();
} 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);
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();
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);
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();
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);
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();
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);
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();
smpi_empty_status(status);
retval = MPI_SUCCESS;
} else {
-#ifdef HAVE_TRACING
int rank = request && (*request)->comm != MPI_COMM_NULL
? smpi_process_index()
: -1;
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();
retval = MPI_SUCCESS;
} else {
-#ifdef HAVE_TRACING
int rank = request && (*request)->comm != MPI_COMM_NULL
? smpi_process_index()
: -1;
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) {
src_traced;
TRACE_smpi_recv(rank, src_traced, dst_traced);
}
-#endif
-
}
smpi_bench_begin();
return MPI_ERR_ARG;
smpi_bench_end();
-#ifdef HAVE_TRACING
//save requests information for tracing
int i;
int *srcs = xbt_new0(int, count);
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)
xbt_free(comms);
}
-#endif
smpi_bench_begin();
return MPI_SUCCESS;
}
{
smpi_bench_end();
-#ifdef HAVE_TRACING
//save information from requests
int i;
int *srcs = xbt_new0(int, count);
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];
xbt_free(valid);
xbt_free(comms);
-#endif
smpi_bench_begin();
return retval;
}
} 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);
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();
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();
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);
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();
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;
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();
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;
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;
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);
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();
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);
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();
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;
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();
} 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);
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();
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;
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();
} 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;
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();
} 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;
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();
} 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);
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();
} 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;
extra->recvcounts[i] = recvcount*dt_size_send;
TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
-#endif
- int* recvcounts=(int*)xbt_malloc(count);
+
+ int* recvcounts=(int*)xbt_malloc(count);
for (i=0; i<count;i++)recvcounts[i]=recvcount;
mpi_coll_reduce_scatter_fun(sendbuf, recvbuf, recvcounts,
datatype, op, comm);
xbt_free(recvcounts);
retval = MPI_SUCCESS;
-#ifdef HAVE_TRACING
- TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
-#endif
+
+ TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
}
smpi_bench_begin();
|| recvtype == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else {
-#ifdef HAVE_TRACING
int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_ALLTOALL;
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();
|| 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);
}
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();
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();
(!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;
(!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;
} 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;
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;
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;
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;
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;
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);
}
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);
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)
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);
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);
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);
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){
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);
}
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);
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){
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);
//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);
}
return;
}
-#ifdef HAVE_TRACING
int rank = request->comm != MPI_COMM_NULL
? smpi_comm_rank(request->comm)
: -1;
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);
}
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);
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);
xbt_dynar_free(&srcs);
xbt_dynar_free(&dsts);
xbt_dynar_free(&recvs);
- #endif
int freedrank=smpi_process_index();
xbt_dynar_free_container(&(reqq[freedrank]));
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);
}
}
}
-#ifdef HAVE_TRACING
int rank = smpi_process_index();
int root_traced = smpi_group_index(smpi_comm_group(MPI_COMM_WORLD), root);
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);
}
-#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);
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);
}
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);
}
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;
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);
-
}
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;
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);
-
}
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;
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);
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;
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);
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;
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);
}
}
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;
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);
}
-#ifdef HAVE_TRACING
int rank = smpi_process_index();
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_ALLTOALLV;
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);
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);
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();
}
-#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;
}
#include "cpu_cas01.hpp"
#include "cpu_ti.hpp"
-#include "plugins/energy.hpp"
#include "maxmin_private.hpp"
#include "simgrid/sg_config.h"
lmm_update_constraint_bound(getModel()->getMaxminSystem(), getConstraint(),
m_core * m_powerScale *
m_powerPeak);
-#ifdef HAVE_TRACING
TRACE_surf_host_set_power(date, getName(),
m_core * m_powerScale *
m_powerPeak);
-#endif
while ((var = lmm_get_var_from_cnst
(getModel()->getMaxminSystem(), getConstraint(), &elem))) {
CpuCas01ActionPtr action = static_cast<CpuCas01ActionPtr>(lmm_variable_id(var));
&& (double_equals(xbt_heap_maxkey(getActionHeap()), now, sg_surf_precision))) {
action = static_cast<CpuActionPtr>(xbt_heap_pop(getActionHeap()));
XBT_CDEBUG(surf_kernel, "Something happened to action %p", action);
-#ifdef HAVE_TRACING
if (TRACE_is_enabled()) {
CpuPtr cpu = static_cast<CpuPtr>(lmm_constraint_id(lmm_get_cnst_from_var(getMaxminSystem(), action->getVariable(), 0)));
TRACE_surf_host_set_utilization(cpu->getName(), action->getCategory(),
action->getLastUpdate(),
now - action->getLastUpdate());
}
-#endif
action->finish();
XBT_CDEBUG(surf_kernel, "Action %p finished", action);
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)
TRACE_last_timestamp_to_dump = smaller;
}
}
-#endif
return;
}
; it != itend ; it=itNext) {
++itNext;
action = static_cast<CpuActionPtr>(&*it);
-#ifdef HAVE_TRACING
if (TRACE_is_enabled()) {
CpuPtr x = (CpuPtr) lmm_constraint_id(lmm_get_cnst_from_var
(getMaxminSystem(), action->getVariable(), 0));
delta);
TRACE_last_timestamp_to_dump = now - delta;
}
-#endif
action->updateRemains(lmm_variable_getvalue(action->getVariable()) * delta);
XBT_CDEBUG(surf_kernel, "Updating action(%p): remains was %f, last_update was: %f", this, m_remains, m_lastUpdate);
double_update(&(m_remains), m_lastValue * delta, sg_maxmin_precision*sg_surf_precision);
-#ifdef HAVE_TRACING
if (TRACE_is_enabled()) {
CpuPtr cpu = static_cast<CpuPtr>(lmm_constraint_id(lmm_get_cnst_from_var(getModel()->getMaxminSystem(), getVariable(), 0)));
TRACE_surf_host_set_utilization(cpu->getName(), getCategory(), m_lastValue, m_lastUpdate, now - m_lastUpdate);
}
-#endif
XBT_CDEBUG(surf_kernel, "Updating action(%p): remains is now %f", this, m_remains);
}
#include "instr/instr_private.h"
-#ifdef HAVE_TRACING
#include "surf/surf_private.h"
#include "xbt/graph.h"
fclose(file);
}
-
-#endif /* HAVE_TRACING */
-
#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)
surf_action_set_category(surf_action, category);
}
-#endif /* HAVE_TRACING */
&& (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;
now - action->getLastUpdate());
}
}
-#endif
// if I am wearing a latency hat
if (action->getHat() == LATENCY) {
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;
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.
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);
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()
{
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_ */
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;
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);
void resume();
//private:
-#ifdef HAVE_TRACING
double m_lastSent;
RoutingEdgePtr p_srcElm;
RoutingEdgePtr p_dstElm;
-#endif //HAVE_TRACING
};
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;
}
surf_update_actions_state(model);
}
-#ifdef HAVE_TRACING
TRACE_paje_dump_buffer (0);
-#endif
return surf_min;
}
surf_action_t surf_workstation_model_execute_parallel_task(surf_workstation_model_t model,
int workstation_nb,
void **workstation_list,
- double *computation_amount,
- double *communication_amount,
+ double *flops_amount,
+ double *bytes_amount,
double rate){
- return static_cast<ActionPtr>(model->executeParallelTask(workstation_nb, workstation_list, computation_amount, communication_amount, rate));
+ return static_cast<ActionPtr>(model->executeParallelTask(workstation_nb, workstation_list, flops_amount, bytes_amount, rate));
}
surf_action_t surf_workstation_model_communicate(surf_workstation_model_t model, surf_resource_t src, surf_resource_t dst, double size, double rate){
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();
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);
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();
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)
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)
}
Action::~Action() {
-#ifdef HAVE_TRACING
xbt_free(p_category);
-#endif
}
void Action::finish() {
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++;
XBT_DEBUG("Updating action(%p): remains was %f, last_update was: %f", this, m_remains, m_lastUpdate);
double_update(&m_remains, m_lastValue * delta, sg_surf_precision*sg_maxmin_precision);
-#ifdef HAVE_TRACING
if (getModel() == surf_cpu_model_pm && TRACE_is_enabled()) {
ResourcePtr cpu = static_cast<ResourcePtr>(lmm_constraint_id(lmm_get_cnst_from_var(getModel()->getMaxminSystem(), getVariable(), 0)));
TRACE_surf_host_set_utilization(cpu->getName(), getCategory(), m_lastValue, m_lastUpdate, now - m_lastUpdate);
}
-#endif
XBT_DEBUG("Updating action(%p): remains is now %f", this, m_remains);
}
*/
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
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
}
/**
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 */
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;
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;
}
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)
/* 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);
}
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*/);
};
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){
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);
};
*
* @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;
/**
/**
* @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
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;
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;
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);
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;
for (i = 0; i < workstation_nb; i++)
lmm_expand(ptask_maxmin_system,
static_cast<WorkstationL07Ptr>(workstation_list[i])->p_cpu->getConstraint(),
- action->getVariable(), computation_amount[i]);
+ action->getVariable(), flops_amount[i]);
for (i = 0; i < workstation_nb; i++) {
for (j = 0; j < workstation_nb; j++) {
LinkL07Ptr link;
xbt_dynar_t route=NULL;
- if (communication_amount[i * workstation_nb + j] == 0.0)
+ if (bytes_amount[i * workstation_nb + j] == 0.0)
continue;
routing_platf->getRouteAndLatency(static_cast<WorkstationL07Ptr>(workstation_list[i])->p_netElm,
link = static_cast<LinkL07Ptr>(_link);
lmm_expand_add(ptask_maxmin_system, link->getConstraint(),
action->getVariable(),
- communication_amount[i * workstation_nb + j]);
+ bytes_amount[i * workstation_nb + j]);
}
}
}
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;
}
ActionPtr WorkstationL07::execute(double size)
{
void **workstation_list = xbt_new0(void *, 1);
- double *computation_amount = xbt_new0(double, 1);
- double *communication_amount = xbt_new0(double, 1);
+ double *flops_amount = xbt_new0(double, 1);
+ double *bytes_amount = xbt_new0(double, 1);
workstation_list[0] = this;
- communication_amount[0] = 0.0;
- computation_amount[0] = size;
+ bytes_amount[0] = 0.0;
+ flops_amount[0] = size;
return static_cast<WorkstationL07ModelPtr>(getModel())->executeParallelTask(1, workstation_list,
- computation_amount,
- communication_amount, -1);
+ flops_amount,
+ bytes_amount, -1);
}
ActionPtr WorkstationL07::sleep(double duration)
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);
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)
#endif
/* instr */
-#ifdef HAVE_TRACING
XBT_LOG_CONNECT(instr);
XBT_LOG_CONNECT(instr_api);
XBT_LOG_CONNECT(instr_config);
XBT_LOG_CONNECT(instr_surf);
XBT_LOG_CONNECT(instr_trace);
XBT_LOG_CONNECT(instr_TI_trace);
-#endif
/* jedule */
#ifdef HAVE_JEDULE
#include <stdio.h>
-#include <msg/msg.h>
+#include <simgrid/msg.h>
#include <simgrid/modelchecker.h>
/** An (fake) application with a bug occuring for some random values
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include <float.h>
XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Messages specific to this example");
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
/* 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,
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
* All rights reserved.
*/
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
#include <unistd.h>
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(storage,"Messages specific for this simulation");
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);
}
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdio.h>
-#include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */
+#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
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;
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
#include "xbt/asserts.h"
#include <string.h>
#include <stddef.h>
#include <unistd.h>
-#include <simdag/simdag.h>
+#include <simgrid/simdag.h>
#include <xbt/log.h>
#include <xbt/ex.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic0, sd, "SimDag test basic0");
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic1, sd, "SimDag test basic1");
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic2, sd, "SimDag test basic2");
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic3, sd, "SimDag test basic3");
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic4, sd, "SimDag test basic4");
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(basic5, sd, "SimDag test basic5");
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/asserts.h"
#include "xbt/log.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(incomplete, sd, "SimDag incomplete test");
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
/*
* intra communication test
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
/*
* intra communication test
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
/*
* intra communication test 1
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
/*
* simple latency test
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
/*
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
/**
* bw and latency test 3
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#define TASK_NUM 3
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
/*
* This test checks if the reinitialization of
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
int main(int argc, char **argv)
{
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
int main(int argc, char **argv)
{
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "surf/surf_private.h"
#include "xbt/xbt_os_time.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "surf/surf_private.h"
#include "xbt/xbt_os_time.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "surf/surf_private.h"
#include "xbt/log.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "surf/surf_private.h"
int main(int argc, char **argv)
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "surf/surf_private.h"
int host(int argc, char *argv[]);
$ ${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
$ ${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
$ ${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
#include <math.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
#include "xbt/dict.h"
#include "xbt/ex.h"
#include <stdio.h>
#include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "surf/surf_private.h"
extern routing_platf_t routing_platf;
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)
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)
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)
#include <unistd.h>
#endif
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/graph.h"
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){
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;
}