Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #17 from mpoquet/master
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 14 Jul 2015 19:54:24 +0000 (21:54 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 14 Jul 2015 19:54:24 +0000 (21:54 +0200)
Candidate patch to issue #15

317 files changed:
.gitignore
CMakeLists.txt
ChangeLog
NEWS
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/Flags.cmake
buildtools/Cmake/GenerateDoc.cmake
buildtools/Cmake/MakeLib.cmake
buildtools/Cmake/Modules/FindGFortran.cmake
buildtools/Cmake/Modules/FindLibunwind.cmake
buildtools/Cmake/PrintArgs.cmake
buildtools/Cmake/src/internal_config.h.in
buildtools/Cmake/test_prog/prog_printf_null.c [deleted file]
buildtools/Cmake/test_prog/prog_stacksetup.c
buildtools/jenkins/build.sh [new file with mode: 0755]
buildtools/jenkins/run.bat [deleted file]
buildtools/jenkins/run_DynamicAnalysis.sh
buildtools/jenkins/runmingw.sh [deleted file]
buildtools/pipol/Experimental_bindings.sh [deleted file]
buildtools/pipol/MemCheck.sh [deleted file]
buildtools/pipol/Nightly_memCheck.sh [deleted file]
buildtools/pipol/Nightly_simgrid.sh [deleted file]
buildtools/pipol/cmake.pl [deleted file]
buildtools/pipol/deploy.sh [deleted file]
buildtools/pipol/install_gtnets.sh [deleted file]
buildtools/pipol/install_ns3.sh [deleted file]
buildtools/pipol/pre-simgrid.sh [deleted file]
buildtools/pipol/rc.debian [deleted file]
buildtools/pipol/rc.fedora [deleted file]
buildtools/pipol/rc.mac [deleted file]
buildtools/pipol/rc.ubuntu [deleted file]
buildtools/pipol/rc.windows [deleted file]
buildtools/pipol/ruby.pl [deleted file]
doc/Doxyfile.in
doc/doxygen/options.doc
doc/doxygen/platform.doc
examples/java/cloud/migration/migration.tesh
examples/java/master_slave_bypass/Slave.java
examples/java/master_slave_kill/Slave.java
examples/java/surfCpuModel/surf_cpu_model.tesh
examples/msg/actions/CMakeLists.txt
examples/msg/actions/actions_io.txt [new file with mode: 0644]
examples/msg/actions/storage_actions.c [new file with mode: 0644]
examples/msg/actions/storage_deployment.xml [new file with mode: 0644]
examples/msg/chainsend/chainsend.c
examples/msg/chord/chord.tesh
examples/msg/chord/chord_crosstraffic.tesh
examples/msg/cloud/master_worker_vm.tesh
examples/msg/cloud/simple_vm.tesh
examples/msg/cloud/two_tasks_vm.tesh
examples/msg/gtnets/gtnets-dogbone-gtnets.tesh
examples/msg/gtnets/gtnets-dogbone-lv08.tesh
examples/msg/gtnets/gtnets-onelink-gtnets.tesh
examples/msg/gtnets/gtnets-onelink-lv08.tesh
examples/msg/gtnets/gtnets-waxman.tesh
examples/msg/gtnets/gtnets.c
examples/msg/gtnets/tracing-gtnets-dogbone-gtnets.tesh
examples/msg/gtnets/tracing-gtnets-dogbone-lv08.tesh
examples/msg/gtnets/tracing-gtnets-onelink-gtnets.tesh
examples/msg/gtnets/tracing-gtnets-onelink-lv08.tesh
examples/msg/gtnets/tracing-gtnets-waxman.tesh
examples/msg/icomms/peer.c
examples/msg/icomms/peer2.c
examples/msg/icomms/peer3.c
examples/msg/masterslave/masterslave_cas01_im.tesh
examples/msg/masterslave/masterslave_cpu_ti_crosstraffic.tesh
examples/msg/masterslave/masterslave_failure.c
examples/msg/masterslave/masterslave_failure.tesh
examples/msg/masterslave/masterslave_failure_crosstraffic.tesh
examples/msg/masterslave/masterslave_forwarder.c
examples/msg/masterslave/masterslave_mailbox.c
examples/msg/masterslave/masterslave_multicore.tesh
examples/msg/ns3/ns3.c
examples/msg/ns3/ns3.tesh
examples/msg/parallel_task/parallel_task.c
examples/msg/parallel_task/parallel_task.tesh
examples/msg/parallel_task/test_ptask.c
examples/msg/pastry/pastry_crosstraffic.tesh
examples/msg/sendrecv/sendrecv.c
examples/msg/sendrecv/sendrecv_CLM03.tesh
examples/msg/sendrecv/sendrecv_Reno.tesh
examples/msg/sendrecv/sendrecv_Vegas.tesh
examples/platforms/config.xml
examples/simdag/dax/simple_dax_with_cycle.tesh
examples/simdag/dax/smalldax.tesh
examples/simdag/dot/test_simdag_dotload.tesh
examples/simdag/io/sd_io.c
examples/simdag/properties/test_prop.tesh
examples/simdag/scheduling/test_minmin.tesh
examples/simdag/sd_comm_throttling.c
examples/simdag/test_simdag.tesh
examples/simdag/test_simdag2.tesh
examples/simdag/test_simdag_avail.tesh
examples/simdag/test_simdag_comm_throttling.tesh
examples/simdag/test_simdag_fail.tesh
examples/simdag/test_simdag_seq_access.tesh
examples/simdag/test_simdag_tracing.tesh
examples/simdag/test_simdag_typed_tasks.tesh
examples/smpi/energy/energy.tesh
examples/smpi/energy/f77/energy.tesh
examples/smpi/energy/f90/energy.tesh
examples/smpi/mc/non_deterministic.tesh
examples/smpi/mc/only_send_deterministic.tesh
examples/smpi/replay/replay.c
examples/smpi/replay/smpi_replay.tesh
examples/smpi/replay_multiple/replay_multiple.c
examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c
examples/smpi/tracing/smpi_traced.tesh
include/simgrid/simix.h
include/smpi/mpif.h.in
include/smpi/smpi.h
include/surf/surf_routing.h
include/xbt/base.h [new file with mode: 0644]
include/xbt/dynar.h
include/xbt/function_types.h
include/xbt/misc.h
include/xbt/replay.h
src/bindings/java/org/simgrid/NativeLib.java
src/bindings/java/org/simgrid/msg/RngStream.java
src/bindings/java/org/simgrid/msg/Storage.java
src/bindings/java/org/simgrid/msg/Task.java
src/bindings/lua/lua_platf.c
src/include/simgrid/platf_interface.h
src/include/surf/surf.h
src/instr/instr_config.c
src/instr/instr_paje_trace.c
src/instr/instr_private.h
src/instr/jedule/jedule_sd_binding.c
src/mc/AddressSpace.hpp
src/mc/ModelChecker.hpp
src/mc/PageStore.hpp
src/mc/RegionSnapshot.hpp
src/mc/mc_base.h
src/mc/mc_client.h
src/mc/mc_comm_pattern.h
src/mc/mc_dwarf.cpp
src/mc/mc_dwarf_attrnames.cpp [new file with mode: 0644]
src/mc/mc_dwarf_attrnames.h [deleted file]
src/mc/mc_dwarf_tagnames.cpp [new file with mode: 0644]
src/mc/mc_dwarf_tagnames.h [deleted file]
src/mc/mc_forward.h
src/mc/mc_hash.hpp
src/mc/mc_ignore.h
src/mc/mc_liveness.h
src/mc/mc_location.h
src/mc/mc_member.cpp
src/mc/mc_memory_map.h
src/mc/mc_mmalloc.h
src/mc/mc_mmu.h
src/mc/mc_object_info.cpp
src/mc/mc_object_info.h
src/mc/mc_private.h
src/mc/mc_process.cpp
src/mc/mc_process.h
src/mc/mc_protocol.h
src/mc/mc_record.h
src/mc/mc_replay.h
src/mc/mc_request.h
src/mc/mc_safety.h
src/mc/mc_server.h
src/mc/mc_smx.h
src/mc/mc_snapshot.h
src/mc/mc_state.h
src/mc/mc_unw.h
src/mc/mcer_ignore.h
src/msg/msg_actions.c
src/msg/msg_global.c
src/msg/msg_host.c
src/msg/msg_io.c
src/msg/msg_mailbox.c
src/msg/msg_private.h
src/msg/msg_process.c
src/portable.h
src/simdag/sd_global.c
src/simdag/sd_task.c
src/simdag/sd_workstation.c
src/simgrid/sg_config.c
src/simix/smx_context_boost.cpp
src/simix/smx_environment.c
src/simix/smx_global.c
src/simix/smx_host.c
src/simix/smx_host_private.h
src/simix/smx_io.c
src/simix/smx_network.c
src/simix/smx_private.h
src/simix/smx_process.c
src/simix/smx_process_private.h
src/simix/smx_synchro.c
src/simix/smx_vm.c
src/smpi/smpi_base.c
src/smpi/smpi_bench.c
src/smpi/smpi_global.c
src/smpi/smpi_group.c
src/smpi/smpi_replay.c
src/surf/cpu_interface.hpp
src/surf/host_clm03.cpp [moved from src/surf/workstation_clm03.cpp with 56% similarity]
src/surf/host_clm03.hpp [moved from src/surf/workstation_clm03.hpp with 55% similarity]
src/surf/host_interface.cpp [moved from src/surf/workstation_interface.cpp with 71% similarity]
src/surf/host_interface.hpp [moved from src/surf/workstation_interface.hpp with 63% similarity]
src/surf/host_ptask_L07.cpp [moved from src/surf/workstation_ptask_L07.cpp with 79% similarity]
src/surf/host_ptask_L07.hpp [moved from src/surf/workstation_ptask_L07.hpp with 76% similarity]
src/surf/network_interface.hpp
src/surf/surf_c_bindings.cpp
src/surf/surf_interface.cpp
src/surf/surf_interface.hpp
src/surf/surf_routing.cpp
src/surf/vm_hl13.cpp [moved from src/surf/vm_workstation_hl13.cpp with 75% similarity]
src/surf/vm_hl13.hpp [moved from src/surf/vm_workstation_hl13.hpp with 61% similarity]
src/surf/vm_interface.cpp [new file with mode: 0644]
src/surf/vm_interface.hpp [new file with mode: 0644]
src/surf/vm_workstation_interface.cpp [deleted file]
src/surf/vm_workstation_interface.hpp [deleted file]
src/xbt/backtrace_linux.c
src/xbt/dict.c
src/xbt/log.c
src/xbt/mallocator_private.h
src/xbt/win32_ucontext.c
src/xbt/xbt_os_thread.c
src/xbt/xbt_os_time.c
src/xbt/xbt_replay.c
teshsuite/bug-17132/bug-17132.tesh
teshsuite/msg/host_on_off/CMakeLists.txt
teshsuite/msg/host_on_off/host_on_off.c
teshsuite/msg/host_on_off/host_on_off_recv.c [new file with mode: 0644]
teshsuite/msg/host_on_off/host_on_off_recv.tesh [new file with mode: 0644]
teshsuite/msg/host_on_off/host_on_off_wait.c [new file with mode: 0644]
teshsuite/msg/host_on_off/host_on_off_wait.tesh [new file with mode: 0644]
teshsuite/msg/host_on_off_processes/host_on_off_processes.c
teshsuite/msg/host_on_off_processes/host_on_off_processes.tesh
teshsuite/msg/process/process.c
teshsuite/msg/process_join/process_join.c
teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c
teshsuite/msg/trace/trace.tesh
teshsuite/simdag/availability/availability_test.tesh
teshsuite/simdag/basic/basic0.tesh
teshsuite/simdag/basic/basic1.tesh
teshsuite/simdag/basic/basic2.tesh
teshsuite/simdag/basic/basic3.tesh
teshsuite/simdag/basic/basic4.tesh
teshsuite/simdag/basic/basic5.tesh
teshsuite/simdag/basic/basic6.tesh
teshsuite/simdag/incomplete/incomplete.tesh
teshsuite/simdag/network/mxn/test_intra_all2all.tesh
teshsuite/simdag/network/mxn/test_intra_independent_comm.tesh
teshsuite/simdag/network/mxn/test_intra_scatter.tesh
teshsuite/simdag/network/p2p/test_latency1.tesh
teshsuite/simdag/network/p2p/test_latency2.tesh
teshsuite/simdag/network/p2p/test_latency3.tesh
teshsuite/simdag/network/p2p/test_latency_bound.tesh
teshsuite/simdag/network/test_reinit_costs.tesh
teshsuite/simdag/partask/test_comp_only_par.tesh
teshsuite/simdag/partask/test_comp_only_seq.tesh
teshsuite/simdag/platforms/basic_link_test.tesh
teshsuite/simdag/platforms/basic_parsing_test.tesh
teshsuite/simdag/platforms/basic_parsing_test_bypass.tesh
teshsuite/simdag/platforms/basic_parsing_test_sym_full.tesh
teshsuite/simdag/platforms/bogus_disk_attachment.tesh
teshsuite/simdag/platforms/bogus_missing_gateway.tesh
teshsuite/simdag/platforms/bogus_two_hosts_asymetric.tesh
teshsuite/simdag/platforms/flatifier.tesh
teshsuite/simdag/platforms/get_full_link.tesh
teshsuite/simdag/platforms/properties.xml
teshsuite/smpi/allgather/allgather_coll.tesh
teshsuite/smpi/allgatherv/allgatherv_coll.tesh
teshsuite/smpi/allreduce/allreduce_coll.tesh
teshsuite/smpi/allreduce/allreduce_coll_large.tesh
teshsuite/smpi/alltoall/alltoall_coll.tesh
teshsuite/smpi/alltoallv/alltoallv_coll.tesh
teshsuite/smpi/barrier/barrier_coll.tesh
teshsuite/smpi/bcast/bcast.tesh
teshsuite/smpi/bcast/bcast_coll.tesh
teshsuite/smpi/gather/gather_coll.tesh
teshsuite/smpi/hvector/hvector.tesh
teshsuite/smpi/indexed/indexed.tesh
teshsuite/smpi/isp/umpire/any_src-can-deadlock10.tesh
teshsuite/smpi/isp/umpire/any_src-can-deadlock4.tesh
teshsuite/smpi/isp/umpire/any_src-can-deadlock5.tesh
teshsuite/smpi/isp/umpire/any_src-can-deadlock6.tesh
teshsuite/smpi/isp/umpire/any_src-wait-deadlock.tesh
teshsuite/smpi/isp/umpire/any_src-waitall-deadlock2.tesh
teshsuite/smpi/isp/umpire/any_src-waitall-deadlock3.tesh
teshsuite/smpi/isp/umpire/any_src-waitany-deadlock.tesh
teshsuite/smpi/isp/umpire/any_src-waitany-deadlock2.tesh
teshsuite/smpi/isp/umpire/basic-deadlock-comm_create.tesh
teshsuite/smpi/isp/umpire/basic-deadlock-comm_dup.tesh
teshsuite/smpi/isp/umpire/basic-deadlock-comm_split.tesh
teshsuite/smpi/isp/umpire/basic-deadlock.tesh
teshsuite/smpi/isp/umpire/bcast-deadlock.tesh
teshsuite/smpi/isp/umpire/collective-misorder-allreduce.tesh
teshsuite/smpi/isp/umpire/collective-misorder.tesh
teshsuite/smpi/isp/umpire/complex-deadlock.tesh
teshsuite/smpi/isp/umpire/deadlock-config.tesh
teshsuite/smpi/isp/umpire/finalize-deadlock.tesh
teshsuite/smpi/isp/umpire/irecv-deadlock.tesh
teshsuite/smpi/isp/umpire/no-error.tesh
teshsuite/smpi/isp/umpire/no-error2.tesh
teshsuite/smpi/isp/umpire/no-error3-any_src.tesh
teshsuite/smpi/isp/umpire/no-error3.tesh
teshsuite/smpi/mpich3-test/CMakeLists.txt
teshsuite/smpi/mpich3-test/coll/CMakeLists.txt
teshsuite/smpi/mpich3-test/perf/sendrecvl.c
teshsuite/smpi/pingpong/TI_output.tesh
teshsuite/smpi/pingpong/pt2pt.tesh
teshsuite/smpi/reduce/reduce.tesh
teshsuite/smpi/reduce/reduce_coll.tesh
teshsuite/smpi/reduce/reduce_scatter_coll.tesh
teshsuite/smpi/scatter/scatter_coll.tesh
teshsuite/smpi/shared/shared.tesh
teshsuite/smpi/struct/struct.tesh
teshsuite/smpi/vector/vector.tesh
teshsuite/surf/surf_usage/surf_usage.tesh
teshsuite/surf/surf_usage/surf_usage2.c
tools/CMakeLists.txt
tools/generate-dwarf-functions [new file with mode: 0755]
tools/generate.sh [deleted file]

index ccf5ab7..367a41b 100644 (file)
@@ -970,6 +970,8 @@ teshsuite/msg/task_destroy_cancel/task_destroy_cancel
 teshsuite/msg/pid/pid
 teshsuite/msg/get_sender/get_sender
 teshsuite/msg/trace/test_trace_integration
+teshsuite/msg/host_on_off/host_on_off_recv
+teshsuite/msg/host_on_off/host_on_off_wait
 teshsuite/simix/check_defaults/check_defaults
 teshsuite/simix/stack_overflow/stack_overflow
 teshsuite/simdag/availability/availability_test
@@ -1050,6 +1052,7 @@ examples/java/surfPlugin/java_surf_plugin_compiled
 /CMakeCache.txt
 teshsuite/mc/dwarf/dwarf
 teshsuite/mc/dwarf_expression/dwarf-expression
+teshsuite/mc/replay/random_bug
 examples/smpi/mc/smpi_bugged1
 examples/smpi/mc/smpi_bugged1_liveness
 examples/smpi/mc/smpi_bugged2
index d783249..e7311c7 100644 (file)
@@ -15,7 +15,7 @@ if (APPLE) #MAC
   set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 endif()
 
-if (NOT DEFINED enable_smpi OR enable_smpi) # smpi is enabled by default
+if ((NOT DEFINED enable_smpi OR enable_smpi) AND NOT APPLE) # smpi is enabled by default
   # Call enable_language(Fortran) in order to load the build rules for
   # this language, needed by teshsuite/smpi/mpich-test/.  Use
   # CMAKE_FORCE_Fortran_COMPILER to bypass checks for a working
index 310c4af..eb433d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -82,6 +82,9 @@ SimGrid (3.12) NOT RELEASED; urgency=low
     - New property: watt_off to denote the disipation when the host is off
     - New functions getWattMinAt and getWattMaxAt to retrieve the
       dissipation of pstates that we are not currently at.
+  * Massive rename s/workstation/host/
+    - That's intrusive, but that's good for the project consistency. Sorry. 
+    - Change config option "workstation/model" into "host/model"
  XBT
   * New functions
    - Add a xbt_heap_update function, to avoid costly xbt_heap_remove+xbt_heap_insert use 
diff --git a/NEWS b/NEWS
index 99a0696..7010f28 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ __   _____ _ __ ___(_) ___  _ __   |___ / / |___ \
 
 (to complete)
 
+ * Surf internal cleanup: rename workstation into host.
+   Option "workstation/model" now reads "host/model"
                     _               _____  _ _
 __   _____ _ __ ___(_) ___  _ __   |___ / / / |
 \ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \ | | |
index ed72672..25c59bb 100644 (file)
@@ -197,6 +197,8 @@ IF(NOT enable_memcheck)
   # BEGIN TESH TESTS
   ADD_TESH_FACTORIES(tesh-msg-get-sender         "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender/get_sender.tesh)
   ADD_TESH_FACTORIES(tesh-msg-host-on-off        "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/host_on_off ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off/host_on_off.tesh)
+  ADD_TESH_FACTORIES(tesh-msg-host-on-off-wait    "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/host_on_off ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off/host_on_off_wait.tesh)
+  ADD_TESH_FACTORIES(tesh-msg-host-on-off-recv    "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/host_on_off ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off/host_on_off_recv.tesh)
   ADD_TESH_FACTORIES(tesh-msg-host-on-off-processes "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off_processes --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/host_on_off_processes ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off_processes/host_on_off_processes.tesh)
   ADD_TESH_FACTORIES(tesh-msg-pid                "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/pid --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/pid ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/pid/pid.tesh)
   ADD_TESH_FACTORIES(tesh-msg-process            "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/process --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/process ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/process/process.tesh)
@@ -466,7 +468,7 @@ IF(NOT enable_memcheck)
       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()
     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)
+    ADD_TESH(smpi-replay-simple                --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()
index ba8db2b..df8b11b 100644 (file)
@@ -109,7 +109,7 @@ endif()
 # intrusive 1.35.0
 # lambda 1.28.0
 # signals2 1.39.0
-find_package(Boost 1.42 REQUIRED)
+find_package(Boost 1.42 COMPONENTS context)
 if(Boost_FOUND)
   include_directories(${Boost_INCLUDE_DIRS})
 else()
@@ -120,6 +120,19 @@ else()
   endif()
 endif()
 
+if(Boost_FOUND AND Boost_CONTEXT_FOUND)
+  # We should use feature detection for this instead:
+  if (Boost_VERSION LESS 105600)
+    message("Found Boost.Context API v1")
+    set(HAVE_BOOST_CONTEXT 1)
+  else()
+    message("Found Boost.Context API v2")
+    set(HAVE_BOOST_CONTEXT 2)
+  endif()
+else()
+  set(HAVE_BOOST_CONTEXT 0)
+endif()
+
 # Checks for header libraries functions.
 CHECK_LIBRARY_EXISTS(dl      dlopen                  "" HAVE_DLOPEN_IN_LIBDL)
 CHECK_LIBRARY_EXISTS(execinfo backtrace              "" HAVE_BACKTRACE_IN_LIBEXECINFO)
@@ -131,7 +144,7 @@ CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_MUTEX_TIMEDLOCK_LIB
 CHECK_LIBRARY_EXISTS(rt      clock_gettime           "" HAVE_POSIX_GETTIME)
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  set(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE")
+  set(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE")
 endif()
 
 CHECK_INCLUDE_FILES("time.h;sys/time.h" TIME_WITH_SYS_TIME)
@@ -205,6 +218,7 @@ else()
   SET(HAVE_MMALLOC 0)
 endif()
 
+
 if(WIN32) #THOSE FILES ARE FUNCTIONS ARE NOT DETECTED BUT THEY SHOULD...
   set(HAVE_UCONTEXT_H 1)
   set(HAVE_MAKECONTEXT 1)
@@ -253,7 +267,15 @@ endif()
 
 if(enable_smpi)
   include(FindGFortran)
+  #really checks for objdump for privatization
+  find_package(BinUtils QUIET)
   SET(HAVE_SMPI 1)
+
+  if( NOT "${CMAKE_OBJDUMP}" MATCHES "CMAKE_OBJDUMP-NOTFOUND" AND HAVE_MMAP)
+    SET(HAVE_PRIVATIZATION 1)
+  else()
+    SET(HAVE_PRIVATIZATION 0)
+  endif()
 endif()
 
 #--------------------------------------------------------------------------------------------------
@@ -437,88 +459,38 @@ if(pthread)
   endif()
 endif()
 
-# AC_CHECK_MCSC(mcsc=yes, mcsc=no)
-set(mcsc_flags "")
+# This is needed for ucontext on MacOS X:
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  set(mcsc_flags -D_XOPEN_SOURCE)
+  add_definitions(-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE)
 endif()
 
 if(WIN32)
-  if(ARCH_32_BITS)
-    set(mcsc_flags -D_XBT_WIN32 -D_I_X86_ -I${CMAKE_HOME_DIRECTORY}/src/include -I${CMAKE_HOME_DIRECTORY}/src/xbt)
-  else()
-    set(mcsc_flags -D_XBT_WIN32 -D_AMD64_ -I${CMAKE_HOME_DIRECTORY}/src/include -I${CMAKE_HOME_DIRECTORY}/src/xbt)
-  endif()
-endif()
-
-IF(CMAKE_CROSSCOMPILING)
-  IF(WIN32)
-    set(windows_context "yes")
-    set(IS_WINDOWS 1)
-  ENDIF()
-ELSE()
-  file(REMOVE "${CMAKE_BINARY_DIR}/testprog*")
-  file(REMOVE ${CMAKE_BINARY_DIR}/conftestval)
-  set(MCSC_buildcmd ${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_AC_CHECK_MCSC.c ${mcsc_flags} -o testprog)
-  execute_process(COMMAND ${MCSC_buildcmd}
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/
-  OUTPUT_VARIABLE COMPILE_mcsc_VAR ERROR_VARIABLE COMPILE_mcsc_VAR)
-
-  if(NOT COMPILE_mcsc_VAR)
-    message(STATUS "prog_AC_CHECK_MCSC.c is compilable")
-    execute_process(COMMAND ./testprog
-    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/
-    OUTPUT_VARIABLE var_compil)
-  else()
-    message(STATUS "prog_AC_CHECK_MCSC.c is not compilable. \nBuild command: ${MCSC_buildcmd}\nOutput\n${COMPILE_mcsc_VAR}")
-  endif()
-  file(REMOVE "${CMAKE_BINARY_DIR}/testprog*")
-
-  if(EXISTS "${CMAKE_BINARY_DIR}/conftestval")
-    file(READ "${CMAKE_BINARY_DIR}/conftestval" mcsc)
-    STRING(REPLACE "\n" "" mcsc "${mcsc}")
-    if(mcsc)
-      set(mcsc "yes")
-      set(HAVE_UCONTEXT_H 1)
-    else()
-      set(mcsc "no")
-    endif()
-  else()
-    set(mcsc "no")
-  endif()
-
-  message(STATUS "mcsc: ${mcsc}")
-ENDIF()
-
-if(mcsc MATCHES "no" AND pthread)
-  if(HAVE_WINDOWS_H)
-    set(windows_context "yes")
-    set(IS_WINDOWS 1)
-  elseif(HAVE_WINDOWS_H)
-    message(FATAL_ERROR "no appropriate backend found")
-  endif()
-endif()
-
-#Only windows
-
-if(WIN32)
-  if(NOT HAVE_WINDOWS_H)
-    message(FATAL_ERROR "no appropriate backend found windows")
-  endif()
-endif()
-
-if(windows_context MATCHES "yes")
-  message(STATUS "Context change to windows")
+  # We always provide our own implementation of ucontext on Windows.
+  try_compile(HAVE_UCONTEXT
+    ${CMAKE_BINARY_DIR}
+    ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_AC_CHECK_MCSC.c
+    COMPILE_DEFINITIONS _XBT_WIN32
+    INCLUDE_DIRECTORIES
+      ${CMAKE_HOME_DIRECTORY}/src/include
+      ${CMAKE_HOME_DIRECTORY}/src/xbt
+  )
+else()
+  # We always provide our own implementation of ucontext on Windows.
+  try_compile(HAVE_UCONTEXT
+    ${CMAKE_BINARY_DIR}
+    ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_AC_CHECK_MCSC.c)
 endif()
 
 #If can have both context
 
-if(mcsc)
+if(HAVE_UCONTEXT)
   set(CONTEXT_UCONTEXT 1)
+  message("-- Support for ucontext factory")
 endif()
 
 if(pthread)
   set(CONTEXT_THREADS 1)
+  message("-- Support for thread context factory")
 endif()
 
 ###############
@@ -586,7 +558,7 @@ set(makecontext_CPPFLAGS_2 "")
 if(HAVE_MAKECONTEXT OR WIN32)
   set(makecontext_CPPFLAGS "-DTEST_makecontext")
   if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-    set(makecontext_CPPFLAGS_2 "-D_XOPEN_SOURCE")
+    set(makecontext_CPPFLAGS_2 "-D_XOPEN_SOURCE=700")
   endif()
 
   if(WIN32)
@@ -661,23 +633,6 @@ endif()
 
 #AC_PROG_MAKE_SET
 
-if(CMAKE_CROSSCOMPILING)
-  set(RUN_PRINTF_NULL_VAR "cross")
-  set(COMPILE_PRINTF_NULL_VAR "cross")
-else()
-  #AC_PRINTF_NULL FIXME: this is too ancient to survive!
-  try_run(RUN_PRINTF_NULL_VAR COMPILE_PRINTF_NULL_VAR
-    ${CMAKE_BINARY_DIR}
-    ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_printf_null.c
-    )
-endif()
-
-if(RUN_PRINTF_NULL_VAR MATCHES "FAILED_TO_RUN")
-  SET(PRINTF_NULL_WORKING "0")
-else()
-  SET(PRINTF_NULL_WORKING "1")
-endif()
-
 #AC_CHECK_VA_COPY
 
 set(diff_va "va_copy((d),(s))"
index 15f9676..8f95a15 100644 (file)
@@ -88,11 +88,11 @@ set(EXTRA_DIST
   src/surf/surf_routing_vivaldi.hpp
   src/surf/surfxml_parse.c
   src/surf/trace_mgr_private.h
-  src/surf/vm_workstation_hl13.hpp
-  src/surf/vm_workstation_interface.hpp
-  src/surf/workstation_clm03.hpp
-  src/surf/workstation_interface.hpp
-  src/surf/workstation_ptask_L07.hpp
+  src/surf/vm_hl13.hpp
+  src/surf/vm_interface.hpp
+  src/surf/host_clm03.hpp
+  src/surf/host_interface.hpp
+  src/surf/host_ptask_L07.hpp
   src/win32/config.h
   src/xbt/automaton/automaton_lexer.yy.c
   src/xbt/automaton/parserPromela.lex
@@ -353,11 +353,11 @@ set(SURF_SRC
   src/surf/surfxml_parse.c
   src/surf/surfxml_parseplatf.c
   src/surf/trace_mgr.c
-  src/surf/vm_workstation_hl13.cpp
-  src/surf/vm_workstation_interface.cpp
-  src/surf/workstation_clm03.cpp
-  src/surf/workstation_interface.cpp
-  src/surf/workstation_ptask_L07.cpp
+  src/surf/vm_hl13.cpp
+  src/surf/vm_interface.cpp
+  src/surf/host_clm03.cpp
+  src/surf/host_interface.cpp
+  src/surf/host_ptask_L07.cpp
   src/xbt/xbt_sg_stubs.c
   )
 
@@ -628,9 +628,9 @@ set(MC_SRC
   src/mc/mc_compare.cpp
   src/mc/mc_diff.cpp
   src/mc/mc_dwarf.cpp
-  src/mc/mc_dwarf_attrnames.h
+  src/mc/mc_dwarf_attrnames.cpp
   src/mc/mc_dwarf_expression.cpp
-  src/mc/mc_dwarf_tagnames.h
+  src/mc/mc_dwarf_tagnames.cpp
   src/mc/mc_hash.hpp
   src/mc/mc_hash.cpp
   src/mc/mc_ignore.cpp
@@ -698,6 +698,7 @@ set(headers_to_install
   include/xbt/RngStream.h
   include/xbt/asserts.h
   include/xbt/automaton.h
+  include/xbt/base.h
   include/xbt/config.h
   include/xbt/cunit.h
   include/xbt/dict.h
@@ -1222,7 +1223,6 @@ set(CMAKE_SOURCE_FILES
   buildtools/Cmake/test_prog/prog_gnu_dynlinker.c
   buildtools/Cmake/test_prog/prog_gtnets.cpp
   buildtools/Cmake/test_prog/prog_mutex_timedlock.c
-  buildtools/Cmake/test_prog/prog_printf_null.c
   buildtools/Cmake/test_prog/prog_sem_init.c
   buildtools/Cmake/test_prog/prog_sem_open.c
   buildtools/Cmake/test_prog/prog_sem_timedwait.c
index e51d603..3fe0a43 100644 (file)
@@ -126,7 +126,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${optCFLAGS}")
 
 # Try to make Mac a bit more complient to open source standards
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE")
 endif()
 
 set(TESH_OPTION "")
index 36fd526..1cbc2b9 100644 (file)
@@ -60,7 +60,6 @@ if(DOXYGEN_FOUND)
   ADD_CUSTOM_COMMAND(TARGET doc
     COMMAND ${FIG2DEV_PATH}/fig2dev -Lmap ${CMAKE_HOME_DIRECTORY}/doc/shared/fig/simgrid_modules.fig | perl -pe 's/imagemap/simgrid_modules/g'| perl -pe 's/<IMG/<IMG style=border:0px/g' | ${CMAKE_HOME_DIRECTORY}/tools/doxygen/fig2dev_postprocessor.pl > ${CMAKE_HOME_DIRECTORY}/doc/simgrid_modules.map
     COMMAND pwd
-    COMMAND ${CMAKE_COMMAND} -E tar czf html/msg-tuto-src.tgz msg-tuto-src/
     COMMAND ${CMAKE_COMMAND} -E echo "XX Run doxygen"
     COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
     COMMAND ${CMAKE_COMMAND} -E echo "XX Generate the index files"
index fc2aa83..838739c 100644 (file)
@@ -33,7 +33,9 @@ endif()
 # Compute the dependencies of SimGrid
 #####################################
 set(SIMGRID_DEP "-lm")
-set(SIMGRID_DEP "${SIMGRID_DEP} ${Boost_CONTEXT_LIBRARY}")
+if (HAVE_BOOST_CONTEXT)
+  set(SIMGRID_DEP "${SIMGRID_DEP} ${Boost_CONTEXT_LIBRARY}")
+endif()
 
 if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"
     AND NOT ${CMAKE_SYSTEM_VERSION} VERSION_LESS 10.0
@@ -56,10 +58,9 @@ else()
   set(SIMGRID_DEP "${SIMGRID_DEP} -lstdc++")
 endif()
 
-if(pthread)
-  if(${CONTEXT_THREADS})
-    SET(SIMGRID_DEP "${SIMGRID_DEP} -pthread")
-  endif()
+if(pthread AND ${CONTEXT_THREADS} AND NOT APPLE)
+  # Clang on recent Mac OS X is not happy about -pthread.
+  SET(SIMGRID_DEP "${SIMGRID_DEP} -pthread")
 endif()
 
 if(HAVE_LUA)
index dfd141a..1369d64 100644 (file)
@@ -13,7 +13,7 @@ mark_as_advanced(GFORTRAN_EXE)
 
 message(STATUS "Looking for bin gfortran")
 set(SMPI_FORTRAN 0)
-if(NOT WIN32)
+if(NOT WIN32 AND NOT APPLE)
   if(GFORTRAN_EXE)
     message(STATUS "Found gfortran: ${GFORTRAN_EXE}")
     set(SMPI_FORTRAN 1)
@@ -21,7 +21,7 @@ if(NOT WIN32)
     message(STATUS "Looking for bin gfortran - not found")
   endif()
 else()
-  message(STATUS "SMPI Fortran is disabled on Windows platforms. Please contact the SimGrid team if you need it.")
+  message(STATUS "SMPI Fortran is disabled on Windows and MacOS platforms. Please contact the SimGrid team if you need it.")
 endif()
 
 if(NOT SMPI_FORTRAN)
index 03bbed9..aadb692 100644 (file)
@@ -5,27 +5,30 @@ if(PROCESSOR_x86_64)
     $ENV{SIMGRID_LIBUNWIND_LIBRARY_PATH}
     $ENV{LD_LIBRARY_PATH}
     $ENV{LIBUNWIND_LIBRARY_PATH}
-    PATH_SUFFIXES lib/ GnuWin32/lib
+    PATH_SUFFIXES lib/ GnuWin32/lib lib/system
     PATHS
     /opt
     /opt/local
     /opt/csw
     /sw
     /usr)
-else()
+endif()
+
+if(NOT PATH_LIBUNWIND_LIB)
   find_library(PATH_LIBUNWIND_LIB
     NAMES unwind
     HINTS
     $ENV{SIMGRID_LIBUNWIND_LIBRARY_PATH}
     $ENV{LD_LIBRARY_PATH}
     $ENV{LIBUNWIND_LIBRARY_PATH}
-    PATH_SUFFIXES lib/ GnuWin32/lib
+    PATH_SUFFIXES lib/ GnuWin32/lib lib/system
     PATHS
     /opt
     /opt/local
     /opt/csw
     /sw
-    /usr)
+    /usr
+    /usr/lib/)
 endif()
 
 find_path(PATH_LIBUNWIND_H "libunwind.h"
index e4ed2e8..928da8f 100644 (file)
@@ -10,12 +10,11 @@ if(enable_print_message)
   message("need_vasprintf ..............: ${simgrid_need_vasprintf}")
   message("PREFER_PORTABLE_SNPRINTF ....: ${PREFER_PORTABLE_SNPRINTF}")
   message("HAVE_VA_COPY ................: ${HAVE_VA_COPY}")
-  message("PRINTF_NULL_WORKING .........: ${PRINTF_NULL_WORKING}")
   message("")
   message("\#define pth_skaddr_makecontext(skaddr,sksize) (${makecontext_addr})")
   message("\#define pth_sksize_makecontext(skaddr,sksize) (${makecontext_size})")
   message("\#define __VA_COPY_USE          ${__VA_COPY_USE}")
-  message("mcsc ........................: ${mcsc}")
+  message("HAVE_UCONTEXT ...............: ${HAVE_UCONTEXT}")
   message("")
   message("HAVE_PTHREAD_CREATE .........: ${pthread}")
   message("HAVE_SEM_INIT ...............: ${HAVE_SEM_INIT_LIB}")
@@ -62,6 +61,7 @@ if(enable_print_message)
   message("HAVE_ASPRINTF ...............: ${HAVE_ASPRINTF}")
   message("HAVE_VASPRINTF ..............: ${HAVE_VASPRINTF}")
   message("HAVE_MMAP ...................: ${HAVE_MMAP}")
+  message("HAVE_PRIVATIZATION ..........: ${HAVE_PRIVATIZATION}")
   message("HAVE_PROCESS_VM_READV .......: ${HAVE_PROCESS_VM_READV}")
   message("HAVE_THREAD_LOCAL_STORAGE ...: ${HAVE_THREAD_LOCAL_STORAGE}")
   message("HAVE_MMALLOC ................: ${HAVE_MMALLOC}")
index 3612538..e05ec9c 100644 (file)
 /* Indicates that we have SMPI FORTRAN support */
 #cmakedefine  SMPI_FORTRAN @SMPI_FORTRAN@
 
+/* We have mmap and objdump to handle privatization */
+#cmakedefine HAVE_PRIVATIZATION @HAVE_PRIVATIZATION@
+
 /* Indicates that we have NS3 support */
 #cmakedefine HAVE_NS3 @HAVE_NS3@
 
 /* "enable replacement (v)snprintf if system (v)snprintf is broken" */
 #cmakedefine PREFER_PORTABLE_SNPRINTF @PREFER_PORTABLE_SNPRINTF@
 
-/* Indicates whether printf("%s",NULL) works */
-#cmakedefine PRINTF_NULL_WORKING @PRINTF_NULL_WORKING@
-
 /* define for stack growth */
 #cmakedefine PTH_STACKGROWTH @PTH_STACKGROWTH@
 
diff --git a/buildtools/Cmake/test_prog/prog_printf_null.c b/buildtools/Cmake/test_prog/prog_printf_null.c
deleted file mode 100644 (file)
index 10eb15e..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Copyright (c) 2010, 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. */
-
-#include <stdio.h>
-printf("%s", NULL);
index 8039927..5c67482 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #if defined OSX
-#define _XOPEN_SOURCE
+#define _XOPEN_SOURCE 700
 #endif
 
 #ifdef _XBT_WIN32
diff --git a/buildtools/jenkins/build.sh b/buildtools/jenkins/build.sh
new file mode 100755 (executable)
index 0000000..7226a67
--- /dev/null
@@ -0,0 +1,94 @@
+#!/bin/sh
+
+set -e
+
+build_mode="$1"
+
+echo "Build mode $build_mode on $(uname -np)" >&2
+
+# usage: die status message...
+die () {
+  local status=${1:-1}
+  shift
+  [ $# -gt 0 ] || set -- "Error - Halting"
+  echo "$@" >&2
+  exit $status
+}
+
+# Get an ON/OFF string from a command:
+onoff() {
+  if "$@" > /dev/null ; then
+    echo ON
+  else
+    echo OFF
+  fi
+}
+
+ulimit -c 0
+
+if [ -d $WORKSPACE/build ]
+then
+  rm -rf $WORKSPACE/build
+fi
+mkdir $WORKSPACE/build
+cd $WORKSPACE/build
+
+cmake -Denable_documentation=OFF $WORKSPACE
+make dist
+tar xzf `cat VERSION`.tar.gz
+cd `cat VERSION`
+
+case "$build_mode" in
+  "Debug")
+  ;;
+
+  "ModelChecker")
+  ;;
+
+  "DynamicAnalysis")
+  ;;
+
+  *)
+  die 1 "Unknown build_mode $build_mode"
+  ;;
+esac
+
+cmake -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \
+  -Denable_model-checking=$(onoff test "$build_mode" = "ModelChecker") \
+  -Denable_compile_optimization=$(onoff test "$build_mode" = "Debug") \
+  -Denable_smpi_MPICH3_testsuite=$(onoff test "$build_mode" != "DynamicAnalysis") \
+  -Denable_lua=$(onoff test "$build_mode" != "DynamicAnalysis") \
+  -Denable_mallocators=$(onoff test "$build_mode" != "DynamicAnalysis") \
+  -Denable_memcheck=$(onoff test "$build_mode" = "DynamicAnalysis") \
+  -Denable_compile_warnings=ON -Denable_smpi=ON -Denable_lib_static=OFF \
+  -Denable_latency_bound_tracking=OFF -Denable_gtnets=OFF -Denable_jedule=OFF \
+  -Denable_tracing=ON -Denable_java=ON
+make
+
+cd $WORKSPACE/build
+cd `cat VERSION`
+
+TRES=0
+
+ctest -T test --no-compress-output || true
+if [ -f Testing/TAG ] ; then
+   xsltproc $WORKSPACE/buildtools/jenkins/ctest2junit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > CTestResults.xml
+   mv CTestResults.xml $WORKSPACE
+fi
+
+if [ "$build_mode" = "DynamicAnalysis" ]
+then
+  ctest -D ContinuousStart
+  ctest -D ContinuousConfigure
+  ctest -D ContinuousBuild
+  ctest -D ContinuousMemCheck
+  ctest -D ContinuousSubmit
+fi
+
+ctest -D ContinuousStart
+ctest -D ContinuousConfigure
+ctest -D ContinuousBuild
+ctest -D ContinuousTest
+ctest -D ContinuousSubmit
+
+rm -rf `cat VERSION`
diff --git a/buildtools/jenkins/run.bat b/buildtools/jenkins/run.bat
deleted file mode 100755 (executable)
index 16c8cd6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-c:\mingw\msys\1.0\bin\sh -login .\buildtools\jenkins\runmingw.sh %1 %2
index 0c4070e..3a65693 100755 (executable)
@@ -1,30 +1,42 @@
 #!/bin/sh
-if [ -d $WORKSPACE/build ]
-then
-  rm -rf $WORKSPACE/build
-fi
-if [ -d $WORKSPACE/install ]
-then
-  rm -rf $WORKSPACE/install
-fi
-mkdir $WORKSPACE/build
-mkdir $WORKSPACE/install
 
-if [ -d $WORKSPACE/memcheck ]
-then
-  rm -rf $WORKSPACE/memcheck
-fi
-mkdir $WORKSPACE/memcheck
+set -e
+
+die() {
+    echo "$@"
+    exit 1
+}
+
+do_cleanup() {
+  for d in "$WORKSPACE/build" "$WORKSPACE/memcheck"
+  do
+    if [ -d "$d" ]
+    then
+      rm -rf "$d" || die "Could not remote $d"
+    fi
+  done
+  find $WORKSPACE -name "memcheck_test_*.memcheck" -exec rm {} \;
+}
+
+! [ -z "$WORKSPACE" ] || die "No WORKSPACE"
+[ -d "$WORKSPACE" ] || die "WORKSPACE ($WORKSPACE) does not exist"
+
+do_cleanup
+
+for d in "$WORKSPACE/build" "$WORKSPACE/memcheck"
+do
+  mkdir "$d" || die "Could not create $d"
+done
 
 cd $WORKSPACE/build
 
 cmake -Denable_documentation=OFF -Denable_lua=OFF -Denable_tracing=ON -Denable_smpi=ON  -Denable_smpi_MPICH3_testsuite=OFF -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON -Denable_lib_static=OFF -Denable_model-checking=OFF -Denable_latency_bound_tracking=OFF -Denable_gtnets=OFF -Denable_jedule=OFF -Denable_mallocators=OFF -Denable_memcheck_xml=ON $WORKSPACE
 make
 
-ctest -D ExperimentalStart
-ctest -D ExperimentalConfigure
-ctest -D ExperimentalBuild
-ctest -D ExperimentalMemCheck
+ctest -D ExperimentalStart || true
+ctest -D ExperimentalConfigure || true
+ctest -D ExperimentalBuild || true
+ctest -D ExperimentalMemCheck || true
 
 cd $WORKSPACE/build
 if [ -f Testing/TAG ] ; then
@@ -37,11 +49,11 @@ make clean
 cmake -Denable_documentation=OFF -Denable_lua=OFF -Denable_tracing=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON -Denable_lib_static=OFF -Denable_model-checking=OFF -Denable_latency_bound_tracking=OFF -Denable_gtnets=OFF -Denable_jedule=OFF -Denable_mallocators=OFF -Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_coverage=ON $WORKSPACE
 
 make
-ctest -D ExperimentalStart
-ctest -D ExperimentalConfigure
-ctest -D ExperimentalBuild
-ctest -D ExperimentalTest
-ctest -D ExperimentalCoverage
+ctest -D ExperimentalStart || true
+ctest -D ExperimentalConfigure || true
+ctest -D ExperimentalBuild || true
+ctest -D ExperimentalTest || true
+ctest -D ExperimentalCoverage || true
 
 if [ -f Testing/TAG ] ; then
    /usr/local/gcovr-3.1/scripts/gcovr -r .. --xml-pretty -o $WORKSPACE/xml_coverage.xml
@@ -49,3 +61,4 @@ if [ -f Testing/TAG ] ; then
    mv CTestResults_memcheck.xml $WORKSPACE
 fi
 
+do_cleanup
diff --git a/buildtools/jenkins/runmingw.sh b/buildtools/jenkins/runmingw.sh
deleted file mode 100755 (executable)
index 27cad0b..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!c:\mingw\msys\1.0\bin\sh -login
-
-WORKSPACE=$1
-build_mode=$2
-
-rm -rf $WORKSPACE/build
-rm -rf $WORKSPACE/install
-mkdir $WORKSPACE/build
-mkdir $WORKSPACE/install
-cd $WORKSPACE/build
-
-if [ "$build_mode" = "Debug" ]
-then
-cmake -G "MSYS Makefiles" ..
-fi
-
-if [ "$build_mode" = "ModelChecker" ]
-then
-cmake -G "MSYS Makefiles" -Denable_documentation=OFF -Denable_model-checking=ON -Denable_compile_optimizations=OFF ..
-fi
-
-make
diff --git a/buildtools/pipol/Experimental_bindings.sh b/buildtools/pipol/Experimental_bindings.sh
deleted file mode 100755 (executable)
index 8e7f0ea..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/bash
-
-ulimit -c 0
-
-if [ -e ./pipol ] ; then
-       rm -rf ./pipol/$PIPOL_HOST
-       mkdir ./pipol/$PIPOL_HOST
-else
-       mkdir ./pipol
-       rm -rf ./pipol/$PIPOL_HOST
-       mkdir ./pipol/$PIPOL_HOST
-fi
-cd ./pipol/$PIPOL_HOST
-
-export GIT_SSL_NO_VERIFY=1
-git clone git://scm.gforge.inria.fr/simgrid/simgrid.git
-cd simgrid
-#git checkout v3_7_x
-
-perl ./buildtools/pipol/cmake.pl
-perl ./buildtools/pipol/ruby.pl
-
-if [ -e /usr/bin/gcc-4.6 ] ; then
-export CC=gcc-4.6
-export CXX=g++-4.6
-else
-export CC=gcc
-export CXX=g++
-fi
-
-mkdir build-def
-cd build-def
-
-#DEFAULT CONF
-cmake \
--Denable_smpi_MPICH3_testsuite=on ..
-ctest -D ExperimentalStart
-ctest -D ExperimentalConfigure
-ctest -D ExperimentalBuild
-ctest -D ExperimentalTest
-ctest -D ExperimentalSubmit
-cd ../
-rm -rf ./build-def
-
-# really clean the working directory
-git reset --hard master
-git clean -dfx
-
-#MC
-cmake \
--Denable_coverage=on \
--Denable_model-checking=on \
--Denable_lua=on \
--Denable_compile_optimizations=off .
-ctest -D ExperimentalStart
-ctest -D ExperimentalConfigure
-ctest -D ExperimentalBuild
-ctest -D ExperimentalTest
-ctest -D ExperimentalCoverage
-ctest -D ExperimentalSubmit
-
-export SIMGRID_ROOT=`pwd`
-export LD_LIBRARY_PATH=`pwd`/lib
-export DYLD_LIBRARY_PATH=`pwd`/lib #for mac
-
-cd ../
-git clone git://scm.gforge.inria.fr/simgrid/simgrid-ruby.git simgrid-ruby --quiet
-cd simgrid-ruby
-
-cmake .
-ctest -D ExperimentalStart
-ctest -D ExperimentalConfigure
-ctest -D ExperimentalBuild
-ctest -D ExperimentalTest
-ctest -D ExperimentalSubmit
diff --git a/buildtools/pipol/MemCheck.sh b/buildtools/pipol/MemCheck.sh
deleted file mode 100755 (executable)
index c696420..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-ulimit -c 0
-
-if [ -e ./pipol ] ; then
-       rm -rf ./pipol/$PIPOL_HOST
-       mkdir ./pipol/$PIPOL_HOST
-else
-       mkdir ./pipol
-       rm -rf ./pipol/$PIPOL_HOST
-       mkdir ./pipol/$PIPOL_HOST
-fi
-cd ./pipol/$PIPOL_HOST
-
-export GIT_SSL_NO_VERIFY=1
-git clone git://scm.gforge.inria.fr/simgrid/simgrid.git
-cd simgrid
-
-perl ./buildtools/pipol/cmake.pl
-perl ./buildtools/pipol/ruby.pl
-
-if [ -e /usr/bin/gcc-4.6 ] ; then
-export CC=gcc-4.6
-export CXX=g++-4.6
-else
-export CC=gcc
-export CXX=g++
-fi
-
-#mem-check
-cmake \
--Denable_lua=off \
--Denable_tracing=on \
--Denable_smpi=on \
--Denable_compile_optimizations=off \
--Denable_compile_warnings=on \
--Denable_lib_static=off \
--Denable_model-checking=off \
--Denable_latency_bound_tracking=off \
--Denable_gtnets=off \
--Denable_jedule=off \
--Denable_mallocators=off \
--Denable_memcheck=on ./
-ctest -D ExperimentalStart
-ctest -D ExperimentalConfigure
-ctest -D ExperimentalBuild
-ctest -D ExperimentalMemCheck
-ctest -D ExperimentalSubmit
diff --git a/buildtools/pipol/Nightly_memCheck.sh b/buildtools/pipol/Nightly_memCheck.sh
deleted file mode 100755 (executable)
index a1720c6..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-ulimit -c 0
-
-#PIPOL esn amd64_2010-linux-ubuntu-maverick.dd.gz none 02:00 --user --silent
-
-if [ -e ./pipol ] ; then
-       rm -rf ./pipol/$PIPOL_HOST
-       mkdir ./pipol/$PIPOL_HOST
-else
-       mkdir ./pipol
-       rm -rf ./pipol/$PIPOL_HOST
-       mkdir ./pipol/$PIPOL_HOST
-fi
-cd ./pipol/$PIPOL_HOST
-
-export GIT_SSL_NO_VERIFY=1
-git clone git://scm.gforge.inria.fr/simgrid/simgrid.git
-cd simgrid
-
-perl ./buildtools/pipol/cmake.pl
-perl ./buildtools/pipol/ruby.pl
-
-if [ -e /usr/bin/gcc-4.6 ] ; then
-export CC=gcc-4.6
-export CXX=g++-4.6
-else
-export CC=gcc
-export CXX=g++
-fi
-
-#mem-check
-cmake \
--Denable_lua=off \
--Denable_tracing=on \
--Denable_smpi=on \
--Denable_compile_optimizations=off \
--Denable_compile_warnings=on \
--Denable_lib_static=off \
--Denable_model-checking=off \
--Denable_latency_bound_tracking=off \
--Denable_gtnets=off \
--Denable_jedule=off \
--Denable_mallocators=off \
--Denable_memcheck=on ./
-ctest -D NightlyStart
-ctest -D NightlyConfigure
-ctest -D NightlyBuild
-ctest -D NightlyMemCheck
-ctest -D NightlySubmit
diff --git a/buildtools/pipol/Nightly_simgrid.sh b/buildtools/pipol/Nightly_simgrid.sh
deleted file mode 100755 (executable)
index b556483..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-
-#PRE-PIPOL ~/pre-simgrid.sh
-
-#___________________________________________________________________________________________________
-#Ubuntu 9.10________________________________________________________________________________________
-#PIPOL esn i386-linux-ubuntu-karmic.dd.gz none 02:00 --user --silent
-#PIPOL esn amd64-linux-ubuntu-karmic.dd.gz none 02:00 --user --silent
-
-#Ubuntu 10.04
-#PIPOL esn i386-linux-ubuntu-lucid.dd.gz none 02:00 --user --silent
-#PIPOL esn amd64-linux-ubuntu-lucid.dd.gz pipol8 05:00 --user --silent
-
-#Ubuntu 10.10
-#PIPOL esn amd64_2010-linux-ubuntu-maverick.dd.gz none 02:00 --user --silent
-
-#___________________________________________________________________________________________________
-#Fedora 12__________________________________________________________________________________________
-#PIPOL esn i386-linux-fedora-core12.dd.gz none 02:00 --user --silent
-#PIPOL esn amd64-linux-fedora-core12.dd.gz none 02:00 --user --silent
-
-#Fedora 13
-#PIPOL esn i386-linux-fedora-core13.dd.gz none 02:00 --user --silent
-#PIPOL esn amd64-linux-fedora-core13.dd.gz none 02:00 --user --silent
-
-#Fedora 14
-#PIPOL esn amd64_2010-linux-fedora-core14.dd.gz none 02:00 --user --silent
-#PIPOL esn i386_2010-linux-fedora-core14.dd.gz none 02:00 --user --silent
-
-#__________________________________________________________________________________________________
-#Debian Lenny 5.0___________________________________________________________________________________
-#PIPOL esn i386-linux-debian-lenny.dd.gz none 02:00 --user --silent
-#PIPOL esn amd64-linux-debian-lenny.dd.gz none 02:00 --user --silent
-
-#Debian Lenny 6.0
-#PIPOL esn amd64_2010-linux-debian-squeeze.dd.gz none 02:00 --user --silent
-
-#Debian Testing
-#PIPOL esn i386-linux-debian-testing none 02:00 --user --silent
-#PIPOL esn amd64-linux-debian-testing none 02:00 --user --silent
-
-#___________________________________________________________________________________________________
-#MacOS Snow Leopard 10.6____________________________________________________________________________
-
-ulimit -c 0
-
-if [ -e ./pipol ] ; then
-        rm -rf ./pipol/$PIPOL_HOST
-        mkdir ./pipol/$PIPOL_HOST
-else
-        mkdir ./pipol
-        rm -rf ./pipol/$PIPOL_HOST
-        mkdir ./pipol/$PIPOL_HOST
-fi
-cd ./pipol/$PIPOL_HOST
-
-export GIT_SSL_NO_VERIFY=1
-git clone git://scm.gforge.inria.fr/simgrid/simgrid.git
-cd simgrid
-#git checkout v3_7_x
-
-perl ./buildtools/pipol/cmake.pl
-perl ./buildtools/pipol/ruby.pl
-
-if [ -e /usr/bin/gcc-4.6 ] ; then
-export CC=gcc-4.6
-export CXX=g++-4.6
-else
-export CC=gcc
-export CXX=g++
-fi
-
-mkdir build-def
-cd build-def
-
-#DEFAULT CONF
-cmake \
--Denable_smpi_MPICH3_testsuite=on ..
-ctest -D NightlyStart
-ctest -D NightlyConfigure
-ctest -D NightlyBuild
-ctest -D NightlyTest
-ctest -D NightlySubmit
-cd ../
-rm -rf ./build-def
-
-# really clean the working directory
-git reset --hard master
-git clean -dfx
-
-#MC
-cmake \
--Denable_coverage=on \
--Denable_model-checking=on \
--Denable_java=on \
--Denable_lua=on \
--Denable_compile_optimizations=off .
-ctest -D NightlyStart
-ctest -D NightlyConfigure
-ctest -D NightlyBuild
-ctest -D NightlyTest
-ctest -D NightlyCoverage
-ctest -D NightlySubmit
-
-export SIMGRID_ROOT=`pwd`
-export LD_LIBRARY_PATH=`pwd`/lib
-export DYLD_LIBRARY_PATH=`pwd`/lib #for mac
-
-cd ../
-git clone git://scm.gforge.inria.fr/simgrid/simgrid-ruby.git simgrid-ruby --quiet
-cd simgrid-ruby
-
-cmake .
-ctest -D NightlyStart
-ctest -D NightlyConfigure
-ctest -D NightlyBuild
-ctest -D NightlyTest
-ctest -D NightlySubmit
diff --git a/buildtools/pipol/cmake.pl b/buildtools/pipol/cmake.pl
deleted file mode 100644 (file)
index 01cf9f0..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/bin/perl -w
-use strict;
-
-my($my_cmake_version);
-my($cmake);
-my($ctest);
-my($cpack);
-
-$my_cmake_version = `cmake --version`;
-$cmake = `which cmake`;
-$ctest = `which ctest`;
-$cpack = `which cpack`;
-print "$cmake";
-print "$ctest";
-print "$cpack";
-
-chomp $cmake;
-chomp $ctest;
-chomp $cpack;
-
-if ( -f "$cmake" )
-  {
-  if($my_cmake_version =~ /.*2.8.[0-9].*$/)
-    {
-    print "cmake version : $my_cmake_version";
-    }
-    else
-    {
-    if($my_cmake_version =~ /.*2.6.[1-9].*$/)
-      {
-      print "version > 2.6.0\n";
-      system "wget http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz";
-      system "tar zxvf cmake-2.8.2.tar.gz";
-      chdir("./cmake-2.8.2");
-      system "cmake .";
-      system "make";
-      if (-f "./bin/cmake"){
-       system "sudo ln -sf `pwd`/bin/cmake $cmake";
-       system "sudo ln -sf `pwd`/bin/cpack $cpack";
-       system "sudo ln -sf `pwd`/bin/ctest $ctest";
-       }
-       else
-       {
-       return;
-       }
-
-       }
-       else
-       {
-       print "version < 2.6.1\n";
-       system "wget http://www.cmake.org/files/v2.6/cmake-2.6.4.tar.gz";
-       system "wget http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz";
-
-       system "tar zxvf cmake-2.6.4.tar.gz";
-       chdir("./cmake-2.6.4/");
-       system "cmake .";
-       system "make";
-       if (-f "./bin/cmake"){
-         system "sudo ln -sf `pwd`/bin/cmake $cmake";
-         system "sudo ln -sf `pwd`/bin/cpack $cpack";
-         system "sudo ln -sf `pwd`/bin/ctest $ctest";
-         }
-         else
-         {
-         return;
-         }
-         chdir("./..");
-
-         $my_cmake_version = `cmake --version`;
-         print "cmake version : $my_cmake_version";
-         $cmake = `which cmake`;
-         $ctest = `which ctest`;
-         $cpack = `which cpack`;
-         print "$cmake";
-         print "$ctest";
-         print "$cpack";
-         chomp $cmake;
-         chomp $ctest;
-         chomp $cpack;
-
-         system "tar zxvf cmake-2.8.2.tar.gz";
-         chdir("./cmake-2.8.2/");
-         system "cmake .";
-         system "make";
-         if (-f "./bin/cmake"){
-           system "sudo ln -sf `pwd`/bin/cmake $cmake";
-           system "sudo ln -sf `pwd`/bin/cpack $cpack";
-           system "sudo ln -sf `pwd`/bin/ctest $ctest";
-           }
-           else
-           {
-           return;
-           }
-           }
-           $my_cmake_version = `cmake --version`;
-           print "cmake version : $my_cmake_version";
-           $cmake = `which cmake`;
-           $ctest = `which ctest`;
-           $cpack = `which cpack`;
-           print "$cmake";
-           print "$ctest";
-           print "$cpack";
-           }
-           }
diff --git a/buildtools/pipol/deploy.sh b/buildtools/pipol/deploy.sh
deleted file mode 100755 (executable)
index 90b8af5..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-#___________________________________________________________________________________________________
-#Ubuntu 9.10________________________________________________________________________________________
-ssh pipol pipol-sub esn i386-linux-ubuntu-karmic.dd.gz none 02:00 "~/Experimental_bindings.sh"
-ssh pipol pipol-sub esn amd64-linux-ubuntu-karmic.dd.gz none 02:00 "~/Experimental_bindings.sh"
-
-#Ubuntu 10.04
-ssh pipol pipol-sub esn i386-linux-ubuntu-lucid.dd.gz none 02:00 "~/Experimental_bindings.sh"
-ssh pipol pipol-sub esn amd64-linux-ubuntu-lucid.dd.gz none 02:00 "~/Experimental_bindings.sh"
-
-#Ubuntu 10.10
-ssh pipol pipol-sub esn amd64_2010-linux-ubuntu-maverick.dd.gz none 02:00 "~/Experimental_bindings.sh"
-
-#___________________________________________________________________________________________________
-#Fedora 12__________________________________________________________________________________________
-ssh pipol pipol-sub esn i386-linux-fedora-core12.dd.gz none 02:00 "~/Experimental_bindings.sh"
-ssh pipol pipol-sub esn amd64-linux-fedora-core12.dd.gz none 02:00 "~/Experimental_bindings.sh"
-
-#Fedora 13
-ssh pipol pipol-sub esn i386-linux-fedora-core13.dd.gz none 02:00 "~/Experimental_bindings.sh"
-ssh pipol pipol-sub esn amd64-linux-fedora-core13.dd.gz none 02:00 "~/Experimental_bindings.sh"
-
-#Fedora 14
-ssh pipol pipol-sub esn amd64_2010-linux-fedora-core14.dd.gz none 02:00 "~/Experimental_bindings.sh"
-ssh pipol pipol-sub esn i386_2010-linux-fedora-core14.dd.gz none 02:00 "~/Experimental_bindings.sh"
-
-#___________________________________________________________________________________________________
-#Debian Lenny 5.0___________________________________________________________________________________
-ssh pipol pipol-sub esn i386-linux-debian-lenny.dd.gz none 02:00 "~/Experimental_bindings.sh"
-ssh pipol pipol-sub esn amd64-linux-debian-lenny.dd.gz none 02:00 "~/Experimental_bindings.sh"
-
-#Debian Lenny 6.0
-ssh pipol pipol-sub esn amd64_2010-linux-debian-squeeze.dd.gz none 02:00 "~/Experimental_bindings.sh"
-ssh pipol pipol-sub esn i386_2010-linux-debian-squeeze.dd.gz none 02:00 "~/Experimental_bindings.sh"
-
-#Debian Testing
-ssh pipol pipol-sub esn i386-linux-debian-testing none 02:00 "~/Experimental_bindings.sh"
-ssh pipol pipol-sub esn amd64-linux-debian-testing none 02:00 "~/Experimental_bindings.sh"
\ No newline at end of file
diff --git a/buildtools/pipol/install_gtnets.sh b/buildtools/pipol/install_gtnets.sh
deleted file mode 100644 (file)
index fe015eb..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-SYSTEM=`uname`
-if [ $SYSTEM = Linux ] ; then
-       if [ x$1 != x ]  ; then
-               prefix=$1;
-       fi
-       
-       if [ -e $prefix/lib ] ; then
-               echo -n ""
-       else    
-               echo "Creating directory $prefix/lib";
-               mkdir -p $prefix/lib;
-       fi
-       
-       if [ -e $prefix/include/gtnets ] ; then
-               echo -n "";
-       else    
-               echo "Creating directory $prefix/include/gtnets";
-               mkdir -p $prefix/include/gtnets;
-       fi
-       
-       localdir=`pwd`;
-       cd $prefix;
-       prefix=`pwd`;
-       cd $localdir;
-       echo "Install to prefix = $prefix";
-       
-       echo "Downloading GTNetS from SVN SimGrid's repository";
-       svn checkout svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/GTNetS/ --quiet
-       cd GTNetS
-       echo "Uncompressing package";
-       unzip gtnets-current.zip > /dev/null
-       tar zxvf gtnets-current-patch.tgz  > /dev/null
-       cd gtnets-current
-       cat ../00*.patch | patch -p1 > /dev/null
-       
-       ARCH_32=`uname -m | cut -d'_' -f2`
-       
-       if [ x$ARCH_32 = x64 ] ; then #only if 64 bit processor family
-       cat ../AMD64-FATAL-Removed-DUL_SIZE_DIFF-Added-fPIC-compillin.patch | patch -p1 > /dev/null
-       fi
-       
-       ln -sf Makefile.linux Makefile
-       echo "Creating dependencies";
-       make -j 3 depend > /dev/null
-       echo "Compiling GTNetS debug libs";
-       make -j 3 debug > /dev/null 2>&1
-       echo "Compiling GTNetS optimal libs";
-       make -j 3 opt > /dev/null 2>&1
-       wait
-       
-       cd ../../
-       
-       echo "Copying files to $prefix/lib";
-       cp -fr ./GTNetS/gtnets-current/*.so $prefix/lib/
-       ln -sf $prefix/lib/libgtsim-opt.so $prefix/lib/libgtnets.so
-       
-       echo "Copying files to $prefix/include/gtnets";
-       cp -fr ./GTNetS/gtnets-current/SRC/*.h $prefix/include/gtnets
-       wait
-       
-       echo "Done with gtnets installation";
-       rm -rf ./GTNetS
-fi
\ No newline at end of file
diff --git a/buildtools/pipol/install_ns3.sh b/buildtools/pipol/install_ns3.sh
deleted file mode 100644 (file)
index 0cfed93..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#Need python python-dev
-sudo apt-get install python python-dev
-       
-SYSTEM=`uname`
-if [ $SYSTEM = Linux ] ; then
-       if [ x$1 != x ]  ; then
-               prefix=$1;
-       fi
-       
-       if [ -e $prefix ] ; then
-               echo -n ""
-       else    
-               echo "Creating directory $prefix"
-               mkdir -p $prefix;
-       fi
-       
-       if [ -e $prefix/lib ] ; then
-               echo -n ""
-       else    
-               echo "Creating directory $prefix/lib"
-               mkdir -p $prefix/lib;
-       fi
-       
-       if [ -e $prefix/include/ns3 ] ; then
-               echo -n ""
-       else    
-               echo "Creating directory $prefix/include/ns3"
-               mkdir -p $prefix/include/ns3;
-       fi
-       
-       if [ -e $prefix/doc/html ] ; then
-               echo -n ""
-       else    
-               echo "Creating directory $prefix/doc/html"
-               mkdir -p $prefix/doc/html;
-       fi
-       
-       localdir=`pwd`
-       cd $prefix
-       prefix=`pwd`
-       cd $localdir
-       echo "Install to prefix = $prefix"
-       
-       echo "Downloading NS3"
-       wget http://ns-3.googlecode.com/files/ns-allinone-3.10.tar.bz2
-       
-       echo "Uncompressing package";
-       tar -xvjf ns-allinone-3.10.tar.bz2
-       rm -rf ns-allinone-3.10.tar.bz2
-       cd ns-allinone-3.10/ns-3.10
-       
-       ./waf configure
-       ./waf
-       ./waf --doxygen
-       
-       cp -f build/debug/libns3.so $prefix/lib/libns3.so
-       cp -f build/debug/ns3/* $prefix/include/ns3/
-       cp -f doc/html/* $prefix/doc/html/
-fi
\ No newline at end of file
diff --git a/buildtools/pipol/pre-simgrid.sh b/buildtools/pipol/pre-simgrid.sh
deleted file mode 100644 (file)
index 7d042f8..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-
-set -e
-
-rm -rf ~/.pipol/log/*
-
-#if [ -e ~/version/bckup_version ] ; then
-#      svn cleanup version/
-#      cd ~/version
-#      svn up README --quiet
-#else
-#      if [ -e ~/version ] ; then
-#              svn cleanup version/
-#              echo "0000P" > ~/version/bckup_version
-#      else
-#              mkdir ~/version
-#              echo "0000P" > ~/version/bckup_version
-#      fi
-#      cd ~/
-#      svn checkout svn://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk ~/version --depth empty --quiet
-#
-#      cd ~/version
-#      svn up README --quiet
-#fi
-
-#old_version=`cat bckup_version`
-#new_version=`svnversion`
-Date=`date`
-
-echo date : $date
-#echo version old : $old_version
-#echo version svn : $new_version
-#echo `svnversion` > bckup_version
-
-#if [ "$old_version" = "$new_version" ] ; then
-#      echo "matches"  
-#      exit 1
-#else
-#      echo "not matches"
-       exit 0
-#fi
diff --git a/buildtools/pipol/rc.debian b/buildtools/pipol/rc.debian
deleted file mode 100644 (file)
index 67e8688..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-sudo aptitude update
-
-sudo aptitude -y install cmake
-sudo aptitude -y install default-jdk
-sudo aptitude -y install swig
-sudo aptitude -y install f2c
-sudo aptitude -y install g++
-sudo aptitude -y install gcc
-sudo aptitude -y install git
-sudo aptitude -y install git-core
-sudo aptitude -y install graphviz-dev graphviz
-sudo aptitude -y install libboost-dev
-sudo aptitude -y install liblua5.1-dev lua5.1
-sudo aptitude -y install libunwind7-dev
-sudo aptitude -y install make
-sudo aptitude -y install valgrind
-
-which_svn=`which svn`          #svn necessary
-which_gcc=`which gcc`          #gcc gcc necessary
-which_gpp=`which g++`          #gcc g++ necessary
-which_make=`which make`                #make necessary
-which_java=`which java`                #java optional
-which_swig=`which swig`                #swig optional
-which_lua=`which lua`          #lua
-which_cmake=`which cmake`      #cmake necessary
-which_unzip=`which unzip`      #unzip for gtnets
-which_wget=`which wget`                #wget for cmake
-which_dot=`which dot`          #dot for cgraph
-which_perl=`which perl`                #perl
-which_f2c=`which f2c`          #f2c
-which_gcov=`which gcov`     #gcov
-which_git=`which git`
-echo "DEBUT----------------------------------"
-echo $which_cmake
-echo $which_unzip
-echo $which_lua
-echo $which_java
-echo $which_swig
-echo $which_make
-echo $which_gcc
-echo $which_gpp
-echo $which_svn
-echo $which_dot
-echo $which_wget
-echo $which_perl
-echo $which_f2c
-echo $which_gcov
-echo $which_git
-echo "FIN------------------------------------"
diff --git a/buildtools/pipol/rc.fedora b/buildtools/pipol/rc.fedora
deleted file mode 100644 (file)
index 9c0f818..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-
-# find the package you need on https://admin.fedoraproject.org/pkgdb/
-
-sudo yum -y -q update
-
-sudo yum -y -q install boost-devel
-sudo yum -y -q install cmake
-sudo yum -y -q install f2c
-sudo yum -y -q install gcc
-sudo yum -y -q install git-core
-sudo yum -y -q install graphviz-dev graphviz
-sudo yum -y -q install java-1.6.0-openjdk
-sudo yum -y -q install swig
-sudo yum -y -q install libunwind libunwind-devel
-sudo yum -y -q install lua-devel lua
-sudo yum -y -q install make
-sudo yum -y -q install perl
-sudo yum -y -q install ruby ruby-devel
-sudo yum -y -q install unzip
-sudo yum -y -q install wget
-
-which_svn=`which svn`          #svn necessary
-which_gcc=`which gcc`          #gcc gcc necessary
-which_gpp=`which g++`          #gcc g++ necessary
-which_make=`which make`                #make necessary
-which_java=`which java`                #java optional
-which_swig=`which swig`                #swig optional
-which_lua=`which lua`          #lua
-which_cmake=`which cmake`      #cmake necessary
-which_unzip=`which unzip`      #unzip for gtnets
-which_wget=`which wget`                #wget for cmake
-which_dot=`which dot`          #dot for cgraph
-which_perl=`which perl`                #perl
-which_f2c=`which f2c`          #f2c
-which_gcov=`which gcov`     #gcov
-which_git=`which git`
-echo "DEBUT----------------------------------"
-echo $which_cmake
-echo $which_unzip
-echo $which_lua
-echo $which_java
-echo $which_swig
-echo $which_make
-echo $which_gcc
-echo $which_gpp
-echo $which_svn
-echo $which_dot
-echo $which_wget
-echo $which_perl
-echo $which_f2c
-echo $which_gcov
-echo $which_git
-echo "FIN------------------------------------"
diff --git a/buildtools/pipol/rc.mac b/buildtools/pipol/rc.mac
deleted file mode 100644 (file)
index 7538a6c..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-#sudo port install wget
-#sudo port install gcc46
-#sudo port install graphviz-devel
-#sudo port install lua
-#sudo port install swig
-#sudo port select bf2c
-
-sudo port install ruby19
-sudo ln -sf /opt/local/lib/libruby.1.9.1.dylib /usr/lib/libruby.dylib
-sudo ln -sf /opt/local/bin/ruby1.9 /usr/bin/ruby
-
-#sudo port select gcc mp-gcc46
-
-which_gcc=`which gcc`          #gcc gcc necessary
-which_gpp=`which g++`          #gcc g++ necessary
-which_make=`which make`                #make necessary
-which_java=`which java`                #java optional
-which_java=`which swig`                #swig optional
-which_lua=`which lua`          #lua
-which_cmake=`which cmake`      #cmake necessary
-which_unzip=`which unzip`      #unzip for gtnets
-which_wget=`which wget`                #wget for cmake
-which_dot=`which dot`          #dot for cgraph
-which_perl=`which perl`                #perl
-which_f2c=`which f2c`          #f2c
-which_gcov=`which gcov`     #gcov
-which_git=`which git`
-echo "DEBUT----------------------------------"
-echo $which_cmake
-echo $which_unzip
-echo $which_lua
-echo $which_java
-echo $which_swig
-echo $which_make
-echo $which_gcc
-echo $which_gpp
-echo $which_dot
-echo $which_wget
-echo $which_perl
-echo $which_f2c
-echo $which_gcov
-echo $which_git
-echo "FIN------------------------------------"
diff --git a/buildtools/pipol/rc.ubuntu b/buildtools/pipol/rc.ubuntu
deleted file mode 100644 (file)
index 19658e8..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-
-sudo apt-get update
-
-sudo apt-get -y -qq install cmake
-sudo apt-get -y -qq install default-jdk
-sudo apt-get -y -qq install swig
-sudo apt-get -y -qq install f2c
-sudo apt-get -y -qq install g++
-sudo apt-get -y -qq install gcc
-sudo apt-get -y -qq install git-core
-sudo apt-get -y -qq install graphviz-dev graphviz
-sudo apt-get -y -qq install libboost-dev
-sudo apt-get -y -qq install liblua5.1-dev lua5.1
-sudo apt-get -y -qq install libunwind7-dev
-sudo apt-get -y -qq install make
-sudo apt-get -y -qq install perl
-sudo apt-get -y -qq install unzip
-sudo apt-get -y -qq install valgrind
-sudo apt-get -y -qq install wget
-
-if [ $PIPOL_IMAGE == "i386-linux-ubuntu-lucid.dd.gz" ]; then
-  wget http://mirror.ovh.net/ubuntu//pool/universe/libu/libunwind/libunwind7_0.99-0.3ubuntu1_i386.deb
-  sudo dpkg -i libunwind7_0.99-0.3ubuntu1_i386.deb
-fi
-
-if [ $PIPOL_IMAGE == "amd64-linux-ubuntu-lucid.dd.gz" ]; then
-  wget http://mirror.ovh.net/ubuntu//pool/universe/libu/libunwind/libunwind7_0.99-0.3ubuntu1_amd64.deb
-  sudo dpkg -i libunwind7_0.99-0.3ubuntu1_amd64.deb
-fi
-
-which_svn=`which svn`          #svn necessary
-which_gcc=`which gcc`          #gcc gcc necessary
-which_gpp=`which g++`          #gcc g++ necessary
-which_make=`which make`                #make necessary
-which_java=`which java`                #java optional
-which_swig=`which swig`                #swig optional
-which_lua=`which lua`          #lua
-which_cmake=`which cmake`      #cmake necessary
-which_unzip=`which unzip`      #unzip for gtnets
-which_wget=`which wget`                #wget for cmake
-which_dot=`which dot`          #dot for cgraph
-which_perl=`which perl`                #perl
-which_f2c=`which f2c`          #f2c
-which_gcov=`which gcov`     #gcov
-which_git=`which git`
-echo "DEBUT----------------------------------"
-echo $which_cmake
-echo $which_unzip
-echo $which_lua
-echo $which_java
-echo $which_swig
-echo $which_make
-echo $which_gcc
-echo $which_gpp
-echo $which_svn
-echo $which_dot
-echo $which_wget
-echo $which_perl
-echo $which_f2c
-echo $which_gcov
-echo $which_git
-echo "FIN------------------------------------"
diff --git a/buildtools/pipol/rc.windows b/buildtools/pipol/rc.windows
deleted file mode 100644 (file)
index a25ecea..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-which_svn=`which svn`          #svn necessary
-which_gcc=`which gcc`          #gcc gcc necessary
-which_gpp=`which g++`          #gcc g++ necessary
-which_make=`which gmake`               #make necessary
-which_cmake=`which cmake`      #cmake necessary
-which_perl=`which perl`                #perl
-which_git=`which git`
-
-echo "DEBUT----------------------------------"
-echo $which_cmake
-echo $which_make
-echo $which_gcc
-echo $which_gpp
-echo $which_svn
-echo $which_perl
-echo $which_git
-echo $PATH
-echo "FIN------------------------------------"
\ No newline at end of file
diff --git a/buildtools/pipol/ruby.pl b/buildtools/pipol/ruby.pl
deleted file mode 100644 (file)
index d27264c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/perl -w
-use strict;
-my($ruby_version);
-if( -e "/usr/bin/apt-get")
-{
-       $ruby_version = `apt-cache search ruby1.9.1-dev`;
-       
-       if( $ruby_version=~ /^$/){
-       $ruby_version = `apt-cache search ruby1.9-dev`;
-       }
-       
-       if( $ruby_version=~ /^$/){
-       return;
-       }
-       
-       $ruby_version =~ s/-dev.*//g;
-       chomp $ruby_version;
-       
-       print "ruby to install $ruby_version $ruby_version-dev\n";
-       `sudo apt-get install -y $ruby_version $ruby_version-dev`;
-       `sudo ln -sf /usr/bin/$ruby_version /usr/bin/ruby`;
-       
-       $ruby_version=~ s/-dev//g;
-       $ruby_version=~ s/ruby/ruby\*/g;
-       my($ruby_lib)=`ls /usr/lib/lib$ruby_version.so`;
-       chomp $ruby_lib;
-       `sudo ln -sf "$ruby_lib" /usr/lib/libruby.so`;
-}
-
-$ruby_version=`ruby --version`;
-print "ruby = $ruby_version";
-print "libruby = ".`ls /usr/lib/libruby.so`;
\ No newline at end of file
index e40c12c..45dafd5 100644 (file)
@@ -1005,7 +1005,7 @@ HTML_COLORSTYLE_GAMMA  = 80
 # page will contain the date and time when the page was generated. Setting
 # this to NO can help when comparing the output of multiple runs.
 
-HTML_TIMESTAMP         = YES
+HTML_TIMESTAMP         = NO
 
 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
 # documentation will contain sections that can be hidden and shown after the
index 9b566d7..dcb95b9 100644 (file)
@@ -65,7 +65,7 @@ int main(int argc, char *argv[]) {
 \section options_model Configuring the platform models
 
 \anchor options_storage_model
-\anchor options_vm_workstation_model
+\anchor options_vm_model
 \subsection options_model_select Selecting the platform models
 
 SimGrid comes with several network, CPU and storage models built in, and you
@@ -76,7 +76,7 @@ you a short description of all possible values. Also, \c --help-models
 should provide information about all models for all existing resources.
    - \b network/model: specify the used network model
    - \b cpu/model: specify the used CPU model
-   - \b workstation/model: specify the used workstation model
+   - \b host/model: specify the used host model
    - \b storage/model: specify the used storage model (there is currently only one such model - this option is hence only useful for future releases)
    - \b vm_workstation/model: specify the workstation model for virtual machines (there is currently only one such model - this option is hence only useful for future releases)
 
@@ -126,20 +126,20 @@ additional configuration flags".
 Concerning the CPU, we have only one model for now:
   - \b Cas01: Simplistic CPU model (time=size/power)
 
-The workstation concept is the aggregation of a CPU with a network
+The host concept is the aggregation of a CPU with a network
 card. Three models exists, but actually, only 2 of them are
 interesting. The "compound" one is simply due to the way our internal
 code is organized, and can easily be ignored. So at the end, you have
-two workstation models: The default one allows to aggregate an
+two host models: The default one allows to aggregate an
 existing CPU model with an existing network model, but does not allow
 parallel tasks because these beasts need some collaboration between
 the network and CPU model. That is why, ptask_07 is used by default
 when using SimDag.
-  - \b default: Default workstation model. Currently, CPU:Cas01 and
+  - \b default: Default host model. Currently, CPU:Cas01 and
     network:LV08 (with cross traffic enabled)
-  - \b compound: Workstation model that is automatically chosen if
+  - \b compound: Host model that is automatically chosen if
     you change the network and CPU models
-  - \b ptask_L07: Workstation model somehow similar to Cas01+CM02 but
+  - \b ptask_L07: Host model somehow similar to Cas01+CM02 but
     allowing parallel tasks
 
 \subsection options_generic_plugin Plugins
@@ -268,7 +268,7 @@ available in <tt>examples/msg/gtnets/crosstraffic-p.xml</tt>.
 This is activated through the \b network/crosstraffic item, that
 can be set to 0 (disable this feature) or 1 (enable it).
 
-Note that with the default workstation model this option is activated by default.
+Note that with the default host model this option is activated by default.
 
 \subsubsection options_model_network_coord Coordinated-based network models
 
@@ -1082,6 +1082,8 @@ silently overflow on other parts of the memory.
 - \c gtnets/jitter: \ref options_pls
 - \c gtnets/jitter_seed: \ref options_pls
 
+- \c host/model: \ref options_model_select
+
 - \c maxmin/precision: \ref options_model_precision
 
 - \c msg/debug_multiple_use: \ref options_msg_debug_multiple_use
@@ -1147,7 +1149,6 @@ silently overflow on other parts of the memory.
 - \c verbose-exit: \ref options_generic_exit
 
 - \c vm_workstation/model: \ref options_vm_workstation_model
-- \c workstation/model: \ref options_model_select
 
 \subsection options_index_smpi_coll Index of SMPI collective algorithms options
 
index 6d99c90..7130950 100644 (file)
@@ -1191,7 +1191,7 @@ information.
 <config id="General">
        <prop id="maxmin/precision" value="0.000010"></prop>
        <prop id="cpu/optim" value="TI"></prop>
-       <prop id="workstation/model" value="compound"></prop>
+       <prop id="host/model" value="compound"></prop>
        <prop id="network/model" value="SMPI"></prop>
        <prop id="path" value="~/"></prop>
        <prop id="smpi/bw_factor" value="65472:0.940694;15424:0.697866;9376:0.58729"></prop>
@@ -1535,7 +1535,7 @@ In SURF, we attach callbacks to the different events by initializing the
 pointer functions to some the right surf functions. Since there can be
 more than one callback attached to the same event (if more than one
 model is in use, for example), they are stored in a dynar. Example in
-workstation_ptask_L07.c:
+host_ptask_L07.c:
 \verbatim
   /* Adding callback functions */
   surf_parse_reset_parser();
index 3f7bae7..387a1ef 100644 (file)
@@ -5,19 +5,19 @@ $ java -classpath ${classpath:=.} cloud/migration/Main ${srcdir:=.}/../platforms
 > [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] This example evaluates the migration time of a VM in presence of collocated VMs on the source and the dest nodes
 > [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] The migrated VM has a memory intensity rate of 70% of the network BW and a cpu load of 90% "(see cloudcom 2013 paper "Adding a Live Migration Model Into SimGrid" for further information) 
 > [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] Load of collocated VMs fluctuate between 0 and 90% in order to create a starvation issue and see whether it impacts or not the migration time
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm0)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm1)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm2)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm3)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm4)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm5)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm6)@PM(host0) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm7)@PM(host1) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm8)@PM(host1) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm9)@PM(host1) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm10)@PM(host1) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm11)@PM(host1) with 0 mounted disks
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm12)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm0)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm1)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm2)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm3)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm4)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm5)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm6)@PM(host0) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm7)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm8)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm9)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm10)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm11)@PM(host1) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm12)@PM(host1) with 0 mounted disks
 > [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] Round trip of VM1 (load 90%)
 > [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO]      - Launch migration from host 0 to host 1
 > [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] Start migration of VM vm0 to host1
index ff26d50..15fef7f 100644 (file)
@@ -10,6 +10,7 @@ import org.simgrid.msg.HostNotFoundException;
 import org.simgrid.msg.Msg;
 import org.simgrid.msg.TimeoutException;
 import org.simgrid.msg.TransferFailureException;
+import org.simgrid.msg.NativeException;
 import org.simgrid.msg.Process;
 
 import master_slave_bypass.FinalizeTask;
@@ -18,7 +19,7 @@ public class Slave extends Process {
        public Slave(String hostname, String name) throws HostNotFoundException {
                super(hostname, name);
        }
-       public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
+       public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException, NativeException {
        Msg.info("Slave Hello!");
        FinalizeTask task = new FinalizeTask();
        Msg.info("Send finalize!");
index ab99898..cd731e6 100644 (file)
@@ -12,6 +12,7 @@ import org.simgrid.msg.MsgException;
 import org.simgrid.msg.Task;
 import org.simgrid.msg.TimeoutException;
 import org.simgrid.msg.TransferFailureException;
+import org.simgrid.msg.NativeException;
 import org.simgrid.msg.Process;
 
 import master_slave_kill.FinalizeTask;
@@ -20,7 +21,7 @@ public class Slave extends Process {
        public Slave(String hostname, String name) throws HostNotFoundException {
                super(hostname, name);
        }
-       public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException {
+       public void main(String[] args) throws TransferFailureException, HostFailureException, TimeoutException, NativeException {
        Msg.info("Slave Hello!");
        
        FinalizeTask task = new FinalizeTask();
index 596d2bc..4fceb61 100644 (file)
@@ -1,7 +1,7 @@
 #! tesh
 
-$ java -classpath ${classpath:=.} surfCpuModel/TestCpuModel ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/surfCpuModel/surfCpuModelDeployment.xml --cfg=workstation/model:compound
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ java -classpath ${classpath:=.} surfCpuModel/TestCpuModel ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/surfCpuModel/surfCpuModelDeployment.xml --cfg=host/model:compound
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [jmsg/INFO] Using regular java threads. Coroutines could speed your simulation up.
 > [0.000000] [jmsg/INFO] Initialize Cpu Constant Model
 > [0.000000] [jmsg/INFO] New Cpu(Tremblay, 9.8095E7, 1.0)
index 82cb0f0..2a7add2 100644 (file)
@@ -2,9 +2,11 @@ cmake_minimum_required(VERSION 2.6)
 
 set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
 add_executable(actions actions.c)
+add_executable(storage_actions storage_actions.c)
 
 ### Add definitions for compile
 target_link_libraries(actions simgrid)
+target_link_libraries(storage_actions simgrid)
 
 set(tesh_files
   ${tesh_files}
@@ -15,11 +17,13 @@ set(xml_files
   ${xml_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/deployment_split.xml
   ${CMAKE_CURRENT_SOURCE_DIR}/deployment.xml
+  ${CMAKE_CURRENT_SOURCE_DIR}/storage_deployment.xml
   PARENT_SCOPE
   )
 set(examples_src
   ${examples_src}
   ${CMAKE_CURRENT_SOURCE_DIR}/actions.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/storage_actions.c
   PARENT_SCOPE
   )
 set(bin_files
@@ -28,6 +32,7 @@ set(bin_files
   )
 set(txt_files
   ${txt_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/actions_io.txt
   ${CMAKE_CURRENT_SOURCE_DIR}/actions_allReduce.txt
   ${CMAKE_CURRENT_SOURCE_DIR}/actions_barrier.txt
   ${CMAKE_CURRENT_SOURCE_DIR}/actions_bcast.txt
diff --git a/examples/msg/actions/actions_io.txt b/examples/msg/actions/actions_io.txt
new file mode 100644 (file)
index 0000000..cc9142a
--- /dev/null
@@ -0,0 +1,3 @@
+p0 open /home/lib/libsimgrid.so.3.6.2  
+p0 read /home/lib/libsimgrid.so.3.6.2 12710497
+p0 close /home/lib/libsimgrid.so.3.6.2
diff --git a/examples/msg/actions/storage_actions.c b/examples/msg/actions/storage_actions.c
new file mode 100644 (file)
index 0000000..17758e4
--- /dev/null
@@ -0,0 +1,144 @@
+/* Copyright (c) 2015. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "simgrid/msg.h"
+#include "xbt.h"                /* calloc, printf */
+#include <xbt/replay.h>
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(storage_actions, "Messages specific for this example");
+
+static xbt_dict_t opened_files = NULL;
+
+#define ACT_DEBUG(...) \
+  if (XBT_LOG_ISENABLED(storage_actions, xbt_log_priority_verbose)) {  \
+    char *NAME = xbt_str_join_array(action, " ");              \
+    XBT_DEBUG(__VA_ARGS__);                                    \
+    xbt_free(NAME);                                            \
+  } else ((void)0)
+
+static void log_action(const char *const *action, double date)
+{
+  if (XBT_LOG_ISENABLED(storage_actions, xbt_log_priority_verbose)) {
+    char *name = xbt_str_join_array(action, " ");
+    XBT_VERB("%s %f", name, date);
+    xbt_free(name);
+  }
+}
+
+static msg_file_t get_file_descriptor(const char *file_name){
+  char full_name[1024];
+  msg_file_t file = NULL;
+
+  sprintf(full_name, "%s:%s", MSG_process_get_name(MSG_process_self()), file_name);
+
+  file = (msg_file_t) xbt_dict_get_or_null(opened_files, full_name);
+  return file;
+}
+
+static sg_size_t parse_size(const char *string){
+  sg_size_t size;
+  char *endptr;
+  
+  size = strtoul(string, &endptr, 10);
+  if (*endptr != '\0')
+    THROWF(unknown_error, 0, "%s is not a long unsigned int (a.k.a. sg_size_t)", string);
+  return size;
+}
+
+
+static void action_open(const char *const *action) {
+  const char *file_name = action[2];
+  char full_name[1024];
+  msg_file_t file = NULL;
+  double clock = MSG_get_clock();       /* this "call" is free thanks to inlining */
+
+  sprintf(full_name, "%s:%s", MSG_process_get_name(MSG_process_self()), 
+         file_name);
+
+  ACT_DEBUG("Entering Open: %s (filename: %s)", NAME, file_name);
+  file = MSG_file_open(file_name, NULL);
+  xbt_dict_set(opened_files, full_name, file, NULL);
+  
+  log_action(action, MSG_get_clock() - clock);
+}
+
+static void action_read(const char *const *action) {
+  const char *file_name = action[2];
+  const char *size_str = action[3];
+  msg_file_t file = NULL;
+  sg_size_t size = parse_size(size_str);
+  
+  double clock = MSG_get_clock();       /* this "call" is free thanks to inlining */
+
+  file = get_file_descriptor(file_name);
+  
+  ACT_DEBUG("Entering Read: %s (size: %llu)", NAME, size);
+  MSG_file_read(file, size);
+
+  log_action(action, MSG_get_clock() - clock);
+}
+
+static void action_close(const char *const *action) {
+  const char *file_name = action[2];
+  msg_file_t file;
+  double clock = MSG_get_clock();       /* this "call" is free thanks to inlining */
+
+  file = get_file_descriptor(file_name);
+
+  ACT_DEBUG("Entering Close: %s (filename: %s)", NAME, file_name);
+  MSG_file_close(file);
+
+  log_action(action, MSG_get_clock() - clock);
+}
+
+int main(int argc, char *argv[]) {
+  msg_error_t res = MSG_OK;
+
+  /* Check the given arguments */
+  MSG_init(&argc, argv);
+  /* Explicit initialization of the action module is required now*/
+  MSG_action_init();
+
+  if (argc < 3) {
+    printf("Usage: %s platform_file deployment_file [action_files]\n", argv[0]);
+    printf
+        ("example: %s msg_platform.xml msg_deployment.xml actions # if all actions are in the same file\n",
+         argv[0]);
+    printf
+        ("example: %s msg_platform.xml msg_deployment.xml # if actions are in separate files, specified in deployment\n",
+         argv[0]);
+    exit(1);
+  }
+
+  /*  Simulation setting */
+  MSG_create_environment(argv[1]);
+
+  /* No need to register functions as in classical MSG programs: the actions get started anyway */
+  MSG_launch_application(argv[2]);
+
+  /*   Action registration */
+  xbt_replay_action_register("open", action_open);
+  xbt_replay_action_register("read", action_read);
+  xbt_replay_action_register("close", action_close);
+  
+  if (!opened_files)
+    opened_files = xbt_dict_new_homogeneous(NULL);
+  /* Actually do the simulation using MSG_action_trace_run */
+  res = MSG_action_trace_run(argv[3]);  // it's ok to pass a NULL argument here
+
+  XBT_INFO("Simulation time %g", MSG_get_clock());
+
+  if (opened_files)
+    xbt_dict_free(&opened_files);
+
+  /* Explicit finalization of the action module is required now*/
+  MSG_action_exit();
+
+  return !!res;
+}                               /* end_of_main */
diff --git a/examples/msg/actions/storage_deployment.xml b/examples/msg/actions/storage_deployment.xml
new file mode 100644 (file)
index 0000000..96d3d5f
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+  <process host="denise" function="p0"/>
+</platform>
index 05a336d..3358022 100644 (file)
@@ -86,24 +86,6 @@ int main(int argc, char *argv[])
 
   MSG_init(&argc, argv);
 
-  /*if (argc <= 3) {
-    XBT_CRITICAL("Usage: %s platform_file deployment_file <model>\n",
-              argv[0]);
-    XBT_CRITICAL
-        ("example: %s msg_platform.xml msg_deployment.xml KCCFLN05_Vegas\n",
-         argv[0]);
-    exit(1);
-  }*/
-
-  /* Options for the workstation/model:
-
-     KCCFLN05              => for maxmin
-     KCCFLN05_proportional => for proportional (Vegas)
-     KCCFLN05_Vegas        => for TCP Vegas
-     KCCFLN05_Reno         => for TCP Reno
-   */
-  //MSG_config("workstation/model", argv[3]);
-
   res = test_all(argv[1], argv[2]);
 
   XBT_INFO("Total simulation time: %e", MSG_get_clock());
index 7c81515..e60689d 100644 (file)
@@ -460,7 +460,6 @@ $ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT -nb_bits=6 ${srcdir:=.}/../../platfor
 $ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT ${srcdir:=.}/../../platforms/cluster.xml ${srcdir:=.}/chord10.xml --cfg=network/crosstraffic:0 --log=msg_chord.thres:verbose "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:Constant
 > [   0.000000] (0:@) Configuration change: Set 'network/crosstraffic' to '0'
 > [   0.000000] (0:@) Configuration change: Set 'network/model' to 'Constant'
-> [   0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [   0.000000] (10:node@node-9.acme.org) Joining the ring with id 2015253, knowing node 1319738
 > [   0.000000] (1:node@node-0.acme.org) My finger table:
 > [   0.000000] (1:node@node-0.acme.org) Start | Succ
index 051b60c..08530a2 100644 (file)
@@ -458,7 +458,6 @@ $ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT -nb_bits=6 ${srcdir:=.}/../../platfor
 ! output sort
 $ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT ${srcdir:=.}/../../platforms/cluster.xml ${srcdir:=.}/chord10.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:Constant
 > [   0.000000] (0:@) Configuration change: Set 'network/model' to 'Constant'
-> [   0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [   0.000000] (10:node@node-9.acme.org) Joining the ring with id 2015253, knowing node 1319738
 > [   0.000000] (1:node@node-0.acme.org) My finger table:
 > [   0.000000] (1:node@node-0.acme.org) Start | Succ
index 7b9b38c..3d01d42 100644 (file)
@@ -5,11 +5,11 @@ p Testing the Cloud API with a simple masterslave
 $ $SG_TEST_EXENV ${bindir:=.}/master_worker_vm$EXEEXT --log=no_loc ${srcdir:=.}/../../platforms/platform.xml
 > [Jacquelin:master:(1) 0.000000] [msg_test/INFO] # Launch 2 VMs
 > [Jacquelin:master:(1) 0.000000] [msg_test/INFO] create VM00 on PM(Intel)
-> [0.000000] [surf_vm_workstation/INFO] Create VM(VM00)@PM(Intel) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(VM00)@PM(Intel) with 0 mounted disks
 > [Jacquelin:master:(1) 0.000000] [msg_test/INFO] put a process (WRK00) on VM00
 > [VM00:WRK00:(2) 0.000000] [msg_test/INFO] WRK00 is listenning on mailbox(MBOX:WRK00)
 > [Jacquelin:master:(1) 0.000000] [msg_test/INFO] create VM01 on PM(Provost)
-> [0.000000] [surf_vm_workstation/INFO] Create VM(VM01)@PM(Provost) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(VM01)@PM(Provost) with 0 mounted disks
 > [Jacquelin:master:(1) 0.000000] [msg_test/INFO] put a process (WRK01) on VM01
 > [VM01:WRK01:(3) 0.000000] [msg_test/INFO] WRK01 is listenning on mailbox(MBOX:WRK01)
 > [Jacquelin:master:(1) 0.000000] [msg_test/INFO] # Send a task to 2 worker process
index e98f696..f0e9258 100644 (file)
@@ -15,23 +15,23 @@ $ $SG_TEST_EXENV ${bindir:=.}/simple_vm$EXEEXT --log=no_loc ${srcdir:=.}/../../p
 > [Fafard:master_:(1) 6.000000] [msg_test/INFO] ## Test 1 (ended)
 > [Fafard:master_:(1) 6.000000] [msg_test/INFO] ## Test 2 (started): check impact of running a task inside a VM (there is no degradation for the moment)
 > [Fafard:master_:(1) 6.000000] [msg_test/INFO] ### Put a VM on a PM, and put a task to the VM
-> [6.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [6.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
 > [VM0:compute:(7) 6.013107] [msg_test/INFO] VM0:compute task executed 0.0131068
 > [Fafard:master_:(1) 8.000000] [msg_test/INFO] ## Test 2 (ended)
 > [Fafard:master_:(1) 8.000000] [msg_test/INFO] ## Test 3 (started): check impact of running a task collocated with a VM (there is no VM noise for the moment)
 > [Fafard:master_:(1) 8.000000] [msg_test/INFO] ### Put a VM on a PM, and put a task to the PM
-> [8.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [8.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
 > [Fafard:compute:(8) 8.013107] [msg_test/INFO] Fafard:compute task executed 0.0131068
 > [Fafard:master_:(1) 10.000000] [msg_test/INFO] ## Test 3 (ended)
 > [Fafard:master_:(1) 10.000000] [msg_test/INFO] ## Test 4 (started): compare the cost of running two tasks inside two different VMs collocated or not (for the moment, there is no degradation for the VMs. Hence, the time should be equals to the time of test 1
 > [Fafard:master_:(1) 10.000000] [msg_test/INFO] ### Put two VMs on a PM, and put a task to each VM
-> [10.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
-> [10.000000] [surf_vm_workstation/INFO] Create VM(VM1)@PM(Fafard) with 0 mounted disks
+> [10.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [10.000000] [surf_vm/INFO] Create VM(VM1)@PM(Fafard) with 0 mounted disks
 > [VM0:compute:(9) 10.026214] [msg_test/INFO] VM0:compute task executed 0.0262137
 > [VM1:compute:(10) 10.026214] [msg_test/INFO] VM1:compute task executed 0.0262137
 > [Fafard:master_:(1) 12.000000] [msg_test/INFO] ### Put a VM on each PM, and put a task to each VM
-> [12.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
-> [12.000000] [surf_vm_workstation/INFO] Create VM(VM1)@PM(Tremblay) with 0 mounted disks
+> [12.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [12.000000] [surf_vm/INFO] Create VM(VM1)@PM(Tremblay) with 0 mounted disks
 > [VM1:compute:(12) 12.010194] [msg_test/INFO] VM1:compute task executed 0.0101942
 > [VM0:compute:(11) 12.013107] [msg_test/INFO] VM0:compute task executed 0.0131068
 > [Fafard:master_:(1) 14.000000] [msg_test/INFO] ## Test 4 (ended)
@@ -42,33 +42,33 @@ $ $SG_TEST_EXENV ${bindir:=.}/simple_vm$EXEEXT --log=no_loc ${srcdir:=.}/../../p
 > [Tremblay:comm_rx:(18) 19.291085] [msg_test/INFO] Fafard:comm_tx to Tremblay:comm_rx => 0.291085 sec
 > [Tremblay:comm_rx:(16) 19.291085] [msg_test/INFO] Fafard:comm_tx to Tremblay:comm_rx => 0.291085 sec
 > [Fafard:master_:(1) 24.000000] [msg_test/INFO] ### Make a connection between PM0 and VM0@PM0
-> [24.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [24.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
 > [VM0:comm_rx:(20) 24.002265] [msg_test/INFO] Fafard:comm_tx to VM0:comm_rx => 0.00226529 sec
 > [Fafard:master_:(1) 29.000000] [msg_test/INFO] ### Make a connection between PM0 and VM0@PM1
-> [29.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
+> [29.000000] [surf_vm/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
 > [VM0:comm_rx:(22) 29.158397] [msg_test/INFO] Fafard:comm_tx to VM0:comm_rx => 0.158397 sec
 > [Fafard:master_:(1) 34.000000] [msg_test/INFO] ### Make two connections between PM0 and VM0@PM1
-> [34.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
+> [34.000000] [surf_vm/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
 > [VM0:comm_rx:(26) 34.291085] [msg_test/INFO] Fafard:comm_tx to VM0:comm_rx => 0.291085 sec
 > [VM0:comm_rx:(24) 34.291085] [msg_test/INFO] Fafard:comm_tx to VM0:comm_rx => 0.291085 sec
 > [Fafard:master_:(1) 39.000000] [msg_test/INFO] ### Make a connection between PM0 and VM0@PM1, and also make a connection between PM0 and PM1
-> [39.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
+> [39.000000] [surf_vm/INFO] Create VM(VM0)@PM(Tremblay) with 0 mounted disks
 > [Tremblay:comm_rx:(30) 39.291085] [msg_test/INFO] Fafard:comm_tx to Tremblay:comm_rx => 0.291085 sec
 > [VM0:comm_rx:(28) 39.291085] [msg_test/INFO] Fafard:comm_tx to VM0:comm_rx => 0.291085 sec
 > [Fafard:master_:(1) 44.000000] [msg_test/INFO] ### Make a connection between VM0@PM0 and PM1@PM1, and also make a connection between VM0@PM0 and VM1@PM1
-> [44.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
-> [44.000000] [surf_vm_workstation/INFO] Create VM(VM1)@PM(Tremblay) with 0 mounted disks
+> [44.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [44.000000] [surf_vm/INFO] Create VM(VM1)@PM(Tremblay) with 0 mounted disks
 > [VM1:comm_rx:(34) 44.291085] [msg_test/INFO] VM0:comm_tx to VM1:comm_rx => 0.291085 sec
 > [VM1:comm_rx:(32) 44.291085] [msg_test/INFO] VM0:comm_tx to VM1:comm_rx => 0.291085 sec
 > [Fafard:master_:(1) 49.000000] [msg_test/INFO] ## Test 5 (ended)
 > [Fafard:master_:(1) 49.000000] [msg_test/INFO] ## Test 6 (started): Check migration impact (not yet implemented neither on the CPU resource nor on the network one
 > [Fafard:master_:(1) 49.000000] [msg_test/INFO] ### Relocate VM0 between PM0 and PM1
-> [49.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [49.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
 > [Fafard:__pr_mig_tx:VM0(Fafard-Tremblay):(38) 49.010000] [msg_vm/WARNING] use the default max_downtime value 30ms
 > [Fafard:__pr_mig_tx:VM0(Fafard-Tremblay):(38) 49.010000] [msg_vm/INFO] Stage 1: Gonna send 1073741824
 > [Bourassa:comm_rx:(36) 49.204993] [msg_test/INFO] VM0:comm_tx to Bourassa:comm_rx => 0.204993 sec
 > [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(40) 191.674258] [msg_vm/WARNING] use the default max_downtime value 30ms
 > [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(40) 191.674258] [msg_vm/INFO] Stage 1: Gonna send 1073741824
-> [334.199056] [surf_vm_workstation/CRITICAL] FIXME: may need a proper handling, 1
+> [334.199056] [surf_vm/CRITICAL] FIXME: may need a proper handling, 1
 > [Fafard:master_:(1) 339.199251] [msg_test/INFO] ## Test 6 (ended)
 > [339.199251] [msg_test/INFO] Bye (simulation time 339.199)
index c4305ac..c0c543e 100644 (file)
@@ -3,7 +3,7 @@
 p Testing a vm with two successive tasks
 
 $ $SG_TEST_EXENV ${bindir:=.}/two_tasks_vm$EXEEXT ${srcdir:=.}/../../platforms/small_platform.xml
-> [0.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
 > [VM0:compute:(2) 0.000000] [msg_test/INFO] VM0:compute task 1 created 0
 > [Fafard:master_:(1) 0.000000] [msg_test/INFO] aTask remaining duration: 1e+09
 > [Fafard:master_:(1) 1.000000] [msg_test/INFO] aTask remaining duration: 9.23704e+08
index 5f5c408..9bcb300 100644 (file)
@@ -2,8 +2,8 @@
 
 p Testing dogbone communication pattern with GTNets model
 
-$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
 > [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
index 3f9b435..d8995ec 100644 (file)
@@ -2,8 +2,8 @@
 
 p Testing dogbone communication pattern with LV08 model
 
-$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'LV08'
 > [C1:slave:(3) 0.342000] [msg_test/INFO] WARNING FLOW[0] is limited by latency!!
index edeefec..e66c746 100644 (file)
@@ -2,8 +2,8 @@
 
 p Testing onelink communication pattern with GTNets model
 
-$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
 > [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
index 9c73c7f..1c431b4 100644 (file)
@@ -2,8 +2,8 @@
 
 p Testing onelink communication pattern with LV08 model
 
-$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=host/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'LV08'
 > [C1:slave:(2) 108.799652] [msg_test/INFO] ===> Estimated Bw of FLOW[1] : 9191.205854 ;  message from S1 to C1  with remaining : 0.000000
index 6c8182f..38f0446 100644 (file)
@@ -3,8 +3,8 @@
 p Testing waxman radom communication pattern with GTNets model, 200 nodes, 200 flows
 
 ! timeout 10
-$ gtnets/gtnets ${srcdir:=.}/gtnets/waxman-p.xml ${srcdir:=.}/gtnets/waxman-d.xml --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+$ gtnets/gtnets ${srcdir:=.}/gtnets/waxman-p.xml ${srcdir:=.}/gtnets/waxman-d.xml --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
 > [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
index 26da94d..987efc9 100644 (file)
@@ -206,8 +206,6 @@ msg_error_t test_all(const char *platform_file,
 {
   msg_error_t res = MSG_OK;
 
-  /* MSG_config("workstation/model", "GTNETS"); */
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 975b8a9..8cdcf4b 100644 (file)
@@ -2,10 +2,10 @@
 
 p Testing dogbone communication pattern with GTNets model
 
-$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_gtnets.trace --cfg=tracing/categorized:yes --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_gtnets.trace --cfg=tracing/categorized:yes --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'dogbone_gtnets.trace'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
 > [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
index 5c0e6cb..85784a7 100644 (file)
@@ -2,10 +2,10 @@
 
 p Testing dogbone communication pattern with LV08 model
 
-$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_lv08.trace --cfg=tracing/categorized:yes --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08
+$ gtnets/gtnets ${srcdir:=.}/gtnets/dogbone-p.xml ${srcdir:=.}/gtnets/dogbone-d.xml --cfg=tracing/filename:dogbone_lv08.trace --cfg=tracing/categorized:yes --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:LV08
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'dogbone_lv08.trace'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'LV08'
 > [C1:slave:(3) 0.342000] [msg_test/INFO] WARNING FLOW[0] is limited by latency!!
index 3941da6..a4a4abf 100644 (file)
@@ -2,10 +2,10 @@
 
 p Testing onelink communication pattern with GTNets model
 
-$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_gtnets.trace --cfg=tracing/categorized:yes --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_gtnets.trace --cfg=tracing/categorized:yes --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=host/model:GTNets
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'onelink_gtnets.trace'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
 > [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
index a12fd42..259f6e0 100644 (file)
@@ -2,10 +2,10 @@
 
 p Testing onelink communication pattern with LV08 model
 
-$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_lv08.trace --cfg=tracing/categorized:yes --cfg=workstation/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO
+$ gtnets/gtnets ${srcdir:=.}/gtnets/onelink-p.xml ${srcdir:=.}/gtnets/onelink-d.xml --cfg=tracing/filename:onelink_lv08.trace --cfg=tracing/categorized:yes --cfg=host/model:compound --cfg=cpu/model:Cas01  --cfg=network/model:LV08 2>&1 | grep --color=auto -v root/INFO | grep -v simix_network/INFO
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'onelink_lv08.trace'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'LV08'
 > [C1:slave:(2) 108.799652] [msg_test/INFO] ===> Estimated Bw of FLOW[1] : 9191.205854 ;  message from S1 to C1  with remaining : 0.000000
index 886a196..06320bc 100644 (file)
@@ -3,10 +3,10 @@
 p Testing waxman radom communication pattern with GTNets model, 200 nodes, 200 flows
 
 ! timeout 10
-$ gtnets/gtnets ${srcdir:=.}/gtnets/waxman-p.xml ${srcdir:=.}/gtnets/waxman-d.xml --cfg=tracing/filename:waxman_gtnets.trace --cfg=tracing/categorized:yes --cfg=workstation/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
+$ gtnets/gtnets ${srcdir:=.}/gtnets/waxman-p.xml ${srcdir:=.}/gtnets/waxman-d.xml --cfg=tracing/filename:waxman_gtnets.trace --cfg=tracing/categorized:yes --cfg=host/model:compound --cfg=cpu/model:Cas01 --cfg=network/model:GTNets
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'waxman_gtnets.trace'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'GTNets'
 > [0.000000] [surf_network_gtnets_interface/INFO] TCP window maximum size : 20000
index 4c446e8..e67e7dd 100644 (file)
@@ -150,7 +150,6 @@ msg_error_t test_all(const char *platform_file,
 {
   msg_error_t res = MSG_OK;
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 0eca928..138883e 100644 (file)
@@ -106,7 +106,6 @@ msg_error_t test_all(const char *platform_file,
 {
   msg_error_t res = MSG_OK;
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 7dca7de..b31c171 100644 (file)
@@ -137,7 +137,6 @@ msg_error_t test_all(const char *platform_file,
 {
   msg_error_t res = MSG_OK;
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 87b6823..98c025a 100644 (file)
@@ -4,7 +4,6 @@ p Testing a simple master/slave example application
 
 $ $SG_TEST_EXENV masterslave/masterslave_forwarder$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/masterslave/deployment_masterslave.xml --cfg=cpu_model:Cas01_IM
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu_model' to 'Cas01_IM'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 5 slaves and 20 tasks to process
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Sending "Task_0" to "Jupiter"
 > [Tremblay:master:(1) 0.165962] [msg_test/INFO] Sent
@@ -128,7 +127,6 @@ p Testing a master/slave example application with a forwarder module
 
 $ $SG_TEST_EXENV masterslave/masterslave_forwarder$EXEEXT ${srcdir:=.}/msg_platform.xml ${srcdir:=.}/masterslave/deployment_masterslave_forwarder.xml --cfg=cpu_model:Cas01_IM
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu_model' to 'Cas01_IM'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Jacquelin:master:(1) 0.000000] [msg_test/INFO] Got 5 slaves and 20 tasks to process
 > [Jacquelin:master:(1) 0.000000] [msg_test/INFO] Sending "Task_0" to "iRMX"
 > [Jacquelin:master:(1) 4.772530] [msg_test/INFO] Sent
@@ -277,7 +275,6 @@ $ $SG_TEST_EXENV masterslave/masterslave_forwarder$EXEEXT ${srcdir:=.}/msg_platf
 p Testing a simple master/slave example application handling failures
 
 $ masterslave/masterslave_failure$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${srcdir:=.}/small_platform_with_failures.xml ${srcdir:=.}/masterslave/deployment_masterslave.xml --cfg=path:${srcdir} --cfg=cpu_model:Cas01_IM
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [simix_process/WARNING] Cannot launch process 'slave' on failed host 'Fafard'
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 5 slave(s) :
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Jupiter
@@ -372,7 +369,6 @@ p Testing the bypassing of the flexml parser
 
 $ $SG_TEST_EXENV masterslave/masterslave_bypass --log=no_loc --cfg=cpu_model:Cas01_IM
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu_model' to 'Cas01_IM'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [surf_parse/WARNING] Bypassing the XML parser since surf_parse_open received a NULL pointer. If it is not what you want, go fix your code.
 > [host A:master:(1) 0.000000] [msg_test/INFO] Got 1 slave(s) :
 > [host A:master:(1) 0.000000] [msg_test/INFO]          host B
index c93afef..94063db 100644 (file)
@@ -290,6 +290,7 @@ $ ${bindir:=.}/masterslave_failure$EXEEXT --log=xbt_cfg.thres:critical --log=no_
 > [  0.000000] (1:master@Tremblay) Got 20 task to process :
 > [  1.000000] (0:@) Restart processes on host: Fafard
 > [  1.000000] (1:master@Tremblay) Mmh. Something went wrong with 'Jupiter'. Nevermind. Let's keep going!
+> [  1.000000] (3:slave@Jupiter) Gloups. The cpu on which I'm running just turned off!. See you!
 > [  2.000000] (0:@) Restart processes on host: Jupiter
 > [ 11.000000] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'Fafard'. Nevermind. Let's keep going!
 > [ 12.082474] (1:master@Tremblay) Send completed
index 1591b85..cc8398a 100644 (file)
@@ -183,7 +183,6 @@ msg_error_t test_all(const char *platform_file,
 {
   msg_error_t res = MSG_OK;
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 7b1b5f7..f6596ff 100644 (file)
@@ -14,6 +14,7 @@ $ masterslave/masterslave_failure$EXEEXT --log=xbt_cfg.thres:critical --log=no_l
 > [  0.000000] (1:master@Tremblay) Got 20 task to process :
 > [  1.000000] (0:@) Restart processes on host: Fafard
 > [  1.000000] (1:master@Tremblay) Mmh. Something went wrong with 'Jupiter'. Nevermind. Let's keep going!
+> [  1.000000] (3:slave@Jupiter) Gloups. The cpu on which I'm running just turned off!. See you!
 > [  2.000000] (0:@) Restart processes on host: Jupiter
 > [ 11.000000] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'Fafard'. Nevermind. Let's keep going!
 > [ 12.030928] (1:master@Tremblay) Send completed
index 43feb15..ad02729 100644 (file)
@@ -14,6 +14,7 @@ $ masterslave/masterslave_failure$EXEEXT --log=xbt_cfg.thres:critical --log=no_l
 > [  0.000000] (1:master@Tremblay) Got 20 task to process :
 > [  1.000000] (0:@) Restart processes on host: Fafard
 > [  1.000000] (1:master@Tremblay) Mmh. Something went wrong with 'Jupiter'. Nevermind. Let's keep going!
+> [  1.000000] (3:slave@Jupiter) Gloups. The cpu on which I'm running just turned off!. See you!
 > [  2.000000] (0:@) Restart processes on host: Jupiter
 > [ 11.000000] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'Fafard'. Nevermind. Let's keep going!
 > [ 12.082474] (1:master@Tremblay) Send completed
index 7754529..cf66fae 100644 (file)
@@ -185,7 +185,6 @@ msg_error_t test_all(const char *platform_file,
 {
   msg_error_t res = MSG_OK;
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 7a23c47..9639e6f 100644 (file)
@@ -110,7 +110,6 @@ int main(int argc, char *argv[])
   platform_file = argv[1];
   application_file = argv[2];
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index b9a8466..573276b 100644 (file)
@@ -5,7 +5,6 @@ p Testing a simple master/slave example application
 $ $SG_TEST_EXENV ./masterslave/masterslave_mailbox ${srcdir:=.}/../platforms/multicore_machine.xml ${srcdir:=.}/masterslave/deployment_masterslave_mailbox_multicore.xml --cfg=cpu/model:Cas01 --cfg=cpu/optim:Full
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/optim' to 'Full'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 6 slaves and 20 tasks to process
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Sending "Task_0" (of 20) to mailbox "slave-0"
 > [Tremblay:master:(1) 0.002203] [msg_test/INFO] Sending "Task_1" (of 20) to mailbox "slave-1"
index 7344039..c06d04b 100644 (file)
@@ -185,8 +185,6 @@ msg_error_t test_all(const char *platform_file,
 {
   msg_error_t res = MSG_OK;
 
-  /* MSG_config("workstation/model", "GTNETS"); */
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 077ae9f..5eab1f4 100644 (file)
@@ -4,21 +4,18 @@ p 3hosts 2links
 
 $ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3hosts_2links_d.xml --cfg=network/model:NS3
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Jupiter:slave:(2) 0.000249] [msg_test/INFO] FLOW[1] : Receive 100 bytes from Tremblay to Jupiter
 
 p 6hosts 3links
 
 $ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3links-d.xml --cfg=network/model:NS3
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Jupiter:slave:(2) 0.003027] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from Tremblay to Jupiter
 > [Ginette:slave:(4) 0.161074] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from Fafard to Ginette
 > [Lovelace:slave:(6) 1.256527] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from Bourassa to Lovelace
 
 $ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3links-d-timer.xml --cfg=network/model:NS3
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Jupiter:slave:(2) 0.003027] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from Tremblay to Jupiter
 > [Ginette:slave:(4) 0.161074] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from Fafard to Ginette
 > [Lovelace:slave:(6) 1.256527] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from Bourassa to Lovelace
@@ -28,12 +25,10 @@ p One cluster
 
 $ ns3/ns3 ${srcdir:=.}/examples/platforms/cluster.xml ${srcdir:=.}/examples/msg/ns3/One_cluster-d.xml --cfg=network/model:NS3
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [node-6.acme.org:slave:(2) 0.006755] [msg_test/INFO] FLOW[1] : Receive 100 bytes from node-2.acme.org to node-6.acme.org
 
 p Two clusters
 
 $ ns3/ns3 ${srcdir:=.}/examples/platforms/clusters_routing_full.xml ${srcdir:=.}/examples/msg/ns3/Two_clusters-d.xml --cfg=network/model:NS3
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [c-16.me:slave:(2) 0.012729] [msg_test/INFO] FLOW[1] : Receive 100 bytes from c-3.me to c-16.me
index 01d772d..bc3aef5 100644 (file)
@@ -77,7 +77,7 @@ msg_error_t test_all(const char *platform_file)
   xbt_dynar_t all_hosts;
   msg_host_t first_host;
 
-  MSG_config("workstation/model", "ptask_L07");
+  MSG_config("host/model", "ptask_L07");
   MSG_create_environment(platform_file);
 
   all_hosts = MSG_hosts_as_dynar();
index e346534..e54ff4a 100644 (file)
@@ -4,13 +4,13 @@ p Testing a simple master/slave example application
 
 ! output sort
 $ $SG_TEST_EXENV parallel_task/parallel_task$EXEEXT ${srcdir:=.}/../platforms/small_platform.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:@) surf_host_model_init_ptask_L07
 > [  0.009378] (1:test@Fafard) Goodbye now!
 > [  0.009378] (0:@) Simulation time 0.00937836
 
 ! output sort
 $ $SG_TEST_EXENV parallel_task/test_ptask$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/parallel_task/test_ptask_deployment.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:@) surf_host_model_init_ptask_L07
 > [ 20.625396] (1:execute@Ginette) execution_time=20.6254 
 > [ 83.232398] (2:redistribute@Ginette) redistribution_time=83.2324 
 > [ 83.232398] (0:@) Simulation time 83.2324
index 189a26c..dc0e965 100644 (file)
@@ -136,7 +136,7 @@ msg_error_t test_all(const char *platform_file,
   msg_error_t res = MSG_OK;
 
 
-  MSG_config("workstation/model", "ptask_L07");
+  MSG_config("host/model", "ptask_L07");
 
   /*  Simulation setting */
   MSG_create_environment(platform_file);
index b46d7ef..97b3292 100644 (file)
@@ -440,7 +440,6 @@ $ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT -nb_bits=6 ${srcdir:=.}/../msg_platfo
 ! output sort
 $ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT ${srcdir:=.}/../../platforms/cluster.xml ${srcdir:=.}/chord10.xml --log=msg_chord.thres:verbose "--log=root.fmt:[%11.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:Constant
 > [   0.000000] (0:@) Configuration change: Set 'network/model' to 'Constant'
-> [   0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [   0.000000] (10:node@node-9.acme.org) Joining the ring with id 2015253, knowing node 1319738
 > [   0.000000] (1:node@node-0.acme.org) My finger table:
 > [   0.000000] (1:node@node-0.acme.org) Start | Succ 
index 2c9c15d..1046db4 100644 (file)
@@ -162,23 +162,11 @@ int main(int argc, char *argv[])
   MSG_init(&argc, argv);
 
   if (argc != 3) {
-    XBT_CRITICAL("Usage: %s platform_file deployment_file <model>\n",
+    XBT_CRITICAL("Usage: %s platform_file deployment_file\n",
               argv[0]);
-    XBT_CRITICAL
-        ("example: %s msg_platform.xml msg_deployment.xml KCCFLN05_Vegas\n",
-         argv[0]);
-    exit(1);
+    xbt_die("example: %s msg_platform.xml msg_deployment.xml\n",argv[0]);
   }
 
-  /* Options for the workstation/model:
-
-     KCCFLN05              => for maxmin
-     KCCFLN05_proportional => for proportional (Vegas)
-     KCCFLN05_Vegas        => for TCP Vegas
-     KCCFLN05_Reno         => for TCP Reno
-   */
-  //MSG_config("workstation/model", argv[3]);
-
   res = test_all(argv[1], argv[2]);
 
   XBT_INFO("Total simulation time: %e", MSG_get_clock());
index 027f490..aa04542 100644 (file)
@@ -7,7 +7,6 @@ $ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/../platforms/small_platfo
 > [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'Cas01'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) test_all
-> [  0.000000] (0:@) Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [  0.000000] (1:sender@Tremblay) sender
 > [  0.000000] (1:sender@Tremblay) host = Jupiter
 > [  0.000000] (1:sender@Tremblay) task_la->data = 0.000000e+00
index 36814bc..03fc500 100644 (file)
@@ -3,8 +3,8 @@
 p Testing the surf network Reno fairness model using lagrangian approach
 
 ! output sort
-$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Reno" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Reno" --log=surf_lagrange.thres=critical "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'Cas01'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'Reno'
 > [  0.000000] (0:@) test_all
index 23335f1..51fa358 100644 (file)
@@ -3,8 +3,8 @@
 p Testing the surf network Vegas fairness model using lagrangian approach
 
 ! output sort
-$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml "--cfg=workstation/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV sendrecv/sendrecv$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/sendrecv/deployment_sendrecv.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Vegas" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/model' to 'Cas01'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'Vegas'
 > [  0.000000] (0:@) test_all
index 8f37018..f1785ff 100644 (file)
@@ -5,7 +5,7 @@
 <config id="General">
        <prop id="maxmin/precision" value="0.000010"></prop>
        <prop id="cpu/optim" value="TI"></prop>
-       <prop id="workstation/model" value="compound"></prop>
+       <prop id="host/model" value="compound"></prop>
        <prop id="network/model" value="SMPI"></prop>
        <prop id="path" value="~/"></prop>
        <prop id="smpi/bw_factor" value="65472:0.940694;15424:0.697866;9376:0.58729"></prop>
index 5722440..5af0a70 100644 (file)
@@ -3,7 +3,7 @@ p Test the DAX loader with a DAX comprising a cycle.
 
 ! expect return 255
 $ $SG_TEST_EXENV ./dax_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/simple_dax_with_cycle.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > [0.000000] [sd_daxparse/WARNING] the task root is not marked
 > [0.000000] [sd_daxparse/WARNING] the task 1@task1 is in a cycle
 > [0.000000] [sd_daxparse/WARNING] the task 2@task2 is in a cycle
index 20db4b6..57297a4 100644 (file)
@@ -2,7 +2,7 @@
 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] [surf_host/INFO] surf_host_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 ---------------------------
index d62188c..79b64fd 100644 (file)
@@ -2,7 +2,7 @@
 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] [surf_host/INFO] surf_host_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    
@@ -235,7 +235,7 @@ $ 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] [surf_host/INFO] surf_host_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
@@ -245,7 +245,7 @@ $ $SG_TEST_EXENV ./simulate_dot --log=no_loc  "--log=sd_dotparse.thres:verbose"
 > [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] [surf_host/INFO] surf_host_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    
@@ -493,7 +493,7 @@ $ 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] [surf_host/INFO] surf_host_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
index d1f1221..eb33b3c 100644 (file)
@@ -26,7 +26,7 @@ int main(int argc, char **argv)
   /* Set the workstation model to default, as storage is not supported by the
    * ptask_L07 model yet.
    */
-  SD_config("workstation/model", "default");
+  SD_config("host/model", "default");
   SD_create_environment(argv[1]);
   workstations = SD_workstation_get_list();
   total_nworkstations = SD_workstation_get_number();
index 6def7e0..1a7eca6 100755 (executable)
@@ -3,7 +3,7 @@
 p Simple test of simdag with properties
 
 $ $SG_TEST_EXENV properties/sd_prop ${srcdir:=.}/../platforms/prop.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > [0.000000] [test/INFO] Property list for workstation host1
 > [0.000000] [test/INFO]       Property: mem has value: 4
 > [0.000000] [test/INFO]       Property: NewProp has value: newValue
index f45121a..5734d51 100644 (file)
@@ -3,7 +3,7 @@
 p Simple test of simdag
 
 $ $SG_TEST_EXENV ${bindir:=.}/minmin_test --log=sd_daxparse.thresh:critical ${srcdir:=.}/simulacrum_7_hosts.xml ${srcdir:=.}/Montage_25.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > [0.000000] [test/INFO] Schedule ID00002@mProjectPP on Host 27
 > [0.000105] [test/INFO] Schedule ID00000@mProjectPP on Host 26
 > [0.000120] [test/INFO] Schedule ID00003@mProjectPP on Host 30
index b97e811..8f5f294 100644 (file)
@@ -74,8 +74,10 @@ int main(int argc, char **argv)
     /* let throttle the communication for taskD if its parent is SD_DONE */
     /* the bandwidth is 1.25e8, the data size is 1e7, and we want to throttle
      * the bandwidth by a factor 2. the rate is then 1.25e8/(2*1e7)=6.25
+     * Changing the rate is possible before the task execution starts (in SD_RUNNING
+     * state).
      */
-    if (SD_task_get_state(taskC) == SD_DONE)
+    if (SD_task_get_state(taskC) == SD_DONE && SD_task_get_state(taskD) < SD_RUNNING)
       SD_task_set_rate(taskD, 6.25);
     xbt_dynar_free_container(&changed_tasks);
   }
index 106cf81..0ad23c9 100644 (file)
@@ -3,7 +3,7 @@
 p Simple test of simdag
 
 $ $SG_TEST_EXENV ./sd_test ${srcdir:=.}/../platforms/platform.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > [0.000000] [sd_test/INFO] Computation time for 2000000.000000 flops on Jacquelin: 0.014563
 > [0.000000] [sd_test/INFO] Computation time for 1000000.000000 flops on Intel: 0.007282
 > [0.000000] [sd_test/INFO] Route between Jacquelin and Intel:
index 7a4d4e7..3c7bad8 100644 (file)
@@ -3,5 +3,5 @@
 p Simple test of simdag
 
 $ $SG_TEST_EXENV ./sd_test2 ${srcdir:=.}/2clusters.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > [3.251960] [sd_test/INFO] Simulation time: 3.251960
index 18f7f83..f2782ac 100644 (file)
@@ -3,7 +3,7 @@
 p Test of the management of availability traces with simdag
 
 $ $SG_TEST_EXENV ${bindir:=.}/sd_avail two_hosts.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > [1.000000] [sd_avail/INFO] link1: bw=125000000, lat=0.000100
 > [1.000000] [sd_avail/INFO] Jupiter: power=12500000
 > [1.000000] [sd_avail/INFO] Tremblay: power=12500000
index 9145e9e..e36f2c7 100644 (file)
@@ -3,7 +3,7 @@ p Modify the rate of communication tasks even when they are auto-scheduled
 
 $ $SG_TEST_EXENV ./sd_comm_throttling --cfg=network/TCP_gamma:4194304 ${srcdir:=.}/2clusters.xml
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > [1.000000] [sd_comm_throttling/INFO] Simulation stopped after 1.0000 seconds
 > [1.000000] [sd_comm_throttling/INFO] Task 'Task A' start time: 0.000000, finish time: 1.000000
 > [2.080300] [sd_comm_throttling/INFO] Simulation stopped after 2.0803 seconds
index a8fabd3..77ca4cc 100644 (file)
@@ -3,7 +3,7 @@
 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] [surf_host/INFO] surf_host_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
index 6de37ed..0c9e7db 100644 (file)
@@ -3,7 +3,7 @@
 p Simple test of simdag
 
 $ $SG_TEST_EXENV ./sd_seq_access ${srcdir:=.}/2clusters.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > [0.000000] [sd_workstation/INFO] Displaying workstation C2-05
 > [0.000000] [sd_workstation/INFO]   - power: 5000000000
 > [0.000000] [sd_workstation/INFO]   - available power: 1.00
index f9ce3e8..e9da676 100644 (file)
@@ -6,7 +6,7 @@ p Simple test of simdag
 $ $SG_TEST_EXENV ./simdag_tracing --cfg=tracing:yes --cfg=tracing/categorized:yes ${srcdir:=.}/2clusters.xml
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > [0.000000] [sd_seq_access/INFO] Access mode of C2-05 is sequential
 > [0.000000] [sd_seq_access/INFO] Access mode of C2-06 is sequential
 > [0.000000] [sd_seq_access/INFO] Task A is currently running on C2-05 (SD_TASK_COMP_SEQ)
index da1bc5a..3199f80 100644 (file)
@@ -3,7 +3,7 @@ p Usage test of simdag's typed tasks
 
 $ $SG_TEST_EXENV ./sd_typed_tasks_test --cfg=network/TCP_gamma:4194304 ${srcdir:=.}/2clusters.xml
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > [2.080300] [sd_typed_tasks_test/INFO] Task 'Seq. comp. 1' start time: 0.000000, finish time: 1.000000
 > [2.080300] [sd_typed_tasks_test/INFO] Task 'Par. Comp. 1' start time: 0.000000, finish time: 0.080000
 > [2.080300] [sd_typed_tasks_test/INFO] Task 'Par. Comp. 3' start time: 0.000000, finish time: 0.400000
index 2f21266..4ab3300 100644 (file)
@@ -5,7 +5,6 @@ $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platf
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'plugin' to 'Energy'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [rank 1] Pstates: 1; Powers: 100000000
 > [0.000000] [rank 0] Pstates: 3; Powers: 100000000, 50000000, 20000000
 > [0.000000] [rank 1] Current pstate: 0; Current power: 100000000
index 825c29c..17ce4fd 100644 (file)
@@ -6,7 +6,6 @@ $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platf
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'plugin' to 'Energy'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [80.000000] [surf_energy/INFO] Total energy of host MyHost1: 12900.000000 Joules
 > [80.000000] [surf_energy/INFO] Total energy of host MyHost2: 9000.000000 Joules
 >  [   0.0000000000000000      ] [rank            0 ]           3  pstates available
index da687b9..e17fb4f 100644 (file)
@@ -6,7 +6,6 @@ $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platf
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'plugin' to 'Energy'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [80.000000] [surf_energy/INFO] Total energy of host MyHost1: 12900.000000 Joules
 > [80.000000] [surf_energy/INFO] Total energy of host MyHost2: 9000.000000 Joules
 >  [   0.0000000000000000      ] [rank            0 ]           3 pstates available
index 494c917..752393a 100644 (file)
@@ -2,7 +2,6 @@
 
 ! timeout 60
 $ ../../../smpi_script/bin/smpirun -wrapper ${bindir:=.}/../../../bin/simgrid-mc -hostfile ${srcdir:=.}/hostfile_non_deterministic  -platform ${srcdir:=.}/../../platforms/cluster.xml --log=xbt_cfg.thresh:warning --cfg=model-check:1 --cfg=model-check/communications_determinism:1 --cfg=smpi/send_is_detached_thres:0 --cfg=smpi/running_power:1e9 ./smpi_non_deterministic
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [mc_global/INFO] Check communication determinism
 > [0.000000] [mc_comm_determinism/INFO] The communications pattern of the process 1 is different! (Different communication : 1)
 > [0.000000] [mc_comm_determinism/INFO] ****************************************************
index cc85d75..6484cc9 100644 (file)
@@ -3,7 +3,6 @@
 ! timeout 60
 $ ../../../smpi_script/bin/smpirun -wrapper "${bindir:=.}/../../../bin/simgrid-mc" --log=xbt_cfg.thresh:warning -hostfile ${srcdir:=.}/hostfile_only_send_deterministic  -platform ${srcdir:=.}/../../platforms/cluster.xml --cfg=model-check:1 --cfg=model-check/communications_determinism:1 --cfg=smpi/send_is_detached_thres:0 --cfg=smpi/running_power:1e9 ./smpi_only_send_deterministic
 > [0.000000] [mc_comm_determinism/INFO] Check communication determinism
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [mc_global/INFO] ******************************************************
 > [0.000000] [mc_global/INFO] **** Only-send-deterministic communication pattern ****
 > [0.000000] [mc_global/INFO] ******************************************************
index 06b9f9b..87ca15c 100644 (file)
@@ -7,13 +7,7 @@
 #include <stdio.h>
 #include "smpi/smpi.h"
 
-int main(int argc, char *argv[])
-{
-  smpi_replay_init(&argc, &argv);
-
-  /* Actually do the simulation using smpi_action_trace_run */
-  smpi_action_trace_run(NULL);
-  smpi_replay_finalize();
-
+int main(int argc, char *argv[]) {
+  smpi_replay_run(&argc, &argv);
   return 0;
 }
index bb086c0..65f8814 100644 (file)
@@ -13,7 +13,6 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Tremblay:0:(0) 0.000000] [smpi_replay/VERBOSE] 0 bcast 5e4 0.000000
 > [Jupiter:1:(0) 0.015036] [smpi_replay/VERBOSE] 1 bcast 5e4 0.015036
 > [Fafard:2:(0) 0.015676] [smpi_replay/VERBOSE] 2 bcast 5e4 0.015676
@@ -46,7 +45,6 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi' to 'yes'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/computing' to 'yes'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Fafard:2:(0) 19.691622] [smpi_replay/INFO] Simulation time 19.691622
 
 $ rm -f replay/one_trace
@@ -166,22 +164,22 @@ $ tail -n +3 ./simgrid.trace
 > 4 3 0 1 1 MPI_LINK
 > 6 0 1 1 0 "rank-0"
 > 5 4 2 computing "0 1 1"
-> 5 5 2 smpi_replay_init "0 1 0"
-> 5 6 2 action_bcast "0 0.78 0.39"
+> 5 5 2 smpi_replay_run_init "0 1 0"
 > 6 0 2 1 0 "rank-1"
 > 6 0 3 1 0 "rank-2"
 > 12 0 2 1 4
 > 12 0 2 1 5
 > 13 0 2 1
-> 12 0 2 1 6
 > 12 0 2 2 4
 > 12 0 2 2 5
 > 13 0 2 2
-> 12 0 2 2 6
 > 12 0 2 3 4
 > 12 0 2 3 5
 > 13 0 2 3
+> 5 6 2 action_bcast "0 0.78 0.39"
+> 12 0 2 1 6
 > 12 0 2 3 6
+> 12 0 2 2 6
 > 13 0 2 1
 > 12 0 2 1 4
 > 13 0.015036 2 2
@@ -207,7 +205,7 @@ $ tail -n +3 ./simgrid.trace
 > 12 10.194200 2 1 7
 > 13 13.138198 2 3
 > 12 13.138198 2 3 7
-> 5 8 2 smpi_replay_finalize "0 1 0"
+> 5 8 2 smpi_replay_run_finalize "0 1 0"
 > 13 14.286929 2 2
 > 12 14.286929 2 2 8
 > 13 18.250974 2 1
@@ -237,7 +235,6 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Tremblay:0:(0) 0.164463] [smpi_replay/VERBOSE] 0 send 1 1e6 0.164463
 > [Jupiter:1:(0) 0.164463] [smpi_replay/VERBOSE] 1 recv 0 1e6 0.164463
 > [Jupiter:1:(0) 13.271310] [smpi_replay/VERBOSE] 1 compute 1e9 13.106847
@@ -260,7 +257,6 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Tremblay:0:(0) 1.491472] [smpi_replay/VERBOSE] 0 send 1 1e7 1.491472
 > [Jupiter:1:(0) 1.491472] [smpi_replay/VERBOSE] 1 recv 0 1e7 1.491472
 > [Tremblay:0:(0) 1.495453] [smpi_replay/VERBOSE] 0 barrier 0.003981
@@ -283,7 +279,6 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Jupiter:1:(0) 0.000000] [smpi_replay/VERBOSE] 1 Irecv 0 1e6 0.000000
 > [Jupiter:1:(0) 6.553424] [smpi_replay/VERBOSE] 1 compute 5e8 6.553424
 > [Jupiter:1:(0) 6.553524] [smpi_replay/VERBOSE] 1 test 0.000100
@@ -316,7 +311,6 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Tremblay:0:(0) 5.112775] [smpi_replay/VERBOSE] 0 allReduce 5e4 5e8 5.112775
 > [Jupiter:1:(0) 6.584135] [smpi_replay/VERBOSE] 1 allReduce 5e4 5e8 6.584135
 > [Fafard:2:(0) 6.584775] [smpi_replay/VERBOSE] 2 allReduce 5e4 5e8 6.584775
@@ -337,11 +331,10 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Tremblay:0:(0) 0.004041] [smpi_replay/VERBOSE] 0 allToAll 500 500 0.004041
-> [Jupiter:1:(0) 0.006920] [smpi_replay/VERBOSE] 1 allToAll 500 500 0.006920
 > [Fafard:2:(0) 0.006920] [smpi_replay/VERBOSE] 2 allToAll 500 500 0.006920
-> [Fafard:2:(0) 0.006920] [smpi_replay/INFO] Simulation time 0.006920
+> [Jupiter:1:(0) 0.006920] [smpi_replay/VERBOSE] 1 allToAll 500 500 0.006920
+> [Jupiter:1:(0) 0.006920] [smpi_replay/INFO] Simulation time 0.006920
 
 $ rm -f replay/one_trace
 
@@ -355,7 +348,6 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Tremblay:0:(0) 0.003999] [smpi_replay/VERBOSE] 0 allToAllV 100 1 40 30 1000 1 80 100 0.003999
 > [Jupiter:1:(0) 0.006934] [smpi_replay/VERBOSE] 1 allToAllV 1000 80 1 40 1000 40 1 30 0.006934
 > [Fafard:2:(0) 0.006936] [smpi_replay/VERBOSE] 2 allToAllV 1000 100 30 1 1000 30 40 1 0.006936
@@ -373,7 +365,6 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Tremblay:0:(0) 0.841244] [smpi_replay/VERBOSE] 0 allGatherV 275427 275427 275427 275427 204020 0 0 0.841244
 > [Fafard:2:(0) 1.239482] [smpi_replay/VERBOSE] 2 allGatherV 275427 275427 275427 275427 204020 0 0 1.239482
 > [Jupiter:1:(0) 1.239482] [smpi_replay/VERBOSE] 1 allGatherV 275427 275427 275427 275427 204020 0 0 1.239482
@@ -392,7 +383,6 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Fafard:2:(0) 0.000000] [smpi_replay/VERBOSE] 2 Irecv 1 3000 0.000000
 > [Fafard:2:(0) 0.000000] [smpi_replay/VERBOSE] 2 Isend 0 3000 0.000000
 > [Jupiter:1:(0) 0.000000] [smpi_replay/VERBOSE] 1 Isend 0 2000 0.000000
index e45ac6f..9a627e4 100644 (file)
 #include "xbt/asserts.h"
 #include "smpi/smpi.h"
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
-                             "Messages specific for this msg example");
-                             
-int smpi_replay(int argc, char *argv[]);
+               "Messages specific for this msg example");
 
-int smpi_replay(int argc, char *argv[])
-{
-  smpi_replay_init(&argc, &argv);
-
-  /* Actually do the simulation using smpi_action_trace_run */
-  smpi_action_trace_run(NULL);
-  smpi_replay_finalize();
-
-  return 0;
+static int smpi_replay(int argc, char *argv[]) {
+       smpi_replay_run(&argc, &argv);
+       return 0;
 }
 
 int main(int argc, char *argv[]){
- msg_error_t res;
-  const char *platform_file;
-  const char *application_file;
-  const char *description_file;
-
-  MSG_init(&argc, argv);
-
-  if (argc < 4) {
-    printf("Usage: %s description_file platform_file deployment_file\n", argv[0]);
-    printf("example: %s smpi_multiple_apps msg_platform.xml msg_deployment.xml\n", argv[0]);
-    exit(1);
-  }
-  description_file = argv[1];
-  platform_file = argv[2];
-  application_file = argv[3];
-
-
-  {                             /*  Simulation setting */
-    MSG_create_environment(platform_file);
-  }
-  {                             /*   Application deployment */
-    //read the description file in order to identify instances to launch
-    FILE* fp = fopen(description_file, "r");
-    if (fp == NULL)
-      xbt_die("Cannot open %s", description_file);
-    ssize_t read;
-    char *line = NULL;
-    size_t n = 0;
-    int instance_size = 0;
-    const char* instance_id = NULL;
-    while ((read = xbt_getline(&line, &n, fp)) != -1 ){
-      xbt_dynar_t elems = xbt_str_split_quoted_in_place(line);
-      if(xbt_dynar_length(elems)<3){
-        xbt_die ("Not enough elements in the line");
-      }
-      
-      const char** line_char= xbt_dynar_to_array(elems); 
-      instance_id = line_char[0];
-      instance_size = atoi(line_char[2]);
-      
-      XBT_INFO("Initializing instance %s of size %d", instance_id, instance_size);
-      SMPI_app_instance_register(instance_id, smpi_replay,instance_size);
-
-      xbt_free(line_char);
-    }
-
-    MSG_launch_application(application_file);
-    SMPI_init();
-  }
-  res = MSG_main();
-
-  XBT_INFO("Simulation time %g", MSG_get_clock());
-
-
-  SMPI_finalize();
-  if (res == MSG_OK)
-    return 0;
-  else
-    return 1;
+       msg_error_t res;
+       const char *platform_file;
+       const char *application_file;
+       const char *description_file;
+
+       MSG_init(&argc, argv);
+
+       if (argc < 4) {
+               printf("Usage: %s description_file platform_file deployment_file\n", argv[0]);
+               printf("example: %s smpi_multiple_apps msg_platform.xml msg_deployment.xml\n", argv[0]);
+               exit(1);
+       }
+       description_file = argv[1];
+       platform_file = argv[2];
+       application_file = argv[3];
+
+
+       /*  Simulation setting */
+       MSG_create_environment(platform_file);
+
+       /*   Application deployment: read the description file in order to identify instances to launch */
+       FILE* fp = fopen(description_file, "r");
+       if (fp == NULL)
+               xbt_die("Cannot open %s", description_file);
+       ssize_t read;
+       char     *line = NULL;
+       size_t n         = 0;
+       int instance_size = 0;
+       const char* instance_id = NULL;
+       while ((read = xbt_getline(&line, &n, fp)) != -1 ){
+               xbt_dynar_t elems = xbt_str_split_quoted_in_place(line);
+               if(xbt_dynar_length(elems)<3){
+                       xbt_die ("Not enough elements in the line");
+               }
+
+               const char** line_char= xbt_dynar_to_array(elems);
+               instance_id = line_char[0];
+               instance_size = atoi(line_char[2]);
+
+               XBT_INFO("Initializing instance %s of size %d", instance_id, instance_size);
+               SMPI_app_instance_register(instance_id, smpi_replay,instance_size);
+
+               xbt_free(line_char);
+       }
+
+       MSG_launch_application(application_file);
+       SMPI_init();
+
+       res = MSG_main();
+
+       XBT_INFO("Simulation time %g", MSG_get_clock());
+
+       SMPI_finalize();
+       if (res == MSG_OK)
+               return 0;
+       else
+               return 1;
 
 }
index 79ee7ee..8a9439e 100644 (file)
@@ -160,7 +160,6 @@ int main(int argc, char *argv[])
   platform_file = argv[1];
   application_file = argv[2];
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 42ea912..138f009 100644 (file)
@@ -12,7 +12,6 @@ $ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-file smpi_traced.t
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 
 p Another SMPI test
 $ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-file smpi_traced.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=path:${srcdir:=.}/../msg -np 3 ./smpi_traced_simple --log=smpi_kernel.thres:warning
@@ -24,14 +23,12 @@ $ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-file smpi_traced.t
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 
 p Testing without trace parameters
 $ ../../smpi_script/bin/smpirun -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=path:${srcdir:=.}/../msg -np 3 ./smpi_traced_simple --log=smpi_kernel.thres:warning
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 
 p Testing grouped tracing
 $ ../../smpi_script/bin/smpirun -trace -trace-grouped -trace-file smpi_traced.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=path:${srcdir:=.}/../msg -np 3 ./smpi_traced_simple --log=smpi_kernel.thres:warning
@@ -42,7 +39,6 @@ $ ../../smpi_script/bin/smpirun -trace -trace-grouped -trace-file smpi_traced.tr
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 
 p Testing generation of viva configuration files
 $ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-viva -trace-file smpi_traced.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=path:${srcdir:=.}/../msg --cfg=smpi/cpu_threshold:-1 -np 3 ./smpi_traced_simple --log=smpi_kernel.thres:warning
@@ -57,7 +53,6 @@ $ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-viva -trace-file s
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.007962] [instr_config/INFO] No categories declared, ignoring generation of viva graph configuration
 
 p Testing with parameters but without activating them with the safe switch (-trace)
@@ -65,6 +60,5 @@ $ ../../smpi_script/bin/smpirun -trace-resource -trace-viva -trace-file smpi_tra
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 
 $ rm -f smpi_traced.trace smpi_uncat.plist smpi_cat.plist
index 6eb6aaa..c16e39d 100644 (file)
@@ -264,7 +264,7 @@ XBT_PUBLIC(void) SIMIX_process_set_function(const char* process_host,
 XBT_PUBLIC(smx_host_t) SIMIX_host_get_by_name(const char *name);
 XBT_PUBLIC(smx_host_t) SIMIX_host_self(void);
 XBT_PUBLIC(const char*) SIMIX_host_self_get_name(void);
-XBT_PUBLIC(const char*) SIMIX_host_get_name(smx_host_t host); /* FIXME: make private: only the name of SIMIX_host_self() should be public without request */
+#define SIMIX_host_get_name(h) sg_host_name(h)  /* DEPRECATED: SIMIX_host_get_name */
 XBT_PUBLIC(void) SIMIX_host_on(smx_host_t host);
 XBT_PUBLIC(void) SIMIX_host_off(smx_host_t host, smx_process_t issuer);
 XBT_PUBLIC(void) SIMIX_host_self_set_data(void *data);
index b6b94eb..3d4d949 100644 (file)
@@ -20,6 +20,7 @@
       integer MPI_ANY_SOURCE, MPI_PROC_NULL, MPI_ANY_TAG, MPI_UNDEFINED
       integer MPI_SOURCE, MPI_TAG, MPI_ERROR
       integer MPI_VERSION, MPI_SUBVERSION
+      integer MPI_LOCK_EXCLUSIVE, MPI_LOCK_SHARED
       parameter(MPI_MAX_PROCESSOR_NAME=100)
       parameter(MPI_MAX_ERROR_STRING=100)
       parameter(MPI_MAX_DATAREP_STRIN =100)
@@ -36,6 +37,8 @@
       parameter(MPI_ERROR=3)
       parameter(MPI_VERSION=1)
       parameter(MPI_SUBVERSION=1)
+      parameter(MPI_LOCK_EXCLUSIVE=1)
+      parameter(MPI_LOCK_SHARED=2)
       integer MPI_MODE_NOSTORE, MPI_MODE_NOPUT, MPI_MODE_NOPRECEDE
       integer MPI_MODE_NOSUCCEED, MPI_MODE_NOCHECK
       parameter(MPI_MODE_NOSTORE=1)
index 5eaf7ac..81fc265 100644 (file)
@@ -884,9 +884,7 @@ XBT_PUBLIC(int) smpi_process_index(void);
 XBT_PUBLIC(void) smpi_process_init(int *argc, char ***argv);
 
 /* Trace replay specific stuff */
-XBT_PUBLIC(void) smpi_replay_init(int *argc, char***argv);
-XBT_PUBLIC(void) smpi_action_trace_run(char *);
-XBT_PUBLIC(int) smpi_replay_finalize(void);
+XBT_PUBLIC(void) smpi_replay_run(int *argc, char***argv);
 
 XBT_PUBLIC(void) SMPI_app_instance_register(const char *name, xbt_main_func_t code, int num_processes);
 XBT_PUBLIC(void) SMPI_init(void);
index 88f92d1..6484c87 100644 (file)
@@ -15,7 +15,7 @@ SG_BEGIN_DECL()
 XBT_PUBLIC_DATA(xbt_lib_t) host_lib;
 XBT_PUBLIC_DATA(int) ROUTING_HOST_LEVEL; //Routing level
 XBT_PUBLIC_DATA(int)  SURF_CPU_LEVEL;    //Surf cpu level
-XBT_PUBLIC_DATA(int) SURF_WKS_LEVEL;    //Surf workstation level
+XBT_PUBLIC_DATA(int) SURF_HOST_LEVEL;    //Surf workstation level
 XBT_PUBLIC_DATA(int) SIMIX_HOST_LEVEL;  //Simix host level
 XBT_PUBLIC_DATA(int) SIMIX_STORAGE_LEVEL;  //Simix storage level
 XBT_PUBLIC_DATA(int)  MSG_HOST_LEVEL;    //Msg level
diff --git a/include/xbt/base.h b/include/xbt/base.h
new file mode 100644 (file)
index 0000000..7e8ad78
--- /dev/null
@@ -0,0 +1,241 @@
+/* xbt.h - Public interface to the xbt (simgrid's toolbox)                     */
+
+/* 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 XBT_BASE_H
+#define XBT_BASE_H
+
+#include "simgrid_config.h"
+
+/* Define _GNU_SOURCE for getline, isfinite, etc. */
+#ifndef _GNU_SOURCE
+       #define _GNU_SOURCE
+#endif
+
+/* Attributes are only in recent versions of GCC */
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))
+# define _XBT_GNUC_PRINTF( format_idx, arg_idx )    \
+     __attribute__((__format__ (__printf__, format_idx, arg_idx)))
+# define _XBT_GNUC_SCANF( format_idx, arg_idx )     \
+         __attribute__((__format__ (__scanf__, format_idx, arg_idx)))
+# define _XBT_GNUC_NORETURN __attribute__((__noreturn__))
+# define _XBT_GNUC_UNUSED  __attribute__((__unused__))
+/* Constructor priorities exist since gcc 4.3.  Apparently, they are however not
+ * supported on Macs. */
+# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && !defined(__APPLE__)
+#  define _XBT_GNUC_CONSTRUCTOR(prio) __attribute__((__constructor__ (prio)))
+#  define _XBT_GNUC_DESTRUCTOR(prio) __attribute__((__destructor__ (prio)))
+# else
+#  define _XBT_GNUC_CONSTRUCTOR(prio) __attribute__((__constructor__))
+#  define _XBT_GNUC_DESTRUCTOR(prio) __attribute__((__destructor__))
+# endif
+# undef _XBT_NEED_INIT_PRAGMA
+
+#else                           /* !__GNUC__ */
+# define _XBT_GNUC_PRINTF( format_idx, arg_idx )
+# define _XBT_GNUC_SCANF( format_idx, arg_idx )
+# define _XBT_GNUC_NORETURN
+# define _XBT_GNUC_UNUSED
+# define _XBT_GNUC_CONSTRUCTOR(prio)
+# define _XBT_GNUC_DESTRUCTOR(prio)
+# define  _XBT_NEED_INIT_PRAGMA 1
+
+#endif                          /* !__GNUC__ */
+
+/* inline and __FUNCTION__ are only in GCC when -ansi is off */
+
+#if defined(__GNUC__) && ! defined(__STRICT_ANSI__)
+# define _XBT_FUNCTION __FUNCTION__
+#elif (defined(__STDC__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+# define _XBT_FUNCTION __func__ /* ISO-C99 compliant */
+#else
+# define _XBT_FUNCTION "function"
+#endif
+
+#ifdef DOXYGEN
+#  define XBT_INLINE
+#else
+#  ifndef __cplusplus
+#    if defined(__GNUC__) && ! defined(__STRICT_ANSI__)
+#        define XBT_INLINE inline
+#    elif (defined(__STDC__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+#        define XBT_INLINE inline
+#    elif defined(__BORLANDC__) && !defined(__STRICT_ANSI__)
+#        define XBT_INLINE __inline
+#    else
+#        define XBT_INLINE
+#    endif
+#  else
+#     if defined (__VISUALC__)
+#       define XBT_INLINE __inline
+#     else
+#       define XBT_INLINE  inline
+#     endif
+#  endif /* __cplusplus */
+#endif
+
+/* improvable on gcc (by evaluating arguments only once), but wouldn't be portable */
+#ifdef MIN
+# undef MIN
+#endif
+#define MIN(a,b) ((a)<(b)?(a):(b))
+
+#ifdef MAX
+# undef MAX
+#endif
+#define MAX(a,b) ((a)>(b)?(a):(b))
+
+/*
+ * Expands to `one' if there is only one argument for the variadic part.
+ * Otherwise, expands to `more'.
+ * Works with up to 63 arguments, which is the maximum mandated by the C99
+ * standard.
+ */
+#define _XBT_IF_ONE_ARG(one, more, ...)                                 \
+    _XBT_IF_ONE_ARG_(__VA_ARGS__,                                       \
+                     more, more, more, more, more, more, more, more,    \
+                     more, more, more, more, more, more, more, more,    \
+                     more, more, more, more, more, more, more, more,    \
+                     more, more, more, more, more, more, more, more,    \
+                     more, more, more, more, more, more, more, more,    \
+                     more, more, more, more, more, more, more, more,    \
+                     more, more, more, more, more, more, more, more,    \
+                     more, more, more, more, more, more, more, one)
+#define _XBT_IF_ONE_ARG_(a64, a63, a62, a61, a60, a59, a58, a57,        \
+                         a56, a55, a54, a53, a52, a51, a50, a49,        \
+                         a48, a47, a46, a45, a44, a43, a42, a41,        \
+                         a40, a39, a38, a37, a36, a35, a34, a33,        \
+                         a32, a31, a30, a29, a28, a27, a26, a25,        \
+                         a24, a23, a22, a21, a20, a19, a18, a17,        \
+                         a16, a15, a14, a13, a12, a11, a10, a9,         \
+                         a8, a7, a6, a5, a4, a3, a2, a1, N, ...) N
+
+/*
+ * Function calling convention (not used for now)
+ */
+
+#ifdef _XBT_WIN32
+#  ifndef _XBT_CALL
+#    define _XBT_CALL __cdecl
+#   endif
+#else
+#  define _XBT_CALL
+#endif
+
+/* Handle import/export stuff
+ *
+ * Rational of XBT_PUBLIC:
+ *   * This is for library symbols visible from the application-land.
+ *     Basically, any symbols defined in the include/directory must be
+ *     like this (plus some other globals).
+ *
+ *     UNIX coders should just think of it as a special way to say "extern".
+ *
+ *   * If you build the DLL, define the DLL_EXPORT symbol so that all symbols
+ *     actually get exported by this file.
+
+ *   * If you do a static windows compilation, define DLL_STATIC, both when
+ *     compiling the application files and when compiling the library.
+ *
+ *   * If you link your application against the DLL or if you do a UNIX build,
+ *     don't do anything special. This file will do the right thing for you
+ *     by default.
+ *
+ *
+ * Rational of XBT_EXPORT_NO_IMPORT: (windows-only cruft)
+ *   * Symbols which must be exported in the DLL, but not imported from it.
+ *
+ *   * This is obviously useful for initialized globals (which cannot be
+ *     extern or similar).
+ *   * This is also used in the log mecanism where a macro creates the
+ *     variable automatically. When the macro is called from within SimGrid,
+ *     the symbol must be exported, but when called  from within the client
+ *     code, it must not try to retrieve the symbol from the DLL since it's
+ *      not in there.
+ *
+ * Rational of XBT_IMPORT_NO_EXPORT: (windows-only cruft)
+ *   * Symbols which must be imported from the DLL, but not explicitely
+ *     exported from it.
+ *
+ *   * The root log category is already exported, but not imported explicitely
+ *     when creating a subcategory since we cannot import the parent category
+ *     to deal with the fact that the parent may be in application space, not
+ *     DLL space.
+ */
+
+/* Build the DLL */
+#if defined(DLL_EXPORT)
+#  define XBT_PUBLIC(type)            __declspec(dllexport) type
+#  define XBT_EXPORT_NO_IMPORT(type)  __declspec(dllexport) type
+#  define XBT_IMPORT_NO_EXPORT(type)  type
+#  define XBT_PUBLIC_DATA(type)       extern __declspec(dllexport) type
+#  define XBT_PUBLIC_CLASS            class __declspec(dllexport)
+
+
+/* Pack everything up statically */
+#elif defined(DLL_STATIC)
+#  define XBT_PUBLIC(type)            type
+#  define XBT_EXPORT_NO_IMPORT(type)  type
+#  define XBT_IMPORT_NO_EXPORT(type)  type
+#  define XBT_PUBLIC_DATA(type)       extern type
+#  define XBT_PUBLIC_CLASS            class
+
+
+/* Link against the DLL */
+#elif (defined(_XBT_WIN32) && !defined(DLL_EXPORT) && !defined(DLL_STATIC))
+#  define XBT_PUBLIC(type)            __declspec(dllimport) type
+#  define XBT_EXPORT_NO_IMPORT(type)  type
+#  define XBT_IMPORT_NO_EXPORT(type)  __declspec(dllimport) type
+#  define XBT_PUBLIC_DATA(type)       extern __declspec(dllimport) type
+#  define XBT_PUBLIC_CLASS            class __declspec(dllimport)
+
+
+/* UNIX build */
+#else
+#  define XBT_PUBLIC(type)            type
+#  define XBT_EXPORT_NO_IMPORT(type)  type
+#  define XBT_IMPORT_NO_EXPORT(type)  type
+#  define XBT_PUBLIC_DATA(type)       extern type
+#  define XBT_PUBLIC_CLASS            class
+
+#endif
+
+#ifdef _XBT_WIN32
+#define XBT_INTERNAL
+#else
+#define XBT_INTERNAL __attribute__((visibility ("hidden")))
+#endif
+
+#if !defined (max) && !defined(__cplusplus)
+#  define max(a,b)  (((a) > (b)) ? (a) : (b))
+#endif
+#if !defined (min) && !defined(__cplusplus)
+#  define min(a,b)  (((a) < (b)) ? (a) : (b))
+#endif
+
+#define TRUE  1
+#define FALSE 0
+
+/*! C++ users need love */
+#ifndef SG_BEGIN_DECL
+# ifdef __cplusplus
+#  define SG_BEGIN_DECL() extern "C" {
+# else
+#  define SG_BEGIN_DECL()
+# endif
+#endif
+
+#ifndef SG_END_DECL
+# ifdef __cplusplus
+#  define SG_END_DECL() }
+# else
+#  define SG_END_DECL()
+# endif
+#endif
+/* End of cruft for C++ */
+
+#endif
index 1b34514..5ee6b03 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <string.h>             /* memcpy */
 
-#include "xbt/misc.h"           /* SG_BEGIN_DECL */
+#include "xbt/base.h"           /* SG_BEGIN_DECL */
 #include "xbt/function_types.h"
 
 SG_BEGIN_DECL()
index 18d8c25..5cccc14 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef XBT_FUNCTION_TYPE_H
 #define XBT_FUNCTION_TYPE_H
 
-#include "xbt/misc.h"
+#include "xbt/base.h"
 
 SG_BEGIN_DECL()
 
index a0e33d8..a8d8c00 100644 (file)
 #include <stdarg.h>
 
 #include "simgrid_config.h"
-
-/* Define _GNU_SOURCE for getline, isfinite, etc. */
-#ifndef _GNU_SOURCE
-       #define _GNU_SOURCE
-#endif
-
-/* Attributes are only in recent versions of GCC */
-#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))
-# define _XBT_GNUC_PRINTF( format_idx, arg_idx )    \
-     __attribute__((__format__ (__printf__, format_idx, arg_idx)))
-# define _XBT_GNUC_SCANF( format_idx, arg_idx )     \
-         __attribute__((__format__ (__scanf__, format_idx, arg_idx)))
-# define _XBT_GNUC_NORETURN __attribute__((__noreturn__))
-# define _XBT_GNUC_UNUSED  __attribute__((__unused__))
-/* Constructor priorities exist since gcc 4.3.  Apparently, they are however not
- * supported on Macs. */
-# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && !defined(__APPLE__)
-#  define _XBT_GNUC_CONSTRUCTOR(prio) __attribute__((__constructor__ (prio)))
-#  define _XBT_GNUC_DESTRUCTOR(prio) __attribute__((__destructor__ (prio)))
-# else
-#  define _XBT_GNUC_CONSTRUCTOR(prio) __attribute__((__constructor__))
-#  define _XBT_GNUC_DESTRUCTOR(prio) __attribute__((__destructor__))
-# endif
-# undef _XBT_NEED_INIT_PRAGMA
-
-#else                           /* !__GNUC__ */
-# define _XBT_GNUC_PRINTF( format_idx, arg_idx )
-# define _XBT_GNUC_SCANF( format_idx, arg_idx )
-# define _XBT_GNUC_NORETURN
-# define _XBT_GNUC_UNUSED
-# define _XBT_GNUC_CONSTRUCTOR(prio)
-# define _XBT_GNUC_DESTRUCTOR(prio)
-# define  _XBT_NEED_INIT_PRAGMA 1
-
-#endif                          /* !__GNUC__ */
-
-/* inline and __FUNCTION__ are only in GCC when -ansi is off */
-
-#if defined(__GNUC__) && ! defined(__STRICT_ANSI__)
-# define _XBT_FUNCTION __FUNCTION__
-#elif (defined(__STDC__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
-# define _XBT_FUNCTION __func__ /* ISO-C99 compliant */
-#else
-# define _XBT_FUNCTION "function"
-#endif
-
-#ifdef DOXYGEN
-#  define XBT_INLINE
-#else
-#  ifndef __cplusplus
-#    if defined(__GNUC__) && ! defined(__STRICT_ANSI__)
-#        define XBT_INLINE inline
-#    elif (defined(__STDC__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
-#        define XBT_INLINE inline
-#    elif defined(__BORLANDC__) && !defined(__STRICT_ANSI__)
-#        define XBT_INLINE __inline
-#    else
-#        define XBT_INLINE
-#    endif
-#  else
-#     if defined (__VISUALC__)
-#       define XBT_INLINE __inline
-#     else
-#       define XBT_INLINE  inline
-#     endif
-#  endif /* __cplusplus */
-#endif
-
-/* improvable on gcc (by evaluating arguments only once), but wouldn't be portable */
-#ifdef MIN
-# undef MIN
-#endif
-#define MIN(a,b) ((a)<(b)?(a):(b))
-
-#ifdef MAX
-# undef MAX
-#endif
-#define MAX(a,b) ((a)>(b)?(a):(b))
-
-/*
- * Expands to `one' if there is only one argument for the variadic part.
- * Otherwise, expands to `more'.
- * Works with up to 63 arguments, which is the maximum mandated by the C99
- * standard.
- */
-#define _XBT_IF_ONE_ARG(one, more, ...)                                 \
-    _XBT_IF_ONE_ARG_(__VA_ARGS__,                                       \
-                     more, more, more, more, more, more, more, more,    \
-                     more, more, more, more, more, more, more, more,    \
-                     more, more, more, more, more, more, more, more,    \
-                     more, more, more, more, more, more, more, more,    \
-                     more, more, more, more, more, more, more, more,    \
-                     more, more, more, more, more, more, more, more,    \
-                     more, more, more, more, more, more, more, more,    \
-                     more, more, more, more, more, more, more, one)
-#define _XBT_IF_ONE_ARG_(a64, a63, a62, a61, a60, a59, a58, a57,        \
-                         a56, a55, a54, a53, a52, a51, a50, a49,        \
-                         a48, a47, a46, a45, a44, a43, a42, a41,        \
-                         a40, a39, a38, a37, a36, a35, a34, a33,        \
-                         a32, a31, a30, a29, a28, a27, a26, a25,        \
-                         a24, a23, a22, a21, a20, a19, a18, a17,        \
-                         a16, a15, a14, a13, a12, a11, a10, a9,         \
-                         a8, a7, a6, a5, a4, a3, a2, a1, N, ...) N
-
-/* 
- * Function calling convention (not used for now) 
- */
-
-#ifdef _XBT_WIN32
-#  ifndef _XBT_CALL
-#    define _XBT_CALL __cdecl
-#   endif
-#else
-#  define _XBT_CALL
-#endif
-
-/* Handle import/export stuff
- * 
- * Rational of XBT_PUBLIC: 
- *   * This is for library symbols visible from the application-land.
- *     Basically, any symbols defined in the include/directory must be 
- *     like this (plus some other globals). 
- *
- *     UNIX coders should just think of it as a special way to say "extern".
- *
- *   * If you build the DLL, define the DLL_EXPORT symbol so that all symbols
- *     actually get exported by this file.
-
- *   * If you do a static windows compilation, define DLL_STATIC, both when
- *     compiling the application files and when compiling the library.
- *
- *   * If you link your application against the DLL or if you do a UNIX build,
- *     don't do anything special. This file will do the right thing for you 
- *     by default.
- *
- * 
- * Rational of XBT_EXPORT_NO_IMPORT: (windows-only cruft)
- *   * Symbols which must be exported in the DLL, but not imported from it.
- * 
- *   * This is obviously useful for initialized globals (which cannot be 
- *     extern or similar).
- *   * This is also used in the log mecanism where a macro creates the 
- *     variable automatically. When the macro is called from within SimGrid,
- *     the symbol must be exported, but when called  from within the client
- *     code, it must not try to retrieve the symbol from the DLL since it's
- *      not in there.
- * 
- * Rational of XBT_IMPORT_NO_EXPORT: (windows-only cruft)
- *   * Symbols which must be imported from the DLL, but not explicitely 
- *     exported from it.
- * 
- *   * The root log category is already exported, but not imported explicitely 
- *     when creating a subcategory since we cannot import the parent category 
- *     to deal with the fact that the parent may be in application space, not 
- *     DLL space.
- */
-
-/* Build the DLL */
-#if defined(DLL_EXPORT)
-#  define XBT_PUBLIC(type)            __declspec(dllexport) type
-#  define XBT_EXPORT_NO_IMPORT(type)  __declspec(dllexport) type
-#  define XBT_IMPORT_NO_EXPORT(type)  type
-#  define XBT_PUBLIC_DATA(type)       extern __declspec(dllexport) type
-#  define XBT_PUBLIC_CLASS            class __declspec(dllexport)
-
-
-/* Pack everything up statically */
-#elif defined(DLL_STATIC)
-#  define XBT_PUBLIC(type)            type
-#  define XBT_EXPORT_NO_IMPORT(type)  type
-#  define XBT_IMPORT_NO_EXPORT(type)  type
-#  define XBT_PUBLIC_DATA(type)       extern type
-#  define XBT_PUBLIC_CLASS            class
-
-
-/* Link against the DLL */
-#elif (defined(_XBT_WIN32) && !defined(DLL_EXPORT) && !defined(DLL_STATIC))
-#  define XBT_PUBLIC(type)            __declspec(dllimport) type
-#  define XBT_EXPORT_NO_IMPORT(type)  type
-#  define XBT_IMPORT_NO_EXPORT(type)  __declspec(dllimport) type
-#  define XBT_PUBLIC_DATA(type)       extern __declspec(dllimport) type
-#  define XBT_PUBLIC_CLASS            class __declspec(dllimport)
-
-
-/* UNIX build */
-#else
-#  define XBT_PUBLIC(type)            type
-#  define XBT_EXPORT_NO_IMPORT(type)  type
-#  define XBT_IMPORT_NO_EXPORT(type)  type
-#  define XBT_PUBLIC_DATA(type)       extern type
-#  define XBT_PUBLIC_CLASS            class
-
-#endif
-
-#ifdef _XBT_WIN32
-#define XBT_INTERNAL
-#else
-#define XBT_INTERNAL __attribute__((visibility ("hidden")))
-#endif
-
-#if !defined (max) && !defined(__cplusplus)
-#  define max(a,b)  (((a) > (b)) ? (a) : (b))
-#endif
-#if !defined (min) && !defined(__cplusplus)
-#  define min(a,b)  (((a) < (b)) ? (a) : (b))
-#endif
-
-#define TRUE  1
-#define FALSE 0
-
-/*! C++ users need love */
-#ifndef SG_BEGIN_DECL
-# ifdef __cplusplus
-#  define SG_BEGIN_DECL() extern "C" {
-# else
-#  define SG_BEGIN_DECL()
-# endif
-#endif
-
-#ifndef SG_END_DECL
-# ifdef __cplusplus
-#  define SG_END_DECL() }
-# else
-#  define SG_END_DECL()
-# endif
-#endif
-/* End of cruft for C++ */
+#include "base.h"
+#include "dynar.h"
 
 SG_BEGIN_DECL()
 
@@ -254,8 +29,6 @@ XBT_PUBLIC(const char *) xbt_procname(void);
     SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files */
 XBT_PUBLIC(void) sg_version(int *major,int *minor,int *patch);
 
-typedef struct xbt_dynar_s s_xbt_dynar_t, *xbt_dynar_t;
-
 /** Contains all the parameters we got from the command line */
 XBT_PUBLIC_DATA(xbt_dynar_t) sg_cmdline;
 
index 675a5ad..28ba751 100644 (file)
@@ -15,11 +15,11 @@ SG_BEGIN_DECL()
 typedef struct s_replay_reader *xbt_replay_reader_t;
 typedef void (*action_fun) (const char *const *args);
 
-XBT_PUBLIC_DATA(xbt_dict_t) action_funs;
-XBT_PUBLIC_DATA(xbt_dict_t) action_queues;
+XBT_PUBLIC_DATA(xbt_dict_t) xbt_action_funs;
+XBT_PUBLIC_DATA(xbt_dict_t) xbt_action_queues;
 
 /* To split the file if a unique one is given (specific variable for the other case live in runner()) */
-XBT_PUBLIC_DATA(FILE *) action_fp;
+XBT_PUBLIC_DATA(FILE *) xbt_action_fp;
 
 XBT_PUBLIC(xbt_replay_reader_t) xbt_replay_reader_new(const char*filename);
 XBT_PUBLIC(const char **) xbt_replay_reader_get(xbt_replay_reader_t reader);
@@ -30,7 +30,7 @@ XBT_PUBLIC(int) xbt_replay_action_runner(int argc, char *argv[]);
 
 XBT_PUBLIC(int) _xbt_replay_is_active(void);
 
-XBT_PUBLIC(void) _xbt_replay_action_init(void);
+XBT_PUBLIC(int) _xbt_replay_action_init(void);
 XBT_PUBLIC(void) _xbt_replay_action_exit(void);
 
 XBT_PUBLIC(void) xbt_replay_action_register(const char *action_name,
index d253847..82c5c12 100644 (file)
@@ -36,15 +36,22 @@ public final class NativeLib {
        }
        public static void nativeInit(String name) {
                try {
-                       /* prefer the version on disk, if existing */
-                       System.loadLibrary(name);
-               } catch (UnsatisfiedLinkError e) {
-                       /* If not found, unpack the one bundled into the jar file and use it */
+                       /* Prefer the version of the library bundled into the jar file and use it */
                        loadLib(name);
+               } catch (SimGridLibNotFoundException e) {
+                       /* If not found, try to see if we can find a version on disk */
+                       try {
+                               System.loadLibrary(name);
+                       } catch (UnsatisfiedLinkError e2) {
+                               System.err.println("Cannot load the bindings to the "+name+" library in path "+getPath());
+                               e.printStackTrace();
+                               System.err.println("This jar file does not seem to fit your system, and I cannot find an installation of SimGrid.");
+                               System.exit(1);
+                       }
                }
        }
 
-       private static void loadLib (String name) {
+       private static void loadLib (String name) throws SimGridLibNotFoundException {
                String Path = NativeLib.getPath();
 
                String filename=name;
@@ -67,7 +74,7 @@ public final class NativeLib {
                        in =  NativeLib.class.getClassLoader().getResourceAsStream(Path+filename);
                }  
                if (in == null) {
-                       throw new RuntimeException("Cannot find library "+name+" in path "+Path+". Sorry, but this jar does not seem to be usable on your machine.");
+                       throw new SimGridLibNotFoundException("Cannot find library "+name+" in path "+Path+". Sorry, but this jar does not seem to be usable on your machine.");
                }
                try {
                        // We must write the lib onto the disk before loading it -- stupid operating systems
@@ -89,10 +96,7 @@ public final class NativeLib {
                        System.load(fileOut.getAbsolutePath());
 
                } catch (Exception e) {
-                       System.err.println("Cannot load the bindings to the "+name+" library in path "+getPath());
-                       e.printStackTrace();
-                       System.err.println("This jar file does not seem to fit your system, sorry");
-                       System.exit(1);
+                       throw new SimGridLibNotFoundException("Cannot load the bindings to the "+name+" library in path "+getPath(),   e);
                }
        }
 
@@ -121,3 +125,14 @@ public final class NativeLib {
                        System.out.println("This java library will try to load the native code under the following name:\n" +getPath());
        }
 }
+
+class SimGridLibNotFoundException extends Exception {
+       private static final long serialVersionUID = 1L;
+       public SimGridLibNotFoundException(String msg) {
+               super(msg);
+       }
+
+       public SimGridLibNotFoundException(String msg, Exception e) {
+               super(msg,e);
+       }
+}
\ No newline at end of file
index 49e7ac3..9e0ec6f 100644 (file)
@@ -90,8 +90,8 @@ public class RngStream {
        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
+        * in RngStream_SetSeed), nor the values of Bg and Ig associated with this stream. If e &gt; 0, then
+        * k = 2e + c; if e &lt; 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);
@@ -116,4 +116,4 @@ public class RngStream {
                Msg.nativeInit();
                nativeInit();
        }
-}
\ No newline at end of file
+}
index 1b79501..d9ccd5a 100644 (file)
@@ -47,10 +47,10 @@ public class Storage {
         *
         * @return              The storage object with the given name.
         * @exception           StorageNotFoundException if the name of the storage is not valid.
-        *                                      NativeException if the native version of this method failed.
+        * @exception           NativeException if the native version of this method failed.
         */ 
        public native static Storage getByName(String name) 
-                       throws HostNotFoundException, NullPointerException;
+                       throws HostNotFoundException, NullPointerException, NativeException, StorageNotFoundException;
 
        /**
         * This method returns the name of a storage.
@@ -120,4 +120,4 @@ public class Storage {
                nativeInit();
        }               
 
-}
\ No newline at end of file
+}
index 0ee65c4..46f568a 100644 (file)
@@ -42,11 +42,11 @@ public class 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.
+        *                              This value has to be &ge; 0.
         *
         * @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.
+        *                              This value has to be &ge; 0.
         */ 
        public Task(String name, double flopsAmount, double bytesAmount) {
                create(name, flopsAmount, bytesAmount);
@@ -199,7 +199,7 @@ public class Task {
         * @throws HostFailureException 
         * @throws TransferFailureException 
         */
-       public void send(String mailbox) throws TransferFailureException, HostFailureException, TimeoutException {
+       public void send(String mailbox) throws TransferFailureException, HostFailureException, TimeoutException, NativeException {
                send(mailbox, -1);
        } 
 
@@ -213,7 +213,7 @@ public class Task {
         * @throws HostFailureException 
         * @throws TransferFailureException 
         */
-       public native void send(String mailbox, double timeout) throws TransferFailureException, HostFailureException, TimeoutException;
+       public native void send(String mailbox, double timeout) throws TransferFailureException, HostFailureException, TimeoutException, NativeException;
 
        /** Sends the task on the specified mailbox (capping the sending rate to \a maxrate) 
         *
index aa2dc2d..a985f6b 100644 (file)
@@ -61,9 +61,9 @@ int console_close(lua_State *L) {
   /* Initialize MSG and WKS hosts */
   XBT_DEBUG("Initialize MSG and WKS hosts");
   xbt_lib_foreach(host_lib, cursor, name, data) {
-    if(data[SURF_WKS_LEVEL]){
+    if(data[SURF_HOST_LEVEL]){
       XBT_DEBUG("\tSee surf host %s",name);
-      SIMIX_host_create(name, data[SURF_WKS_LEVEL], NULL);
+      SIMIX_host_create(name, NULL);
       __MSG_host_create((smx_host_t)data[SIMIX_HOST_LEVEL]);
     }
   }
index c5eb402..db96b75 100644 (file)
@@ -72,7 +72,7 @@ XBT_PUBLIC(void) sg_platf_mstorage_add_cb(sg_platf_mstorage_cb_t fct);
 XBT_PUBLIC(void) sg_platf_storage_type_add_cb(sg_platf_storage_type_cb_t fct);
 XBT_PUBLIC(void) sg_platf_mount_add_cb(sg_platf_mount_cb_t fct);
 
-/** \brief Pick the right models for CPU, net and workstation, and call their model_init_preparse
+/** \brief Pick the right models for CPU, net and host, and call their model_init_preparse
  *
  * Must be called within parsing/creating the environment (after the <config>s, if any, and before <AS> or friends such as <cluster>)
  */
index fd80b13..98b848f 100644 (file)
@@ -47,13 +47,13 @@ typedef enum {
 #ifdef __cplusplus
 class Model;
 class CpuModel;
-class WorkstationModel;
-class WorkstationVMModel;
+class HostModel;
+class VMModel;
 class NetworkModel;
 class StorageModel;
 class Resource;
 class ResourceLmm;
-class WorkstationCLM03;
+class HostCLM03;
 class NetworkCm02Link;
 class Cpu;
 class Action;
@@ -65,13 +65,13 @@ class RoutingPlatf;
 #else
 typedef struct Model Model;
 typedef struct CpuModel CpuModel;
-typedef struct WorkstationModel WorkstationModel;
-typedef struct WorkstationVMModel WorkstationVMModel;
+typedef struct HostModel HostModel;
+typedef struct VMModel VMModel;
 typedef struct NetworkModel NetworkModel;
 typedef struct StorageModel StorageModel;
 typedef struct Resource Resource;
 typedef struct ResourceLmm ResourceLmm;
-typedef struct WorkstationCLM03 WorkstationCLM03;
+typedef struct HostCLM03 HostCLM03;
 typedef struct NetworkCm02Link NetworkCm02Link;
 typedef struct Cpu Cpu;
 typedef struct Action Action;
@@ -85,20 +85,20 @@ typedef struct RoutingPlatf RoutingPlatf;
 /** @ingroup SURF_c_bindings
  *  \brief Model datatype
  *
- *  Generic data structure for a model. The workstations,
+ *  Generic data structure for a model. The hosts,
  *  the CPUs and the network links are examples of models.
  */
 typedef Model *surf_model_t;
 typedef CpuModel *surf_cpu_model_t;
-typedef WorkstationModel *surf_workstation_model_t;
-typedef WorkstationVMModel *surf_vm_workstation_model_t;
+typedef HostModel *surf_host_model_t;
+typedef VMModel *surf_vm_model_t;
 
 typedef NetworkModel *surf_network_model_t;
 typedef StorageModel *surf_storage_model_t;
 
 typedef xbt_dictelm_t surf_resource_t;
 typedef Resource *surf_cpp_resource_t;
-typedef WorkstationCLM03 *surf_workstation_CLM03_t;
+typedef HostCLM03 *surf_host_CLM03_t;
 typedef NetworkCm02Link *surf_network_link_t;
 typedef Cpu *surf_cpu_t;
 
@@ -189,8 +189,8 @@ XBT_PUBLIC_DATA(routing_platf_t) routing_platf;
 static inline void *surf_cpu_resource_priv(const void *host) {
   return xbt_lib_get_level((xbt_dictelm_t)host, SURF_CPU_LEVEL);
 }
-static inline void *surf_workstation_resource_priv(const void *host){
-  return (void*)xbt_lib_get_level((xbt_dictelm_t)host, SURF_WKS_LEVEL);
+static inline void *surf_host_resource_priv(const void *host){
+  return (void*)xbt_lib_get_level((xbt_dictelm_t)host, SURF_HOST_LEVEL);
 }
 static inline void *surf_routing_resource_priv(const void *host){
   return (void*)xbt_lib_get_level((xbt_dictelm_t)host, ROUTING_HOST_LEVEL);
@@ -202,7 +202,7 @@ static inline void *surf_storage_resource_priv(const void *storage){
 static inline void *surf_cpu_resource_by_name(const char *name) {
   return xbt_lib_get_elm_or_null(host_lib, name);
 }
-static inline void *surf_workstation_resource_by_name(const char *name){
+static inline void *surf_host_resource_by_name(const char *name){
   return xbt_lib_get_elm_or_null(host_lib, name);
 }
 static inline void *surf_storage_resource_by_name(const char *name){
@@ -269,16 +269,16 @@ XBT_PUBLIC(int) surf_model_running_action_set_size(surf_model_t model);
  * @details [long description]
  *
  * @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 host_nb The number of hosts
+ * @param host_list The list of hosts on which the task is executed
  * @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,
+XBT_PUBLIC(surf_action_t) surf_host_model_execute_parallel_task(surf_host_model_t model,
+                                                   int host_nb,
+                                            void **host_list,
                                             double *flops_amount,
                                             double *bytes_amount,
                                             double rate);
@@ -293,7 +293,7 @@ XBT_PUBLIC(surf_action_t) surf_workstation_model_execute_parallel_task(surf_work
  * @param rate [description]
  * @return The action corresponding to the communication
  */
-XBT_PUBLIC(surf_action_t) surf_workstation_model_communicate(surf_workstation_model_t model, surf_resource_t src, surf_resource_t dst, double size, double rate);
+XBT_PUBLIC(surf_action_t) surf_host_model_communicate(surf_host_model_t model, surf_resource_t src, surf_resource_t dst, double size, double rate);
 
 /**
  * @brief Get the route between two hosts
@@ -304,15 +304,15 @@ XBT_PUBLIC(surf_action_t) surf_workstation_model_communicate(surf_workstation_mo
  * @param dst The destination host
  * @return The list of [TODO] from the source to the host
  */
-XBT_PUBLIC(xbt_dynar_t) surf_workstation_model_get_route(surf_workstation_model_t model, surf_resource_t src, surf_resource_t dst);
+XBT_PUBLIC(xbt_dynar_t) surf_host_model_get_route(surf_host_model_t model, surf_resource_t src, surf_resource_t dst);
 
 /**
  * @brief Create a new VM on the specified host
  *
- * @param name The name of the workstation
- * @param ind_phys_host The host on which the VM is created
+ * @param name The name of the VM
+ * @param host_PM The host on which the VM is created
  */
-XBT_PUBLIC(void) surf_vm_workstation_model_create(const char *name, surf_resource_t ind_phys_host);
+XBT_PUBLIC(void) surf_vm_model_create(const char *name, surf_resource_t host_PM);
 
 /**
  * @brief Create a communication between two routing edges [TODO]
@@ -328,7 +328,7 @@ XBT_PUBLIC(void) surf_vm_workstation_model_create(const char *name, surf_resourc
 XBT_PUBLIC(surf_action_t) surf_network_model_communicate(surf_network_model_t model, sg_routing_edge_t src, sg_routing_edge_t dst, double size, double rate);
 
 /**
- * @brief Get the name of a surf resource (cpu, workstation, network, â€¦)
+ * @brief Get the name of a surf resource (cpu, host, network, â€¦)
  *
  * @param resource The surf resource
  * @return The name of the surf resource
@@ -336,7 +336,7 @@ XBT_PUBLIC(surf_action_t) surf_network_model_communicate(surf_network_model_t mo
 XBT_PUBLIC(const char * ) surf_resource_name(surf_cpp_resource_t resource);
 
 /**
- * @brief Get the properties of a surf resource (cpu, workstation, network, â€¦)
+ * @brief Get the properties of a surf resource (cpu, host, network, â€¦)
  *
  * @param resource The surf resource
  * @return The properties of the surf resource
@@ -344,7 +344,7 @@ XBT_PUBLIC(const char * ) surf_resource_name(surf_cpp_resource_t resource);
 XBT_PUBLIC(xbt_dict_t) surf_resource_get_properties(surf_cpp_resource_t resource);
 
 /**
- * @brief Get the state of a surf resource (cpu, workstation, network, â€¦)
+ * @brief Get the state of a surf resource (cpu, host, network, â€¦)
  *
  * @param resource The surf resource
  * @return The state of the surf resource
@@ -352,7 +352,7 @@ XBT_PUBLIC(xbt_dict_t) surf_resource_get_properties(surf_cpp_resource_t resource
 XBT_PUBLIC(e_surf_resource_state_t) surf_resource_get_state(surf_cpp_resource_t resource);
 
 /**
- * @brief Set the state of a surf resource (cpu, workstation, network, â€¦)
+ * @brief Set the state of a surf resource (cpu, host, network, â€¦)
  *
  * @param resource The surf resource
  * @param state The new state of the surf resource
@@ -360,88 +360,88 @@ XBT_PUBLIC(e_surf_resource_state_t) surf_resource_get_state(surf_cpp_resource_t
 XBT_PUBLIC(void) surf_resource_set_state(surf_cpp_resource_t resource, e_surf_resource_state_t state);
 
 /**
- * @brief Get the speed of the cpu associtated to a workstation
+ * @brief Get the speed of the cpu associated to a host
  *
- * @param resource The surf workstation
+ * @param resource The surf host
  * @param load [description]
  *
  * @return [description]
  */
-XBT_PUBLIC(double) surf_workstation_get_speed(surf_resource_t resource, double load);
+XBT_PUBLIC(double) surf_host_get_speed(surf_resource_t resource, double load);
 
 /**
- * @brief Get the available speed of cpu associtated to a workstation
+ * @brief Get the available speed of cpu associated to a host
  *
- * @param resource The surf workstation
+ * @param resource The surf host
  * @return [description]
  */
-XBT_PUBLIC(double) surf_workstation_get_available_speed(surf_resource_t resource);
+XBT_PUBLIC(double) surf_host_get_available_speed(surf_resource_t resource);
 
 /**
- * @brief Get the number of cores of the cpu associated to a workstation
+ * @brief Get the number of cores of the cpu associated to a host
  *
- * @param resource The surf workstation
+ * @param resource The surf host
  * @return The number of cores
  */
-XBT_PUBLIC(int) surf_workstation_get_core(surf_resource_t resource);
+XBT_PUBLIC(int) surf_host_get_core(surf_resource_t resource);
 
 /**
  * @brief Execute some quantity of computation
  *
- * @param resource The surf workstation
+ * @param resource The surf host
  * @param size The value of the processing amount (in flop) needed to process
  *
  * @return The surf action corresponding to the processing
  */
-XBT_PUBLIC(surf_action_t) surf_workstation_execute(surf_resource_t resource, double size);
+XBT_PUBLIC(surf_action_t) surf_host_execute(surf_resource_t resource, double size);
 
 /**
- * @brief Make the workstation sleep
+ * @brief Make the host sleep
  *
- * @param resource The surf workstation
+ * @param resource The surf host
  * @param duration The number of seconds to sleep
  * @return The surf action corresponding to the sleep
  */
-XBT_PUBLIC(surf_action_t) surf_workstation_sleep(surf_resource_t resource, double duration);
+XBT_PUBLIC(surf_action_t) surf_host_sleep(surf_resource_t resource, double duration);
 
 /**
- * @brief Open a file on a workstation
+ * @brief Open a file on an host
  *
- * @param workstation The surf workstation
+ * @param host The surf host
  * @param fullpath The path to the file
  * @return The surf action corresponding to the openning
  */
-XBT_PUBLIC(surf_action_t) surf_workstation_open(surf_resource_t workstation, const char* fullpath);
+XBT_PUBLIC(surf_action_t) surf_host_open(surf_resource_t host, const char* fullpath);
 
 /**
- * @brief Close a file descriptor on a workstation
+ * @brief Close a file descriptor on an host
  *
- * @param workstation The surf workstation
+ * @param host The surf host
  * @param fd The file descriptor
  *
  * @return The surf action corresponding to the closing
  */
-XBT_PUBLIC(surf_action_t) surf_workstation_close(surf_resource_t workstation, surf_file_t fd);
+XBT_PUBLIC(surf_action_t) surf_host_close(surf_resource_t host, surf_file_t fd);
 
 /**
  * @brief Read a file
  *
- * @param resource The surf workstation
+ * @param host The surf host
  * @param fd The file descriptor to read
  * @param size The size in bytes to read
  * @return The surf action corresponding to the reading
  */
-XBT_PUBLIC(surf_action_t) surf_workstation_read(surf_resource_t resource, surf_file_t fd, sg_size_t size);
+XBT_PUBLIC(surf_action_t) surf_host_read(surf_resource_t host, surf_file_t fd, sg_size_t size);
 
 /**
  * @brief Write a file
  *
- * @param resource The surf workstation
+ * @param host The surf host
  * @param fd The file descriptor to write
  * @param size The size in bytes to write
  * @return The surf action corresponding to the writing
  */
-XBT_PUBLIC(surf_action_t) surf_workstation_write(surf_resource_t resource, surf_file_t fd, sg_size_t size);
+XBT_PUBLIC(surf_action_t) surf_host_write(surf_resource_t host, surf_file_t fd, sg_size_t size);
 
 /**
  * @brief Get the informations of a file descriptor
@@ -452,37 +452,37 @@ XBT_PUBLIC(surf_action_t) surf_workstation_write(surf_resource_t resource, surf_
  *  - the storage typeId,
  *  - the storage content type
  *
- * @param resource The surf workstation
+ * @param host The surf host
  * @param fd The file descriptor
  * @return An xbt_dynar_t with the file informations
  */
-XBT_PUBLIC(xbt_dynar_t) surf_workstation_get_info(surf_resource_t resource, surf_file_t fd);
+XBT_PUBLIC(xbt_dynar_t) surf_host_get_info(surf_resource_t host, surf_file_t fd);
 
 /**
  * @brief Get the available space of the storage at the mount point
  *
- * @param resource The surf workstation
+ * @param resource The surf host
  * @param name The mount point
- * @return The amount of availble space in bytes
+ * @return The amount of available space in bytes
  */
-XBT_PUBLIC(sg_size_t) surf_workstation_get_free_size(surf_resource_t resource, const char* name);
+XBT_PUBLIC(sg_size_t) surf_host_get_free_size(surf_resource_t resource, const char* name);
 
 /**
  * @brief Get the used space of the storage at the mount point
  *
- * @param resource The surf workstation
+ * @param resource The surf host
  * @param name The mount point
  * @return The amount of used space in bytes
  */
-XBT_PUBLIC(sg_size_t) surf_workstation_get_used_size(surf_resource_t resource, const char* name);
+XBT_PUBLIC(sg_size_t) surf_host_get_used_size(surf_resource_t resource, const char* name);
 
 /**
- * @brief Get the VMs hosted on the workstation
+ * @brief Get the VMs hosted on the host
  *
- * @param resource The surf workstation
- * @return The list of VMs on the workstation
+ * @param resource The surf host
+ * @return The list of VMs on the host
  */
-XBT_PUBLIC(xbt_dynar_t) surf_workstation_get_vms(surf_resource_t resource);
+XBT_PUBLIC(xbt_dynar_t) surf_host_get_vms(surf_resource_t resource);
 
 /**
  * @brief [brief description]
@@ -491,7 +491,7 @@ XBT_PUBLIC(xbt_dynar_t) surf_workstation_get_vms(surf_resource_t resource);
  * @param resource [description]
  * @param params [description]
  */
-XBT_PUBLIC(void) surf_workstation_get_params(surf_resource_t resource, ws_params_t params);
+XBT_PUBLIC(void) surf_host_get_params(surf_resource_t resource, ws_params_t params);
 
 /**
  * @brief [brief description]
@@ -500,58 +500,58 @@ XBT_PUBLIC(void) surf_workstation_get_params(surf_resource_t resource, ws_params
  * @param resource [description]
  * @param params [description]
  */
-XBT_PUBLIC(void) surf_workstation_set_params(surf_resource_t resource, ws_params_t params);
+XBT_PUBLIC(void) surf_host_set_params(surf_resource_t resource, ws_params_t params);
 
 /**
- * @brief Destroy a Workstation VM
+ * @brief Destroy a VM
  *
- * @param resource The surf workstation vm
+ * @param resource The surf vm
  */
-XBT_PUBLIC(void) surf_vm_workstation_destroy(surf_resource_t resource);
+XBT_PUBLIC(void) surf_vm_destroy(surf_resource_t resource);
 
 /**
- * @brief Suspend a Workstation VM
+ * @brief Suspend a VM
  *
- * @param resource The surf workstation vm
+ * @param resource The surf vm
  */
-XBT_PUBLIC(void) surf_vm_workstation_suspend(surf_resource_t resource);
+XBT_PUBLIC(void) surf_vm_suspend(surf_resource_t resource);
 
 /**
- * @brief Resume a Workstation VM
+ * @brief Resume a VM
  *
- * @param resource The surf workstation vm
+ * @param resource The surf vm
  */
-XBT_PUBLIC(void) surf_vm_workstation_resume(surf_resource_t resource);
+XBT_PUBLIC(void) surf_vm_resume(surf_resource_t resource);
 
 /**
- * @brief Save the Workstation VM (Not yet implemented)
+ * @brief Save the VM (Not yet implemented)
  *
- * @param resource The surf workstation vm
+ * @param resource The surf vm
  */
-XBT_PUBLIC(void) surf_vm_workstation_save(surf_resource_t resource);
+XBT_PUBLIC(void) surf_vm_save(surf_resource_t resource);
 
 /**
- * @brief Restore the Workstation VM (Not yet implemented)
+ * @brief Restore the VM (Not yet implemented)
  *
- * @param resource The surf workstation vm
+ * @param resource The surf vm
  */
-XBT_PUBLIC(void) surf_vm_workstation_restore(surf_resource_t resource);
+XBT_PUBLIC(void) surf_vm_restore(surf_resource_t resource);
 
 /**
  * @brief Migrate the VM to the destination host
  *
- * @param resource The surf workstation vm
+ * @param resource The surf vm
  * @param ind_vm_ws_dest The destination host
  */
-XBT_PUBLIC(void) surf_vm_workstation_migrate(surf_resource_t resource, surf_resource_t ind_vm_ws_dest);
+XBT_PUBLIC(void) surf_vm_migrate(surf_resource_t resource, surf_resource_t ind_vm_ws_dest);
 
 /**
  * @brief Get the physical machine hosting the VM
  *
- * @param resource The surf workstation vm
+ * @param resource The surf vm
  * @return The physical machine hosting the VM
  */
-XBT_PUBLIC(surf_resource_t) surf_vm_workstation_get_pm(surf_resource_t resource);
+XBT_PUBLIC(surf_resource_t) surf_vm_get_pm(surf_resource_t resource);
 
 /**
  * @brief [brief description]
@@ -560,7 +560,7 @@ XBT_PUBLIC(surf_resource_t) surf_vm_workstation_get_pm(surf_resource_t resource)
  * @param resource [description]
  * @param bound [description]
  */
-XBT_PUBLIC(void) surf_vm_workstation_set_bound(surf_resource_t resource, double bound);
+XBT_PUBLIC(void) surf_vm_set_bound(surf_resource_t resource, double bound);
 
 /**
  * @brief [brief description]
@@ -570,7 +570,7 @@ XBT_PUBLIC(void) surf_vm_workstation_set_bound(surf_resource_t resource, double
  * @param cpu [description]
  * @param mask [description]
  */
-XBT_PUBLIC(void) surf_vm_workstation_set_affinity(surf_resource_t resource, surf_resource_t cpu, unsigned long mask);
+XBT_PUBLIC(void) surf_vm_set_affinity(surf_resource_t resource, surf_resource_t cpu, unsigned long mask);
 
 /**
  * @brief Execute some quantity of computation
@@ -592,13 +592,13 @@ XBT_PUBLIC(surf_action_t) surf_cpu_execute(surf_resource_t cpu, double size);
 XBT_PUBLIC(surf_action_t) surf_cpu_sleep(surf_resource_t cpu, double duration);
 
 /**
- * @brief Get the workstation power peak
+ * @brief Get the host power peak
  * @details [long description]
  *
- * @param host The surf workstation
+ * @param host The surf host
  * @return The power peak
  */
-XBT_PUBLIC(double) surf_workstation_get_current_power_peak(surf_resource_t host);
+XBT_PUBLIC(double) surf_host_get_current_power_peak(surf_resource_t host);
 
 /**
  * @brief [brief description]
@@ -609,7 +609,7 @@ XBT_PUBLIC(double) surf_workstation_get_current_power_peak(surf_resource_t host)
  *
  * @return [description]
  */
-XBT_PUBLIC(double) surf_workstation_get_power_peak_at(surf_resource_t host, int pstate_index);
+XBT_PUBLIC(double) surf_host_get_power_peak_at(surf_resource_t host, int pstate_index);
 
 /**
  * @brief [brief description]
@@ -618,83 +618,83 @@ XBT_PUBLIC(double) surf_workstation_get_power_peak_at(surf_resource_t host, int
  * @param host [description]
  * @return [description]
  */
-XBT_PUBLIC(int) surf_workstation_get_nb_pstates(surf_resource_t host);
+XBT_PUBLIC(int) surf_host_get_nb_pstates(surf_resource_t host);
 
-XBT_PUBLIC(void) surf_workstation_set_pstate(surf_resource_t host, int pstate_index);
-XBT_PUBLIC(int) surf_workstation_get_pstate(surf_resource_t host);
-XBT_PUBLIC(double) surf_workstation_get_wattmin_at(surf_resource_t resource, int pstate);
-XBT_PUBLIC(double) surf_workstation_get_wattmax_at(surf_resource_t resource, int pstate);
+XBT_PUBLIC(void) surf_host_set_pstate(surf_resource_t host, int pstate_index);
+XBT_PUBLIC(int) surf_host_get_pstate(surf_resource_t host);
+XBT_PUBLIC(double) surf_host_get_wattmin_at(surf_resource_t resource, int pstate);
+XBT_PUBLIC(double) surf_host_get_wattmax_at(surf_resource_t resource, int pstate);
 
 /**
- * @brief Get the consumed energy (in joules) of a workstation
+ * @brief Get the consumed energy (in joules) of an host
  *
- * @param host The surf workstation
+ * @param host The surf host
  * @return The consumed energy
  */
-XBT_PUBLIC(double) surf_workstation_get_consumed_energy(surf_resource_t host);
+XBT_PUBLIC(double) surf_host_get_consumed_energy(surf_resource_t host);
 
 /**
- * @brief Get the list of storages mounted on a workstation
+ * @brief Get the list of storages mounted on an host
  *
- * @param workstation The surf workstation
+ * @param host The surf host
  * @return Dictionary of mount point, Storage
  */
-XBT_PUBLIC(xbt_dict_t) surf_workstation_get_mounted_storage_list(surf_resource_t workstation);
+XBT_PUBLIC(xbt_dict_t) surf_host_get_mounted_storage_list(surf_resource_t host);
 
 /**
- * @brief Get the list of storages attached to a workstation
+ * @brief Get the list of storages attached to an host
  *
- * @param workstation The surf workstation
+ * @param host The surf host
  * @return Dictionary of storage
  */
-XBT_PUBLIC(xbt_dynar_t) surf_workstation_get_attached_storage_list(surf_resource_t workstation);
+XBT_PUBLIC(xbt_dynar_t) surf_host_get_attached_storage_list(surf_resource_t host);
 
 /**
  * @brief Unlink a file descriptor
  *
- * @param workstation The surf workstation
+ * @param host The surf host
  * @param fd The file descriptor
  *
  * @return 0 if failed to unlink, 1 otherwise
  */
-XBT_PUBLIC(int) surf_workstation_unlink(surf_resource_t workstation, surf_file_t fd);
+XBT_PUBLIC(int) surf_host_unlink(surf_resource_t host, surf_file_t fd);
 
 /**
- * @brief Get the size of a file on a workstation
+ * @brief Get the size of a file on a host
  *
- * @param workstation The surf workstation
+ * @param host The surf host
  * @param fd The file descriptor
  *
  * @return The size in bytes of the file
  */
-XBT_PUBLIC(size_t) surf_workstation_get_size(surf_resource_t workstation, surf_file_t fd);
+XBT_PUBLIC(size_t) surf_host_get_size(surf_resource_t host, surf_file_t fd);
 
 /**
  * @brief Get the current position of the file descriptor
  *
- * @param workstation The surf workstation
+ * @param host The surf host
  * @param fd The file descriptor
  * @return The current position of the file descriptor
  */
-XBT_PUBLIC(size_t) surf_workstation_file_tell(surf_resource_t workstation, surf_file_t fd);
+XBT_PUBLIC(size_t) surf_host_file_tell(surf_resource_t host, surf_file_t fd);
 
 /**
  * @brief Move a file to another location on the *same mount point*.
  * @details [long description]
  *
- * @param workstation The surf workstation
+ * @param host The surf host
  * @param fd The file descriptor
  * @param fullpath The new full path
  *
  * @return MSG_OK if successful, otherwise MSG_TASK_CANCELED
  */
-XBT_PUBLIC(int) surf_workstation_file_move(surf_resource_t workstation, surf_file_t fd, const char* fullpath);
+XBT_PUBLIC(int) surf_host_file_move(surf_resource_t host, surf_file_t fd, const char* fullpath);
 
 /**
  * @brief Set the position indictator assiociated with the file descriptor to a new position
  * @details [long description]
  *
- * @param workstation The surf workstation
+ * @param host The surf host
  * @param fd The file descriptor
  * @param offset The offset from the origin
  * @param origin Position used as a reference for the offset
@@ -703,7 +703,7 @@ XBT_PUBLIC(int) surf_workstation_file_move(surf_resource_t workstation, surf_fil
  *  - SEEK_END: end of the file
  * @return MSG_OK if successful, otherwise MSG_TASK_CANCELED
  */
-XBT_PUBLIC(int) surf_workstation_file_seek(surf_resource_t workstation,
+XBT_PUBLIC(int) surf_host_file_seek(surf_resource_t host,
                                            surf_file_t fd, sg_offset_t offset,
                                            int origin);
 
@@ -986,7 +986,7 @@ XBT_PUBLIC_DATA(s_surf_model_description_t) surf_cpu_model_description[];
  *  \brief The network model
  *
  *  When creating a new API on top on SURF, you shouldn't use the
- *  network model unless you know what you are doing. Only the workstation
+ *  network model unless you know what you are doing. Only the host
  *  model should be accessed because depending on the platform model,
  *  the network model can be NULL.
  */
@@ -1000,7 +1000,7 @@ XBT_PUBLIC_DATA(surf_network_model_t) surf_network_model;
  * size (< 1KiB, < 64KiB, >= 64KiB).
  * See comments in the code for more information.
  *
- *  \see surf_workstation_model_init_SMPI()
+ *  \see surf_host_model_init_SMPI()
  */
 XBT_PUBLIC(void) surf_network_model_init_SMPI(void);
 
@@ -1010,7 +1010,7 @@ XBT_PUBLIC(void) surf_network_model_init_SMPI(void);
  * This model impelments a variant of the contention model on Infinband networks based on
  * the works of Jérôme Vienne : http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf
  *
- *  \see surf_workstation_model_init_IB()
+ *  \see surf_host_model_init_IB()
  */
 XBT_PUBLIC(void) surf_network_model_init_IB(void);
 
@@ -1021,7 +1021,7 @@ XBT_PUBLIC(void) surf_network_model_init_IB(void);
  * the results obtained with the GTNets simulator for onelink and
  * dogbone sharing scenarios. See comments in the code for more information.
  *
- *  \see surf_workstation_model_init_LegrandVelho()
+ *  \see surf_host_model_init_LegrandVelho()
  */
 XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(void);
 
@@ -1032,9 +1032,9 @@ XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(void);
  *  constant, hence no need for a routing table. This is particularly
  *  usefull when simulating huge distributed algorithms where
  *  scalability is really an issue. This function is called in
- *  conjunction with surf_workstation_model_init_compound.
+ *  conjunction with surf_host_model_init_compound.
  *
- *  \see surf_workstation_model_init_compound()
+ *  \see surf_host_model_init_compound()
  */
 XBT_PUBLIC(void) surf_network_model_init_Constant(void);
 
@@ -1042,7 +1042,7 @@ XBT_PUBLIC(void) surf_network_model_init_Constant(void);
  *  \brief Initializes the platform with the network model CM02
  *
  *  You sould call this function by yourself only if you plan using
- *  surf_workstation_model_init_compound.
+ *  surf_host_model_init_compound.
  *  See comments in the code for more information.
  */
 XBT_PUBLIC(void) surf_network_model_init_CM02(void);
@@ -1052,10 +1052,10 @@ XBT_PUBLIC(void) surf_network_model_init_CM02(void);
  *  \brief Initializes the platform with the network model GTNETS
  *  \param filename XML platform file name
  *
- *  This function is called by surf_workstation_model_init_GTNETS
- *  or by yourself only if you plan using surf_workstation_model_init_compound
+ *  This function is called by surf_host_model_init_GTNETS
+ *  or by yourself only if you plan using surf_host_model_init_compound
  *
- *  \see surf_workstation_model_init_GTNETS()
+ *  \see surf_host_model_init_GTNETS()
  */
 XBT_PUBLIC(void) surf_network_model_init_GTNETS(void);
 #endif
@@ -1065,10 +1065,10 @@ XBT_PUBLIC(void) surf_network_model_init_GTNETS(void);
  *  \brief Initializes the platform with the network model NS3
  *  \param filename XML platform file name
  *
- *  This function is called by surf_workstation_model_init_NS3
- *  or by yourself only if you plan using surf_workstation_model_init_compound
+ *  This function is called by surf_host_model_init_NS3
+ *  or by yourself only if you plan using surf_host_model_init_compound
  *
- *  \see surf_workstation_model_init_NS3()
+ *  \see surf_host_model_init_NS3()
  */
 XBT_PUBLIC(void) surf_network_model_init_NS3(void);
 #endif
@@ -1083,7 +1083,7 @@ XBT_PUBLIC(void) surf_network_model_init_NS3(void);
  *  [LOW03] S. H. Low. A duality model of TCP and queue management algorithms.
  *  IEEE/ACM Transaction on Networking, 11(4):525-536, 2003.
  *
- *  Call this function only if you plan using surf_workstation_model_init_compound.
+ *  Call this function only if you plan using surf_host_model_init_compound.
  *
  */
 XBT_PUBLIC(void) surf_network_model_init_Reno(void);
@@ -1098,7 +1098,7 @@ XBT_PUBLIC(void) surf_network_model_init_Reno(void);
  *  [LOW01] S. H. Low. A duality model of TCP and queue management algorithms.
  *  IEEE/ACM Transaction on Networking, 11(4):525-536, 2003.
  *
- *  Call this function only if you plan using surf_workstation_model_init_compound.
+ *  Call this function only if you plan using surf_host_model_init_compound.
  *
  */
 XBT_PUBLIC(void) surf_network_model_init_Reno2(void);
@@ -1114,7 +1114,7 @@ XBT_PUBLIC(void) surf_network_model_init_Reno2(void);
  *  [LOW03] S. H. Low. A duality model of TCP and queue management algorithms.
  *  IEEE/ACM Transaction on Networking, 11(4):525-536, 2003.
  *
- *  Call this function only if you plan using surf_workstation_model_init_compound.
+ *  Call this function only if you plan using surf_host_model_init_compound.
  *
  */
 XBT_PUBLIC(void) surf_network_model_init_Vegas(void);
@@ -1139,79 +1139,79 @@ XBT_PUBLIC_DATA(s_surf_model_description_t) surf_storage_model_description[];
 XBT_PUBLIC_DATA(surf_storage_model_t) surf_storage_model;
 
 /** \ingroup SURF_models
- *  \brief The workstation model
+ *  \brief The host model
  *
  *  Note that when you create an API on top of SURF,
- *  the workstation model should be the only one you use
+ *  the host model should be the only one you use
  *  because depending on the platform model, the network model and the CPU model
  *  may not exist.
  */
-XBT_PUBLIC_DATA(surf_workstation_model_t) surf_workstation_model;
+XBT_PUBLIC_DATA(surf_host_model_t) surf_host_model;
 
 /** \ingroup SURF_models
- *  \brief The vm_workstation model
+ *  \brief The vm model
  *
  *  Note that when you create an API on top of SURF,
- *  the vm_workstation model should be the only one you use
+ *  the vm model should be the only one you use
  *  because depending on the platform model, the network model and the CPU model
  *  may not exist.
  */
-XBT_PUBLIC_DATA(surf_vm_workstation_model_t) surf_vm_workstation_model;
+XBT_PUBLIC_DATA(surf_vm_model_t) surf_vm_model;
 
 /** \ingroup SURF_models
- *  \brief Initializes the platform with a compound workstation model
+ *  \brief Initializes the platform with a compound host model
  *
  *  This function should be called after a cpu_model and a
  *  network_model have been set up.
  *
  */
-XBT_PUBLIC(void) surf_workstation_model_init_compound(void);
+XBT_PUBLIC(void) surf_host_model_init_compound(void);
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the current best network and cpu models at hand
  *
- *  This platform model seperates the workstation model and the network model.
- *  The workstation model will be initialized with the model compound, the network
+ *  This platform model separates the host model and the network model.
+ *  The host model will be initialized with the model compound, the network
  *  model with the model LV08 (with cross traffic support) and the CPU model with
  *  the model Cas01.
  *  Such model is subject to modification with warning in the ChangeLog so monitor it!
  *
  */
-XBT_PUBLIC(void) surf_workstation_model_init_current_default(void);
+XBT_PUBLIC(void) surf_host_model_init_current_default(void);
 
 /** \ingroup SURF_models
- *  \brief Initializes the platform with the model KCCFLN05
+ *  \brief Initializes the platform with the model L07
  *
  *  With this model, only parallel tasks can be used. Resource sharing
  *  is done by identifying bottlenecks and giving an equal share of
  *  the model to each action.
  *
  */
-XBT_PUBLIC(void) surf_workstation_model_init_ptask_L07(void);
+XBT_PUBLIC(void) surf_host_model_init_ptask_L07(void);
 
 /** \ingroup SURF_models
- *  \brief The list of all available workstation model models
+ *  \brief The list of all available host model models
  */
 XBT_PUBLIC_DATA(s_surf_model_description_t)
-    surf_workstation_model_description[];
+    surf_host_model_description[];
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the current best network and cpu models at hand
  *
- *  This platform model seperates the workstation model and the network model.
- *  The workstation model will be initialized with the model compound, the network
+ *  This platform model seperates the host model and the network model.
+ *  The host model will be initialized with the model compound, the network
  *  model with the model LV08 (with cross traffic support) and the CPU model with
  *  the model Cas01.
  *  Such model is subject to modification with warning in the ChangeLog so monitor it!
  *
  */
-XBT_PUBLIC(void) surf_vm_workstation_model_init_HL13(void);
+XBT_PUBLIC(void) surf_vm_model_init_HL13(void);
 
 /** \ingroup SURF_models
- *  \brief The list of all available vm workstation model models
+ *  \brief The list of all available vm model models
  */
 XBT_PUBLIC_DATA(s_surf_model_description_t)
-    surf_vm_workstation_model_description[];
+    surf_vm_model_description[];
 
 /*******************************************/
 
@@ -1256,9 +1256,9 @@ XBT_PUBLIC_DATA(e_surf_network_element_type_t) surf_routing_edge_get_rc_type(sg_
  *  This function has to be called to initialize the common
  *  structures.  Then you will have to create the environment by
  *  calling
- *  e.g. surf_workstation_model_init_CM02()
+ *  e.g. surf_host_model_init_CM02()
  *
- *  \see surf_workstation_model_init_CM02(), surf_workstation_model_init_compound(), surf_exit()
+ *  \see surf_host_model_init_CM02(), surf_host_model_init_compound(), surf_exit()
  */
 XBT_PUBLIC(void) surf_init(int *argc, char **argv);     /* initialize common structures */
 
index 2db53d2..f955263 100644 (file)
@@ -37,6 +37,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_config, instr, "Configuration");
 #define OPT_VIVA_CAT_CONF        "viva/categorized"
 #define OPT_TRACING_DISABLE_LINK        "tracing/disable_link"
 #define OPT_TRACING_DISABLE_POWER       "tracing/disable_power"
+#define OPT_TRACING_PRECISION     "tracing/precision"
 
 static int trace_enabled = 0;
 static int trace_platform;
@@ -57,6 +58,7 @@ static int trace_basic;
 static int trace_display_sizes = 0;
 static int trace_disable_link;
 static int trace_disable_power;
+static int trace_precision;
 
 static int trace_configured = 0;
 static int trace_active = 0;
@@ -84,6 +86,7 @@ static void TRACE_getopts(void)
   trace_display_sizes = xbt_cfg_get_boolean(_sg_cfg_set, OPT_TRACING_DISPLAY_SIZES);
   trace_disable_link = xbt_cfg_get_boolean(_sg_cfg_set, OPT_TRACING_DISABLE_LINK);
   trace_disable_power = xbt_cfg_get_boolean(_sg_cfg_set, OPT_TRACING_DISABLE_POWER);
+  trace_precision = xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_PRECISION);
 }
 
 static xbt_dynar_t TRACE_start_functions = NULL;
@@ -335,6 +338,11 @@ char *TRACE_get_comment_file (void)
   return xbt_cfg_get_string(_sg_cfg_set, OPT_TRACING_COMMENT_FILE);
 }
 
+int TRACE_precision (void)
+{
+  return xbt_cfg_get_int(_sg_cfg_set, OPT_TRACING_PRECISION);
+}
+
 char *TRACE_get_filename(void)
 {
   return xbt_cfg_get_string(_sg_cfg_set, OPT_TRACING_FILENAME);
@@ -499,6 +507,12 @@ void TRACE_global_init(int *argc, char **argv)
                    xbt_cfgelm_string, 1, 1, NULL, NULL);
   xbt_cfg_setdefault_string(_sg_cfg_set, OPT_TRACING_COMMENT_FILE, "");
 
+  /* trace timestamp precision */
+  xbt_cfg_register(&_sg_cfg_set, OPT_TRACING_PRECISION,
+                   "Numerical precision used when timestamping events (hence this value is expressed in number of digits after decimal point)",
+                   xbt_cfgelm_int, 1, 1, NULL, NULL);
+  xbt_cfg_setdefault_int(_sg_cfg_set, OPT_TRACING_PRECISION, 6);
+
   /* Viva graph configuration for uncategorized tracing */
   xbt_cfg_register(&_sg_cfg_set, OPT_VIVA_UNCAT_CONF,
                    "Viva Graph configuration file for uncategorized resource utilization traces.",
index e99bb30..ae6cb79 100644 (file)
@@ -12,7 +12,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_trace, instr_trace, "tracing event sy
 extern FILE * tracing_file;
 extern s_instr_trace_writer_t active_writer;
 
-
 void TRACE_paje_init(void)
 {
   active_writer.print_DefineContainerType=print_pajeDefineContainerType;
@@ -140,7 +139,7 @@ void print_pajeDefineEntityValue (paje_event_t event)
 
 void print_pajeCreateContainer(paje_event_t event)
 {
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
   if (event->timestamp == 0){
     fprintf(tracing_file, "%d 0 %s %s %s \"%s\"\n",
         (int)event->event_type,
@@ -149,8 +148,9 @@ void print_pajeCreateContainer(paje_event_t event)
         ((createContainer_t)event->data)->container->father->id,
         ((createContainer_t)event->data)->container->name);
   }else{
-    fprintf(tracing_file, "%d %f %s %s %s \"%s\"\n",
+    fprintf(tracing_file, "%d %.*f %s %s %s \"%s\"\n",
         (int)event->event_type,
+        TRACE_precision(),
         event->timestamp,
         ((createContainer_t)event->data)->container->id,
         ((createContainer_t)event->data)->container->type->id,
@@ -161,15 +161,16 @@ void print_pajeCreateContainer(paje_event_t event)
 
 void print_pajeDestroyContainer(paje_event_t event)
 {
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
   if (event->timestamp == 0){
     fprintf(tracing_file, "%d 0 %s %s\n",
         (int)event->event_type,
         ((destroyContainer_t)event->data)->container->type->id,
         ((destroyContainer_t)event->data)->container->id);
   }else{
-    fprintf(tracing_file, "%d %f %s %s\n",
+    fprintf(tracing_file, "%d %.*f %s %s\n",
         (int)event->event_type,
+        TRACE_precision(),
         event->timestamp,
         ((destroyContainer_t)event->data)->container->type->id,
         ((destroyContainer_t)event->data)->container->id);
@@ -178,7 +179,7 @@ void print_pajeDestroyContainer(paje_event_t event)
 
 void print_pajeSetVariable(paje_event_t event)
 {
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
   if (event->timestamp == 0){
     fprintf(tracing_file, "%d 0 %s %s %f\n",
         (int)event->event_type,
@@ -186,8 +187,9 @@ void print_pajeSetVariable(paje_event_t event)
         ((setVariable_t)event->data)->container->id,
         ((setVariable_t)event->data)->value);
   }else{
-    fprintf(tracing_file, "%d %f %s %s %f\n",
+    fprintf(tracing_file, "%d %.*f %s %s %f\n",
         (int)event->event_type,
+        TRACE_precision(),
         event->timestamp,
         ((setVariable_t)event->data)->type->id,
         ((setVariable_t)event->data)->container->id,
@@ -197,7 +199,7 @@ void print_pajeSetVariable(paje_event_t event)
 
 void print_pajeAddVariable(paje_event_t event)
 {
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
   if (event->timestamp == 0){
     fprintf(tracing_file, "%d 0 %s %s %f\n",
         (int)event->event_type,
@@ -205,8 +207,9 @@ void print_pajeAddVariable(paje_event_t event)
         ((addVariable_t)event->data)->container->id,
         ((addVariable_t)event->data)->value);
   }else{
-    fprintf(tracing_file, "%d %f %s %s %f\n",
+    fprintf(tracing_file, "%d %.*f %s %s %f\n",
         (int)event->event_type,
+        TRACE_precision(),
         event->timestamp,
         ((addVariable_t)event->data)->type->id,
         ((addVariable_t)event->data)->container->id,
@@ -216,7 +219,7 @@ void print_pajeAddVariable(paje_event_t event)
 
 void print_pajeSubVariable(paje_event_t event)
 {
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
   if (event->timestamp == 0){
     fprintf(tracing_file, "%d 0 %s %s %f\n",
         (int)event->event_type,
@@ -224,8 +227,9 @@ void print_pajeSubVariable(paje_event_t event)
         ((subVariable_t)event->data)->container->id,
         ((subVariable_t)event->data)->value);
   }else{
-    fprintf(tracing_file, "%d %f %s %s %f\n",
+    fprintf(tracing_file, "%d %.*f %s %s %f\n",
         (int)event->event_type,
+        TRACE_precision(),
         event->timestamp,
         ((subVariable_t)event->data)->type->id,
         ((subVariable_t)event->data)->container->id,
@@ -235,7 +239,7 @@ void print_pajeSubVariable(paje_event_t event)
 
 void print_pajeSetState(paje_event_t event)
 {
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
   if (event->timestamp == 0){
     fprintf(tracing_file, "%d 0 %s %s %s\n",
         (int)event->event_type,
@@ -243,8 +247,9 @@ void print_pajeSetState(paje_event_t event)
         ((setState_t)event->data)->container->id,
         ((setState_t)event->data)->value->id);
   }else{
-    fprintf(tracing_file, "%d %f %s %s %s\n",
+    fprintf(tracing_file, "%d %.*f %s %s %s\n",
         (int)event->event_type,
+        TRACE_precision(),
         event->timestamp,
         ((setState_t)event->data)->type->id,
         ((setState_t)event->data)->container->id,
@@ -254,7 +259,7 @@ void print_pajeSetState(paje_event_t event)
 
 void print_pajePushState(paje_event_t event)
 {
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
   if (!TRACE_display_sizes()){
     if (event->timestamp == 0){
       fprintf(tracing_file, "%d 0 %s %s %s\n",
@@ -263,8 +268,9 @@ void print_pajePushState(paje_event_t event)
           ((pushState_t)event->data)->container->id,
           ((pushState_t)event->data)->value->id);
     }else{
-      fprintf(tracing_file, "%d %f %s %s %s\n",
+      fprintf(tracing_file, "%d %.*f %s %s %s\n",
           (int)event->event_type,
+          TRACE_precision(),
           event->timestamp,
           ((pushState_t)event->data)->type->id,
           ((pushState_t)event->data)->container->id,
@@ -285,8 +291,9 @@ void print_pajePushState(paje_event_t event)
       fprintf(tracing_file, "\n");
 
     }else{
-      fprintf(tracing_file, "%d %f %s %s %s ",
+      fprintf(tracing_file, "%d %.*f %s %s %s ",
           (int)event->event_type,
+          TRACE_precision(),
           event->timestamp,
           ((pushState_t)event->data)->type->id,
           ((pushState_t)event->data)->container->id,
@@ -311,15 +318,16 @@ void print_pajePushState(paje_event_t event)
 
 void print_pajePopState(paje_event_t event)
 {
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
   if (event->timestamp == 0){
     fprintf(tracing_file, "%d 0 %s %s\n",
         (int)event->event_type,
         ((popState_t)event->data)->type->id,
         ((popState_t)event->data)->container->id);
   }else{
-    fprintf(tracing_file, "%d %f %s %s\n",
+    fprintf(tracing_file, "%d %.*f %s %s\n",
         (int)event->event_type,
+        TRACE_precision(),
         event->timestamp,
         ((popState_t)event->data)->type->id,
         ((popState_t)event->data)->container->id);
@@ -328,15 +336,16 @@ void print_pajePopState(paje_event_t event)
 
 void print_pajeResetState(paje_event_t event)
 {
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
   if (event->timestamp == 0){
     fprintf(tracing_file, "%d 0 %s %s\n",
         (int)event->event_type,
         ((resetState_t)event->data)->type->id,
         ((resetState_t)event->data)->container->id);
   }else{
-    fprintf(tracing_file, "%d %f %s %s\n",
+    fprintf(tracing_file, "%d %.*f %s %s\n",
         (int)event->event_type,
+        TRACE_precision(),
         event->timestamp,
         ((resetState_t)event->data)->type->id,
         ((resetState_t)event->data)->container->id);
@@ -355,8 +364,9 @@ void print_pajeStartLink(paje_event_t event)
           ((startLink_t)event->data)->sourceContainer->id,
           ((startLink_t)event->data)->key);
     }else {
-      fprintf(tracing_file, "%d %f %s %s %s %s %s\n",
+      fprintf(tracing_file, "%d %.*f %s %s %s %s %s\n",
           (int)event->event_type,
+          TRACE_precision(),
           event->timestamp,
           ((startLink_t)event->data)->type->id,
           ((startLink_t)event->data)->container->id,
@@ -365,7 +375,7 @@ void print_pajeStartLink(paje_event_t event)
           ((startLink_t)event->data)->key);
     }
   }else{
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
     if (event->timestamp == 0){
       fprintf(tracing_file, "%d 0 %s %s %s %s %s %d\n",
           (int)event->event_type,
@@ -376,8 +386,9 @@ void print_pajeStartLink(paje_event_t event)
           ((startLink_t)event->data)->key,
           ((startLink_t)event->data)->size);
     }else {
-      fprintf(tracing_file, "%d %f %s %s %s %s %s %d\n",
+      fprintf(tracing_file, "%d %.*f %s %s %s %s %s %d\n",
           (int)event->event_type,
+          TRACE_precision(),
           event->timestamp,
           ((startLink_t)event->data)->type->id,
           ((startLink_t)event->data)->container->id,
@@ -391,7 +402,7 @@ void print_pajeStartLink(paje_event_t event)
 
 void print_pajeEndLink(paje_event_t event)
 {
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
   if (event->timestamp == 0){
     fprintf(tracing_file, "%d 0 %s %s %s %s %s\n",
         (int)event->event_type,
@@ -401,8 +412,9 @@ void print_pajeEndLink(paje_event_t event)
         ((endLink_t)event->data)->destContainer->id,
         ((endLink_t)event->data)->key);
   }else {
-    fprintf(tracing_file, "%d %f %s %s %s %s %s\n",
+    fprintf(tracing_file, "%d %.*f %s %s %s %s %s\n",
         (int)event->event_type,
+        TRACE_precision(),
         event->timestamp,
         ((endLink_t)event->data)->type->id,
         ((endLink_t)event->data)->container->id,
@@ -414,7 +426,7 @@ void print_pajeEndLink(paje_event_t event)
 
 void print_pajeNewEvent (paje_event_t event)
 {
-  XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
+  XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(), event->timestamp);
   if (event->timestamp == 0){
     fprintf(tracing_file, "%d 0 %s %s %s\n",
         (int)event->event_type,
@@ -422,8 +434,9 @@ void print_pajeNewEvent (paje_event_t event)
         ((newEvent_t)event->data)->container->id,
         ((newEvent_t)event->data)->value->id);
   }else{
-    fprintf(tracing_file, "%d %f %s %s %s\n",
+    fprintf(tracing_file, "%d %.*f %s %s %s\n",
         (int)event->event_type,
+        TRACE_precision(),
         event->timestamp,
         ((newEvent_t)event->data)->type->id,
         ((newEvent_t)event->data)->container->id,
index b06099e..e9e4202 100644 (file)
@@ -284,6 +284,7 @@ int TRACE_basic (void);
 int TRACE_display_sizes (void);
 char *TRACE_get_comment (void);
 char *TRACE_get_comment_file (void);
+int TRACE_precision (void);
 char *TRACE_get_filename(void);
 char *TRACE_get_viva_uncat_conf (void);
 char *TRACE_get_viva_cat_conf (void);
index 4d11263..2e04fe0 100644 (file)
@@ -94,7 +94,6 @@ static void create_hierarchy(AS_t current_comp,
 void jedule_setup_platform()
 {
   AS_t root_comp;
-  // e_surf_network_element_type_t type;
 
   jed_simgrid_container_t root_container;
 
index 1da65e8..4481e45 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_ADDRESS_SPACE_H
-#define MC_ADDRESS_SPACE_H
+#ifndef SIMGRID_MC_ADDRESS_SPACE_H
+#define SIMGRID_MC_ADDRESS_SPACE_H
 
 #include <cstdint>
 #include <type_traits>
index f9a1342..fe50841 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_MODEL_CHECKER_H
-#define MC_MODEL_CHECKER_H
+#ifndef SIMGRID_MC_MODEL_CHECKER_HPP
+#define SIMGRID_MC_MODEL_CHECKER_HPP
 
 #include <sys/types.h>
 
index 3491f58..f1d84d3 100644 (file)
@@ -4,25 +4,23 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#ifndef SIMGRID_MC_PAGESTORE_HPP
+#define SIMGRID_MC_PAGESTORE_HPP
+
 #include <stdint.h>
 
-#ifdef __cplusplus
 #include <vector>
 
 #include <boost/array.hpp>
 #include <boost/utility.hpp>
 #include <boost/unordered_map.hpp>
 #include <boost/unordered_set.hpp>
-#endif
 
 #include <xbt.h>
 
 #include "mc_mmu.h"
 #include "mc_forward.h"
 
-#ifndef MC_PAGE_STORE_H
-#define MC_PAGE_STORE_H
-
 namespace simgrid {
 namespace mc {
 
index a5f1946..5e09e62 100644 (file)
@@ -4,15 +4,15 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#ifndef SIMGRID_MC_REGION_SNAPSHOT_HPP
+#define SIMGRID_MC_REGION_SNAPSHOT_HPP
+
 #include <cstddef>
 #include <utility>
 
 #include "PageStore.hpp"
 #include "AddressSpace.hpp"
 
-#ifndef SIMGRID_MC_REGION_SNAPSHOT_HPP
-#define SIMGRID_MC_REGION_SNAPSHOT_HPP
-
 namespace simgrid {
 namespace mc {
 
index c3a63c1..45b3cb5 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_BASE_H
-#define MC_BASE_H
+#ifndef SIMGRID_MC_BASE_H
+#define SIMGRID_MC_BASE_H
 
 #include <xbt/misc.h>
 #include <simgrid/simix.h>
index c919dc8..589e625 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_CLIENT_H
-#define MC_CLIENT_H
+#ifndef SIMGRID_MC_CLIENT_H
+#define SIMGRID_MC_CLIENT_H
 
 #include <xbt/misc.h>
 #include "mc_protocol.h"
index 0f50392..54a7036 100644 (file)
@@ -4,6 +4,9 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#ifndef SIMGRID_MC_COMM_PATTERN_H
+#define SIMGRID_MC_COMM_PATTERN_H
+
 #include <stdint.h>
 
 #include <simgrid_config.h>
@@ -15,9 +18,6 @@
 
 #include "mc_state.h"
 
-#ifndef MC_COMM_PATTERN_H
-#define MC_COMM_PATTERN_H
-
 SG_BEGIN_DECL()
 
 typedef struct s_mc_comm_pattern{
index 67bb0e3..ab65cae 100644 (file)
@@ -18,8 +18,6 @@
 #include "mc_object_info.h"
 #include "mc_private.h"
 
-extern "C" {
-
 static void MC_dwarf_register_global_variable(mc_object_info_t info, dw_variable_t variable);
 static void MC_register_variable(mc_object_info_t info, dw_frame_t frame, dw_variable_t variable);
 static void MC_dwarf_register_non_global_variable(mc_object_info_t info, dw_frame_t frame, dw_variable_t variable);
@@ -101,37 +99,6 @@ static void MC_dwarf_handle_variable_die(mc_object_info_t info, Dwarf_Die * die,
  */
 static char *MC_dwarf_at_type(Dwarf_Die * die);
 
-/** \brief Get the name of an attribute (DW_AT_*) from its code
- *
- *  \param attr attribute code (see the DWARF specification)
- *  \return name of the attribute
- */
-const char *MC_dwarf_attrname(int attr)
-{
-  switch (attr) {
-#include "mc_dwarf_attrnames.h"
-  default:
-    return "DW_AT_unknown";
-  }
-}
-
-/** \brief Get the name of a dwarf tag (DW_TAG_*) from its code
- *
- *  \param tag tag code (see the DWARF specification)
- *  \return name of the tag
- */
-XBT_INTERNAL
-const char *MC_dwarf_tagname(int tag)
-{
-  switch (tag) {
-#include "mc_dwarf_tagnames.h"
-  case DW_TAG_invalid:
-    return "DW_TAG_invalid";
-  default:
-    return "DW_TAG_unknown";
-  }
-}
-
 /** \brief A class of DWARF tags (DW_TAG_*)
  */
 typedef enum mc_tag_class {
@@ -1074,6 +1041,18 @@ void mc_frame_free(dw_frame_t frame)
 
 s_dw_type::s_dw_type()
 {
+  this->type = 0;
+  this->id = 0;
+  this->name = nullptr;
+  this->byte_size = 0;
+  this->element_count = 0;
+  this->dw_type_id = nullptr;
+  this->members = nullptr;
+  this->is_pointer_type = 0;
+  this->location = { 0, 0, 0, 0};
+  this->offset = 0;
+  this->subtype = nullptr;
+  this->full_type = nullptr;
 }
 
 s_dw_type::~s_dw_type()
@@ -1110,12 +1089,22 @@ void dw_variable_free_voidp(void *t)
 
 s_mc_object_info::s_mc_object_info()
 {
-  this->types = xbt_dict_new_homogeneous((void (*)(void *)) dw_type_free);
+  this->flags = 0;
+  this->file_name = nullptr;
+  this->start = nullptr;
+  this->end = nullptr;
+  this->start_exec = nullptr;
+  this->end_exec = nullptr;
+  this->start_rw = nullptr;
+  this->end_rw = nullptr;
+  this->start_ro = nullptr;
+  this->end_ro = nullptr;
   this->subprograms = xbt_dict_new_homogeneous((void (*)(void *)) mc_frame_free);
   this->global_variables =
       xbt_dynar_new(sizeof(dw_variable_t), dw_variable_free_voidp);
-
+  this->types = xbt_dict_new_homogeneous((void (*)(void *)) dw_type_free);
   this->full_types_by_name = xbt_dict_new_homogeneous(NULL);
+  this->functions_index = nullptr;
 }
 
 s_mc_object_info::~s_mc_object_info()
@@ -1411,5 +1400,3 @@ void MC_post_process_object_info(mc_process_t process, mc_object_info_t info)
 
   }
 }
-
-}
diff --git a/src/mc/mc_dwarf_attrnames.cpp b/src/mc/mc_dwarf_attrnames.cpp
new file mode 100644 (file)
index 0000000..0462c0d
--- /dev/null
@@ -0,0 +1,164 @@
+/* Copyright (c) 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. */
+
+/* Warning: autogenerated, do not edit! */
+
+#include <xbt/base.h>
+#include <dwarf.h>
+
+#include "mc_object_info.h"
+
+/** \brief Get the name of an attribute (DW_AT_*) from its code
+ *
+ *  \param attr attribute code (see the DWARF specification)
+ *  \return name of the attribute
+ */
+const char *MC_dwarf_attrname(int attr)
+{
+  switch (attr) {
+  case 0x01: return "DW_AT_sibling";
+  case 0x02: return "DW_AT_location";
+  case 0x03: return "DW_AT_name";
+  case 0x09: return "DW_AT_ordering";
+  case 0x0a: return "DW_AT_subscr_data";
+  case 0x0b: return "DW_AT_byte_size";
+  case 0x0c: return "DW_AT_bit_offset";
+  case 0x0d: return "DW_AT_bit_size";
+  case 0x0f: return "DW_AT_element_list";
+  case 0x10: return "DW_AT_stmt_list";
+  case 0x11: return "DW_AT_low_pc";
+  case 0x12: return "DW_AT_high_pc";
+  case 0x13: return "DW_AT_language";
+  case 0x14: return "DW_AT_member";
+  case 0x15: return "DW_AT_discr";
+  case 0x16: return "DW_AT_discr_value";
+  case 0x17: return "DW_AT_visibility";
+  case 0x18: return "DW_AT_import";
+  case 0x19: return "DW_AT_string_length";
+  case 0x1a: return "DW_AT_common_reference";
+  case 0x1b: return "DW_AT_comp_dir";
+  case 0x1c: return "DW_AT_const_value";
+  case 0x1d: return "DW_AT_containing_type";
+  case 0x1e: return "DW_AT_default_value";
+  case 0x20: return "DW_AT_inline";
+  case 0x21: return "DW_AT_is_optional";
+  case 0x22: return "DW_AT_lower_bound";
+  case 0x25: return "DW_AT_producer";
+  case 0x27: return "DW_AT_prototyped";
+  case 0x2a: return "DW_AT_return_addr";
+  case 0x2c: return "DW_AT_start_scope";
+  case 0x2e: return "DW_AT_bit_stride";
+  case 0x2f: return "DW_AT_upper_bound";
+  case 0x31: return "DW_AT_abstract_origin";
+  case 0x32: return "DW_AT_accessibility";
+  case 0x33: return "DW_AT_address_class";
+  case 0x34: return "DW_AT_artificial";
+  case 0x35: return "DW_AT_base_types";
+  case 0x36: return "DW_AT_calling_convention";
+  case 0x37: return "DW_AT_count";
+  case 0x38: return "DW_AT_data_member_location";
+  case 0x39: return "DW_AT_decl_column";
+  case 0x3a: return "DW_AT_decl_file";
+  case 0x3b: return "DW_AT_decl_line";
+  case 0x3c: return "DW_AT_declaration";
+  case 0x3d: return "DW_AT_discr_list";
+  case 0x3e: return "DW_AT_encoding";
+  case 0x3f: return "DW_AT_external";
+  case 0x40: return "DW_AT_frame_base";
+  case 0x41: return "DW_AT_friend";
+  case 0x42: return "DW_AT_identifier_case";
+  case 0x43: return "DW_AT_macro_info";
+  case 0x44: return "DW_AT_namelist_item";
+  case 0x45: return "DW_AT_priority";
+  case 0x46: return "DW_AT_segment";
+  case 0x47: return "DW_AT_specification";
+  case 0x48: return "DW_AT_static_link";
+  case 0x49: return "DW_AT_type";
+  case 0x4a: return "DW_AT_use_location";
+  case 0x4b: return "DW_AT_variable_parameter";
+  case 0x4c: return "DW_AT_virtuality";
+  case 0x4d: return "DW_AT_vtable_elem_location";
+  case 0x4e: return "DW_AT_allocated";
+  case 0x4f: return "DW_AT_associated";
+  case 0x50: return "DW_AT_data_location";
+  case 0x51: return "DW_AT_byte_stride";
+  case 0x52: return "DW_AT_entry_pc";
+  case 0x53: return "DW_AT_use_UTF8";
+  case 0x54: return "DW_AT_extension";
+  case 0x55: return "DW_AT_ranges";
+  case 0x56: return "DW_AT_trampoline";
+  case 0x57: return "DW_AT_call_column";
+  case 0x58: return "DW_AT_call_file";
+  case 0x59: return "DW_AT_call_line";
+  case 0x5a: return "DW_AT_description";
+  case 0x5b: return "DW_AT_binary_scale";
+  case 0x5c: return "DW_AT_decimal_scale";
+  case 0x5d: return "DW_AT_small";
+  case 0x5e: return "DW_AT_decimal_sign";
+  case 0x5f: return "DW_AT_digit_count";
+  case 0x60: return "DW_AT_picture_string";
+  case 0x61: return "DW_AT_mutable";
+  case 0x62: return "DW_AT_threads_scaled";
+  case 0x63: return "DW_AT_explicit";
+  case 0x64: return "DW_AT_object_pointer";
+  case 0x65: return "DW_AT_endianity";
+  case 0x66: return "DW_AT_elemental";
+  case 0x67: return "DW_AT_pure";
+  case 0x68: return "DW_AT_recursive";
+  case 0x69: return "DW_AT_signature";
+  case 0x6a: return "DW_AT_main_subprogram";
+  case 0x6b: return "DW_AT_data_bit_offset";
+  case 0x6c: return "DW_AT_const_expr";
+  case 0x6d: return "DW_AT_enum_class";
+  case 0x6e: return "DW_AT_linkage_name";
+  case 0x2000: return "DW_AT_lo_user";
+  case 0x2001: return "DW_AT_MIPS_fde";
+  case 0x2002: return "DW_AT_MIPS_loop_begin";
+  case 0x2003: return "DW_AT_MIPS_tail_loop_begin";
+  case 0x2004: return "DW_AT_MIPS_epilog_begin";
+  case 0x2005: return "DW_AT_MIPS_loop_unroll_factor";
+  case 0x2006: return "DW_AT_MIPS_software_pipeline_depth";
+  case 0x2007: return "DW_AT_MIPS_linkage_name";
+  case 0x2008: return "DW_AT_MIPS_stride";
+  case 0x2009: return "DW_AT_MIPS_abstract_name";
+  case 0x200a: return "DW_AT_MIPS_clone_origin";
+  case 0x200b: return "DW_AT_MIPS_has_inlines";
+  case 0x200c: return "DW_AT_MIPS_stride_byte";
+  case 0x200d: return "DW_AT_MIPS_stride_elem";
+  case 0x200e: return "DW_AT_MIPS_ptr_dopetype";
+  case 0x200f: return "DW_AT_MIPS_allocatable_dopetype";
+  case 0x2010: return "DW_AT_MIPS_assumed_shape_dopetype";
+  case 0x2011: return "DW_AT_MIPS_assumed_size";
+  case 0x2101: return "DW_AT_sf_names";
+  case 0x2102: return "DW_AT_src_info";
+  case 0x2103: return "DW_AT_mac_info";
+  case 0x2104: return "DW_AT_src_coords";
+  case 0x2105: return "DW_AT_body_begin";
+  case 0x2106: return "DW_AT_body_end";
+  case 0x2107: return "DW_AT_GNU_vector";
+  case 0x2108: return "DW_AT_GNU_guarded_by";
+  case 0x2109: return "DW_AT_GNU_pt_guarded_by";
+  case 0x210a: return "DW_AT_GNU_guarded";
+  case 0x210b: return "DW_AT_GNU_pt_guarded";
+  case 0x210c: return "DW_AT_GNU_locks_excluded";
+  case 0x210d: return "DW_AT_GNU_exclusive_locks_required";
+  case 0x210e: return "DW_AT_GNU_shared_locks_required";
+  case 0x210f: return "DW_AT_GNU_odr_signature";
+  case 0x2110: return "DW_AT_GNU_template_name";
+  case 0x2111: return "DW_AT_GNU_call_site_value";
+  case 0x2112: return "DW_AT_GNU_call_site_data_value";
+  case 0x2113: return "DW_AT_GNU_call_site_target";
+  case 0x2114: return "DW_AT_GNU_call_site_target_clobbered";
+  case 0x2115: return "DW_AT_GNU_tail_call";
+  case 0x2116: return "DW_AT_GNU_all_tail_call_sites";
+  case 0x2117: return "DW_AT_GNU_all_call_sites";
+  case 0x2118: return "DW_AT_GNU_all_source_call_sites";
+  case 0x2119: return "DW_AT_GNU_macros";
+  case 0x3fff: return "DW_AT_hi_user";
+  default:
+    return "DW_AT_unknown";
+  }
+}
diff --git a/src/mc/mc_dwarf_attrnames.h b/src/mc/mc_dwarf_attrnames.h
deleted file mode 100644 (file)
index 5c83793..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/* Copyright (c) 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. */
-
-case 0x01: return "DW_AT_sibling";
-case 0x02: return "DW_AT_location";
-case 0x03: return "DW_AT_name";
-case 0x09: return "DW_AT_ordering";
-case 0x0a: return "DW_AT_subscr_data";
-case 0x0b: return "DW_AT_byte_size";
-case 0x0c: return "DW_AT_bit_offset";
-case 0x0d: return "DW_AT_bit_size";
-case 0x0f: return "DW_AT_element_list";
-case 0x10: return "DW_AT_stmt_list";
-case 0x11: return "DW_AT_low_pc";
-case 0x12: return "DW_AT_high_pc";
-case 0x13: return "DW_AT_language";
-case 0x14: return "DW_AT_member";
-case 0x15: return "DW_AT_discr";
-case 0x16: return "DW_AT_discr_value";
-case 0x17: return "DW_AT_visibility";
-case 0x18: return "DW_AT_import";
-case 0x19: return "DW_AT_string_length";
-case 0x1a: return "DW_AT_common_reference";
-case 0x1b: return "DW_AT_comp_dir";
-case 0x1c: return "DW_AT_const_value";
-case 0x1d: return "DW_AT_containing_type";
-case 0x1e: return "DW_AT_default_value";
-case 0x20: return "DW_AT_inline";
-case 0x21: return "DW_AT_is_optional";
-case 0x22: return "DW_AT_lower_bound";
-case 0x25: return "DW_AT_producer";
-case 0x27: return "DW_AT_prototyped";
-case 0x2a: return "DW_AT_return_addr";
-case 0x2c: return "DW_AT_start_scope";
-case 0x2e: return "DW_AT_bit_stride";
-case 0x2f: return "DW_AT_upper_bound";
-case 0x31: return "DW_AT_abstract_origin";
-case 0x32: return "DW_AT_accessibility";
-case 0x33: return "DW_AT_address_class";
-case 0x34: return "DW_AT_artificial";
-case 0x35: return "DW_AT_base_types";
-case 0x36: return "DW_AT_calling_convention";
-case 0x37: return "DW_AT_count";
-case 0x38: return "DW_AT_data_member_location";
-case 0x39: return "DW_AT_decl_column";
-case 0x3a: return "DW_AT_decl_file";
-case 0x3b: return "DW_AT_decl_line";
-case 0x3c: return "DW_AT_declaration";
-case 0x3d: return "DW_AT_discr_list";
-case 0x3e: return "DW_AT_encoding";
-case 0x3f: return "DW_AT_external";
-case 0x40: return "DW_AT_frame_base";
-case 0x41: return "DW_AT_friend";
-case 0x42: return "DW_AT_identifier_case";
-case 0x43: return "DW_AT_macro_info";
-case 0x44: return "DW_AT_namelist_item";
-case 0x45: return "DW_AT_priority";
-case 0x46: return "DW_AT_segment";
-case 0x47: return "DW_AT_specification";
-case 0x48: return "DW_AT_static_link";
-case 0x49: return "DW_AT_type";
-case 0x4a: return "DW_AT_use_location";
-case 0x4b: return "DW_AT_variable_parameter";
-case 0x4c: return "DW_AT_virtuality";
-case 0x4d: return "DW_AT_vtable_elem_location";
-case 0x4e: return "DW_AT_allocated";
-case 0x4f: return "DW_AT_associated";
-case 0x50: return "DW_AT_data_location";
-case 0x51: return "DW_AT_byte_stride";
-case 0x52: return "DW_AT_entry_pc";
-case 0x53: return "DW_AT_use_UTF8";
-case 0x54: return "DW_AT_extension";
-case 0x55: return "DW_AT_ranges";
-case 0x56: return "DW_AT_trampoline";
-case 0x57: return "DW_AT_call_column";
-case 0x58: return "DW_AT_call_file";
-case 0x59: return "DW_AT_call_line";
-case 0x5a: return "DW_AT_description";
-case 0x5b: return "DW_AT_binary_scale";
-case 0x5c: return "DW_AT_decimal_scale";
-case 0x5d: return "DW_AT_small";
-case 0x5e: return "DW_AT_decimal_sign";
-case 0x5f: return "DW_AT_digit_count";
-case 0x60: return "DW_AT_picture_string";
-case 0x61: return "DW_AT_mutable";
-case 0x62: return "DW_AT_threads_scaled";
-case 0x63: return "DW_AT_explicit";
-case 0x64: return "DW_AT_object_pointer";
-case 0x65: return "DW_AT_endianity";
-case 0x66: return "DW_AT_elemental";
-case 0x67: return "DW_AT_pure";
-case 0x68: return "DW_AT_recursive";
-case 0x69: return "DW_AT_signature";
-case 0x6a: return "DW_AT_main_subprogram";
-case 0x6b: return "DW_AT_data_bit_offset";
-case 0x6c: return "DW_AT_const_expr";
-case 0x6d: return "DW_AT_enum_class";
-case 0x6e: return "DW_AT_linkage_name";
-case 0x2000: return "DW_AT_lo_user";
-case 0x2001: return "DW_AT_MIPS_fde";
-case 0x2002: return "DW_AT_MIPS_loop_begin";
-case 0x2003: return "DW_AT_MIPS_tail_loop_begin";
-case 0x2004: return "DW_AT_MIPS_epilog_begin";
-case 0x2005: return "DW_AT_MIPS_loop_unroll_factor";
-case 0x2006: return "DW_AT_MIPS_software_pipeline_depth";
-case 0x2007: return "DW_AT_MIPS_linkage_name";
-case 0x2008: return "DW_AT_MIPS_stride";
-case 0x2009: return "DW_AT_MIPS_abstract_name";
-case 0x200a: return "DW_AT_MIPS_clone_origin";
-case 0x200b: return "DW_AT_MIPS_has_inlines";
-case 0x200c: return "DW_AT_MIPS_stride_byte";
-case 0x200d: return "DW_AT_MIPS_stride_elem";
-case 0x200e: return "DW_AT_MIPS_ptr_dopetype";
-case 0x200f: return "DW_AT_MIPS_allocatable_dopetype";
-case 0x2010: return "DW_AT_MIPS_assumed_shape_dopetype";
-case 0x2011: return "DW_AT_MIPS_assumed_size";
-case 0x2101: return "DW_AT_sf_names";
-case 0x2102: return "DW_AT_src_info";
-case 0x2103: return "DW_AT_mac_info";
-case 0x2104: return "DW_AT_src_coords";
-case 0x2105: return "DW_AT_body_begin";
-case 0x2106: return "DW_AT_body_end";
-case 0x2107: return "DW_AT_GNU_vector";
-case 0x2108: return "DW_AT_GNU_guarded_by";
-case 0x2109: return "DW_AT_GNU_pt_guarded_by";
-case 0x210a: return "DW_AT_GNU_guarded";
-case 0x210b: return "DW_AT_GNU_pt_guarded";
-case 0x210c: return "DW_AT_GNU_locks_excluded";
-case 0x210d: return "DW_AT_GNU_exclusive_locks_required";
-case 0x210e: return "DW_AT_GNU_shared_locks_required";
-case 0x210f: return "DW_AT_GNU_odr_signature";
-case 0x2110: return "DW_AT_GNU_template_name";
-case 0x2111: return "DW_AT_GNU_call_site_value";
-case 0x2112: return "DW_AT_GNU_call_site_data_value";
-case 0x2113: return "DW_AT_GNU_call_site_target";
-case 0x2114: return "DW_AT_GNU_call_site_target_clobbered";
-case 0x2115: return "DW_AT_GNU_tail_call";
-case 0x2116: return "DW_AT_GNU_all_tail_call_sites";
-case 0x2117: return "DW_AT_GNU_all_call_sites";
-case 0x2118: return "DW_AT_GNU_all_source_call_sites";
-case 0x2119: return "DW_AT_GNU_macros";
-case 0x3fff: return "DW_AT_hi_user";
diff --git a/src/mc/mc_dwarf_tagnames.cpp b/src/mc/mc_dwarf_tagnames.cpp
new file mode 100644 (file)
index 0000000..0ea1de0
--- /dev/null
@@ -0,0 +1,102 @@
+/* Copyright (c) 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. */
+
+/* Warning: autogenerated, do not edit! */
+
+#include <dwarf.h>
+
+#include <xbt/base.h>
+#include "mc_object_info.h"
+
+/** \brief Get the name of a dwarf tag (DW_TAG_*) from its code
+ *
+ *  \param tag tag code (see the DWARF specification)
+ *  \return name of the tag
+ */
+XBT_INTERNAL
+const char *MC_dwarf_tagname(int tag)
+{
+  switch (tag) {
+  case 0x01: return "DW_TAG_array_type";
+  case 0x02: return "DW_TAG_class_type";
+  case 0x03: return "DW_TAG_entry_point";
+  case 0x04: return "DW_TAG_enumeration_type";
+  case 0x05: return "DW_TAG_formal_parameter";
+  case 0x08: return "DW_TAG_imported_declaration";
+  case 0x0a: return "DW_TAG_label";
+  case 0x0b: return "DW_TAG_lexical_block";
+  case 0x0d: return "DW_TAG_member";
+  case 0x0f: return "DW_TAG_pointer_type";
+  case 0x10: return "DW_TAG_reference_type";
+  case 0x11: return "DW_TAG_compile_unit";
+  case 0x12: return "DW_TAG_string_type";
+  case 0x13: return "DW_TAG_structure_type";
+  case 0x15: return "DW_TAG_subroutine_type";
+  case 0x16: return "DW_TAG_typedef";
+  case 0x17: return "DW_TAG_union_type";
+  case 0x18: return "DW_TAG_unspecified_parameters";
+  case 0x19: return "DW_TAG_variant";
+  case 0x1a: return "DW_TAG_common_block";
+  case 0x1b: return "DW_TAG_common_inclusion";
+  case 0x1c: return "DW_TAG_inheritance";
+  case 0x1d: return "DW_TAG_inlined_subroutine";
+  case 0x1e: return "DW_TAG_module";
+  case 0x1f: return "DW_TAG_ptr_to_member_type";
+  case 0x20: return "DW_TAG_set_type";
+  case 0x21: return "DW_TAG_subrange_type";
+  case 0x22: return "DW_TAG_with_stmt";
+  case 0x23: return "DW_TAG_access_declaration";
+  case 0x24: return "DW_TAG_base_type";
+  case 0x25: return "DW_TAG_catch_block";
+  case 0x26: return "DW_TAG_const_type";
+  case 0x27: return "DW_TAG_constant";
+  case 0x28: return "DW_TAG_enumerator";
+  case 0x29: return "DW_TAG_file_type";
+  case 0x2a: return "DW_TAG_friend";
+  case 0x2b: return "DW_TAG_namelist";
+  case 0x2c: return "DW_TAG_namelist_item";
+  case 0x2d: return "DW_TAG_packed_type";
+  case 0x2e: return "DW_TAG_subprogram";
+  case 0x2f: return "DW_TAG_template_type_parameter";
+  case 0x30: return "DW_TAG_template_value_parameter";
+  case 0x31: return "DW_TAG_thrown_type";
+  case 0x32: return "DW_TAG_try_block";
+  case 0x33: return "DW_TAG_variant_part";
+  case 0x34: return "DW_TAG_variable";
+  case 0x35: return "DW_TAG_volatile_type";
+  case 0x36: return "DW_TAG_dwarf_procedure";
+  case 0x37: return "DW_TAG_restrict_type";
+  case 0x38: return "DW_TAG_interface_type";
+  case 0x39: return "DW_TAG_namespace";
+  case 0x3a: return "DW_TAG_imported_module";
+  case 0x3b: return "DW_TAG_unspecified_type";
+  case 0x3c: return "DW_TAG_partial_unit";
+  case 0x3d: return "DW_TAG_imported_unit";
+  case 0x3e: return "DW_TAG_mutable_type";
+  case 0x3f: return "DW_TAG_condition";
+  case 0x40: return "DW_TAG_shared_type";
+  case 0x41: return "DW_TAG_type_unit";
+  case 0x42: return "DW_TAG_rvalue_reference_type";
+  case 0x43: return "DW_TAG_template_alias";
+  case 0x4080: return "DW_TAG_lo_user";
+  case 0x4081: return "DW_TAG_MIPS_loop";
+  case 0x4101: return "DW_TAG_format_label";
+  case 0x4102: return "DW_TAG_function_template";
+  case 0x4103: return "DW_TAG_class_template";
+  case 0x4104: return "DW_TAG_GNU_BINCL";
+  case 0x4105: return "DW_TAG_GNU_EINCL";
+  case 0x4106: return "DW_TAG_GNU_template_template_param";
+  case 0x4107: return "DW_TAG_GNU_template_parameter_pack";
+  case 0x4108: return "DW_TAG_GNU_formal_parameter_pack";
+  case 0x4109: return "DW_TAG_GNU_call_site";
+  case 0x410a: return "DW_TAG_GNU_call_site_parameter";
+  case 0xffff: return "DW_TAG_hi_user";
+  case DW_TAG_invalid:
+    return "DW_TAG_invalid";
+  default:
+    return "DW_TAG_unknown";
+  }
+}
diff --git a/src/mc/mc_dwarf_tagnames.h b/src/mc/mc_dwarf_tagnames.h
deleted file mode 100644 (file)
index 5be001b..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Copyright (c) 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. */
-
-case 0x01: return "DW_TAG_array_type";
-case 0x02: return "DW_TAG_class_type";
-case 0x03: return "DW_TAG_entry_point";
-case 0x04: return "DW_TAG_enumeration_type";
-case 0x05: return "DW_TAG_formal_parameter";
-case 0x08: return "DW_TAG_imported_declaration";
-case 0x0a: return "DW_TAG_label";
-case 0x0b: return "DW_TAG_lexical_block";
-case 0x0d: return "DW_TAG_member";
-case 0x0f: return "DW_TAG_pointer_type";
-case 0x10: return "DW_TAG_reference_type";
-case 0x11: return "DW_TAG_compile_unit";
-case 0x12: return "DW_TAG_string_type";
-case 0x13: return "DW_TAG_structure_type";
-case 0x15: return "DW_TAG_subroutine_type";
-case 0x16: return "DW_TAG_typedef";
-case 0x17: return "DW_TAG_union_type";
-case 0x18: return "DW_TAG_unspecified_parameters";
-case 0x19: return "DW_TAG_variant";
-case 0x1a: return "DW_TAG_common_block";
-case 0x1b: return "DW_TAG_common_inclusion";
-case 0x1c: return "DW_TAG_inheritance";
-case 0x1d: return "DW_TAG_inlined_subroutine";
-case 0x1e: return "DW_TAG_module";
-case 0x1f: return "DW_TAG_ptr_to_member_type";
-case 0x20: return "DW_TAG_set_type";
-case 0x21: return "DW_TAG_subrange_type";
-case 0x22: return "DW_TAG_with_stmt";
-case 0x23: return "DW_TAG_access_declaration";
-case 0x24: return "DW_TAG_base_type";
-case 0x25: return "DW_TAG_catch_block";
-case 0x26: return "DW_TAG_const_type";
-case 0x27: return "DW_TAG_constant";
-case 0x28: return "DW_TAG_enumerator";
-case 0x29: return "DW_TAG_file_type";
-case 0x2a: return "DW_TAG_friend";
-case 0x2b: return "DW_TAG_namelist";
-case 0x2c: return "DW_TAG_namelist_item";
-case 0x2d: return "DW_TAG_packed_type";
-case 0x2e: return "DW_TAG_subprogram";
-case 0x2f: return "DW_TAG_template_type_parameter";
-case 0x30: return "DW_TAG_template_value_parameter";
-case 0x31: return "DW_TAG_thrown_type";
-case 0x32: return "DW_TAG_try_block";
-case 0x33: return "DW_TAG_variant_part";
-case 0x34: return "DW_TAG_variable";
-case 0x35: return "DW_TAG_volatile_type";
-case 0x36: return "DW_TAG_dwarf_procedure";
-case 0x37: return "DW_TAG_restrict_type";
-case 0x38: return "DW_TAG_interface_type";
-case 0x39: return "DW_TAG_namespace";
-case 0x3a: return "DW_TAG_imported_module";
-case 0x3b: return "DW_TAG_unspecified_type";
-case 0x3c: return "DW_TAG_partial_unit";
-case 0x3d: return "DW_TAG_imported_unit";
-case 0x3f: return "DW_TAG_condition";
-case 0x40: return "DW_TAG_shared_type";
-case 0x41: return "DW_TAG_type_unit";
-case 0x42: return "DW_TAG_rvalue_reference_type";
-case 0x43: return "DW_TAG_template_alias";
-case 0x4080: return "DW_TAG_lo_user";
-case 0x4081: return "DW_TAG_MIPS_loop";
-case 0x4101: return "DW_TAG_format_label";
-case 0x4102: return "DW_TAG_function_template";
-case 0x4103: return "DW_TAG_class_template";
-case 0x4104: return "DW_TAG_GNU_BINCL";
-case 0x4105: return "DW_TAG_GNU_EINCL";
-case 0x4106: return "DW_TAG_GNU_template_template_param";
-case 0x4107: return "DW_TAG_GNU_template_parameter_pack";
-case 0x4108: return "DW_TAG_GNU_formal_parameter_pack";
-case 0x4109: return "DW_TAG_GNU_call_site";
-case 0x410a: return "DW_TAG_GNU_call_site_parameter";
-case 0xffff: return "DW_TAG_hi_user";
index 725382b..a247eba 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_FORWARD_H
-#define MC_FORWARD_H
+#ifndef SIMGRID_MC_FORWARD_H
+#define SIMGRID_MC_FORWARD_H
 
 #include <xbt/misc.h>
 #include <mc/datatypes.h>
index 5362e18..bcf43c4 100644 (file)
@@ -4,6 +4,9 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#ifndef SIMGRID_MC_HASH_HPP
+#define SIMGRID_MC_HASH_HPP
+
 #include <stdio.h>
 #include <stdint.h>
 
@@ -12,9 +15,6 @@
 #include "xbt/misc.h"
 #include "mc_snapshot.h"
 
-#ifndef SIMGRID_MC_HASH_HPP
-#define SIMGRID_MC_HASH_HPP
-
 /** \brief Hash the current state
  *  \param num_state number of states
  *  \param stacks stacks (mc_snapshot_stak_t) used fot the stack unwinding informations
index b5ac593..05986fb 100644 (file)
@@ -3,6 +3,9 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#ifndef SIMGRID_MC_IGNORE_H
+#define SIMGRID_MC_IGNORE_H
+
 #include <xbt/dynar.h>
 
 #include "mc/datatypes.h"
@@ -17,3 +20,5 @@ XBT_INTERNAL void MC_stack_area_add(stack_region_t stack_area);
 XBT_INTERNAL xbt_dynar_t MC_checkpoint_ignore_new(void);
 
 SG_END_DECL();
+
+#endif
index f7edd2e..57f77f7 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_LIVENESS_H
-#define MC_LIVENESS_H
+#ifndef SIMGRID_MC_LIVENESS_H
+#define SIMGRID_MC_LIVENESS_H
 
 #include <stdint.h>
 
index 3dd7308..d6f6fe4 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_OBJECT_LOCATION_H
-#define MC_OBJECT_LOCATION_H
+#ifndef SIMGRID_MC_OBJECT_LOCATION_H
+#define SIMGRID_MC_OBJECT_LOCATION_H
 
 #include <stdint.h>
 
@@ -16,8 +16,6 @@
 #include <simgrid_config.h>
 #include "mc_base.h"
 #include "mc_forward.h"
-#include "mc_object_info.h"
-#include "mc_forward.h"
 #include "AddressSpace.hpp"
 
 SG_BEGIN_DECL()
index a75a9af..21eaf14 100644 (file)
@@ -9,8 +9,6 @@
 #include "mc_object_info.h"
 #include "mc_private.h"
 
-extern "C" {
-
 /** Resolve snapshot in the process address space
  *
  * @param object   Process address of the struct/class
@@ -43,5 +41,3 @@ void *mc_member_resolve(const void *base, dw_type_t type, dw_type_t member,
   else
     return (void *) state.stack[state.stack_size - 1];
 }
-
-}
index afcbb70..21f2bdd 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_MEMORY_MAP_H
-#define MC_MEMORY_MAP_H
+#ifndef SIMGRID_MC_MEMORY_MAP_H
+#define SIMGRID_MC_MEMORY_MAP_H
 
 #include <cstdint>
 
index 987bf89..c1f5ffe 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_MMALLOC_H
-#define MC_MMALLOC_H
+#ifndef SIMGRID_MC_MMALLOC_H
+#define SIMGRID_MC_MMALLOC_H
 
 #include <xbt/misc.h>
 #include <xbt/mmalloc.h>
index 71870e7..25d10ce 100644 (file)
@@ -4,12 +4,13 @@
 /* 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 MC_MMU_H
-#define MC_MMU_H
+#ifndef SIMGRID_MC_MMU_H
+#define SIMGRID_MC_MMU_H
 
 #include <stdint.h>
 #include <stdbool.h>
 
+#include <xbt/asserts.h>
 #include <xbt/misc.h>
 
 #include <simgrid_config.h>
index 95f9e2a..2b00607 100644 (file)
@@ -11,8 +11,6 @@
 #include "mc_object_info.h"
 #include "mc_private.h"
 
-extern "C" {
-
 dw_frame_t MC_file_object_info_find_function(mc_object_info_t info, const void *ip)
 {
   xbt_dynar_t dynar = info->functions_index;
@@ -44,5 +42,3 @@ dw_variable_t MC_file_object_info_find_variable_by_name(mc_object_info_t info, c
 
   return NULL;
 }
-
-}
index 3b1f60a..b356884 100644 (file)
@@ -8,8 +8,8 @@
  *  Debug information for the MC.
  */
 
-#ifndef MC_OBJECT_INFO_H
-#define MC_OBJECT_INFO_H
+#ifndef SIMGRID_MC_OBJECT_INFO_H
+#define SIMGRID_MC_OBJECT_INFO_H
 
 #include <stdint.h>
 #include <stdbool.h>
@@ -23,8 +23,6 @@
 #include "mc_process.h"
 #include "../smpi/private.h"
 
-SG_BEGIN_DECL();
-
 // ***** Type
 
 typedef int e_dw_type_type;
@@ -33,21 +31,21 @@ struct s_dw_type {
   s_dw_type();
   ~s_dw_type();
 
-  e_dw_type_type type = 0;
-  Dwarf_Off id = 0; /* Offset in the section (in hexadecimal form) */
-  char *name = nullptr; /* Name of the type */
-  int byte_size = 0; /* Size in bytes */
-  int element_count = 0; /* Number of elements for array type */
-  char *dw_type_id = nullptr; /* DW_AT_type id */
-  xbt_dynar_t members = nullptr; /* if DW_TAG_structure_type, DW_TAG_class_type, DW_TAG_union_type*/
-  int is_pointer_type = 0;
+  e_dw_type_type type;
+  Dwarf_Off id; /* Offset in the section (in hexadecimal form) */
+  char *name; /* Name of the type */
+  int byte_size; /* Size in bytes */
+  int element_count; /* Number of elements for array type */
+  char *dw_type_id; /* DW_AT_type id */
+  xbt_dynar_t members; /* if DW_TAG_structure_type, DW_TAG_class_type, DW_TAG_union_type*/
+  int is_pointer_type;
 
   // Location (for members) is either of:
-  struct s_mc_expression location = { 0, 0, 0, 0 };
-  int offset = 0;
+  struct s_mc_expression location;
+  int offset;
 
-  dw_type_t subtype = nullptr; // DW_AT_type
-  dw_type_t full_type = nullptr; // The same (but more complete) type
+  dw_type_t subtype; // DW_AT_type
+  dw_type_t full_type; // The same (but more complete) type
 };
 
 XBT_INTERNAL void dw_variable_free(dw_variable_t v);
@@ -66,25 +64,25 @@ struct s_mc_object_info {
   s_mc_object_info(s_mc_object_info const&) = delete;
   s_mc_object_info& operator=(s_mc_object_info const&) = delete;
 
-  mc_object_info_flags flags = 0;
-  char* file_name = nullptr;
-  const void* start = nullptr;
-  const void *end = nullptr;
-  char *start_exec = nullptr;
-  char *end_exec = nullptr; // Executable segment
-  char *start_rw = nullptr;
-  char *end_rw = nullptr; // Read-write segment
-  char *start_ro = nullptr;
-  char *end_ro = nullptr; // read-only segment
-  xbt_dict_t subprograms = nullptr; // xbt_dict_t<origin as hexadecimal string, dw_frame_t>
-  xbt_dynar_t global_variables = nullptr; // xbt_dynar_t<dw_variable_t>
-  xbt_dict_t types = nullptr; // xbt_dict_t<origin as hexadecimal string, dw_type_t>
-  xbt_dict_t full_types_by_name = nullptr; // xbt_dict_t<name, dw_type_t> (full defined type only)
+  mc_object_info_flags flags;
+  char* file_name;
+  const void* start;
+  const void *end;
+  char *start_exec;
+  char *end_exec; // Executable segment
+  char *start_rw;
+  char *end_rw; // Read-write segment
+  char *start_ro;
+  char *end_ro; // read-only segment
+  xbt_dict_t subprograms; // xbt_dict_t<origin as hexadecimal string, dw_frame_t>
+  xbt_dynar_t global_variables; // xbt_dynar_t<dw_variable_t>
+  xbt_dict_t types; // xbt_dict_t<origin as hexadecimal string, dw_type_t>
+  xbt_dict_t full_types_by_name; // xbt_dict_t<name, dw_type_t> (full defined type only)
 
   // Here we sort the minimal information for an efficient (and cache-efficient)
   // lookup of a function given an instruction pointer.
   // The entries are sorted by low_pc and a binary search can be used to look them up.
-  xbt_dynar_t functions_index = nullptr;
+  xbt_dynar_t functions_index;
 };
 
 static inline __attribute__ ((always_inline))
@@ -117,6 +115,7 @@ XBT_INTERNAL void* MC_object_base_address(mc_object_info_t info);
 
 XBT_INTERNAL std::shared_ptr<s_mc_object_info_t> MC_find_object_info(
   std::vector<simgrid::mc::VmMap> const& maps, const char* name, int executable);
+
 XBT_INTERNAL void MC_free_object_info(mc_object_info_t* p);
 
 XBT_INTERNAL dw_frame_t MC_file_object_info_find_function(mc_object_info_t info, const void *ip);
@@ -170,6 +169,4 @@ struct s_mc_function_index_item {
 
 XBT_INTERNAL void mc_frame_free(dw_frame_t freme);
 
-SG_END_DECL()
-
 #endif
index 97f7827..6d8b02f 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_PRIVATE_H
-#define MC_PRIVATE_H
+#ifndef SIMGRID_MC_PRIVATE_H
+#define SIMGRID_MC_PRIVATE_H
 
 #include <sys/types.h>
 
index d5234e0..8c465ff 100644 (file)
@@ -44,29 +44,31 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_process, mc,
 // ***** Helper stuff
 
 #define SO_RE "\\.so[\\.0-9]*$"
-#define VERSION_RE "-[\\.0-9]*$"
+#define VERSION_RE "-[\\.0-9-]*$"
 
 static const char *const FILTERED_LIBS[] = {
-  "libstdc++",
+  "ld",
+  "libbz2",
   "libboost_context",
+  "libc",
   "libc++",
-  "libm",
+  "libcdt",
+  "libcgraph",
+  "libdl",
+  "libdw",
+  "libelf",
   "libgcc_s",
+  "liblua5.1",
+  "liblzma",
+  "libm",
   "libpthread",
+  "librt",
+  "libstdc++",
   "libunwind",
   "libunwind-x86_64",
   "libunwind-x86",
   "libunwind-ptrace",
-  "libdw",
-  "libdl",
-  "librt",
-  "liblzma",
-  "libelf",
-  "libbz2",
-  "libz",
-  "libelf",
-  "libc",
-  "ld"
+  "libz"
 };
 
 static bool MC_is_simgrid_lib(const char* libname)
index 4aba8c4..b357134 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_PROCESS_H
-#define MC_PROCESS_H
+#ifndef SIMGRID_MC_PROCESS_H
+#define SIMGRID_MC_PROCESS_H
 
 #include <type_traits>
 
index c71c554..440c502 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_PROTOCOL_H
-#define MC_PROTOCOL_H
+#ifndef SIMGRID_MC_PROTOCOL_H
+#define SIMGRID_MC_PROTOCOL_H
 
 #include <xbt/misc.h>
 
index 1f7a677..08c9af5 100644 (file)
@@ -14,8 +14,8 @@
  *  passed to the application (without the MC specific arguments).
  */
 
-#ifndef MC_RECORD_H
-#define MC_RECORD_H
+#ifndef SIMGRID_MC_RECORD_H
+#define SIMGRID_MC_RECORD_H
 
 #include <stdbool.h>
 
index 2918305..934a30e 100644 (file)
@@ -6,11 +6,11 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include <xbt/misc.h>
-
 #ifndef SIMGRID_MC_REPLAY_H
 #define SIMGRID_MC_REPLAY_H
 
+#include <xbt/misc.h>
+
 SG_BEGIN_DECL()
 
 /** Replay path (if any) in string representation
index 33642d4..c70ad34 100644 (file)
@@ -4,13 +4,13 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#ifndef SIMGRID_MC_REQUEST_H
+#define SIMGRID_MC_REQUEST_H
+
 #include <simgrid_config.h>
 
 #include "../simix/smx_private.h"
 
-#ifndef MC_REQUEST_H
-#define MC_REQUEST_H
-
 SG_BEGIN_DECL()
 
 typedef enum e_mc_request_type {
index 00e4a0f..bd5ab1f 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_SAFETY_H
-#define MC_SAFETY_H
+#ifndef SIMGRID_MC_SAFETY_H
+#define SIMGRID_MC_SAFETY_H
 
 #include <stdint.h>
 
index e1ed05d..e2c1a23 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_SERVER_H
-#define MC_SERVER_H
+#ifndef SIMGRID_MC_SERVER_H
+#define SIMGRID_MC_SERVER_H
 
 #include <poll.h>
 
index 510bd2a..49d69be 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_SMX_H
-#define MC_SMX_H
+#ifndef SIMGRID_MC_SMX_H
+#define SIMGRID_MC_SMX_H
 
 #include <stddef.h>
 
index 8d9ce91..fc2ea78 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_SNAPSHOT_H
-#define MC_SNAPSHOT_H
+#ifndef SIMGRID_MC_SNAPSHOT_H
+#define SIMGRID_MC_SNAPSHOT_H
 
 #include <sys/types.h> // off_t
 #include <stdint.h> // size_t
index f44ac48..152e7a0 100644 (file)
@@ -4,8 +4,8 @@
 /* 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 MC_STATE_H
-#define MC_STATE_H
+#ifndef SIMGRID_MC_STATE_H
+#define SIMGRID_MC_STATE_H
 
 #include <simgrid_config.h>
 #include "../simix/smx_private.h"
index 38287f1..eac812d 100644 (file)
@@ -5,8 +5,8 @@
 /* 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 MC_UNW_H
-#define MC_UNW_H
+#ifndef SIMGRID_MC_UNW_H
+#define SIMGRID_MC_UNW_H
 
 /** \file
  *  Libunwind implementation for the model-checker
index aa740df..3e80613 100644 (file)
@@ -3,6 +3,9 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#ifndef SIMGRID_MCER_IGNORE_H
+#define SIMGRID_MCER_IGNORE_H
+
 #include <xbt/dynar.h>
 
 #include "mc/datatypes.h"
@@ -17,3 +20,5 @@ XBT_INTERNAL void MC_heap_region_ignore_insert(mc_heap_ignore_region_t region);
 XBT_INTERNAL void MC_heap_region_ignore_remove(void *address, size_t size);
 
 SG_END_DECL();
+
+#endif
\ No newline at end of file
index 434b254..5988740 100644 (file)
@@ -41,28 +41,28 @@ msg_error_t MSG_action_trace_run(char *path)
   xbt_dynar_t todo;
   xbt_dict_cursor_t cursor;
 
-  action_fp=NULL;  
+  xbt_action_fp=NULL;
   if (path) {
-    action_fp = fopen(path, "r");
-    if (action_fp == NULL)
+         xbt_action_fp = fopen(path, "r");
+    if (xbt_action_fp == NULL)
       xbt_die("Cannot open %s: %s", path, strerror(errno));
   }
   res = MSG_main();
 
-  if (!xbt_dict_is_empty(action_queues)) {
+  if (!xbt_dict_is_empty(xbt_action_queues)) {
     XBT_WARN
         ("Not all actions got consumed. If the simulation ended successfully (without deadlock), you may want to add new processes to your deployment file.");
 
 
-    xbt_dict_foreach(action_queues, cursor, name, todo) {
+    xbt_dict_foreach(xbt_action_queues, cursor, name, todo) {
       XBT_WARN("Still %lu actions for %s", xbt_dynar_length(todo), name);
     }
   }
 
   if (path)
-    fclose(action_fp);
-  xbt_dict_free(&action_queues);
-  action_queues = xbt_dict_new_homogeneous(NULL);
+    fclose(xbt_action_fp);
+  xbt_dict_free(&xbt_action_queues);
+  xbt_action_queues = xbt_dict_new_homogeneous(NULL);
 
   return res;
 }
index 6deb895..bfb859b 100644 (file)
@@ -135,7 +135,7 @@ msg_error_t MSG_main(void)
  * Do --help on any simgrid binary to see the list of currently existing configuration variables, and see Section @ref options.
  *
  * Example:
- * MSG_config("workstation/model","ptask_L07");
+ * MSG_config("host/model","ptask_L07");
  */
 void MSG_config(const char *key, const char *value){
   xbt_assert(msg_global,"ERROR: Please call MSG_init() before using MSG_config()");
index 074ed17..7da0e29 100644 (file)
@@ -26,9 +26,9 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(msg);
  */
 
 /********************************* Host **************************************/
-msg_host_t __MSG_host_create(smx_host_t workstation)
+msg_host_t __MSG_host_create(smx_host_t host)
 {
-  const char *name = SIMIX_host_get_name(workstation);
+  const char *name = SIMIX_host_get_name(host);
   msg_host_priv_t priv = xbt_new0(s_msg_host_priv_t, 1);
 
 #ifdef MSG_USE_DEPRECATED
@@ -61,7 +61,7 @@ msg_host_t __MSG_host_create(smx_host_t workstation)
 }
 
 
-/** \ingroup msg_host_management
+/** \ingroup m_host_management
  * \brief Finds a msg_host_t using its name.
  *
  * This is a name directory service
@@ -207,6 +207,7 @@ msg_host_t *MSG_get_host_table(void)
 
 /** \ingroup m_host_management
  * \brief Return a dynar containing all the hosts declared at a given point of time
+ * \remark The host order in the returned array is generally different from the host creation/declaration order in the XML platform (we use a hash table internally)
  */
 xbt_dynar_t MSG_hosts_as_dynar(void) {
   xbt_lib_cursor_t cursor;
@@ -468,7 +469,7 @@ xbt_dynar_t MSG_host_get_attached_storage_list(msg_host_t host)
   return (simcall_host_get_attached_storage_list(host));
 }
 
-/** \ingroup msg_host_management
+/** \ingroup m_host_management
  * \brief Return the content of mounted storages on an host.
  * \param host a host
  * \return a dict containing content (as a dict) of all storages mounted on the host
index 4e0971f..efee6ce 100644 (file)
@@ -548,7 +548,7 @@ msg_error_t MSG_storage_set_data(msg_storage_t storage, void *data)
   return MSG_OK;
 }
 
-/** \ingroup msg_host_management
+/** \ingroup m_host_management
  *
  * \brief Returns the user data of a #msg_storage_t.
  *
index 4a3f158..c2081d7 100644 (file)
@@ -145,6 +145,9 @@ MSG_mailbox_get_task_ext_bounded(msg_mailbox_t mailbox, msg_task_t * task,
     case timeout_error:
       ret = MSG_TIMEOUT;
       break;
+    case host_error:
+      ret = MSG_HOST_FAILURE;
+      break;
     default:
       RETHROW;
     }
index c806583..bd007ac 100644 (file)
@@ -154,7 +154,7 @@ XBT_PUBLIC_DATA(MSG_Global_t) msg_global;
 #  define MSG_RETURN(val) return(val)
 #endif
 
-msg_host_t __MSG_host_create(smx_host_t workstation);
+msg_host_t __MSG_host_create(smx_host_t host);
 msg_storage_t __MSG_storage_create(smx_storage_t storage);
 void __MSG_host_destroy(msg_host_t host);
 void __MSG_storage_destroy(msg_storage_priv_t host);
index bad98f6..419e710 100644 (file)
@@ -15,11 +15,9 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg,
 /** @addtogroup m_process_management
  * \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Processes" --> \endhtmlonly
  *
- *  We need to simulate many independent scheduling decisions, so
- *  the concept of <em>process</em> is at the heart of the
- *  simulator. A process may be defined as a <em>code</em>, with
- *  some <em>private data</em>, executing in a <em>location</em>.
- *  \see msg_process_t
+ *  Processes (#msg_process_t) are independent agents that can do stuff on their own. They are in charge of executing your code interacting with the simulated world.
+ *  A process may be defined as a <em>code</em> with some <em>private data</em>.
+ *  Processes must be located on <em>hosts</em> (#msg_host_t), and they exchange data by sending tasks (#msg_task_t) that are similar to envelops containing data.
  */
 
 /******************************** Process ************************************/
@@ -243,7 +241,10 @@ void* MSG_process_get_data(msg_process_t process)
 
   /* get from SIMIX the MSG process data, and then the user data */
   simdata_process_t simdata = simcall_process_get_data(process);
-  return simdata->data;
+  if (simdata)
+    return simdata->data;
+  else
+    return NULL;
 }
 
 /** \ingroup m_process_management
index c4caaf9..6e8f6b7 100644 (file)
@@ -108,17 +108,6 @@ extern int asnprintf(char **ptr, size_t str_m, const char *fmt, /*args */
 extern int vasnprintf(char **ptr, size_t str_m, const char *fmt,
                       va_list ap);
 
-/*
- * That's needed to protect solaris's printf from ever seing NULL associated to a %s format
- * (without adding an extra check on working platforms :)
- */
-
-#ifdef PRINTF_NULL_WORKING
-#  define PRINTF_STR(a) (a)
-#else
-#  define PRINTF_STR(a) (a)?:"(null)"
-#endif
-
 /*
  * What we need to extract the backtrace in exception handling code
  */
index 4af1362..b8c3c81 100644 (file)
@@ -79,7 +79,7 @@ void SD_init(int *argc, char **argv)
 
   surf_init(argc, argv);
 
-  xbt_cfg_setdefault_string(_sg_cfg_set, "workstation/model",
+  xbt_cfg_setdefault_string(_sg_cfg_set, "host/model",
                             "ptask_L07");
 
 #ifdef HAVE_JEDULE
@@ -102,7 +102,7 @@ void SD_init(int *argc, char **argv)
  * Do --help on any simgrid binary to see the list of currently existing configuration variables, and see Section @ref options.
  *
  * Example:
- * SD_config("workstation/model","default");
+ * SD_config("host/model","default");
  */
 void SD_config(const char *key, const char *value){
   xbt_assert(sd_global,"ERROR: Please call SD_init() before using SD_config()");
@@ -210,8 +210,8 @@ void SD_create_environment(const char *platform_file)
 
   /* now let's create the SD wrappers for workstations, storages and links */
   xbt_lib_foreach(host_lib, cursor, name, surf_workstation){
-    if(surf_workstation[SURF_WKS_LEVEL])
-      __SD_workstation_create(surf_workstation[SURF_WKS_LEVEL], NULL);
+    if(surf_workstation[SURF_HOST_LEVEL])
+      __SD_workstation_create(surf_workstation[SURF_HOST_LEVEL], NULL);
   }
 
   xbt_lib_foreach(link_lib, cursor, name, surf_link) {
index 9ab54e6..aa31087 100644 (file)
@@ -292,9 +292,10 @@ void SD_task_set_data(SD_task_t task, void *data)
  * \brief Sets the rate of a task
  *
  * This will change the network bandwidth a task can use. This rate
- * depends on both the nominal bandwidth on the route onto which the task is
- * scheduled (\see SD_task_get_current_bandwidth) and the amount of data to
- * transfer.
+ * cannot be dynamically changed. Once the task has started, this call
+ * is ineffective. This rate depends on both the nominal bandwidth on
+ * the route onto which the task is scheduled (\see
+ * SD_task_get_current_bandwidth) and the amount of data to transfer.
  *
  * To divide the nominal bandwidth by 2, the rate then has to be :
  *    rate = bandwidth/(2*amount)
@@ -306,8 +307,11 @@ void SD_task_set_rate(SD_task_t task, double rate)
 {
   xbt_assert(task->kind == SD_TASK_COMM_E2E,
              "The rate can be modified for end-to-end communications only.");
-
-  task->rate = rate;
+  if(task->start_time<0) {
+    task->rate = rate;
+  } else {
+    XBT_WARN("Task %p has started. Changing rate is ineffective.", task);
+  }
 }
 
 /**
@@ -1086,7 +1090,7 @@ void __SD_task_really_run(SD_task_t task)
 {
 
   int i;
-  void **surf_workstations;
+  void **surf_hosts;
 
   xbt_assert(__SD_task_is_runnable_or_in_fifo(task),
               "Task '%s' is not runnable or in a fifo! Task state: %d",
@@ -1096,10 +1100,10 @@ void __SD_task_really_run(SD_task_t task)
               SD_task_get_name(task));
 
   XBT_DEBUG("Really running task '%s'", SD_task_get_name(task));
-  int workstation_nb = task->workstation_nb;
+  int host_nb = task->workstation_nb;
 
   /* set this task as current task for the workstations in sequential mode */
-  for (i = 0; i < workstation_nb; i++) {
+  for (i = 0; i < host_nb; i++) {
     if (SD_workstation_get_access_mode(task->workstation_list[i]) ==
         SD_WORKSTATION_SEQUENTIAL_ACCESS) {
       SD_workstation_priv(task->workstation_list[i])->current_task = task;
@@ -1115,25 +1119,25 @@ void __SD_task_really_run(SD_task_t task)
 
   /* we have to create a Surf workstation array instead of the SimDag
    * workstation array */
-  surf_workstations = xbt_new(void *, workstation_nb);
+  surf_hosts = xbt_new(void *, host_nb);
 
-  for (i = 0; i < workstation_nb; i++)
-    surf_workstations[i] =  surf_workstation_resource_priv(task->workstation_list[i]);
+  for (i = 0; i < host_nb; i++)
+    surf_hosts[i] =  surf_host_resource_priv(task->workstation_list[i]);
 
-  double *flops_amount = xbt_new0(double, workstation_nb);
-  double *bytes_amount = xbt_new0(double, workstation_nb * workstation_nb);
+  double *flops_amount = xbt_new0(double, host_nb);
+  double *bytes_amount = xbt_new0(double, host_nb * host_nb);
 
 
   if(task->flops_amount)
     memcpy(flops_amount, task->flops_amount, sizeof(double) *
-           workstation_nb);
+           host_nb);
   if(task->bytes_amount)
     memcpy(bytes_amount, task->bytes_amount,
-           sizeof(double) * workstation_nb * workstation_nb);
+           sizeof(double) * host_nb * host_nb);
 
-  task->surf_action = surf_workstation_model_execute_parallel_task((surf_workstation_model_t)surf_workstation_model,
-                                                                    workstation_nb,
-                                                                    surf_workstations,
+  task->surf_action = surf_host_model_execute_parallel_task((surf_host_model_t)surf_host_model,
+                                                                    host_nb,
+                                                                    surf_hosts,
                                                                     flops_amount,
                                                                     bytes_amount,
                                                                     task->rate);
index 5d08726..bcd3285 100644 (file)
@@ -79,8 +79,9 @@ SD_workstation_t SD_workstation_get_by_name(const char *name)
  * \brief Returns the workstation list
  *
  * Use SD_workstation_get_number() to know the array size.
- *
+ * 
  * \return an array of \ref SD_workstation_t containing all workstations
+ * \remark The workstation order in the returned array is generally different from the workstation creation/declaration order in the XML platform (we use a hash table internally).
  * \see SD_workstation_get_number()
  */
 const SD_workstation_t *SD_workstation_get_list(void)
@@ -177,7 +178,7 @@ const char *SD_workstation_get_property_value(SD_workstation_t ws,
  */
 xbt_dict_t SD_workstation_get_properties(SD_workstation_t workstation)
 {
-  return surf_resource_get_properties(surf_workstation_resource_priv(workstation));
+  return surf_resource_get_properties(surf_host_resource_priv(workstation));
 }
 
 
@@ -246,7 +247,7 @@ const SD_link_t *SD_route_get_list(SD_workstation_t src,
   surf_src = src;
   surf_dst = dst;
 
-  surf_route = surf_workstation_model_get_route((surf_workstation_model_t)surf_workstation_model,
+  surf_route = surf_host_model_get_route((surf_host_model_t)surf_host_model,
                                                        surf_src, surf_dst);
 
   xbt_dynar_foreach(surf_route, cpt, surf_link) {
@@ -267,8 +268,8 @@ const SD_link_t *SD_route_get_list(SD_workstation_t src,
  */
 int SD_route_get_size(SD_workstation_t src, SD_workstation_t dst)
 {
-  return xbt_dynar_length(surf_workstation_model_get_route(
-                   (surf_workstation_model_t)surf_workstation_model, src, dst));
+  return xbt_dynar_length(surf_host_model_get_route(
+                   (surf_host_model_t)surf_host_model, src, dst));
 }
 
 /**
@@ -280,7 +281,7 @@ int SD_route_get_size(SD_workstation_t src, SD_workstation_t dst)
  */
 double SD_workstation_get_power(SD_workstation_t workstation)
 {
-  return surf_workstation_get_speed(workstation, 1.0);
+  return surf_host_get_speed(workstation, 1.0);
 }
 /**
  * \brief Returns the amount of cores of a workstation
@@ -289,7 +290,7 @@ double SD_workstation_get_power(SD_workstation_t workstation)
  * \return the amount of cores of this workstation
  */
 int SD_workstation_get_cores(SD_workstation_t workstation) {
-  return surf_workstation_get_core(workstation);
+  return surf_host_get_core(workstation);
 }
 
 /**
@@ -301,7 +302,7 @@ int SD_workstation_get_cores(SD_workstation_t workstation) {
  */
 double SD_workstation_get_available_power(SD_workstation_t workstation)
 {
-  return surf_workstation_get_available_speed(workstation);
+  return surf_host_get_available_speed(workstation);
 }
 
 /**
@@ -485,7 +486,7 @@ void SD_workstation_set_access_mode(SD_workstation_t workstation,
  * \return a dynar containing all mounted storages on the workstation
  */
 xbt_dict_t SD_workstation_get_mounted_storage_list(SD_workstation_t workstation){
-  return surf_workstation_get_mounted_storage_list(workstation);
+  return surf_host_get_mounted_storage_list(workstation);
 }
 
 /**
@@ -495,7 +496,7 @@ xbt_dict_t SD_workstation_get_mounted_storage_list(SD_workstation_t workstation)
  * \return a dynar containing all mounted storages on the workstation
  */
 xbt_dynar_t SD_workstation_get_attached_storage_list(SD_workstation_t workstation){
-  return surf_workstation_get_attached_storage_list(workstation);
+  return surf_host_get_attached_storage_list(workstation);
 }
 
 /**
index 56e24ce..8ab8535 100644 (file)
@@ -83,7 +83,7 @@ static void sg_config_cmd_line(int *argc, char **argv)
     } else if (!strcmp(argv[i], "--help-models")) {
       int k;
 
-      model_help("workstation", surf_workstation_model_description);
+      model_help("host", surf_host_model_description);
       printf("\n");
       model_help("CPU", surf_cpu_model_description);
       printf("\n");
@@ -131,8 +131,8 @@ static void _sg_cfg_cb__plugin(const char *name, int pos)
   surf_plugin_description[plugin_id].model_init_preparse();
 }
 
-/* callback of the workstation/model variable */
-static void _sg_cfg_cb__workstation_model(const char *name, int pos)
+/* callback of the host/model variable */
+static void _sg_cfg_cb__host_model(const char *name, int pos)
 {
   char *val;
 
@@ -142,16 +142,16 @@ static void _sg_cfg_cb__workstation_model(const char *name, int pos)
   val = xbt_cfg_get_string(_sg_cfg_set, name);
 
   if (!strcmp(val, "help")) {
-    model_help("workstation", surf_workstation_model_description);
+    model_help("host", surf_host_model_description);
     sg_cfg_exit_early();
   }
 
   /* Make sure that the model exists */
-  find_model_description(surf_workstation_model_description, val);
+  find_model_description(surf_host_model_description, val);
 }
 
-/* callback of the vm_workstation/model variable */
-static void _sg_cfg_cb__vm_workstation_model(const char *name, int pos)
+/* callback of the vm/model variable */
+static void _sg_cfg_cb__vm_model(const char *name, int pos)
 {
   char *val;
 
@@ -161,12 +161,12 @@ static void _sg_cfg_cb__vm_workstation_model(const char *name, int pos)
   val = xbt_cfg_get_string(_sg_cfg_set, name);
 
   if (!strcmp(val, "help")) {
-    model_help("vm_workstation", surf_vm_workstation_model_description);
+    model_help("vm", surf_vm_model_description);
     sg_cfg_exit_early();
   }
 
   /* Make sure that the model exists */
-  find_model_description(surf_vm_workstation_model_description, val);
+  find_model_description(surf_vm_model_description, val);
 }
 
 /* callback of the cpu/model variable */
@@ -226,7 +226,7 @@ static void _sg_cfg_cb__storage_mode(const char *name, int pos)
   find_model_description(surf_storage_model_description, val);
 }
 
-/* callback of the workstation_model variable */
+/* callback of the network_model variable */
 static void _sg_cfg_cb__network_model(const char *name, int pos)
 {
   char *val;
@@ -553,17 +553,17 @@ void sg_config_init(int *argc, char **argv)
                      xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__optimization_mode, NULL);
     xbt_cfg_setdefault_string(_sg_cfg_set, "network/optim", "Lazy");
 
-    describe_model(description, surf_workstation_model_description,
-                   "model", "The model to use for the workstation");
-    xbt_cfg_register(&_sg_cfg_set, "workstation/model", description,
-                     xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__workstation_model, NULL);
-    xbt_cfg_setdefault_string(_sg_cfg_set, "workstation/model", "default");
+    describe_model(description, surf_host_model_description,
+                   "model", "The model to use for the host");
+    xbt_cfg_register(&_sg_cfg_set, "host/model", description,
+                     xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__host_model, NULL);
+    xbt_cfg_setdefault_string(_sg_cfg_set, "host/model", "default");
 
-    describe_model(description, surf_vm_workstation_model_description,
-                   "model", "The model to use for the vm workstation");
-    xbt_cfg_register(&_sg_cfg_set, "vm_workstation/model", description,
-                     xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__vm_workstation_model, NULL);
-    xbt_cfg_setdefault_string(_sg_cfg_set, "vm_workstation/model", "default");
+    describe_model(description, surf_vm_model_description,
+                   "model", "The model to use for the vm");
+    xbt_cfg_register(&_sg_cfg_set, "vm/model", description,
+                     xbt_cfgelm_string, 1, 1, &_sg_cfg_cb__vm_model, NULL);
+    xbt_cfg_setdefault_string(_sg_cfg_set, "vm/model", "default");
 
     xbt_cfg_register(&_sg_cfg_set, "network/TCP_gamma",
                      "Size of the biggest TCP window (cat /proc/sys/net/ipv4/tcp_[rw]mem for recv/send window; Use the last given value, which is the max window size)",
@@ -998,52 +998,47 @@ void sg_config_finalize(void)
   _sg_cfg_init_status = 0;
 }
 
-/* Pick the right models for CPU, net and workstation, and call their model_init_preparse */
+/* Pick the right models for CPU, net and host, and call their model_init_preparse */
 void surf_config_models_setup()
 {
-  const char *workstation_model_name;
-  const char *vm_workstation_model_name;
-  int workstation_id = -1;
-  int vm_workstation_id = -1;
+  const char *host_model_name;
+  const char *vm_model_name;
+  int host_id = -1;
+  int vm_id = -1;
   char *network_model_name = NULL;
   char *cpu_model_name = NULL;
   int storage_id = -1;
   char *storage_model_name = NULL;
 
-  workstation_model_name =
-      xbt_cfg_get_string(_sg_cfg_set, "workstation/model");
-  vm_workstation_model_name =
-      xbt_cfg_get_string(_sg_cfg_set, "vm_workstation/model");
+  host_model_name = xbt_cfg_get_string(_sg_cfg_set, "host/model");
+  vm_model_name = xbt_cfg_get_string(_sg_cfg_set, "vm/model");
   network_model_name = xbt_cfg_get_string(_sg_cfg_set, "network/model");
   cpu_model_name = xbt_cfg_get_string(_sg_cfg_set, "cpu/model");
   storage_model_name = xbt_cfg_get_string(_sg_cfg_set, "storage/model");
 
   /* Check whether we use a net/cpu model differing from the default ones, in which case
-   * we should switch to the "compound" workstation model to correctly dispatch stuff to
+   * we should switch to the "compound" host model to correctly dispatch stuff to
    * the right net/cpu models.
    */
 
   if ((!xbt_cfg_is_default_value(_sg_cfg_set, "network/model") ||
        !xbt_cfg_is_default_value(_sg_cfg_set, "cpu/model")) &&
-      xbt_cfg_is_default_value(_sg_cfg_set, "workstation/model")) {
-    XBT_INFO("Switching workstation model to compound since you changed the network and/or cpu model(s)");
-    workstation_model_name = "compound";
-    xbt_cfg_set_string(_sg_cfg_set, "workstation/model", workstation_model_name);
+      xbt_cfg_is_default_value(_sg_cfg_set, "host/model")) {
+    host_model_name = "compound";
+    xbt_cfg_set_string(_sg_cfg_set, "host/model", host_model_name);
   }
 
-  XBT_DEBUG("Workstation model: %s", workstation_model_name);
-  workstation_id =
-      find_model_description(surf_workstation_model_description,
-                             workstation_model_name);
-  if (!strcmp(workstation_model_name, "compound")) {
+  XBT_DEBUG("host model: %s", host_model_name);
+  host_id = find_model_description(surf_host_model_description, host_model_name);
+  if (!strcmp(host_model_name, "compound")) {
     int network_id = -1;
     int cpu_id = -1;
 
     xbt_assert(cpu_model_name,
-                "Set a cpu model to use with the 'compound' workstation model");
+                "Set a cpu model to use with the 'compound' host model");
 
     xbt_assert(network_model_name,
-                "Set a network model to use with the 'compound' workstation model");
+                "Set a network model to use with the 'compound' host model");
 
     if(surf_cpu_model_init_preparse){
       surf_cpu_model_init_preparse();
@@ -1059,13 +1054,12 @@ void surf_config_models_setup()
     surf_network_model_description[network_id].model_init_preparse();
   }
 
-  XBT_DEBUG("Call workstation_model_init");
-  surf_workstation_model_description[workstation_id].model_init_preparse();
+  XBT_DEBUG("Call host_model_init");
+  surf_host_model_description[host_id].model_init_preparse();
 
-  XBT_DEBUG("Call vm_workstation_model_init");
-  vm_workstation_id = find_model_description(surf_vm_workstation_model_description,
-                                          vm_workstation_model_name);
-  surf_vm_workstation_model_description[vm_workstation_id].model_init_preparse();
+  XBT_DEBUG("Call vm_model_init");
+  vm_id = find_model_description(surf_vm_model_description, vm_model_name);
+  surf_vm_model_description[vm_id].model_init_preparse();
 
   XBT_DEBUG("Call storage_model_init");
   storage_id = find_model_description(surf_storage_model_description, storage_model_name);
index 6dbcac6..1ddf080 100644 (file)
@@ -18,7 +18,11 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_context);
 
 typedef struct s_smx_ctx_boost {
   s_smx_ctx_base_t super;       /* Fields of super implementation */
+#if HAVE_BOOST_CONTEXT == 1
   boost::context::fcontext_t* fc;
+#else
+  boost::context::fcontext_t fc;
+#endif
   void* stack;
 } s_smx_ctx_boost_t, *smx_ctx_boost_t;
 
@@ -35,8 +39,21 @@ static void smx_ctx_boost_suspend_serial(smx_context_t context);
 static void smx_ctx_boost_resume_serial(smx_process_t first_process);
 static void smx_ctx_boost_runall_serial(void);
 
+#ifdef CONTEXT_THREADS
+static void smx_ctx_boost_stop_parallel(smx_context_t context);
+static void smx_ctx_boost_suspend_parallel(smx_context_t context);
+static void smx_ctx_boost_resume_parallel(smx_process_t first_process);
+static void smx_ctx_boost_runall_parallel(void);
+#endif
+
+#ifdef CONTEXT_THREADS
+static xbt_parmap_t boost_parmap;
+static smx_ctx_boost_t* boost_workers_context;
+static unsigned long boost_threads_working;
+static xbt_os_thread_key_t boost_worker_id_key;
+#endif
+
 static unsigned long boost_process_index = 0;
-static boost::context::fcontext_t boost_maestro_fcontext;
 static smx_ctx_boost_t boost_maestro_context;
 
 void SIMIX_ctx_boost_factory_init(smx_context_factory_t *factory)
@@ -51,7 +68,20 @@ void SIMIX_ctx_boost_factory_init(smx_context_factory_t *factory)
   (*factory)->name = "smx_boost_context_factory";
 
   if (SIMIX_context_is_parallel()) {
+#ifndef CONTEXT_THREADS
     THROWF(arg_error, 0, "No thread support for parallel context execution");
+#else
+    int nthreads = SIMIX_context_get_nthreads();
+    boost_parmap = xbt_parmap_new(nthreads, SIMIX_context_get_parallel_mode());
+    boost_workers_context = xbt_new(smx_ctx_boost_t, nthreads);
+    boost_maestro_context = NULL;
+
+    xbt_os_thread_key_create(&boost_worker_id_key);
+
+    (*factory)->stop = smx_ctx_boost_stop_parallel;
+    (*factory)->suspend = smx_ctx_boost_suspend_parallel;
+    (*factory)->runall = smx_ctx_boost_runall_parallel;
+#endif
   } else {
     (*factory)->stop = smx_ctx_boost_stop_serial;
     (*factory)->suspend = smx_ctx_boost_suspend_serial;
@@ -63,6 +93,14 @@ void SIMIX_ctx_boost_factory_init(smx_context_factory_t *factory)
 
 static int smx_ctx_boost_factory_finalize(smx_context_factory_t *factory)
 {
+#ifdef CONTEXT_THREADS
+  if (boost_parmap) {
+    xbt_parmap_destroy(boost_parmap);
+    boost_parmap = nullptr;
+  }
+  xbt_free(boost_workers_context);
+  boost_workers_context = nullptr;
+#endif
   return smx_ctx_base_factory_finalize(factory);
 }
 
@@ -90,14 +128,17 @@ smx_ctx_boost_create_context(xbt_main_func_t code, int argc, char **argv,
 #else
     void* stack = context->stack;
 #endif
-   context->fc = boost::context::make_fcontext(
+    context->fc = boost::context::make_fcontext(
                       stack,
                       smx_context_usable_stack_size,
                       smx_ctx_boost_wrapper);
-  } else if (process != nullptr && boost_maestro_context == nullptr) {
+  } else {
     context->stack = nullptr;
-    context->fc = &boost_maestro_fcontext;
-    boost_maestro_context = context;
+#if HAVE_BOOST_CONTEXT == 1
+    context->fc = new boost::context::fcontext_t();
+#endif
+    if (boost_maestro_context == nullptr)
+      boost_maestro_context = context;
   }
 
   return (smx_context_t) context;
@@ -108,6 +149,10 @@ static void smx_ctx_boost_free(smx_context_t c)
   smx_ctx_boost_t context = (smx_ctx_boost_t) c;
   if (!context)
     return;
+#if HAVE_BOOST_CONTEXT == 1
+  if (!context->stack)
+    delete context->fc;
+#endif
   if ((smx_ctx_boost_t) c == boost_maestro_context)
     boost_maestro_context = nullptr;
   SIMIX_context_stack_delete(context->stack);
@@ -145,16 +190,26 @@ static void smx_ctx_boost_suspend_serial(smx_context_t context)
     next_context = (smx_ctx_boost_t) boost_maestro_context;
   }
   SIMIX_context_set_current((smx_context_t) next_context);
+#if HAVE_BOOST_CONTEXT == 1
   boost::context::jump_fcontext(
     ((smx_ctx_boost_t)context)->fc, next_context->fc, (intptr_t)next_context);
+#else
+  boost::context::jump_fcontext(
+    &((smx_ctx_boost_t)context)->fc, next_context->fc, (intptr_t)next_context);
+#endif
 }
 
 static void smx_ctx_boost_resume_serial(smx_process_t first_process)
 {
   smx_ctx_boost_t context = (smx_ctx_boost_t) first_process->context;
   SIMIX_context_set_current((smx_context_t) context);
+#if HAVE_BOOST_CONTEXT == 1
   boost::context::jump_fcontext(boost_maestro_context->fc, context->fc,
     (intptr_t)context);
+#else
+  boost::context::jump_fcontext(&boost_maestro_context->fc, context->fc,
+    (intptr_t)context);
+#endif
 }
 
 static void smx_ctx_boost_runall_serial(void)
@@ -166,3 +221,67 @@ static void smx_ctx_boost_runall_serial(void)
   /* execute the first process */
   smx_ctx_boost_resume_serial(first_process);
 }
+
+// **** Parallel code
+
+#ifdef CONTEXT_THREADS
+
+static void smx_ctx_boost_stop_parallel(smx_context_t context)
+{
+  smx_ctx_base_stop(context);
+  smx_ctx_boost_suspend_parallel(context);
+}
+
+static void smx_ctx_boost_suspend_parallel(smx_context_t context)
+{
+  smx_process_t next_work = (smx_process_t) xbt_parmap_next(boost_parmap);
+  smx_ctx_boost_t next_context;
+
+  if (next_work != NULL) {
+    XBT_DEBUG("Run next process");
+    next_context = (smx_ctx_boost_t) next_work->context;
+  }
+  else {
+    XBT_DEBUG("No more processes to run");
+    unsigned long worker_id =
+        (unsigned long) xbt_os_thread_get_specific(boost_worker_id_key);
+    next_context = boost_workers_context[worker_id];
+  }
+
+  SIMIX_context_set_current((smx_context_t) next_context);
+#if HAVE_BOOST_CONTEXT == 1
+  boost::context::jump_fcontext(
+    ((smx_ctx_boost_t)context)->fc, next_context->fc, (intptr_t)next_context);
+#else
+  boost::context::jump_fcontext(
+    &((smx_ctx_boost_t)context)->fc, next_context->fc, (intptr_t)next_context);
+#endif
+}
+
+static void smx_ctx_boost_resume_parallel(smx_process_t process)
+{
+  unsigned long worker_id = __sync_fetch_and_add(&boost_threads_working, 1);
+  xbt_os_thread_set_specific(boost_worker_id_key, (void*) worker_id);
+
+  smx_ctx_boost_t worker_context = (smx_ctx_boost_t)SIMIX_context_self();
+  boost_workers_context[worker_id] = worker_context;
+  smx_ctx_boost_t context = (smx_ctx_boost_t) process->context;
+
+  SIMIX_context_set_current((smx_context_t) context);
+#if HAVE_BOOST_CONTEXT == 1
+  boost::context::jump_fcontext(worker_context->fc, context->fc,
+    (intptr_t)context);
+#else
+  boost::context::jump_fcontext(&worker_context->fc, context->fc,
+    (intptr_t)context);
+#endif
+}
+
+static void smx_ctx_boost_runall_parallel(void)
+{
+  boost_threads_working = 0;
+  xbt_parmap_apply(boost_parmap, (void_f_pvoid_t) smx_ctx_boost_resume_parallel,
+    simix_global->process_to_run);
+}
+
+#endif
index 4754e71..78e3307 100644 (file)
@@ -45,15 +45,15 @@ void SIMIX_create_environment(const char *file)
 
 void SIMIX_post_create_environment(void) {
 
-  void **workstation = NULL;
+  void **host = NULL;
   void **storage = NULL;
   xbt_lib_cursor_t cursor = NULL;
   char *name = NULL;
 
   /* Create host at SIMIX level */
-  xbt_lib_foreach(host_lib, cursor, name, workstation) {
-    if(workstation[SURF_WKS_LEVEL])
-      SIMIX_host_create(name, workstation[SURF_WKS_LEVEL], NULL);
+  xbt_lib_foreach(host_lib, cursor, name, host) {
+    if(host[SURF_HOST_LEVEL])
+      SIMIX_host_create(name, NULL);
   }
 
   /* Create storage at SIMIX level */
index afbc67c..c7abb8a 100644 (file)
@@ -178,6 +178,7 @@ void SIMIX_global_init(int *argc, char **argv)
         SIMIX_synchro_mallocator_new_f, SIMIX_synchro_mallocator_free_f,
         SIMIX_synchro_mallocator_reset_f);
     simix_global->autorestart = SIMIX_host_restart_processes;
+    simix_global->mutex = xbt_os_mutex_init();
 
     surf_init(argc, argv);      /* Initialize SURF structures */
     SIMIX_context_mod_init();
@@ -212,8 +213,8 @@ void SIMIX_global_init(int *argc, char **argv)
     atexit(SIMIX_clean);
 
 #ifdef HAVE_MC
-  // The communication initialisation is done ASAP.
-  // We need to commuicate  initialisation of the different layers to the model-checker.
+  // The communication initialization is done ASAP.
+  // We need to communicate  initialization of the different layers to the model-checker.
   if (mc_mode == MC_MODE_NONE) {
     if (getenv(MC_ENV_SOCKET_FD)) {
       mc_mode = MC_MODE_CLIENT;
@@ -259,6 +260,9 @@ void SIMIX_clean(void)
   simix_global->process_to_destroy = NULL;
   xbt_dict_free(&(simix_global->registered_functions));
 
+  xbt_os_mutex_destroy(simix_global->mutex);
+  simix_global->mutex = NULL;
+
   /* Let's free maestro now */
   SIMIX_context_free(simix_global->maestro_process->context);
   xbt_free(simix_global->maestro_process->running_ctx);
index c11c704..819b819 100644 (file)
@@ -19,11 +19,9 @@ static void SIMIX_execution_finish(smx_synchro_t synchro);
 /**
  * \brief Internal function to create a SIMIX host.
  * \param name name of the host to create
- * \param workstation the SURF workstation to encapsulate
  * \param data some user data (may be NULL)
  */
-smx_host_t SIMIX_host_create(const char *name,
-                               void *workstation, void *data)
+smx_host_t SIMIX_host_create(const char *name, void *data)
 {
   smx_host_priv_t smx_host = xbt_new0(s_smx_host_priv_t, 1);
   s_smx_process_t proc;
@@ -48,8 +46,8 @@ void SIMIX_host_on(smx_host_t h)
 
   xbt_assert((host != NULL), "Invalid parameters");
 
-  if (surf_resource_get_state(surf_workstation_resource_priv(h))==SURF_RESOURCE_OFF) {
-    surf_resource_set_state(surf_workstation_resource_priv(h), SURF_RESOURCE_ON);
+  if (surf_resource_get_state(surf_host_resource_priv(h))==SURF_RESOURCE_OFF) {
+    surf_resource_set_state(surf_host_resource_priv(h), SURF_RESOURCE_ON);
 
     unsigned int cpt;
     smx_process_arg_t arg;
@@ -104,8 +102,8 @@ void SIMIX_host_off(smx_host_t h, smx_process_t issuer)
 
   xbt_assert((host != NULL), "Invalid parameters");
 
-  if (surf_resource_get_state(surf_workstation_resource_priv(h))==SURF_RESOURCE_ON) {
-       surf_resource_set_state(surf_workstation_resource_priv(h), SURF_RESOURCE_OFF);
+  if (surf_resource_get_state(surf_host_resource_priv(h))==SURF_RESOURCE_ON) {
+       surf_resource_set_state(surf_host_resource_priv(h), SURF_RESOURCE_OFF);
 
     /* Clean Simulator data */
     if (xbt_swag_size(host->process_list) != 0) {
@@ -177,31 +175,19 @@ const char* SIMIX_host_self_get_name(void)
   return SIMIX_host_get_name(host);
 }
 
-const char* SIMIX_host_get_name(smx_host_t host){
-  xbt_assert((host != NULL), "Invalid parameters");
-
-  return sg_host_name(host);
-}
-
 xbt_dict_t SIMIX_host_get_properties(smx_host_t host){
-  xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
-
-  return surf_resource_get_properties(surf_workstation_resource_priv(host));
+  return surf_resource_get_properties(surf_host_resource_priv(host));
 }
 
 double SIMIX_host_get_speed(smx_host_t host){
-  xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
-  return surf_workstation_get_speed(host, 1.0);
+  return surf_host_get_speed(host, 1.0);
 }
 
 int SIMIX_host_get_core(smx_host_t host){
-  xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
-
-  return surf_workstation_get_core(host);
+  return surf_host_get_core(host);
 }
 
 xbt_swag_t SIMIX_host_get_process_list(smx_host_t host){
-  xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
   smx_host_priv_t host_priv = SIMIX_host_priv(host);
 
   return host_priv->process_list;
@@ -209,53 +195,41 @@ xbt_swag_t SIMIX_host_get_process_list(smx_host_t host){
 
 
 double SIMIX_host_get_available_speed(smx_host_t host){
-  xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
-
-  return surf_workstation_get_available_speed(host);
+  return surf_host_get_available_speed(host);
 }
 
 double SIMIX_host_get_current_power_peak(smx_host_t host) {
-         xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
-         return surf_workstation_get_current_power_peak(host);
+         return surf_host_get_current_power_peak(host);
 }
 
 double SIMIX_host_get_power_peak_at(smx_host_t host, int pstate_index) {
-         xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
-
-         return surf_workstation_get_power_peak_at(host, pstate_index);
+         return surf_host_get_power_peak_at(host, pstate_index);
 }
 
 int SIMIX_host_get_nb_pstates(smx_host_t host) {
-         xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
-
-         return surf_workstation_get_nb_pstates(host);
+         return surf_host_get_nb_pstates(host);
 }
 
 
 void SIMIX_host_set_pstate(smx_host_t host, int pstate_index) {
-         xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
-
-         surf_workstation_set_pstate(host, pstate_index);
+         surf_host_set_pstate(host, pstate_index);
 }
 int SIMIX_host_get_pstate(smx_host_t host) {
-         return surf_workstation_get_pstate(host);
+         return surf_host_get_pstate(host);
 }
 
 double SIMIX_host_get_consumed_energy(smx_host_t host) {
-         xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
-         return surf_workstation_get_consumed_energy(host);
+         return surf_host_get_consumed_energy(host);
 }
 double SIMIX_host_get_wattmin_at(smx_host_t host,int pstate) {
-         return surf_workstation_get_wattmin_at(host,pstate);
+         return surf_host_get_wattmin_at(host,pstate);
 }
 double SIMIX_host_get_wattmax_at(smx_host_t host,int pstate) {
-         return surf_workstation_get_wattmax_at(host,pstate);
+         return surf_host_get_wattmax_at(host,pstate);
 }
 
 int SIMIX_host_get_state(smx_host_t host){
-  xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
-
-  return surf_resource_get_state(surf_workstation_resource_priv(host));
+  return surf_resource_get_state(surf_host_resource_priv(host));
 }
 
 void _SIMIX_host_free_process_arg(void *data)
@@ -386,7 +360,7 @@ smx_synchro_t SIMIX_host_execute(const char *name,
   /* set surf's action */
   if (!MC_is_active() && !MC_record_replay_is_active()) {
 
-    synchro->execution.surf_exec = surf_workstation_execute(host, flops_amount);
+    synchro->execution.surf_exec = surf_host_execute(host, flops_amount);
     surf_action_set_data(synchro->execution.surf_exec, synchro);
     surf_action_set_priority(synchro->execution.surf_exec, priority);
 
@@ -415,7 +389,7 @@ smx_synchro_t SIMIX_host_parallel_execute(const char *name,
     double *flops_amount, double *bytes_amount,
     double amount, double rate){
 
-  void **workstation_list = NULL;
+  void **surf_host_list = NULL;
   int i;
 
   /* alloc structures and initialize */
@@ -427,17 +401,17 @@ smx_synchro_t SIMIX_host_parallel_execute(const char *name,
   synchro->category = NULL;
 
   /* set surf's synchro */
-  workstation_list = xbt_new0(void *, host_nb);
+  surf_host_list = xbt_new0(void *, host_nb);
   for (i = 0; i < host_nb; i++)
-    workstation_list[i] = surf_workstation_resource_priv(host_list[i]);
+    surf_host_list[i] = surf_host_resource_priv(host_list[i]);
 
 
   /* FIXME: what happens if host_list contains VMs and PMs. If
    * execute_parallel_task() does not change the state of the model, we can mix
    * them. */
-  surf_model_t ws_model = surf_resource_model(host_list[0], SURF_WKS_LEVEL);
+  surf_model_t ws_model = surf_resource_model(host_list[0], SURF_HOST_LEVEL);
   for (i = 1; i < host_nb; i++) {
-    surf_model_t ws_model_tmp = surf_resource_model(host_list[i], SURF_WKS_LEVEL);
+    surf_model_t ws_model_tmp = surf_resource_model(host_list[i], SURF_HOST_LEVEL);
     if (ws_model_tmp != ws_model) {
       XBT_CRITICAL("mixing VMs and PMs is not supported");
       DIE_IMPOSSIBLE;
@@ -447,8 +421,8 @@ smx_synchro_t SIMIX_host_parallel_execute(const char *name,
   /* set surf's synchro */
   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, flops_amount, bytes_amount, rate);
+      surf_host_model_execute_parallel_task((surf_host_model_t)surf_host_model,
+                 host_nb, surf_host_list, flops_amount, bytes_amount, rate);
 
     surf_action_set_data(synchro->execution.surf_exec, synchro);
   }
@@ -572,7 +546,7 @@ void SIMIX_execution_finish(smx_synchro_t synchro)
             (int)synchro->state);
     }
     /* check if the host is down */
-    if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+    if (surf_resource_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
       simcall->issuer->context->iwannadie = 1;
     }
 
@@ -590,7 +564,7 @@ void SIMIX_post_host_execute(smx_synchro_t synchro)
 {
   if (synchro->type == SIMIX_SYNC_EXECUTE && /* FIMXE: handle resource failure
                                                * for parallel tasks too */
-      surf_resource_get_state(surf_workstation_resource_priv(synchro->execution.host)) == SURF_RESOURCE_OFF) {
+      surf_resource_get_state(surf_host_resource_priv(synchro->execution.host)) == SURF_RESOURCE_OFF) {
     /* If the host running the synchro failed, notice it so that the asking
      * process can be killed if it runs on that host itself */
     synchro->state = SIMIX_FAILED;
@@ -633,23 +607,23 @@ void SIMIX_set_category(smx_synchro_t synchro, const char *category)
 void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params)
 {
   /* jump to ws_get_params(). */
-  surf_workstation_get_params(ind_vm, params);
+  surf_host_get_params(ind_vm, params);
 }
 
 void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params)
 {
   /* jump to ws_set_params(). */
-  surf_workstation_set_params(ind_vm, params);
+  surf_host_set_params(ind_vm, params);
 }
 
 xbt_dict_t SIMIX_host_get_mounted_storage_list(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
-  return surf_workstation_get_mounted_storage_list(host);
+  return surf_host_get_mounted_storage_list(host);
 }
 
 xbt_dynar_t SIMIX_host_get_attached_storage_list(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
-  return surf_workstation_get_attached_storage_list(host);
+  return surf_host_get_attached_storage_list(host);
 }
index ecd0d25..d807587 100644 (file)
@@ -24,7 +24,7 @@ static inline smx_host_priv_t SIMIX_host_priv(smx_host_t host){
 }
 
 void _SIMIX_host_free_process_arg(void *);
-smx_host_t SIMIX_host_create(const char *name, void *workstation, void *data);
+smx_host_t SIMIX_host_create(const char *name, void *data);
 void SIMIX_host_destroy(void *host);
 
 void SIMIX_host_add_auto_restart_process(smx_host_t host,
index 118b800..0dce9cb 100644 (file)
@@ -62,7 +62,7 @@ smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, smx_host_t host)
   smx_synchro_t synchro;
 
   /* check if the host is active */
-  if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+  if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
     THROWF(host_error, 0, "Host %s failed, you cannot call this function",
            sg_host_name(host));
   }
@@ -73,7 +73,7 @@ smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, smx_host_t host)
   synchro->category = NULL;
 
   synchro->io.host = host;
-  synchro->io.surf_io = surf_workstation_read(host, fd->surf_file, size);
+  synchro->io.surf_io = surf_host_read(host, fd->surf_file, size);
 
   surf_action_set_data(synchro->io.surf_io, synchro);
   XBT_DEBUG("Create io synchro %p", synchro);
@@ -94,7 +94,7 @@ smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, smx_host_t host)
   smx_synchro_t synchro;
 
   /* check if the host is active */
-  if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+  if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
     THROWF(host_error, 0, "Host %s failed, you cannot call this function",
            sg_host_name(host));
   }
@@ -105,7 +105,7 @@ smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, smx_host_t host)
   synchro->category = NULL;
 
   synchro->io.host = host;
-  synchro->io.surf_io = surf_workstation_write(host, fd->surf_file, size);
+  synchro->io.surf_io = surf_host_write(host, fd->surf_file, size);
 
   surf_action_set_data(synchro->io.surf_io, synchro);
   XBT_DEBUG("Create io synchro %p", synchro);
@@ -126,7 +126,7 @@ smx_synchro_t SIMIX_file_open(const char* fullpath, smx_host_t host)
   smx_synchro_t synchro;
 
   /* check if the host is active */
-  if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+  if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
     THROWF(host_error, 0, "Host %s failed, you cannot call this function",
            sg_host_name(host));
   }
@@ -137,7 +137,7 @@ smx_synchro_t SIMIX_file_open(const char* fullpath, smx_host_t host)
   synchro->category = NULL;
 
   synchro->io.host = host;
-  synchro->io.surf_io = surf_workstation_open(host, fullpath);
+  synchro->io.surf_io = surf_host_open(host, fullpath);
 
   surf_action_set_data(synchro->io.surf_io, synchro);
   XBT_DEBUG("Create io synchro %p", synchro);
@@ -158,7 +158,7 @@ smx_synchro_t SIMIX_file_close(smx_file_t fd, smx_host_t host)
   smx_synchro_t synchro;
 
   /* check if the host is active */
-  if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+  if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
     THROWF(host_error, 0, "Host %s failed, you cannot call this function",
            sg_host_name(host));
   }
@@ -169,7 +169,7 @@ smx_synchro_t SIMIX_file_close(smx_file_t fd, smx_host_t host)
   synchro->category = NULL;
 
   synchro->io.host = host;
-  synchro->io.surf_io = surf_workstation_close(host, fd->surf_file);
+  synchro->io.surf_io = surf_host_close(host, fd->surf_file);
 
   surf_action_set_data(synchro->io.surf_io, synchro);
   XBT_DEBUG("Create io synchro %p", synchro);
@@ -182,12 +182,12 @@ smx_synchro_t SIMIX_file_close(smx_file_t fd, smx_host_t host)
 int SIMIX_file_unlink(smx_file_t fd, smx_host_t host)
 {
   /* check if the host is active */
-  if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+  if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
     THROWF(host_error, 0, "Host %s failed, you cannot call this function",
            sg_host_name(host));
   }
 
-  int res = surf_workstation_unlink(host, fd->surf_file);
+  int res = surf_host_unlink(host, fd->surf_file);
   xbt_free(fd);
   return !!res;
 }
@@ -200,7 +200,7 @@ sg_size_t simcall_HANDLER_file_get_size(smx_simcall_t simcall, smx_file_t fd)
 sg_size_t SIMIX_file_get_size(smx_process_t process, smx_file_t fd)
 {
   smx_host_t host = process->smx_host;
-  return  surf_workstation_get_size(host, fd->surf_file);
+  return  surf_host_get_size(host, fd->surf_file);
 }
 
 sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd)
@@ -211,7 +211,7 @@ sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd)
 sg_size_t SIMIX_file_tell(smx_process_t process, smx_file_t fd)
 {
   smx_host_t host = process->smx_host;
-  return  surf_workstation_file_tell(host, fd->surf_file);
+  return  surf_host_file_tell(host, fd->surf_file);
 }
 
 
@@ -223,7 +223,7 @@ xbt_dynar_t simcall_HANDLER_file_get_info(smx_simcall_t simcall, smx_file_t fd)
 xbt_dynar_t SIMIX_file_get_info(smx_process_t process, smx_file_t fd)
 {
   smx_host_t host = process->smx_host;
-  return  surf_workstation_get_info(host, fd->surf_file);
+  return  surf_host_get_info(host, fd->surf_file);
 }
 
 int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin)
@@ -234,7 +234,7 @@ int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t
 int SIMIX_file_seek(smx_process_t process, smx_file_t fd, sg_offset_t offset, int origin)
 {
   smx_host_t host = process->smx_host;
-  return  surf_workstation_file_seek(host, fd->surf_file, offset, origin);
+  return  surf_host_file_seek(host, fd->surf_file, offset, origin);
 }
 
 int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t file, const char* fullpath)
@@ -245,7 +245,7 @@ int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t file, const char
 int SIMIX_file_move(smx_process_t process, smx_file_t file, const char* fullpath)
 {
   smx_host_t host = process->smx_host;
-  return  surf_workstation_file_move(host, file->surf_file, fullpath);
+  return  surf_host_file_move(host, file->surf_file, fullpath);
 }
 
 sg_size_t SIMIX_storage_get_size(smx_storage_t storage){
@@ -375,7 +375,7 @@ void SIMIX_io_finish(smx_synchro_t synchro)
             (int)synchro->state);
     }
 
-    if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+    if (surf_resource_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
       simcall->issuer->context->iwannadie = 1;
     }
 
index fbeb548..6cc1114 100644 (file)
@@ -616,7 +616,7 @@ void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_synchro_t synchro, dou
   if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
     SIMIX_comm_finish(synchro);
   } else { /* if (timeout >= 0) { we need a surf sleep action even when there is no timeout, otherwise surf won't tell us when the host fails */
-    sleep = surf_workstation_sleep(simcall->issuer->smx_host, timeout);
+    sleep = surf_host_sleep(simcall->issuer->smx_host, timeout);
     surf_action_set_data(sleep, synchro);
 
     if (simcall->issuer == synchro->comm.src_proc)
@@ -733,7 +733,7 @@ static XBT_INLINE void SIMIX_comm_start(smx_synchro_t synchro)
     XBT_DEBUG("Starting communication %p from '%s' to '%s'", synchro,
               SIMIX_host_get_name(sender), SIMIX_host_get_name(receiver));
 
-    synchro->comm.surf_comm = surf_workstation_model_communicate(surf_workstation_model,
+    synchro->comm.surf_comm = surf_host_model_communicate(surf_host_model,
                                                                    sender, receiver,
                                                                    synchro->comm.task_size, synchro->comm.rate);
 
@@ -777,7 +777,6 @@ void SIMIX_comm_finish(smx_synchro_t synchro)
   unsigned int destroy_count = 0;
   smx_simcall_t simcall;
 
-
   while ((simcall = xbt_fifo_shift(synchro->simcalls))) {
 
     /* If a waitany simcall is waiting for this synchro to finish, then remove
@@ -800,6 +799,13 @@ void SIMIX_comm_finish(smx_synchro_t synchro)
     XBT_DEBUG("SIMIX_comm_finish: synchro state = %d", (int)synchro->state);
 
     /* Check out for errors */
+
+    if (surf_resource_get_state(surf_host_resource_priv(
+          simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+      simcall->issuer->context->iwannadie = 1;
+      SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
+    } else
+
     switch (synchro->state) {
 
     case SIMIX_DONE:
@@ -834,6 +840,7 @@ void SIMIX_comm_finish(smx_synchro_t synchro)
       break;
 
     case SIMIX_LINK_FAILURE:
+
       XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) detached:%d",
                 synchro,
                 synchro->comm.src_proc ? sg_host_name(synchro->comm.src_proc->smx_host) : NULL,
@@ -872,7 +879,7 @@ void SIMIX_comm_finish(smx_synchro_t synchro)
       }
     }
 
-    if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+    if (surf_resource_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
       simcall->issuer->context->iwannadie = 1;
     }
 
index 60831b8..afc5e64 100644 (file)
@@ -47,6 +47,7 @@ typedef struct s_smx_global {
   xbt_dict_t registered_functions;
   smx_creation_func_t create_process_function;
   void_pfn_smxprocess_t_smxprocess_t kill_process_function;
+  /** Callback used when killing a SMX_process */
   void_pfn_smxprocess_t cleanup_process_function;
   xbt_mallocator_t synchro_mallocator;
   void_pfn_smxhost_t autorestart;
@@ -55,6 +56,8 @@ typedef struct s_smx_global {
   xbt_os_timer_t timer_seq; /* used to bench the sequential and parallel parts of the simulation, if requested to */
   xbt_os_timer_t timer_par;
 #endif
+
+  xbt_os_mutex_t mutex;
 } s_smx_global_t, *smx_global_t;
 
 XBT_PUBLIC_DATA(smx_global_t) simix_global;
index 21a4ef8..2fcb6d6 100644 (file)
@@ -54,6 +54,8 @@ void SIMIX_process_cleanup(smx_process_t process)
   if (process->kill_timer != NULL)
          SIMIX_timer_remove(process->kill_timer);
 
+  xbt_os_mutex_acquire(simix_global->mutex);
+
   /* cancel non-blocking communications */
   smx_synchro_t synchro;
   while ((synchro = xbt_fifo_pop(process->comms))) {
@@ -97,6 +99,8 @@ void SIMIX_process_cleanup(smx_process_t process)
   xbt_swag_remove(process, SIMIX_host_priv(process->smx_host)->process_list);
   xbt_swag_insert(process, simix_global->process_to_destroy);
   process->context->iwannadie = 0;
+
+  xbt_os_mutex_release(simix_global->mutex);
 }
 
 /**
@@ -352,6 +356,7 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
     case SIMIX_SYNC_COMMUNICATE:
       xbt_fifo_remove(process->comms, process->waiting_synchro);
       SIMIX_comm_cancel(process->waiting_synchro);
+      xbt_fifo_remove(process->waiting_synchro->simcalls, &process->simcall);
       SIMIX_comm_destroy(process->waiting_synchro);
       break;
 
@@ -373,6 +378,8 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
       break;
 
     }
+
+    process->waiting_synchro = NULL;
   }
   if(!xbt_dynar_member(simix_global->process_to_run, &(process)) && process != issuer) {
     XBT_DEBUG("Inserting %s in the to_run list", process->name);
@@ -739,7 +746,7 @@ smx_synchro_t SIMIX_process_sleep(smx_process_t process, double duration)
   smx_host_t host = process->smx_host;
 
   /* check if the host is active */
-  if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+  if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
     THROWF(host_error, 0, "Host %s failed, you cannot call this function",
            sg_host_name(host));
   }
@@ -750,8 +757,7 @@ smx_synchro_t SIMIX_process_sleep(smx_process_t process, double duration)
   synchro->category = NULL;
 
   synchro->sleep.host = host;
-  synchro->sleep.surf_sleep =
-      surf_workstation_sleep(host, duration);
+  synchro->sleep.surf_sleep = surf_host_sleep(host, duration);
 
   surf_action_set_data(synchro->sleep.surf_sleep, synchro);
   XBT_DEBUG("Create sleep synchronization %p", synchro);
@@ -782,7 +788,7 @@ void SIMIX_post_process_sleep(smx_synchro_t synchro)
         THROW_IMPOSSIBLE;
         break;
     }
-    if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+    if (surf_resource_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
       simcall->issuer->context->iwannadie = 1;
     }
     simcall_process_sleep__set__result(simcall, state);
index b3cd4bc..af4d470 100644 (file)
@@ -31,10 +31,10 @@ typedef struct s_smx_process_arg {
 
 /** @brief Process datatype */
 typedef struct s_smx_process {
-  s_xbt_swag_hookup_t process_hookup;
-  s_xbt_swag_hookup_t synchro_hookup;   /* process_to_run or mutex->sleeping and co */
-  s_xbt_swag_hookup_t host_proc_hookup;
-  s_xbt_swag_hookup_t destroy_hookup;
+  s_xbt_swag_hookup_t process_hookup;   /* simix_global->process_list */
+  s_xbt_swag_hookup_t synchro_hookup;   /* {mutex,cond,sem}->sleeping */
+  s_xbt_swag_hookup_t host_proc_hookup; /* smx_host->process_lis */
+  s_xbt_swag_hookup_t destroy_hookup;   /* simix_global->process_to_destroy */
 
   unsigned long pid;
   unsigned long ppid;
index 3f25efe..8b05de1 100644 (file)
@@ -28,8 +28,7 @@ static smx_synchro_t SIMIX_synchro_wait(smx_host_t smx_host, double timeout)
   sync = xbt_mallocator_get(simix_global->synchro_mallocator);
   sync->type = SIMIX_SYNC_SYNCHRO;
   sync->name = xbt_strdup("synchro");
-  sync->synchro.sleep = 
-    surf_workstation_sleep(smx_host, timeout);
+  sync->synchro.sleep = surf_host_sleep(smx_host, timeout);
 
   surf_action_set_data(sync->synchro.sleep, sync);
   XBT_OUT();
index 213c165..5dd21c4 100644 (file)
@@ -23,9 +23,9 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_vm, simix, "Logging specific to SIMIX (vms
 smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host)
 {
   /* Create surf associated resource */
-  surf_vm_workstation_model_create(name, ind_phys_host);
+  surf_vm_model_create(name, ind_phys_host);
 
-  smx_host_t smx_host = SIMIX_host_create(name, ind_phys_host, NULL);
+  smx_host_t smx_host = SIMIX_host_create(name, NULL);
 
   /* We will be able to register the VM to its physical host, so that we can promptly
    * retrieve the list VMs on the physical host. */
@@ -38,7 +38,7 @@ smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host)
 static long host_get_ramsize(smx_host_t vm, int *overcommit)
 {
   s_ws_params_t params;
-  surf_workstation_get_params(vm, &params);
+  surf_host_get_params(vm, &params);
 
   if (overcommit)
     *overcommit = params.overcommit;
@@ -49,7 +49,7 @@ static long host_get_ramsize(smx_host_t vm, int *overcommit)
 /* **** start a VM **** */
 static int __can_be_started(smx_host_t vm)
 {
-  smx_host_t pm = surf_vm_workstation_get_pm(vm);
+  smx_host_t pm = surf_vm_get_pm(vm);
 
   int pm_overcommit = 0;
   long pm_ramsize = host_get_ramsize(pm, &pm_overcommit);
@@ -66,7 +66,7 @@ static int __can_be_started(smx_host_t vm)
   }
 
   long total_ramsize_of_vms = 0;
-  xbt_dynar_t dyn_vms = surf_workstation_get_vms(pm);
+  xbt_dynar_t dyn_vms = surf_host_get_vms(pm);
   {
     unsigned int cursor = 0;
     smx_host_t another_vm;
@@ -90,7 +90,7 @@ static int __can_be_started(smx_host_t vm)
 void SIMIX_vm_start(smx_host_t ind_vm)
 {
   if (__can_be_started(ind_vm))
-    surf_resource_set_state(surf_workstation_resource_priv(ind_vm),
+    surf_resource_set_state(surf_host_resource_priv(ind_vm),
                             (int)SURF_VM_STATE_RUNNING);
   else
     THROWF(vm_error, 0, "The VM %s cannot be started", SIMIX_host_get_name(ind_vm));
@@ -99,7 +99,7 @@ void SIMIX_vm_start(smx_host_t ind_vm)
 
 int SIMIX_vm_get_state(smx_host_t ind_vm)
 {
-  return surf_resource_get_state(surf_workstation_resource_priv(ind_vm));
+  return surf_resource_get_state(surf_host_resource_priv(ind_vm));
 }
 
 /**
@@ -113,7 +113,7 @@ void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm)
   xbt_assert(SIMIX_vm_get_state(ind_vm) == SURF_VM_STATE_SUSPENDED);
 
   /* jump to vm_ws_xigrate(). this will update the vm location. */
-  surf_vm_workstation_migrate(ind_vm, ind_dst_pm);
+  surf_vm_migrate(ind_vm, ind_dst_pm);
 }
 
 /**
@@ -150,7 +150,7 @@ void SIMIX_vm_migratefrom_resumeto(smx_host_t vm, smx_host_t src_pm, smx_host_t
 void *SIMIX_vm_get_pm(smx_host_t ind_vm)
 {
   /* jump to vm_ws_get_pm(). this will return the vm name. */
-  return surf_vm_workstation_get_pm(ind_vm);
+  return surf_vm_get_pm(ind_vm);
 }
 
 /**
@@ -162,7 +162,7 @@ void *SIMIX_vm_get_pm(smx_host_t ind_vm)
 void SIMIX_vm_set_bound(smx_host_t ind_vm, double bound)
 {
   /* jump to vm_ws_set_vm_bound(). */
-  surf_vm_workstation_set_bound(ind_vm, bound);
+  surf_vm_set_bound(ind_vm, bound);
 }
 
 /**
@@ -178,7 +178,7 @@ void SIMIX_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long m
   xbt_assert(SIMIX_vm_get_pm(ind_vm) == ind_pm);
 
   /* jump to vm_ws_set_vm_affinity(). */
-  surf_vm_workstation_set_affinity(ind_vm, ind_pm, mask);
+  surf_vm_set_affinity(ind_vm, ind_pm, mask);
 }
 
 
@@ -199,7 +199,7 @@ void SIMIX_vm_suspend(smx_host_t ind_vm, smx_process_t issuer)
   XBT_DEBUG("suspend VM(%s), where %d processes exist", name, xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
 
   /* jump to vm_ws_suspend. The state will be set. */
-  surf_vm_workstation_suspend(ind_vm);
+  surf_vm_suspend(ind_vm);
 
   smx_process_t smx_process, smx_process_safe;
   xbt_swag_foreach_safe(smx_process, smx_process_safe, SIMIX_host_priv(ind_vm)->process_list) {
@@ -239,7 +239,7 @@ void SIMIX_vm_resume(smx_host_t ind_vm, smx_process_t issuer)
   XBT_DEBUG("resume VM(%s), where %d processes exist", name, xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
 
   /* jump to vm_ws_resume() */
-  surf_vm_workstation_resume(ind_vm);
+  surf_vm_resume(ind_vm);
 
   smx_process_t smx_process, smx_process_safe;
   xbt_swag_foreach_safe(smx_process, smx_process_safe, SIMIX_host_priv(ind_vm)->process_list) {
@@ -272,7 +272,7 @@ void SIMIX_vm_save(smx_host_t ind_vm, smx_process_t issuer)
   XBT_DEBUG("save VM(%s), where %d processes exist", name, xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
 
   /* jump to vm_ws_save() */
-  surf_vm_workstation_save(ind_vm);
+  surf_vm_save(ind_vm);
 
   smx_process_t smx_process, smx_process_safe;
   xbt_swag_foreach_safe(smx_process, smx_process_safe, SIMIX_host_priv(ind_vm)->process_list) {
@@ -303,7 +303,7 @@ void SIMIX_vm_restore(smx_host_t ind_vm, smx_process_t issuer)
   XBT_DEBUG("restore VM(%s), where %d processes exist", name, xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
 
   /* jump to vm_ws_restore() */
-  surf_vm_workstation_resume(ind_vm);
+  surf_vm_resume(ind_vm);
 
   smx_process_t smx_process, smx_process_safe;
   xbt_swag_foreach_safe(smx_process, smx_process_safe, SIMIX_host_priv(ind_vm)->process_list) {
@@ -342,7 +342,7 @@ void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer)
   }
 
   /* FIXME: we may have to do something at the surf layer, e.g., vcpu action */
-  surf_resource_set_state(surf_workstation_resource_priv(ind_vm),
+  surf_resource_set_state(surf_host_resource_priv(ind_vm),
                           (int)SURF_VM_STATE_CREATED);
 }
 
@@ -370,5 +370,5 @@ void SIMIX_vm_destroy(smx_host_t ind_vm)
   xbt_lib_unset(host_lib, hostname, SIMIX_HOST_LEVEL, 1);
 
   /* jump to vm_ws_destroy(). The surf level resource will be freed. */
-  surf_vm_workstation_destroy(ind_vm);
+  surf_vm_destroy(ind_vm);
 }
index a31b752..a5d2d73 100644 (file)
@@ -296,35 +296,6 @@ void smpi_empty_status(MPI_Status * status)
   }
 }
 
-void smpi_action_trace_run(char *path)
-{
-  char *name;
-  xbt_dynar_t todo;
-  xbt_dict_cursor_t cursor;
-
-  action_fp=NULL;
-  if (path) {
-    action_fp = fopen(path, "r");
-    if (action_fp == NULL)
-      xbt_die("Cannot open %s: %s", path, strerror(errno));
-  }
-
-  if (!xbt_dict_is_empty(action_queues)) {
-    XBT_WARN
-      ("Not all actions got consumed. If the simulation ended successfully (without deadlock), you may want to add new processes to your deployment file.");
-
-
-    xbt_dict_foreach(action_queues, cursor, name, todo) {
-      XBT_WARN("Still %lu actions for %s", xbt_dynar_length(todo), name);
-    }
-  }
-
-  if (path)
-    fclose(action_fp);
-  xbt_dict_free(&action_queues);
-  action_queues = xbt_dict_new_homogeneous(NULL);
-}
-
 static void smpi_mpi_request_free_voidp(void* request)
 {
   MPI_Request req = request;
index d863016..a67e636 100644 (file)
@@ -621,7 +621,7 @@ void smpi_really_switch_data_segment(int dest) {
   if(smpi_size_data_exe == 0)//no need to switch
     return;
 
-#ifdef HAVE_MMAP
+#ifdef HAVE_PRIVATIZATION
   int i;
   if(smpi_loaded_page==-1){//initial switch, do the copy from the real page here
     for (i=0; i< SIMIX_process_count(); i++){
@@ -724,7 +724,7 @@ void smpi_get_executable_global_size(){
 
 void smpi_initialize_global_memory_segments(){
 
-#ifndef HAVE_MMAP
+#ifndef HAVE_PRIVATIZATION
   smpi_privatize_global_variables=0;
   return;
 #else
@@ -798,7 +798,7 @@ Ask the Internet about tutorials on how to increase the files limit such as: htt
 void smpi_destroy_global_memory_segments(){
   if (smpi_size_data_exe == 0)//no need to switch
     return;
-#ifdef HAVE_MMAP
+#ifdef HAVE_PRIVATIZATION
   int i;
   for (i=0; i< smpi_process_count(); i++){
     if(munmap(smpi_privatisation_regions[i].address, smpi_size_data_exe) < 0) {
index ebddf58..4f00cad 100644 (file)
@@ -85,7 +85,7 @@ void smpi_process_init(int *argc, char ***argv)
     index = smpi_process_index_of_smx_process(proc);
 
     if(!index_to_process_data){
-        index_to_process_data=(int*)xbt_malloc(SIMIX_process_count()*sizeof(int));
+      index_to_process_data=(int*)xbt_malloc(SIMIX_process_count()*sizeof(int));
     }
     MPI_Comm* temp_comm_world;
     xbt_bar_t temp_bar;
index e9ab955..ce769c1 100644 (file)
@@ -12,7 +12,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_group, smpi,
 typedef struct s_smpi_mpi_group {
   int size;
   int *rank_to_index_map;
-  int *index_to_rank_map;
+  xbt_dict_t index_to_rank_map;
   int refcount;
 } s_smpi_mpi_group_t;
 
@@ -28,20 +28,16 @@ MPI_Group MPI_GROUP_EMPTY = &mpi_MPI_GROUP_EMPTY;
 MPI_Group smpi_group_new(int size)
 {
   MPI_Group group;
-  int i, count;
+  int i;
 
-  count = SIMIX_process_count();
   group = xbt_new(s_smpi_mpi_group_t, 1);
   group->size = size;
   group->rank_to_index_map = xbt_new(int, size);
-  group->index_to_rank_map = xbt_new(int, count);
+  group->index_to_rank_map = xbt_dict_new_homogeneous(xbt_free_f);
   group->refcount = 1;
   for (i = 0; i < size; i++) {
     group->rank_to_index_map[i] = MPI_UNDEFINED;
   }
-  for (i = 0; i < count; i++) {
-    group->index_to_rank_map[i] = MPI_UNDEFINED;
-  }
 
   return group;
 }
@@ -49,23 +45,27 @@ MPI_Group smpi_group_new(int size)
 MPI_Group smpi_group_copy(MPI_Group origin)
 {
   MPI_Group group=origin;
-  int i, count;
+  char *key;
+  char *ptr_rank;
+  xbt_dict_cursor_t cursor = NULL;
+  
+  int i;
   if(origin!= smpi_comm_group(MPI_COMM_WORLD)
             && origin != MPI_GROUP_NULL
             && origin != smpi_comm_group(MPI_COMM_SELF)
             && origin != MPI_GROUP_EMPTY)
     {
-      count = smpi_process_count();
       group = xbt_new(s_smpi_mpi_group_t, 1);
       group->size = origin->size;
       group->rank_to_index_map = xbt_new(int, group->size);
-      group->index_to_rank_map = xbt_new(int, count);
+      group->index_to_rank_map = xbt_dict_new_homogeneous(xbt_free_f);
       group->refcount = 1;
       for (i = 0; i < group->size; i++) {
         group->rank_to_index_map[i] = origin->rank_to_index_map[i];
       }
-      for (i = 0; i < count; i++) {
-        group->index_to_rank_map[i] = origin->index_to_rank_map[i];
+
+      xbt_dict_foreach(origin->index_to_rank_map, cursor, key, ptr_rank) {
+        xbt_dict_set(group->index_to_rank_map, key, ptr_rank, NULL);
       }
     }
 
@@ -84,9 +84,22 @@ void smpi_group_destroy(MPI_Group group)
 
 void smpi_group_set_mapping(MPI_Group group, int index, int rank)
 {
-  if (rank < group->size && index < SIMIX_process_count()) {
+  char * key;
+  int * val_rank;
+
+  if (rank < group->size) {
     group->rank_to_index_map[rank] = index;
-    if(index!=MPI_UNDEFINED)group->index_to_rank_map[index] = rank;
+    if (index!=MPI_UNDEFINED ) {
+      val_rank = (int *) malloc(sizeof(int));
+      *val_rank = rank; 
+      int size = asprintf(&key, "%d", index);
+      if (size!=-1){
+        xbt_dict_set(group->index_to_rank_map, key, val_rank, NULL);
+        free(key);
+      } else {
+        xbt_die("could not allocate memory for asprintf");
+      }
+    }
   }
 }
 
@@ -102,9 +115,17 @@ int smpi_group_index(MPI_Group group, int rank)
 
 int smpi_group_rank(MPI_Group group, int index)
 {
-  int rank = MPI_UNDEFINED;
-  rank = group->index_to_rank_map[index];
-  return rank;
+  int * ptr_rank = NULL;
+  char * key;
+  int size = asprintf(&key, "%d", index);
+  if (size!=-1){
+    ptr_rank = xbt_dict_get_or_null(group->index_to_rank_map, key);
+    xbt_free(key);
+  }else
+    xbt_die("could not allocate memory for asprintf");
+  if (!ptr_rank)
+    return MPI_UNDEFINED;
+  return *ptr_rank;
 }
 
 int smpi_group_use(MPI_Group group)
@@ -118,7 +139,7 @@ int smpi_group_unuse(MPI_Group group)
   group->refcount--;
   if (group->refcount <= 0) {
     xbt_free(group->rank_to_index_map);
-    xbt_free(group->index_to_rank_map);
+    xbt_dict_free(&group->index_to_rank_map);
     xbt_free(group);
     return 0;
   }
index 1636ea5..dc2a51f 100644 (file)
@@ -9,11 +9,13 @@
 #include <xbt.h>
 #include <xbt/replay.h>
 
+#define KEY_SIZE (sizeof(int) * 2 + 1)
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_replay,smpi,"Trace Replay with SMPI");
 
 int communicator_size = 0;
 static int active_processes = 0;
-xbt_dynar_t *reqq = NULL;
+xbt_dict_t reqq = NULL;
 
 MPI_Datatype MPI_DEFAULT_TYPE;
 MPI_Datatype MPI_CURRENT_TYPE;
@@ -31,6 +33,30 @@ static void log_timed_action (const char *const *action, double clock){
   }
 }
 
+
+static xbt_dynar_t get_reqq_self(){
+   char * key;
+   
+   int size = asprintf(&key, "%d", smpi_process_index());
+   if(size==-1)
+     xbt_die("could not allocate memory for asprintf");
+   xbt_dynar_t dynar_mpi_request = (xbt_dynar_t) xbt_dict_get(reqq, key);
+   free(key);
+   return dynar_mpi_request;
+}
+
+static void set_reqq_self(xbt_dynar_t mpi_request){
+   char * key;
+   
+   int size = asprintf(&key, "%d", smpi_process_index());
+   if(size==-1)
+     xbt_die("could not allocate memory for asprintf");
+   xbt_dict_set(reqq, key, mpi_request, free);
+   free(key);
+}
+
+
 //allocate a single buffer for all sends, growing it if needed
 void* smpi_get_tmp_sendbuffer(int size){
   if (!smpi_process_get_replaying())
@@ -145,7 +171,6 @@ const char* encode_datatype(MPI_Datatype datatype, int* known)
 
 static void action_init(const char *const *action)
 {
-  int i;
   XBT_DEBUG("Initialize the counters");
   CHECK_ACTION_PARAMS(action, 0, 1);
   if(action[2]) MPI_DEFAULT_TYPE= MPI_DOUBLE; // default MPE dataype 
@@ -157,12 +182,19 @@ static void action_init(const char *const *action)
   active_processes = smpi_process_count();
 
   if (!reqq) {
+    reqq = xbt_dict_new();
+  }
+
+  set_reqq_self(xbt_dynar_new(sizeof(MPI_Request),&xbt_free_ref));
+
+  /*
     reqq=xbt_new0(xbt_dynar_t,active_processes);
 
     for(i=0;i<active_processes;i++){
       reqq[i]=xbt_dynar_new(sizeof(MPI_Request),&xbt_free_ref);
     }
   }
+  */
 }
 
 static void action_finalize(const char *const *action)
@@ -267,7 +299,7 @@ static void action_Isend(const char *const *action)
   TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
   request->send = 1;
 
-  xbt_dynar_push(reqq[smpi_process_index()],&request);
+  xbt_dynar_push(get_reqq_self(),&request);
 
   log_timed_action (action, clock);
 }
@@ -338,7 +370,7 @@ static void action_Irecv(const char *const *action)
 
   TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
   request->recv = 1;
-  xbt_dynar_push(reqq[smpi_process_index()],&request);
+  xbt_dynar_push(get_reqq_self(),&request);
 
   log_timed_action (action, clock);
 }
@@ -350,7 +382,7 @@ static void action_test(const char *const *action){
   MPI_Status status;
   int flag = TRUE;
 
-  request = xbt_dynar_pop_as(reqq[smpi_process_index()],MPI_Request);
+  request = xbt_dynar_pop_as(get_reqq_self(),MPI_Request);
   //if request is null here, this may mean that a previous test has succeeded 
   //Different times in traced application and replayed version may lead to this 
   //In this case, ignore the extra calls.
@@ -366,7 +398,7 @@ static void action_test(const char *const *action){
          /* 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_dynar_push_as(get_reqq_self(),MPI_Request, request);
 
          TRACE_smpi_testing_out(rank);
   }
@@ -379,10 +411,10 @@ static void action_wait(const char *const *action){
   MPI_Request request;
   MPI_Status status;
 
-  xbt_assert(xbt_dynar_length(reqq[smpi_process_index()]),
+  xbt_assert(xbt_dynar_length(get_reqq_self()),
       "action wait not preceded by any irecv or isend: %s",
       xbt_str_join_array(action," "));
-  request = xbt_dynar_pop_as(reqq[smpi_process_index()],MPI_Request);
+  request = xbt_dynar_pop_as(get_reqq_self(),MPI_Request);
 
   if (!request){
     /* Assuming that the trace is well formed, this mean the comm might have
@@ -417,7 +449,7 @@ static void action_waitall(const char *const *action){
   int count_requests=0;
   unsigned int i=0;
 
-  count_requests=xbt_dynar_length(reqq[smpi_process_index()]);
+  count_requests=xbt_dynar_length(get_reqq_self());
 
   if (count_requests>0) {
     MPI_Request requests[count_requests];
@@ -425,7 +457,7 @@ static void action_waitall(const char *const *action){
 
     /*  The reqq is an array of dynars. Its index corresponds to the rank.
      Thus each rank saves its own requests to the array request. */
-    xbt_dynar_foreach(reqq[smpi_process_index()],i,requests[i]); 
+    xbt_dynar_foreach(get_reqq_self(),i,requests[i]); 
 
    //save information from requests
 
@@ -477,9 +509,8 @@ static void action_waitall(const char *const *action){
    xbt_dynar_free(&dsts);
    xbt_dynar_free(&recvs);
 
-   int freedrank=smpi_process_index();
-   xbt_dynar_free_container(&(reqq[freedrank]));
-   reqq[freedrank]=xbt_dynar_new(sizeof(MPI_Request),&xbt_free_ref);
+   //TODO xbt_dynar_free_container(get_reqq_self());
+   set_reqq_self(xbt_dynar_new(sizeof(MPI_Request),&xbt_free_ref));
   }
   log_timed_action (action, clock);
 }
@@ -1006,7 +1037,8 @@ static void action_allToAllv(const char *const *action) {
   xbt_free(recvdisps);
 }
 
-void smpi_replay_init(int *argc, char***argv){
+void smpi_replay_run(int *argc, char***argv){
+  /* First initializes everything */
   smpi_process_init(argc, argv);
   smpi_process_mark_as_initialized();
   smpi_process_set_replaying(1);
@@ -1016,11 +1048,12 @@ void smpi_replay_init(int *argc, char***argv){
   TRACE_smpi_computing_init(rank);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_INIT;
-  TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
-  TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
+  char *operation =bprintf("%s_init",__FUNCTION__);
+  TRACE_smpi_collective_in(rank, -1, operation, extra);
+  TRACE_smpi_collective_out(rank, -1, operation);
+  free(operation);
 
-  if (!smpi_process_index()){
-    _xbt_replay_action_init();
+  if (!_xbt_replay_action_init()) {
     xbt_replay_action_register("init",       action_init);
     xbt_replay_action_register("finalize",   action_finalize);
     xbt_replay_action_register("comm_size",  action_comm_size);
@@ -1055,22 +1088,27 @@ void smpi_replay_init(int *argc, char***argv){
       THROWF(unknown_error, 0, "%s is not a double", (*argv)[2]);
     XBT_VERB("Delayed start for instance - Sleeping for %f flops ",value );
     smpi_execute_flops(value);
+  } else {
+    //UGLY: force a context switch to be sure that all MSG_processes begin initialization
+    XBT_DEBUG("Force context switch by smpi_execute_flops  - Sleeping for 0.0 flops ");
+    smpi_execute_flops(0.0);
   }
+  
+  /* Actually run the replay */
   xbt_replay_action_runner(*argc, *argv);
-}
 
-int smpi_replay_finalize(){
+  /* and now, finalize everything */
   double sim_time= 1.;
   /* One active process will stop. Decrease the counter*/
   XBT_DEBUG("There are %lu elements in reqq[*]",
-            xbt_dynar_length(reqq[smpi_process_index()]));
-  if (!xbt_dynar_is_empty(reqq[smpi_process_index()])){
-    int count_requests=xbt_dynar_length(reqq[smpi_process_index()]);
+            xbt_dynar_length(get_reqq_self()));
+  if (!xbt_dynar_is_empty(get_reqq_self())){
+    int count_requests=xbt_dynar_length(get_reqq_self());
     MPI_Request requests[count_requests];
     MPI_Status status[count_requests];
     unsigned int i;
 
-    xbt_dynar_foreach(reqq[smpi_process_index()],i,requests[i]);
+    xbt_dynar_foreach(get_reqq_self(),i,requests[i]);
     smpi_mpi_waitall(count_requests, requests, status);
     active_processes--;
   } else {
@@ -1084,27 +1122,27 @@ int smpi_replay_finalize(){
   }
   
 
-  xbt_dynar_free_container(&(reqq[smpi_process_index()]));
+  //TODO xbt_dynar_free_container(get_reqq_self()));
 
   if(!active_processes){
     XBT_INFO("Simulation time %f", sim_time);
     _xbt_replay_action_exit();
     xbt_free(sendbuffer);
     xbt_free(recvbuffer);
-    xbt_free(reqq);
+    //xbt_free(reqq);
+    xbt_dict_free(&reqq); //not need, data have been freed ???
     reqq = NULL;
   }
   
-
-  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);
+  instr_extra_data extra_fin = xbt_new0(s_instr_extra_data_t,1);
+  extra_fin->type = TRACING_FINALIZE;
+  operation =bprintf("%s_finalize",__FUNCTION__);
+  TRACE_smpi_collective_in(rank, -1, operation, extra_fin);
 
   smpi_process_finalize();
 
-  TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
+  TRACE_smpi_collective_out(rank, -1, operation);
   TRACE_smpi_finalize(smpi_process_index());
   smpi_process_destroy();
-  return MPI_SUCCESS;
+  free(operation);
 }
index 4cf5998..a2dd954 100644 (file)
@@ -105,7 +105,7 @@ public:
 
 /** @ingroup SURF_cpu_interface
 * @brief SURF cpu resource interface class
-* @details A Cpu represent a cpu associated to a workstation
+* @details A Cpu represent a cpu associated to a host
 */
 XBT_PUBLIC_CLASS Cpu : public Resource {
 public:
similarity index 56%
rename from src/surf/workstation_clm03.cpp
rename to src/surf/host_clm03.cpp
index 1472e15..5c1a5d6 100644 (file)
@@ -4,12 +4,13 @@
 /* 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 "workstation_clm03.hpp"
-#include "vm_workstation_interface.hpp"
+#include "host_clm03.hpp"
+
 #include "cpu_cas01.hpp"
 #include "simgrid/sg_config.h"
+#include "vm_interface.hpp"
 
-XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_workstation);
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host);
 
 /*************
  * CallBacks *
@@ -19,52 +20,52 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_workstation);
  * Model *
  *********/
 
-void surf_workstation_model_init_current_default(void)
+void surf_host_model_init_current_default(void)
 {
-  surf_workstation_model = new WorkstationCLM03Model();
+  surf_host_model = new HostCLM03Model();
   xbt_cfg_setdefault_boolean(_sg_cfg_set, "network/crosstraffic", "yes");
   surf_cpu_model_init_Cas01();
   surf_network_model_init_LegrandVelho();
-  surf_workstation_model->p_cpuModel = surf_cpu_model_pm;
+  surf_host_model->p_cpuModel = surf_cpu_model_pm;
 
-  ModelPtr model = surf_workstation_model;
+  ModelPtr model = surf_host_model;
   xbt_dynar_push(model_list, &model);
   xbt_dynar_push(model_list_invoke, &model);
-  sg_platf_host_add_cb(workstation_parse_init);
+  sg_platf_host_add_cb(host_parse_init);
 }
 
-void surf_workstation_model_init_compound()
+void surf_host_model_init_compound()
 {
 
   xbt_assert(surf_cpu_model_pm, "No CPU model defined yet!");
   xbt_assert(surf_network_model, "No network model defined yet!");
-  surf_workstation_model = new WorkstationCLM03Model();
+  surf_host_model = new HostCLM03Model();
 
-  ModelPtr model = surf_workstation_model;
+  ModelPtr model = surf_host_model;
   xbt_dynar_push(model_list, &model);
   xbt_dynar_push(model_list_invoke, &model);
-  sg_platf_host_add_cb(workstation_parse_init);
+  sg_platf_host_add_cb(host_parse_init);
 }
 
-WorkstationCLM03Model::WorkstationCLM03Model()
- : WorkstationModel("Workstation")
+HostCLM03Model::HostCLM03Model()
+ : HostModel("Host CLM03")
 {
 }
 
-WorkstationCLM03Model::~WorkstationCLM03Model()
+HostCLM03Model::~HostCLM03Model()
 {}
 
-WorkstationPtr WorkstationCLM03Model::createWorkstation(const char *name){
-  WorkstationPtr workstation = new WorkstationCLM03(surf_workstation_model, name, NULL,
+HostPtr HostCLM03Model::createHost(const char *name){
+  HostPtr host = new HostCLM03(surf_host_model, name, NULL,
                  (xbt_dynar_t)xbt_lib_get_or_null(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL),
                  (RoutingEdgePtr)xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL),
                  static_cast<CpuPtr>(xbt_lib_get_or_null(host_lib, name, SURF_CPU_LEVEL)));
-  XBT_DEBUG("Create workstation %s with %ld mounted disks", name, xbt_dynar_length(workstation->p_storage));
-  xbt_lib_set(host_lib, name, SURF_WKS_LEVEL, workstation);
-  return workstation;
+  XBT_DEBUG("Create host %s with %ld mounted disks", name, xbt_dynar_length(host->p_storage));
+  xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, host);
+  return host;
 }
 
-double WorkstationCLM03Model::shareResources(double now){
+double HostCLM03Model::shareResources(double now){
   adjustWeightOfDummyCpuActions();
 
   double min_by_cpu = p_cpuModel->shareResources(now);
@@ -88,48 +89,48 @@ double WorkstationCLM03Model::shareResources(double now){
   return res;
 }
 
-void WorkstationCLM03Model::updateActionsState(double /*now*/, double /*delta*/){
+void HostCLM03Model::updateActionsState(double /*now*/, double /*delta*/){
   return;
 }
 
-ActionPtr WorkstationCLM03Model::executeParallelTask(int workstation_nb,
-                                        void **workstation_list,
+ActionPtr HostCLM03Model::executeParallelTask(int host_nb,
+                                        void **host_list,
                                         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)
+  if ((host_nb == 1)
       && (cost_or_zero(bytes_amount, 0) == 0.0)){
-    action = ((WorkstationCLM03Ptr)workstation_list[0])->execute(flops_amount[0]);
-  } else if ((workstation_nb == 1)
+    action = ((HostCLM03Ptr)host_list[0])->execute(flops_amount[0]);
+  } else if ((host_nb == 1)
            && (cost_or_zero(flops_amount, 0) == 0.0)) {
-    action = communicate((WorkstationCLM03Ptr)workstation_list[0],
-        (WorkstationCLM03Ptr)workstation_list[0],bytes_amount[0], rate);
-  } else if ((workstation_nb == 2)
+    action = communicate((HostCLM03Ptr)host_list[0],
+        (HostCLM03Ptr)host_list[0],bytes_amount[0], rate);
+  } else if ((host_nb == 2)
              && (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++) {
+    for (i = 0; i < host_nb * host_nb; i++) {
       if (cost_or_zero(bytes_amount, i) > 0.0) {
         nb++;
         value = cost_or_zero(bytes_amount, i);
       }
     }
     if (nb == 1){
-      action = communicate((WorkstationCLM03Ptr)workstation_list[0],
-          (WorkstationCLM03Ptr)workstation_list[1],value, rate);
+      action = communicate((HostCLM03Ptr)host_list[0],
+          (HostCLM03Ptr)host_list[1],value, rate);
     }
   } else
     THROW_UNIMPLEMENTED;      /* This model does not implement parallel tasks */
 #undef cost_or_zero
-  xbt_free((WorkstationCLM03Ptr)workstation_list);
+  xbt_free((HostCLM03Ptr)host_list);
   return action;
 }
 
-ActionPtr WorkstationCLM03Model::communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate){
+ActionPtr HostCLM03Model::communicate(HostPtr src, HostPtr dst, double size, double rate){
   return surf_network_model->communicate(src->p_netElm, dst->p_netElm, size, rate);
 }
 
@@ -138,27 +139,27 @@ ActionPtr WorkstationCLM03Model::communicate(WorkstationPtr src, WorkstationPtr
 /************
  * Resource *
  ************/
-WorkstationCLM03::WorkstationCLM03(WorkstationModelPtr model, const char* name, xbt_dict_t properties, xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu)
-  : Workstation(model, name, properties, storage, netElm, cpu) {}
+HostCLM03::HostCLM03(HostModelPtr model, const char* name, xbt_dict_t properties, xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu)
+  : Host(model, name, properties, storage, netElm, cpu) {}
 
-bool WorkstationCLM03::isUsed(){
+bool HostCLM03::isUsed(){
   THROW_IMPOSSIBLE;             /* This model does not implement parallel tasks */
   return -1;
 }
 
-void WorkstationCLM03::updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/){
+void HostCLM03::updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/){
   THROW_IMPOSSIBLE;             /* This model does not implement parallel tasks */
 }
 
-ActionPtr WorkstationCLM03::execute(double size) {
+ActionPtr HostCLM03::execute(double size) {
   return p_cpu->execute(size);
 }
 
-ActionPtr WorkstationCLM03::sleep(double duration) {
+ActionPtr HostCLM03::sleep(double duration) {
   return p_cpu->sleep(duration);
 }
 
-e_surf_resource_state_t WorkstationCLM03::getState() {
+e_surf_resource_state_t HostCLM03::getState() {
   return p_cpu->getState();
 }
 
similarity index 55%
rename from src/surf/workstation_clm03.hpp
rename to src/surf/host_clm03.hpp
index 11e2435..b362a72 100644 (file)
@@ -4,55 +4,55 @@
 /* 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 "workstation_interface.hpp"
 #include "storage_interface.hpp"
 #include "cpu_interface.hpp"
+#include "host_interface.hpp"
 #include "network_interface.hpp"
 
-#ifndef SURF_WORKSTATION_CLM03_HPP_
-#define SURF_WORKSTATION_CLM03_HPP_
+#ifndef SURF_HOST_CLM03_HPP_
+#define SURF_HOST_CLM03_HPP_
 
 /***********
  * Classes *
  ***********/
 
-class WorkstationCLM03Model;
-typedef WorkstationCLM03Model *WorkstationCLM03ModelPtr;
+class HostCLM03Model;
+typedef HostCLM03Model *HostCLM03ModelPtr;
 
-class WorkstationCLM03;
-typedef WorkstationCLM03 *WorkstationCLM03Ptr;
+class HostCLM03;
+typedef HostCLM03 *HostCLM03Ptr;
 
-class WorkstationCLM03Action;
-typedef WorkstationCLM03Action *WorkstationCLM03ActionPtr;
+class HostCLM03Action;
+typedef HostCLM03Action *HostCLM03ActionPtr;
 
 /*********
  * Model *
  *********/
 
-class WorkstationCLM03Model : public WorkstationModel {
+class HostCLM03Model : public HostModel {
 public:
-  WorkstationCLM03Model();
-  ~WorkstationCLM03Model();
-  WorkstationPtr createWorkstation(const char *name);
+  HostCLM03Model();
+  ~HostCLM03Model();
+  HostPtr createHost(const char *name);
   double shareResources(double now);
 
   void updateActionsState(double now, double delta);
 
-  ActionPtr executeParallelTask(int workstation_nb,
-                                        void **workstation_list,
+  ActionPtr executeParallelTask(int host_nb,
+                                        void **host_list,
                                         double *flops_amount,
                                         double *bytes_amount,
                                         double rate);
- ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
+ ActionPtr communicate(HostPtr src, HostPtr dst, double size, double rate);
 };
 
 /************
  * Resource *
  ************/
 
-class WorkstationCLM03 : public Workstation {
+class HostCLM03 : public Host {
 public:
-  WorkstationCLM03(WorkstationModelPtr model, const char* name, xbt_dict_t properties, xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu);
+  HostCLM03(HostModelPtr model, const char* name, xbt_dict_t properties, xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu);
 
   void updateState(tmgr_trace_event_t event_type, double value, double date);
 
@@ -76,4 +76,4 @@ public:
 
 
 
-#endif /* SURF_WORKSTATION_CLM03_HPP_ */
+#endif /* SURF_HOST_CLM03_HPP_ */
similarity index 71%
rename from src/surf/workstation_interface.cpp
rename to src/surf/host_interface.cpp
index fc2bcde..8dacee6 100644 (file)
@@ -4,68 +4,69 @@
 /* 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 "host_interface.hpp"
+
 #include "simix/smx_private.h"
-#include "workstation_interface.hpp"
-#include "vm_workstation_interface.hpp"
 #include "cpu_cas01.hpp"
 #include "simgrid/sg_config.h"
 
 #include "network_interface.hpp"
+#include "vm_interface.hpp"
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_workstation, surf,
-                                "Logging specific to the SURF workstation module");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_host, surf,
+                                "Logging specific to the SURF host module");
 
-WorkstationModelPtr surf_workstation_model = NULL;
+HostModelPtr surf_host_model = NULL;
 
 /*************
  * Callbacks *
  *************/
 
-surf_callback(void, WorkstationPtr) workstationCreatedCallbacks;
-surf_callback(void, WorkstationPtr) workstationDestructedCallbacks;
-surf_callback(void, WorkstationPtr, e_surf_resource_state_t, e_surf_resource_state_t) workstationStateChangedCallbacks;
-surf_callback(void, WorkstationActionPtr, e_surf_action_state_t, e_surf_action_state_t) workstationActionStateChangedCallbacks;
+surf_callback(void, HostPtr) hostCreatedCallbacks;
+surf_callback(void, HostPtr) hostDestructedCallbacks;
+surf_callback(void, HostPtr, e_surf_resource_state_t, e_surf_resource_state_t) hostStateChangedCallbacks;
+surf_callback(void, HostActionPtr, e_surf_action_state_t, e_surf_action_state_t) hostActionStateChangedCallbacks;
 
-void workstation_parse_init(sg_platf_host_cbarg_t host)
+void host_parse_init(sg_platf_host_cbarg_t host)
 {
-  surf_workstation_model->createWorkstation(host->id);
+  surf_host_model->createHost(host->id);
 }
 
-void workstation_add_traces(){
-  surf_workstation_model->addTraces();
+void host_add_traces(){
+  surf_host_model->addTraces();
 }
 
 /*********
  * Model *
  *********/
-WorkstationModel::WorkstationModel(const char *name)
+HostModel::HostModel(const char *name)
  : Model(name)
 {
   p_cpuModel = surf_cpu_model_pm;
 }
 
-WorkstationModel::WorkstationModel()
-: Model("Workstation") {
+HostModel::HostModel()
+: Model("Host") {
   p_cpuModel = surf_cpu_model_pm;
 }
 
-WorkstationModel::~WorkstationModel() {
+HostModel::~HostModel() {
 }
 
 /* Each VM has a dummy CPU action on the PM layer. This CPU action works as the
  * constraint (capacity) of the VM in the PM layer. If the VM does not have any
  * active task, the dummy CPU action must be deactivated, so that the VM does
  * not get any CPU share in the PM layer. */
-void WorkstationModel::adjustWeightOfDummyCpuActions()
+void HostModel::adjustWeightOfDummyCpuActions()
 {
   /* iterate for all virtual machines */
-  for (WorkstationVMModel::vm_list_t::iterator iter =
-         WorkstationVMModel::ws_vms.begin();
-       iter !=  WorkstationVMModel::ws_vms.end(); ++iter) {
+  for (VMModel::vm_list_t::iterator iter =
+         VMModel::ws_vms.begin();
+       iter !=  VMModel::ws_vms.end(); ++iter) {
 
-    WorkstationVMPtr ws_vm = &*iter;
+    VMPtr ws_vm = &*iter;
     CpuCas01Ptr cpu_cas01 = static_cast<CpuCas01Ptr>(ws_vm->p_cpu);
-    xbt_assert(cpu_cas01, "cpu-less workstation");
+    xbt_assert(cpu_cas01, "cpu-less host");
 
     int is_active = lmm_constraint_used(cpu_cas01->getModel()->getMaxminSystem(), cpu_cas01->getConstraint());
     // int is_active_old = constraint_is_active(cpu_cas01);
@@ -94,82 +95,82 @@ void WorkstationModel::adjustWeightOfDummyCpuActions()
 /************
  * Resource *
  ************/
-Workstation::Workstation()
+Host::Host()
 {
-  surf_callback_emit(workstationCreatedCallbacks, this);
+  surf_callback_emit(hostCreatedCallbacks, this);
 }
 
-Workstation::Workstation(ModelPtr model, const char *name, xbt_dict_t props,
+Host::Host(ModelPtr model, const char *name, xbt_dict_t props,
                                 xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu)
  : Resource(model, name, props)
  , p_storage(storage), p_netElm(netElm), p_cpu(cpu)
 {
   p_params.ramsize = 0;
-  surf_callback_emit(workstationCreatedCallbacks, this);
+  surf_callback_emit(hostCreatedCallbacks, this);
 }
 
-Workstation::Workstation(ModelPtr model, const char *name, xbt_dict_t props, lmm_constraint_t constraint,
+Host::Host(ModelPtr model, const char *name, xbt_dict_t props, lmm_constraint_t constraint,
                                         xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu)
  : Resource(model, name, props, constraint)
  , p_storage(storage), p_netElm(netElm), p_cpu(cpu)
 {
   p_params.ramsize = 0;
-  surf_callback_emit(workstationCreatedCallbacks, this);
+  surf_callback_emit(hostCreatedCallbacks, this);
 }
 
-Workstation::~Workstation(){
-  surf_callback_emit(workstationDestructedCallbacks, this);
+Host::~Host(){
+  surf_callback_emit(hostDestructedCallbacks, this);
 }
 
-void Workstation::setState(e_surf_resource_state_t state){
+void Host::setState(e_surf_resource_state_t state){
   e_surf_resource_state_t old = Resource::getState();
   Resource::setState(state);
-  surf_callback_emit(workstationStateChangedCallbacks, this, old, state);
+  surf_callback_emit(hostStateChangedCallbacks, this, old, state);
   p_cpu->setState(state);
 }
 
-int Workstation::getCore(){
+int Host::getCore(){
   return p_cpu->getCore();
 }
 
-double Workstation::getSpeed(double load){
+double Host::getSpeed(double load){
   return p_cpu->getSpeed(load);
 }
 
-double Workstation::getAvailableSpeed(){
+double Host::getAvailableSpeed(){
   return p_cpu->getAvailableSpeed();
 }
 
-double Workstation::getCurrentPowerPeak()
+double Host::getCurrentPowerPeak()
 {
   return p_cpu->getCurrentPowerPeak();
 }
 
-double Workstation::getPowerPeakAt(int pstate_index)
+double Host::getPowerPeakAt(int pstate_index)
 {
   return p_cpu->getPowerPeakAt(pstate_index);
 }
 
-int Workstation::getNbPstates()
+int Host::getNbPstates()
 {
   return p_cpu->getNbPstates();
 }
 
-void Workstation::setPstate(int pstate_index)
+void Host::setPstate(int pstate_index)
 {
        p_cpu->setPstate(pstate_index);
 }
-int Workstation::getPstate()
+int Host::getPstate()
 {
        return p_cpu->getPstate();
 }
 
-xbt_dict_t Workstation::getProperties()
+xbt_dict_t Host::getProperties()
 {
   return p_cpu->getProperties();
 }
 
-StoragePtr Workstation::findStorageOnMountList(const char* mount)
+StoragePtr Host::findStorageOnMountList(const char* mount)
 {
   StoragePtr st = NULL;
   s_mount_t mnt;
@@ -188,7 +189,7 @@ StoragePtr Workstation::findStorageOnMountList(const char* mount)
   return st;
 }
 
-xbt_dict_t Workstation::getMountedStorageList()
+xbt_dict_t Host::getMountedStorageList()
 {
   s_mount_t mnt;
   unsigned int i;
@@ -202,7 +203,7 @@ xbt_dict_t Workstation::getMountedStorageList()
   return storage_list;
 }
 
-xbt_dynar_t Workstation::getAttachedStorageList()
+xbt_dynar_t Host::getAttachedStorageList()
 {
   xbt_lib_cursor_t cursor;
   char *key;
@@ -219,7 +220,7 @@ xbt_dynar_t Workstation::getAttachedStorageList()
   return result;
 }
 
-ActionPtr Workstation::open(const char* fullpath) {
+ActionPtr Host::open(const char* fullpath) {
 
   StoragePtr st = NULL;
   s_mount_t mnt;
@@ -263,25 +264,25 @@ ActionPtr Workstation::open(const char* fullpath) {
   return action;
 }
 
-ActionPtr Workstation::close(surf_file_t fd) {
+ActionPtr Host::close(surf_file_t fd) {
   StoragePtr st = findStorageOnMountList(fd->mount);
   XBT_DEBUG("CLOSE %s on disk '%s'",fd->name, st->getName());
   return st->close(fd);
 }
 
-ActionPtr Workstation::read(surf_file_t fd, sg_size_t size) {
+ActionPtr Host::read(surf_file_t fd, sg_size_t size) {
   StoragePtr st = findStorageOnMountList(fd->mount);
   XBT_DEBUG("READ %s on disk '%s'",fd->name, st->getName());
   return st->read(fd, size);
 }
 
-ActionPtr Workstation::write(surf_file_t fd, sg_size_t size) {
+ActionPtr Host::write(surf_file_t fd, sg_size_t size) {
   StoragePtr st = findStorageOnMountList(fd->mount);
   XBT_DEBUG("WRITE %s on disk '%s'",fd->name, st->getName());
   return st->write(fd, size);
 }
 
-int Workstation::unlink(surf_file_t fd) {
+int Host::unlink(surf_file_t fd) {
   if (!fd){
     XBT_WARN("No such file descriptor. Impossible to unlink");
     return -1;
@@ -308,11 +309,11 @@ int Workstation::unlink(surf_file_t fd) {
   }
 }
 
-sg_size_t Workstation::getSize(surf_file_t fd){
+sg_size_t Host::getSize(surf_file_t fd){
   return fd->size;
 }
 
-xbt_dynar_t Workstation::getInfo( surf_file_t fd)
+xbt_dynar_t Host::getInfo( surf_file_t fd)
 {
   StoragePtr st = findStorageOnMountList(fd->mount);
   sg_size_t *psize = xbt_new(sg_size_t, 1);
@@ -327,11 +328,11 @@ xbt_dynar_t Workstation::getInfo( surf_file_t fd)
   return info;
 }
 
-sg_size_t Workstation::fileTell(surf_file_t fd){
+sg_size_t Host::fileTell(surf_file_t fd){
   return fd->current_position;
 }
 
-int Workstation::fileSeek(surf_file_t fd, sg_offset_t offset, int origin){
+int Host::fileSeek(surf_file_t fd, sg_offset_t offset, int origin){
 
   switch (origin) {
   case SEEK_SET:
@@ -348,7 +349,7 @@ int Workstation::fileSeek(surf_file_t fd, sg_offset_t offset, int origin){
   }
 }
 
-int Workstation::fileMove(surf_file_t fd, const char* fullpath){
+int Host::fileMove(surf_file_t fd, const char* fullpath){
   /* Check if the new full path is on the same mount point */
   if(!strncmp((const char*)fd->mount, fullpath, strlen(fd->mount))) {
     sg_size_t *psize, *new_psize;
@@ -378,16 +379,16 @@ int Workstation::fileMove(surf_file_t fd, const char* fullpath){
   }
 }
 
-xbt_dynar_t Workstation::getVms()
+xbt_dynar_t Host::getVms()
 {
-  xbt_dynar_t dyn = xbt_dynar_new(sizeof(WorkstationVMPtr), NULL);
+  xbt_dynar_t dyn = xbt_dynar_new(sizeof(VMPtr), NULL);
 
   /* iterate for all virtual machines */
-  for (WorkstationVMModel::vm_list_t::iterator iter =
-         WorkstationVMModel::ws_vms.begin();
-       iter !=  WorkstationVMModel::ws_vms.end(); ++iter) {
+  for (VMModel::vm_list_t::iterator iter =
+         VMModel::ws_vms.begin();
+       iter !=  VMModel::ws_vms.end(); ++iter) {
 
-    WorkstationVMPtr ws_vm = &*iter;
+    VMPtr ws_vm = &*iter;
     if (this == ws_vm->p_subWs)
       xbt_dynar_push(dyn, &ws_vm);
   }
@@ -395,12 +396,12 @@ xbt_dynar_t Workstation::getVms()
   return dyn;
 }
 
-void Workstation::getParams(ws_params_t params)
+void Host::getParams(ws_params_t params)
 {
   *params = p_params;
 }
 
-void Workstation::setParams(ws_params_t params)
+void Host::setParams(ws_params_t params)
 {
   /* may check something here. */
   p_params = *params;
@@ -410,8 +411,8 @@ void Workstation::setParams(ws_params_t params)
  * Action *
  **********/
 
-void WorkstationAction::setState(e_surf_action_state_t state){
+void HostAction::setState(e_surf_action_state_t state){
   e_surf_action_state_t old = getState();
   Action::setState(state);
-  surf_callback_emit(workstationActionStateChangedCallbacks, this, old, state);
+  surf_callback_emit(hostActionStateChangedCallbacks, this, old, state);
 }
similarity index 63%
rename from src/surf/workstation_interface.hpp
rename to src/surf/host_interface.hpp
index eb6c8dc..a4a3bda 100644 (file)
@@ -9,84 +9,80 @@
 #include "cpu_interface.hpp"
 #include "network_interface.hpp"
 
-#ifndef SURF_WORKSTATION_INTERFACE_HPP_
-#define SURF_WORKSTATION_INTERFACE_HPP_
+#ifndef SURF_HOST_INTERFACE_HPP_
+#define SURF_HOST_INTERFACE_HPP_
 
 /***********
  * Classes *
  ***********/
 
-class WorkstationModel;
-typedef WorkstationModel *WorkstationModelPtr;
+class HostModel;
+typedef HostModel *HostModelPtr;
 
-class Workstation;
-typedef Workstation *WorkstationPtr;
+class Host;
+typedef Host *HostPtr;
 
-class WorkstationAction;
-typedef WorkstationAction *WorkstationActionPtr;
+class HostAction;
+typedef HostAction *HostActionPtr;
 
 /*************
  * Callbacks *
  *************/
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Workstation creation *
- * @details Callback functions have the following signature: `void(WorkstationPtr)`
+ * @brief Callbacks handler which emit the callbacks after Host creation *
+ * @details Callback functions have the following signature: `void(HostPtr)`
  */
-XBT_PUBLIC_DATA(surf_callback(void, WorkstationPtr)) workstationCreatedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, HostPtr)) hostCreatedCallbacks;
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Workstation destruction *
- * @details Callback functions have the following signature: `void(WorkstationPtr)`
+ * @brief Callbacks handler which emit the callbacks after Host destruction *
+ * @details Callback functions have the following signature: `void(HostPtr)`
  */
-XBT_PUBLIC_DATA(surf_callback(void, WorkstationPtr)) workstationDestructedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, HostPtr)) hostDestructedCallbacks;
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after Workstation State changed *
- * @details Callback functions have the following signature: `void(WorkstationActionPtr action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
+ * @brief Callbacks handler which emit the callbacks after Host State changed *
+ * @details Callback functions have the following signature: `void(HostActionPtr action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
  */
-XBT_PUBLIC_DATA(surf_callback(void, WorkstationPtr, e_surf_resource_state_t, e_surf_resource_state_t)) workstationStateChangedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, HostPtr, e_surf_resource_state_t, e_surf_resource_state_t)) hostStateChangedCallbacks;
 
 /** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after WorkstationAction State changed *
- * @details Callback functions have the following signature: `void(WorkstationActionPtr action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
+ * @brief Callbacks handler which emit the callbacks after HostAction State changed *
+ * @details Callback functions have the following signature: `void(HostActionPtr action, e_surf_resource_state_t old, e_surf_resource_state_t current)`
  */
-XBT_PUBLIC_DATA(surf_callback(void, WorkstationActionPtr, e_surf_action_state_t, e_surf_action_state_t)) workstationActionStateChangedCallbacks;
+XBT_PUBLIC_DATA(surf_callback(void, HostActionPtr, e_surf_action_state_t, e_surf_action_state_t)) hostActionStateChangedCallbacks;
 
 /*********
  * Tools *
  *********/
-XBT_PUBLIC_DATA(WorkstationModelPtr) surf_workstation_model;
-XBT_PUBLIC(void) workstation_parse_init(sg_platf_host_cbarg_t host);
-XBT_PUBLIC(void) workstation_add_traces();
+XBT_PUBLIC_DATA(HostModelPtr) surf_host_model;
+XBT_PUBLIC(void) host_parse_init(sg_platf_host_cbarg_t host);
+XBT_PUBLIC(void) host_add_traces();
 
 /*********
  * Model *
  *********/
-/** @ingroup SURF_workstation_interface
- * @brief SURF Workstation model interface class
+/** @ingroup SURF_host_interface
+ * @brief SURF Host model interface class
  * @details A model is an object which handle the interactions between its Resources and its Actions
  */
-class WorkstationModel : public Model {
+class HostModel : public Model {
 public:
     /**
-   * @brief WorkstationModel constructor
+   * @brief HostModel constructor
    *
    * @param name the name of the model
    */
-  WorkstationModel(const char *name);
+  HostModel(const char *name);
 
-  /**
-   * @brief WorkstationModel constructor
-   */
-  WorkstationModel();
+  /** @brief HostModel constructor */
+  HostModel();
 
-  /**
-   * @brief WorkstationModel destructor
-   */
-  ~WorkstationModel();
+  /** @brief HostModel destructor */
+  ~HostModel();
 
-  virtual WorkstationPtr createWorkstation(const char *name)=0;
+  virtual HostPtr createHost(const char *name)=0;
   void addTraces(){DIE_IMPOSSIBLE;}
 
   /**
@@ -99,15 +95,15 @@ public:
    * @brief [brief description]
    * @details [long description]
    *
-   * @param workstation_nb [description]
-   * @param workstation_list [description]
+   * @param host_nb [description]
+   * @param host_list [description]
    * @param flops_amount [description]
    * @param bytes_amount [description]
    * @param rate [description]
    * @return [description]
    */
-  virtual ActionPtr executeParallelTask(int workstation_nb,
-                                        void **workstation_list,
+  virtual ActionPtr executeParallelTask(int host_nb,
+                                        void **host_list,
                                         double *flops_amount,
                                         double *bytes_amount,
                                         double rate)=0;
@@ -122,7 +118,7 @@ public:
   * @param rate [description]
   * @return [description]
   */
- virtual ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate)=0;
+ virtual ActionPtr communicate(HostPtr src, HostPtr dst, double size, double rate)=0;
 
  CpuModelPtr p_cpuModel;
 };
@@ -130,56 +126,54 @@ public:
 /************
  * Resource *
  ************/
-/** @ingroup SURF_workstation_interface
- * @brief SURF Workstation interface class
- * @details A workstation VM represent an virtual machine with a aggregation of a Cpu, a NetworkLink and a Storage
+/** @ingroup SURF_host_interface
+ * @brief SURF Host interface class
+ * @details An host represents a machine with a aggregation of a Cpu, a NetworkLink and a Storage
  */
-class Workstation : public Resource {
+class Host : public Resource {
 public:
   /**
-   * @brief Workstation consrtuctor
+   * @brief Host constructor
    */
-  Workstation();
+  Host();
 
   /**
-   * @brief Workstation constructor
+   * @brief Host constructor
    *
-   * @param model WorkstationModel associated to this Workstation
-   * @param name The name of the Workstation
-   * @param props Dictionary of properties associated to this Workstation
-   * @param storage The Storage associated to this Workstation
-   * @param netElm The RoutingEdge associated to this Workstation
-   * @param cpu The Cpu associated to this Workstation
-   */
-  Workstation(ModelPtr model, const char *name, xbt_dict_t props,
+   * @param model HostModel associated to this Host
+   * @param name The name of the Host
+   * @param props Dictionary of properties associated to this Host
+   * @param storage The Storage associated to this Host
+   * @param netElm The RoutingEdge associated to this Host
+   * @param cpu The Cpu associated to this Host
+   */
+  Host(ModelPtr model, const char *name, xbt_dict_t props,
                      xbt_dynar_t storage, RoutingEdgePtr netElm, CpuPtr cpu);
 
   /**
-   * @brief Workstation constructor
+   * @brief Host constructor
    *
-   * @param model WorkstationModel associated to this Workstation
-   * @param name The name of the Workstation
-   * @param props Dictionary of properties associated to this Workstation
-   * @param constraint The lmm constraint associated to this Workstation if it is part of a LMM component
-   * @param storage The Storage associated to this Workstation
-   * @param netElm The RoutingEdge associated to this Workstation
-   * @param cpu The Cpu associated to this Workstation
-   */
-  Workstation(ModelPtr model, const char *name, xbt_dict_t props,
+   * @param model HostModel associated to this Host
+   * @param name The name of the Host
+   * @param props Dictionary of properties associated to this Host
+   * @param constraint The lmm constraint associated to this Host if it is part of a LMM component
+   * @param storage The Storage associated to this Host
+   * @param netElm The RoutingEdge associated to this Host
+   * @param cpu The Cpu associated to this Host
+   */
+  Host(ModelPtr model, const char *name, xbt_dict_t props,
       lmm_constraint_t constraint, xbt_dynar_t storage, RoutingEdgePtr netElm,
       CpuPtr cpu);
 
-  /**
-   * @brief Workstation destructor
-   */
-  ~ Workstation();
+  /** @brief Host destructor */
+  ~ Host();
 
   void setState(e_surf_resource_state_t state);
 
   /**
-   * @brief Get the properties of the currenrt Workstation
+   * @brief Get the properties of the current Host
    *
-   * @return The properties of the current Workstation
+   * @return The properties of the current Host
    */
   xbt_dict_t getProperties();
 
@@ -256,7 +250,7 @@ public:
   virtual xbt_dict_t getMountedStorageList();
 
   /**
-   * @brief Get the xbt_dynar_t of storages attached to the workstation
+   * @brief Get the xbt_dynar_t of storages attached to the Host
    *
    * @return The xbt_dynar_t of Storage names
    */
@@ -367,7 +361,7 @@ public:
   NetworkLinkPtr p_network;
 
   /**
-   * @brief Get the list of virtual machines on the current Workstation
+   * @brief Get the list of virtual machines on the current Host
    *
    * @return The list of VMs
    */
@@ -396,34 +390,34 @@ public:
  * Action *
  **********/
 
-/** @ingroup SURF_workstation_interface
- * @brief SURF workstation action interface class
+/** @ingroup SURF_host_interface
+ * @brief SURF host action interface class
  */
-class WorkstationAction : public Action {
+class HostAction : public Action {
 public:
   /**
-   * @brief WorkstationAction constructor
+   * @brief HostAction constructor
    *
-   * @param model The WorkstationModel associated to this WorkstationAction
-   * @param cost The cost of this WorkstationAction in [TODO]
+   * @param model The HostModel associated to this HostAction
+   * @param cost The cost of this HostAction in [TODO]
    * @param failed [description]
    */
-  WorkstationAction(ModelPtr model, double cost, bool failed)
+  HostAction(ModelPtr model, double cost, bool failed)
   : Action(model, cost, failed) {}
 
   /**
-   * @brief WorkstationAction constructor
+   * @brief HostAction constructor
    *
-   * @param model The WorkstationModel associated to this WorkstationAction
-   * @param cost The cost of this WorkstationAction in [TODO]
+   * @param model The HostModel associated to this HostAction
+   * @param cost The cost of this HostAction in [TODO]
    * @param failed [description]
    * @param var The lmm variable associated to this StorageAction if it is part of a LMM component
    */
-  WorkstationAction(ModelPtr model, double cost, bool failed, lmm_variable_t var)
+  HostAction(ModelPtr model, double cost, bool failed, lmm_variable_t var)
   : Action(model, cost, failed, var) {}
 
   void setState(e_surf_action_state_t state);
 };
 
 
-#endif /* SURF_WORKSTATION_INTERFACE_HPP_ */
+#endif /* SURF_Host_INTERFACE_HPP_ */
similarity index 79%
rename from src/surf/workstation_ptask_L07.cpp
rename to src/surf/host_ptask_L07.cpp
index 4bb17ad..4b7b762 100644 (file)
@@ -4,11 +4,12 @@
 /* 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 "workstation_ptask_L07.hpp"
+#include "host_ptask_L07.hpp"
+
 #include "cpu_interface.hpp"
 #include "surf_routing.hpp"
 
-XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_workstation);
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host);
 
 static int ptask_host_count = 0;
 static xbt_dict_t ptask_parallel_task_link_set = NULL;
@@ -28,28 +29,28 @@ static void ptask_netlink_parse_init(sg_platf_link_cbarg_t link)
 static void ptask_define_callbacks()
 {
   sg_platf_host_add_cb(cpu_parse_init);
-  sg_platf_host_add_cb(workstation_parse_init);
+  sg_platf_host_add_cb(host_parse_init);
   sg_platf_link_add_cb(ptask_netlink_parse_init);
-  sg_platf_postparse_add_cb(workstation_add_traces);
+  sg_platf_postparse_add_cb(host_add_traces);
 }
 
-void surf_workstation_model_init_ptask_L07(void)
+void surf_host_model_init_ptask_L07(void)
 {
-  XBT_INFO("surf_workstation_model_init_ptask_L07");
+  XBT_INFO("surf_host_model_init_ptask_L07");
   xbt_assert(!surf_cpu_model_pm, "CPU model type already defined");
   xbt_assert(!surf_network_model, "network model type already defined");
   ptask_define_callbacks();
-  surf_workstation_model = new WorkstationL07Model();
-  ModelPtr model = surf_workstation_model;
+  surf_host_model = new HostL07Model();
+  ModelPtr model = surf_host_model;
   xbt_dynar_push(model_list, &model);
   xbt_dynar_push(model_list_invoke, &model);
 }
 
 
-WorkstationL07Model::WorkstationL07Model() : WorkstationModel("Workstation ptask_L07") {
+HostL07Model::HostL07Model() : HostModel("Host ptask_L07") {
   if (!ptask_maxmin_system)
        ptask_maxmin_system = lmm_system_new(1);
-  surf_workstation_model = NULL;
+  surf_host_model = NULL;
   surf_network_model = new NetworkL07Model();
   surf_cpu_model_pm = new CpuL07Model();
   routing_model_create(surf_network_model->createNetworkLink("__loopback__",
@@ -60,7 +61,7 @@ WorkstationL07Model::WorkstationL07Model() : WorkstationModel("Workstation ptask
   p_cpuModel = surf_cpu_model_pm;
 }
 
-WorkstationL07Model::~WorkstationL07Model() {
+HostL07Model::~HostL07Model() {
   xbt_dict_free(&ptask_parallel_task_link_set);
 
   delete surf_cpu_model_pm;
@@ -73,9 +74,9 @@ WorkstationL07Model::~WorkstationL07Model() {
   }
 }
 
-double WorkstationL07Model::shareResources(double /*now*/)
+double HostL07Model::shareResources(double /*now*/)
 {
-  WorkstationL07ActionPtr action;
+  HostL07ActionPtr action;
 
   ActionListPtr running_actions = getRunningActionSet();
   double min = this->shareResourcesMaxMin(running_actions,
@@ -84,7 +85,7 @@ double WorkstationL07Model::shareResources(double /*now*/)
 
   for(ActionList::iterator it(running_actions->begin()), itend(running_actions->end())
         ; it != itend ; ++it) {
-       action = static_cast<WorkstationL07ActionPtr>(&*it);
+       action = static_cast<HostL07ActionPtr>(&*it);
     if (action->m_latency > 0) {
       if (min < 0) {
         min = action->m_latency;
@@ -103,17 +104,17 @@ double WorkstationL07Model::shareResources(double /*now*/)
   return min;
 }
 
-void WorkstationL07Model::updateActionsState(double /*now*/, double delta)
+void HostL07Model::updateActionsState(double /*now*/, double delta)
 {
   double deltap = 0.0;
-  WorkstationL07ActionPtr action;
+  HostL07ActionPtr action;
 
   ActionListPtr actionSet = getRunningActionSet();
 
   for(ActionList::iterator it(actionSet->begin()), itNext = it, itend(actionSet->end())
         ; it != itend ; it=itNext) {
        ++itNext;
-    action = static_cast<WorkstationL07ActionPtr>(&*it);
+    action = static_cast<HostL07ActionPtr>(&*it);
     deltap = delta;
     if (action->m_latency > 0) {
       if (action->m_latency > deltap) {
@@ -155,7 +156,7 @@ void WorkstationL07Model::updateActionsState(double /*now*/, double delta)
                                     i++))) {
         constraint_id = lmm_constraint_id(cnst);
 
-        if (static_cast<WorkstationPtr>(constraint_id)->getState() == SURF_RESOURCE_OFF) {
+        if (static_cast<HostPtr>(constraint_id)->getState() == SURF_RESOURCE_OFF) {
           XBT_DEBUG("Action (%p) Failed!!", action);
           action->finish();
           action->setState(SURF_ACTION_FAILED);
@@ -167,13 +168,13 @@ void WorkstationL07Model::updateActionsState(double /*now*/, double delta)
   return;
 }
 
-ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
-                                                   void **workstation_list,
+ActionPtr HostL07Model::executeParallelTask(int host_nb,
+                                                   void **host_list,
                                                    double *flops_amount,
                                                                                                   double *bytes_amount,
                                                    double rate)
 {
-  WorkstationL07ActionPtr action;
+  HostL07ActionPtr action;
   int i, j;
   unsigned int cpt;
   int nb_link = 0;
@@ -186,18 +187,18 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
   xbt_dict_reset(ptask_parallel_task_link_set);
 
   /* Compute the number of affected resources... */
-  for (i = 0; i < workstation_nb; i++) {
-    for (j = 0; j < workstation_nb; j++) {
+  for (i = 0; i < host_nb; i++) {
+    for (j = 0; j < host_nb; j++) {
       xbt_dynar_t route=NULL;
 
-      if (bytes_amount[i * workstation_nb + j] > 0) {
+      if (bytes_amount[i * host_nb + j] > 0) {
         double lat=0.0;
         unsigned int cpt;
         void *_link;
         LinkL07Ptr link;
 
-        routing_platf->getRouteAndLatency(static_cast<WorkstationL07Ptr>(workstation_list[i])->p_netElm,
-                                                 static_cast<WorkstationL07Ptr>(workstation_list[j])->p_netElm,
+        routing_platf->getRouteAndLatency(static_cast<HostL07Ptr>(host_list[i])->p_netElm,
+                                                 static_cast<HostL07Ptr>(host_list[j])->p_netElm,
                                                  &route,
                                                  &lat);
         latency = MAX(latency, lat);
@@ -213,17 +214,17 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
   nb_link = xbt_dict_length(ptask_parallel_task_link_set);
   xbt_dict_reset(ptask_parallel_task_link_set);
 
-  for (i = 0; i < workstation_nb; i++)
+  for (i = 0; i < host_nb; i++)
     if (flops_amount[i] > 0)
       nb_host++;
 
-  action = new WorkstationL07Action(this, 1, 0);
+  action = new HostL07Action(this, 1, 0);
   XBT_DEBUG("Creating a parallel task (%p) with %d cpus and %d links.",
-         action, workstation_nb, nb_link);
+         action, host_nb, nb_link);
   action->m_suspended = 0;        /* Should be useless because of the
                                    calloc but it seems to help valgrind... */
-  action->m_workstationNb = workstation_nb;
-  action->p_workstationList = (WorkstationPtr *) workstation_list;
+  action->m_hostNb = host_nb;
+  action->p_hostList = (HostPtr *) host_list;
   action->p_computationAmount = flops_amount;
   action->p_communicationAmount = bytes_amount;
   action->m_latency = latency;
@@ -231,34 +232,34 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
 
   action->p_variable = lmm_variable_new(ptask_maxmin_system, action, 1.0,
                        (action->m_rate > 0) ? action->m_rate : -1.0,
-                       workstation_nb + nb_link);
+                       host_nb + nb_link);
 
   if (action->m_latency > 0)
     lmm_update_variable_weight(ptask_maxmin_system, action->getVariable(), 0.0);
 
-  for (i = 0; i < workstation_nb; i++)
+  for (i = 0; i < host_nb; i++)
     lmm_expand(ptask_maxmin_system,
-                static_cast<WorkstationL07Ptr>(workstation_list[i])->p_cpu->getConstraint(),
+                static_cast<HostL07Ptr>(host_list[i])->p_cpu->getConstraint(),
                action->getVariable(), flops_amount[i]);
 
-  for (i = 0; i < workstation_nb; i++) {
-    for (j = 0; j < workstation_nb; j++) {
+  for (i = 0; i < host_nb; i++) {
+    for (j = 0; j < host_nb; j++) {
       void *_link;
       LinkL07Ptr link;
 
       xbt_dynar_t route=NULL;
-      if (bytes_amount[i * workstation_nb + j] == 0.0)
+      if (bytes_amount[i * host_nb + j] == 0.0)
         continue;
 
-      routing_platf->getRouteAndLatency(static_cast<WorkstationL07Ptr>(workstation_list[i])->p_netElm,
-                                        static_cast<WorkstationL07Ptr>(workstation_list[j])->p_netElm,
+      routing_platf->getRouteAndLatency(static_cast<HostL07Ptr>(host_list[i])->p_netElm,
+                                        static_cast<HostL07Ptr>(host_list[j])->p_netElm,
                                            &route, NULL);
 
       xbt_dynar_foreach(route, cpt, _link) {
         link = static_cast<LinkL07Ptr>(_link);
         lmm_expand_add(ptask_maxmin_system, link->getConstraint(),
                        action->getVariable(),
-                       bytes_amount[i * workstation_nb + j]);
+                       bytes_amount[i * host_nb + j]);
       }
     }
   }
@@ -271,42 +272,42 @@ ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
   return action;
 }
 
-WorkstationPtr WorkstationL07Model::createWorkstation(const char *name)
+HostPtr HostL07Model::createHost(const char *name)
 {
-  WorkstationL07Ptr wk = NULL;
-  xbt_assert(!surf_workstation_resource_priv(surf_workstation_resource_by_name(name)),
+  HostL07Ptr wk = NULL;
+  xbt_assert(!surf_host_resource_priv(surf_host_resource_by_name(name)),
               "Host '%s' declared several times in the platform file.",
               name);
 
-  wk = new WorkstationL07(this, name, NULL,
+  wk = new HostL07(this, name, NULL,
                                  static_cast<RoutingEdgePtr>(xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL)),
                                  static_cast<CpuPtr>(xbt_lib_get_or_null(host_lib, name, SURF_CPU_LEVEL)));
 
-  xbt_lib_set(host_lib, name, SURF_WKS_LEVEL, wk);
+  xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, wk);
 
   return wk;//FIXME:xbt_lib_get_elm_or_null(host_lib, name);
 }
 
-ActionPtr WorkstationL07Model::communicate(WorkstationPtr src, WorkstationPtr dst,
+ActionPtr HostL07Model::communicate(HostPtr src, HostPtr dst,
                                        double size, double rate)
 {
-  void **workstation_list = xbt_new0(void *, 2);
+  void **host_list = xbt_new0(void *, 2);
   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;
+  host_list[0] = src;
+  host_list[1] = dst;
   bytes_amount[1] = size;
 
-  res = executeParallelTask(2, workstation_list,
+  res = executeParallelTask(2, host_list,
                                     flops_amount,
                                     bytes_amount, rate);
 
   return res;
 }
 
-xbt_dynar_t WorkstationL07Model::getRoute(WorkstationPtr src, WorkstationPtr dst)
+xbt_dynar_t HostL07Model::getRoute(HostPtr src, HostPtr dst)
 {
   xbt_dynar_t route=NULL;
   routing_platf->getRouteAndLatency(src->p_netElm, dst->p_netElm, &route, NULL);
@@ -323,7 +324,7 @@ CpuPtr CpuL07Model::createCpu(const char *name,  xbt_dynar_t powerPeak,
   double power_initial = xbt_dynar_get_as(powerPeak, pstate, double);
   xbt_dynar_free(&powerPeak);   // kill memory leak
 
-  xbt_assert(!surf_workstation_resource_priv(surf_workstation_resource_by_name(name)),
+  xbt_assert(!surf_host_resource_priv(surf_host_resource_by_name(name)),
               "Host '%s' declared several times in the platform file.",
               name);
 
@@ -361,7 +362,7 @@ NetworkLinkPtr NetworkL07Model::createNetworkLink(const char *name,
   return nw_link;
 }
 
-void WorkstationL07Model::addTraces()
+void HostL07Model::addTraces()
 {
   xbt_dict_cursor_t cursor = NULL;
   char *trace_name, *elm;
@@ -426,32 +427,32 @@ void WorkstationL07Model::addTraces()
  * Resource *
  ************/
 
-WorkstationL07::WorkstationL07(WorkstationModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu)
-  : Workstation(model, name, props, NULL, netElm, cpu)
+HostL07::HostL07(HostModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu)
+  : Host(model, name, props, NULL, netElm, cpu)
 {
 }
 
-double WorkstationL07::getPowerPeakAt(int /*pstate_index*/)
+double HostL07::getPowerPeakAt(int /*pstate_index*/)
 {
        THROW_UNIMPLEMENTED;
 }
 
-int WorkstationL07::getNbPstates()
+int HostL07::getNbPstates()
 {
        THROW_UNIMPLEMENTED;
 }
 
-void WorkstationL07::setPstate(int /*pstate_index*/)
+void HostL07::setPstate(int /*pstate_index*/)
 {
        THROW_UNIMPLEMENTED;
 }
 
-int WorkstationL07::getPstate()
+int HostL07::getPstate()
 {
        THROW_UNIMPLEMENTED;
 }
 
-double WorkstationL07::getConsumedEnergy()
+double HostL07::getConsumedEnergy()
 {
        THROW_UNIMPLEMENTED;
 }
@@ -551,33 +552,33 @@ void LinkL07::updateState(tmgr_trace_event_t event_type, double value, double da
   return;
 }
 
-e_surf_resource_state_t WorkstationL07::getState()
+e_surf_resource_state_t HostL07::getState()
 {
   return p_cpu->getState();
 }
 
-ActionPtr WorkstationL07::execute(double size)
+ActionPtr HostL07::execute(double size)
 {
-  void **workstation_list = xbt_new0(void *, 1);
+  void **host_list = xbt_new0(void *, 1);
   double *flops_amount = xbt_new0(double, 1);
   double *bytes_amount = xbt_new0(double, 1);
 
-  workstation_list[0] = this;
+  host_list[0] = this;
   bytes_amount[0] = 0.0;
   flops_amount[0] = size;
 
-  return static_cast<WorkstationL07ModelPtr>(getModel())->executeParallelTask(1, workstation_list,
+  return static_cast<HostL07ModelPtr>(getModel())->executeParallelTask(1, host_list,
                                              flops_amount,
                                      bytes_amount, -1);
 }
 
-ActionPtr WorkstationL07::sleep(double duration)
+ActionPtr HostL07::sleep(double duration)
 {
-  WorkstationL07ActionPtr action = NULL;
+  HostL07ActionPtr action = NULL;
 
   XBT_IN("(%s,%g)", getName(), duration);
 
-  action = static_cast<WorkstationL07ActionPtr>(execute(1.0));
+  action = static_cast<HostL07ActionPtr>(execute(1.0));
   action->m_maxDuration = duration;
   action->m_suspended = 2;
   lmm_update_variable_weight(ptask_maxmin_system, action->getVariable(), 0.0);
@@ -605,12 +606,12 @@ double LinkL07::getLatency()
 void LinkL07::updateLatency(double value, double date)
 {
   lmm_variable_t var = NULL;
-  WorkstationL07ActionPtr action;
+  HostL07ActionPtr action;
   lmm_element_t elem = NULL;
 
   m_latCurrent = value;
   while ((var = lmm_get_var_from_cnst(ptask_maxmin_system, getConstraint(), &elem))) {
-    action = (WorkstationL07ActionPtr) lmm_variable_id(var);
+    action = (HostL07ActionPtr) lmm_variable_id(var);
     action->updateBound();
   }
 }
@@ -625,29 +626,29 @@ bool LinkL07::isShared()
  * Action *
  **********/
 
-WorkstationL07Action::~WorkstationL07Action(){
-  free(p_workstationList);
+HostL07Action::~HostL07Action(){
+  free(p_hostList);
   free(p_communicationAmount);
   free(p_computationAmount);
 }
 
-void WorkstationL07Action::updateBound()
+void HostL07Action::updateBound()
 {
   double lat_current = 0.0;
   double lat_bound = -1.0;
   int i, j;
 
-  for (i = 0; i < m_workstationNb; i++) {
-    for (j = 0; j < m_workstationNb; j++) {
+  for (i = 0; i < m_hostNb; i++) {
+    for (j = 0; j < m_hostNb; j++) {
       xbt_dynar_t route=NULL;
 
-      if (p_communicationAmount[i * m_workstationNb + j] > 0) {
+      if (p_communicationAmount[i * m_hostNb + j] > 0) {
         double lat = 0.0;
-        routing_platf->getRouteAndLatency(static_cast<WorkstationL07Ptr>(((void**)p_workstationList)[i])->p_netElm,
-                                          static_cast<WorkstationL07Ptr>(((void**)p_workstationList)[j])->p_netElm,
+        routing_platf->getRouteAndLatency(static_cast<HostL07Ptr>(((void**)p_hostList)[i])->p_netElm,
+                                          static_cast<HostL07Ptr>(((void**)p_hostList)[j])->p_netElm,
                                                          &route, &lat);
 
-        lat_current = MAX(lat_current, lat * p_communicationAmount[i * m_workstationNb + j]);
+        lat_current = MAX(lat_current, lat * p_communicationAmount[i * m_hostNb + j]);
       }
     }
   }
@@ -661,7 +662,7 @@ void WorkstationL07Action::updateBound()
   }
 }
 
-int WorkstationL07Action::unref()
+int HostL07Action::unref()
 {
   m_refcount--;
   if (!m_refcount) {
@@ -675,13 +676,13 @@ int WorkstationL07Action::unref()
   return 0;
 }
 
-void WorkstationL07Action::cancel()
+void HostL07Action::cancel()
 {
   setState(SURF_ACTION_FAILED);
   return;
 }
 
-void WorkstationL07Action::suspend()
+void HostL07Action::suspend()
 {
   XBT_IN("(%p))", this);
   if (m_suspended != 2) {
@@ -691,7 +692,7 @@ void WorkstationL07Action::suspend()
   XBT_OUT();
 }
 
-void WorkstationL07Action::resume()
+void HostL07Action::resume()
 {
   XBT_IN("(%p)", this);
   if (m_suspended != 2) {
@@ -701,26 +702,26 @@ void WorkstationL07Action::resume()
   XBT_OUT();
 }
 
-bool WorkstationL07Action::isSuspended()
+bool HostL07Action::isSuspended()
 {
   return m_suspended == 1;
 }
 
-void WorkstationL07Action::setMaxDuration(double duration)
+void HostL07Action::setMaxDuration(double duration)
 {                               /* FIXME: should inherit */
   XBT_IN("(%p,%g)", this, duration);
   m_maxDuration = duration;
   XBT_OUT();
 }
 
-void WorkstationL07Action::setPriority(double priority)
+void HostL07Action::setPriority(double priority)
 {                               /* FIXME: should inherit */
   XBT_IN("(%p,%g)", this, priority);
   m_priority = priority;
   XBT_OUT();
 }
 
-double WorkstationL07Action::getRemains()
+double HostL07Action::getRemains()
 {
   XBT_IN("(%p)", this);
   XBT_OUT();
similarity index 76%
rename from src/surf/workstation_ptask_L07.hpp
rename to src/surf/host_ptask_L07.hpp
index dc94987..c848b52 100644 (file)
@@ -4,17 +4,17 @@
 /* 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 "workstation_interface.hpp"
+#include "host_interface.hpp"
 
-#ifndef WORKSTATION_L07_HPP_
-#define WORKSTATION_L07_HPP_
+#ifndef HOST_L07_HPP_
+#define HOST_L07_HPP_
 
 /***********
  * Classes *
  ***********/
 
-class WorkstationL07Model;
-typedef WorkstationL07Model *WorkstationL07ModelPtr;
+class HostL07Model;
+typedef HostL07Model *HostL07ModelPtr;
 
 class CpuL07Model;
 typedef CpuL07Model *CpuL07ModelPtr;
@@ -22,8 +22,8 @@ typedef CpuL07Model *CpuL07ModelPtr;
 class NetworkL07Model;
 typedef NetworkL07Model *NetworkL07ModelPtr;
 
-class WorkstationL07;
-typedef WorkstationL07 *WorkstationL07Ptr;
+class HostL07;
+typedef HostL07 *HostL07Ptr;
 
 class CpuL07;
 typedef CpuL07 *CpuL07Ptr;
@@ -31,8 +31,8 @@ typedef CpuL07 *CpuL07Ptr;
 class LinkL07;
 typedef LinkL07 *LinkL07Ptr;
 
-class WorkstationL07Action;
-typedef WorkstationL07Action *WorkstationL07ActionPtr;
+class HostL07Action;
+typedef HostL07Action *HostL07ActionPtr;
 
 /*********
  * Tools *
@@ -41,21 +41,21 @@ typedef WorkstationL07Action *WorkstationL07ActionPtr;
 /*********
  * Model *
  *********/
-class WorkstationL07Model : public WorkstationModel {
+class HostL07Model : public HostModel {
 public:
-  WorkstationL07Model();
-  ~WorkstationL07Model();
+  HostL07Model();
+  ~HostL07Model();
 
   double shareResources(double now);
   void updateActionsState(double now, double delta);
-  WorkstationPtr createWorkstation(const char *name);
-  ActionPtr executeParallelTask(int workstation_nb,
-                                        void **workstation_list,
+  HostPtr createHost(const char *name);
+  ActionPtr executeParallelTask(int host_nb,
+                                        void **host_list,
                                         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);
+  xbt_dynar_t getRoute(HostPtr src, HostPtr dst);
+  ActionPtr communicate(HostPtr src, HostPtr dst, double size, double rate);
   void addTraces();
   NetworkModelPtr p_networkModel;
 };
@@ -72,7 +72,7 @@ public:
                           xbt_dict_t cpu_properties);
   void addTraces() {DIE_IMPOSSIBLE;};
 
-  WorkstationL07ModelPtr p_workstationModel;
+  HostL07ModelPtr p_hostModel;
 };
 
 class NetworkL07Model : public NetworkModel {
@@ -92,16 +92,16 @@ public:
 
   ActionPtr communicate(RoutingEdgePtr /*src*/, RoutingEdgePtr /*dst*/, double /*size*/, double /*rate*/) {DIE_IMPOSSIBLE;};
   void addTraces() {DIE_IMPOSSIBLE;};
-  WorkstationL07ModelPtr p_workstationModel;
+  HostL07ModelPtr p_hostModel;
 };
 
 /************
  * Resource *
  ************/
 
-class WorkstationL07 : public Workstation {
+class HostL07 : public Host {
 public:
-  WorkstationL07(WorkstationModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu);
+  HostL07(HostModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu);
   //bool isUsed();
   bool isUsed() {DIE_IMPOSSIBLE;};
   void updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) {DIE_IMPOSSIBLE;};
@@ -116,7 +116,7 @@ public:
 };
 
 class CpuL07 : public Cpu {
-  friend void WorkstationL07Model::addTraces();
+  friend void HostL07Model::addTraces();
   tmgr_trace_event_t p_stateEvent;
   tmgr_trace_event_t p_powerEvent;
 public:
@@ -167,18 +167,18 @@ public:
 /**********
  * Action *
  **********/
-class WorkstationL07Action : public WorkstationAction {
-  friend ActionPtr WorkstationL07::execute(double size);
-  friend ActionPtr WorkstationL07::sleep(double duration);
-  friend ActionPtr WorkstationL07Model::executeParallelTask(int workstation_nb,
-                                                     void **workstation_list,
+class HostL07Action : public HostAction {
+  friend ActionPtr HostL07::execute(double size);
+  friend ActionPtr HostL07::sleep(double duration);
+  friend ActionPtr HostL07Model::executeParallelTask(int host_nb,
+                                                     void **host_list,
                                                    double *flops_amount,
                                                                                                   double *bytes_amount,
                                                    double rate);
 public:
-  WorkstationL07Action(ModelPtr model, double cost, bool failed)
-  : WorkstationAction(model, cost, failed) {};
- ~WorkstationL07Action();
+  HostL07Action(ModelPtr model, double cost, bool failed)
+  : HostAction(model, cost, failed) {};
+ ~HostL07Action();
 
   void updateBound();
 
@@ -191,12 +191,12 @@ public:
   void setPriority(double priority);
   double getRemains();
 
-  int m_workstationNb;
-  WorkstationPtr *p_workstationList;
+  int m_hostNb;
+  HostPtr *p_hostList;
   double *p_computationAmount;
   double *p_communicationAmount;
   double m_latency;
   double m_rate;
 };
 
-#endif /* WORKSTATION_L07_HPP_ */
+#endif /* HOST_L07_HPP_ */
index b532f72..1db3ddc 100644 (file)
@@ -128,7 +128,7 @@ public:
   virtual void gapAppend(double /*size*/, const NetworkLinkPtr /*link*/, NetworkActionPtr /*action*/) {};
 
   /**
-   * @brief Create a communication between two workstations.
+   * @brief Create a communication between two hosts.
    * @details It makes calls to the routing part, and execute the communication
    * between the two end points.
    *
@@ -192,7 +192,7 @@ public:
  ************/
  /** @ingroup SURF_network_interface
   * @brief SURF network link interface class
-  * @details A NetworkLink represents the link between two [Workstations](\ref Workstation)
+  * @details A NetworkLink represents the link between two [hosts](\ref Host)
   */
 class NetworkLink : public Resource {
 public:
@@ -281,7 +281,7 @@ public:
 /** @ingroup SURF_network_interface
  * @brief SURF network action interface class
  * @details A NetworkAction represents a communication between two
- * [Workstations](\ref Workstation)
+ * [hosts](\ref Host)
  */
 class NetworkAction : public Action {
 public:
index 5ab27f2..cdfef8c 100644 (file)
@@ -4,13 +4,13 @@
 /* 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 "host_interface.hpp"
 #include "surf_interface.hpp"
-#include "workstation_interface.hpp"
-#include "vm_workstation_interface.hpp"
 #include "network_interface.hpp"
 #include "surf_routing_cluster.hpp"
 #include "instr/instr_private.h"
 #include "plugins/energy.hpp"
+#include "vm_interface.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_kernel);
 
@@ -22,16 +22,16 @@ static CpuPtr get_casted_cpu(surf_resource_t resource){
   return static_cast<CpuPtr>(surf_cpu_resource_priv(resource));
 }
 
-static WorkstationPtr get_casted_workstation(surf_resource_t resource){
-  return static_cast<WorkstationPtr>(surf_workstation_resource_priv(resource));
+static HostPtr get_casted_host(surf_resource_t resource){
+  return static_cast<HostPtr>(surf_host_resource_priv(resource));
 }
 
 static RoutingEdgePtr get_casted_routing(surf_resource_t resource){
   return static_cast<RoutingEdgePtr>(surf_routing_resource_priv(resource));
 }
 
-static WorkstationVMPtr get_casted_vm_workstation(surf_resource_t resource){
-  return static_cast<WorkstationVMPtr>(surf_workstation_resource_priv(resource));
+static VMPtr get_casted_vm(surf_resource_t resource){
+  return static_cast<VMPtr>(surf_host_resource_priv(resource));
 }
 
 char *surf_routing_edge_name(sg_routing_edge_t edge){
@@ -225,7 +225,7 @@ void routing_get_route_and_latency(sg_routing_edge_t src, sg_routing_edge_t dst,
  *********/
 
 surf_model_t surf_resource_model(const void *host, int level) {
-  /* If level is SURF_WKS_LEVEL, ws is a workstation_CLM03 object. It has
+  /* If level is SURF_WKS_LEVEL, ws is a host_CLM03 object. It has
    * surf_resource at the generic_resource field. */
   ResourcePtr ws = static_cast<ResourcePtr>(xbt_lib_get_level((xbt_dictelm_t) host, level));
   return ws->getModel();
@@ -279,29 +279,29 @@ int surf_model_running_action_set_size(surf_model_t model){
   return model->getRunningActionSet()->size();
 }
 
-surf_action_t surf_workstation_model_execute_parallel_task(surf_workstation_model_t model,
-                                                   int workstation_nb,
-                                            void **workstation_list,
+surf_action_t surf_host_model_execute_parallel_task(surf_host_model_t model,
+                                                   int host_nb,
+                                            void **host_list,
                                             double *flops_amount,
                                             double *bytes_amount,
                                             double rate){
-  return static_cast<ActionPtr>(model->executeParallelTask(workstation_nb, workstation_list, flops_amount, bytes_amount, rate));
+  return static_cast<ActionPtr>(model->executeParallelTask(host_nb, host_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){
-  return model->communicate(get_casted_workstation(src), get_casted_workstation(dst), size, rate);
+surf_action_t surf_host_model_communicate(surf_host_model_t model, surf_resource_t src, surf_resource_t dst, double size, double rate){
+  return model->communicate(get_casted_host(src), get_casted_host(dst), size, rate);
 }
 
-xbt_dynar_t surf_workstation_model_get_route(surf_workstation_model_t /*model*/,
+xbt_dynar_t surf_host_model_get_route(surf_host_model_t /*model*/,
                                              surf_resource_t src, surf_resource_t dst){
   xbt_dynar_t route = NULL;
-  routing_platf->getRouteAndLatency(get_casted_workstation(src)->p_netElm,
-                                           get_casted_workstation(dst)->p_netElm, &route, NULL);
+  routing_platf->getRouteAndLatency(get_casted_host(src)->p_netElm,
+                                           get_casted_host(dst)->p_netElm, &route, NULL);
   return route;
 }
 
-void surf_vm_workstation_model_create(const char *name, surf_resource_t ind_phys_host){
-  surf_vm_workstation_model->createWorkstationVM(name, ind_phys_host);
+void surf_vm_model_create(const char *name, surf_resource_t ind_phys_host){
+  surf_vm_model->createVM(name, ind_phys_host);
 }
 
 surf_action_t surf_network_model_communicate(surf_network_model_t model, sg_routing_edge_t src, sg_routing_edge_t dst, double size, double rate){
@@ -324,115 +324,115 @@ void surf_resource_set_state(surf_cpp_resource_t resource, e_surf_resource_state
   resource->setState(state);
 }
 
-surf_action_t surf_workstation_sleep(surf_resource_t resource, double duration){
-  return get_casted_workstation(resource)->sleep(duration);
+surf_action_t surf_host_sleep(surf_resource_t resource, double duration){
+  return get_casted_host(resource)->sleep(duration);
 }
 
-double surf_workstation_get_speed(surf_resource_t resource, double load){
-  return get_casted_workstation(resource)->getSpeed(load);
+double surf_host_get_speed(surf_resource_t resource, double load){
+  return get_casted_host(resource)->getSpeed(load);
 }
 
-double surf_workstation_get_available_speed(surf_resource_t resource){
-  return get_casted_workstation(resource)->getAvailableSpeed();
+double surf_host_get_available_speed(surf_resource_t resource){
+  return get_casted_host(resource)->getAvailableSpeed();
 }
 
-int surf_workstation_get_core(surf_resource_t resource){
-  return get_casted_workstation(resource)->getCore();
+int surf_host_get_core(surf_resource_t resource){
+  return get_casted_host(resource)->getCore();
 }
 
-surf_action_t surf_workstation_execute(surf_resource_t resource, double size){
-  return get_casted_workstation(resource)->execute(size);
+surf_action_t surf_host_execute(surf_resource_t resource, double size){
+  return get_casted_host(resource)->execute(size);
 }
 
-double surf_workstation_get_current_power_peak(surf_resource_t resource){
-  return get_casted_workstation(resource)->getCurrentPowerPeak();
+double surf_host_get_current_power_peak(surf_resource_t resource){
+  return get_casted_host(resource)->getCurrentPowerPeak();
 }
 
-double surf_workstation_get_power_peak_at(surf_resource_t resource, int pstate_index){
-  return get_casted_workstation(resource)->getPowerPeakAt(pstate_index);
+double surf_host_get_power_peak_at(surf_resource_t resource, int pstate_index){
+  return get_casted_host(resource)->getPowerPeakAt(pstate_index);
 }
 
-int surf_workstation_get_nb_pstates(surf_resource_t resource){
-  return get_casted_workstation(resource)->getNbPstates();
+int surf_host_get_nb_pstates(surf_resource_t resource){
+  return get_casted_host(resource)->getNbPstates();
 }
 
-void surf_workstation_set_pstate(surf_resource_t resource, int pstate_index){
-  get_casted_workstation(resource)->setPstate(pstate_index);
+void surf_host_set_pstate(surf_resource_t resource, int pstate_index){
+  get_casted_host(resource)->setPstate(pstate_index);
 }
-int surf_workstation_get_pstate(surf_resource_t resource){
-  return get_casted_workstation(resource)->getPstate();
+int surf_host_get_pstate(surf_resource_t resource){
+  return get_casted_host(resource)->getPstate();
 }
-double surf_workstation_get_wattmin_at(surf_resource_t resource, int pstate){
+double surf_host_get_wattmin_at(surf_resource_t resource, int pstate){
   xbt_assert(surf_energy!=NULL, "The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");
-  std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_workstation(resource)->p_cpu);
+  std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_host(resource)->p_cpu);
   return cpuIt->second->getWattMinAt(pstate);
 }
-double surf_workstation_get_wattmax_at(surf_resource_t resource, int pstate){
+double surf_host_get_wattmax_at(surf_resource_t resource, int pstate){
   xbt_assert(surf_energy!=NULL, "The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");
-  std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_workstation(resource)->p_cpu);
+  std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_host(resource)->p_cpu);
   return cpuIt->second->getWattMaxAt(pstate);
 }
 
-double surf_workstation_get_consumed_energy(surf_resource_t resource){
+double surf_host_get_consumed_energy(surf_resource_t resource){
   xbt_assert(surf_energy!=NULL, "The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");
-  std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_workstation(resource)->p_cpu);
+  std::map<CpuPtr, CpuEnergyPtr>::iterator cpuIt = surf_energy->find(get_casted_host(resource)->p_cpu);
   return cpuIt->second->getConsumedEnergy();
 }
 
-xbt_dict_t surf_workstation_get_mounted_storage_list(surf_resource_t workstation){
-  return get_casted_workstation(workstation)->getMountedStorageList();
+xbt_dict_t surf_host_get_mounted_storage_list(surf_resource_t host){
+  return get_casted_host(host)->getMountedStorageList();
 }
 
-xbt_dynar_t surf_workstation_get_attached_storage_list(surf_resource_t workstation){
-  return get_casted_workstation(workstation)->getAttachedStorageList();
+xbt_dynar_t surf_host_get_attached_storage_list(surf_resource_t host){
+  return get_casted_host(host)->getAttachedStorageList();
 }
 
-surf_action_t surf_workstation_open(surf_resource_t workstation, const char* fullpath){
-  return get_casted_workstation(workstation)->open(fullpath);
+surf_action_t surf_host_open(surf_resource_t host, const char* fullpath){
+  return get_casted_host(host)->open(fullpath);
 }
 
-surf_action_t surf_workstation_close(surf_resource_t workstation, surf_file_t fd){
-  return get_casted_workstation(workstation)->close(fd);
+surf_action_t surf_host_close(surf_resource_t host, surf_file_t fd){
+  return get_casted_host(host)->close(fd);
 }
 
-int surf_workstation_unlink(surf_resource_t workstation, surf_file_t fd){
-  return get_casted_workstation(workstation)->unlink(fd);
+int surf_host_unlink(surf_resource_t host, surf_file_t fd){
+  return get_casted_host(host)->unlink(fd);
 }
 
-size_t surf_workstation_get_size(surf_resource_t workstation, surf_file_t fd){
-  return get_casted_workstation(workstation)->getSize(fd);
+size_t surf_host_get_size(surf_resource_t host, surf_file_t fd){
+  return get_casted_host(host)->getSize(fd);
 }
 
-surf_action_t surf_workstation_read(surf_resource_t resource, surf_file_t fd, sg_size_t size){
-  return get_casted_workstation(resource)->read(fd, size);
+surf_action_t surf_host_read(surf_resource_t host, surf_file_t fd, sg_size_t size){
+  return get_casted_host(host)->read(fd, size);
 }
 
-surf_action_t surf_workstation_write(surf_resource_t resource, surf_file_t fd, sg_size_t size){
-  return get_casted_workstation(resource)->write(fd, size);
+surf_action_t surf_host_write(surf_resource_t host, surf_file_t fd, sg_size_t size){
+  return get_casted_host(host)->write(fd, size);
 }
 
-xbt_dynar_t surf_workstation_get_info(surf_resource_t resource, surf_file_t fd){
-  return get_casted_workstation(resource)->getInfo(fd);
+xbt_dynar_t surf_host_get_info(surf_resource_t host, surf_file_t fd){
+  return get_casted_host(host)->getInfo(fd);
 }
 
-size_t surf_workstation_file_tell(surf_resource_t workstation, surf_file_t fd){
-  return get_casted_workstation(workstation)->fileTell(fd);
+size_t surf_host_file_tell(surf_resource_t host, surf_file_t fd){
+  return get_casted_host(host)->fileTell(fd);
 }
 
-int surf_workstation_file_seek(surf_resource_t workstation, surf_file_t fd,
+int surf_host_file_seek(surf_resource_t host, surf_file_t fd,
                                sg_offset_t offset, int origin){
-  return get_casted_workstation(workstation)->fileSeek(fd, offset, origin);
+  return get_casted_host(host)->fileSeek(fd, offset, origin);
 }
 
-int surf_workstation_file_move(surf_resource_t workstation, surf_file_t fd, const char* fullpath){
-  return get_casted_workstation(workstation)->fileMove(fd, fullpath);
+int surf_host_file_move(surf_resource_t host, surf_file_t fd, const char* fullpath){
+  return get_casted_host(host)->fileMove(fd, fullpath);
 }
 
-xbt_dynar_t surf_workstation_get_vms(surf_resource_t resource){
-  xbt_dynar_t vms = get_casted_workstation(resource)->getVms();
+xbt_dynar_t surf_host_get_vms(surf_resource_t host){
+  xbt_dynar_t vms = get_casted_host(host)->getVms();
   xbt_dynar_t vms_ = xbt_dynar_new(sizeof(smx_host_t), NULL);
   unsigned int cpt;
-  WorkstationVMPtr vm;
+  VMPtr vm;
   xbt_dynar_foreach(vms, cpt, vm) {
     smx_host_t vm_ = xbt_lib_get_elm_or_null(host_lib, vm->getName());
     xbt_dynar_push(vms_, &vm_);
@@ -441,21 +441,18 @@ xbt_dynar_t surf_workstation_get_vms(surf_resource_t resource){
   return vms_;
 }
 
-void surf_workstation_get_params(surf_resource_t resource, ws_params_t params){
-  get_casted_workstation(resource)->getParams(params);
+void surf_host_get_params(surf_resource_t host, ws_params_t params){
+  get_casted_host(host)->getParams(params);
 }
 
-void surf_workstation_set_params(surf_resource_t resource, ws_params_t params){
-  get_casted_workstation(resource)->setParams(params);
+void surf_host_set_params(surf_resource_t host, ws_params_t params){
+  get_casted_host(host)->setParams(params);
 }
 
-void surf_vm_workstation_destroy(surf_resource_t resource){
-  /* ind_phys_workstation equals to smx_host_t */
-  //surf_resource_t ind_vm_workstation = xbt_lib_get_elm_or_null(host_lib, getName());
-
+void surf_vm_destroy(surf_resource_t resource){
   /* Before clearing the entries in host_lib, we have to pick up resources. */
   CpuPtr cpu = get_casted_cpu(resource);
-  WorkstationVMPtr vm = get_casted_vm_workstation(resource);
+  VMPtr vm = get_casted_vm(resource);
   RoutingEdgePtr routing = get_casted_routing(resource);
   char* name = xbt_dict_get_elm_key(resource);
   /* We deregister objects from host_lib, without invoking the freeing callback
@@ -466,7 +463,7 @@ void surf_vm_workstation_destroy(surf_resource_t resource){
    */
   xbt_lib_unset(host_lib, name, SURF_CPU_LEVEL, 0);
   xbt_lib_unset(host_lib, name, ROUTING_HOST_LEVEL, 0);
-  xbt_lib_unset(host_lib, name, SURF_WKS_LEVEL, 0);
+  xbt_lib_unset(host_lib, name, SURF_HOST_LEVEL, 0);
 
   /* TODO: comment out when VM storage is implemented. */
   // xbt_lib_unset(host_lib, name, SURF_STORAGE_LEVEL, 0);
@@ -476,36 +473,36 @@ void surf_vm_workstation_destroy(surf_resource_t resource){
   delete routing;
 }
 
-void surf_vm_workstation_suspend(surf_resource_t resource){
-  get_casted_vm_workstation(resource)->suspend();
+void surf_vm_suspend(surf_resource_t vm){
+  get_casted_vm(vm)->suspend();
 }
 
-void surf_vm_workstation_resume(surf_resource_t resource){
-  get_casted_vm_workstation(resource)->resume();
+void surf_vm_resume(surf_resource_t vm){
+  get_casted_vm(vm)->resume();
 }
 
-void surf_vm_workstation_save(surf_resource_t resource){
-  get_casted_vm_workstation(resource)->save();
+void surf_vm_save(surf_resource_t vm){
+  get_casted_vm(vm)->save();
 }
 
-void surf_vm_workstation_restore(surf_resource_t resource){
-  get_casted_vm_workstation(resource)->restore();
+void surf_vm_restore(surf_resource_t vm){
+  get_casted_vm(vm)->restore();
 }
 
-void surf_vm_workstation_migrate(surf_resource_t resource, surf_resource_t ind_vm_ws_dest){
-  get_casted_vm_workstation(resource)->migrate(ind_vm_ws_dest);
+void surf_vm_migrate(surf_resource_t vm, surf_resource_t ind_vm_ws_dest){
+  get_casted_vm(vm)->migrate(ind_vm_ws_dest);
 }
 
-surf_resource_t surf_vm_workstation_get_pm(surf_resource_t resource){
-  return get_casted_vm_workstation(resource)->getPm();
+surf_resource_t surf_vm_get_pm(surf_resource_t vm){
+  return get_casted_vm(vm)->getPm();
 }
 
-void surf_vm_workstation_set_bound(surf_resource_t resource, double bound){
-  return get_casted_vm_workstation(resource)->setBound(bound);
+void surf_vm_set_bound(surf_resource_t vm, double bound){
+  return get_casted_vm(vm)->setBound(bound);
 }
 
-void surf_vm_workstation_set_affinity(surf_resource_t resource, surf_resource_t cpu, unsigned long mask){
-  return get_casted_vm_workstation(resource)->setAffinity(get_casted_cpu(cpu), mask);
+void surf_vm_set_affinity(surf_resource_t vm, surf_resource_t cpu, unsigned long mask){
+  return get_casted_vm(vm)->setAffinity(get_casted_cpu(cpu), mask);
 }
 
 int surf_network_link_is_shared(surf_cpp_resource_t link){
index 71e9355..3b34cc7 100644 (file)
@@ -8,12 +8,12 @@
 #include "surf_interface.hpp"
 #include "network_interface.hpp"
 #include "cpu_interface.hpp"
-#include "workstation_interface.hpp"
-#include "vm_workstation_interface.hpp"
+#include "host_interface.hpp"
 #include "simix/smx_host_private.h"
 #include "surf_routing.hpp"
 #include "simgrid/sg_config.h"
 #include "mc/mc.h"
+#include "vm_interface.hpp"
 
 XBT_LOG_NEW_CATEGORY(surf, "All SURF categories");
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf,
@@ -84,9 +84,9 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf,
   xbt_dynar_free(&hosts);
 }*/
 
-/* model_list_invoke contains only surf_workstation and surf_vm_workstation.
+/* model_list_invoke contains only surf_host and surf_vm.
  * The callback functions of cpu_model and network_model will be called from
- * those of these workstation models. */
+ * those of these host models. */
 xbt_dynar_t model_list = NULL; /* for destroying all models correctly */
 xbt_dynar_t model_list_invoke = NULL;  /* for invoking callbacks */
 
@@ -150,22 +150,22 @@ s_surf_model_description_t surf_cpu_model_description[] = {
   {NULL, NULL,  NULL}      /* this array must be NULL terminated */
 };
 
-s_surf_model_description_t surf_workstation_model_description[] = {
+s_surf_model_description_t surf_host_model_description[] = {
   {"default",
-   "Default workstation model. Currently, CPU:Cas01 and network:LV08 (with cross traffic enabled)",
-   surf_workstation_model_init_current_default},
+   "Default host model. Currently, CPU:Cas01 and network:LV08 (with cross traffic enabled)",
+   surf_host_model_init_current_default},
   {"compound",
-   "Workstation model that is automatically chosen if you change the network and CPU models",
-   surf_workstation_model_init_compound},
-  {"ptask_L07", "Workstation model somehow similar to Cas01+CM02 but allowing parallel tasks",
-   surf_workstation_model_init_ptask_L07},
+   "Host model that is automatically chosen if you change the network and CPU models",
+   surf_host_model_init_compound},
+  {"ptask_L07", "Host model somehow similar to Cas01+CM02 but allowing parallel tasks",
+   surf_host_model_init_ptask_L07},
   {NULL, NULL, NULL}      /* this array must be NULL terminated */
 };
 
-s_surf_model_description_t surf_vm_workstation_model_description[] = {
+s_surf_model_description_t surf_vm_model_description[] = {
   {"default",
-   "Default vm workstation model.",
-   surf_vm_workstation_model_init_HL13},
+   "Default vm model.",
+   surf_vm_model_init_HL13},
   {NULL, NULL, NULL}      /* this array must be NULL terminated */
 };
 
@@ -375,9 +375,9 @@ static XBT_INLINE void surf_link_free(void *r)
   delete static_cast<NetworkLinkPtr>(r);
 }
 
-static XBT_INLINE void surf_workstation_free(void *r)
+static XBT_INLINE void surf_host_free(void *r)
 {
-  delete static_cast<WorkstationPtr>(r);
+  delete static_cast<HostPtr>(r);
 }
 
 static XBT_INLINE void surf_storage_free(void *r)
@@ -410,7 +410,7 @@ void surf_init(int *argc, char **argv)
 
   XBT_DEBUG("Add SURF levels");
   SURF_CPU_LEVEL = xbt_lib_add_level(host_lib,surf_cpu_free);
-  SURF_WKS_LEVEL = xbt_lib_add_level(host_lib,surf_workstation_free);
+  SURF_HOST_LEVEL = xbt_lib_add_level(host_lib,surf_host_free);
   SURF_LINK_LEVEL = xbt_lib_add_level(link_lib,surf_link_free);
   SURF_STORAGE_LEVEL = xbt_lib_add_level(storage_lib,surf_storage_free);
 
index 9100182..8b61329 100644 (file)
@@ -404,7 +404,7 @@ public:
    *
    * @param model The Model associated to this Action
    * @param cost The cost of the Action
-   * @param failed If the action is impossible (e.g.: execute something on a switched off workstation)
+   * @param failed If the action is impossible (e.g.: execute something on a switched off host)
    */
   Action(ModelPtr model, double cost, bool failed);
 
@@ -413,7 +413,7 @@ public:
    *
    * @param model The Model associated to this Action
    * @param cost The cost of the Action
-   * @param failed If the action is impossible (e.g.: execute something on a switched off workstation)
+   * @param failed If the action is impossible (e.g.: execute something on a switched off host)
    * @param var The lmm variable associated to this Action if it is part of a LMM component
    */
   Action(ModelPtr model, double cost, bool failed, lmm_variable_t var);
index e01bd36..de408ff 100644 (file)
 
 /**
  * @ingroup SURF_build_api
- * @brief A library containing all known workstations
+ * @brief A library containing all known hosts
  */
 xbt_lib_t host_lib;
 
 int ROUTING_HOST_LEVEL;         //Routing level
 int SURF_CPU_LEVEL;             //Surf cpu level
-int SURF_WKS_LEVEL;             //Surf workstation level
+int SURF_HOST_LEVEL;            //Surf host level
 int SIMIX_HOST_LEVEL;           //Simix host level
 int SIMIX_STORAGE_LEVEL;        //Simix storage level
 int MSG_HOST_LEVEL;             //Msg host level
@@ -55,7 +55,7 @@ static xbt_dict_t random_value = NULL;
 
 /** @brief Retrieve a routing edge from its name
  *
- * Routing edges are either CPU/workstation and routers, whatever
+ * Routing edges are either host and routers, whatever
  */
 RoutingEdgePtr sg_routing_edge_by_name_or_null(const char *name) {
   RoutingEdgePtr net_elm = (RoutingEdgePtr) xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL);
similarity index 75%
rename from src/surf/vm_workstation_hl13.cpp
rename to src/surf/vm_hl13.cpp
index 725b313..d567fc5 100644 (file)
@@ -4,15 +4,15 @@
 /* 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 "vm_workstation_hl13.hpp"
 #include "cpu_cas01.hpp"
+#include "vm_hl13.hpp"
 
-XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_vm_workstation);
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_vm);
 
-void surf_vm_workstation_model_init_HL13(void){
+void surf_vm_model_init_HL13(void){
   if (surf_cpu_model_vm) {
-    surf_vm_workstation_model = new WorkstationVMHL13Model();
-    ModelPtr model = surf_vm_workstation_model;
+    surf_vm_model = new VMHL13Model();
+    ModelPtr model = surf_vm_model;
 
     xbt_dynar_push(model_list, &model);
     xbt_dynar_push(model_list_invoke, &model);
@@ -23,26 +23,26 @@ void surf_vm_workstation_model_init_HL13(void){
  * Model *
  *********/
 
-WorkstationVMHL13Model::WorkstationVMHL13Model() : WorkstationVMModel() {
+VMHL13Model::VMHL13Model() : VMModel() {
   p_cpuModel = surf_cpu_model_vm;
 }
 
-void WorkstationVMHL13Model::updateActionsState(double /*now*/, double /*delta*/){
+void VMHL13Model::updateActionsState(double /*now*/, double /*delta*/){
   return;
 }
 
-ActionPtr WorkstationVMHL13Model::communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate){
+ActionPtr VMHL13Model::communicate(HostPtr src, HostPtr dst, double size, double rate){
   return surf_network_model->communicate(src->p_netElm, dst->p_netElm, size, rate);
 }
 
 /* ind means ''indirect'' that this is a reference on the whole dict_elm
  * structure (i.e not on the surf_resource_private infos) */
 
-WorkstationVMPtr WorkstationVMHL13Model::createWorkstationVM(const char *name, surf_resource_t ind_phys_workstation)
+VMPtr VMHL13Model::createVM(const char *name, surf_resource_t host_PM)
 {
-  WorkstationVMHL13Ptr ws = new WorkstationVMHL13(this, name, NULL, ind_phys_workstation);
+  VMHL13Ptr ws = new VMHL13(this, name, NULL, host_PM);
 
-  xbt_lib_set(host_lib, name, SURF_WKS_LEVEL, ws);
+  xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, ws);
 
   /* TODO:
    * - check how network requests are scheduled between distinct processes competing for the same card.
@@ -62,7 +62,7 @@ static inline double get_solved_value(CpuActionPtr cpu_action)
 // const double virt_overhead = 0.95;
 const double virt_overhead = 1;
 
-double WorkstationVMHL13Model::shareResources(double now)
+double VMHL13Model::shareResources(double now)
 {
   /* TODO: udpate action's cost with the total cost of processes on the VM. */
 
@@ -70,11 +70,11 @@ double WorkstationVMHL13Model::shareResources(double now)
   /* 0. Make sure that we already calculated the resource share at the physical
    * machine layer. */
   {
-    _XBT_GNUC_UNUSED ModelPtr ws_model = surf_workstation_model;
-    _XBT_GNUC_UNUSED ModelPtr vm_ws_model = surf_vm_workstation_model;
+    _XBT_GNUC_UNUSED ModelPtr ws_model = surf_host_model;
+    _XBT_GNUC_UNUSED ModelPtr vm_ws_model = surf_vm_model;
     _XBT_GNUC_UNUSED unsigned int index_of_pm_ws_model = xbt_dynar_search(model_list_invoke, &ws_model);
     _XBT_GNUC_UNUSED unsigned int index_of_vm_ws_model = xbt_dynar_search(model_list_invoke, &vm_ws_model);
-    xbt_assert((index_of_pm_ws_model < index_of_vm_ws_model), "Cannot assume surf_workstation_model comes before");
+    xbt_assert((index_of_pm_ws_model < index_of_vm_ws_model), "Cannot assume surf_host_model comes before");
 
     /* Another option is that we call sub_ws->share_resource() here. The
      * share_resource() function has no side-effect. We can call it here to
@@ -107,13 +107,13 @@ double WorkstationVMHL13Model::shareResources(double now)
    **/
 
   /* iterate for all virtual machines */
-  for (WorkstationVMModel::vm_list_t::iterator iter =
-         WorkstationVMModel::ws_vms.begin();
-       iter !=  WorkstationVMModel::ws_vms.end(); ++iter) {
+  for (VMModel::vm_list_t::iterator iter =
+         VMModel::ws_vms.begin();
+       iter !=  VMModel::ws_vms.end(); ++iter) {
 
-    WorkstationVMPtr ws_vm = &*iter;
+    VMPtr ws_vm = &*iter;
     CpuPtr cpu = ws_vm->p_cpu;
-    xbt_assert(cpu, "cpu-less workstation");
+    xbt_assert(cpu, "cpu-less host");
 
     double solved_value = get_solved_value(ws_vm->p_action);
     XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value,
@@ -152,13 +152,13 @@ double WorkstationVMHL13Model::shareResources(double now)
   /* FIXME: 3. do we have to re-initialize our cpu_action object? */
 #if 0
   /* iterate for all virtual machines */
-  for (WorkstationVMModel::vm_list_t::iterator iter =
-         WorkstationVMModel::ws_vms.begin();
-       iter !=  WorkstationVMModel::ws_vms.end(); ++iter) {
+  for (VMModel::vm_list_t::iterator iter =
+         VMModel::ws_vms.begin();
+       iter !=  VMModel::ws_vms.end(); ++iter) {
 
     {
 #if 0
-      WorkstationVM2013Ptr ws_vm2013 = static_cast<WorkstationVM2013Ptr>(&*iter);
+      VM2013Ptr ws_vm2013 = static_cast<VM2013Ptr>(&*iter);
       XBT_INFO("cost %f remains %f start %f finish %f", ws_vm2013->cpu_action->cost,
           ws_vm2013->cpu_action->remains,
           ws_vm2013->cpu_action->start,
@@ -181,32 +181,32 @@ double WorkstationVMHL13Model::shareResources(double now)
   return ret;
 }
 
-ActionPtr WorkstationVMHL13Model::executeParallelTask(int workstation_nb,
-                                        void **workstation_list,
+ActionPtr VMHL13Model::executeParallelTask(int host_nb,
+                                        void **host_list,
                                         double *flops_amount,
                                         double *bytes_amount,
                                         double rate){
 #define cost_or_zero(array,pos) ((array)?(array)[pos]:0.0)
-  if ((workstation_nb == 1)
+  if ((host_nb == 1)
       && (cost_or_zero(bytes_amount, 0) == 0.0))
-    return ((WorkstationCLM03Ptr)workstation_list[0])->execute(flops_amount[0]);
-  else if ((workstation_nb == 1)
+    return ((HostCLM03Ptr)host_list[0])->execute(flops_amount[0]);
+  else if ((host_nb == 1)
            && (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)
+    return communicate((HostCLM03Ptr)host_list[0], (HostCLM03Ptr)host_list[0],bytes_amount[0], rate);
+  else if ((host_nb == 2)
              && (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++) {
+    for (i = 0; i < host_nb * host_nb; i++) {
       if (cost_or_zero(bytes_amount, i) > 0.0) {
         nb++;
         value = cost_or_zero(bytes_amount, i);
       }
     }
     if (nb == 1)
-      return communicate((WorkstationCLM03Ptr)workstation_list[0], (WorkstationCLM03Ptr)workstation_list[1],value, rate);
+      return communicate((HostCLM03Ptr)host_list[0], (HostCLM03Ptr)host_list[1],value, rate);
   }
 #undef cost_or_zero
 
@@ -218,11 +218,11 @@ ActionPtr WorkstationVMHL13Model::executeParallelTask(int workstation_nb,
  * Resource *
  ************/
 
-WorkstationVMHL13::WorkstationVMHL13(WorkstationVMModelPtr model, const char* name, xbt_dict_t props,
-                                                  surf_resource_t ind_phys_workstation)
- : WorkstationVM(model, name, props, NULL, NULL)
+VMHL13::VMHL13(VMModelPtr model, const char* name, xbt_dict_t props,
+                                                  surf_resource_t host_PM)
+ : VM(model, name, props, NULL, NULL)
 {
-  WorkstationPtr sub_ws = static_cast<WorkstationPtr>(surf_workstation_resource_priv(ind_phys_workstation));
+  HostPtr sub_ws = static_cast<HostPtr>(surf_host_resource_priv(host_PM));
 
   /* Currently, we assume a VM has no storage. */
   p_storage = NULL;
@@ -241,7 +241,7 @@ WorkstationVMHL13::WorkstationVMHL13(WorkstationVMModelPtr model, const char* na
 
   // //// CPU  RELATED STUFF ////
   // Roughly, create a vcpu resource by using the values of the sub_cpu one.
-  CpuCas01Ptr sub_cpu = static_cast<CpuCas01Ptr>(surf_cpu_resource_priv(ind_phys_workstation));
+  CpuCas01Ptr sub_cpu = static_cast<CpuCas01Ptr>(surf_cpu_resource_priv(host_PM));
 
   /* We can assume one core and cas01 cpu for the first step.
    * Do xbt_lib_set(host_lib, name, SURF_CPU_LEVEL, cpu) if you get the resource. */
@@ -257,17 +257,10 @@ WorkstationVMHL13::WorkstationVMHL13(WorkstationVMModelPtr model, const char* na
       NULL);                       // host->properties,
 
   /* We create cpu_action corresponding to a VM process on the host operating system. */
-  /* FIXME: TODO: we have to peridocally input GUESTOS_NOISE to the system? how ? */
-  // vm_ws->cpu_action = surf_cpu_model_pm->extension.cpu.execute(ind_phys_workstation, GUESTOS_NOISE);
+  /* FIXME: TODO: we have to periodically input GUESTOS_NOISE to the system? how ? */
+  // vm_ws->cpu_action = surf_cpu_model_pm->extension.cpu.execute(host_PM, GUESTOS_NOISE);
   p_action = sub_cpu->execute(0);
 
-  /* The SURF_WKS_LEVEL at host_lib saves workstation_CLM03 objects. Please
-   * note workstation_VM2013 objects, inheriting the workstation_CLM03
-   * structure, are also saved there.
-   *
-   * If you want to get a workstation_VM2013 object from host_lib, see
-   * ws->generic_resouce.model->type first. If it is
-   * SURF_MODEL_TYPE_VM_WORKSTATION, you can cast ws to vm_ws. */
   XBT_INFO("Create VM(%s)@PM(%s) with %ld mounted disks", name, sub_ws->getName(), xbt_dynar_length(p_storage));
 }
 
@@ -275,45 +268,45 @@ WorkstationVMHL13::WorkstationVMHL13(WorkstationVMModelPtr model, const char* na
  * A physical host does not disappear in the current SimGrid code, but a VM may
  * disappear during a simulation.
  */
-WorkstationVMHL13::~WorkstationVMHL13()
+VMHL13::~VMHL13()
 {
   /* Free the cpu_action of the VM. */
   _XBT_GNUC_UNUSED int ret = p_action->unref();
   xbt_assert(ret == 1, "Bug: some resource still remains");
 }
 
-void WorkstationVMHL13::updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) {
+void VMHL13::updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) {
   THROW_IMPOSSIBLE;             /* This model does not implement parallel tasks */
 }
 
-bool WorkstationVMHL13::isUsed() {
+bool VMHL13::isUsed() {
   THROW_IMPOSSIBLE;             /* This model does not implement parallel tasks */
   return -1;
 }
 
-e_surf_resource_state_t WorkstationVMHL13::getState()
+e_surf_resource_state_t VMHL13::getState()
 {
   return (e_surf_resource_state_t) p_currentState;
 }
 
-void WorkstationVMHL13::setState(e_surf_resource_state_t state)
+void VMHL13::setState(e_surf_resource_state_t state)
 {
   p_currentState = (e_surf_vm_state_t) state;
 }
 
-void WorkstationVMHL13::suspend()
+void VMHL13::suspend()
 {
   p_action->suspend();
   p_currentState = SURF_VM_STATE_SUSPENDED;
 }
 
-void WorkstationVMHL13::resume()
+void VMHL13::resume()
 {
   p_action->resume();
   p_currentState = SURF_VM_STATE_RUNNING;
 }
 
-void WorkstationVMHL13::save()
+void VMHL13::save()
 {
   p_currentState = SURF_VM_STATE_SAVING;
 
@@ -322,7 +315,7 @@ void WorkstationVMHL13::save()
   p_currentState = SURF_VM_STATE_SAVED;
 }
 
-void WorkstationVMHL13::restore()
+void VMHL13::restore()
 {
   p_currentState = SURF_VM_STATE_RESTORING;
 
@@ -334,10 +327,10 @@ void WorkstationVMHL13::restore()
 /*
  * Update the physical host of the given VM
  */
-void WorkstationVMHL13::migrate(surf_resource_t ind_dst_pm)
+void VMHL13::migrate(surf_resource_t ind_dst_pm)
 {
-   /* ind_phys_workstation equals to smx_host_t */
-   WorkstationPtr ws_dst = static_cast<WorkstationPtr>(surf_workstation_resource_priv(ind_dst_pm));
+   /* ind_dst_pm equals to smx_host_t */
+   HostPtr ws_dst = static_cast<HostPtr>(surf_host_resource_priv(ind_dst_pm));
    const char *vm_name = getName();
    const char *pm_name_src = p_subWs->getName();
    const char *pm_name_dst = ws_dst->getName();
@@ -400,11 +393,11 @@ void WorkstationVMHL13::migrate(surf_resource_t ind_dst_pm)
    delete old_net_elm;
 }
 
-void WorkstationVMHL13::setBound(double bound){
+void VMHL13::setBound(double bound){
  p_action->setBound(bound);
 }
 
-void WorkstationVMHL13::setAffinity(CpuPtr cpu, unsigned long mask){
+void VMHL13::setAffinity(CpuPtr cpu, unsigned long mask){
  p_action->setAffinity(cpu, mask);
 }
 
@@ -412,13 +405,13 @@ void WorkstationVMHL13::setAffinity(CpuPtr cpu, unsigned long mask){
  * A surf level object will be useless in the upper layer. Returning the
  * dict_elm of the host.
  **/
-surf_resource_t WorkstationVMHL13::getPm()
+surf_resource_t VMHL13::getPm()
 {
   return xbt_lib_get_elm_or_null(host_lib, p_subWs->getName());
 }
 
 /* Adding a task to a VM updates the VCPU task on its physical machine. */
-ActionPtr WorkstationVMHL13::execute(double size)
+ActionPtr VMHL13::execute(double size)
 {
   double old_cost = p_action->getCost();
   double new_cost = old_cost + size;
@@ -432,7 +425,7 @@ ActionPtr WorkstationVMHL13::execute(double size)
   return p_cpu->execute(size);
 }
 
-ActionPtr WorkstationVMHL13::sleep(double duration) {
+ActionPtr VMHL13::sleep(double duration) {
   return p_cpu->sleep(duration);
 }
 
similarity index 61%
rename from src/surf/vm_workstation_hl13.hpp
rename to src/surf/vm_hl13.hpp
index c09d5f3..397bac5 100644 (file)
@@ -4,11 +4,11 @@
 /* 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 "vm_workstation_interface.hpp"
-#include "workstation_clm03.hpp"
+#include "host_clm03.hpp"
+#include "vm_interface.hpp"
 
-#ifndef VM_WORKSTATION_HPP_
-#define VM_WORKSTATION_HPP_
+#ifndef SURF_VM_HPP_
+#define SURF_VM_HPP_
 
 #define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
                           // It corresponds to the cost of a VM running no tasks.
  * Classes *
  ***********/
 
-class WorkstationVMHL13Model;
-typedef WorkstationVMHL13Model *WorkstationVMHL13ModelPtr;
+class VMHL13Model;
+typedef VMHL13Model *VMHL13ModelPtr;
 
-class WorkstationVMHL13;
-typedef WorkstationVMHL13 *WorkstationVMHL13Ptr;
+class VMHL13;
+typedef VMHL13 *VMHL13Ptr;
 
 /*********
  * Model *
  *********/
-class WorkstationVMHL13Model : public WorkstationVMModel {
+class VMHL13Model : public VMModel {
 public:
-  WorkstationVMHL13Model();
-  ~WorkstationVMHL13Model(){};
+  VMHL13Model();
+  ~VMHL13Model(){};
 
-  WorkstationVMPtr createWorkstationVM(const char *name, surf_resource_t ind_phys_workstation);
+  VMPtr createVM(const char *name, surf_resource_t host_PM);
   double shareResources(double now);
   void adjustWeightOfDummyCpuActions() {};
-  ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate);
-  ActionPtr executeParallelTask(int workstation_nb,
-                                          void **workstation_list,
+  ActionPtr communicate(HostPtr src, HostPtr dst, double size, double rate);
+  ActionPtr executeParallelTask(int host_nb,
+                                          void **host_list,
                                           double *flops_amount,
                                           double *bytes_amount,
                                           double rate);
@@ -47,10 +47,10 @@ public:
  * Resource *
  ************/
 
-class WorkstationVMHL13 : public WorkstationVM {
+class VMHL13 : public VM {
 public:
-  WorkstationVMHL13(WorkstationVMModelPtr model, const char* name, xbt_dict_t props, surf_resource_t ind_phys_workstation);
-  ~WorkstationVMHL13();
+  VMHL13(VMModelPtr model, const char* name, xbt_dict_t props, surf_resource_t host_PM);
+  ~VMHL13();
 
   void suspend();
   void resume();
@@ -80,4 +80,4 @@ public:
  * Action *
  **********/
 
-#endif /* VM_WORKSTATION_HPP_ */
+#endif /* SURF_VM_HPP_ */
diff --git a/src/surf/vm_interface.cpp b/src/surf/vm_interface.cpp
new file mode 100644 (file)
index 0000000..c72689d
--- /dev/null
@@ -0,0 +1,75 @@
+/* Copyright (c) 2013-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. */
+
+#include "cpu_cas01.hpp"
+#include "vm_interface.hpp"
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_vm, surf,
+                                "Logging specific to the SURF VM module");
+
+VMModelPtr surf_vm_model = NULL;
+
+/*************
+ * Callbacks *
+ *************/
+
+surf_callback(void, VMPtr) VMCreatedCallbacks;
+surf_callback(void, VMPtr) VMDestructedCallbacks;
+surf_callback(void, VMPtr) VMStateChangedCallbacks;
+
+/*********
+ * Model *
+ *********/
+
+VMModel::VMModel() : HostModel("Virtual Machine") {
+  p_cpuModel = surf_cpu_model_vm;
+}
+
+VMModel::vm_list_t VMModel::ws_vms;
+
+/************
+ * Resource *
+ ************/
+
+VM::VM(ModelPtr model, const char *name, xbt_dict_t props,
+                       RoutingEdgePtr netElm, CpuPtr cpu)
+: Host(model, name, props, NULL, netElm, cpu)
+{
+  VMModel::ws_vms.push_back(*this);
+  surf_callback_emit(VMCreatedCallbacks, this);
+}
+
+/*
+ * A physical host does not disapper in the current SimGrid code, but a VM may
+ * disapper during a simulation.
+ */
+VM::~VM()
+{
+  surf_callback_emit(VMDestructedCallbacks, this);
+  VMModel::ws_vms.erase(VMModel::
+                                   vm_list_t::s_iterator_to(*this));
+}
+
+void VM::setState(e_surf_resource_state_t state){
+  Resource::setState(state);
+  surf_callback_emit(VMStateChangedCallbacks, this);
+}
+
+/*
+ * A surf level object will be useless in the upper layer. Returing the
+ * dict_elm of the host.
+ **/
+surf_resource_t VM::getPm()
+{
+  return xbt_lib_get_elm_or_null(host_lib, p_subWs->getName());
+}
+
+/**********
+ * Action *
+ **********/
+
+//FIME:: handle action cancel
+
diff --git a/src/surf/vm_interface.hpp b/src/surf/vm_interface.hpp
new file mode 100644 (file)
index 0000000..a8ddce8
--- /dev/null
@@ -0,0 +1,156 @@
+/* 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. */
+
+#include "host_interface.hpp"
+
+#ifndef VM_INTERFACE_HPP_
+#define VM_INTERFACE_HPP_
+
+#define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
+                          // It corresponds to the cost of a VM running no tasks.
+
+/***********
+ * Classes *
+ ***********/
+
+class VMModel;
+typedef VMModel *VMModelPtr;
+
+class VM;
+typedef VM *VMPtr;
+
+class VMLmm;
+typedef VMLmm *VMLmmPtr;
+
+/*************
+ * Callbacks *
+ *************/
+
+/** @ingroup SURF_callbacks
+ * @brief Callbacks handler which emit the callbacks after VM creation *
+ * @details Callback functions have the following signature: `void(VMPtr)`
+ */
+extern surf_callback(void, VMPtr) VMCreatedCallbacks;
+
+/** @ingroup SURF_callbacks
+ * @brief Callbacks handler which emit the callbacks after VM destruction *
+ * @details Callback functions have the following signature: `void(VMPtr)`
+ */
+extern surf_callback(void, VMPtr) VMDestructedCallbacks;
+
+/** @ingroup SURF_callbacks
+ * @brief Callbacks handler which emit the callbacks after VM State changed *
+ * @details Callback functions have the following signature: `void(VMActionPtr)`
+ */
+extern surf_callback(void, VMPtr) VMStateChangedCallbacks;
+
+/*********
+ * Model *
+ *********/
+/** @ingroup SURF_vm_interface
+ * @brief SURF VM model interface class
+ * @details A model is an object which handle the interactions between its Resources and its Actions
+ */
+class VMModel : public HostModel {
+public:
+  VMModel();
+  ~VMModel(){};
+
+  HostPtr createHost(const char *name){DIE_IMPOSSIBLE;}
+
+  /**
+   * @brief Create a new VM
+   *
+   * @param name The name of the new VM
+   * @param host_PM The real machine hosting the VM
+   *
+   */
+  virtual VMPtr createVM(const char *name, surf_resource_t host_PM)=0;
+  void adjustWeightOfDummyCpuActions() {};
+
+  typedef boost::intrusive::list<VM,
+                                 boost::intrusive::constant_time_size<false> >
+          vm_list_t;
+  static vm_list_t ws_vms;
+};
+
+/************
+ * Resource *
+ ************/
+
+/** @ingroup SURF_vm_interface
+ * @brief SURF VM interface class
+ * @details A VM represent a virtual machine
+ */
+class VM : public Host,
+           public boost::intrusive::list_base_hook<> {
+public:
+  /**
+   * @brief VM constructor
+   *
+   * @param model VMModel associated to this VM
+   * @param name The name of the VM
+   * @param props Dictionary of properties associated to this VM
+   * @param netElm The RoutingEdge associated to this VM
+   * @param cpu The Cpu associated to this VM
+   */
+  VM(ModelPtr model, const char *name, xbt_dict_t props,
+                       RoutingEdgePtr netElm, CpuPtr cpu);
+
+  /**
+   * @brief WdorkstationVM destructor
+   */
+  ~VM();
+
+  void setState(e_surf_resource_state_t state);
+
+  /**
+   * @brief Suspend the VM
+   */
+  virtual void suspend()=0;
+
+  /**
+   * @brief Resume the VM
+   */
+  virtual void resume()=0;
+
+  /**
+   * @brief Save the VM (Not yet implemented)
+   */
+  virtual void save()=0;
+
+  /**
+   * @brief Restore the VM (Not yet implemented)
+   */
+  virtual void restore()=0;
+
+  /**
+   * @brief Migrate the VM to the destination host
+   *
+   * @param ind_vm_ws_dest The destination host
+   */
+  virtual void migrate(surf_resource_t ind_vm_ws_dest)=0;
+
+  /**
+   * @brief Get the physical machine hosting the VM
+   * @return The physical machine hosting the VM
+   */
+  virtual surf_resource_t getPm()=0;
+
+  virtual void setBound(double bound)=0;
+  virtual void setAffinity(CpuPtr cpu, unsigned long mask)=0;
+
+  /* The vm object of the lower layer */
+  CpuActionPtr p_action;
+  HostPtr p_subWs;  // Pointer to the ''host'' OS
+  e_surf_vm_state_t p_currentState;
+};
+
+/**********
+ * Action *
+ **********/
+
+#endif /* VM_INTERFACE_HPP_ */
diff --git a/src/surf/vm_workstation_interface.cpp b/src/surf/vm_workstation_interface.cpp
deleted file mode 100644 (file)
index 688ad12..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (c) 2013-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. */
-
-#include "vm_workstation_interface.hpp"
-#include "cpu_cas01.hpp"
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_vm_workstation, surf,
-                                "Logging specific to the SURF VM workstation module");
-
-WorkstationVMModelPtr surf_vm_workstation_model = NULL;
-
-/*************
- * Callbacks *
- *************/
-
-surf_callback(void, WorkstationVMPtr) workstationVMCreatedCallbacks;
-surf_callback(void, WorkstationVMPtr) workstationVMDestructedCallbacks;
-surf_callback(void, WorkstationVMPtr) workstationVMStateChangedCallbacks;
-
-/*********
- * Model *
- *********/
-
-WorkstationVMModel::WorkstationVMModel() : WorkstationModel("Virtual Workstation") {
-  p_cpuModel = surf_cpu_model_vm;
-}
-
-WorkstationVMModel::vm_list_t WorkstationVMModel::ws_vms;
-
-/************
- * Resource *
- ************/
-
-WorkstationVM::WorkstationVM(ModelPtr model, const char *name, xbt_dict_t props,
-                       RoutingEdgePtr netElm, CpuPtr cpu)
-: Workstation(model, name, props, NULL, netElm, cpu)
-{
-  WorkstationVMModel::ws_vms.push_back(*this);
-  surf_callback_emit(workstationVMCreatedCallbacks, this);
-}
-
-/*
- * A physical host does not disapper in the current SimGrid code, but a VM may
- * disapper during a simulation.
- */
-WorkstationVM::~WorkstationVM()
-{
-  surf_callback_emit(workstationVMDestructedCallbacks, this);
-  WorkstationVMModel::ws_vms.erase(WorkstationVMModel::
-                                   vm_list_t::s_iterator_to(*this));
-}
-
-void WorkstationVM::setState(e_surf_resource_state_t state){
-  Resource::setState(state);
-  surf_callback_emit(workstationVMStateChangedCallbacks, this);
-}
-
-/*
- * A surf level object will be useless in the upper layer. Returing the
- * dict_elm of the host.
- **/
-surf_resource_t WorkstationVM::getPm()
-{
-  return xbt_lib_get_elm_or_null(host_lib, p_subWs->getName());
-}
-
-/**********
- * Action *
- **********/
-
-//FIME:: handle action cancel
-
diff --git a/src/surf/vm_workstation_interface.hpp b/src/surf/vm_workstation_interface.hpp
deleted file mode 100644 (file)
index 4479a7f..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/* Copyright (c) 2004-2014. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "workstation_interface.hpp"
-
-#ifndef VM_WORKSTATION_INTERFACE_HPP_
-#define VM_WORKSTATION_INTERFACE_HPP_
-
-#define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
-                          // It corresponds to the cost of a VM running no tasks.
-
-/***********
- * Classes *
- ***********/
-
-class WorkstationVMModel;
-typedef WorkstationVMModel *WorkstationVMModelPtr;
-
-class WorkstationVM;
-typedef WorkstationVM *WorkstationVMPtr;
-
-class WorkstationVMLmm;
-typedef WorkstationVMLmm *WorkstationVMLmmPtr;
-
-/*************
- * Callbacks *
- *************/
-
-/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after WorkstationVM creation *
- * @details Callback functions have the following signature: `void(WorkstationVMPtr)`
- */
-extern surf_callback(void, WorkstationVMPtr) workstationVMCreatedCallbacks;
-
-/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after WorkstationVM destruction *
- * @details Callback functions have the following signature: `void(WorkstationVMPtr)`
- */
-extern surf_callback(void, WorkstationVMPtr) workstationVMDestructedCallbacks;
-
-/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after WorkstationVM State changed *
- * @details Callback functions have the following signature: `void(WorkstationVMActionPtr)`
- */
-extern surf_callback(void, WorkstationVMPtr) workstationVMStateChangedCallbacks;
-
-/*********
- * Model *
- *********/
-/** @ingroup SURF_vm_workstation_interface
- * @brief SURF workstation VM model interface class
- * @details A model is an object which handle the interactions between its Resources and its Actions
- */
-class WorkstationVMModel : public WorkstationModel {
-public:
-  /**
-   * @brief WorkstationVMModel consrtuctor
-   */
-  WorkstationVMModel();
-
-    /**
-   * @brief WorkstationVMModel consrtuctor
-   */
-  ~WorkstationVMModel(){};
-
-  WorkstationPtr createWorkstation(const char *name){DIE_IMPOSSIBLE;}
-
-  /**
-   * @brief Create a new WorkstationVM
-   *
-   * @param name The name of the new WorkstationVM
-   * @param ind_phys_workstation The workstation hosting the VM
-   *
-   */
-  virtual WorkstationVMPtr createWorkstationVM(const char *name, surf_resource_t ind_phys_workstation)=0;
-  void adjustWeightOfDummyCpuActions() {};
-
-  typedef boost::intrusive::list<WorkstationVM,
-                                 boost::intrusive::constant_time_size<false> >
-          vm_list_t;
-  static vm_list_t ws_vms;
-};
-
-/************
- * Resource *
- ************/
-
-/** @ingroup SURF_vm_workstation_interface
- * @brief SURF workstation VM interface class
- * @details A workstation VM represent an virtual machine
- */
-class WorkstationVM : public Workstation,
-                      public boost::intrusive::list_base_hook<> {
-public:
-  /**
-   * @brief WorkstationVM consrtructor
-   *
-   * @param model WorkstationModel associated to this Workstation
-   * @param name The name of the Workstation
-   * @param props Dictionary of properties associated to this Workstation
-   * @param netElm The RoutingEdge associated to this Workstation
-   * @param cpu The Cpu associated to this Workstation
-   */
-  WorkstationVM(ModelPtr model, const char *name, xbt_dict_t props,
-                       RoutingEdgePtr netElm, CpuPtr cpu);
-
-  /**
-   * @brief WdorkstationVM destructor
-   */
-  ~WorkstationVM();
-
-  void setState(e_surf_resource_state_t state);
-
-  /**
-   * @brief Suspend the VM
-   */
-  virtual void suspend()=0;
-
-  /**
-   * @brief Resume the VM
-   */
-  virtual void resume()=0;
-
-  /**
-   * @brief Save the VM (Not yet implemented)
-   */
-  virtual void save()=0;
-
-  /**
-   * @brief Restore the VM (Not yet implemented)
-   */
-  virtual void restore()=0;
-
-  /**
-   * @brief Migrate the VM to the destination host
-   *
-   * @param ind_vm_ws_dest The destination host
-   */
-  virtual void migrate(surf_resource_t ind_vm_ws_dest)=0;
-
-  /**
-   * @brief Get the physical machine hosting the VM
-   * @return The physical machine hosting the VM
-   */
-  virtual surf_resource_t getPm()=0;
-
-  virtual void setBound(double bound)=0;
-  virtual void setAffinity(CpuPtr cpu, unsigned long mask)=0;
-
-  /* The workstation object of the lower layer */
-  CpuActionPtr p_action;
-  WorkstationPtr p_subWs;  // Pointer to the ''host'' OS
-  e_surf_vm_state_t p_currentState;
-};
-
-/**********
- * Action *
- **********/
-
-#endif /* VM_WORKSTATION_INTERFACE_HPP_ */
index b32ec96..14b77aa 100644 (file)
@@ -7,8 +7,12 @@
 /* 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 <execinfo.h>
+#include <sys/stat.h>
+
 /* This file is to be included in ex.c, so the following headers are not mandatory, but it's to make sure that eclipse see them too */
 #include "xbt/ex.h"
+#include "xbt/log.h"
 #include "xbt/str.h"
 #include "xbt/module.h"         /* xbt_binary_name */
 #include "xbt_modinter.h"       /* backtrace initialization headers */
index d59086b..f43c987 100644 (file)
@@ -678,6 +678,8 @@ void xbt_dict_postexit(void)
 #include "xbt/ex.h"
 #include "portable.h"
 
+#define PRINTF_STR(a) (a)?:"(null)"
+
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_dict);
 
 XBT_TEST_SUITE("dict", "Dict data container");
index 7cde20d..7547f32 100644 (file)
@@ -738,8 +738,8 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(surf_route_vivaldi);
   XBT_LOG_CONNECT(surf_storage);
   XBT_LOG_CONNECT(surf_trace);
-  XBT_LOG_CONNECT(surf_vm_workstation);
-  XBT_LOG_CONNECT(surf_workstation);
+  XBT_LOG_CONNECT(surf_vm);
+  XBT_LOG_CONNECT(surf_host);
 
 #endif /* simgrid_EXPORTS */
 }
@@ -1137,9 +1137,12 @@ static xbt_log_setting_t _xbt_log_parse_setting(const char *control_string)
     }
 
     if(i<XBT_LOG_STATIC_THRESHOLD){
-     THROWF(arg_error, 0,
-             "Priority: %s is above allowed priority : %s (for debug and trace levels, recompile SimGrid with -Denable_debug=ON)",
-             eq + 1, xbt_log_priority_names[XBT_LOG_STATIC_THRESHOLD]);
+     fprintf(stderr,
+                "Priority '%s' (in setting '%s') is above allowed priority '%s'.\n\n"
+                "Compiling SimGrid with -DNDEBUG forbids the levels 'trace' and 'debug'\n"
+                "while -DNLOG forbids any logging, at any level.",
+             eq + 1, name, xbt_log_priority_names[XBT_LOG_STATIC_THRESHOLD]);
+     exit(1);
     }else if (i < xbt_log_priority_infinite) {
       set->thresh = (e_xbt_log_priority_t) i;
     } else {
index 603e231..98fb871 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef _XBT_MALLOCATOR_PRIVATE_H__
 #define _XBT_MALLOCATOR_PRIVATE_H__
 
+#include <xbt/function_types.h>
+
 typedef struct s_xbt_mallocator {
   void **objects;               /* objects stored by the mallocator and available for the user */
   int current_size;             /* number of objects currently stored */
index d218feb..5c2e2b5 100644 (file)
@@ -65,16 +65,16 @@ int makecontext(ucontext_t * ucp, void (*func) (), int argc, ...)
   }
   
       /* Set the instruction and the stack pointer */
-  #ifdef _I_X86_
+  #if defined(_I_X86_) || defined(__i383) || defined(__i383__)
   ucp->uc_mcontext.Eip = (DWORD) func;
   ucp->uc_mcontext.Esp = (DWORD) sp - sizeof(void*);
-  #elif defined _IA64_
+  #elif defined(_IA64_) || defined(__ia64) || defined(__ia64__)
   #  error "_IA64_"
-  #elif defined _AMD64_
+  #elif defined _AMD64_ || defined(__x86_64) || defined(__x86_64__)
   ucp->uc_mcontext.Rip = (DWORD64) func;
   ucp->uc_mcontext.Rsp = (DWORD64) sp - sizeof(void*);
   #else
-  #error "No architecture defined for Windows build. need either _AMD64_ or _I_X86_"
+  #error "No architecture defined for Windows build.
   #endif
 
       /* Save/Restore the full machine context */ 
@@ -105,4 +105,3 @@ int swapcontext(ucontext_t * oucp, const ucontext_t * ucp)
   }
   return ret;
 }
-
index 2059f2c..c3c588f 100644 (file)
@@ -8,6 +8,15 @@
 /* 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. */
 
+#if defined(WIN32)
+#elif defined(__MACH__) && defined(__APPLE__)
+#include <stdint.h>
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#else
+#include <unistd.h>
+#endif
+
 #include "internal_config.h"
 #include "xbt/sysdep.h"
 #include "xbt/ex.h"
@@ -571,7 +580,7 @@ xbt_os_sem_t xbt_os_sem_init(unsigned int value)
     res->name[13] = '\0';
     res->ps = sem_open(res->name, O_CREAT, 0644, value);
   }
-  if ((res->ps == (sem_t *) SEM_FAILED))
+  if (res->ps == (sem_t *) SEM_FAILED)
     THROWF(system_error, errno, "sem_open() failed: %s", strerror(errno));
 
   /* Remove the name from the semaphore namespace: we never join on it */
@@ -1250,7 +1259,7 @@ int xbt_os_get_numcores(void) {
     SYSTEM_INFO sysinfo;
     GetSystemInfo(&sysinfo);
     return sysinfo.dwNumberOfProcessors;
-#elif MACOS
+#elif defined(__APPLE__) && defined(__MACH__)
     int nm[2];
     size_t len = 4;
     uint32_t count;
index b9912ac..2819255 100644 (file)
@@ -22,7 +22,7 @@
 #define CLOCK_PROCESS_CPUTIME_ID CLOCK_PROF
 #endif
 
-#ifdef MACOS
+#if defined(__APPLE__) && defined(__MACH__)
 #include <sys/types.h>
 #include <sys/sysctl.h>
 #include <mach/mach_init.h>
@@ -357,10 +357,10 @@ void xbt_os_threadtimer_start(xbt_os_timer_t timer)
   timer->elapse.tv_sec = 0;
   timer->elapse.tv_nsec = 0;
   clock_gettime(CLOCK_THREAD_CPUTIME_ID, &(timer->start));
-#elif defined(HAVE_GETTIMEOFDAY) && defined(MACOS) //attempt for timing of the thread on OSX
+#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__) && defined(__APPLE__)//attempt for timing of the thread on OSX
   timer->elapse.tv_sec = 0;
   timer->elapse.tv_usec = 0;
-  int count = THREAD_BASIC_INFO_COUNT;
+  mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
   thread_basic_info_data_t thi_data;
   thread_basic_info_t thi = &thi_data;
   thread_info(mach_thread_self(), THREAD_BASIC_INFO, (thread_info_t)thi, &count);
@@ -397,10 +397,10 @@ void xbt_os_threadtimer_resume(xbt_os_timer_t timer)
   timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec;
   timer->elapse.tv_nsec += timer->stop.tv_nsec - timer->start.tv_nsec;
   clock_gettime(CLOCK_THREAD_CPUTIME_ID, &(timer->start));
-#elif defined(HAVE_GETTIMEOFDAY) && defined(MACOS)
+#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__) && defined(__APPLE__)
   timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec;
   timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec;
-  int count = THREAD_BASIC_INFO_COUNT;
+  mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
   thread_basic_info_data_t thi_data;
   thread_basic_info_t thi = &thi_data;
   thread_info(mach_thread_self(), THREAD_BASIC_INFO, (thread_info_t)thi, &count);
@@ -436,8 +436,8 @@ void xbt_os_threadtimer_stop(xbt_os_timer_t timer)
 {
 #ifdef HAVE_POSIX_GETTIME
   clock_gettime(CLOCK_THREAD_CPUTIME_ID, &(timer->stop));
-#elif defined(HAVE_GETTIMEOFDAY) && defined(MACOS)
-  int count = THREAD_BASIC_INFO_COUNT;
+#elif defined(HAVE_GETTIMEOFDAY) && defined(__MACH__) && defined(__APPLE__)
+  mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
   thread_basic_info_data_t thi_data;
   thread_basic_info_t thi = &thi_data;
   thread_info(mach_thread_self(), THREAD_BASIC_INFO, (thread_info_t)thi, &count);
index 47ae0ee..52e93b1 100644 (file)
@@ -24,10 +24,10 @@ typedef struct s_replay_reader {
   int linenum;
 } s_xbt_replay_reader_t;
 
-FILE *action_fp;
+FILE *xbt_action_fp;
 
-xbt_dict_t action_funs;
-xbt_dict_t action_queues;
+xbt_dict_t xbt_action_funs = NULL;
+xbt_dict_t xbt_action_queues = NULL;
 
 static char *action_line = NULL;
 static size_t action_len = 0;
@@ -115,7 +115,7 @@ void xbt_replay_reader_free(xbt_replay_reader_t *reader)
 void xbt_replay_action_register(const char *action_name, action_fun function)
 {
   char* lowername = str_tolower (action_name);
-  xbt_dict_set(action_funs, lowername, function, NULL);
+  xbt_dict_set(xbt_action_funs, lowername, function, NULL);
   xbt_free(lowername);
 }
 
@@ -127,22 +127,32 @@ void xbt_replay_action_register(const char *action_name, action_fun function)
 void xbt_replay_action_unregister(const char *action_name)
 {
   char* lowername = str_tolower (action_name);
-  xbt_dict_remove(action_funs, lowername);
+  xbt_dict_remove(xbt_action_funs, lowername);
   xbt_free(lowername);
 }
 
-void _xbt_replay_action_init(void)
+/** @brief Initializes the replay mechanism, and returns true if (and only if) it was necessary
+ *
+ * It returns false if it was already done by another process.
+ */
+int _xbt_replay_action_init(void)
 {
+  if (xbt_action_funs)
+         return 0;
   is_replay_active = 1;
-  action_funs = xbt_dict_new_homogeneous(NULL);
-  action_queues = xbt_dict_new_homogeneous(NULL);
+  xbt_action_funs = xbt_dict_new_homogeneous(NULL);
+  xbt_action_queues = xbt_dict_new_homogeneous(NULL);
+  return 1;
 }
 
 void _xbt_replay_action_exit(void)
 {
-  xbt_dict_free(&action_queues);
-  xbt_dict_free(&action_funs);
+  xbt_dict_free(&xbt_action_queues);
+  xbt_dict_free(&xbt_action_funs);
   free(action_line);
+  xbt_action_queues = NULL;
+  xbt_action_funs = NULL;
+  action_line = NULL;
 }
 
 /**
@@ -156,12 +166,12 @@ int xbt_replay_action_runner(int argc, char *argv[])
 {
   int i;
   xbt_ex_t e;
-  if (action_fp) {              // A unique trace file
+  if (xbt_action_fp) {              // A unique trace file
     char **evt;
     while ((evt = action_get_action(argv[0]))) {
       char* lowername = str_tolower (evt[1]);
       action_fun function =
-        (action_fun)xbt_dict_get(action_funs, lowername);
+        (action_fun)xbt_dict_get(xbt_action_funs, lowername);
       xbt_free(lowername);
       TRY{
         function((const char **)evt);
@@ -186,7 +196,7 @@ int xbt_replay_action_runner(int argc, char *argv[])
     while ((evt=xbt_replay_reader_get(reader))) {
       if (!strcmp(argv[0],evt[0])) {
         char* lowername = str_tolower (evt[1]);
-        action_fun function = (action_fun)xbt_dict_get(action_funs, lowername);
+        action_fun function = (action_fun)xbt_dict_get(xbt_action_funs, lowername);
         xbt_free(lowername);
         TRY{
           function(evt);
@@ -213,15 +223,15 @@ static char **action_get_action(char *name)
   xbt_dynar_t evt = NULL;
   char *evtname = NULL;
 
-  xbt_dynar_t myqueue = xbt_dict_get_or_null(action_queues, name);
+  xbt_dynar_t myqueue = xbt_dict_get_or_null(xbt_action_queues, name);
   if (myqueue == NULL || xbt_dynar_is_empty(myqueue)) {      // nothing stored for me. Read the file further
 
-    if (action_fp == NULL) {    // File closed now. There's nothing more to read. I'm out of here
+    if (xbt_action_fp == NULL) {    // File closed now. There's nothing more to read. I'm out of here
       goto todo_done;
     }
     // Read lines until I reach something for me (which breaks in loop body)
     // or end of file reached
-    while (xbt_getline(&action_line, &action_len, action_fp) != -1) {
+    while (xbt_getline(&action_line, &action_len, xbt_action_fp) != -1) {
       // cleanup and split the string I just read
       char *comment = strchr(action_line, '#');
       if (comment != NULL)
@@ -240,11 +250,11 @@ static char **action_get_action(char *name)
       } else {
         // Else, I have to store it for the relevant colleague
         xbt_dynar_t otherqueue =
-            xbt_dict_get_or_null(action_queues, evtname);
+            xbt_dict_get_or_null(xbt_action_queues, evtname);
         if (otherqueue == NULL) {       // Damn. Create the queue of that guy
           otherqueue =
               xbt_dynar_new(sizeof(xbt_dynar_t), xbt_dynar_free_voidp);
-          xbt_dict_set(action_queues, evtname, otherqueue, NULL);
+          xbt_dict_set(xbt_action_queues, evtname, otherqueue, NULL);
         }
         xbt_dynar_push(otherqueue, &evt);
       }
@@ -262,7 +272,7 @@ static char **action_get_action(char *name)
 todo_done:
   if (myqueue != NULL) {
     xbt_dynar_free(&myqueue);
-    xbt_dict_remove(action_queues, name);
+    xbt_dict_remove(xbt_action_queues, name);
   }
   return NULL;
 }
index 7747d55..12b0d28 100644 (file)
@@ -4,5 +4,4 @@ $ ../../smpi_script/bin/smpirun -np 16 -platform ${srcdir:=.}/../../examples/pla
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > Walltime = 0.37183
index 7f9719c..5acd204 100644 (file)
@@ -2,24 +2,30 @@ cmake_minimum_required(VERSION 2.6)
 
 set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
 
-add_executable(host_on_off host_on_off.c)
+foreach(x host_on_off host_on_off_wait host_on_off_recv)
+  add_executable(${x} ${x}.c)
+  target_link_libraries(${x} simgrid)
 
-### Add definitions for compile
-target_link_libraries(host_on_off simgrid)
+endforeach()
 
 set(tesh_files
   ${tesh_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off.tesh
-  PARENT_SCOPE
-  )
-set(xml_files
-  ${xml_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_d.xml
+  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_wait.tesh
+  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_recv.tesh
   PARENT_SCOPE
   )
 set(teshsuite_src
   ${teshsuite_src}
   ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_wait.c
+  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_recv.c
+  PARENT_SCOPE
+  )
+
+set(xml_files
+  ${xml_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_d.xml
   PARENT_SCOPE
   )
 set(bin_files
index 530fdd0..62660f9 100644 (file)
@@ -116,7 +116,6 @@ int main(int argc, char *argv[])
   platform_file = argv[1];
   application_file = argv[2];
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
diff --git a/teshsuite/msg/host_on_off/host_on_off_recv.c b/teshsuite/msg/host_on_off/host_on_off_recv.c
new file mode 100644 (file)
index 0000000..9fb3bde
--- /dev/null
@@ -0,0 +1,114 @@
+/* Copyright (c) 2010-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. */
+
+#include <stdio.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 "xbt/ex.h"
+
+/* Create a log channel to have nice outputs. */
+#include "xbt/log.h"
+#include "xbt/asserts.h"
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
+                             "Messages specific for this msg example");
+
+int master(int argc, char *argv[]);
+int slave(int argc, char *argv[]);
+
+static const char* mailbox = "comm";
+
+/** Emitter function  */
+int master(int argc, char *argv[])
+{
+  xbt_ex_t e;
+  TRY {
+    msg_host_t jupiter = MSG_get_host_by_name("Jupiter");
+    
+    XBT_INFO("Master starting");
+    MSG_process_sleep(0.5);
+
+    msg_comm_t comm = NULL;
+    if (1) {
+      msg_task_t task = MSG_task_create("COMM", 0, 100000000, NULL);
+      comm = MSG_task_isend(task, mailbox);
+    }
+
+    if(MSG_process_sleep(0.5)) {
+      XBT_ERROR("Unexpected error while sleeping");
+      return 1;
+    }
+    XBT_INFO("Turning off the slave host");
+    MSG_host_off(jupiter);
+
+    if (comm) {
+      MSG_comm_wait(comm, -1);
+    }
+    XBT_INFO("Master has finished");
+  }
+  CATCH(e) {
+    xbt_die("Exception caught in the master");
+    return 1;
+  }
+  return 0;
+}
+
+/** Receiver function  */
+int slave(int argc, char *argv[])
+{
+  xbt_ex_t e;
+  TRY {
+    XBT_INFO("Slave receiving");
+    msg_task_t task = NULL;
+    msg_error_t error = MSG_task_receive(&(task), mailbox);
+    if (error) {
+      XBT_ERROR("Error while receiving message");
+      return 1;
+    }
+
+    XBT_ERROR("Slave should be off already.");
+    return 1;
+  }
+  CATCH(e) {
+    XBT_ERROR("Exception caught in the slave");
+    return 1;
+  }
+  return 0;
+}
+
+/** Main function */
+int main(int argc, char *argv[])
+{
+  msg_error_t res;
+  const char *platform_file;
+  const char *application_file;
+
+  MSG_init(&argc, argv);
+  if (argc != 3) {
+    printf("Usage: %s platform_file deployment_file\n", argv[0]);
+    printf("example: %s msg_platform.xml msg_deployment.xml\n", argv[0]);
+    exit(1);
+  }
+  platform_file = argv[1];
+  application_file = argv[2];
+
+  {                             /*  Simulation setting */
+    MSG_create_environment(platform_file);
+  }
+  {                             /*   Application deployment */
+    MSG_function_register("master", master);
+    MSG_function_register("slave", slave);
+
+    MSG_launch_application(application_file);
+  }
+  res = MSG_main();
+
+  XBT_INFO("Simulation time %g", MSG_get_clock());
+
+  if (res == MSG_OK)
+    return 0;
+  else
+    return 1;
+}                               /* end_of_main */
diff --git a/teshsuite/msg/host_on_off/host_on_off_recv.tesh b/teshsuite/msg/host_on_off/host_on_off_recv.tesh
new file mode 100644 (file)
index 0000000..782ee41
--- /dev/null
@@ -0,0 +1,6 @@
+$ ./host_on_off_recv ${srcdir:=.}/../../../examples/platforms/small_platform.xml ${srcdir:=.}/host_on_off_d.xml
+> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Master starting
+> [Jupiter:slave:(2) 0.000000] [msg_test/INFO] Slave receiving
+> [Tremblay:master:(1) 1.000000] [msg_test/INFO] Turning off the slave host
+> [Tremblay:master:(1) 1.000000] [msg_test/INFO] Master has finished
+> [1.000000] [msg_test/INFO] Simulation time 1
diff --git a/teshsuite/msg/host_on_off/host_on_off_wait.c b/teshsuite/msg/host_on_off/host_on_off_wait.c
new file mode 100644 (file)
index 0000000..8237bf2
--- /dev/null
@@ -0,0 +1,95 @@
+/* Copyright (c) 2010-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. */
+
+#include <stdio.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 "xbt/ex.h"
+
+/* Create a log channel to have nice outputs. */
+#include "xbt/log.h"
+#include "xbt/asserts.h"
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
+                             "Messages specific for this msg example");
+
+int master(int argc, char *argv[]);
+int slave(int argc, char *argv[]);
+
+/** Emitter function  */
+int master(int argc, char *argv[])
+{
+  xbt_ex_t e;
+  TRY {
+    msg_host_t jupiter = MSG_get_host_by_name("Jupiter");
+    XBT_INFO("Master waiting");
+    if(MSG_process_sleep(1)) {
+      XBT_ERROR("Unexpected error while sleeping");
+      return 1;
+    }
+
+    XBT_INFO("Turning off the slave host");
+    MSG_host_off(jupiter);
+    XBT_INFO("Master has finished");
+  }
+  CATCH(e) {
+    xbt_die("Exception caught in the master");
+    return 1;
+  }
+  return 0;
+}
+
+/** Receiver function  */
+int slave(int argc, char *argv[])
+{
+  xbt_ex_t e;
+  TRY {
+    XBT_INFO("Slave waiting");
+    // TODO, This should really be MSG_HOST_FAILURE
+    MSG_process_sleep(5);
+    XBT_ERROR("Slave should be off already.");
+    return 1;
+  }
+  CATCH(e) {
+    XBT_ERROR("Exception caught in the slave");
+    return 1;
+  }
+  return 0;
+}
+
+/** Main function */
+int main(int argc, char *argv[])
+{
+  msg_error_t res;
+  const char *platform_file;
+  const char *application_file;
+
+  MSG_init(&argc, argv);
+  if (argc != 3) {
+    printf("Usage: %s platform_file deployment_file\n", argv[0]);
+    printf("example: %s msg_platform.xml msg_deployment.xml\n", argv[0]);
+    exit(1);
+  }
+  platform_file = argv[1];
+  application_file = argv[2];
+
+  {                             /*  Simulation setting */
+    MSG_create_environment(platform_file);
+  }
+  {                             /*   Application deployment */
+    MSG_function_register("master", master);
+    MSG_function_register("slave", slave);
+
+    MSG_launch_application(application_file);
+  }
+  res = MSG_main();
+
+  XBT_INFO("Simulation time %g", MSG_get_clock());
+
+  if (res == MSG_OK)
+    return 0;
+  else
+    return 1;
+}                               /* end_of_main */
diff --git a/teshsuite/msg/host_on_off/host_on_off_wait.tesh b/teshsuite/msg/host_on_off/host_on_off_wait.tesh
new file mode 100644 (file)
index 0000000..4071020
--- /dev/null
@@ -0,0 +1,6 @@
+$ ./host_on_off_wait ${srcdir:=.}/../../../examples/platforms/small_platform.xml ${srcdir:=.}/host_on_off_d.xml
+> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Master waiting
+> [Jupiter:slave:(2) 0.000000] [msg_test/INFO] Slave waiting
+> [Tremblay:master:(1) 1.000000] [msg_test/INFO] Turning off the slave host
+> [Tremblay:master:(1) 1.000000] [msg_test/INFO] Master has finished
+> [1.000000] [msg_test/INFO] Simulation time 1
index 959bf5e..d81dfe8 100644 (file)
@@ -104,8 +104,6 @@ int test_launcher(int argc, char *argv[])
   test = 5;
   if (xbt_dynar_search_or_negative(tests, &test)!=-1){
     XBT_INFO("Test 5 (turn off dest during a communication : Create a Process/task to make a communication between Tremblay and Jupiter and turn off Jupiter during the communication");
-    XBT_INFO("Warning! I think this test is completely broken and it was revealed by exception/exception test.");
-    XBT_INFO("At time 20, Jupiter should wake up with a HOST_FAILURE and it gets a TRANSFERT_FAILURE. This is because when turning off Jupiter, its processes are killed, which cancels/destroys the corresponding surf communication instead of canceling a src_ or dst_timeout.");
     MSG_host_on(jupiter);
     MSG_process_sleep(10);
     argvF = xbt_new(char*, 2);
@@ -260,7 +258,6 @@ int main(int argc, char *argv[])
   platform_file = argv[1];
   application_file = argv[2];
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 5881f4d..29d0f3f 100644 (file)
@@ -54,7 +54,6 @@ $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platfor
 > [Tremblay:commRX:(2) 20.000000] [msg_test/INFO]   RX Done
 > [20.000000] [msg_test/INFO] Simulation time 20
 
-# This test is broken:
 $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platform.xml ${srcdir:=.}/host_on_off_processes_d.xml 5 --log=no_loc --log=msg.thresh:error --log=surf_maxmin.thresh:error
 > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 5 (turn off dest during a communication : Create a Process/task to make a communication between Tremblay and Jupiter and turn off Jupiter during the communication
 > [Jupiter:commRX:(2) 10.000000] [msg_test/INFO]   Start RX
@@ -68,7 +67,7 @@ $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platfor
 
 $ ./host_on_off_processes ${srcdir:=.}/../../../examples/platforms/small_platform.xml ${srcdir:=.}/host_on_off_processes_d.xml 6 --log=no_loc --log=msg.thresh:error --log=surf_maxmin.thresh:error
 > [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 6: Turn on Jupiter, assign a VM on Jupiter, launch a process inside the VM, and turn off the node
-> [0.000000] [surf_vm_workstation/INFO] Create VM(vm0)@PM(Jupiter) with 0 mounted disks
+> [0.000000] [surf_vm/INFO] Create VM(vm0)@PM(Jupiter) with 0 mounted disks
 > [vm0:process_daemon:(2) 0.000000] [msg_test/INFO]   Start daemon on vm0 (76296000.000000)
 > [vm0:process_daemon:(2) 0.000000] [msg_test/INFO]   Execute deamon
 > [Jupiter:process_daemonJUPI:(3) 0.000000] [msg_test/INFO]   Start daemon on Jupiter (76296000.000000)
index f69e8ff..6feae39 100644 (file)
@@ -86,7 +86,6 @@ int main(int argc, char *argv[])
   platform_file = argv[1];
   application_file = argv[2];
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 049ab16..afd05a8 100644 (file)
@@ -73,7 +73,6 @@ int main(int argc, char *argv[])
   platform_file = argv[1];
   application_file = argv[2];
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 0ba661d..37cb7e6 100644 (file)
@@ -152,7 +152,6 @@ int main(int argc, char *argv[])
   platform_file = argv[1];
   application_file = argv[2];
 
-  /* MSG_config("workstation/model","KCCFLN05"); */
   {                             /*  Simulation setting */
     MSG_create_environment(platform_file);
   }
index 853cfdd..0a1cf84 100644 (file)
@@ -4,8 +4,8 @@ p c=cycle s=step p=priority h=host
 p Testing trace integration using trace_B.txt and test-hbp1-c0s0-c0s1.xml, test_trace:start == trace_cycle_0_step_0, test_trace:end < trace_cycle_0_step_1
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s0-c0s1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s0-c0s1.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [  0.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -16,8 +16,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1-c0s1-c0s2.xml, test_trace:start == trace_cycle_0_step_1, test_trace:end < trace_cycle_0_step_2
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s1-c0s2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s1-c0s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 10.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -28,8 +28,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1-c0s2-c1s0.xml, test_trace:start == trace_cycle_0_step_2, test_trace:end < trace_cycle_1_step_0
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s2-c1s0.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s2-c1s0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 20.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -40,8 +40,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1-c0s0-c1s0.xml, test_trace:start == trace_cycle_0_step_0, test_trace:end < trace_cycle_1_step_0
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s0-c1s0.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s0-c1s0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [  0.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -52,8 +52,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1-c0s2-c1s1.xml, test_trace:start == trace_cycle_0_step_2, test_trace:end < trace_cycle_1_step_1
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s2-c1s1.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s2-c1s1.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 20.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -64,8 +64,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1-c0s1-c2s2.xml, test_trace:start == trace_cycle_0_step_1, test_trace:end < trace_cycle_2_step_2
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s1-c2s2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c0s1-c2s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 10.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -76,8 +76,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1-c1s1-c1s2.xml, test_trace:start == trace_cycle_1_step_1, test_trace:end < trace_cycle_1_step_2
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c1s1-c1s2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c1s1-c1s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 40.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -88,8 +88,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1-c1s1-c3s2.xml, test_trace:start == trace_cycle_1_step_1, test_trace:end < trace_cycle_3_step_2
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c1s1-c3s2.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1-c1s1-c3s2.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 40.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -100,8 +100,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1.5-hbp1.5.xml, two process with same priority
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1.5-hbp1.5.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1.5-hbp1.5.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 10.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -116,8 +116,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp2.5-hbp1.5.xml, two process with different priority
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp2.5-hbp1.5.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp2.5-hbp1.5.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 10.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -132,8 +132,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp2.5-hbp1.5.xml, two process with different priority
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp2.5-hbp1.5.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp2.5-hbp1.5.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 10.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -148,8 +148,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1.0-hbp1.0-hbp1.0.xml, three process with same priority
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1.0-hbp1.0-hbp1.0.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1.0-hbp1.0-hbp1.0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [  0.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -168,8 +168,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1.0-hbp3.0-hbp4.0.xml, three process with same priority
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1.0-hbp3.0-hbp4.0.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1.0-hbp3.0-hbp4.0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 10.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -188,8 +188,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1.0-hbp3.0-hbp4.0.xml, three process with different priority
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1.0-hbp3.0-hbp4.0.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability.xml ./test-hbp1.0-hbp3.0-hbp4.0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 10.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
@@ -208,8 +208,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/pl
 p Testing trace integration using trace_B.txt and test-hbp1.0-hbp3.0-hbp4.0.xml, three process with different priority (included)
 
 ! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability_included.xml ./test-hbp1.0-hbp3.0-hbp4.0.xml --cfg=workstation/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) Configuration change: Set 'workstation/model' to 'compound'
+$ $SG_TEST_EXENV ${bindir:=.}/test_trace_integration$EXEEXT ../../../examples/platforms/two_hosts_platform_with_availability_included.xml ./test-hbp1.0-hbp3.0-hbp4.0.xml --cfg=host/model:compound --cfg=network/model:CM02 --cfg=cpu/optim:TI --log=simix.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Configuration change: Set 'host/model' to 'compound'
 > [  0.000000] (0:@) Configuration change: Set 'network/model' to 'CM02'
 > [  0.000000] (0:@) Configuration change: Set 'cpu/optim' to 'TI'
 > [ 10.000000] (1:test_trace@Cpu B) Testing the trace integration cpu model: CpuTI
index 14d1b9f..e8458b1 100644 (file)
@@ -2,7 +2,7 @@
 
 $ simdag/availability/availability_test ${srcdir:=.}/simdag/availability/simulacrum_7_hosts.xml --cfg=path:${srcdir:=.}/simdag/availability/ ${srcdir:=.}/../examples/simdag/scheduling/Montage_25.xml --cfg=network/TCP_gamma:4194304 --log=sd_daxparse.thresh:critical
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > Scheduling DAX...
 > Scheduling root to node: Host 26
 > Scheduling ID00000@mProjectPP to node: Host 27
index aaf4bbe..07e3966 100644 (file)
@@ -1,3 +1,3 @@
 $ ${bindir:=.}/basic0 ../../../examples/platforms/two_hosts_platform_shared.xml "--log=root.fmt:[%10.6r]%e%m%n"
-> [  0.000000] surf_workstation_model_init_ptask_L07
+> [  0.000000] surf_host_model_init_ptask_L07
 > [  0.800100] Simulation time: 0.800100
index 9bb0088..b87dc1f 100644 (file)
@@ -1,3 +1,3 @@
 $ ${bindir:=.}/basic1 ../../../examples/platforms/two_hosts_platform_shared.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:@) surf_host_model_init_ptask_L07
 > [ 16.000100] (0:@) Simulation time: 16.000100
index 4455412..069f50f 100644 (file)
@@ -1,3 +1,3 @@
 $ ${bindir:=.}/basic2 ../../../examples/platforms/two_hosts_platform_shared.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:@) surf_host_model_init_ptask_L07
 > [  8.800100] (0:@) Simulation time: 8.800100
index 89cab5e..55b481a 100644 (file)
@@ -1,5 +1,5 @@
 $ ${bindir:=.}/basic3 ../../../examples/platforms/two_hosts_platform_shared.xml "--log=root.fmt:[%10.6r]%e%m%n" --log=sd_kernel.thresh:verbose
-> [  0.000000] surf_workstation_model_init_ptask_L07
+> [  0.000000] surf_host_model_init_ptask_L07
 > [  0.000000] Starting simulation...
 > [  0.000000] Run simulation for -1.000000 seconds
 > [  0.000000] Executing task 'Task Init'
index c0fe501..6d025c3 100644 (file)
@@ -1,5 +1,5 @@
 $ ${bindir:=.}/basic4 ../../../examples/platforms/two_hosts_platform_shared.xml "--log=root.fmt:[%10.6r]%e%m%n" --log=sd_kernel.thresh:verbose
-> [  0.000000] surf_workstation_model_init_ptask_L07
+> [  0.000000] surf_host_model_init_ptask_L07
 > [  0.000000] Starting simulation...
 > [  0.000000] Run simulation for -1.000000 seconds
 > [  0.000000] Executing task 'Task Init'
index 3d42730..906989d 100644 (file)
@@ -1,3 +1,3 @@
 $ ${bindir:=.}/basic5 ../../../examples/platforms/two_hosts_platform_shared.xml "--log=root.fmt:[%10.6r]%e%m%n"
-> [  0.000000] surf_workstation_model_init_ptask_L07
+> [  0.000000] surf_host_model_init_ptask_L07
 > [  0.002500] Simulation time: 0.002500
index 45cee07..721e08e 100644 (file)
@@ -1,3 +1,3 @@
 $ ${bindir:=.}/basic6 ../network/p2p/platform_2p_1sl.xml "--log=root.fmt:[%10.6r]%e%m%n"
-> [  0.000000] surf_workstation_model_init_ptask_L07
+> [  0.000000] surf_host_model_init_ptask_L07
 > [  2.000000] Simulation time: 2.000000
index 0f1ab4b..d5c817e 100644 (file)
@@ -1,5 +1,5 @@
 $ ${bindir:=.}/incomplete ../../../examples/platforms/two_hosts_platform_shared.xml "--log=root.fmt:[%10.6r]%e%m%n"
-> [  0.000000] surf_workstation_model_init_ptask_L07
+> [  0.000000] surf_host_model_init_ptask_L07
 > [  8.000100] Simulation is finished but 3 tasks are still not done
 > [  8.000100] Task C is in SD_NOT_SCHEDULED state
 > [  8.000100] Task B is in SD_SCHEDULABLE state
index c76dc6f..286ff7a 100644 (file)
@@ -3,5 +3,5 @@ p all 2 all test, only fat pipe switch is used concurrently
 ! output sort
 
 $ simdag/network/mxn/test_intra_all2all ${srcdir:=.}/simdag/network/mxn/platform_4p_1switch.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 8
index 581123e..de0811d 100644 (file)
@@ -3,5 +3,5 @@ p sending on different paths test
 ! output sort
 
 $ simdag/network/mxn/test_intra_independent_comm ${srcdir:=.}/simdag/network/mxn/platform_4p_1switch.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 3
index c03d955..72680c4 100644 (file)
@@ -3,5 +3,5 @@ p scatter test
 ! output sort
 
 $ simdag/network/mxn/test_intra_scatter ${srcdir:=.}/simdag/network/mxn/platform_4p_1switch.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 8
index 56a8f75..a51af45 100644 (file)
@@ -3,19 +3,19 @@ p latency check, 1 byte, shared link
 ! output sort
 
 $ simdag/network/p2p/test_latency1 ${srcdir:=.}/simdag/network/p2p/platform_2p_1sl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 1.5
 
 p latency check, 1 byte, fat pipe
 ! output sort
 
 $ simdag/network/p2p/test_latency1 ${srcdir:=.}/simdag/network/p2p/platform_2p_1fl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 1.5
 
 p latency check, 1 byte, link - switch - link
 ! output sort
 
 $ simdag/network/p2p/test_latency1 ${srcdir:=.}/simdag/network/p2p/platform_2p_1switch.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 3
index 5f9718b..7aeb17b 100644 (file)
@@ -3,19 +3,19 @@ p latency check, 2 x 1 byte, same direction, shared link
 ! output sort
 
 $ simdag/network/p2p/test_latency2 ${srcdir:=.}/simdag/network/p2p/platform_2p_1sl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 2.5
 
 p latency check, 2 x 1 byte, same direction, fat pipe
 ! output sort
 
 $ simdag/network/p2p/test_latency2 ${srcdir:=.}/simdag/network/p2p/platform_2p_1fl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 1.5
 
 p latency check, 2 x 1 byte, same direction, link - switch - link
 ! output sort
 
 $ simdag/network/p2p/test_latency2 ${srcdir:=.}/simdag/network/p2p/platform_2p_1switch.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 4
index a601017..c5f3958 100644 (file)
@@ -3,19 +3,19 @@ p latency check, 2 x 1 byte, opposite direction, shared link
 ! output sort
 
 $ simdag/network/p2p/test_latency3 ${srcdir:=.}/simdag/network/p2p/platform_2p_1sl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 2.5
 
 p latency check, 2 x 1 byte, opposite direction, fat pipe
 ! output sort
 
 $ simdag/network/p2p/test_latency3 ${srcdir:=.}/simdag/network/p2p/platform_2p_1fl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 1.5
 
 p latency check, 2 x 1 byte, opposite direction, link - switch - link
 ! output sort
 
 $ simdag/network/p2p/test_latency3 ${srcdir:=.}/simdag/network/p2p/platform_2p_1switch.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 4
index 97b6970..413e25d 100644 (file)
@@ -3,5 +3,5 @@ p latency bounded by large latency link
 ! output sort
 
 $ simdag/network/p2p/test_latency_bound ${srcdir:=.}/simdag/network/p2p/platform_2p_1bb.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 10001.5
index a074913..3ebcb41 100644 (file)
@@ -3,7 +3,7 @@ p Reinitialization test
 ! output sort
 
 $ simdag/network/test_reinit_costs ${srcdir:=.}/simdag/network/platform_2p_1sl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 0
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 1.5
index 6dfdff3..04eaac4 100644 (file)
@@ -2,11 +2,11 @@
 p par task comp only, no comm, homogeneous
 ! output sort
 $ simdag/partask/test_comp_only_par ${srcdir:=.}/simdag/partask/platform_2p_1sl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 1
 
 p par task comp only, no comm, heterogeneous
 ! output sort
 $ simdag/partask/test_comp_only_par ${srcdir:=.}/simdag/partask/platform_2p_1sl_hetero.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 1
index 7c40625..bd31216 100644 (file)
@@ -3,5 +3,5 @@ p seq task comp only, no comm
 
 ! output sort
 $ simdag/partask/test_comp_only_seq ${srcdir:=.}/simdag/partask/platform_2p_1sl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > 1
index ec41c1b..e4918d2 100644 (file)
@@ -1,7 +1,7 @@
 #! ./tesh
 
 $ ${bindir:=.}/basic_link_test one_cluster.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:@) surf_host_model_init_ptask_L07
 > [  0.000000] (0:@) Link number: 12
 > [  0.000000] (0:@) bob_cluster_link_2_UP: latency = 0.00005, bandwidth = 125000000.000000
 > [  0.000000] (0:@) bob_cluster_link_6_UP: latency = 0.00005, bandwidth = 125000000.000000
index 2445d02..bcaa51b 100644 (file)
 ! output sort
 
 $ ${bindir:=.}/basic_parsing_test one_cluster.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 5, link number: 12
 
 $ ${bindir:=.}/basic_parsing_test one_host_availability.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 1
 
 $ ${bindir:=.}/basic_parsing_test one_host_properties.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 1
 
 $ ${bindir:=.}/basic_parsing_test one_host_state_file.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 1
 
 $ ${bindir:=.}/basic_parsing_test one_host_state_off.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 1
 
 $ ${bindir:=.}/basic_parsing_test one_host_state_on.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 1
 
 $ ${bindir:=.}/basic_parsing_test one_host_trace_file.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 1
 
 $ ${bindir:=.}/basic_parsing_test one_host_trace_inside.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 1
 
 $ ${bindir:=.}/basic_parsing_test one_host.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 1
 
 $ ${bindir:=.}/basic_parsing_test one_link_availability.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 2
 
 $ ${bindir:=.}/basic_parsing_test one_link_fatpipe.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 2
 
 $ ${bindir:=.}/basic_parsing_test one_link_shared.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 2
 
 $ ${bindir:=.}/basic_parsing_test one_link_state_file.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 1, link number: 2
 
 $ ${bindir:=.}/basic_parsing_test three_hosts_non_symmetric_route.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 3, link number: 4
 
 $ ${bindir:=.}/basic_parsing_test two_clusters.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 10, link number: 24
 
 $ ${bindir:=.}/basic_parsing_test two_hosts_multi_hop.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 2, link number: 4
 
 $ ${bindir:=.}/basic_parsing_test two_hosts_one_link.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:@) surf_host_model_init_ptask_L07
 > Workstation number: 2, link number: 2
 
 $ ${bindir:=.}/basic_parsing_test ./four_hosts_floyd.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > Workstation number: 4, link number: 5
 
 $ ${bindir:=.}/basic_parsing_test ./four_hosts_floyd_bis.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > Workstation number: 5, link number: 7
 
 $ ${bindir:=.}/basic_parsing_test ./properties.xml
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/optim' to 'TI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '0.000010'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'Vegas'
 > Workstation number: 1, link number: 1
 
 $ ${bindir:=.}/basic_parsing_test ./properties.xml --cfg=cpu/optim:TI
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/optim' to 'TI'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
 > [0.000000] [surf_parse/INFO] The custom configuration 'cpu/optim' is already defined by user!
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '0.000010'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'workstation/model' to 'compound'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'Vegas'
 > Workstation number: 1, link number: 1
 
 $ ${bindir:=.}/basic_parsing_test ./one_cluster_file.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > Workstation number: 2, link number: 6
 
 $ ${bindir:=.}/is_router_test ./test_of_is_router.xml
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > Workstation number: 10, link number: 1, elmts number: 21
 >    - Seen: "host01" is type : 1
 >    - Seen: "host02" is type : 1
index b7436ea..ee7c561 100644 (file)
@@ -3,7 +3,7 @@
 p Testing a bypass ASroute
 ! output sort
 $ ${bindir:=.}/basic_parsing_test ${srcdir:=.}/examples/platforms/bypassASroute.xml FULL_LINK
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > Workstation number: 3, link number: 11
 > Route between 1 and 1
 >   Route size 2
@@ -63,7 +63,7 @@ $ ${bindir:=.}/basic_parsing_test ${srcdir:=.}/examples/platforms/bypassASroute.
 p Testing a bypass route
 
 $ ${bindir:=.}/basic_parsing_test ${srcdir:=.}/examples/platforms/bypassRoute.xml FULL_LINK
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > Workstation number: 4, link number: 10
 > Route between AS_2_host1 and AS_2_host1
 >   Route size 1
index d1b8aa5..9574528 100644 (file)
@@ -2,7 +2,7 @@
 ! output sort
 
 $ ${bindir:=.}/basic_parsing_test one_cluster_fullduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > Workstation number: 5, link number: 12
 > Route between bob3.hamburger.edu and bob3.hamburger.edu
 >   Route size 3
@@ -156,7 +156,7 @@ $ ${bindir:=.}/basic_parsing_test one_cluster_fullduplex.xml FULL_LINK "--log=ro
 >   Route latency = 0.000600, route bandwidth = 125000000.000000
 
 $ ${bindir:=.}/basic_parsing_test two_clusters_symmetric.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > Workstation number: 4, link number: 12
 > Route between bob1.hamburger.edu and bob1.hamburger.edu
 >   Route size 3
@@ -272,7 +272,7 @@ $ ${bindir:=.}/basic_parsing_test two_clusters_symmetric.xml FULL_LINK "--log=ro
 >   Route latency = 0.000600, route bandwidth = 125000000.000000
 
 $ ${bindir:=.}/basic_parsing_test two_hosts_one_link_symmetrical.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > Workstation number: 2, link number: 4
 > Route between alice and alice
 >   Route size 1
@@ -296,7 +296,7 @@ $ ${bindir:=.}/basic_parsing_test two_hosts_one_link_symmetrical.xml FULL_LINK "
 >   Route latency = 0.000015, route bandwidth = 498000000.000000
 
 $ ${bindir:=.}/basic_parsing_test two_hosts_one_link_fullduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > Workstation number: 2, link number: 3
 > Route between alice and alice
 >   Route size 1
@@ -316,7 +316,7 @@ $ ${bindir:=.}/basic_parsing_test two_hosts_one_link_fullduplex.xml FULL_LINK "-
 >   Route latency = 0.000015, route bandwidth = 498000000.000000
 
 $ ${bindir:=.}/basic_parsing_test Dijkstra.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (0:@) surf_workstation_model_init_ptask_L07
+> [  0.000000] (0:@) surf_host_model_init_ptask_L07
 > Workstation number: 2, link number: 6
 > Route between NODO01 and NODO01
 >   Route size 1
index 1fe9e50..0b928fb 100644 (file)
@@ -1,5 +1,5 @@
 ! expect signal SIGABRT
 $ ${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:@] surf_host_model_init_ptask_L07
 > [  0.000000] [0:@] Parse error at bogus_disk_attachment.xml:26: Unable to attach storage cdisk: host plouf doesn't exist.
 > [  0.000000] [0:@] Exiting now
index 2313ff6..75f1fd2 100644 (file)
@@ -1,11 +1,11 @@
 ! expect signal SIGABRT
 $ ${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:@] surf_host_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:@] surf_host_model_init_ptask_L07
 > [  0.000000] [0:@] Parse error at bogus_missing_dst_gateway.xml:16: gw_dst="neud-grappe_router.grappe.fr" not found for ASroute from "us" to "fr"
 > [  0.000000] [0:@] Exiting now
index 92f6665..c8a97aa 100644 (file)
@@ -1,11 +1,11 @@
 ! expect signal SIGABRT
 $ ${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:@] surf_host_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:@] surf_host_model_init_ptask_L07
 > [  0.000000] [0:@] Parse error at bogus_two_hosts_asymetric-2.xml:26: A route between "alice" and "bob" already exists with a different content. If you are trying to define a reverse route, you must set the symmetrical=no attribute to your routes tags.
 > [  0.000000] [0:@] Exiting now
index 260c38e..710a0ee 100644 (file)
@@ -3,7 +3,7 @@
 ! output sort
 
 $ ${bindir:=.}/flatifier$EXEEXT one_cluster.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -138,7 +138,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_cluster.xml "--log=root.fmt:[%10.6r]%e[%i:%P
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_cluster_multicore.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -272,7 +272,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_cluster_multicore.xml "--log=root.fmt:[%10.6
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_host_availability.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -286,7 +286,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_availability.xml "--log=root.fmt:[%10.6
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_host_properties.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -304,7 +304,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_properties.xml "--log=root.fmt:[%10.6r]
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_host_state_file.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -318,7 +318,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_state_file.xml "--log=root.fmt:[%10.6r]
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_host_state_off.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -332,7 +332,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_state_off.xml "--log=root.fmt:[%10.6r]%
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_host_state_on.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -346,7 +346,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_state_on.xml "--log=root.fmt:[%10.6r]%e
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_host_trace_file.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -360,7 +360,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_trace_file.xml "--log=root.fmt:[%10.6r]
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_host_trace_inside.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -374,7 +374,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host_trace_inside.xml "--log=root.fmt:[%10.6
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_host.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -388,7 +388,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_host.xml "--log=root.fmt:[%10.6r]%e[%i:%P@%h
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_link_availability.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -403,7 +403,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_link_availability.xml "--log=root.fmt:[%10.6
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_link_fatpipe.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -418,7 +418,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_link_fatpipe.xml "--log=root.fmt:[%10.6r]%e[
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_link_shared.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -433,7 +433,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_link_shared.xml "--log=root.fmt:[%10.6r]%e[%
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT one_link_state_file.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -448,7 +448,7 @@ $ ${bindir:=.}/flatifier$EXEEXT one_link_state_file.xml "--log=root.fmt:[%10.6r]
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT three_hosts_non_symmetric_route.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -491,7 +491,7 @@ $ ${bindir:=.}/flatifier$EXEEXT three_hosts_non_symmetric_route.xml "--log=root.
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT two_clusters.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -968,7 +968,7 @@ $ ${bindir:=.}/flatifier$EXEEXT two_clusters.xml "--log=root.fmt:[%10.6r]%e[%i:%
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT two_hosts_multi_hop.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -995,7 +995,7 @@ $ ${bindir:=.}/flatifier$EXEEXT two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT two_hosts_one_link.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -1020,7 +1020,7 @@ $ ${bindir:=.}/flatifier$EXEEXT two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%
 > </platform>
 
 $ ${bindir:=.}/flatifier$EXEEXT ${srcdir:=.}/examples/platforms/bypassASroute.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
@@ -1155,7 +1155,7 @@ $ ${bindir:=.}/flatifier$EXEEXT ${srcdir:=.}/examples/platforms/bypassASroute.xm
 
 
 $ ${bindir:=.}/flatifier$EXEEXT ${srcdir:=.}/examples/platforms/torus_cluster.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:@] surf_host_model_init_ptask_L07
 > <?xml version='1.0'?>
 > <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 > <platform version="3">
index f7dfaa5..53d3634 100644 (file)
@@ -2,7 +2,7 @@
 ! output sort
 
 $ ${bindir:=.}/basic_parsing_test ./four_hosts_floyd.xml FULL_LINK
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > Workstation number: 4, link number: 5
 > Route between host1 and host1
 >   Route size 1
@@ -74,7 +74,7 @@ $ ${bindir:=.}/basic_parsing_test ./four_hosts_floyd.xml FULL_LINK
 >   Route latency = 0.000015, route bandwidth = 498000000.000000
 
 $ ${bindir:=.}/basic_parsing_test ./four_hosts_floyd_bis.xml FULL_LINK
-> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [0.000000] [surf_host/INFO] surf_host_model_init_ptask_L07
 > Workstation number: 5, link number: 7
 > Route between host1 and host1
 >   Route size 1
index 504c754..c0f11b8 100644 (file)
@@ -5,7 +5,7 @@
 <config id="General">
        <prop id="maxmin/precision" value="0.000010"></prop>
        <prop id="cpu/optim" value="TI"></prop>
-       <prop id="workstation/model" value="compound"></prop>
+       <prop id="host/model" value="compound"></prop>
        <prop id="network/model" value="Vegas"></prop>
        <prop id="path" value="~/"></prop>
 </config>
index dc2d218..d727e4f 100644 (file)
@@ -20,7 +20,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [rank 13] -> Ginette
 > [rank 14] -> Ginette
 > [rank 15] -> Ginette
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0] rcvbuf=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ]
 > [1] rcvbuf=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ]
 > [2] rcvbuf=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ]
index 6c36aa6..606597b 100644 (file)
@@ -20,7 +20,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [rank 13] -> Ginette
 > [rank 14] -> Ginette
 > [rank 15] -> Ginette
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0] sndbuf=[0 ]
 > [1] sndbuf=[1 2 ]
 > [2] sndbuf=[3 4 5 ]
index cecba0c..a38926d 100644 (file)
@@ -20,7 +20,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [rank 13] -> Ginette
 > [rank 14] -> Ginette
 > [rank 15] -> Ginette
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0] sndbuf=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]
 > [1] sndbuf=[16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ]
 > [2] sndbuf=[32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 ]
index 8f7eaa7..52177af 100644 (file)
@@ -21,7 +21,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [rank 13] -> Ginette
 > [rank 14] -> Ginette
 > [rank 15] -> Ginette
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 2176 2192 2208 2224 2240 2256 2272 2288 2304 2320 2336 2352 2368 2384 2400 2416 2432 2448 2464 2480 2496 2512 2528 2544 2560 2576 2592 2608 2624 2640 2656 2672 2688 2704 2720 2736 2752 2768 2784 2800 2816 2832 2848 2864 2880 2896 2912 2928 2944 2960 2976 2992 3008 3024 3040 3056 3072 3088 3104 3120 3136 3152 3168 3184 3200 3216 3232 3248 3264 3280 3296 3312 3328 3344 3360 3376 3392 3408 3424 3440 3456 3472 3488 3504 3520 3536 3552 3568 3584 3600 3616 3632 3648 3664 3680 3696 3712 3728 3744 3760 3776 3792 3808 3824 3840 3856 3872 3888 3904 3920 3936 3952 3968 3984 4000 4016 4032 4048 4064 4080 4096 4112 4128 4144 4160 4176 4192 4208 4224 4240 4256 4272 4288 4304 4320 4336 4352 4368 4384 4400 4416 4432 4448 4464 4480 4496 4512 4528 4544 4560 4576 4592 4608 4624 4640 4656 4672 4688 4704 4720 4736 4752 4768 4784 4800 4816 4832 4848 4864 4880 4896 4912 4928 4944 4960 4976 4992 5008 5024 5040 5056 5072 5088 5104 5120 5136 5152 5168 5184 5200 5216 5232 5248 5264 5280 5296 5312 5328 5344 5360 5376 5392 5408 5424 5440 5456 5472 5488 5504 5520 5536 5552 5568 5584 5600 5616 5632 5648 5664 5680 5696 5712 5728 5744 5760 5776 5792 5808 5824 5840 5856 5872 5888 5904 5920 5936 5952 5968 5984 6000 ]
 > [0] sndbuf=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 ]
 > [10] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 2176 2192 2208 2224 2240 2256 2272 2288 2304 2320 2336 2352 2368 2384 2400 2416 2432 2448 2464 2480 2496 2512 2528 2544 2560 2576 2592 2608 2624 2640 2656 2672 2688 2704 2720 2736 2752 2768 2784 2800 2816 2832 2848 2864 2880 2896 2912 2928 2944 2960 2976 2992 3008 3024 3040 3056 3072 3088 3104 3120 3136 3152 3168 3184 3200 3216 3232 3248 3264 3280 3296 3312 3328 3344 3360 3376 3392 3408 3424 3440 3456 3472 3488 3504 3520 3536 3552 3568 3584 3600 3616 3632 3648 3664 3680 3696 3712 3728 3744 3760 3776 3792 3808 3824 3840 3856 3872 3888 3904 3920 3936 3952 3968 3984 4000 4016 4032 4048 4064 4080 4096 4112 4128 4144 4160 4176 4192 4208 4224 4240 4256 4272 4288 4304 4320 4336 4352 4368 4384 4400 4416 4432 4448 4464 4480 4496 4512 4528 4544 4560 4576 4592 4608 4624 4640 4656 4672 4688 4704 4720 4736 4752 4768 4784 4800 4816 4832 4848 4864 4880 4896 4912 4928 4944 4960 4976 4992 5008 5024 5040 5056 5072 5088 5104 5120 5136 5152 5168 5184 5200 5216 5232 5248 5264 5280 5296 5312 5328 5344 5360 5376 5392 5408 5424 5440 5456 5472 5488 5504 5520 5536 5552 5568 5584 5600 5616 5632 5648 5664 5680 5696 5712 5728 5744 5760 5776 5792 5808 5824 5840 5856 5872 5888 5904 5920 5936 5952 5968 5984 6000 ]
index c2bd4d5..96a8a80 100644 (file)
@@ -20,7 +20,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [rank 13] -> Ginette
 > [rank 14] -> Ginette
 > [rank 15] -> Ginette
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0] sndbuf=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]
 > [1] sndbuf=[16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ]
 > [2] sndbuf=[32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 ]
index e47b26a..467d755 100644 (file)
@@ -20,7 +20,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [rank 13] -> Ginette
 > [rank 14] -> Ginette
 > [rank 15] -> Ginette
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0] rbuf: (#256): [-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1][-1]
 > [0] rcount: (#16): [0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
 > [0] rdisp: (#16): [0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
index 8f53e26..1e4456c 100644 (file)
@@ -5,7 +5,6 @@
 p Test barrier
 $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ../../../examples/platforms/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/barrier_coll --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error
 > ... Barrier ....
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [rank 0] -> Tremblay
 > [rank 1] -> Tremblay
 > [rank 2] -> Tremblay
index bce449e..52b639a 100644 (file)
@@ -9,7 +9,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 
 # second test
 p Test Broadcast with as much processes than hosts
@@ -23,7 +22,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 
 # Another test
 p Test Broadcast with more processes than hosts
@@ -44,4 +42,3 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
index d92f374..d4201b9 100644 (file)
@@ -19,7 +19,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [rank 13] -> Ginette
 > [rank 14] -> Ginette
 > [rank 15] -> Ginette
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0] number of values equals to 17: 2048
 > [0] number of values equals to 17: 4096
 > [10] number of values equals to 17: 2048
index c6af534..abaa5b1 100644 (file)
@@ -21,7 +21,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [rank 13] -> Ginette
 > [rank 14] -> Ginette
 > [rank 15] -> Ginette
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0] rcvbuf=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ]
 > [0] sndbuf=[0 1 ]
 > [1] sndbuf=[2 3 ]
index a93a72d..7f69d18 100644 (file)
@@ -2,7 +2,6 @@ p Test hvector
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
 $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/hvector_test -q --log=smpi_kernel.thres:warning
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
index 7667ba3..75053c4 100644 (file)
@@ -2,7 +2,6 @@ p Test indexed
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
 $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/indexed_test -q --log=smpi_kernel.thres:warning
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
index 51468dc..38d9bee 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --log=xbt_cfg.thresh:warning --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-can-deadlock10 --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index c42b93a..6927192 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --log=xbt_cfg.thresh:warning --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-can-deadlock4 --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 66eb095..d6de021 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --log=xbt_cfg.thresh:warning --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-can-deadlock5 --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 6a9902b..5dcfc9d 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-can-deadlock6 --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index ead069f..f902c2c 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-wait-deadlock --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index b1ddbd1..1948ddf 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-waitall-deadlock2 --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index d3dbf5e..df50455 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-waitall-deadlock3 --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 04bf19a..251f9b6 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-waitany-deadlock --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index e65b72d..2872722 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/any_src-waitany-deadlock2 --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 928a237..632510b 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" --log=xbt_cfg.thresh:warning -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/basic-deadlock-comm_create --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 68040ca..42fcf5a 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/basic-deadlock-comm_dup --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 2626045..4a68058 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/basic-deadlock-comm_split --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index a3b8f77..5b7d2a7 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/basic-deadlock --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index cb1047e..1f54c9f 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/bcast-deadlock --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 4ff6bcc..fc22e96 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/collective-misorder-allreduce --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 1fbee62..5f0d591 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/collective-misorder --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 3b65516..44a992c 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/complex-deadlock --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 0072667..554d81a 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/deadlock-config --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > WARNING: This test depends on the MPI's eager limit. Set it appropriately.
 > Initializing (0 of 3)
 > (0) is alive on Tremblay
index 65b39ff..ed23519 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/finalize-deadlock --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 8bd4c68..5dfc37b 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/irecv-deadlock --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 7a09217..8557e40 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/no-error --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 4d9856b..3846fb2 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/no-error2 --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 1c30ed3..f69b6c8 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/no-error3-any_src --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index fec8ed5..ccd84af 100644 (file)
@@ -3,7 +3,6 @@
 ! expect return 134
 $ ${bindir:=.}/../../../../bin/smpirun -wrapper "${bindir:=.}/../../../../bin/simgrid-mc" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=model-check:1 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich ${bindir:=.}/no-error3 --log=smpi_coll.thresh:error
 > [0.000000] [mc_safety/INFO] Check a safety property
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > (0) is alive on Tremblay
 > (1) is alive on Jupiter
 > (2) is alive on Fafard
index 0eb3631..83a27b0 100644 (file)
@@ -66,7 +66,7 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/")
 
 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
 #C version - use automatic privatization if mmap is supported, manual through SMPI macros if not
-  if(HAVE_MMAP)
+  if(HAVE_PRIVATIZATION)
     add_library(mtest_c STATIC util/mtest.c)
   else()
     add_library(mtest_c STATIC util/mtest_manual.c)
index 8f1fde7..08564d8 100644 (file)
@@ -16,7 +16,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   add_executable(allgather3 allgather3.c)
   add_executable(allgatherv2 allgatherv2.c)
   add_executable(allgatherv3 allgatherv3.c)
-  if(HAVE_MMAP)
+  if(HAVE_PRIVATIZATION)
     add_executable(allgatherv4 allgatherv4.c)
   else()
     add_executable(allgatherv4 allgatherv4_manual.c)
index f0d6843..1a54a70 100644 (file)
@@ -90,8 +90,6 @@ int main( int argc, char *argv[] )
        if (wrank == 0) {
            t1 = t1 / reps;
            if (t1 > 0) {
-               double rate;
-               rate = (len / t1) / 1.e6;
                t1   = t1 * 1.e6;
                if (verbose) 
                    printf( "%d\t%g\t%g\n", len, t1, len/t1 );
@@ -138,8 +136,6 @@ int main( int argc, char *argv[] )
        if (wrank == 0) {
            t1 = t1 / reps;
            if (t1 > 0) {
-               double rate;
-               rate = (len / t1) / 1.e6;
                t1   = t1 * 1.e6;
                if (verbose)
                    printf( "%d\t%g\t%g\n", len, t1, len/t1 );
@@ -193,8 +189,6 @@ int main( int argc, char *argv[] )
        if (wrank == 0) {
            t1 = t1 / reps;
            if (t1 > 0) {
-               double rate;
-               rate = (len / t1) / 1.e6;
                t1   = t1 * 1.e6;
                if (verbose)
                    printf( "%d\t%g\t%g\n", len, t1, len/t1 );
index e6f550a..43ca11f 100644 (file)
@@ -10,7 +10,6 @@ $ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.t
 > == pivot=0 : pingpong [0] <--> [1]
 > == pivot=1 : pingpong [1] <--> [2]
 > == pivot=2 : pingpong [2] <--> [3]
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'smpi_simgrid.txt'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi' to 'yes'
@@ -56,7 +55,6 @@ $ ${bindir:=.}/../../../bin/smpirun -ext smpi_replay --log=replay.:critical -tra
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'out_ti.txt'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Jupiter:1:(0) 0.016798] [smpi_replay/INFO] Simulation time 0.016798
 
 ! output sort
@@ -120,7 +118,6 @@ $ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.t
 > == pivot=0 : pingpong [0] <--> [1]
 > == pivot=1 : pingpong [1] <--> [2]
 > == pivot=2 : pingpong [2] <--> [3]
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'smpi_simgrid.txt'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi' to 'yes'
@@ -166,7 +163,6 @@ $ ${bindir:=.}/../../../bin/smpirun -ext smpi_replay --log=replay.:critical -tra
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'out_ti.txt'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format/ti_one_file' to 'yes'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [Jupiter:1:(0) 0.016798] [smpi_replay/INFO] Simulation time 0.016798
 
 
index aae39e1..6e18204 100644 (file)
@@ -2,7 +2,6 @@ p Test dsend
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
 $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/dsend -q --log=smpi_kernel.thres:warning
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
@@ -20,7 +19,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../.
 > == pivot=0 : pingpong [0] <--> [1]
 > == pivot=1 : pingpong [1] <--> [2]
 > == pivot=2 : pingpong [2] <--> [3]
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
index c666264..1bd2449 100644 (file)
@@ -10,7 +10,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > ** Scalar Int Test Result:
 >      [0] sum=6 ... validation ok.
 >      [0] min=1 ... validation ok.
@@ -33,7 +32,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > ** Scalar Int Test Result:
 >      [0] sum=15 ... validation ok.
 >      [0] min=1 ... validation ok.
@@ -65,7 +63,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > ** Scalar Int Test Result:
 >      [0] sum=78 ... validation ok.
 >      [0] min=1 ... validation ok.
index 917bfe5..203c9f6 100644 (file)
@@ -4,7 +4,6 @@
 
 p Test allreduce
 $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ../../../examples/platforms/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/reduce_coll --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0] rcvbuf=[1920 1936 1952 1968 1984 2000 2016 2032 2048 2064 2080 2096 2112 2128 2144 2160 ]
 > [0] second sndbuf=[0 ]
 > [0] sndbuf=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]
index dcbcda7..ac5ca45 100644 (file)
@@ -5,7 +5,6 @@
 p Test reduce_scatter
 $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ../../../examples/platforms/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/reduce_scatter_coll --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error
 >  No Errors
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [rank 0] -> Tremblay
 > [rank 10] -> Fafard
 > [rank 11] -> Fafard
index 08cc4ba..5914a50 100644 (file)
@@ -38,7 +38,6 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 >      [9] ok.
 > ** IBM Test Result: ...
 > ** Small Test Result: ...
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [rank 0] -> Tremblay
 > [rank 10] -> Fafard
 > [rank 11] -> Fafard
index b046916..c713955 100644 (file)
@@ -3,7 +3,6 @@ p Test compute
 ! output sort
 ! timeout 5
 $ ${bindir:=.}/../../../bin/smpirun -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/shared --log=smpi_kernel.thres:warning
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
index 2a847c0..b876eb3 100644 (file)
@@ -7,6 +7,5 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../.
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > Process 0 got -2 (-2?) and 8.000000 (8.0?), tab (should be all 0): 0 0 0 0 0 0 
 > Process 1 got -2 (-2?) and 8.000000 (8.0?), tab (should be all 0): 0 0 0 0 0 0 
index 469e40e..da6bb83 100644 (file)
@@ -2,7 +2,6 @@ p Test vector
 ! setenv LD_LIBRARY_PATH=../../lib
 ! output sort
 $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ${srcdir:=.}/../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/vector_test -q --log=smpi_kernel.thres:warning
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304'
index 0ee8c57..e380a3c 100644 (file)
@@ -3,9 +3,7 @@
 $ $SG_TEST_EXENV ${bindir:=.}/surf_usage ../../examples/platforms/two_hosts_platform_with_availability.xml
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
 
 $ $SG_TEST_EXENV ${bindir:=.}/surf_usage2  ../../examples/platforms/two_hosts_platform_with_availability.xml
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
-> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
index 2e633a9..9f83171 100644 (file)
@@ -43,8 +43,8 @@ const char *string_action(e_surf_action_state_t state)
 void test(char *platform);
 void test(char *platform)
 {
-  void *workstationA = NULL;
-  void *workstationB = NULL;
+  void *hostA = NULL;
+  void *hostB = NULL;
   double now = -1.0;
   int running;
 
@@ -52,22 +52,20 @@ void test(char *platform)
   xbt_cfg_set_parse(_sg_cfg_set, "cpu/model:Cas01");
   parse_platform_file(platform);
 
-  /*********************** WORKSTATION ***********************************/
-  workstationA =
-      surf_workstation_resource_by_name("Cpu A");
-  workstationB =
-      surf_workstation_resource_by_name("Cpu B");
+  /*********************** HOST ***********************************/
+  hostA = surf_host_resource_by_name("Cpu A");
+  hostB = surf_host_resource_by_name("Cpu B");
 
   /* Let's check that those two processors exist */
-  XBT_DEBUG("%s : %p", surf_resource_name(workstationA), workstationA);
-  XBT_DEBUG("%s : %p", surf_resource_name(workstationB), workstationB);
+  XBT_DEBUG("%s : %p", surf_resource_name(hostA), hostA);
+  XBT_DEBUG("%s : %p", surf_resource_name(hostB), hostB);
 
   /* Let's do something on it */
-  surf_workstation_execute(workstationA, 1000.0);
-  surf_workstation_execute(workstationB, 1000.0);
-  surf_workstation_sleep(workstationB, 7.32);
+  surf_host_execute(hostA, 1000.0);
+  surf_host_execute(hostB, 1000.0);
+  surf_host_sleep(hostB, 7.32);
 
-  surf_workstation_model_communicate(surf_workstation_model, workstationA, workstationB, 150.0, -1.0);
+  surf_host_model_communicate(surf_host_model, hostA, hostB, 150.0, -1.0);
 
   surf_solve(-1.0);                 /* Takes traces into account. Returns 0.0 */
   do {
index 129ab69..f14086c 100644 (file)
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.6)
 set(bin_files
   ${bin_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/fix-paje-trace.sh
-  ${CMAKE_CURRENT_SOURCE_DIR}/generate.sh
+  ${CMAKE_CURRENT_SOURCE_DIR}/generate-dwarf-functions
   ${CMAKE_CURRENT_SOURCE_DIR}/indent
   ${CMAKE_CURRENT_SOURCE_DIR}/normalize-pointers.py
   ${CMAKE_CURRENT_SOURCE_DIR}/platf_route_rulebased2full.py
diff --git a/tools/generate-dwarf-functions b/tools/generate-dwarf-functions
new file mode 100755 (executable)
index 0000000..fbb496a
--- /dev/null
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Generate files from a given dwarf.h
+# Usage: tools/generate-dwarf-functions /usr/include/dwarf.h
+
+cat - > src/mc/mc_dwarf_tagnames.cpp <<EOF
+/* Copyright (c) 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. */
+
+/* Warning: autogenerated, do not edit! */
+
+#include <dwarf.h>
+
+#include <xbt/base.h>
+#include "mc_object_info.h"
+
+/** \brief Get the name of a dwarf tag (DW_TAG_*) from its code
+ *
+ *  \param tag tag code (see the DWARF specification)
+ *  \return name of the tag
+ */
+XBT_INTERNAL
+const char *MC_dwarf_tagname(int tag)
+{
+  switch (tag) {
+$(cat "$1" | grep DW_TAG_ | sed 's/.*\(DW_TAG_[^ ]*\) = \(0x[0-9a-f]*\).*/  case \2: return "\1";/')
+  case DW_TAG_invalid:
+    return "DW_TAG_invalid";
+  default:
+    return "DW_TAG_unknown";
+  }
+}
+EOF
+
+cat - > src/mc/mc_dwarf_attrnames.cpp << EOF
+/* Copyright (c) 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. */
+
+/* Warning: autogenerated, do not edit! */
+
+#include <xbt/base.h>
+#include <dwarf.h>
+
+#include "mc_object_info.h"
+
+/** \brief Get the name of an attribute (DW_AT_*) from its code
+ *
+ *  \param attr attribute code (see the DWARF specification)
+ *  \return name of the attribute
+ */
+const char *MC_dwarf_attrname(int attr)
+{
+  switch (attr) {
+$(cat "$1" | grep DW_AT_ | sed 's/.*\(DW_AT_[^ ]*\) = \(0x[0-9a-f]*\).*/  case \2: return "\1";/')
+  default:
+    return "DW_AT_unknown";
+  }
+}
+EOF
diff --git a/tools/generate.sh b/tools/generate.sh
deleted file mode 100755 (executable)
index 5f39fdd..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-# Generate files from a given dwarf.h
-
-cat "$1" | grep DW_TAG_ | sed 's/.*\(DW_TAG_[^ ]*\) = \(0x[0-9a-f]*\).*/case \2: return "\1";/' > src/mc/mc_dwarf_tagnames.h
-cat "$1" | grep DW_AT_ | sed 's/.*\(DW_AT_[^ ]*\) = \(0x[0-9a-f]*\).*/case \2: return "\1";/' >  src/mc/mc_dwarf_attrnames.h