Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove MSG. Its EOL was scheduled for 2020
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 14 Jan 2023 00:12:12 +0000 (01:12 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 14 Jan 2023 00:36:21 +0000 (01:36 +0100)
57 files changed:
.circleci/config.yml
.gitignore
.gitlab-ci.yml
CMakeLists.txt
ChangeLog
MANIFEST.in
README.coding
doc/doxygen/FAQ.doc
doc/doxygen/inside_tests.doc
doc/doxygen/module-index.doc
doc/doxygen/module-surf.doc
doc/webcruft/Paje_MSG_screenshot.jpg [deleted file]
doc/webcruft/Paje_MSG_screenshot_thn.jpg [deleted file]
docs/find-missing.py
docs/source/Configuring_SimGrid.rst
docs/source/Deploying_your_application.rst
docs/source/Doxyfile
docs/source/Installing_SimGrid.rst
docs/source/Modeling_howtos.rst
docs/source/Release_Notes.rst
docs/source/Start_your_own_project.rst
docs/source/Tutorial_Algorithms.rst
docs/source/XML_reference.rst
docs/source/app_msg.rst [deleted file]
docs/source/app_s4u.rst
docs/source/application.rst
docs/source/conf.py
docs/source/index.rst
docs/source/tuto_disk/analysis.irst
docs/source/tuto_disk/analysis.org
include/simgrid/config.h.in
include/simgrid/msg.h [deleted file]
include/simgrid/plugins/dvfs.h
include/simgrid/plugins/energy.h
include/simgrid/plugins/file_system.h
include/simgrid/plugins/live_migration.h
include/simgrid/plugins/load.h
sonar-project.properties
src/kernel/activity/MailboxImpl.cpp
src/msg/msg_comm.cpp [deleted file]
src/msg/msg_global.cpp [deleted file]
src/msg/msg_legacy.cpp [deleted file]
src/msg/msg_private.hpp [deleted file]
src/msg/msg_process.cpp [deleted file]
src/msg/msg_task.cpp [deleted file]
teshsuite/msg/CMakeLists.txt [deleted file]
teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c [deleted file]
teshsuite/msg/task_destroy_cancel/task_destroy_cancel.tesh [deleted file]
tools/CMakeLists.txt
tools/MSG_visualization/colorize.pl [deleted file]
tools/MSG_visualization/trace2fig.pl [deleted file]
tools/cmake/DefinePackages.cmake
tools/cmake/Distrib.cmake
tools/cmake/Option.cmake
tools/internal/spell_dict.txt
tools/jenkins/Coverage.sh
tools/jenkins/Flags.sh

index 7eafeec..2839cb3 100644 (file)
@@ -19,5 +19,5 @@ jobs:
           name: Configure, build and test da stuff
           command: |
             mkdir _build && cd _build
-            cmake -Denable_documentation=OFF -Denable_coverage=ON -Denable_msg=ON -Denable_model-checking=OFF -Denable_compile_optimizations=OFF -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF -Denable_compile_warnings=ON ..
+            cmake -Denable_documentation=OFF -Denable_coverage=ON -Denable_model-checking=OFF -Denable_compile_optimizations=OFF -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF -Denable_compile_warnings=ON ..
             make -j4 tests && ctest -j4 --output-on-failure
index 6014d75..5608147 100644 (file)
@@ -292,7 +292,6 @@ teshsuite/models/cloud-sharing/cloud-sharing
 teshsuite/models/ptask_L07_usage/ptask_L07_usage
 teshsuite/models/wifi_usage/wifi_usage
 teshsuite/models/wifi_usage_decay/wifi_usage_decay
-teshsuite/msg/task_destroy_cancel/task_destroy_cancel
 teshsuite/platforms/flatifier
 teshsuite/s4u/activity-lifecycle/activity-lifecycle
 teshsuite/s4u/actor/actor
index e56e10f..49f4c5c 100644 (file)
@@ -32,7 +32,7 @@ release:
   script:
   - apt-get --allow-releaseinfo-change update
   - apt install -y binutils wget unzip zip
-  - cmake -Denable_documentation=OFF -Denable_msg=ON -Dminimal-bindings=ON -Denable_compile_optimizations=ON -Denable_smpi=OFF -DLTO_EXTRA_FLAG="auto" .
+  - cmake -Denable_documentation=OFF -Dminimal-bindings=ON -Denable_compile_optimizations=ON -Denable_smpi=OFF -DLTO_EXTRA_FLAG="auto" .
   - make VERBOSE=1 -j$(nproc) dist
   artifacts:
     paths:
index d9e257a..a57c58c 100644 (file)
@@ -243,11 +243,6 @@ else()
   message(STATUS "Disabling model BMF because Eigen3 was not found. If it's installed, use EIGEN3_HINT to hint cmake about the location of Eigen3Config.cmake")
 endif()
 
-set(SIMGRID_HAVE_MSG 0)
-if(enable_msg)
-  set(SIMGRID_HAVE_MSG 1)
-endif()
-
 set(HAVE_PAPI 0)
 if(enable_smpi_papi)
   include(FindPAPI)
@@ -899,12 +894,6 @@ message("        LDFlags .....................: ${CMAKE_C_LINK_FLAGS}")
 message("        with LTO ....................: ${enable_lto}")
 message("")
 
-if (SIMGRID_HAVE_MSG)
-  message("        Compile MSG .................: ON")
-else()
-  message("        Compile MSG .................: OFF")
-endif()
-
 if (SIMGRID_HAVE_NS3)
   message("        Compile ns-3 ................: ON (path: ${NS3_PATH})")
 else()
index 1e13d4e..649d71e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,10 @@
 SimGrid (3.32.1) not released yet (target december 22)
 
 General:
+ - Remove the MSG API: its EOL was scheduled for 2020.
+ - Remove the Java bindings: they were limited to the MSG interface.
  - On Windows, you now need to install WSL2 as the native builds are now disabled.
    It was not really working anyway.
- - Remove the Java bindings: they were completely outdated, limited to the MSG interface.
 
 S4U:
  - Activity::set_remaining() is not public anymore. Use for example
index 42031f9..4063307 100644 (file)
@@ -1,8 +1,6 @@
 # This file lists the content of the python source package
 # Prepared in tools/cmake/Distrib.cmake
 
-include doc/webcruft/Paje_MSG_screenshot.jpg
-include doc/webcruft/Paje_MSG_screenshot_thn.jpg
 include doc/webcruft/eclipseScreenShot.png
 include doc/webcruft/output.goal.pdf
 include examples/c/actor-create/actor-create.c
@@ -642,8 +640,6 @@ include teshsuite/models/wifi_usage/wifi_usage.cpp
 include teshsuite/models/wifi_usage/wifi_usage.tesh
 include teshsuite/models/wifi_usage_decay/wifi_usage_decay.cpp
 include teshsuite/models/wifi_usage_decay/wifi_usage_decay.tesh
-include teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c
-include teshsuite/msg/task_destroy_cancel/task_destroy_cancel.tesh
 include teshsuite/platforms/Dijkstra.xml
 include teshsuite/platforms/bob.trace
 include teshsuite/platforms/bogus_missing_dst_gateway.xml
@@ -1579,8 +1575,6 @@ include teshsuite/xbt/parmap_test/parmap_test.cpp
 include teshsuite/xbt/parmap_test/parmap_test.tesh
 include teshsuite/xbt/signals/signals.cpp
 include teshsuite/xbt/signals/signals.tesh
-include tools/MSG_visualization/colorize.pl
-include tools/MSG_visualization/trace2fig.pl
 include tools/address_sanitizer.supp
 include tools/fix-paje-trace.sh
 include tools/generate-dwarf-functions
@@ -1680,7 +1674,6 @@ include docs/source/_ext/showfile.js
 include docs/source/_ext/showfile.py
 include docs/source/_static/css/custom.css
 include docs/source/_templates/breadcrumbs.html
-include docs/source/app_msg.rst
 include docs/source/app_s4u.rst
 include docs/source/app_smpi.rst
 include docs/source/application.rst
@@ -1895,7 +1888,6 @@ include include/simgrid/kernel/routing/WifiZone.hpp
 include include/simgrid/link.h
 include include/simgrid/mailbox.h
 include include/simgrid/modelchecker.h
-include include/simgrid/msg.h
 include include/simgrid/mutex.h
 include include/simgrid/plugins/ProducerConsumer.hpp
 include include/simgrid/plugins/dvfs.h
@@ -2202,12 +2194,6 @@ include src/mc/transition/TransitionSynchro.cpp
 include src/mc/transition/TransitionSynchro.hpp
 include src/mc/udpor_global.cpp
 include src/mc/udpor_global.hpp
-include src/msg/msg_comm.cpp
-include src/msg/msg_global.cpp
-include src/msg/msg_legacy.cpp
-include src/msg/msg_private.hpp
-include src/msg/msg_process.cpp
-include src/msg/msg_task.cpp
 include src/plugins/ProducerConsumer.cpp
 include src/plugins/chaos_monkey.cpp
 include src/plugins/file_system/s4u_FileSystem.cpp
@@ -2522,7 +2508,6 @@ include src/xbt/xbt_virtu.cpp
 include teshsuite/kernel/CMakeLists.txt
 include teshsuite/mc/CMakeLists.txt
 include teshsuite/models/CMakeLists.txt
-include teshsuite/msg/CMakeLists.txt
 include teshsuite/platforms/CMakeLists.txt
 include teshsuite/python/CMakeLists.txt
 include teshsuite/s4u/CMakeLists.txt
index e3eed40..101fd3a 100644 (file)
@@ -14,7 +14,7 @@
                should leverage our tesh(1) utility.
 
 **
-** NEW type naming standard in SimGrid4
+** Type naming standard in SimGrid4
 **
 *****************************************************
 
@@ -42,60 +42,6 @@ SimGrid4 will follow the these rules:
     char* sg_host_get_name(sg_host_t* host);
 
 
-This is different from the old convention (described below), that
-should not be used in S4U and its bindings, nor in the kernel.
-
-**
-** Commenting the source: doxygen
-**
-****************************************************
-
-The global structure of the documentation is in doc/modules.doc
-
-The structure of each module (xbt, msg, etc) is in doc/module-<module>.doc
-
-The structure of a module is in its public header. This way, you're sure to
-see all the public interface (and only it). The different parts of the
-interface are grouped using the @name construct, even if it's buggy. Since
-parts often get reordered, it's better to add numbers to the parts (so that
-users can see the intended order).
-
-The documentation of each type and macro are also in the public header since
-this is were they live.
-
-The documentation of each function must be in the C++ file were it lives.
-
-Any public element (function, type and macro) must have a @brief part.
-
-We use @ as a command marker, not \ (so, use @brief not \brief)
-
-**
-** OLD Type naming standard in SimGrid3
-**
-*****************************************************
-
-SimGrid3 legacy interface (ie, MSG) is following these rules:
-
-  - ???_t is a valid type (built with typedef)
-  - s_toto_t is a structure (access to fields with .)
-  - s_toto   is a structure needing 'struct' keyword to be used
-  - e_toto_t is an enum
-  - u_toto_t is an union
-  - u_toto   is an union needing 'union' keyword to be used
-  -   toto_t is an 'object' (struct*)
-
-Please to not call toto_t something else than an 'object' (ie, something you
-have to call _new and _free on it).
-
-Example:
-  typedef struct s_toto {} s_toto_t, *toto_t;
-  typedef enum {} e_toto_t;
-
-Moreover, only toto_t (and e_toto_t) are public. The rest (mainly s_toto_t)
-is private.
-
-
-*
 * SimGrid Hacker Survival Guide (FIXME: should be betterly placed)
 ********************************
 * When you add/remove files, and/or make changes in the lists of files to build,
index 1f95d4f..7a5c4f1 100644 (file)
-/*! @page FAQ MSG Frequently Asked Questions
+/*! @page FAQ Frequently Asked Questions
 
 @tableofcontents
 
-This document is the FAQ of the MSG interface. Some entries are a bit aging and it should be refreshed at some point.
-
-@section faq_simgrid I'm new to SimGrid. I have some questions. Where should I start?
-
-You are at the right place... To understand what you can do or
-cannot do with SimGrid, you should read the
-<a href="https://simgrid.org/tutorials.html">tutorial
-slides</a> from the SimGrid's website. You may find more up-to-date
-material on the
-<a href="http://people.irisa.fr/Martin.Quinson/blog/SimGrid/">blog of
-Martin Quinson</a>.
-
-Another great source of inspiration can be found in the @ref s4u_examples.
-
-If you are stuck at any point and if this FAQ cannot help you, please drop us a
-mail to the user mailing list: <simgrid-community@inria.fr>.
-
-@subsection faq_visualization Visualizing and analyzing the results
-
-It is sometime convenient to "see" how the agents are behaving. If you
-like colors, you can use <tt>tools/MSG_visualization/colorize.pl </tt>
-as a filter to your MSG outputs. It works directly with INFO. Beware,
-INFO() prints on stderr. Do not forget to redirect if you want to
-filter (e.g. with bash):
-@verbatim
-./msg_test small_platform.xml small_deployment.xml 2>&1 | ../../tools/MSG_visualization/colorize.pl
-@endverbatim
-
-We also have a more graphical output. Have a look at section @ref options_tracing.
+Some entries are a bit aging and it should be refreshed at some point.
 
 @section faq_howto Feature related questions
 
-@subsection faq_MIA "Could you please add (your favorite feature here) to SimGrid?"
-
-Here is the deal. The whole SimGrid project (MSG, SURF, ...) is
-meant to be kept as simple and generic as possible. We cannot add
-functions for everybody's needs when these functions can easily be
-built from the ones already in the API. Most of the time, it is
-possible and when it was not possible we always have upgraded the API
-accordingly. When somebody asks us a question like "How to do that?
-Is there a function in the API to simply do this?", we're always glad
-to answer and help. However if we don't need this code for our own
-need, there is no chance we're going to write it... it's your job! :)
-The counterpart to our answers is that once you come up with a neat
-implementation of this feature (task duplication, RPC, thread
-synchronization, ...), you should send it to us and we will be glad to
-add it to the distribution. Thus, other people will take advantage of
-it (and we don't have to answer this question again and again ;).
-
-You'll find in this section a few "Missing In Action" features. Many
-people have asked about it and we have given hints on how to simply do
-it with MSG. Feel free to contribute...
-
-@subsection faq_MIA_MSG MSG features
-
-@subsubsection faq_MIA_thread_synchronization How to synchronize my user processes?
-
-It depends on why you want to synchronize them.  If you just want to
-have a shared state between your processes, then you probably don't
-need to do anything. User processes never get forcefully interrupted
-in SimGrid (unless you explicitly request the parallel execution of
-user processes -- see @ref options_virt_parallel).
-
-Even if several processes are executed at the exact same time within
-the simulation, they are linearized in reality by default: one process
-always run in an exclusive manner, atomic, uninterrupted until it does
-a simcall (until it ask a service from the simulation kernel). This is
-surprising at first, but things are much easier this way, both for the
-user (who don't have to protect her shared data) and for the kernel
-(that avoid many synchronization issues too). Processes are executed
-concurrently in the simulated realm, but you don't need to bother with
-this in the real realm.
-
-If you really need to synchronize your processes (because it's what
-you are studying or to create an atomic section that spans over
-several simcalls), you obviously cannot use regular synchronization
-mechanisms (pthread_mutexes in C).
-This is because the SimGrid kernel locks all processes and unlock them
-one after the other when they are supposed to run, until they give the
-control back in their simcall. If one of them gets locked by the OS
-before returning the control to the kernel, that's definitively a
-deadlock.
-
-Instead, you should use the synchronization mechanism provided by the
-simulation kernel. This could with a SimGrid mutex, a SimGrid
-condition variables or a SimGrid semaphore, as described in @ref
-msg_synchro. But actually,
-many synchronization patterns can be encoded with communication on
-mailboxes. Typically, if you need one process to notify another one,
-you could use a condition variable or a semaphore, but sending a
-message to a specific mailbox does the trick in most cases.
-
-@subsubsection faq_MIA_communication_time How can I get the *real* communication time?
-
-Communications are synchronous and thus if you simply get the time
-before and after a communication, you'll only get the transmission
-time and the time spent to really communicate (it will also take into
-account the time spent waiting for the other party to be
-ready). However, getting the *real* communication time is not really
-hard either. The following solution is a good starting point.
-
-@code
-int sender()
-{
-  m_task_t task = MSG_task_create("Task", task_comp_size, task_comm_size,
-                                  calloc(1,sizeof(double)));
-  *((double*) task->data) = MSG_get_clock();
-  MSG_task_put(task, workers[i % workers_count], PORT_22);
-  XBT_INFO("Send completed");
-  return 0;
-}
-int receiver()
-{
-  m_task_t task = NULL;
-  double time1,time2;
-
-  time1 = MSG_get_clock();
-  a = MSG_task_get(&(task), PORT_22);
-  time2 = MSG_get_clock();
-  if(time1<*((double *)task->data))
-     time1 = *((double *) task->data);
-  XBT_INFO("Communication time :  \"%f\" ", time2-time1);
-  free(task->data);
-  MSG_task_destroy(task);
-  return 0;
-}
-@endcode
-
 @subsection faq_MIA_SimDag SimDag related questions
 
 @subsubsection faq_SG_comm Implementing communication delays between tasks.
@@ -157,73 +33,6 @@ comprising the workstations on which t1 and t2 are scheduled (w1 and w2
 for example) and build a communication matrix that should look like
 [0;amount ; 0; 0].
 
-@subsubsection faq_SG_DAG How to implement a distributed dynamic scheduler of DAGs.
-
-Distributed is somehow "contagious". If you start making distributed
-decisions, there is no way to handle DAGs directly anymore (unless I
-am missing something). You have to encode your DAGs in term of
-communicating process to make the whole scheduling process
-distributed. Here is an example of how you could do that. Assume T1
-has to be done before T2.
-
-@code
- int your_agent(int argc, char *argv[] {
-   ...
-   T1 = MSG_task_create(...);
-   T2 = MSG_task_create(...);
-   ...
-   while(1) {
-     ...
-     if(cond) MSG_task_execute(T1);
-     ...
-     if((MSG_task_get_remaining_computation(T1)=0.0) && (you_re_in_a_good_mood))
-        MSG_task_execute(T2)
-     else {
-        /* do something else */
-     }
-   }
- }
-@endcode
-
-If you decide that the distributed part is not that much important and that
-DAG is really the level of abstraction you want to work with, then you should
-give a try to @ref SD_API.
-
-@subsection faq_MIA_generic Generic features
-
-@subsubsection faq_MIA_batch_scheduler Is there a native support for batch schedulers in SimGrid?
-
-No, there is no native support for batch schedulers and none is
-planned because this is a very specific need (and doing it in a
-generic way is thus very hard). However some people have implemented
-their own batch schedulers. Vincent Garonne wrote one during his PhD
-and put his code in the contrib directory of our SVN so that other can
-keep working on it. You may find inspiring ideas in it.
-
-@subsection faq_platform Platform building and Dynamic resources
-
-@subsubsection faq_platform_synthetic Generating synthetic but realistic platforms
-
-Another possibility to get a platform file is to generate synthetic
-platforms. Getting a realistic result is not a trivial task, and
-moreover, nobody is really able to define what "realistic" means when
-speaking of topology files. You can find some more thoughts on this
-topic in these
-<a href="http://graal.ens-lyon.fr/~alegrand/articles/Simgrid-Introduction.pdf">slides</a>.
-
-If you are looking for an actual tool, there we have a little tool to
-annotate Tiers-generated topologies. This perl-script is in
-<tt>tools/platform_generation/</tt> directory of the SVN. Dinda et Al.
-released a very comparable tool, and called it GridG.
-
-
-The specified computing power will be available to up to 6 sequential
-tasks without sharing. If more tasks are placed on this host, the
-resource will be shared accordingly. For example, if you schedule 12
-tasks on the host, each will get half of the computing power. Please
-note that although sound, this model were never scientifically
-assessed. Please keep this fact in mind when using it.
-
 @section faq_troubleshooting Troubleshooting
 
 @subsection faq_surf_network_latency I get weird timings when I play with the latencies.
index 4bdbcf4..8f0f5ed 100644 (file)
@@ -30,13 +30,13 @@ cmake. These tests are run for every commit and the result is publicly
 
 @verbatim
 ctest                     # Launch all tests
-ctest -R msg              # Launch only the tests which name match the string "msg"
+ctest -R mc-              # Launch only the tests which name match the string "mc-"
 ctest -j4                 # Launch all tests in parallel, at most 4 at the same time
 ctest --verbose           # Display all details on what's going on
 ctest --output-on-failure # Only get verbose for the tests that fail
 
-ctest -R msg- -j5 --output-on-failure # You changed MSG and want to check that you didn't break anything, huh?
-                                      # That's fine, I do so all the time myself.
+ctest -R mc- -j5 --output-on-failure # You changed the model checker and want to check that you didn't break anything, huh?
+                                     # That's fine, I do so all the time myself.
 @endverbatim
 
 @section inside_tests_rununit Running the unit tests
@@ -102,13 +102,13 @@ To add a new integration test, you thus have 3 things to do:
  - <b>Add your test in the cmake infrastructure</b>. For that, modify
    the following file:
    @verbatim
-   <project/directory>/teshsuite/<interface eg msg>/CMakeLists.txt
+   <project/directory>/teshsuite/<interface eg s4u>/CMakeLists.txt
    @endverbatim
    Make sure to pick a wise name for your test. It is often useful to
    check a category of tests together. The only way to do so in ctest
    is to use the -R argument that specifies a regular expression that
-   the test names must match. For example, you can run all MSG test
-   with "ctest -R msg". That explains the importance of the test
+   the test names must match. For example, you can run all MC test
+   with "ctest -R mc-". That explains the importance of the test
    names.
 
 Once the name is chosen, create a new test by adding a line similar to
index 0f252d6..3e0c376 100644 (file)
@@ -8,15 +8,15 @@
 @brief Gather data about your simulation for later analysis
 
 SimGrid can trace the resource (of hosts and links) utilization using
-any of its programming interfaces (MSG, SimDAG and SMPI). This means
+any of its programming interfaces (S4U, SimDAG and SMPI). This means
 that the tracing will register how much power is used for each host
 and how much bandwidth is used for each link of the platform.
 
 The idea of the tracing facilities is to give SimGrid users to
-possibility to classify MSG and SimDAG tasks by category, tracing the
+possibility to classify S4U and SimDAG tasks by category, tracing the
 platform utilization (hosts and links) for each of the categories.
 The API enables the declaration of categories and a function to
-associate them to the tasks (MSG and SD). The tasks that are not
+associate them to the tasks (S4U and SD). The tasks that are not
 classified according to a category are not traced. If no categories
 are specified, simulations can still be traced using a special
 parameter in the command line (see @ref outcomes_vizu for details).
index 32d997f..d3726b7 100644 (file)
@@ -38,7 +38,7 @@
     extract them from @a surf_host_model->common_public->states.done_action_set.
     Depending on these results, you can schedule other tasks and call solve() again.
 
-    Have a look at the implementation of @ref MSG_API "MSG" and @ref SD_API "Simdag" to see how these module
+    Have a look at the implementation ofd @ref SD_API "Simdag" to see how these module
     interact with SURF. But if you want to create a new API on top of SURF,
     we strongly recommend you to contact us before anyway.
 
diff --git a/doc/webcruft/Paje_MSG_screenshot.jpg b/doc/webcruft/Paje_MSG_screenshot.jpg
deleted file mode 100644 (file)
index 96394d8..0000000
Binary files a/doc/webcruft/Paje_MSG_screenshot.jpg and /dev/null differ
diff --git a/doc/webcruft/Paje_MSG_screenshot_thn.jpg b/doc/webcruft/Paje_MSG_screenshot_thn.jpg
deleted file mode 100644 (file)
index 323d667..0000000
Binary files a/doc/webcruft/Paje_MSG_screenshot_thn.jpg and /dev/null differ
index 57344b1..7d370d5 100755 (executable)
@@ -48,7 +48,6 @@ xml_files = [
     'build/xml/host_8h.xml',
     'build/xml/link_8h.xml',
     'build/xml/mailbox_8h.xml',
-    'build/xml/msg_8h.xml',
     'build/xml/mutex_8h.xml',
     'build/xml/semaphore_8h.xml',
     'build/xml/vm_8h.xml',
index 07b10c0..31139cb 100644 (file)
@@ -58,7 +58,7 @@ file:
   </config>
 
 A last solution is to pass your configuration directly in your program
-with :cpp:func:`simgrid::s4u::Engine::set_config` or :cpp:func:`MSG_config`.
+with :cpp:func:`simgrid::s4u::Engine::set_config`.
 
 .. code-block:: cpp
 
@@ -108,8 +108,6 @@ Existing Configuration Items
 - **maxmin/precision:** :ref:`cfg=maxmin/precision`
 - **maxmin/concurrency-limit:** :ref:`cfg=maxmin/concurrency-limit`
 
-- **msg/debug-multiple-use:** :ref:`cfg=msg/debug-multiple-use`
-
 - **model-check:** :ref:`options_modelchecking`
 - **model-check/checkpoint:** :ref:`cfg=model-check/checkpoint`
 - **model-check/communications-determinism:** :ref:`cfg=model-check/communications-determinism`
@@ -980,7 +978,7 @@ Running User Code in Parallel
 .............................
 
 Parallel execution of the user code is only considered stable in
-SimGrid v3.7 and higher, and mostly for MSG simulations. SMPI
+SimGrid v3.7 and higher, and mostly for S4U simulations. SMPI
 simulations may well fail in parallel mode. It is described in
 `INRIA RR-7653 <http://hal.inria.fr/inria-00602216/>`_.
 
@@ -1020,7 +1018,7 @@ We detail here a simple way to get the traces working for you, even if
 you never used the tracing API.
 
 
-- Any SimGrid-based simulator (MSG, SMPI, ...) and raw traces:
+- Any SimGrid-based simulator (S4U, SMPI, ...) and raw traces:
 
   .. code-block:: none
 
@@ -1030,7 +1028,7 @@ you never used the tracing API.
   tells it to trace host and link utilization (without any
   categorization).
 
-- MSG-based simulator and categorized traces (you need to
+- S4U-based simulator and categorized traces (you need to
   declare categories and classify your tasks according to them)
 
   .. code-block:: none
@@ -1070,21 +1068,6 @@ Please, use these two parameters (for comments) to make reproducible
 simulations. For additional details about this and all tracing
 options, check See the :ref:`tracing_tracing_options`.
 
-Configuring MSG
----------------
-
-.. _cfg=msg/debug-multiple-use:
-
-Debugging MSG Code
-..................
-
-**Option** ``msg/debug-multiple-use`` **Default:** off
-
-Sometimes your application may try to send a task that is still being
-executed somewhere else, making it impossible to send this task. However,
-for debugging purposes, one may want to know what the other host is/was
-doing. This option shows a backtrace of the other process.
-
 Configuring SMPI
 ----------------
 
index 5e02efe..4cd1287 100644 (file)
@@ -76,10 +76,6 @@ This tag starts a new actor executing the given function on a given host.
    with :cpp:func:`simgrid::s4u::Engine::register_actor` or
    with :cpp:func:`simgrid::s4u::Engine::register_function`.
 
-   If you are stuck with MSG, use :cpp:func:`MSG_process_create`,
-   :cpp:func:`MSG_process_create_with_arguments` or
-   :cpp:func:`MSG_process_create_with_environment`.
-
 :``start_time``: Useful to delay the start of your actor.
 
         -1 starts the actor immediately.
index 02cd82d..c1746d9 100644 (file)
@@ -2,7 +2,6 @@
 INPUT                  = ../../include/simgrid/forward.h
 INPUT                 += ../../include/simgrid/plugins/
 INPUT                 += ../../include/simgrid/s4u/
-INPUT                 += ../../include/simgrid/msg.h
 INPUT                 += ../../include/simgrid/actor.h
 INPUT                 += ../../src/s4u/s4u_Actor.cpp
 INPUT                 += ../../include/simgrid/barrier.h
@@ -22,7 +21,6 @@ INPUT                 += ../../include/simgrid/zone.h
 INPUT                 += ../../include/xbt/dynar.h
 INPUT                 += ../../src/xbt/dynar.cpp
 INPUT                 += ../../include/xbt/signal.hpp
-INPUT                 += ../../src/msg/
 INPUT                 += ../../src/plugins/
 RECURSIVE              = YES
 
index b04db31..53ba688 100644 (file)
@@ -234,9 +234,6 @@ enable_model-checking (on/OFF)
   simulation speed** even when the model checker is not activated at
   run time.
 
-enable_msg (on/OFF)
-  Activates the :ref:`MSG <MSG_doc>` legacy interface.
-
 enable_ns3 (on/OFF)
   Activates the ns-3 bindings. See section :ref:`model_ns3`.
 
index 3772a67..f6589f7 100644 (file)
@@ -152,13 +152,10 @@ programs actually die and restart during a reboot. Since there are many
 ways to model it, SimGrid does not do any modeling choice for you but
 the most obvious ones.
 
-Any actor (or process in MSG) running on a host that is shut down
-will be killed and all its activities (tasks in MSG) will be
-automatically canceled. If the actor killed was marked as
-auto-restartable (with
-:cpp:func:`simgrid::s4u::Actor::set_auto_restart` or with
-:cpp:func:`MSG_process_auto_restart_set`), it will start anew with the
-same parameters when the host boots back up.
+Any actor running on a host that is shut down will be killed and all 
+its activities will be automatically canceled. If the actor killed was 
+marked as auto-restartable (with :cpp:func:`simgrid::s4u::Actor::set_auto_restart`), 
+it will start anew with the same parameters when the host boots back up.
 
 By default, shutdowns and boots are instantaneous. If you want to
 add an extra delay, you have to do that yourself, for example from a
index d1bb3c7..3d61282 100644 (file)
@@ -573,6 +573,11 @@ Version 3.33 (not released yet)
 
 .. |br| raw:: html
 
+**On the maintainance front,** we removed the ancient MSG interface which end-of-life was scheduled for 2020, the Java
+bindings that was MSG-only and support for native builds on Windows (WSL is now required). Keeping SimGrid alive while
+adding new features require to remove old, unused stuff. The very rare users impacted by these removals are urged to 
+move to the new API and systems.
+
 **On the model front,** we realized an idea that has been on the back of our minds for quite some time. The question
 was: could we use something in the line of the ptask model, that mixes computations and network transfers in a single
 fluid activity, to simulate a *fluid I/O stream activity* that would consume both disk and network resources? This
index 3d131a7..b6f5d0a 100644 (file)
@@ -160,7 +160,6 @@ Many undefined references
 .. code-block:: console
 
   masterworker.c:209: undefined reference to `sg_version_check'
-  masterworker.c:209: undefined reference to `MSG_init_nocheck'
   (and many other undefined references)
 
 This happens when the linker tries to use the wrong library. Use
index d539895..3c6574d 100644 (file)
@@ -567,9 +567,6 @@ is a better way to visualize SimGrid traces (see below).
 
 .. note::
 
-   If you use an older version of SimGrid (before v3.26), you should use
-   ``--cfg=tracing/msg/process:yes`` instead of ``--cfg=tracing/actor:yes``.
-
 If you want the full power to visualize SimGrid traces, you need
 to use R. As a start, you can download this `starter script
 <https://framagit.org/simgrid/simgrid/raw/master/docs/source/tuto_s4u/draw_gantt.R>`_
index 95bba47..afe1081 100644 (file)
@@ -456,12 +456,12 @@ the plugins.
 From your code, you can interact with these properties using the
 following functions:
 
-- Actor: :cpp:func:`simgrid::s4u::Actor::get_property` or :cpp:func:`MSG_process_get_property_value`
+- Actor: :cpp:func:`simgrid::s4u::Actor::get_property`
 - Cluster: this is a zone, see below.
 - Disk: :cpp:func:`simgrid::s4u::Disk::get_property`
-- Host: :cpp:func:`simgrid::s4u::Host::get_property` or :cpp:func:`MSG_host_get_property_value`
+- Host: :cpp:func:`simgrid::s4u::Host::get_property`
 - Link: :cpp:func:`simgrid::s4u::Link::get_property`
-- Zone: :cpp:func:`simgrid::s4u::NetZone::get_property` of :cpp:func:`MSG_zone_get_property_value`
+- Zone: :cpp:func:`simgrid::s4u::NetZone::get_property`
 
 **Parent tags:** :ref:`pf_tag_actor`, :ref:`pf_tag_config`, :ref:`pf_tag_cluster`, :ref:`pf_tag_host`,
 :ref:`pf_tag_link`, :ref:`pf_tag_disk`,:ref:`pf_tag_zone` |br|
diff --git a/docs/source/app_msg.rst b/docs/source/app_msg.rst
deleted file mode 100644 (file)
index 22eeff6..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-.. _MSG_doc:
-
-The MSG Interface (legacy interface)
-####################################
-
-.. warning::
-
-   MSG used to be the main API of SimGrid 3, but we are currently in
-   the process of releasing SimGrid 4. So MSG is frozen and will
-   probably never evolve. If you are starting a new project, you
-   should consider S4U instead. Note that the support for MSG will not
-   be removed from SimGrid before 2020Q4 or 2021Q1.
-
-   This interface is disabled by default. Pass -Denable_msg=ON to
-   cmake if you still need it.
-
-MSG is a simple API to write algorithms organized with Concurrent
-Sequential Processes (CSP) that interact by exchanging messages. It
-constitutes a convenient simplification of the reality of distributed
-systems. It can be used to build rather realistic simulations, but
-remains simple to use: most unpleasant technical elements can be
-abstracted away rather easily.
-
-C API reference
-***************
-
-Main MSG Functions
-==================
-
-The basic workflow is the following:
-
- - Initialize the library with :c:macro:`MSG_init`
- - Create a platform (usually by parsing a file with :cpp:func:`MSG_create_environment`)
- - Register the functions that your processes are supposed to run with
-   :cpp:func:`MSG_function_register` (and maybe :cpp:func:`MSG_function_register_default`)
- - Launch your processes from a deployment file with :cpp:func:`MSG_launch_application`
- - Run the simulation with :cpp:func:`MSG_main`
-
-.. doxygenenum:: msg_error_t
-
-.. doxygenfunction:: MSG_config
-.. doxygenfunction:: MSG_create_environment
-.. doxygenfunction:: MSG_function_register
-.. doxygenfunction:: MSG_function_register_default
-.. doxygenfunction:: MSG_get_clock
-.. doxygenfunction:: MSG_get_sent_msg
-.. doxygendefine:: MSG_init
-.. doxygenfunction:: MSG_launch_application
-.. doxygenfunction:: MSG_main
-
-Process Management
-==================
-
-This describes the process structure :cpp:type:`msg_process_t` and the functions for managing it.
-
-.. doxygentypedef:: msg_process_t
-.. doxygenfunction:: MSG_process_attach
-.. doxygenfunction:: MSG_process_auto_restart_set
-.. doxygenfunction:: MSG_process_create
-.. doxygenfunction:: MSG_process_create_with_arguments
-.. doxygenfunction:: MSG_process_create_with_environment
-.. doxygenfunction:: MSG_process_daemonize
-.. doxygenfunction:: MSG_process_detach
-.. doxygenfunction:: MSG_process_from_PID
-.. doxygenfunction:: MSG_process_get_data
-.. doxygenfunction:: MSG_process_get_host
-.. doxygenfunction:: MSG_process_get_name
-.. doxygenfunction:: MSG_process_get_PID
-.. doxygenfunction:: MSG_process_get_PPID
-.. doxygenfunction:: MSG_process_get_properties
-.. doxygenfunction:: MSG_process_get_property_value
-.. doxygenfunction:: MSG_process_is_suspended
-.. doxygenfunction:: MSG_process_join
-.. doxygenfunction:: MSG_process_kill
-.. doxygenfunction:: MSG_process_killall
-.. doxygenfunction:: MSG_process_migrate
-.. doxygenfunction:: MSG_process_on_exit
-.. doxygenfunction:: MSG_process_ref
-.. doxygenfunction:: MSG_process_restart
-.. doxygenfunction:: MSG_process_resume
-.. doxygenfunction:: MSG_process_self
-.. doxygenfunction:: MSG_process_self_name
-.. doxygenfunction:: MSG_process_self_PID
-.. doxygenfunction:: MSG_process_self_PPID
-.. doxygenfunction:: MSG_process_set_data
-.. doxygenfunction:: MSG_process_set_data_cleanup
-.. doxygenfunction:: MSG_process_set_kill_time
-.. doxygenfunction:: MSG_process_sleep
-.. doxygenfunction:: MSG_process_suspend
-.. doxygenfunction:: MSG_process_unref
-.. doxygenfunction:: MSG_process_yield
-
-Host Management
-===============
-
-.. doxygentypedef:: msg_host_t
-.. doxygenfunction:: MSG_host_by_name
-.. doxygenfunction:: MSG_get_host_by_name
-.. doxygenfunction:: MSG_get_host_number
-.. doxygenfunction:: MSG_host_get_core_number
-.. doxygenfunction:: MSG_host_get_data
-.. doxygenfunction:: MSG_host_get_name
-.. doxygenfunction:: MSG_host_get_nb_pstates
-.. doxygenfunction:: MSG_host_get_load
-.. doxygenfunction:: MSG_host_get_power_peak_at
-.. doxygenfunction:: MSG_host_get_process_list
-.. doxygenfunction:: MSG_host_get_properties
-.. doxygenfunction:: MSG_host_get_property_value
-.. doxygenfunction:: MSG_host_get_pstate
-.. doxygenfunction:: MSG_host_get_speed
-.. doxygenfunction:: MSG_host_is_on
-.. doxygenfunction:: MSG_host_off
-.. doxygenfunction:: MSG_host_on
-.. doxygenfunction:: MSG_host_self
-.. doxygenfunction:: MSG_host_set_data
-.. doxygenfunction:: MSG_host_set_property_value
-.. doxygenfunction:: MSG_host_set_pstate
-
-Task Management
-===============
-
-Task structure of MSG :cpp:type:`msg_task_t` and associated functions.
-
-.. doxygentypedef:: msg_task_t
-.. doxygentypedef:: const_msg_task_t
-.. doxygendefine:: MSG_TASK_UNINITIALIZED
-
-.. doxygenfunction:: MSG_parallel_task_create
-.. doxygenfunction:: MSG_parallel_task_execute
-.. doxygenfunction:: MSG_parallel_task_execute_with_timeout
-.. doxygenfunction:: MSG_task_cancel
-.. doxygenfunction:: MSG_task_create
-.. doxygenfunction:: MSG_task_destroy
-.. doxygenfunction:: MSG_task_dsend
-.. doxygenfunction:: MSG_task_dsend_bounded
-.. doxygenfunction:: MSG_task_execute
-.. doxygenfunction:: MSG_task_get_bytes_amount
-.. doxygenfunction:: MSG_task_get_category
-.. doxygenfunction:: MSG_task_get_data
-.. doxygenfunction:: MSG_task_get_flops_amount
-.. doxygenfunction:: MSG_task_get_name
-.. doxygenfunction:: MSG_task_get_remaining_communication
-.. doxygenfunction:: MSG_task_get_remaining_work_ratio
-.. doxygenfunction:: MSG_task_get_sender
-.. doxygenfunction:: MSG_task_get_source
-.. doxygenfunction:: MSG_task_irecv
-.. doxygenfunction:: MSG_task_irecv_bounded
-.. doxygenfunction:: MSG_task_isend
-.. doxygenfunction:: MSG_task_isend_bounded
-.. doxygenfunction:: MSG_task_listen
-.. doxygenfunction:: MSG_task_listen_from
-.. doxygenfunction:: MSG_task_receive
-.. doxygenfunction:: MSG_task_receive_bounded
-.. doxygenfunction:: MSG_task_receive_with_timeout
-.. doxygenfunction:: MSG_task_receive_with_timeout_bounded
-.. doxygendefine:: MSG_task_recv
-.. doxygendefine:: MSG_task_recv_bounded
-.. doxygenfunction:: MSG_task_send
-.. doxygenfunction:: MSG_task_send_bounded
-.. doxygenfunction:: MSG_task_send_with_timeout
-.. doxygenfunction:: MSG_task_send_with_timeout_bounded
-.. doxygenfunction:: MSG_task_set_bound
-.. doxygenfunction:: MSG_task_set_bytes_amount
-.. doxygenfunction:: MSG_task_set_category
-.. doxygenfunction:: MSG_task_set_data
-.. doxygenfunction:: MSG_task_set_flops_amount
-.. doxygenfunction:: MSG_task_set_name
-.. doxygenfunction:: MSG_task_set_priority
-
-
-Mailbox Management
-==================
-
-.. doxygenfunction:: MSG_mailbox_set_async
-
-Communications
-==============
-
-.. doxygentypedef:: msg_comm_t
-.. doxygentypedef:: const_msg_comm_t
-.. doxygenfunction:: MSG_comm_destroy
-.. doxygenfunction:: MSG_comm_get_status
-.. doxygenfunction:: MSG_comm_get_task
-.. doxygenfunction:: MSG_comm_test
-.. doxygenfunction:: MSG_comm_testany
-.. doxygenfunction:: MSG_comm_wait
-.. doxygenfunction:: MSG_comm_waitall
-.. doxygenfunction:: MSG_comm_waitany
-
-Explicit Synchronization
-========================
-
-Explicit synchronization mechanisms: semaphores (:cpp:type:`msg_sem_t`) and friends.
-
-In some situations, these things are very helpful to synchronize processes without message exchanges.
-
-Barriers
---------
-
-.. doxygentypedef:: msg_bar_t
-.. doxygenfunction:: MSG_barrier_destroy
-.. doxygenfunction:: MSG_barrier_init
-.. doxygenfunction:: MSG_barrier_wait
-
-Semaphores
-----------
-
-.. doxygentypedef:: msg_sem_t
-.. doxygenfunction:: MSG_sem_acquire
-.. doxygenfunction:: MSG_sem_acquire_timeout
-.. doxygenfunction:: MSG_sem_destroy
-.. doxygenfunction:: MSG_sem_get_capacity
-.. doxygenfunction:: MSG_sem_init
-.. doxygenfunction:: MSG_sem_release
-.. doxygenfunction:: MSG_sem_would_block
-
-Virtual Machines
-================
-
-This interface mimics IaaS clouds.
-With it, you can create virtual machines to put your processes
-into, and interact directly with the VMs to manage groups of
-processes.
-
-.. doxygentypedef:: msg_vm_t
-.. doxygenfunction:: MSG_vm_create_core
-.. doxygenfunction:: MSG_vm_create_multicore
-.. doxygenfunction:: MSG_vm_destroy
-.. doxygenfunction:: MSG_vm_get_name
-.. doxygenfunction:: MSG_vm_get_pm
-.. doxygenfunction:: MSG_vm_get_ramsize
-.. doxygenfunction:: MSG_vm_is_created
-.. doxygenfunction:: MSG_vm_is_running
-.. doxygenfunction:: MSG_vm_is_suspended
-.. doxygenfunction:: MSG_vm_resume
-.. doxygenfunction:: MSG_vm_set_bound
-.. doxygenfunction:: MSG_vm_set_ramsize
-.. doxygenfunction:: MSG_vm_shutdown
-.. doxygenfunction:: MSG_vm_start
-.. doxygenfunction:: MSG_vm_suspend
-
-NetZone Management
-==================
-Network Zone (:cpp:type:`msg_netzone_t`) and associated functions.
-
-.. doxygentypedef:: msg_netzone_t
-.. doxygenfunction:: MSG_zone_get_by_name
-.. doxygenfunction:: MSG_zone_get_hosts
-.. doxygenfunction:: MSG_zone_get_name
-.. doxygenfunction:: MSG_zone_get_property_value
-.. doxygenfunction:: MSG_zone_get_root
-.. doxygenfunction:: MSG_zone_get_sons
-.. doxygenfunction:: MSG_zone_set_property_value
index 53d9a1d..5408491 100644 (file)
@@ -20,15 +20,10 @@ with the full power of C++. This is the preferred interface to describe
 abstract algorithms in the domains of Cloud, P2P, HPC, IoT, and similar
 settings.
 
-Since v3.20 (June 2018), S4U is the way to go for long-term
-projects. It is feature complete, but may still evolve slightly in
-future releases. It can already be used to do everything that can be
-done in SimGrid, but you may have to adapt your code in future
-releases. When this happens, compiling your code will produce
-deprecation warnings for 4 releases (one year) before the removal of
-the old symbols.
-If you want an API that will never ever evolve in the future, you
-should use the :ref:`deprecated MSG API <MSG_doc>` instead.
+Since v3.33 (Spring 2023), S4U is the main interface of SimGrid for algorithms.
+It is feature complete, but may still evolve slightly in future releases.
+When this happens, compiling your code will produce deprecation warnings for 4
+releases (one year) before the removal of the old symbols.
 
 .. _S4U_main_concepts:
 
index 6ccf536..499465a 100644 (file)
@@ -31,13 +31,7 @@ to mix several interfaces in the same simulation.
    MPI profilers). You can reuse this mechanism for any kind of trace
    that you want to replay, for example to study how a P2P DHT overlay
    reacts to a given workload.
- - Simulating algorithms with the legacy interface in C: :ref:`MSG for distributed
-   algorithms <MSG_doc>`. SimGrid was founded in 1998, and many interfaces were proposed
-   along the way. MSG (introduced around 2002) is still present in SimGrid. It
-   does not evolve anymore, but given its popularity, it will not be removed
-   until at least 2020. That being said, our goal is to make S4U so useful that
-   this legacy API becomes useless and obsolete.
- - We are currently working on the ability to modify any existing
+ - A prototypal tool is intended to allow the modification of any existing
    application so that it can run on top of SimGrid. This project,
    called `Remote-SimGrid
    <https://framagit.org/simgrid/remote-simgrid>`_, is somewhat
@@ -55,6 +49,3 @@ applications, but our long term goal would be to allow for the execution
 of any legacy application, with absolutely no modification. We call it
 SimOS, even if it will not become usable before several years of
 additional work.
-
-.. The old documentation of the obsolete MSG replay module was removed in
-..  https://github.com/simgrid/simgrid/commit/e05361c201fb95d2b7605e59001cd0a49a489739
index 0b0eb26..66e541d 100644 (file)
@@ -117,8 +117,6 @@ nitpick_ignore = [
   ('cpp:identifier', 's4u_Semaphore'),
   ('cpp:identifier', 's4u_VM'),
   ('cpp:identifier', 's4u_VirtualMachine'),
-  ('cpp:identifier', 'sg_msg_Comm'),
-  ('cpp:identifier', 'sg_msg_Task'),
   ('cpp:identifier', 'simgrid'),
   ('cpp:identifier', 'simgrid::s4u'),
   ('cpp:identifier', 'simgrid::s4u::Activity_T<Comm>'),
index 689ef77..29008d0 100644 (file)
@@ -73,7 +73,6 @@ of every page. Bugs in the code should be reported
       Describing your application <application.rst>
       Â Â Â The S4U interface <app_s4u.rst>
       Â Â Â The SMPI interface <app_smpi.rst>
-      Â Â Â The MSG interface <app_msg.rst>
       Â Â Â The XBT toolbox <The_XBT_toolbox.rst>
       Describing the simulated platform <Platform.rst>
       Â Â Â Network topology examples <Platform_examples.rst>
index 2f564af..912d7bc 100644 (file)
@@ -32,8 +32,8 @@ in IO operations (Fig. 5 to 7).
   data for your context.
 
 - SimGrid has been in active development since the paper release in
-  2015, thus the MSG and XML description used in the paper may have
-  evolved and may not be available anymore.
+  2015, thus the XML description used in the paper may have evolved 
+  while MSG was superseeded by S4U since then.
 
 Running this tutorial
 ---------------------
index ee082ba..01ed87c 100644 (file)
@@ -30,8 +30,8 @@
 - You must run similar experiments on your hardware to get realistic
   data for your context.
 - SimGrid has been in active development since the paper release in
-  2015, thus the MSG and XML description used in the paper may have
-  evolved and may not be available anymore.
+  2015, thus the XML description used in the paper may have evolved 
+  while MSG was superseeded by S4U since then.
 
 *** Running this tutorial
 
index 43c9923..2995c8d 100644 (file)
@@ -9,8 +9,6 @@
 #define SIMGRID_PUBLIC_CONFIG_H
 #include <xbt/base.h>
 
-/* Was MSG compiled in?  */
-#cmakedefine01 SIMGRID_HAVE_MSG
 /* Were mallocators (object pools) compiled in? */
 #cmakedefine01 SIMGRID_HAVE_MALLOCATOR
 /* Was the model-checking compiled in? */
diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h
deleted file mode 100644 (file)
index af145db..0000000
+++ /dev/null
@@ -1,419 +0,0 @@
-/* Copyright (c) 2004-2023. 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 SIMGRID_MSG_H
-#define SIMGRID_MSG_H
-
-#include <simgrid/actor.h>
-#include <simgrid/barrier.h>
-#include <simgrid/engine.h>
-#include <simgrid/forward.h>
-#include <simgrid/host.h>
-#include <simgrid/instr.h>
-#include <simgrid/mailbox.h>
-#include <simgrid/mutex.h>
-#include <simgrid/plugins/live_migration.h>
-#include <simgrid/semaphore.h>
-#include <simgrid/version.h>
-#include <simgrid/vm.h>
-#include <simgrid/zone.h>
-#include <xbt.h>
-
-#ifndef MIN
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef MAX
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-#endif
-
-#ifdef __cplusplus
-namespace simgrid {
-namespace msg {
-class Comm;
-class Task;
-}
-}
-using sg_msg_Comm = simgrid::msg::Comm;
-using sg_msg_Task = simgrid::msg::Task;
-#else
-typedef struct msg_Comm sg_msg_Comm;
-typedef struct msg_Task sg_msg_Task;
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** @brief Return code of most MSG functions */
-typedef enum {
-  MSG_OK               = 0, /**< @brief Everything is right. Keep on going this way ! */
-  MSG_TIMEOUT          = 1, /**< @brief nothing good happened before the timer you provided elapsed */
-  MSG_TRANSFER_FAILURE = 2, /**< @brief There has been a problem during you task
-    transfer. Either the network is down or the remote host has been
-    shutdown. */
-  MSG_HOST_FAILURE = 4,     /**< @brief System shutdown. The host on which you are
-    running has just been rebooted. Free your datastructures and
-    return now !*/
-  MSG_TASK_CANCELED = 8     /**< @brief Canceled task. This task has been canceled by somebody!*/
-} msg_error_t;
-
-/* *************************** Network Zones ******************************** */
-typedef sg_netzone_t msg_netzone_t;
-
-XBT_PUBLIC msg_netzone_t MSG_zone_get_root();
-XBT_PUBLIC const char* MSG_zone_get_name(const_sg_netzone_t zone);
-XBT_PUBLIC msg_netzone_t MSG_zone_get_by_name(const char* name);
-XBT_PUBLIC void MSG_zone_get_sons(const_sg_netzone_t zone, xbt_dict_t whereto);
-XBT_PUBLIC const char* MSG_zone_get_property_value(const_sg_netzone_t zone, const char* name);
-XBT_PUBLIC void MSG_zone_set_property_value(msg_netzone_t zone, const char* name, const char* value);
-XBT_PUBLIC void MSG_zone_get_hosts(const_sg_netzone_t zone, xbt_dynar_t whereto);
-
-/* ******************************** Hosts ************************************ */
-/** @brief Host datatype.
- *
- * A <em>location</em> (or <em>host</em>) is any possible place where a process may run. Thus it is represented as a
- * <em>physical resource with computing capabilities</em>, some <em>mailboxes</em> to enable running process to
- * communicate with remote ones, and some <em>private data</em> that can be only accessed by local process.
- */
-typedef sg_host_t msg_host_t;
-
-/** @brief Finds a msg_host_t using its name. */
-XBT_PUBLIC sg_host_t MSG_get_host_by_name(const char* name);
-/** @brief Finds a msg_host_t using its name. */
-XBT_PUBLIC sg_host_t MSG_host_by_name(const char* name);
-
-/** @brief Returns the amount of host found in the platform */
-XBT_PUBLIC size_t MSG_get_host_number();
-
-/** @brief Returns the name of this host */
-XBT_PUBLIC const char* MSG_host_get_name(const_sg_host_t host);
-/** @brief Returns the user data of this host */
-XBT_PUBLIC void* MSG_host_get_data(const_sg_host_t host);
-/** @brief Sets the user data of this host */
-XBT_PUBLIC void MSG_host_set_data(sg_host_t host, void* data);
-
-XBT_PUBLIC double MSG_host_get_speed(const_sg_host_t host);
-XBT_PUBLIC double MSG_host_get_power_peak_at(const_sg_host_t host, int pstate_index);
-XBT_PUBLIC int MSG_host_get_core_number(const_sg_host_t host);
-XBT_PUBLIC int MSG_host_get_nb_pstates(const_sg_host_t host);
-XBT_PUBLIC int MSG_host_get_pstate(const_sg_host_t host);
-XBT_PUBLIC void MSG_host_set_pstate(sg_host_t host, int pstate);
-/** @brief Start the host if it is off
- *
- * @beginrst
- * See also :cpp:func:`MSG_host_is_on()` to test the current state of the host, and :ref:`plugin_host_energy`
- * for more info on DVFS.
- * @endrst
- */
-XBT_PUBLIC void MSG_host_on(sg_host_t h);
-/** @brief Stop the host if it is on
- *
- * @beginrst
- * See also :cpp:func:`MSG_host_is_on()` to test the current state of the host, and :ref:`plugin_host_energy`
- * for more info on DVFS.
- * @endrst
- */
-XBT_PUBLIC void MSG_host_off(sg_host_t h);
-XBT_PUBLIC int MSG_host_is_on(const_sg_host_t h);
-XBT_PUBLIC xbt_dict_t MSG_host_get_properties(const_sg_host_t host);
-XBT_PUBLIC const char* MSG_host_get_property_value(const_sg_host_t host, const char* name);
-XBT_PUBLIC void MSG_host_set_property_value(sg_host_t host, const char* name, const char* value);
-XBT_PUBLIC void MSG_host_get_process_list(const_sg_host_t host, xbt_dynar_t whereto);
-
-/** @brief Return the location on which the current process is executed */
-XBT_PUBLIC sg_host_t MSG_host_self();
-XBT_PUBLIC double MSG_host_get_load(const_sg_host_t host);
-
-/* ******************************** VMs ************************************* */
-typedef sg_vm_t msg_vm_t;
-
-XBT_PUBLIC msg_vm_t MSG_vm_create_core(msg_host_t pm, const char* name);
-XBT_PUBLIC msg_vm_t MSG_vm_create_multicore(msg_host_t pm, const char* name, int coreAmount);
-
-XBT_PUBLIC int MSG_vm_is_created(const_sg_vm_t vm);
-XBT_PUBLIC int MSG_vm_is_running(const_sg_vm_t vm);
-XBT_PUBLIC int MSG_vm_is_suspended(const_sg_vm_t vm);
-
-XBT_PUBLIC const char* MSG_vm_get_name(const_sg_vm_t vm);
-XBT_PUBLIC void MSG_vm_set_ramsize(msg_vm_t vm, size_t size);
-XBT_PUBLIC size_t MSG_vm_get_ramsize(const_sg_vm_t vm);
-XBT_PUBLIC msg_host_t MSG_vm_get_pm(const_sg_vm_t vm);
-XBT_PUBLIC void MSG_vm_set_bound(msg_vm_t vm, double bound);
-
-XBT_PUBLIC void MSG_vm_start(msg_vm_t vm);
-XBT_PUBLIC void MSG_vm_suspend(msg_vm_t vm);
-XBT_PUBLIC void MSG_vm_resume(msg_vm_t vm);
-XBT_PUBLIC void MSG_vm_shutdown(msg_vm_t vm);
-XBT_PUBLIC void MSG_vm_destroy(msg_vm_t vm);
-
-/* ******************************** Actor/process *************************** */
-/** Processes 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.
- *
- *  @hideinitializer
- */
-typedef sg_actor_t msg_process_t;
-
-XBT_PUBLIC int MSG_process_get_PID(const_sg_actor_t process);
-XBT_PUBLIC int MSG_process_get_PPID(const_sg_actor_t process);
-/** @brief Return a process from its PID (or NULL if not found).
- *
- * Note that the PID are unique in the whole simulation, not only on a given host.
- */
-XBT_PUBLIC sg_actor_t MSG_process_from_PID(int pid);
-XBT_PUBLIC const char* MSG_process_get_name(const_sg_actor_t process);
-XBT_PUBLIC sg_host_t MSG_process_get_host(const_sg_actor_t process);
-
-/*property handlers*/
-XBT_PUBLIC xbt_dict_t MSG_process_get_properties(const_sg_actor_t process);
-XBT_PUBLIC const char* MSG_process_get_property_value(const_sg_actor_t process, const char* name);
-
-XBT_PUBLIC void MSG_process_suspend(msg_process_t process);
-XBT_PUBLIC void MSG_process_resume(msg_process_t process);
-XBT_PUBLIC int MSG_process_is_suspended(const_sg_actor_t process);
-XBT_PUBLIC void MSG_process_restart(msg_process_t process);
-/** @brief Sets the "auto-restart" flag of the process.
- *
- * If the flag is set, the process will be automatically restarted when its host comes back up.
- */
-XBT_PUBLIC void MSG_process_auto_restart_set(msg_process_t process, int auto_restart);
-/** @brief Indicates that this process should not prevent the simulation from ending
- *
- * SimGrid simulations run until all non-daemon processes are stopped.
- */
-XBT_PUBLIC void MSG_process_daemonize(msg_process_t process);
-/** @brief Immediately changes the host on which this process runs */
-XBT_PUBLIC void MSG_process_migrate(msg_process_t process, msg_host_t host);
-/** @brief Wait for the completion of a process.
- *
- * @param process the process to wait for
- * @param timeout wait until the process is over, or the timeout occurs
- */
-XBT_PUBLIC void MSG_process_join(const_sg_actor_t process, double timeout);
-/** @brief Kills a process */
-XBT_PUBLIC void MSG_process_kill(msg_process_t process);
-/** @brief Kill all running process */
-XBT_PUBLIC void MSG_process_killall();
-/** @brief Specifies the time at which the process should be automatically killed */
-XBT_PUBLIC void MSG_process_set_kill_time(msg_process_t process, double kill_time);
-/** @brief Yield the current actor; let the other actors execute first */
-XBT_PUBLIC void MSG_process_yield();
-/*** @brief Sleep for the specified number of seconds */
-XBT_PUBLIC msg_error_t MSG_process_sleep(double nb_sec);
-XBT_PUBLIC msg_process_t MSG_process_self();
-XBT_PUBLIC aid_t MSG_process_self_PID();
-XBT_PUBLIC aid_t MSG_process_self_PPID();
-XBT_PUBLIC const char* MSG_process_self_name();
-XBT_PUBLIC void MSG_process_ref(const_sg_actor_t process);
-XBT_PUBLIC void MSG_process_unref(const_sg_actor_t process);
-
-/** @brief Object representing an ongoing communication between processes.
- *
- * @beginrst
- * Such beast is usually obtained by using :cpp:func:`MSG_task_isend`, :cpp:func:`MSG_task_irecv` or friends.
- * @endrst
- */
-typedef sg_msg_Comm* msg_comm_t;
-typedef const sg_msg_Comm* const_msg_comm_t;
-
-/** @brief Task datatype.
- *
- *  Since most scheduling algorithms rely on a concept of task  that can be either <em>computed</em> locally or
- *  <em>transferred</em> on another processor, it seems to be the right level of abstraction for our purposes.
- *  A <em>task</em> may then be defined by a <em>computing amount</em>, a <em>message size</em> and
- *  some <em>private data</em>.
- */
-typedef sg_msg_Task* msg_task_t;
-typedef const sg_msg_Task* const_msg_task_t;
-
-/* ******************************** Task ************************************ */
-
-
-/** @brief Default value for an uninitialized #msg_task_t. */
-#define MSG_TASK_UNINITIALIZED NULL
-
-/************************** Global ******************************************/
-/** @brief set a configuration variable
- *
- * @beginrst
- * Do --help on any simgrid binary to see the list of currently existing configuration variables, and see Section
- * :ref:`options`.
- * @endrst
- *
- * Example:
- * MSG_config("host/model","ptask_L07");
- */
-XBT_PUBLIC void MSG_config(const char* key, const char* value);
-/** @brief Initialize the MSG internal data.
- *  @hideinitializer
- *
- *  It also checks that the link-time and compile-time versions of SimGrid do
- *  match, so you should use this version instead of the #MSG_init_nocheck
- *  function that does the same initializations, but without this check.
- *
- *  We allow linking against compiled versions that differ in the patch level.
- */
-#define MSG_init(argc, argv)                                                                                           \
-  do {                                                                                                                 \
-    sg_version_check(SIMGRID_VERSION_MAJOR, SIMGRID_VERSION_MINOR, SIMGRID_VERSION_PATCH);                             \
-    MSG_init_nocheck((argc), (argv));                                                                                  \
-  } while (0)
-
-XBT_PUBLIC void MSG_init_nocheck(int* argc, char** argv);
-/** @brief Launch the MSG simulation */
-XBT_PUBLIC msg_error_t MSG_main();
-/** @brief Registers the main function of a process in a global table.
- *
- * This table is then used by #MSG_launch_application.
- * @param name the reference name of the function.
- * @param code the function (must have the same prototype than the main function of any C program: int ..(int argc, char
- * *argv[]))
- */
-XBT_PUBLIC void MSG_function_register(const char* name, int (*code)(int, char**));
-/** @brief Registers a code function as being the default value.
- *
- * This function will get used by MSG_launch_application() when there is no registered function of the requested name
- * in.
- *
- * @param code the function (must have the same prototype than the main function of any C program: int ..(int argc, char
- * *argv[]))
- */
-XBT_PUBLIC void MSG_function_register_default(int (*code)(int, char**));
-/** @brief Creates a new platform, including hosts, links and the routing_table */
-XBT_PUBLIC void MSG_create_environment(const char* file);
-/** @brief Creates the application described in the provided file */
-XBT_PUBLIC void MSG_launch_application(const char* file);
-
-/** @brief A clock (in second). */
-XBT_PUBLIC double MSG_get_clock();
-/** @brief Returns the amount of messages sent since the simulation start */
-XBT_PUBLIC unsigned long int MSG_get_sent_msg();
-
-/************************** Process handling *********************************/
-XBT_PUBLIC msg_process_t MSG_process_create(const char* name, int (*code)(int, char**), void* data, msg_host_t host);
-XBT_PUBLIC msg_process_t MSG_process_create_with_arguments(const char* name, int (*code)(int, char**), void* data,
-                                                           msg_host_t host, int argc, char** argv);
-XBT_PUBLIC msg_process_t MSG_process_create_with_environment(const char* name, int (*code)(int, char**), void* data,
-                                                             msg_host_t host, int argc, char** argv,
-                                                             xbt_dict_t properties);
-
-XBT_PUBLIC msg_process_t MSG_process_attach(const char* name, void* data, msg_host_t host, xbt_dict_t properties);
-XBT_PUBLIC void MSG_process_detach();
-
-XBT_PUBLIC void MSG_process_set_data_cleanup(void_f_pvoid_t data_cleanup);
-
-XBT_PUBLIC void* MSG_process_get_data(const_sg_actor_t process);
-XBT_PUBLIC msg_error_t MSG_process_set_data(msg_process_t process, void* data);
-
-XBT_PUBLIC void MSG_process_on_exit(int_f_int_pvoid_t fun, void* data);
-
-/************************** Task handling ************************************/
-XBT_PUBLIC msg_task_t MSG_task_create(const char* name, double flops_amount, double bytes_amount, void* data);
-XBT_PUBLIC msg_task_t MSG_parallel_task_create(const char* name, int host_nb, const msg_host_t* host_list,
-                                               double* flops_amount, double* bytes_amount, void* data);
-XBT_PUBLIC void* MSG_task_get_data(const_msg_task_t task);
-XBT_PUBLIC void MSG_task_set_data(msg_task_t task, void* data);
-XBT_PUBLIC msg_process_t MSG_task_get_sender(const_msg_task_t task);
-XBT_PUBLIC msg_host_t MSG_task_get_source(const_msg_task_t task);
-XBT_PUBLIC const char* MSG_task_get_name(const_msg_task_t task);
-XBT_PUBLIC void MSG_task_set_name(msg_task_t task, const char* name);
-XBT_PUBLIC msg_error_t MSG_task_cancel(msg_task_t task);
-XBT_PUBLIC msg_error_t MSG_task_destroy(msg_task_t task);
-
-XBT_PUBLIC msg_error_t MSG_task_execute(msg_task_t task);
-XBT_PUBLIC msg_error_t MSG_parallel_task_execute(msg_task_t task);
-XBT_PUBLIC msg_error_t MSG_parallel_task_execute_with_timeout(msg_task_t task, double timeout);
-XBT_PUBLIC void MSG_task_set_priority(msg_task_t task, double priority);
-XBT_PUBLIC void MSG_task_set_bound(msg_task_t task, double bound);
-
-XBT_PUBLIC void MSG_task_set_flops_amount(msg_task_t task, double flops_amount);
-XBT_PUBLIC double MSG_task_get_flops_amount(const_msg_task_t task);
-XBT_PUBLIC double MSG_task_get_remaining_work_ratio(const_msg_task_t task);
-XBT_PUBLIC void MSG_task_set_bytes_amount(msg_task_t task, double bytes_amount);
-
-XBT_PUBLIC double MSG_task_get_remaining_communication(const_msg_task_t task);
-XBT_PUBLIC double MSG_task_get_bytes_amount(const_msg_task_t task);
-
-XBT_PUBLIC msg_error_t MSG_task_receive_with_timeout(msg_task_t* task, const char* alias, double timeout);
-
-XBT_PUBLIC msg_error_t MSG_task_receive(msg_task_t* task, const char* alias);
-#define MSG_task_recv(t, a) MSG_task_receive((t), (a))
-
-XBT_PUBLIC msg_error_t MSG_task_receive_with_timeout_bounded(msg_task_t* task, const char* alias, double timeout,
-                                                             double rate);
-XBT_PUBLIC msg_error_t MSG_task_receive_bounded(msg_task_t* task, const char* alias, double rate);
-#define MSG_task_recv_bounded(t, a, r) MSG_task_receive_bounded((t), (a), (r))
-
-XBT_PUBLIC msg_comm_t MSG_task_isend(msg_task_t task, const char* alias);
-XBT_PUBLIC msg_comm_t MSG_task_isend_bounded(msg_task_t task, const char* alias, double maxrate);
-
-XBT_PUBLIC void MSG_task_dsend(msg_task_t task, const char* alias, void_f_pvoid_t cleanup);
-XBT_PUBLIC void MSG_task_dsend_bounded(msg_task_t task, const char* alias, void_f_pvoid_t cleanup, double maxrate);
-XBT_PUBLIC msg_comm_t MSG_task_irecv(msg_task_t* task, const char* alias);
-XBT_PUBLIC msg_comm_t MSG_task_irecv_bounded(msg_task_t* task, const char* alias, double rate);
-XBT_PUBLIC int MSG_comm_test(msg_comm_t comm);
-XBT_PUBLIC int MSG_comm_testany(const_xbt_dynar_t comms);
-XBT_PUBLIC void MSG_comm_destroy(const_msg_comm_t comm);
-XBT_PUBLIC msg_error_t MSG_comm_wait(msg_comm_t comm, double timeout);
-XBT_PUBLIC void MSG_comm_waitall(msg_comm_t* comm, int nb_elem, double timeout);
-XBT_PUBLIC int MSG_comm_waitany(const_xbt_dynar_t comms);
-XBT_PUBLIC msg_task_t MSG_comm_get_task(const_msg_comm_t comm);
-XBT_PUBLIC msg_error_t MSG_comm_get_status(const_msg_comm_t comm);
-
-/** @brief Check if there is a communication going on in a mailbox.
- *
- * @param alias the name of the mailbox to be considered
- *
- * @return Returns 1 if there is a communication, 0 otherwise
- */
-XBT_PUBLIC int MSG_task_listen(const char* alias);
-XBT_PUBLIC msg_error_t MSG_task_send_with_timeout(msg_task_t task, const char* alias, double timeout);
-XBT_PUBLIC msg_error_t MSG_task_send_with_timeout_bounded(msg_task_t task, const char* alias, double timeout,
-                                                          double maxrate);
-XBT_PUBLIC msg_error_t MSG_task_send(msg_task_t task, const char* alias);
-XBT_PUBLIC msg_error_t MSG_task_send_bounded(msg_task_t task, const char* alias, double rate);
-XBT_PUBLIC int MSG_task_listen_from(const char* alias);
-XBT_PUBLIC void MSG_task_set_category(msg_task_t task, const char* category);
-XBT_PUBLIC const char* MSG_task_get_category(const_msg_task_t task);
-
-/************************** Mailbox handling ************************************/
-
-/* @brief set a mailbox in eager mode.
- * All messages sent to this mailbox will be transferred to the receiver without waiting for the receive call.
- * The receive call will still be necessary to use the received data.
- * If there is a need to receive some messages asynchronously, and some not, two different mailboxes should be used.
- *
- * This call should be done before issuing any receive, and on the receiver's side only
- */
-XBT_PUBLIC void MSG_mailbox_set_async(const char* alias);
-
-/** @brief Opaque type representing a semaphore */
-typedef sg_sem_t msg_sem_t;
-XBT_PUBLIC msg_sem_t MSG_sem_init(int initial_value);
-XBT_PUBLIC void MSG_sem_acquire(msg_sem_t sem);
-XBT_PUBLIC int MSG_sem_acquire_timeout(msg_sem_t sem, double timeout);
-XBT_PUBLIC void MSG_sem_release(msg_sem_t sem);
-XBT_PUBLIC int MSG_sem_get_capacity(const_sg_sem_t sem);
-XBT_PUBLIC void MSG_sem_destroy(const_sg_sem_t sem);
-XBT_PUBLIC int MSG_sem_would_block(const_sg_sem_t sem);
-
-/** @brief Opaque type representing a barrier identifier */
-typedef sg_bar_t msg_bar_t;
-/** @brief Initializes a barrier, with count elements */
-XBT_PUBLIC msg_bar_t MSG_barrier_init(unsigned int count);
-/** @brief Destroys barrier */
-XBT_PUBLIC void MSG_barrier_destroy(sg_bar_t bar);
-/** @brief Performs a barrier already initialized */
-XBT_PUBLIC int MSG_barrier_wait(msg_bar_t bar);
-
-/* ****************************************************************************************** */
-#ifdef __cplusplus
-}
-#endif
-
-#endif
index 2ee39b4..2f5de80 100644 (file)
@@ -15,10 +15,6 @@ SG_BEGIN_DECL
 
 XBT_PUBLIC void sg_host_dvfs_plugin_init();
 
-#if SIMGRID_HAVE_MSG
-#define MSG_host_dvfs_plugin_init() sg_host_dvfs_plugin_init()
-#endif // SIMGRID_HAVE_MSG
-
 SG_END_DECL
 
 #endif
index 7a52633..ee63dd8 100644 (file)
@@ -31,18 +31,6 @@ XBT_PUBLIC int sg_link_energy_is_inited();
  *  @brief Initialize the wifi energy plugin */
 XBT_PUBLIC void sg_wifi_energy_plugin_init();
 
-#if SIMGRID_HAVE_MSG
-
-#define MSG_host_energy_plugin_init() sg_host_energy_plugin_init()
-#define MSG_host_get_consumed_energy(host) sg_host_get_consumed_energy(host)
-#define MSG_host_get_idle_consumption_at(host,pstate) sg_host_get_idle_consumption_at((host), (pstate))
-#define MSG_host_get_wattmin_at(host,pstate) sg_host_get_wattmin_at((host), (pstate))
-#define MSG_host_get_wattmax_at(host,pstate) sg_host_get_wattmax_at((host), (pstate))
-#define MSG_host_get_power_range_slope_at(host,pstate) sg_host_get_power_range_slope_at((host), (pstate))
-#define MSG_host_get_current_consumption(host) sg_host_get_current_consumption(host)
-
-#endif // SIMGRID_HAVE_MSG
-
 SG_END_DECL
 
 #endif
index d6cbfe6..af744b0 100644 (file)
@@ -46,30 +46,6 @@ XBT_PUBLIC sg_size_t sg_disk_get_size_used(const_sg_disk_t d);
 XBT_PUBLIC sg_size_t sg_disk_get_size(const_sg_disk_t d);
 XBT_PUBLIC const char* sg_disk_get_mount_point(const_sg_disk_t d);
 
-#if SIMGRID_HAVE_MSG
-
-typedef sg_file_t msg_file_t; // MSG backwards compatibility
-
-#define MSG_file_open(fullpath, data) sg_file_open((fullpath), (data))
-#define MSG_file_read(fd, size) sg_file_read((fd), (size))
-#define MSG_file_write(fd, size) sg_file_write((fd), (size))
-#define MSG_file_close(fd) sg_file_close(fd)
-#define MSG_file_get_name(fd) sg_file_get_name(fd)
-#define MSG_file_get_size(fd) sg_file_get_size(fd)
-#define MSG_file_dump(fd) sg_file_dump(fd)
-#define MSG_file_get_data(fd) sg_file_get_data(fd)
-#define MSG_file_set_data(fd, data) sg_file_set_data((fd), (data))
-#define MSG_file_seek(fd, offset, origin) sg_file_seek((fd), (offset), (origin))
-#define MSG_file_tell(fd) sg_file_tell(fd)
-#define MSG_file_move(fd, fullpath) sg_file_get_size((fd), (fullpath))
-#define MSG_file_unlink(fd) sg_file_unlink(fd)
-#define MSG_file_rcopy(file, host, fullpath) sg_file_rcopy((file), (host), (fullpath))
-#define MSG_file_rmove(file, host, fullpath) sg_file_rmove((file), (host), (fullpath))
-
-#define MSG_storage_file_system_init() sg_storage_file_system_init()
-
-#endif // SIMGRID_HAVE_MSG
-
 SG_END_DECL
 
 // C++ interface
index bf0e64c..52f0ed6 100644 (file)
@@ -29,18 +29,6 @@ XBT_PUBLIC int sg_vm_is_migrating(const_sg_vm_t vm);
 XBT_PUBLIC sg_vm_t sg_vm_create_migratable(sg_host_t pm, const char* name, int coreAmount, int ramsize,
                                            int mig_netspeed, int dp_intensity);
 
-#if SIMGRID_HAVE_MSG
-
-#define MSG_vm_live_migration_plugin_init() sg_vm_live_migration_plugin_init()
-
-#define MSG_vm_create_migratable(pm, name, coreAmount, ramsize, mig_netspeed, dp_intensity)                            \
-  sg_vm_create_migratable((pm), (name), (coreAmount), (ramsize), (mig_netspeed), (dp_intensity))
-
-#define MSG_vm_is_migrating(vm) sg_vm_is_migrating(vm)
-#define MSG_vm_migrate(vm, dst_pm) sg_vm_migrate((vm), (dst_pm))
-
-#endif // SIMGRID_HAVE_MSG
-
 SG_END_DECL
 
 #endif
index e2efbdd..41f9563 100644 (file)
@@ -29,19 +29,6 @@ XBT_PUBLIC double sg_link_get_avg_load(const_sg_link_t link);
 XBT_PUBLIC double sg_link_get_min_instantaneous_load(const_sg_link_t link);
 XBT_PUBLIC double sg_link_get_max_instantaneous_load(const_sg_link_t link);
 
-#if SIMGRID_HAVE_MSG
-
-#define MSG_host_load_plugin_init() sg_host_load_plugin_init()
-/** @brief Returns the current load of that host, as a ratio = achieved_flops / (core_current_speed * core_amount)
- *
- *  See simgrid::plugin::HostLoad::get_current_load() for the full documentation.
- */
-#define MSG_host_get_current_load(host) sg_host_get_current_load(host)
-#define MSG_host_get_computed_flops(host) sg_host_get_computed_flops(host)
-#define MSG_host_get_avg_load(host) sg_host_get_avg_load(host)
-
-#endif // SIMGRID_HAVE_MSG
-
 SG_END_DECL
 
 #endif
index a80884c..29e01ee 100644 (file)
@@ -155,8 +155,7 @@ sonar.issue.ignore.multicriteria.s5.resourceKey=src/smpi/bindings/*.cpp
 #  - the NAS, that are included in our examples
 #  - The Catch2 library, that is included in our unit tests
 #  - The xxHash library, used by the MC
-#  - MSG along with its examples and teshsuite
-sonar.exclusions=src/include/catch.hpp,src/include/xxhash.hpp,src/*_unit.c*,teshsuite/smpi/mpich3-test/**,teshsuite/smpi/MBI/**,**/*_dtd.c,**/*_dtd.h,**/*yy.c,src/xbt/automaton/parserPromela.tab.*,src/smpi/colls/**/*,examples/smpi/NAS/*,examples/smpi/gemm/gemm.c,src/msg/**,include/msg/**,teshsuite/msg/**
+sonar.exclusions=src/include/catch.hpp,src/include/xxhash.hpp,src/*_unit.c*,teshsuite/smpi/mpich3-test/**,teshsuite/smpi/MBI/**,**/*_dtd.c,**/*_dtd.h,**/*yy.c,src/xbt/automaton/parserPromela.tab.*,src/smpi/colls/**/*,examples/smpi/NAS/*,examples/smpi/gemm/gemm.c
 
 # Exclude our examples from the duplication detection.
 # Examples are expected to be somehow repetitive
@@ -176,8 +175,7 @@ sonar.cfamily.gcov.reportsPath=Testing/CoverageInfo
 #   - examples in smpi/mc (coverage doesn't work with model checker)
 #   - XML files
 #   - Python files used to generate either simcalls or deployment files
-#   - MSG (deprecated too)
-sonar.coverage.exclusions=teshsuite/smpi/mpich3-test/**,teshsuite/smpi/MBI/**,examples/smpi/mc/**,**/*.xml,**/generate.py,src/msg/**,include/msg/**,teshsuite/msg/**
+sonar.coverage.exclusions=teshsuite/smpi/mpich3-test/**,teshsuite/smpi/MBI/**,examples/smpi/mc/**,**/*.xml,**/generate.py,
 
 # Encoding of the source files
 sonar.sourceEncoding=UTF-8
index 7da5072..7bbb815 100644 (file)
@@ -4,7 +4,6 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/kernel/activity/MailboxImpl.hpp"
-#include "simgrid/msg.h"
 #include "src/kernel/activity/CommImpl.hpp"
 
 #include <unordered_map>
diff --git a/src/msg/msg_comm.cpp b/src/msg/msg_comm.cpp
deleted file mode 100644 (file)
index ee668fc..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-/* Copyright (c) 2004-2023. 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 <cmath>
-
-#include "simgrid/Exception.hpp"
-#include "simgrid/s4u/Actor.hpp"
-#include "simgrid/s4u/Comm.hpp"
-#include "simgrid/s4u/Exec.hpp"
-#include "simgrid/s4u/Mailbox.hpp"
-#include "src/instr/instr_private.hpp"
-#include "src/msg/msg_private.hpp"
-
-namespace simgrid::msg {
-
-bool Comm::test()
-{
-  bool finished = false;
-
-  try {
-    finished = s_comm->test();
-    if (finished && task_received != nullptr) {
-      /* I am the receiver */
-      (*task_received)->set_not_used();
-    }
-  } catch (const simgrid::TimeoutException&) {
-    status_  = MSG_TIMEOUT;
-    finished = true;
-  } catch (const simgrid::CancelException&) {
-    status_  = MSG_TASK_CANCELED;
-    finished = true;
-  } catch (const simgrid::NetworkFailureException&) {
-    status_  = MSG_TRANSFER_FAILURE;
-    finished = true;
-  }
-
-  return finished;
-}
-msg_error_t Comm::wait_for(double timeout)
-{
-  try {
-    s_comm->wait_for(timeout);
-
-    if (task_received != nullptr) {
-      /* I am the receiver */
-      (*task_received)->set_not_used();
-    }
-
-    /* FIXME: these functions are not traceable */
-  } catch (const simgrid::TimeoutException&) {
-    status_ = MSG_TIMEOUT;
-  } catch (const simgrid::CancelException&) {
-    status_ = MSG_TASK_CANCELED;
-  } catch (const simgrid::NetworkFailureException&) {
-    status_ = MSG_TRANSFER_FAILURE;
-  }
-
-  return status_;
-}
-} // namespace simgrid::msg
-
-/**
- * @brief Checks whether a communication is done, and if yes, finalizes it.
- * @param comm the communication to test
- * @return 'true' if the communication is finished
- * (but it may have failed, use MSG_comm_get_status() to know its status)
- * or 'false' if the communication is not finished yet
- * If the status is 'false', don't forget to use MSG_process_sleep() after the test.
- */
-int MSG_comm_test(msg_comm_t comm)
-{
-  return comm->test();
-}
-
-/**
- * @brief This function checks if a communication is finished.
- * @param comms a vector of communications
- * @return the position of the finished communication if any
- * (but it may have failed, use MSG_comm_get_status() to know its status), or -1 if none is finished
- */
-int MSG_comm_testany(const_xbt_dynar_t comms)
-{
-  ssize_t finished_index = -1;
-
-  /* Create the equivalent array with SIMIX objects: */
-  std::vector<simgrid::s4u::CommPtr> s_comms;
-  s_comms.reserve(xbt_dynar_length(comms));
-  msg_comm_t comm;
-  unsigned int cursor;
-  xbt_dynar_foreach (comms, cursor, comm)
-    s_comms.push_back(comm->s_comm);
-
-  msg_error_t status = MSG_OK;
-  try {
-    finished_index = simgrid::s4u::Comm::test_any(s_comms);
-  } catch (const simgrid::TimeoutException& e) {
-    finished_index = e.get_value();
-    status         = MSG_TIMEOUT;
-  } catch (const simgrid::CancelException& e) {
-    finished_index = e.get_value();
-    status         = MSG_TASK_CANCELED;
-  } catch (const simgrid::NetworkFailureException& e) {
-    finished_index = e.get_value();
-    status         = MSG_TRANSFER_FAILURE;
-  }
-
-  if (finished_index != -1) {
-    comm = xbt_dynar_get_as(comms, finished_index, msg_comm_t);
-    /* the communication is finished */
-    comm->set_status(status);
-
-    if (status == MSG_OK && comm->task_received != nullptr) {
-      /* I am the receiver */
-      (*comm->task_received)->set_not_used();
-    }
-  }
-
-  return static_cast<int>(finished_index);
-}
-
-/** @brief Destroys the provided communication. */
-void MSG_comm_destroy(const_msg_comm_t comm)
-{
-  delete comm;
-}
-
-/** @brief Wait for the completion of a communication.
- *
- * It takes two parameters.
- * @param comm the communication to wait.
- * @param timeout Wait until the communication terminates or the timeout occurs.
- *                You can provide a -1 timeout to obtain an infinite timeout.
- * @return msg_error_t
- */
-msg_error_t MSG_comm_wait(msg_comm_t comm, double timeout)
-{
-  return comm->wait_for(timeout);
-}
-
-/** @brief This function is called by a sender and permits waiting for each communication
- *
- * @param comm a vector of communication
- * @param nb_elem is the size of the comm vector
- * @param timeout for each call of MSG_comm_wait
- */
-void MSG_comm_waitall(msg_comm_t* comm, int nb_elem, double timeout)
-{
-  for (int i = 0; i < nb_elem; i++)
-    comm[i]->wait_for(timeout);
-}
-
-/** @brief This function waits for the first communication finished in a list.
- * @param comms a vector of communications
- * @return the position of the first finished communication
- * (but it may have failed, use MSG_comm_get_status() to know its status)
- */
-int MSG_comm_waitany(const_xbt_dynar_t comms)
-{
-  ssize_t finished_index = -1;
-
-  /* Create the equivalent array with SIMIX objects: */
-  std::vector<simgrid::s4u::CommPtr> s_comms;
-  s_comms.reserve(xbt_dynar_length(comms));
-  msg_comm_t comm;
-  unsigned int cursor;
-  xbt_dynar_foreach (comms, cursor, comm) {
-    s_comms.push_back(comm->s_comm);
-  }
-
-  msg_error_t status = MSG_OK;
-  try {
-    finished_index = simgrid::s4u::Comm::wait_any_for(s_comms, -1);
-  } catch (const simgrid::TimeoutException& e) {
-    finished_index = e.get_value();
-    status         = MSG_TIMEOUT;
-  } catch (const simgrid::CancelException& e) {
-    finished_index = e.get_value();
-    status         = MSG_TASK_CANCELED;
-  } catch (const simgrid::NetworkFailureException& e) {
-    finished_index = e.get_value();
-    status         = MSG_TRANSFER_FAILURE;
-  }
-
-  xbt_assert(finished_index != -1, "WaitAny returned -1");
-
-  comm = xbt_dynar_get_as(comms, finished_index, msg_comm_t);
-  /* the communication is finished */
-  comm->set_status(status);
-
-  if (comm->task_received != nullptr) {
-    /* I am the receiver */
-    (*comm->task_received)->set_not_used();
-  }
-
-  return static_cast<int>(finished_index);
-}
-
-/**
- * @brief Returns the error (if any) that occurred during a finished communication.
- * @param comm a finished communication
- * @return the status of the communication, or #MSG_OK if no error occurred during the communication
- */
-msg_error_t MSG_comm_get_status(const_msg_comm_t comm)
-{
-  return comm->get_status();
-}
-
-/** @brief Get a task (#msg_task_t) from a communication
- *
- * @param comm the communication where to get the task
- * @return the task from the communication
- */
-msg_task_t MSG_comm_get_task(const_msg_comm_t comm)
-{
-  xbt_assert(comm, "Invalid parameter");
-
-  return comm->task_received ? *comm->task_received : comm->task_sent;
-}
diff --git a/src/msg/msg_global.cpp b/src/msg/msg_global.cpp
deleted file mode 100644 (file)
index 957edf1..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright (c) 2004-2023. 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 "mc/mc.h"
-#include "simgrid/s4u/Engine.hpp"
-#include "simgrid/s4u/Host.hpp"
-#include "src/instr/instr_private.hpp"
-#include "src/kernel/EngineImpl.hpp"
-#include "src/msg/msg_private.hpp"
-#include <xbt/config.hpp>
-
-XBT_LOG_NEW_CATEGORY(msg, "All MSG categories");
-
-bool MSG_Global_t::debug_multiple_use = false;
-
-MSG_Global_t* msg_global = nullptr;
-
-static void MSG_exit();
-
-/********************************* MSG **************************************/
-
-/**
- * @ingroup msg_simulation
- * @brief Initialize MSG with less verifications
- * You should use the MSG_init() function instead. Failing to do so may turn into PEBKAC some day. You've been warned.
- */
-void MSG_init_nocheck(int* argc, char** argv)
-{
-  simgrid::instr::init();
-
-  if (not msg_global) {
-    simgrid::config::bind_flag(MSG_Global_t::debug_multiple_use, "msg/debug-multiple-use",
-                               "Print backtraces of both processes when there is a conflict of multiple use of a task");
-
-    simgrid::kernel::EngineImpl::get_instance(argc, argv);
-
-    msg_global = new MSG_Global_t();
-
-    msg_global->sent_msg = 0;
-    msg_global->task_copy_callback = nullptr;
-    msg_global->process_data_cleanup = nullptr;
-    simgrid::s4u::Actor::on_termination_cb([](simgrid::s4u::Actor const& actor) {
-      // free the data if a function was provided
-      void* userdata = sg_actor_get_data(&actor);
-      if (userdata && msg_global->process_data_cleanup)
-        msg_global->process_data_cleanup(userdata);
-    });
-  }
-
-  /* Ignore total amount of messages sent during the simulation for heap comparison */
-  MC_ignore_heap(&msg_global->sent_msg, sizeof msg_global->sent_msg);
-
-  if (simgrid::config::get_value<bool>("debug/clean-atexit"))
-    atexit(MSG_exit);
-}
-
-void MSG_config(const char* key, const char* value)
-{
-  xbt_assert(msg_global,"ERROR: Please call MSG_init() before using MSG_config()");
-  simgrid::config::set_as_string(key, value);
-}
-
-static void MSG_exit()
-{
-  delete msg_global;
-  msg_global = nullptr;
-}
-
-unsigned long int MSG_get_sent_msg()
-{
-  return msg_global->sent_msg;
-}
diff --git a/src/msg/msg_legacy.cpp b/src/msg/msg_legacy.cpp
deleted file mode 100644 (file)
index 0968f4d..0000000
+++ /dev/null
@@ -1,443 +0,0 @@
-/* Copyright (c) 2004-2023. 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 "simgrid/Exception.hpp"
-#include "simgrid/s4u/Engine.hpp"
-#include "src/msg/msg_private.hpp"
-#include "xbt/functional.hpp"
-
-#define MSG_CALL(type, oldname, args)
-
-/* ************************** Engine *************************** */
-void MSG_create_environment(const char* filename)
-{
-  simgrid_load_platform(filename);
-}
-
-void MSG_launch_application(const char* filename)
-{
-  simgrid_load_deployment(filename);
-}
-msg_error_t MSG_main()
-{
-  simgrid_run();
-  return MSG_OK;
-}
-void MSG_function_register(const char* name, int (*code)(int, char**))
-{
-  simgrid::kernel::actor::ActorCodeFactory code_factory = [code](std::vector<std::string> args) {
-    return simgrid::xbt::wrap_main(code, std::move(args));
-  };
-  simgrid::s4u::Engine::get_instance()->register_function(name, code_factory);
-}
-void MSG_function_register_default(int (*code)(int, char**))
-{
-  simgrid::s4u::Engine::get_instance()->register_default(
-      [code](std::vector<std::string> args) { return simgrid::xbt::wrap_main(code, std::move(args)); });
-}
-double MSG_get_clock()
-{
-  return simgrid_get_clock();
-}
-
-/* ************************** Mailboxes ************************ */
-void MSG_mailbox_set_async(const char* alias)
-{
-  sg_mailbox_set_receiver(alias);
-}
-int MSG_task_listen(const char* alias)
-{
-  return sg_mailbox_listen(alias);
-}
-
-/* ************************** Actors *************************** */
-void MSG_process_on_exit(int_f_int_pvoid_t fun, void* data)
-{
-  /* We can't use the sg_actor_on_exit, as the return type of the callback changed: the int in MSG is ignored and was
-   * removed in sg */
-  simgrid::s4u::this_actor::on_exit([fun, data](bool failed) { fun(failed ? 1 /*FAILURE*/ : 0 /*SUCCESS*/, data); });
-}
-
-int MSG_process_get_PID(const_sg_actor_t actor)
-{
-  return sg_actor_get_pid(actor);
-}
-int MSG_process_get_PPID(const_sg_actor_t actor)
-{
-  return sg_actor_get_ppid(actor);
-}
-msg_process_t MSG_process_from_PID(int pid)
-{
-  return sg_actor_by_pid(pid);
-}
-const char* MSG_process_get_name(const_sg_actor_t actor)
-{
-  return sg_actor_get_name(actor);
-}
-sg_host_t MSG_process_get_host(const_sg_actor_t actor)
-{
-  return sg_actor_get_host(actor);
-}
-xbt_dict_t MSG_process_get_properties(const_sg_actor_t actor)
-{
-  return sg_actor_get_properties(actor);
-}
-const char* MSG_process_get_property_value(const_sg_actor_t actor, const char* name)
-{
-  return sg_actor_get_property_value(actor, name);
-}
-void MSG_process_suspend(sg_actor_t actor)
-{
-  sg_actor_suspend(actor);
-}
-void MSG_process_resume(sg_actor_t actor)
-{
-  sg_actor_resume(actor);
-}
-int MSG_process_is_suspended(const_sg_actor_t actor)
-{
-  return sg_actor_is_suspended(actor);
-}
-void MSG_process_restart(sg_actor_t actor)
-{
-  sg_actor_restart(actor);
-}
-void MSG_process_auto_restart_set(sg_actor_t actor, int auto_restart)
-{
-  sg_actor_set_auto_restart(actor, auto_restart);
-}
-
-void MSG_process_daemonize(sg_actor_t actor)
-{
-  sg_actor_daemonize(actor);
-}
-void MSG_process_migrate(sg_actor_t actor, sg_host_t host)
-{
-  sg_actor_set_host(actor, host);
-}
-void MSG_process_join(const_sg_actor_t actor, double timeout)
-{
-  sg_actor_join(actor, timeout);
-}
-void MSG_process_kill(sg_actor_t actor)
-{
-  sg_actor_kill(actor);
-}
-void MSG_process_killall()
-{
-  sg_actor_kill_all();
-}
-void MSG_process_set_kill_time(sg_actor_t actor, double kill_time)
-{
-  sg_actor_set_kill_time(actor, kill_time);
-}
-void MSG_process_yield()
-{
-  sg_actor_yield();
-}
-
-msg_error_t MSG_process_sleep(double duration)
-{
-  try {
-    sg_actor_sleep_for(duration);
-    return MSG_OK;
-  } catch (const simgrid::HostFailureException&) {
-    return MSG_HOST_FAILURE;
-  }
-}
-
-/** @brief Returns the user data of a process.
- *
- * This function checks whether @a process is a valid pointer and returns the user data associated to this process.
- */
-void* MSG_process_get_data(const_sg_actor_t process)
-{
-  xbt_assert(process != nullptr, "Invalid parameter: first parameter must not be nullptr!");
-
-  /* get from SIMIX the MSG process data, and then the user data */
-  return sg_actor_get_data(process);
-}
-
-/** @brief Sets the user data of a process.
- *
- * This function checks whether @a process is a valid pointer and sets the user data associated to this process.
- */
-msg_error_t MSG_process_set_data(msg_process_t process, void* data)
-{
-  xbt_assert(process != nullptr, "Invalid parameter: first parameter must not be nullptr!");
-  sg_actor_set_data(process, data);
-
-  return MSG_OK;
-}
-
-msg_process_t MSG_process_attach(const char* name, void* data, msg_host_t host, xbt_dict_t properties)
-{
-  return sg_actor_attach(name, data, host, properties);
-}
-
-void MSG_process_detach()
-{
-  sg_actor_detach();
-}
-aid_t MSG_process_self_PID()
-{
-  return sg_actor_self_get_pid();
-}
-
-/** @brief Return the PPID of the current process.
- *
- * This function returns the PID of the parent of the currently running #msg_process_t.
- */
-aid_t MSG_process_self_PPID()
-{
-  return sg_actor_self_get_ppid();
-}
-
-/** @brief Return the name of the current process. */
-const char* MSG_process_self_name()
-{
-  return sg_actor_self_get_name();
-}
-/** @brief Return the current process.
- *
- * This function returns the currently running #msg_process_t.
- */
-msg_process_t MSG_process_self()
-{
-  return sg_actor_self();
-}
-
-/** @brief Take an extra reference on that process to prevent it to be garbage-collected */
-void MSG_process_ref(const_sg_actor_t process)
-{
-  sg_actor_ref(process);
-}
-/** @brief Release a reference on that process so that it can get be garbage-collected */
-void MSG_process_unref(const_sg_actor_t process)
-{
-  sg_actor_unref(process);
-}
-
-/* ************************** NetZones *************************** */
-sg_netzone_t MSG_zone_get_root()
-{
-  return sg_zone_get_root();
-}
-const char* MSG_zone_get_name(const_sg_netzone_t zone)
-{
-  return sg_zone_get_name(zone);
-}
-sg_netzone_t MSG_zone_get_by_name(const char* name)
-{
-  return sg_zone_get_by_name(name);
-}
-void MSG_zone_get_sons(const_sg_netzone_t zone, xbt_dict_t whereto)
-{
-  return sg_zone_get_sons(zone, whereto);
-}
-const char* MSG_zone_get_property_value(const_sg_netzone_t zone, const char* name)
-{
-  return sg_zone_get_property_value(zone, name);
-}
-void MSG_zone_set_property_value(sg_netzone_t zone, const char* name, const char* value)
-{
-  sg_zone_set_property_value(zone, name, value);
-}
-void MSG_zone_get_hosts(const_sg_netzone_t zone, xbt_dynar_t whereto)
-{
-  sg_zone_get_hosts(zone, whereto);
-}
-
-/* ************************** hosts *************************** */
-size_t MSG_get_host_number()
-{
-  return sg_host_count();
-}
-sg_host_t MSG_get_host_by_name(const char* name)
-{
-  return sg_host_by_name(name);
-}
-sg_host_t MSG_host_by_name(const char* name)
-{
-  return sg_host_by_name(name);
-}
-const char* MSG_host_get_name(const_sg_host_t host)
-{
-  return sg_host_get_name(host);
-}
-void* MSG_host_get_data(const_sg_host_t host)
-{
-  return sg_host_get_data(host);
-}
-void MSG_host_set_data(sg_host_t host, void* data)
-{
-  return sg_host_set_data(host, data);
-}
-double MSG_host_get_speed(const_sg_host_t host)
-{
-  return sg_host_get_speed(host);
-}
-double MSG_host_get_power_peak_at(const_sg_host_t host, int pstate_index)
-{
-  return sg_host_get_pstate_speed(host, pstate_index);
-}
-int MSG_host_get_core_number(const_sg_host_t host)
-{
-  return sg_host_core_count(host);
-}
-int MSG_host_get_nb_pstates(const_sg_host_t host)
-{
-  return sg_host_get_nb_pstates(host);
-}
-int MSG_host_get_pstate(const_sg_host_t host)
-{
-  return sg_host_get_pstate(host);
-}
-void MSG_host_set_pstate(sg_host_t host, int pstate)
-{
-  sg_host_set_pstate(host, pstate);
-}
-void MSG_host_on(sg_host_t h)
-{
-  sg_host_turn_on(h);
-}
-void MSG_host_off(sg_host_t h)
-{
-  sg_host_turn_off(h);
-}
-int MSG_host_is_on(const_sg_host_t h)
-{
-  return sg_host_is_on(h);
-}
-xbt_dict_t MSG_host_get_properties(const_sg_host_t host)
-{
-  return sg_host_get_properties(host);
-}
-const char* MSG_host_get_property_value(const_sg_host_t host, const char* name)
-{
-  return sg_host_get_property_value(host, name);
-}
-void MSG_host_set_property_value(sg_host_t host, const char* name, const char* value)
-{
-  sg_host_set_property_value(host, name, value);
-}
-void MSG_host_get_process_list(const_sg_host_t host, xbt_dynar_t whereto)
-{
-  sg_host_get_actor_list(host, whereto);
-}
-sg_host_t MSG_host_self()
-{
-  return sg_host_self();
-}
-
-double MSG_host_get_load(const_sg_host_t host)
-{
-  return sg_host_get_load(host);
-}
-/* ************************** Virtual Machines *************************** */
-sg_vm_t MSG_vm_create_core(sg_host_t pm, const char* name)
-{
-  return sg_vm_create_core(pm, name);
-}
-sg_vm_t MSG_vm_create_multicore(sg_host_t pm, const char* name, int coreAmount)
-{
-  return sg_vm_create_multicore(pm, name, coreAmount);
-}
-int MSG_vm_is_created(const_sg_vm_t vm)
-{
-  return sg_vm_is_created(vm);
-}
-int MSG_vm_is_running(const_sg_vm_t vm)
-{
-  return sg_vm_is_running(vm);
-}
-int MSG_vm_is_suspended(const_sg_vm_t vm)
-{
-  return sg_vm_is_suspended(vm);
-}
-const char* MSG_vm_get_name(const_sg_vm_t vm)
-{
-  return sg_vm_get_name(vm);
-}
-void MSG_vm_set_ramsize(sg_vm_t vm, size_t size)
-{
-  sg_vm_set_ramsize(vm, size);
-}
-size_t MSG_vm_get_ramsize(const_sg_vm_t vm)
-{
-  return sg_vm_get_ramsize(vm);
-}
-sg_host_t MSG_vm_get_pm(const_sg_vm_t vm)
-{
-  return sg_vm_get_pm(vm);
-}
-void MSG_vm_set_bound(sg_vm_t vm, double bound)
-{
-  sg_vm_set_bound(vm, bound);
-}
-void MSG_vm_start(sg_vm_t vm)
-{
-  sg_vm_start(vm);
-}
-void MSG_vm_suspend(sg_vm_t vm)
-{
-  sg_vm_suspend(vm);
-}
-void MSG_vm_resume(sg_vm_t vm)
-{
-  sg_vm_resume(vm);
-}
-void MSG_vm_shutdown(sg_vm_t vm)
-{
-  sg_vm_shutdown(vm);
-}
-void MSG_vm_destroy(sg_vm_t vm)
-{
-  sg_vm_destroy(vm);
-}
-/********* barriers ************/
-sg_bar_t MSG_barrier_init(unsigned int count)
-{
-  return sg_barrier_init(count);
-}
-
-void MSG_barrier_destroy(sg_bar_t bar)
-{
-  sg_barrier_destroy(bar);
-}
-
-int MSG_barrier_wait(sg_bar_t bar)
-{
-  return sg_barrier_wait(bar);
-}
-
-sg_sem_t MSG_sem_init(int initial_value)
-{
-  return sg_sem_init(initial_value);
-}
-void MSG_sem_acquire(sg_sem_t sem)
-{
-  sg_sem_acquire(sem);
-}
-int MSG_sem_acquire_timeout(sg_sem_t sem, double timeout)
-{
-  return sg_sem_acquire_timeout(sem, timeout);
-}
-void MSG_sem_release(sg_sem_t sem)
-{
-  sg_sem_release(sem);
-}
-int MSG_sem_get_capacity(const_sg_sem_t sem)
-{
-  return sg_sem_get_capacity(sem);
-}
-void MSG_sem_destroy(const_sg_sem_t sem)
-{
-  sg_sem_destroy(sem);
-}
-int MSG_sem_would_block(const_sg_sem_t sem)
-{
-  return sg_sem_would_block(sem);
-}
diff --git a/src/msg/msg_private.hpp b/src/msg/msg_private.hpp
deleted file mode 100644 (file)
index 46460de..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved.          */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef MSG_PRIVATE_HPP
-#define MSG_PRIVATE_HPP
-
-#include "simgrid/Exception.hpp"
-#include "simgrid/msg.h"
-#include "src/kernel/activity/CommImpl.hpp"
-#include <simgrid/modelchecker.h>
-#include <xbt/Extendable.hpp>
-
-#include <cmath>
-
-/**************** datatypes **********************************/
-namespace simgrid {
-
-extern template class XBT_PUBLIC xbt::Extendable<msg::Task>;
-
-namespace msg {
-class Task : public xbt::Extendable<Task> {
-  std::string name_             = "";
-  std::string tracing_category_ = "";
-  long long int id_;
-
-  double timeout_  = -1;    /* Default timeout is infinite */
-  double priority_ = 1.0;
-  double bound_    = 0.0;   /* Capping for CPU resource, or 0 for no capping */
-  double rate_     = -1;    /* Capping for network resource, or -1 for no capping*/
-  bool is_used_    = false; /* Indicates whether the task is used in SIMIX currently */
-
-  explicit Task(const std::string& name, double flops_amount, double bytes_amount, void* data);
-  explicit Task(const std::string& name, std::vector<s4u::Host*>&& hosts, std::vector<double>&& flops_amount,
-                std::vector<double>&& bytes_amount, void* data);
-
-  void report_multiple_use() const;
-
-public:
-  static Task* create(const std::string& name, double flops_amount, double bytes_amount, void* data);
-  static Task* create_parallel(const std::string& name, int host_nb, const msg_host_t* host_list, double* flops_amount,
-                               double* bytes_amount, void* data);
-  msg_error_t execute();
-  msg_error_t send(const std::string& alias, double timeout);
-  s4u::CommPtr send_async(const std::string& alias, void_f_pvoid_t cleanup, bool detached);
-
-  void cancel();
-
-  Task(const Task&) = delete;
-  Task& operator=(const Task&) = delete;
-
-  bool is_used() const { return is_used_; }
-  bool is_parallel() const { return parallel_; }
-
-  void set_used();
-  void set_not_used() { this->is_used_ = false; }
-  const std::string& get_name() const { return name_; }
-  const char* get_cname() const { return name_.c_str(); }
-  void set_name(const char* new_name) { name_ = new_name; }
-  void set_tracing_category(const char* category) { tracing_category_ = category ? category : ""; }
-  const std::string& get_tracing_category() const { return tracing_category_; }
-  bool has_tracing_category() { return not tracing_category_.empty(); }
-  long long int get_id() const { return id_; }
-  double get_priority() const { return priority_; }
-  void set_priority(double priority);
-  void set_bound(double bound) { bound_ = bound; }
-  double get_bound() const { return bound_; }
-  void set_rate(double rate) { rate_ = rate; }
-  double get_rate() const { return rate_; }
-  void set_timeout(double timeout) { timeout_ = timeout; }
-
-  s4u::Actor* get_sender() const;
-  s4u::Host* get_source() const;
-
-  s4u::ExecPtr compute = nullptr; /* S4U modeling of computation */
-  s4u::CommPtr comm    = nullptr; /* S4U modeling of communication */
-  double flops_amount  = 0.0;     /* Computation size */
-  double bytes_amount  = 0.0;     /* Data size */
-
-  /*******  Parallel Tasks Only !!!! *******/
-  bool parallel_ = false;
-  std::vector<s4u::Host*> hosts_;
-  std::vector<double> flops_parallel_amount;
-  std::vector<double> bytes_parallel_amount;
-};
-
-class Comm {
-  msg_error_t status_ = MSG_OK; /* status of the communication once finished */
-public:
-  Task* task_sent;             /* task sent (NULL for the receiver) */
-  Task** task_received;        /* where the task will be received (NULL for the sender) */
-  s4u::CommPtr s_comm;         /* SIMIX communication object encapsulated (the same for both processes) */
-  Comm(msg_task_t sent, msg_task_t* received, s4u::CommPtr comm)
-      : task_sent(sent), task_received(received), s_comm(std::move(comm))
-  {
-  }
-  bool test();
-  msg_error_t wait_for(double timeout);
-  void set_status(msg_error_t status) { status_ = status; }
-  msg_error_t get_status() const { return status_; }
-};
-
-} // namespace msg
-} // namespace simgrid
-
-/************************** Global variables ********************************/
-struct MSG_Global_t {
-  static bool debug_multiple_use;    /* whether we want an error message when reusing the same Task for 2 things */
-  std::atomic_int_fast32_t sent_msg; /* Total amount of messages sent during the simulation */
-  void (*task_copy_callback)(msg_task_t task, msg_process_t src, msg_process_t dst);
-  void_f_pvoid_t process_data_cleanup;
-};
-
-XBT_PUBLIC_DATA MSG_Global_t* msg_global;
-
-/*************************************************************/
-
-#endif
diff --git a/src/msg/msg_process.cpp b/src/msg/msg_process.cpp
deleted file mode 100644 (file)
index 40c4b88..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved.          */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "msg_private.hpp"
-#include "simgrid/Exception.hpp"
-#include "simgrid/s4u/Host.hpp"
-#include "src/kernel/EngineImpl.hpp"
-
-/******************************** Process ************************************/
-/** @brief Creates and runs a new #msg_process_t.
- *
- * Does exactly the same as #MSG_process_create_with_arguments but without providing standard arguments
- * (@a argc, @a argv, @a start_time, @a kill_time).
- */
-msg_process_t MSG_process_create(const char* name, int (*code)(int, char**), void* data, msg_host_t host)
-{
-  return MSG_process_create_with_environment(name == nullptr ? "" : name, code, data, host, 0, nullptr, nullptr);
-}
-
-/** @brief Creates and runs a new process.
-
- * A constructor for #msg_process_t taking four arguments and returning the corresponding object. The structure (and
- * the corresponding thread) is created, and put in the list of ready process.
- * @param name a name for the object. It is for user-level information and can be nullptr.
- * @param code is a function describing the behavior of the process.
- * @param data a pointer to any data one may want to attach to the new object.  It is for user-level information and
- *        can be nullptr. It can be retrieved with the function MSG_process_get_data().
- * @param host the location where the new process is executed.
- * @param argc first argument passed to @a code
- * @param argv second argument passed to @a code
- */
-
-msg_process_t MSG_process_create_with_arguments(const char* name, int (*code)(int, char**), void* data, msg_host_t host,
-                                                int argc, char** argv)
-{
-  return MSG_process_create_with_environment(name, code, data, host, argc, argv, nullptr);
-}
-
-/**
- * @brief Creates and runs a new #msg_process_t.
-
- * A constructor for #msg_process_t taking four arguments and returning the corresponding object. The structure (and
- * the corresponding thread) is created, and put in the list of ready process.
- * @param name a name for the object. It is for user-level information and can be nullptr.
- * @param code is a function describing the behavior of the process.
- * @param data a pointer to any data one may want to attach to the new object.  It is for user-level information and
- *        can be nullptr. It can be retrieved with the function MSG_process_get_data().
- * @param host the location where the new process is executed.
- * @param argc first argument passed to @a code
- * @param argv second argument passed to @a code. WARNING, these strings are freed by the SimGrid kernel when the
- *             process exits, so they cannot be static nor shared between several processes.
- * @param properties list a properties defined for this process
- * @see msg_process_t
- * @return The new corresponding object.
- */
-msg_process_t MSG_process_create_with_environment(const char* name, int (*code)(int, char**), void* data,
-                                                  msg_host_t host, int argc, char** argv, xbt_dict_t properties)
-{
-  xbt_assert(host != nullptr, "Invalid parameters: host param must not be nullptr");
-  sg_actor_t actor = sg_actor_init(std::move(name), host);
-
-  try {
-    if (data != nullptr) {
-      sg_actor_set_data(actor, data);
-      xbt_dict_cursor_t cursor = nullptr;
-      char* key;
-      char* value;
-      xbt_dict_foreach (properties, cursor, key, value)
-        actor->set_property(key, value);
-    }
-    actor->start(std::move(simgrid::xbt::wrap_main(code, argc, argv)));
-  } catch (simgrid::HostFailureException const&) {
-    xbt_die("Could not launch a new process on failed host %s.", host->get_cname());
-  }
-
-  xbt_dict_free(&properties);
-  for (int i = 0; i != argc; ++i)
-    xbt_free(argv[i]);
-  xbt_free(argv);
-
-  simgrid::s4u::this_actor::yield();
-  return actor;
-}
-
-/** @brief Sets a cleanup function to be called to free the userdata of a process when a process is destroyed.
- * @param data_cleanup a cleanup function for the userdata of a process, or nullptr to call no function
- */
-XBT_PUBLIC void MSG_process_set_data_cleanup(void_f_pvoid_t data_cleanup)
-{
-  msg_global->process_data_cleanup = data_cleanup;
-}
diff --git a/src/msg/msg_task.cpp b/src/msg/msg_task.cpp
deleted file mode 100644 (file)
index 051de74..0000000
+++ /dev/null
@@ -1,810 +0,0 @@
-/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved.          */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "msg_private.hpp"
-#include "src/instr/instr_private.hpp"
-#include <simgrid/s4u/Comm.hpp>
-#include <simgrid/s4u/Exec.hpp>
-#include <simgrid/s4u/Host.hpp>
-#include <simgrid/s4u/Mailbox.hpp>
-
-#include <algorithm>
-#include <vector>
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_task, msg, "Logging specific to MSG (task)");
-
-namespace simgrid {
-
-template class xbt::Extendable<msg::Task>;
-
-namespace msg {
-
-Task::Task(const std::string& name, double flops_amount, double bytes_amount, void* data)
-    : name_(name), flops_amount(flops_amount), bytes_amount(bytes_amount)
-{
-  static std::atomic_ullong counter{0};
-  id_ = counter++;
-  set_data(data);
-  MC_ignore_heap(&id_, sizeof id_);
-}
-
-Task::Task(const std::string& name, std::vector<s4u::Host*>&& hosts, std::vector<double>&& flops_amount,
-           std::vector<double>&& bytes_amount, void* data)
-    : Task(name, 1.0, 0, data)
-{
-  parallel_             = true;
-  hosts_                = std::move(hosts);
-  flops_parallel_amount = std::move(flops_amount);
-  bytes_parallel_amount = std::move(bytes_amount);
-}
-
-Task* Task::create(const std::string& name, double flops_amount, double bytes_amount, void* data)
-{
-  return new Task(name, flops_amount, bytes_amount, data);
-}
-
-Task* Task::create_parallel(const std::string& name, int host_nb, const msg_host_t* host_list, double* flops_amount,
-                            double* bytes_amount, void* data)
-{
-  std::vector<s4u::Host*> hosts(host_list, host_list + host_nb);
-  std::vector<double> flops;
-  std::vector<double> bytes;
-  if (flops_amount != nullptr)
-    flops = std::vector<double>(flops_amount, flops_amount + host_nb);
-  if (bytes_amount != nullptr)
-    bytes = std::vector<double>(bytes_amount, bytes_amount + host_nb * host_nb);
-
-  return new Task(name, std::move(hosts), std::move(flops), std::move(bytes), data);
-}
-
-msg_error_t Task::execute()
-{
-  /* checking for infinite values */
-  xbt_assert(std::isfinite(flops_amount), "flops_amount is not finite!");
-
-  msg_error_t status = MSG_OK;
-  if (flops_amount <= 0.0)
-    return MSG_OK;
-
-  try {
-    set_used();
-    if (parallel_)
-      compute = s4u::this_actor::exec_init(hosts_, flops_parallel_amount, bytes_parallel_amount);
-    else
-      compute = s4u::this_actor::exec_init(flops_amount);
-
-    compute->set_name(name_)
-        ->set_tracing_category(tracing_category_)
-        ->set_priority(1 / priority_)
-        ->set_bound(bound_)
-        ->wait_for(timeout_);
-
-    set_not_used();
-    XBT_DEBUG("Execution task '%s' finished", get_cname());
-  } catch (const HostFailureException&) {
-    status = MSG_HOST_FAILURE;
-  } catch (const TimeoutException&) {
-    status = MSG_TIMEOUT;
-  } catch (const CancelException&) {
-    status = MSG_TASK_CANCELED;
-  }
-
-  /* action ended, set comm and compute = nullptr, the actions is already destroyed in the main function */
-  flops_amount = 0.0;
-  comm         = nullptr;
-  compute      = nullptr;
-
-  return status;
-}
-
-s4u::CommPtr Task::send_async(const std::string& alias, void_f_pvoid_t cleanup, bool detached)
-{
-  if (TRACE_actor_is_enabled()) {
-    auto* process_container       = instr::Container::by_name(instr_pid(*MSG_process_self()));
-    std::string key               = "p" + std::to_string(get_id());
-    instr::Container::get_root()->get_link("ACTOR_LINK")->start_event(process_container, "SR", key);
-  }
-
-  /* Prepare the task to send */
-  set_used();
-  this->comm = nullptr;
-  msg_global->sent_msg++;
-
-  s4u::CommPtr s4u_comm = s4u::Mailbox::by_name(alias)->put_init(this, bytes_amount)->set_rate(get_rate());
-  if (TRACE_is_enabled() && has_tracing_category())
-    s4u_comm->set_tracing_category(tracing_category_);
-
-  comm                  = s4u_comm;
-
-  if (detached)
-    comm->detach(cleanup);
-  else
-    comm->start();
-
-  return comm;
-}
-
-msg_error_t Task::send(const std::string& alias, double timeout)
-{
-  msg_error_t ret = MSG_OK;
-  /* Try to send it */
-  try {
-    comm = nullptr; // needed, otherwise MC gets confused.
-    s4u::CommPtr s4u_comm = send_async(alias, nullptr, false);
-    comm                  = s4u_comm;
-    comm->wait_for(timeout);
-  } catch (const TimeoutException&) {
-    ret = MSG_TIMEOUT;
-  } catch (const CancelException&) {
-    ret = MSG_HOST_FAILURE;
-  } catch (const NetworkFailureException&) {
-    ret = MSG_TRANSFER_FAILURE;
-    /* If the send failed, it is not used anymore */
-    set_not_used();
-  }
-
-  return ret;
-}
-void Task::cancel()
-{
-  if (compute) {
-    compute->cancel();
-  } else if (comm) {
-    comm->cancel();
-  }
-  set_not_used();
-}
-
-void Task::set_priority(double priority)
-{
-  xbt_assert(std::isfinite(1.0 / priority), "priority is not finite!");
-  priority_ = 1.0 / priority;
-}
-
-s4u::Actor* Task::get_sender() const
-{
-  return comm ? comm->get_sender() : nullptr;
-}
-
-s4u::Host* Task::get_source() const
-{
-  return comm ? comm->get_sender()->get_host() : nullptr;
-}
-
-void Task::set_used()
-{
-  if (is_used_)
-    report_multiple_use();
-  is_used_ = true;
-}
-
-void Task::report_multiple_use() const
-{
-  if (MSG_Global_t::debug_multiple_use) {
-    XBT_ERROR("This task is already used in there:");
-    // TODO, backtrace
-    XBT_ERROR("<missing backtrace>");
-    XBT_ERROR("And you try to reuse it from here:");
-    xbt_backtrace_display_current();
-  } else {
-    xbt_die("This task is still being used somewhere else. You cannot send it now. Go fix your code!"
-             "(use --cfg=msg/debug-multiple-use:on to get the backtrace of the other process)");
-  }
-}
-} // namespace msg
-} // namespace simgrid
-
-/********************************* Task **************************************/
-/** @brief Creates a new task
- *
- * A constructor for msg_task_t taking four arguments.
- *
- * @param name a name for the object. It is for user-level information and can be nullptr.
- * @param flop_amount a value of the processing amount (in flop) needed to process this new task.
- * If 0, then it cannot be executed with MSG_task_execute(). This value has to be >=0.
- * @param message_size a value of the amount of data (in bytes) needed to transfer this new task. If 0, then it cannot
- * be transferred with MSG_task_send() and MSG_task_recv(). This value has to be >=0.
- * @param data a pointer to any data may want to attach to the new object.  It is for user-level information and can
- * be nullptr. It can be retrieved with the function MSG_task_get_data().
- * @return The new corresponding object.
- */
-msg_task_t MSG_task_create(const char *name, double flop_amount, double message_size, void *data)
-{
-  return simgrid::msg::Task::create(name ? name : "", flop_amount, message_size, data);
-}
-
-/** @brief Creates a new parallel task
- *
- * A constructor for #msg_task_t taking six arguments.
- *
- * @beginrst
- * See :ref:`simgrid::s4u::this_actor::parallel_execute() <API_s4u_parallel_execute>` for
- * the exact semantic of the parameters.
- * @endrst
- *
- * @param name a name for the object. It is for user-level information and can be nullptr.
- * @param host_nb the number of hosts implied in the parallel task.
- * @param host_list an array of @p host_nb msg_host_t.
- * @param flops_amount an array of @p host_nb doubles.
- *        flops_amount[i] is the total number of operations that have to be performed on host_list[i].
- * @param bytes_amount an array of @p host_nb* @p host_nb doubles.
- * @param data a pointer to any data may want to attach to the new object.
- *             It is for user-level information and can be nullptr.
- *             It can be retrieved with the function MSG_task_get_data().
- */
-msg_task_t MSG_parallel_task_create(const char *name, int host_nb, const msg_host_t * host_list,
-                                    double *flops_amount, double *bytes_amount, void *data)
-{
-  // Task's flops amount is set to an arbitrary value > 0.0 to be able to distinguish, in
-  // MSG_task_get_remaining_work_ratio(), a finished task and a task that has not started yet.
-  return simgrid::msg::Task::create_parallel(name ? name : "", host_nb, host_list, flops_amount, bytes_amount, data);
-}
-
-/** @brief Return the user data of the given task */
-void* MSG_task_get_data(const_msg_task_t task)
-{
-  return task->get_data<void>();
-}
-
-/** @brief Sets the user data of a given task */
-void MSG_task_set_data(msg_task_t task, void *data)
-{
-  task->set_data(data);
-}
-
-/** @brief Returns the sender of the given task */
-msg_process_t MSG_task_get_sender(const_msg_task_t task)
-{
-  return task->get_sender();
-}
-
-/** @brief Returns the source (the sender's host) of the given task */
-msg_host_t MSG_task_get_source(const_msg_task_t task)
-{
-  return task->get_source();
-}
-
-/** @brief Returns the name of the given task. */
-const char* MSG_task_get_name(const_msg_task_t task)
-{
-  return task->get_cname();
-}
-
-/** @brief Sets the name of the given task. */
-void MSG_task_set_name(msg_task_t task, const char *name)
-{
-  task->set_name(name);
-}
-
-/**
- * @brief Executes a task and waits for its termination.
- *
- * This function is used for describing the behavior of a process. It takes only one parameter.
- * @param task a #msg_task_t to execute on the location on which the process is running.
- * @return #MSG_OK if the task was successfully completed, #MSG_TASK_CANCELED or #MSG_HOST_FAILURE otherwise
- */
-msg_error_t MSG_task_execute(msg_task_t task)
-{
-  return task->execute();
-}
-
-/**
- * @brief Executes a parallel task and waits for its termination.
- *
- * @param task a #msg_task_t to execute on the location on which the process is running.
- *
- * @return #MSG_OK if the task was successfully completed, #MSG_TASK_CANCELED or #MSG_HOST_FAILURE otherwise
- */
-msg_error_t MSG_parallel_task_execute(msg_task_t task)
-{
-  return task->execute();
-}
-
-msg_error_t MSG_parallel_task_execute_with_timeout(msg_task_t task, double timeout)
-{
-  task->set_timeout(timeout);
-  return task->execute();
-}
-
-/**
- * @brief Sends a task on a mailbox.
- *
- * This is a non blocking function: use MSG_comm_wait() or MSG_comm_test() to end the communication.
- *
- * @param task a #msg_task_t to send on another location.
- * @param alias name of the mailbox to sent the task to
- * @return the msg_comm_t communication created
- */
-msg_comm_t MSG_task_isend(msg_task_t task, const char* alias)
-{
-  return new simgrid::msg::Comm(task, nullptr, task->send_async(alias, nullptr, false));
-}
-
-/**
- * @brief Sends a task on a mailbox with a maximum rate
- *
- * This is a non blocking function: use MSG_comm_wait() or MSG_comm_test() to end the communication. The maxrate
- * parameter allows the application to limit the bandwidth utilization of network links when sending the task.
- *
- * @param task a #msg_task_t to send on another location.
- * @param alias name of the mailbox to sent the task to
- * @param maxrate the maximum communication rate for sending this task (byte/sec).
- * @return the msg_comm_t communication created
- */
-msg_comm_t MSG_task_isend_bounded(msg_task_t task, const char* alias, double maxrate)
-{
-  task->set_rate(maxrate);
-  return new simgrid::msg::Comm(task, nullptr, task->send_async(alias, nullptr, false));
-}
-
-/**
- * @brief Sends a task on a mailbox.
- *
- * This is a non blocking detached send function.
- * Think of it as a best effort send. Keep in mind that the third parameter is only called if the communication fails.
- * If the communication does work, it is responsibility of the receiver code to free anything related to the task, as
- * usual. More details on this can be obtained on
- * <a href="http://lists.gforge.inria.fr/pipermail/simgrid-user/2011-November/002649.html">this thread</a>
- * in the SimGrid-user mailing list archive.
- *
- * @param task a #msg_task_t to send on another location.
- * @param alias name of the mailbox to sent the task to
- * @param cleanup a function to destroy the task if the communication fails, e.g. MSG_task_destroy
- * (if nullptr, no function will be called)
- */
-void MSG_task_dsend(msg_task_t task, const char* alias, void_f_pvoid_t cleanup)
-{
-  task->send_async(alias, cleanup, true);
-}
-
-/**
- * @brief Sends a task on a mailbox with a maximal rate.
- *
- * This is a non blocking detached send function.
- * Think of it as a best effort send. Keep in mind that the third parameter is only called if the communication fails.
- * If the communication does work, it is responsibility of the receiver code to free anything related to the task, as
- * usual. More details on this can be obtained on
- * <a href="http://lists.gforge.inria.fr/pipermail/simgrid-user/2011-November/002649.html">this thread</a>
- * in the SimGrid-user mailing list archive.
- *
- * The rate parameter can be used to send a task with a limited bandwidth (smaller than the physical available value).
- * Use MSG_task_dsend() if you don't limit the rate (or pass -1 as a rate value do disable this feature).
- *
- * @param task a #msg_task_t to send on another location.
- * @param alias name of the mailbox to sent the task to
- * @param cleanup a function to destroy the task if the communication fails, e.g. MSG_task_destroy (if nullptr, no
- *        function will be called)
- * @param maxrate the maximum communication rate for sending this task (byte/sec)
- *
- */
-void MSG_task_dsend_bounded(msg_task_t task, const char* alias, void_f_pvoid_t cleanup, double maxrate)
-{
-  task->set_rate(maxrate);
-  task->send_async(alias, cleanup, true);
-}
-/**
- * @brief Sends a task to a mailbox
- *
- * This is a blocking function, the execution flow will be blocked until the task is sent (and received on the other
- * side if #MSG_task_receive is used).
- * See #MSG_task_isend for sending tasks asynchronously.
- *
- * @param task the task to be sent
- * @param alias the mailbox name to where the task is sent
- *
- * @return Returns #MSG_OK if the task was successfully sent,
- * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
- */
-msg_error_t MSG_task_send(msg_task_t task, const char* alias)
-{
-  XBT_DEBUG("MSG_task_send: Trying to send a message on mailbox '%s'", alias);
-  return task->send(alias, -1);
-}
-
-/**
- * @brief Sends a task to a mailbox with a maximum rate
- *
- * This is a blocking function, the execution flow will be blocked until the task is sent. The maxrate parameter allows
- * the application to limit the bandwidth utilization of network links when sending the task.
- *
- * The maxrate parameter can be used to send a task with a limited bandwidth (smaller than the physical available
- * value). Use MSG_task_send() if you don't limit the rate (or pass -1 as a rate value do disable this feature).
- *
- * @param task the task to be sent
- * @param alias the mailbox name to where the task is sent
- * @param maxrate the maximum communication rate for sending this task (byte/sec)
- *
- * @return Returns #MSG_OK if the task was successfully sent,
- * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
- */
-msg_error_t MSG_task_send_bounded(msg_task_t task, const char* alias, double maxrate)
-{
-  task->set_rate(maxrate);
-  return task->send(alias, -1);
-}
-
-/**
- * @brief Sends a task to a mailbox with a timeout
- *
- * This is a blocking function, the execution flow will be blocked until the task is sent or the timeout is achieved.
- *
- * @param task the task to be sent
- * @param alias the mailbox name to where the task is sent
- * @param timeout is the maximum wait time for completion (if -1, this call is the same as #MSG_task_send)
- *
- * @return Returns #MSG_OK if the task was successfully sent,
- * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
- */
-msg_error_t MSG_task_send_with_timeout(msg_task_t task, const char* alias, double timeout)
-{
-  return task->send(alias, timeout);
-}
-
-/**
- * @brief Sends a task to a mailbox with a timeout and with a maximum rate
- *
- * This is a blocking function, the execution flow will be blocked until the task is sent or the timeout is achieved.
- *
- * The maxrate parameter can be used to send a task with a limited bandwidth (smaller than the physical available
- * value). Use MSG_task_send_with_timeout() if you don't limit the rate (or pass -1 as a rate value do disable this
- * feature).
- *
- * @param task the task to be sent
- * @param alias the mailbox name to where the task is sent
- * @param timeout is the maximum wait time for completion (if -1, this call is the same as #MSG_task_send)
- * @param maxrate the maximum communication rate for sending this task (byte/sec)
- *
- * @return Returns #MSG_OK if the task was successfully sent,
- * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
- */
-msg_error_t MSG_task_send_with_timeout_bounded(msg_task_t task, const char* alias, double timeout, double maxrate)
-{
-  task->set_rate(maxrate);
-  return task->send(alias, timeout);
-}
-
-/**
- * @brief Receives a task from a mailbox.
- *
- * This is a blocking function, the execution flow will be blocked until the task is received. See #MSG_task_irecv
- * for receiving tasks asynchronously.
- *
- * @param task a memory location for storing a #msg_task_t.
- * @param alias name of the mailbox to receive the task from
- *
- * @return Returns
- * #MSG_OK if the task was successfully received,
- * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
- */
-msg_error_t MSG_task_receive(msg_task_t * task, const char *alias)
-{
-  return MSG_task_receive_with_timeout(task, alias, -1);
-}
-
-/**
- * @brief Receives a task from a mailbox at a given rate.
- *
- * @param task a memory location for storing a #msg_task_t.
- * @param alias name of the mailbox to receive the task from
- * @param rate limit the reception to rate bandwidth (byte/sec)
- *
- * The rate parameter can be used to receive a task with a limited bandwidth (smaller than the physical available
- * value). Use MSG_task_receive() if you don't limit the rate (or pass -1 as a rate value do disable this feature).
- *
- * @return Returns
- * #MSG_OK if the task was successfully received,
- * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE otherwise.
- */
-msg_error_t MSG_task_receive_bounded(msg_task_t* task, const char* alias, double rate)
-{
-  return MSG_task_receive_with_timeout_bounded(task, alias, -1, rate);
-}
-
-/**
- * @brief Receives a task from a mailbox with a given timeout.
- *
- * This is a blocking function with a timeout, the execution flow will be blocked until the task is received or the
- * timeout is achieved. See #MSG_task_irecv for receiving tasks asynchronously.  You can provide a -1 timeout
- * to obtain an infinite timeout.
- *
- * @param task a memory location for storing a #msg_task_t.
- * @param alias name of the mailbox to receive the task from
- * @param timeout is the maximum wait time for completion (if -1, this call is the same as #MSG_task_receive)
- *
- * @return Returns
- * #MSG_OK if the task was successfully received,
- * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
- */
-msg_error_t MSG_task_receive_with_timeout(msg_task_t* task, const char* alias, double timeout)
-{
-  return MSG_task_receive_with_timeout_bounded(task, alias, timeout, -1);
-}
-
-/**
- * @brief Receives a task from a mailbox with a given timeout and at a given rate.
- *
- * @param task a memory location for storing a #msg_task_t.
- * @param alias name of the mailbox to receive the task from
- * @param timeout is the maximum wait time for completion (if -1, this call is the same as #MSG_task_receive)
- * @param rate limit the reception to rate bandwidth (byte/sec)
- *
- * The rate parameter can be used to send a task with a limited
- * bandwidth (smaller than the physical available value). Use
- * MSG_task_receive() if you don't limit the rate (or pass -1 as a
- * rate value do disable this feature).
- *
- * @return Returns
- * #MSG_OK if the task was successfully received,
- * #MSG_HOST_FAILURE, or #MSG_TRANSFER_FAILURE, or #MSG_TIMEOUT otherwise.
- */
-msg_error_t MSG_task_receive_with_timeout_bounded(msg_task_t* task, const char* alias, double timeout, double rate)
-{
-  XBT_DEBUG("MSG_task_receive_with_timeout_bounded: Trying to receive a message on mailbox '%s'", alias);
-  msg_error_t ret = MSG_OK;
-
-  /* Sanity check */
-  xbt_assert(task, "Null pointer for the task storage");
-
-  if (*task)
-    XBT_WARN("Asked to write the received task in a non empty struct -- proceeding.");
-
-  /* Try to receive it by calling SIMIX network layer */
-  try {
-    void* payload;
-    simgrid::s4u::Mailbox::by_name(alias)
-        ->get_init()
-        ->set_dst_data(&payload, sizeof(msg_task_t*))
-        ->set_rate(rate)
-        ->wait_for(timeout);
-    *task = static_cast<msg_task_t>(payload);
-    XBT_DEBUG("Got task %s from %s", (*task)->get_cname(), alias);
-    (*task)->set_not_used();
-  } catch (const simgrid::HostFailureException&) {
-    ret = MSG_HOST_FAILURE;
-  } catch (const simgrid::TimeoutException&) {
-    ret = MSG_TIMEOUT;
-  } catch (const simgrid::CancelException&) {
-    ret = MSG_TASK_CANCELED;
-  } catch (const simgrid::NetworkFailureException&) {
-    ret = MSG_TRANSFER_FAILURE;
-  }
-
-  if (TRACE_actor_is_enabled() && ret != MSG_HOST_FAILURE && ret != MSG_TRANSFER_FAILURE && ret != MSG_TIMEOUT) {
-    auto* process_container = simgrid::instr::Container::by_name(instr_pid(*MSG_process_self()));
-
-    std::string key = "p" + std::to_string((*task)->get_id());
-    simgrid::instr::Container::get_root()->get_link("ACTOR_LINK")->end_event(process_container, "SR", key);
-  }
-  return ret;
-}
-
-/**
- * @brief Starts listening for receiving a task from an asynchronous communication.
- *
- * This is a non blocking function: use MSG_comm_wait() or MSG_comm_test() to end the communication.
- *
- * @param task a memory location for storing a #msg_task_t. has to be valid until the end of the communication.
- * @param name of the mailbox to receive the task on
- * @return the msg_comm_t communication created
- */
-msg_comm_t MSG_task_irecv(msg_task_t* task, const char* name)
-{
-  return MSG_task_irecv_bounded(task, name, -1.0);
-}
-
-/**
- * @brief Starts listening for receiving a task from an asynchronous communication at a given rate.
- *
- * The rate parameter can be used to receive a task with a limited
- * bandwidth (smaller than the physical available value). Use
- * MSG_task_irecv() if you don't limit the rate (or pass -1 as a rate
- * value do disable this feature).
- *
- * @param task a memory location for storing a #msg_task_t. has to be valid until the end of the communication.
- * @param name of the mailbox to receive the task on
- * @param rate limit the bandwidth to the given rate (byte/sec)
- * @return the msg_comm_t communication created
- */
-msg_comm_t MSG_task_irecv_bounded(msg_task_t* task, const char* name, double rate)
-{
-  /* FIXME: these functions are not traceable */
-  /* Sanity check */
-  xbt_assert(task, "Null pointer for the task storage");
-
-  if (*task)
-    XBT_CRITICAL("MSG_task_irecv() was asked to write in a non empty task struct.");
-
-  /* Try to receive it by calling SIMIX network layer */
-  simgrid::s4u::CommPtr comm = simgrid::s4u::Mailbox::by_name(name)
-                                   ->get_init()
-                                   ->set_dst_data((void**)task, sizeof(msg_task_t*))
-                                   ->set_rate(rate)
-                                   ->start();
-
-  return new simgrid::msg::Comm(nullptr, task, comm);
-}
-
-/**
- * @brief Look if there is a communication on a mailbox and return the PID of the sender process.
- *
- * @param alias the name of the mailbox to be considered
- *
- * @return Returns the PID of sender process (or -1 if there is no communication in the mailbox)
- *
- */
-int MSG_task_listen_from(const char* alias)
-{
-  return simgrid::s4u::Mailbox::by_name(alias)->listen_from();
-}
-
-/** @brief Destroys the given task.
- *
- * You should free user data, if any, @b before calling this destructor.
- *
- * Only the process that owns the task can destroy it.
- * The owner changes after a successful send.
- * If a task is successfully sent, the receiver becomes the owner and is supposed to destroy it. The sender should not
- * use it anymore.
- * If the task failed to be sent, the sender remains the owner of the task.
- */
-msg_error_t MSG_task_destroy(msg_task_t task)
-{
-  if (task->is_used()) {
-    /* the task is being sent or executed: cancel it first */
-    task->cancel();
-  }
-
-  /* free main structures */
-  delete task;
-
-  return MSG_OK;
-}
-
-/** @brief Cancel the given task
- *
- * If it was currently executed or transferred, the working process is stopped.
- */
-msg_error_t MSG_task_cancel(msg_task_t task)
-{
-  xbt_assert((task != nullptr), "Cannot cancel a nullptr task");
-  task->cancel();
-  return MSG_OK;
-}
-
-/** @brief Returns a value in ]0,1[ that represent the task remaining work
- *    to do: starts at 1 and goes to 0. Returns 0 if not started or finished.
- *
- * It works for either parallel or sequential tasks.
- */
-double MSG_task_get_remaining_work_ratio(const_msg_task_t task)
-{
-  xbt_assert((task != nullptr), "Cannot get information from a nullptr task");
-  if (task->compute) {
-    // Task in progress
-    return task->compute->get_remaining_ratio();
-  } else {
-    // Task not started (flops_amount is > 0.0) or finished (flops_amount is set to 0.0)
-    return task->flops_amount > 0.0 ? 1.0 : 0.0;
-  }
-}
-
-/** @brief Returns the amount of flops that remain to be computed
- *
- * The returned value is initially the cost that you defined for the task, then it decreases until it reaches 0
- *
- * It works for sequential tasks, but the remaining amount of work is not a scalar value for parallel tasks.
- * So you will get an exception if you call this function on parallel tasks. Just don't do it.
- */
-double MSG_task_get_flops_amount(const_msg_task_t task)
-{
-  if (task->compute != nullptr && task->compute->get_state() == simgrid::s4u::Activity::State::STARTED) {
-    return task->compute->get_remaining();
-  } else {
-    // Not started or already done.
-    // - Before starting, flops_amount is initially the task cost
-    // - After execution, flops_amount is set to 0 (until someone uses MSG_task_set_flops_amount, if any)
-    return task->flops_amount;
-  }
-}
-
-/** @brief set the computation amount needed to process the given task.
- *
- * @warning If the computation is ongoing (already started and not finished),
- * it is not modified by this call. Moreover, after its completion, the ongoing execution with set the flops_amount to
- * zero, overriding any value set during the execution.
- */
-void MSG_task_set_flops_amount(msg_task_t task, double flops_amount)
-{
-  task->flops_amount = flops_amount;
-}
-
-/** @brief set the amount data attached with the given task.
- *
- * @warning If the transfer is ongoing (already started and not finished), it is not modified by this call.
- */
-void MSG_task_set_bytes_amount(msg_task_t task, double data_size)
-{
-  task->bytes_amount = data_size;
-}
-
-/** @brief Returns the total amount received by the given task
- *
- *  If the communication does not exist it will return 0.
- *  So, if the communication has FINISHED or FAILED it returns zero.
- */
-double MSG_task_get_remaining_communication(const_msg_task_t task)
-{
-  XBT_DEBUG("calling s4u::Comm::get_remaining (%p)", task->comm.get());
-  return task->comm->get_remaining();
-}
-
-/** @brief Returns the size of the data attached to the given task. */
-double MSG_task_get_bytes_amount(const_msg_task_t task)
-{
-  xbt_assert(task != nullptr, "Invalid parameter");
-  return task->bytes_amount;
-}
-
-/** @brief Changes the priority of a computation task.
- *
- * This priority doesn't affect the transfer rate. A priority of 2
- * will make a task receive two times more cpu power than regular tasks.
- */
-void MSG_task_set_priority(msg_task_t task, double priority)
-{
-  task->set_priority(priority);
-}
-
-/** @brief Changes the maximum CPU utilization of a computation task (in flops/s).
- *
- * For VMs, there is a pitfall. Please see MSG_vm_set_bound().
- */
-void MSG_task_set_bound(msg_task_t task, double bound)
-{
-  if (bound < 1e-12) /* close enough to 0 without any floating precision surprise */
-    XBT_INFO("bound == 0 means no capping (i.e., unlimited).");
-  task->set_bound(bound);
-}
-
-/**
- * @brief Sets the tracing category of a task.
- *
- * This function should be called after the creation of a MSG task, to define the category of that task. The
- * first parameter task must contain a task that was =created with the function MSG_task_create(). The second
- * parameter category must contain a category that was previously declared with the function #TRACE_category
- * (or with #TRACE_category_with_color).
- *
- * @beginrst
- * See :ref:`outcome_vizu` for details on how to trace the (categorized) resource utilization.
- * @endrst
- *
- * @param task the task that is going to be categorized
- * @param category the name of the category to be associated to the task
- */
-void MSG_task_set_category(msg_task_t task, const char* category)
-{
-  xbt_assert(not task->has_tracing_category(), "Task %p(%s) already has a category (%s).", task, task->get_cname(),
-             task->get_tracing_category().c_str());
-
-  // if user provides a nullptr category, task is no longer traced
-  if (category == nullptr) {
-    task->set_tracing_category("");
-    XBT_DEBUG("MSG task %p(%s), category removed", task, task->get_cname());
-  } else {
-    // set task category
-    task->set_tracing_category(category);
-    XBT_DEBUG("MSG task %p(%s), category %s", task, task->get_cname(), task->get_tracing_category().c_str());
-  }
-}
-
-/**
- * @brief Gets the current tracing category of a task. (@see MSG_task_set_category)
- * @param task the task to be considered
- * @return Returns the name of the tracing category of the given task, "" otherwise
- */
-const char* MSG_task_get_category(const_msg_task_t task)
-{
-  return task->get_tracing_category().c_str();
-}
diff --git a/teshsuite/msg/CMakeLists.txt b/teshsuite/msg/CMakeLists.txt
deleted file mode 100644 (file)
index 1c22032..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-if(enable_msg)
-  add_executable       (task_destroy_cancel EXCLUDE_FROM_ALL task_destroy_cancel/task_destroy_cancel.c)
-  target_link_libraries(task_destroy_cancel simgrid)
-  set_target_properties(task_destroy_cancel PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/task_destroy_cancel)
-  add_dependencies(tests task_destroy_cancel)
-
-  ADD_TESH_FACTORIES(tesh-msg-task_destroy_cancel "raw"  --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
-                                                         --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/task_destroy_cancel
-                                                         --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/task_destroy_cancel
-                                                         ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.tesh)
-endif()
-
-set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel/task_destroy_cancel.tesh PARENT_SCOPE)
-set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel/task_destroy_cancel.c PARENT_SCOPE)
diff --git a/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c b/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c
deleted file mode 100644 (file)
index eb038b2..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Copyright (c) 2010-2023. 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 "simgrid/msg.h"
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
-
-static int master(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
-{
-  double task_comp_size = 5E7;
-  double task_comm_size = 1E6;
-  double timeout        = 1;
-
-  msg_task_t task = MSG_task_create("normal", task_comp_size, task_comm_size, NULL);
-  XBT_INFO("Sending task: \"%s\"", MSG_task_get_name(task));
-  MSG_task_send_with_timeout(task, "worker_mailbox", timeout);
-
-  task = MSG_task_create("cancel directly", task_comp_size, task_comm_size, NULL);
-  XBT_INFO("Canceling task \"%s\" directly", MSG_task_get_name(task));
-  MSG_task_cancel(task);
-  MSG_task_destroy(task);
-
-  task = MSG_task_create("destroy directly", task_comp_size, task_comm_size, NULL);
-  XBT_INFO("Destroying task \"%s\" directly", MSG_task_get_name(task));
-  MSG_task_destroy(task);
-
-  task            = MSG_task_create("cancel", task_comp_size, task_comm_size, NULL);
-  msg_comm_t comm = MSG_task_isend(task, "worker_mailbox");
-  XBT_INFO("Canceling task \"%s\" during comm", MSG_task_get_name(task));
-  MSG_task_cancel(task);
-  if (MSG_comm_wait(comm, -1) != MSG_OK)
-    MSG_comm_destroy(comm);
-  MSG_task_destroy(task);
-
-  task = MSG_task_create("finalize", task_comp_size, task_comm_size, NULL);
-  comm = MSG_task_isend(task, "worker_mailbox");
-  XBT_INFO("Destroying task \"%s\" during comm", MSG_task_get_name(task));
-  MSG_task_destroy(task);
-  if (MSG_comm_wait(comm, -1) != MSG_OK)
-    MSG_comm_destroy(comm);
-
-  task = MSG_task_create("cancel", task_comp_size, task_comm_size, NULL);
-  MSG_task_send_with_timeout(task, "worker_mailbox", timeout);
-
-  task = MSG_task_create("finalize", task_comp_size, task_comm_size, NULL);
-  MSG_task_send_with_timeout(task, "worker_mailbox", timeout);
-
-  XBT_INFO("Goodbye now!");
-  return 0;
-}
-
-static int worker_main(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
-{
-  msg_task_t task = (msg_task_t)MSG_process_get_data(MSG_process_self());
-  msg_error_t res;
-  XBT_INFO("Start %s", MSG_task_get_name(task));
-  res = MSG_task_execute(task);
-  XBT_INFO("Task %s", res == MSG_OK ? "done" : "failed");
-  MSG_task_destroy(task);
-  return 0;
-}
-
-static int worker(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
-{
-  while (1) {
-    msg_task_t task           = NULL;
-    xbt_assert(MSG_task_receive(&(task), "worker_mailbox") == MSG_OK, "MSG_task_receive failed");
-    XBT_INFO("Handling task \"%s\"", MSG_task_get_name(task));
-
-    if (!strcmp(MSG_task_get_name(task), "finalize")) {
-      XBT_INFO("Destroying task \"%s\"", MSG_task_get_name(task));
-      MSG_task_destroy(task);
-      break;
-    }
-
-    if (!strcmp(MSG_task_get_name(task), "cancel")) {
-      MSG_process_create("worker1", worker_main, task, MSG_host_self());
-      MSG_process_sleep(0.1);
-      XBT_INFO("Canceling task \"%s\"", MSG_task_get_name(task));
-      MSG_task_cancel(task);
-      continue;
-    }
-
-    double start = MSG_get_clock();
-    MSG_task_execute(task);
-    double end = MSG_get_clock();
-    XBT_INFO("Task \"%s\" done in %f (amount %f)", MSG_task_get_name(task), end - start,
-             MSG_task_get_flops_amount(task));
-
-    MSG_task_destroy(task);
-  }
-  XBT_INFO("I'm done. See you!");
-  return 0;
-}
-
-int main(int argc, char* argv[])
-{
-  MSG_init(&argc, argv);
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s platform.xml\n", argv[0], argv[0]);
-
-  MSG_create_environment(argv[1]);
-
-  MSG_process_create("master", master, NULL, MSG_get_host_by_name("Tremblay"));
-  MSG_process_create("worker", worker, NULL, MSG_get_host_by_name("Jupiter"));
-
-  msg_error_t res = MSG_main();
-
-  XBT_INFO("Simulation time %g", MSG_get_clock());
-
-  return res != MSG_OK;
-}
diff --git a/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.tesh b/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.tesh
deleted file mode 100644 (file)
index a0f67f7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-$ ${bindir}/task_destroy_cancel ${platfdir}/small_platform.xml
-> [Tremblay:master:(1) 0.000000] [msg_test/INFO] Sending task: "normal"
-> [Jupiter:worker:(2) 0.169155] [msg_test/INFO] Handling task "normal"
-> [Tremblay:master:(1) 0.169155] [msg_test/INFO] Canceling task "cancel directly" directly
-> [Tremblay:master:(1) 0.169155] [msg_test/INFO] Destroying task "destroy directly" directly
-> [Tremblay:master:(1) 0.169155] [msg_test/INFO] Canceling task "cancel" during comm
-> [Tremblay:master:(1) 0.169155] [msg_test/INFO] Destroying task "finalize" during comm
-> [Jupiter:worker:(2) 0.824497] [msg_test/INFO] Task "normal" done in 0.655342 (amount 0.000000)
-> [Jupiter:worker:(2) 0.993652] [msg_test/INFO] Handling task "cancel"
-> [Jupiter:worker1:(3) 0.993652] [msg_test/INFO] Start cancel
-> [Jupiter:worker:(2) 1.093652] [msg_test/INFO] Canceling task "cancel"
-> [Jupiter:worker1:(3) 1.093652] [msg_test/INFO] Task failed
-> [Tremblay:master:(1) 1.262806] [msg_test/INFO] Goodbye now!
-> [Jupiter:worker:(2) 1.262806] [msg_test/INFO] Handling task "finalize"
-> [Jupiter:worker:(2) 1.262806] [msg_test/INFO] Destroying task "finalize"
-> [Jupiter:worker:(2) 1.262806] [msg_test/INFO] I'm done. See you!
-> [1.262806] [msg_test/INFO] Simulation time 1.26281
index b05f9f9..d07dcdd 100644 (file)
@@ -3,9 +3,7 @@ set(bin_files ${bin_files}    ${CMAKE_CURRENT_SOURCE_DIR}/fix-paje-trace.sh
                               ${CMAKE_CURRENT_SOURCE_DIR}/normalize-pointers.py
                               ${CMAKE_CURRENT_SOURCE_DIR}/sg_xml_unit_converter.py
                               ${CMAKE_CURRENT_SOURCE_DIR}/simgrid_update_xml.pl
-                              ${CMAKE_CURRENT_SOURCE_DIR}/simgrid_convert_TI_traces.py
-                              ${CMAKE_CURRENT_SOURCE_DIR}/MSG_visualization/colorize.pl
-                              ${CMAKE_CURRENT_SOURCE_DIR}/MSG_visualization/trace2fig.pl          PARENT_SCOPE)
+                              ${CMAKE_CURRENT_SOURCE_DIR}/simgrid_convert_TI_traces.py            PARENT_SCOPE)
 
 set(txt_files ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/pkg-config/simgrid.pc.in
                               ${CMAKE_CURRENT_SOURCE_DIR}/address_sanitizer.supp
diff --git a/tools/MSG_visualization/colorize.pl b/tools/MSG_visualization/colorize.pl
deleted file mode 100755 (executable)
index 675956d..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/env perl
-
-# Copyright (c) 2005-2023. 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.
-
-$col_white    = "\033[00m";
-$col_black    = "\033[30m";
-$col_red      = "\033[31m";
-$col_green    = "\033[32m";
-$col_yellow   = "\033[33m";
-$col_blue     = "\033[34m";
-$col_purple   = "\033[35m";
-$col_cyan     = "\033[36m";
-$col_ltgray   = "\033[37m";
-$col_darkgray = "\033[30m";
-
-$col_norm       = $col_white;
-$col_background = "\033[07m";
-$col_brighten   = "\033[01m";
-$col_underline  = "\033[04m";
-$col_blink      = "\033[05m";
-
-# Customize colors here...
-$col_default = $col_ltgray;
-my (@coltab) = (
-    $col_green,                    $col_yellow,
-    $col_purple,                   $col_cyan,
-    $col_red,                      $col_blue,
-    $col_background . $col_green,
-    $col_background . $col_yellow, $col_background . $col_purple,
-    $col_background . $col_cyan,   $col_background . $col_red,
-    $col_background . $col_blue,   $col_background . $col_magenta,
-);
-
-my %pid;
-
-# Get options
-while (($_ = $ARGV[0]) =~ /^-/) {
-    shift;
-    if (/-location/i) {
-        $opt_print_location = 1;  shift;
-    } elsif (/-h(elp)?$|-u(sage)?$/i) {
-        print<<EOH
-colorize.pl - Log colorizer for SimGrid
-Syntax:
-
-    colorize.pl [options] <file>
-
-    where <file> is a text file of values or '-' for STDIN
-
-Options: () denote short version
-
-    -location          Print the location in the code of the message.
-EOH
-;
-       exit;
-    }
-}
-
-sub pidcolor {
-    my $pid = shift;
-
-    unless (defined($pid{$pid})) {
-       # first time we see this pid. Affect it a color
-       $pid{$pid}=(scalar keys %pid) % (scalar @coltab);
-    }
-    return $coltab[$pid{$pid}];
-}
-
-sub print_line {
-    my($host,$procname,$pid,$date,$location,$xbt_channel,$message)=@_;
-
-    print $col_norm;
-    printf "[% 10.6f]",$date;
-
-    print pidcolor($pid);
-
-    if(defined($location)) {
-       printf "[%10s:%-10s] %s ",$host,$procname,$location;
-    } else {
-       printf "[%10s:%-10s]",$host,$procname;
-    }
-    print " $message";
-    print $col_norm."\n";
-}
-
-# Read the messages and do the job
-while (<>) {
-    $orgline = $thisline = $_;
-
-    # Typical line  [Gatien:slave:(9) 11.243148] msg/gos.c:137: [msg_gos/DEBUG] Action terminated
-    if ($thisline =~ /^\[(.+):([^:]+):\((\d+)\) ([\d\.]*)\] ([^\[]*) \[([^\[]*)\] (.*)$/) {
-       $host=$1;
-       $procname=$2;
-       $pid=$3;
-       $date=$4;
-       if($opt_print_location) {
-           $location=$5;
-           $location =~ s/:$//;
-       } else {
-           $location = undef;
-       }
-       $xbt_channel=$6;
-       $message=$7;
-
-       print_line($host,$procname,$pid,$date,$location,$xbt_channel,$message);
-    # Typical line  [Boivin:slave:(2) 9.269357] [pmm/INFO] ROW: step(2)<>myrow(0). Receive data from TeX
-    } elsif ($thisline =~ /^\[([^:]+):([^:]+):\((\d+)\) ([\d\.]*)\] \[([^\[]*)\] (.*)$/) {
-       $host=$1;
-       $procname=$2;
-       $pid=$3;
-       $date=$4;
-       $xbt_channel=$5;
-       $message=$6;
-       print_line($host,$procname,$pid,$date,undef,$xbt_channel,$message);
-    } elsif ( $thisline =~ /^==(\d+)== (.*)$/) {
-       # take care of valgrind outputs
-       print pidcolor($1)."$2\n";
-
-    } else {
-       print $col_default. $orgline;
-    }
-}
-
-print $col_norm;
diff --git a/tools/MSG_visualization/trace2fig.pl b/tools/MSG_visualization/trace2fig.pl
deleted file mode 100755 (executable)
index 921287f..0000000
+++ /dev/null
@@ -1,434 +0,0 @@
-#!/usr/bin/env perl
-
-# Copyright (c) 2006-2023. 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.
-
-use strict;
-use warnings;
-
-#use Data::Dumper;
-use XFig;
-use POSIX;
-
-my($grid_Y_size)=225;
-my($grid_X_size)=100550; # Can be changed to improve readability in function of the total execution time
-
-my($color_suspended)=1;
-my($color_compute)=2;
-my($color_wait_for_recpt)=3;
-my($color_communicate)=4;
-
-# Determine the order of the colors in the legend
-my(@color_list)=($color_compute,$color_communicate,$color_wait_for_recpt,$color_suspended);
-
-sub read_cat {
-    my(%Cat);
-    my($filename)=@_;
-    my($line);
-
-    open INPUT, $filename;
-
-    while (defined($line=<INPUT>)) {
-       chomp $line;
-       if($line =~ /^7\s/) {
-           my($event,$date,$id,$type,$father,@name) = split(/\s+/,$line);
-
-           $Cat{$id}{name}="@name ";
-           $Cat{$id}{name}=~s/\"//g;
-           $Cat{$id}{father}=$father;
-           $Cat{$id}{type}=$type;
-           $Cat{$id}{date}=$date;
-       }
-    }
-    close INPUT;
-    return \%Cat;
-}
-
-sub read_event {
-    my($filename,$Cat)=@_;
-    my($line);
-
-    open INPUT, $filename;
-
-    while (defined($line=<INPUT>)) {
-       chomp $line;
-       if($line =~ /^11\s/) {
-           my($event,$date,$type,$id,$state) = split(/\s+/,$line);
-           push @{$$Cat{$id}{state}}, [$date,$state];
-       }
-       if($line =~ /^12\s/) {
-           my($event,$date,$type,$id) = split(/\s+/,$line);
-           push @{$$Cat{$id}{state}}, [$date];
-       }
-    }
-    close INPUT;
-}
-
-sub read_link {
-    my($filename)=@_;
-    my($line);
-    my(%link);
-
-    open INPUT, $filename;
-
-    while (defined($line=<INPUT>)) {
-       chomp $line;
-       if($line =~ /^16\s/) {
-           my($event,$date,$type,$father,$channel,$src,$key,$trash) = split(/\t+/,$line);
-           my($numkey)=hex "$key";
-           while (defined($link{$numkey})) {$numkey++;}
-           $link{$numkey}{src}=$src;
-           $link{$numkey}{src_date}=$date;
-
-       }
-       if($line =~ /^17\s/) {
-           my($event,$date,$type,$father,$channel,$dst,$key,$trash) = split(/\t+/,$line);
-           my($numkey)=hex "$key";
-           while (defined($link{$numkey}{dst})) {$numkey++;}
-           $link{$numkey}{dst}=$dst;
-           $link{$numkey}{dst_date}=$date;
-       }
-    }
-    close INPUT;
-    return \%link;
-}
-
-sub build_cat_tree {
-    my($root,$Cat)=@_;
-    my(@children)=();
-    my($cat);
-
-    foreach $cat (keys %$Cat) {
-       if($$Cat{$cat}{father} eq $root) {
-           push @children, build_cat_tree($cat,$Cat);
-       }
-#      print "$$Cat{$cat}{name}\t\t $Cat{$cat}{father}\n";
-    }
-    return [$root,@children];
-}
-
-sub build_cat_list {
-    my($tree,$cat_list)=@_;
-    my($root) = shift @$tree;
-    my($u);
-
-    push @$cat_list,$root;
-
-    foreach $u (@$tree) {
-       build_cat_list($u,$cat_list);
-    }
-    unshift @$tree, $root;
-}
-
-sub cat_sorting_function {
-    my($cat1,$cat2,$Cat)=@_;
-    if (!defined($$Cat{$cat1}{state})) {
-       if (!defined($$Cat{$cat2}{state})) {
-           return 0;
-       } else {
-           return 1;
-       }
-    }
-
-    if (!defined($$Cat{$cat2}{state})) {
-       return -1;
-    }
-
-    my($comp) = $$Cat{$$Cat{$cat1}{'father'}}{'name'} cmp $$Cat{$$Cat{$cat2}{'father'}}{'name'};
-    if ($comp == 0) {
-       return $$Cat{$cat1}{'name'} cmp $$Cat{$cat2}{'name'};
-    } else {
-       return $comp;
-    }
-}
-
-sub update_host_Y {
-    my($host,$i) = @_;
-    if (!defined($$host{'Y_min_host'})) {
-       $$host{'Y_min_host'} = $i;
-    } else {
-       if ($$host{'Y_min_host'} > $i) {
-           $$host{'Y_min_host'} = $i;
-       }
-    }
-    if (!defined($$host{'Y_max_host'})) {
-       $$host{'Y_max_host'} = $i+1;
-    } else {
-       if ($$host{'Y_max_host'} < $i+1) {
-           $$host{'Y_max_host'} = $i+1;
-       }
-    }
-}
-
-sub set_cat_position {
-    my($Cat,$cat_list)=@_;
-    my($i)=0;
-    my($cat);
-    foreach $cat (sort {cat_sorting_function($a,$b,$Cat)} @$cat_list) {
-       if(defined($$Cat{$cat}{state})) {
-           update_host_Y($$Cat{$$Cat{$cat}{'father'}},$i);
-           $$Cat{$cat}{Y_min} = $i;
-           $$Cat{$cat}{Y_max} = $i+1;
-           $i++;
-       }
-    }
-}
-
-sub create_fig {
-    my($filename)=shift;
-    my($fig)=new XFig;
-    $fig->{object} = 'compound'; # Compound
-    $fig->{elements} = [];
-    $fig->{version} = 3.2;
-    $fig->{orientation}   = 'Landscape';
-    $fig->{justification} = 'Center';
-    $fig->{units}         = 'Metric';
-    $fig->{papersize}     = 'A4';
-    $fig->{magnification} = '100.00';
-    $fig->{multiplepage}  = 'Single';
-    $fig->{transparent}   = '-2';
-    $fig->{resolution}    = '1200';
-    $fig->{coordsystem}   = '2';
-    $fig->{filename}   = $filename;
-    return $fig;
-}
-
-sub draw_cat {
-    my($fig,$Cat,$Link)=@_;
-    my($cat,$e,$link);
-    my($max_string_length)=0;
-    foreach $cat (keys %$Cat) {
-       next unless (defined($$Cat{$cat}{Y_min}) &&
-                    defined($$Cat{$cat}{Y_max}));
-       my($text) = new XFig ('text');
-#      $text->{'text'} = "$$Cat{$$Cat{$cat}{father}}{name}"."$$Cat{$cat}{name}";
-       my($printed_name)= $$Cat{$cat}{name};
-       $printed_name =~ s/\d+ \(0\)\s*$//;
-       if (length($printed_name) > $max_string_length) {
-           $max_string_length = length($printed_name);
-       }
-       $text->{'text'} = "$printed_name";
-       $text->{'y'} = ($$Cat{$cat}{Y_min}+$$Cat{$cat}{Y_max})/2*$grid_Y_size+68;
-       $text->{'x'} = -100;
-       $text->{'subtype'} = 2;
-       $fig->add ($text);
-    }
-
-    my($max_date)=0;
-    foreach $cat (keys %$Cat) {
-       next unless (defined($$Cat{$cat}{Y_min}) && defined($$Cat{$cat}{Y_max}));
-       my(@states)=();
-       my($e);
-       foreach $e (@{$$Cat{$cat}{state}}) {
-           my($new_date,$state) = ($$e[0],$$e[1]);
-           if ($new_date > $max_date) {
-               $max_date = $new_date;
-           }
-           if(defined($state)) {
-               push @states, $e;
-           } else {
-               my($old_event) = pop @states;
-               my($old_date) = $$old_event[0];
-               $state = $$old_event[1];
-
-# LM: I added the next line because of "undefined values"...
-# normally, I think that this should not happen, but this part of code is a bit too cryptic to me
-               next unless (defined($state));
-
-               my($line) = new XFig ('polyline');
-
-               $line->{'depth'} = 50;  # line
-               $line->{'subtype'} = 1;  # line
-               $line->{'points'} = [ [$old_date*$grid_X_size, $$Cat{$cat}{Y_min}*$grid_Y_size],
-                                     [$new_date*$grid_X_size, $$Cat{$cat}{Y_min}*$grid_Y_size],
-                                     [$new_date*$grid_X_size, $$Cat{$cat}{Y_max}*$grid_Y_size],
-                                     [$old_date*$grid_X_size, $$Cat{$cat}{Y_max}*$grid_Y_size],
-                                     [$old_date*$grid_X_size, $$Cat{$cat}{Y_min}*$grid_Y_size] ];
-               $line->{'areafill'} = 20;
-               if($state eq "S") {
-                   $line->{'fillcolor'} = $color_suspended;
-               } elsif ($state eq "E") {
-                   $line->{'fillcolor'} = $color_compute;
-               } elsif ($state eq "B") {
-                   $line->{'fillcolor'} = $color_wait_for_recpt;
-               } elsif ($state eq "C") {
-                   $line->{'fillcolor'} = $color_communicate;
-               }
-               $fig->add ($line);
-           }
-       }
-    }
-
-    foreach $link (keys %$Link) {
-       my($line) = new XFig ('polyline');
-       my($src_date)=$$Link{$link}{src_date};
-       my($src)=$$Link{$link}{src};
-       my($dst_date)=$$Link{$link}{dst_date};
-       my($dst)=$$Link{$link}{dst};
-       $line->{'subtype'} = 1;  # line
-
-       print STDERR "$link: $src ($src_date) -> $dst ($dst_date)\n";
-
-       print STDERR "$$Cat{$src}{name} -> $$Cat{$dst}{name}\n";
-       $line->{'points'} = [ [$src_date*$grid_X_size,
-                              ($$Cat{$src}{Y_min}+$$Cat{$src}{Y_max})/2*$grid_Y_size],
-                             [$dst_date*$grid_X_size,
-                              ($$Cat{$dst}{Y_min}+$$Cat{$dst}{Y_max})/2*$grid_Y_size] ];
-       $line->{'forwardarrow'} = ['1', '1', '1.00', '60.00', '120.00'];
-       $fig->add ($line);
-    }
-
-# Host visualization
-    my($max_Y)= 0;
-
-    my($index_fill)=0;
-    my($width_of_one_letter)=80;
-    my($min_x_for_host)=-400 - $max_string_length*$width_of_one_letter;
-    my($host_text_x)= $min_x_for_host + 200;
-
-    foreach $cat (keys %$Cat) {
-       next unless (defined($$Cat{$cat}{Y_min_host}) && defined($$Cat{$cat}{Y_max_host}));
-       my($line) = new XFig ('polyline');
-
-       $line->{'depth'} = 150;
-       $line->{'subtype'} = 1;  # line
-       $line->{'points'} = [ [$min_x_for_host, $$Cat{$cat}{Y_min_host}*$grid_Y_size],
-                             [$max_date*$grid_X_size+150, $$Cat{$cat}{Y_min_host}*$grid_Y_size],
-                             [$max_date*$grid_X_size+150, $$Cat{$cat}{Y_max_host}*$grid_Y_size],
-                             [$min_x_for_host, $$Cat{$cat}{Y_max_host}*$grid_Y_size] ];
-       $line->{'areafill'} = 4+3*($index_fill % 2);
-       $line->{'fillcolor'} = 0;
-       $line->{'thickness'} = 0;
-       $index_fill++;
-       $fig->add ($line);
-
-       my($text) = new XFig ('text');
-       $text->{'text'} = "$$Cat{$cat}{name}";
-       $text->{'angle'} = 3.14159265/2;
-       $text->{'x'} = $host_text_x;
-       $text->{'y'} = ($$Cat{$cat}{Y_min_host}+$$Cat{$cat}{Y_max_host})/2*$grid_Y_size;
-       $text->{'subtype'} = 1;
-       $text->{'font_size'} = 30;
-       $fig->add ($text);
-
-       if ($max_Y<$$Cat{$cat}{Y_max_host}) {
-           $max_Y = $$Cat{$cat}{Y_max_host};
-       }
-    }
-
-# Legend:
-    my($i)=1;
-    my($color);
-    foreach $color (@color_list) {
-       my($min_x)=0;
-       my($min_Y)=($max_Y+1)*$grid_Y_size;
-       my($width)=1700;
-       my($height)=$grid_Y_size;
-
-       my($line) = new XFig ('polyline');
-
-       $line->{'depth'} = 50;
-       $line->{'subtype'} = 1;  # line
-       $line->{'points'} = [ [$min_x,$min_Y + ($i-1)*$height ],
-                             [$min_x + $width,$min_Y + ($i-1)*$height],
-                             [$min_x + $width,$min_Y+$height + ($i-1)*$height],
-                             [$min_x,$min_Y+$height + ($i-1)*$height],
-                             [$min_x,$min_Y+ ($i-1)*$height]];
-       $line->{'areafill'} = 20;
-       $line->{'fillcolor'} = $color;
-       $fig->add ($line);
-
-       my($text) = new XFig ('text');
-
-       if ($color==$color_suspended) {
-           $text->{'text'} = "Suspended";
-       }
-       if ($color==$color_compute) {
-           $text->{'text'} = "Computing";
-       }
-       if ($color==$color_wait_for_recpt) {
-           $text->{'text'} = "Waiting for reception";
-       }
-       if ($color==$color_communicate) {
-           $text->{'text'} = "Communicating";
-       }
-
-       $text->{'y'} = $min_Y + ($i-0.5)*$height +68;
-       $text->{'x'} = 50;
-       $text->{'subtype'} = 0;
-       $fig->add ($text);
-       $i++;
-    }
-
-# Time axis
-    my($line) = new XFig ('polyline');
-    $line->{'depth'} = 0;
-    $line->{'subtype'} = 1;  # line
-    $line->{'points'} = [ [0,0],[$max_date * $grid_X_size+150,0] ];
-    $line->{'forwardarrow'} = ['1', '1', '1.00', '60.00', '120.00'];
-    $fig->add ($line);
-
-    my($digits)=POSIX::floor(log($max_date)/log(10));
-    my($exponent) = 10**$digits;
-    my($mantissa)= $max_date / $exponent;
-    my($incr);
-    if ($mantissa<2) {
-       $incr = $exponent/10;
-    } elsif ($mantissa<5) {
-       $incr = $exponent/4;
-    } else {
-       $incr = $exponent/2;
-    }
-
-    print "$max_date $digits $exponent $mantissa $incr\n";
-    my($x);
-    for($x=0; $x < $max_date; $x += $incr) {
-       print "$x\n";
-       $line = new XFig ('polyline');
-       $line->{'depth'} = 0;
-       $line->{'subtype'} = 1;  # line
-       $line->{'points'} = [ [$x * $grid_X_size,0],[$x * $grid_X_size, -100] ];
-       $line->{'forwardarrow'} = 0;
-       $fig->add ($line);
-
-       my($text) = new XFig ('text');
-       $text->{'text'} = "$x";
-       $text->{'y'} = -200;
-       $text->{'x'} = $x * $grid_X_size;
-       $text->{'subtype'} = 1;
-       $fig->add ($text);
-    }
-
-# Empty line so that the text of the time axis can be seen on the pdf
-    $line = new XFig ('polyline');
-    $line->{'depth'} = 999;
-    $line->{'subtype'} = 1;  # line
-    $line->{'thickness'} = 0;
-    $line->{'points'} = [ [0,0],[0, -400] ];
-    $fig->add ($line);
-}
-
-sub main {
-    my($Cat) = read_cat($ARGV[0]);
-    my($cat_tree)=build_cat_tree("0",$Cat);
-    read_event($ARGV[0],$Cat);
-    my($Link)=read_link($ARGV[0]);
-#    print Dumper($cat_tree);
-#    print Dumper($Cat);
-    my($cat_list)=[];
-    build_cat_list($cat_tree,$cat_list);
-    shift @$cat_list;
-    shift @$cat_list;
-#    print "@$cat_list \n";
-    set_cat_position($Cat,$cat_list);
-
-    my($fig)=create_fig("toto.fig");
-    draw_cat($fig,$Cat,$Link);
-    $fig->writefile ();
-    system "fig2dev -L pdf toto.fig toto.pdf";
-}
-
-main;
index 7ca8e49..414e10b 100644 (file)
@@ -23,7 +23,6 @@ set(EXTRA_DIST
   src/kernel/resource/WifiLinkImpl.hpp
   src/mc/mc_mmu.hpp
   src/mc/mc_record.hpp
-  src/msg/msg_private.hpp
   src/smpi/colls/coll_tuned_topo.hpp
   src/smpi/colls/colls_private.hpp
   src/smpi/colls/smpi_mvapich2_selector_stampede.hpp
@@ -475,14 +474,6 @@ set(SIMGRID_SRC
   src/simgrid/util.hpp
   )
 
-set(MSG_SRC
-  src/msg/msg_comm.cpp
-  src/msg/msg_global.cpp
-  src/msg/msg_legacy.cpp
-  src/msg/msg_process.cpp
-  src/msg/msg_task.cpp
-  )
-
 set(DAG_SRC
   src/dag/loaders.cpp
   )
@@ -743,14 +734,6 @@ set(simgrid_sources
   ${DAG_SRC}
   )
 
-if(${enable_msg})
-  set(headers_to_install ${headers_to_install}  include/simgrid/msg.h)
-  set(simgrid_sources    ${simgrid_sources}     ${MSG_SRC})
-else()
-  set(EXTRA_DIST         ${EXTRA_DIST}          include/simgrid/msg.h
-                                                ${MSG_SRC})
-endif()
-
 if(enable_smpi)
   set(simgrid_sources  ${simgrid_sources}  ${SMPI_SRC})
 endif()
@@ -821,7 +804,6 @@ set(DOC_SOURCES
   docs/source/img/zoom_comm.svg
 
   docs/source/application.rst
-  docs/source/app_msg.rst
   docs/source/app_s4u.rst
   docs/source/app_smpi.rst
   docs/source/The_XBT_toolbox.rst
@@ -925,8 +907,6 @@ set(DOC_TOOLS
 
 # these files get copied automatically to the html documentation
 set(DOC_IMG
-  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/Paje_MSG_screenshot.jpg
-  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/Paje_MSG_screenshot_thn.jpg
   ${CMAKE_HOME_DIRECTORY}/doc/webcruft/eclipseScreenShot.png
   ${CMAKE_HOME_DIRECTORY}/doc/webcruft/output.goal.pdf
   )
@@ -969,7 +949,6 @@ set(CMAKEFILES_TXT
   teshsuite/kernel/CMakeLists.txt
   teshsuite/mc/CMakeLists.txt
   teshsuite/models/CMakeLists.txt
-  teshsuite/msg/CMakeLists.txt
   teshsuite/platforms/CMakeLists.txt
   teshsuite/python/CMakeLists.txt
   teshsuite/s4u/CMakeLists.txt
index 85b862e..26de62b 100644 (file)
@@ -25,14 +25,6 @@ endif()
 
 install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/tesh DESTINATION ${CMAKE_INSTALL_BINDIR}/)
 
-install(PROGRAMS ${CMAKE_HOME_DIRECTORY}/tools/MSG_visualization/colorize.pl
-  DESTINATION ${CMAKE_INSTALL_BINDIR}/
-  RENAME simgrid-colorizer)
-
-add_custom_target(simgrid-colorizer ALL
-  COMMENT "Install ${CMAKE_BINARY_DIR}/bin/colorize"
-  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/tools/MSG_visualization/colorize.pl ${CMAKE_BINARY_DIR}/bin/colorize)
-
 install(PROGRAMS ${CMAKE_HOME_DIRECTORY}/tools/simgrid_update_xml.pl
   DESTINATION ${CMAKE_INSTALL_BINDIR}/
   RENAME simgrid_update_xml)
@@ -89,7 +81,6 @@ set(source_to_pack
   ${MC_SRC_BASE}
   ${MC_SRC}
   ${MC_SIMGRID_MC_SRC}
-  ${MSG_SRC}
   ${S4U_SRC}
   ${NS3_SRC}
   ${PLUGINS_SRC}
index 1ac8929..cea1291 100644 (file)
@@ -23,7 +23,12 @@ option(enable_debug                 "Turn this off to remove all debug messages
 option(enable_documentation "Whether to produce documentation" off)
 
 option(enable_ns3            "Whether ns-3 model is activated." off)
-option(enable_msg            "Whether the MSG module is activated." off)
+option(enable_msg            "Java was removed from SimGrid v3.33. Please do not enable it here." off)
+mark_as_advanced(enable_msg)
+if (enable_msg)
+  message(FATAL "MSG was removed from SimGrid v3.33. Please stick to v3.32 or earlier if you need Java.")
+endif()
+
 option(enable_java            "Java was removed from SimGrid v3.33. Please do not enable it here." off)
 mark_as_advanced(enable_java)
 if (enable_java)
index 1e0a264..86b7ac1 100644 (file)
@@ -62,7 +62,6 @@ ModelChecker
 modelchecker
 MPI
 MPICH
-msg
 mutex
 NetZone
 nullptr
index 34ffbf7..d38aac2 100755 (executable)
@@ -95,7 +95,7 @@ if [ -f Testing/TAG ] ; then
   sloccount --duplicates --wide --details "$WORKSPACE" | grep -v -e '.git' -e 'mpich3-test' -e 'sloccount.sc' -e 'build/' -e 'xml_coverage.xml' -e 'CTestResults_memcheck.xml' -e 'DynamicAnalysis.xml' > "$WORKSPACE"/sloccount.sc
 
   #generate PVS-studio report
-  EXCLUDEDPATH="-e $WORKSPACE/src/include/catch.hpp -e $WORKSPACE/src/include/xxhash.hpp -e $WORKSPACE/teshsuite/smpi/mpich3-test/ -e *_dtd.c -e *_dtd.h -e *.yy.c -e *.tab.cacc -e *.tab.hacc -e $WORKSPACE/src/smpi/colls/ -e $WORKSPACE/examples/smpi/NAS/ -e $WORKSPACE/examples/smpi/gemm/gemm.c -e $WORKSPACE/src/msg/ -e $WORKSPACE/include/msg/ -e $WORKSPACE/teshsuite/msg/"
+  EXCLUDEDPATH="-e $WORKSPACE/src/include/catch.hpp -e $WORKSPACE/src/include/xxhash.hpp -e $WORKSPACE/teshsuite/smpi/mpich3-test/ -e *_dtd.c -e *_dtd.h -e *.yy.c -e *.tab.cacc -e *.tab.hacc -e $WORKSPACE/src/smpi/colls/ -e $WORKSPACE/examples/smpi/NAS/ -e $WORKSPACE/examples/smpi/gemm/gemm.cq"
   pvs-studio-analyzer analyze -f "$BUILDFOLDER"/compile_commands.json -o "$WORKSPACE"/pvs.log $EXCLUDEDPATH -j$NUMPROC
   # Disable:
   # V521 Such expressions using the ',' operator are dangerous. (-> commas in catch.hpp),
index 9d3af90..157800a 100755 (executable)
@@ -18,7 +18,7 @@ onoff() {
   fi
 }
 
-[ $# -eq 4 ] || die "Needs 4 arguments : MC SMPI DEBUG MSG"
+[ $# -eq 4 ] || die "Needs 4 arguments : MC SMPI DEBUG"
 
 ### Cleanup previous runs
 
@@ -65,15 +65,8 @@ else
   builddebug="OFF"
 fi
 
-if [ "$4" = "MSG" ]
-then
-  buildmsg="ON"
-else
-  buildmsg="OFF"
-fi
-
-echo "Step ${STEP}/${NSTEPS} - Building with debug=${builddebug}, SMPI=${buildsmpi}, MC=${buildmc}, MSG=${buildmsg}"
-cmake -Denable_documentation=OFF -Denable_msg=${buildmsg} \
+echo "Step ${STEP}/${NSTEPS} - Building with debug=${builddebug}, SMPI=${buildsmpi}, MC=${buildmc}"
+cmake -Denable_documentation=OFF \
       -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \
       -Denable_mallocators=ON -Denable_debug=${builddebug} \
       -Denable_smpi=${buildsmpi} -Denable_smpi_MPICH3_testsuite=${buildsmpi} -Denable_model-checking=${buildmc} \