Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
doc/tuto: docker, show how to fix the permissions
[simgrid.git] / docs / source / app_msg.rst
index 8b6735f..ebfc632 100644 (file)
@@ -9,7 +9,10 @@ The MSG Interface (legacy interface)
    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
    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 2020 at least.
+   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
 
 MSG is a simple API to write algorithms organized with Concurrent
 Sequential Processes (CSP) that interact by exchanging messages. It
@@ -29,7 +32,7 @@ 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
  - 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`) 
+   :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`
 
  - Launch your processes from a deployment file with :cpp:func:`MSG_launch_application`
  - Run the simulation with :cpp:func:`MSG_main`
 
@@ -44,7 +47,6 @@ The basic workflow is the following:
 .. doxygendefine:: MSG_init
 .. doxygenfunction:: MSG_launch_application
 .. doxygenfunction:: MSG_main
 .. doxygendefine:: MSG_init
 .. doxygenfunction:: MSG_launch_application
 .. doxygenfunction:: MSG_main
-.. doxygenfunction:: MSG_set_function
 
 Process Management
 ==================
 
 Process Management
 ==================
@@ -59,12 +61,10 @@ This describes the process structure :cpp:type:`msg_process_t` and the functions
 .. doxygenfunction:: MSG_process_create_with_environment
 .. doxygenfunction:: MSG_process_daemonize
 .. doxygenfunction:: MSG_process_detach
 .. doxygenfunction:: MSG_process_create_with_environment
 .. doxygenfunction:: MSG_process_daemonize
 .. doxygenfunction:: MSG_process_detach
-.. doxygenfunction:: MSG_processes_as_dynar
 .. doxygenfunction:: MSG_process_from_PID
 .. doxygenfunction:: MSG_process_get_data
 .. doxygenfunction:: MSG_process_get_host
 .. doxygenfunction:: MSG_process_get_name
 .. doxygenfunction:: MSG_process_from_PID
 .. doxygenfunction:: MSG_process_get_data
 .. doxygenfunction:: MSG_process_get_host
 .. doxygenfunction:: MSG_process_get_name
-.. doxygenfunction:: MSG_process_get_number
 .. doxygenfunction:: MSG_process_get_PID
 .. doxygenfunction:: MSG_process_get_PPID
 .. doxygenfunction:: MSG_process_get_properties
 .. doxygenfunction:: MSG_process_get_PID
 .. doxygenfunction:: MSG_process_get_PPID
 .. doxygenfunction:: MSG_process_get_properties
@@ -97,10 +97,8 @@ Host Management
 .. doxygenfunction:: MSG_host_by_name
 .. doxygenfunction:: MSG_get_host_by_name
 .. doxygenfunction:: MSG_get_host_number
 .. doxygenfunction:: MSG_host_by_name
 .. doxygenfunction:: MSG_get_host_by_name
 .. doxygenfunction:: MSG_get_host_number
-.. doxygenfunction:: MSG_host_get_attached_storage_lists
 .. doxygenfunction:: MSG_host_get_core_number
 .. doxygenfunction:: MSG_host_get_data
 .. doxygenfunction:: MSG_host_get_core_number
 .. doxygenfunction:: MSG_host_get_data
-.. doxygenfunction:: MSG_host_get_mounted_storage_list
 .. doxygenfunction:: MSG_host_get_name
 .. doxygenfunction:: MSG_host_get_nb_pstates
 .. doxygenfunction:: MSG_host_get_load
 .. doxygenfunction:: MSG_host_get_name
 .. doxygenfunction:: MSG_host_get_nb_pstates
 .. doxygenfunction:: MSG_host_get_load
@@ -113,7 +111,6 @@ Host Management
 .. doxygenfunction:: MSG_host_is_on
 .. doxygenfunction:: MSG_host_off
 .. doxygenfunction:: MSG_host_on
 .. doxygenfunction:: MSG_host_is_on
 .. doxygenfunction:: MSG_host_off
 .. doxygenfunction:: MSG_host_on
-.. doxygenfunction:: MSG_hosts_as_dynar
 .. doxygenfunction:: MSG_host_self
 .. doxygenfunction:: MSG_host_set_data
 .. doxygenfunction:: MSG_host_set_property_value
 .. doxygenfunction:: MSG_host_self
 .. doxygenfunction:: MSG_host_set_data
 .. doxygenfunction:: MSG_host_set_property_value
@@ -125,6 +122,7 @@ Task Management
 Task structure of MSG :cpp:type:`msg_task_t` and associated functions.
 
 .. doxygentypedef:: msg_task_t
 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
 .. doxygendefine:: MSG_TASK_UNINITIALIZED
 
 .. doxygenfunction:: MSG_parallel_task_create
@@ -169,7 +167,7 @@ Task structure of MSG :cpp:type:`msg_task_t` and associated functions.
 .. doxygenfunction:: MSG_task_set_name
 .. doxygenfunction:: MSG_task_set_priority
 
 .. doxygenfunction:: MSG_task_set_name
 .. doxygenfunction:: MSG_task_set_priority
 
-                  
+
 Mailbox Management
 ==================
 
 Mailbox Management
 ==================
 
@@ -179,7 +177,7 @@ Communications
 ==============
 
 .. doxygentypedef:: msg_comm_t
 ==============
 
 .. 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_destroy
 .. doxygenfunction:: MSG_comm_get_status
 .. doxygenfunction:: MSG_comm_get_task
@@ -206,7 +204,7 @@ Barriers
 
 Semaphores
 ----------
 
 Semaphores
 ----------
-                    
+
 .. doxygentypedef:: msg_sem_t
 .. doxygenfunction:: MSG_sem_acquire
 .. doxygenfunction:: MSG_sem_acquire_timeout
 .. doxygentypedef:: msg_sem_t
 .. doxygenfunction:: MSG_sem_acquire
 .. doxygenfunction:: MSG_sem_acquire_timeout
@@ -241,26 +239,9 @@ processes.
 .. doxygenfunction:: MSG_vm_start
 .. doxygenfunction:: MSG_vm_suspend
 
 .. doxygenfunction:: MSG_vm_start
 .. doxygenfunction:: MSG_vm_suspend
 
-Storage Management
-==================
-Storage structure of MSG (:cpp:type:`msg_storage_t`) and associated functions, inspired from POSIX.
-
-.. doxygentypedef:: msg_storage_t
-.. doxygenfunction:: MSG_storage_get_by_name
-.. doxygenfunction:: MSG_storage_get_data
-.. doxygenfunction:: MSG_storage_get_host
-.. doxygenfunction:: MSG_storage_get_name
-.. doxygenfunction:: MSG_storage_get_properties
-.. doxygenfunction:: MSG_storage_get_property_value
-.. doxygenfunction:: MSG_storage_read
-.. doxygenfunction:: MSG_storages_as_dynar
-.. doxygenfunction:: MSG_storage_set_data
-.. doxygenfunction:: MSG_storage_set_property_value
-.. doxygenfunction:: MSG_storage_write
-
 NetZone Management
 ==================
 NetZone Management
 ==================
-Network Zone (:cpp:class:`msg_file_t`) and associated functions.
+Network Zone (:cpp:type:`msg_netzone_t`) and associated functions.
 
 .. doxygentypedef:: msg_netzone_t
 .. doxygenfunction:: MSG_zone_get_by_name
 
 .. doxygentypedef:: msg_netzone_t
 .. doxygenfunction:: MSG_zone_get_by_name
@@ -271,10 +252,12 @@ Network Zone (:cpp:class:`msg_file_t`) and associated functions.
 .. doxygenfunction:: MSG_zone_get_sons
 .. doxygenfunction:: MSG_zone_set_property_value
 
 .. doxygenfunction:: MSG_zone_get_sons
 .. doxygenfunction:: MSG_zone_set_property_value
 
+.. _Java_doc:
+
 Java bindings
 *************
 
 Java bindings
 *************
 
-This section describes jMSG, the Java API to Simgrid. This API mimicks 
+This section describes jMSG, the Java API to Simgrid. This API mimics
 :ref:`MSG <MSG_doc>`, which is a simple yet somehow realistic interface.
 The full reference documentation is provided at the end of this page.
 
 :ref:`MSG <MSG_doc>`, which is a simple yet somehow realistic interface.
 The full reference documentation is provided at the end of this page.
 
@@ -296,17 +279,17 @@ Using the Java bindings
 In most cases, you can use the SimGrid bindings as if it was a Java
 library:
 
 In most cases, you can use the SimGrid bindings as if it was a Java
 library:
 
-.. code-block:: shell
+.. code-block:: console
 
    $ javac -classpath .:path/to/simgrid.jar your/java/Code.java
    $ java -classpath .:path/to/simgrid.jar your.java.Code the/parameter/to/your/code
 
 For example:
 
 
    $ javac -classpath .:path/to/simgrid.jar your/java/Code.java
    $ java -classpath .:path/to/simgrid.jar your.java.Code the/parameter/to/your/code
 
 For example:
 
-.. code-block:: shell
+.. code-block:: console
 
    $ cd examples/deprecated/java
 
    $ cd examples/deprecated/java
-   $ java -classpath ../../simgrid.jar:. .:../../simgrid.jar app.pingpong.Main ../platforms/platform.xml 
+   $ java -classpath ../../simgrid.jar:. .:../../simgrid.jar app.pingpong.Main ../platforms/platform.xml
 
 Any SimGrid simulation (java or not) is usually constituted of several
 kind of actors or processes (classes extending @c Msg.Process) that
 
 Any SimGrid simulation (java or not) is usually constituted of several
 kind of actors or processes (classes extending @c Msg.Process) that
@@ -353,7 +336,7 @@ When using jMSG, your program can crash for 3 main reasons:
   you should read carefully MSG samples and/or documentation.
 - Something has crashed in the C part. Okay, here comes the tricky
   thing. It happens mainly for 2 reasons:
   you should read carefully MSG samples and/or documentation.
 - Something has crashed in the C part. Okay, here comes the tricky
   thing. It happens mainly for 2 reasons:
-  
+
   - When something goes wrong in your simulation, sometimes the C part stops
     because you used SimGrid incorrectly, and JNI bindings are not fond of that.
     It means that you'll have something that looks ugly, but you should be able
   - When something goes wrong in your simulation, sometimes the C part stops
     because you used SimGrid incorrectly, and JNI bindings are not fond of that.
     It means that you'll have something that looks ugly, but you should be able