From 39075e45bcab1091ea441c9cf8d659bcbbc661ca Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 11 Jul 2020 16:35:31 +0200 Subject: [PATCH] Rename examples: slave -> worker. --- .gitignore | 2 +- MANIFEST.in | 8 ++++---- doc/doxygen/FAQ.doc | 2 +- examples/smpi/smpi_s4u_masterslave/CMakeLists.txt | 12 ------------ examples/smpi/smpi_s4u_masterworker/CMakeLists.txt | 12 ++++++++++++ .../deployment_masterworker_mailbox_smpi.xml} | 0 .../masterworker_mailbox_smpi.cpp} | 0 .../s4u_smpi.tesh | 2 +- src/bindings/java/org/simgrid/msg/Process.java | 10 +++++----- teshsuite/lua/CMakeLists.txt | 7 +++---- tools/cmake/DefinePackages.cmake | 2 +- 11 files changed, 28 insertions(+), 29 deletions(-) delete mode 100644 examples/smpi/smpi_s4u_masterslave/CMakeLists.txt create mode 100644 examples/smpi/smpi_s4u_masterworker/CMakeLists.txt rename examples/smpi/{smpi_s4u_masterslave/deployment_masterslave_mailbox_smpi.xml => smpi_s4u_masterworker/deployment_masterworker_mailbox_smpi.xml} (100%) rename examples/smpi/{smpi_s4u_masterslave/masterslave_mailbox_smpi.cpp => smpi_s4u_masterworker/masterworker_mailbox_smpi.cpp} (100%) rename examples/smpi/{smpi_s4u_masterslave => smpi_s4u_masterworker}/s4u_smpi.tesh (94%) diff --git a/.gitignore b/.gitignore index e835918df4..94d8c39b30 100644 --- a/.gitignore +++ b/.gitignore @@ -273,7 +273,7 @@ examples/smpi/replay_multiple_manual_deploy/workload_mixed2 examples/smpi/replay_multiple_manual_deploy/workload_nojob examples/smpi/replay/one_trace examples/smpi/replay/smpi_replay -examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi +examples/smpi/smpi_s4u_masterworker/masterworker_mailbox_smpi examples/smpi/trace_call_location/smpi_trace_call_location examples/smpi/trace_simple/smpi_trace_simple examples/smpi/trace/smpi_trace diff --git a/MANIFEST.in b/MANIFEST.in index d1763be095..2fd570b7ed 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -634,9 +634,9 @@ include examples/smpi/replay_multiple_manual_deploy/workload_compute_consecutive include examples/smpi/replay_multiple_manual_deploy/workload_compute_simple include examples/smpi/replay_multiple_manual_deploy/workload_mixed2_same_time include examples/smpi/replay_multiple_manual_deploy/workload_mixed2_same_time_and_resources -include examples/smpi/smpi_s4u_masterslave/deployment_masterslave_mailbox_smpi.xml -include examples/smpi/smpi_s4u_masterslave/masterslave_mailbox_smpi.cpp -include examples/smpi/smpi_s4u_masterslave/s4u_smpi.tesh +include examples/smpi/smpi_s4u_masterworker/deployment_masterworker_mailbox_smpi.xml +include examples/smpi/smpi_s4u_masterworker/masterworker_mailbox_smpi.cpp +include examples/smpi/smpi_s4u_masterworker/s4u_smpi.tesh include examples/smpi/trace/trace.c include examples/smpi/trace/trace.tesh include examples/smpi/trace_call_location/adjust @@ -1958,7 +1958,7 @@ include examples/smpi/mc/non_deterministic.tesh include examples/smpi/mc/only_send_deterministic.tesh include examples/smpi/replay_multiple/CMakeLists.txt include examples/smpi/replay_multiple_manual_deploy/CMakeLists.txt -include examples/smpi/smpi_s4u_masterslave/CMakeLists.txt +include examples/smpi/smpi_s4u_masterworker/CMakeLists.txt include include/simgrid/Exception.hpp include include/simgrid/actor.h include include/simgrid/barrier.h diff --git a/doc/doxygen/FAQ.doc b/doc/doxygen/FAQ.doc index 36f5c3e95e..674f55dac4 100644 --- a/doc/doxygen/FAQ.doc +++ b/doc/doxygen/FAQ.doc @@ -109,7 +109,7 @@ 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, slaves[i % slaves_count], PORT_22); + MSG_task_put(task, workers[i % workers_count], PORT_22); XBT_INFO("Send completed"); return 0; } diff --git a/examples/smpi/smpi_s4u_masterslave/CMakeLists.txt b/examples/smpi/smpi_s4u_masterslave/CMakeLists.txt deleted file mode 100644 index 41e4dcf3a5..0000000000 --- a/examples/smpi/smpi_s4u_masterslave/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -if(enable_smpi) - include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") - - add_executable (masterslave_mailbox_smpi EXCLUDE_FROM_ALL masterslave_mailbox_smpi.cpp) - target_link_libraries(masterslave_mailbox_smpi simgrid) - ADD_TESH_FACTORIES(smpi-s4u-masterslave "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/smpi_s4u_masterslave --cd ${CMAKE_BINARY_DIR}/examples/smpi/smpi_s4u_masterslave ${CMAKE_HOME_DIRECTORY}/examples/smpi/smpi_s4u_masterslave/s4u_smpi.tesh) - add_dependencies(tests masterslave_mailbox_smpi) -endif() - -set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/s4u_smpi.tesh PARENT_SCOPE) -set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterslave_mailbox_smpi.xml PARENT_SCOPE) -set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/masterslave_mailbox_smpi.cpp PARENT_SCOPE) diff --git a/examples/smpi/smpi_s4u_masterworker/CMakeLists.txt b/examples/smpi/smpi_s4u_masterworker/CMakeLists.txt new file mode 100644 index 0000000000..5ffc2c32e8 --- /dev/null +++ b/examples/smpi/smpi_s4u_masterworker/CMakeLists.txt @@ -0,0 +1,12 @@ +if(enable_smpi) + include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") + + add_executable (masterworker_mailbox_smpi EXCLUDE_FROM_ALL masterworker_mailbox_smpi.cpp) + target_link_libraries(masterworker_mailbox_smpi simgrid) + ADD_TESH_FACTORIES(smpi-s4u-masterworker "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/smpi_s4u_masterworker --cd ${CMAKE_BINARY_DIR}/examples/smpi/smpi_s4u_masterworker ${CMAKE_HOME_DIRECTORY}/examples/smpi/smpi_s4u_masterworker/s4u_smpi.tesh) + add_dependencies(tests masterworker_mailbox_smpi) +endif() + +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/s4u_smpi.tesh PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/deployment_masterworker_mailbox_smpi.xml PARENT_SCOPE) +set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/masterworker_mailbox_smpi.cpp PARENT_SCOPE) diff --git a/examples/smpi/smpi_s4u_masterslave/deployment_masterslave_mailbox_smpi.xml b/examples/smpi/smpi_s4u_masterworker/deployment_masterworker_mailbox_smpi.xml similarity index 100% rename from examples/smpi/smpi_s4u_masterslave/deployment_masterslave_mailbox_smpi.xml rename to examples/smpi/smpi_s4u_masterworker/deployment_masterworker_mailbox_smpi.xml diff --git a/examples/smpi/smpi_s4u_masterslave/masterslave_mailbox_smpi.cpp b/examples/smpi/smpi_s4u_masterworker/masterworker_mailbox_smpi.cpp similarity index 100% rename from examples/smpi/smpi_s4u_masterslave/masterslave_mailbox_smpi.cpp rename to examples/smpi/smpi_s4u_masterworker/masterworker_mailbox_smpi.cpp diff --git a/examples/smpi/smpi_s4u_masterslave/s4u_smpi.tesh b/examples/smpi/smpi_s4u_masterworker/s4u_smpi.tesh similarity index 94% rename from examples/smpi/smpi_s4u_masterslave/s4u_smpi.tesh rename to examples/smpi/smpi_s4u_masterworker/s4u_smpi.tesh index ff3932f456..a4198498bb 100644 --- a/examples/smpi/smpi_s4u_masterslave/s4u_smpi.tesh +++ b/examples/smpi/smpi_s4u_masterworker/s4u_smpi.tesh @@ -1,5 +1,5 @@ p Test the use of SMPI+MSG in the same file, as well as several different SMPI instances at the same time -$ ./masterslave_mailbox_smpi ${srcdir:=.}/../../platforms/small_platform_with_routers.xml ${srcdir:=.}/deployment_masterslave_mailbox_smpi.xml --log=smpi.:info --cfg=smpi/simulate-computation:no +$ ./masterworker_mailbox_smpi ${srcdir:=.}/../../platforms/small_platform_with_routers.xml ${srcdir:=.}/deployment_masterworker_mailbox_smpi.xml --log=smpi.:info --cfg=smpi/simulate-computation:no > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [0.000000] [smpi_config/INFO] You did not set the power of the host running the simulation. The timings will certainly not be accurate. Use the option "--cfg=smpi/host-speed:" to set its value. Check https://simgrid.org/doc/latest/Configuring_SimGrid.html#automatic-benchmarking-of-smpi-code for more information. > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 2 workers and 20 tasks to process diff --git a/src/bindings/java/org/simgrid/msg/Process.java b/src/bindings/java/org/simgrid/msg/Process.java index 5eeb9525bf..d8f1f3bdfd 100644 --- a/src/bindings/java/org/simgrid/msg/Process.java +++ b/src/bindings/java/org/simgrid/msg/Process.java @@ -14,12 +14,12 @@ import java.util.Arrays; * declared in the deployment file (XML format). * To create your own process you must inherit your own process from this * class and override the method "main()". For example if you want to use - * a process named Slave proceed as it : + * a process named Worker proceed as it : * * (1) import the class Process of the package simgrid.msg * import simgrid.msg.Process; * - * public class Slave extends simgrid.msg.Process { + * public class Worker extends simgrid.msg.Process { * * (2) Override the method function * @@ -30,9 +30,9 @@ import java.util.Arrays; * \endverbatim * } * The name of your process must be declared in the deployment file of your simulation. - * For the example, for the previous process Slave this file must contains a line : - * <process host="Maxims" function="Slave"/>, where Maxims is the host of the process - * Slave. All the process of your simulation are automatically launched and managed by Msg. + * For the example, for the previous process Worker this file must contains a line : + * <process host="Maxims" function="Worker"/>, where Maxims is the host of the process + * Worker. All the process of your simulation are automatically launched and managed by Msg. * A process use tasks to simulate communications or computations with another process. * For more information see Task. For more information on host concept * see Host. diff --git a/teshsuite/lua/CMakeLists.txt b/teshsuite/lua/CMakeLists.txt index a213e80910..7ee215c5fb 100644 --- a/teshsuite/lua/CMakeLists.txt +++ b/teshsuite/lua/CMakeLists.txt @@ -1,6 +1,5 @@ IF(SIMGRID_HAVE_LUA) - # Tests testing simulation from C but using lua for platform files. Executed like this - # ~$ ./masterslave platform.lua deploy.lua - ADD_TESH(lua-platform-masterslave --setenv srcdir=${CMAKE_HOME_DIRECTORY} --setenv bindir=${CMAKE_BINARY_DIR} --cd ${CMAKE_BINARY_DIR} ${CMAKE_HOME_DIRECTORY}/teshsuite/lua/lua_platforms.tesh) - SET_TESTS_PROPERTIES(lua-platform-masterslave PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/lib/lib?.${LIB_EXE}") + # Tests testing simulation from C++ but using lua for platform files. + ADD_TESH(lua-platform-masterworker --setenv srcdir=${CMAKE_HOME_DIRECTORY} --setenv bindir=${CMAKE_BINARY_DIR} --cd ${CMAKE_BINARY_DIR} ${CMAKE_HOME_DIRECTORY}/teshsuite/lua/lua_platforms.tesh) + SET_TESTS_PROPERTIES(lua-platform-masterworker PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/lib/lib?.${LIB_EXE}") ENDIF() diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 687ce0d796..8c6a280370 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -1012,7 +1012,7 @@ set(CMAKEFILES_TXT examples/s4u/CMakeLists.txt examples/smpi/CMakeLists.txt examples/smpi/NAS/CMakeLists.txt - examples/smpi/smpi_s4u_masterslave/CMakeLists.txt + examples/smpi/smpi_s4u_masterworker/CMakeLists.txt examples/smpi/replay_multiple/CMakeLists.txt examples/smpi/replay_multiple_manual_deploy/CMakeLists.txt examples/python/CMakeLists.txt -- 2.20.1