From f68b5425a63606f95910595c8aae0e001b325ff7 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Mon, 30 Apr 2018 17:27:07 +0200 Subject: [PATCH] prefix general executables with 'fairmq-' --- .../test-ex-multiple-transports.sh.in | 4 +- examples/region/test-ex-region.sh.in | 4 +- fairmq/CMakeLists.txt | 48 +++++++++---------- fairmq/run/startMQBenchmark.sh.in | 4 +- fairmq/shmem/FairMQTransportFactorySHM.cxx | 14 +++--- fairmq/shmem/Monitor.cxx | 2 +- fairmq/shmem/README.md | 2 +- 7 files changed, 39 insertions(+), 39 deletions(-) diff --git a/examples/multiple-transports/test-ex-multiple-transports.sh.in b/examples/multiple-transports/test-ex-multiple-transports.sh.in index 96539702..ef7f9e7c 100755 --- a/examples/multiple-transports/test-ex-multiple-transports.sh.in +++ b/examples/multiple-transports/test-ex-multiple-transports.sh.in @@ -1,7 +1,7 @@ #!/bin/bash -SESSION="$(@CMAKE_BINARY_DIR@/fairmq/uuidGen -h)" +SESSION="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)" -trap 'kill -TERM $SAMPLER1_PID; kill -TERM $SAMPLER2_PID; kill -TERM $SINK_PID; wait $SAMPLER1_PID; wait $SAMPLER2_PID; wait $SINK_PID; @CMAKE_BINARY_DIR@/fairmq/shmmonitor --cleanup --session $SESSION;' TERM +trap 'kill -TERM $SAMPLER1_PID; kill -TERM $SAMPLER2_PID; kill -TERM $SINK_PID; wait $SAMPLER1_PID; wait $SAMPLER2_PID; wait $SINK_PID; @CMAKE_BINARY_DIR@/fairmq/fairmq-shmmonitor --cleanup --session $SESSION;' TERM SINK="fairmq-ex-multiple-transports-sink" SINK+=" --id sink1" diff --git a/examples/region/test-ex-region.sh.in b/examples/region/test-ex-region.sh.in index b063ca70..d864084c 100755 --- a/examples/region/test-ex-region.sh.in +++ b/examples/region/test-ex-region.sh.in @@ -1,10 +1,10 @@ #!/bin/bash msgSize="1000000" -SESSION="$(@CMAKE_BINARY_DIR@/fairmq/uuidGen -h)" +SESSION="$(@CMAKE_BINARY_DIR@/fairmq/fairmq-uuid-gen -h)" # setup a trap to kill everything if the test fails/timeouts -trap 'kill -TERM $SAMPLER_PID; kill -TERM $SINK_PID; wait $SAMPLER_PID; wait $SINK_PID; @CMAKE_BINARY_DIR@/fairmq/shmmonitor --cleanup --session $SESSION' TERM +trap 'kill -TERM $SAMPLER_PID; kill -TERM $SINK_PID; wait $SAMPLER_PID; wait $SINK_PID; @CMAKE_BINARY_DIR@/fairmq/fairmq-shmmonitor --cleanup --session $SESSION' TERM SAMPLER="fairmq-ex-region-sampler" SAMPLER+=" --id sampler1" diff --git a/fairmq/CMakeLists.txt b/fairmq/CMakeLists.txt index 860676c3..9b6a32b3 100644 --- a/fairmq/CMakeLists.txt +++ b/fairmq/CMakeLists.txt @@ -241,32 +241,32 @@ set_target_properties(FairMQ PROPERTIES # executables # ############### -add_executable(bsampler run/runBenchmarkSampler.cxx) -target_link_libraries(bsampler FairMQ) +add_executable(fairmq-bsampler run/runBenchmarkSampler.cxx) +target_link_libraries(fairmq-bsampler FairMQ) -add_executable(merger run/runMerger.cxx) -target_link_libraries(merger FairMQ) +add_executable(fairmq-merger run/runMerger.cxx) +target_link_libraries(fairmq-merger FairMQ) -add_executable(multiplier run/runMultiplier.cxx) -target_link_libraries(multiplier FairMQ) +add_executable(fairmq-multiplier run/runMultiplier.cxx) +target_link_libraries(fairmq-multiplier FairMQ) -add_executable(proxy run/runProxy.cxx) -target_link_libraries(proxy FairMQ) +add_executable(fairmq-proxy run/runProxy.cxx) +target_link_libraries(fairmq-proxy FairMQ) -add_executable(sink run/runSink.cxx) -target_link_libraries(sink FairMQ) +add_executable(fairmq-sink run/runSink.cxx) +target_link_libraries(fairmq-sink FairMQ) -add_executable(splitter run/runSplitter.cxx) -target_link_libraries(splitter FairMQ) +add_executable(fairmq-splitter run/runSplitter.cxx) +target_link_libraries(fairmq-splitter FairMQ) add_executable(runConfigExample options/runConfigEx.cxx) target_link_libraries(runConfigExample FairMQ) -add_executable(shmmonitor shmem/runMonitor.cxx) -target_link_libraries(shmmonitor FairMQ) +add_executable(fairmq-shmmonitor shmem/runMonitor.cxx) +target_link_libraries(fairmq-shmmonitor FairMQ) -add_executable(uuidGen run/runUuidGenerator.cxx) -target_link_libraries(uuidGen FairMQ) +add_executable(fairmq-uuid-gen run/runUuidGenerator.cxx) +target_link_libraries(fairmq-uuid-gen FairMQ) ########### # install # @@ -274,14 +274,14 @@ target_link_libraries(uuidGen FairMQ) install( TARGETS # FairMQFull, tests are not installed FairMQ - bsampler - merger - multiplier - proxy - sink - splitter - shmmonitor - uuidGen + fairmq-bsampler + fairmq-merger + fairmq-multiplier + fairmq-proxy + fairmq-sink + fairmq-splitter + fairmq-shmmonitor + fairmq-uuid-gen EXPORT ${PROJECT_EXPORT_SET} LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR} diff --git a/fairmq/run/startMQBenchmark.sh.in b/fairmq/run/startMQBenchmark.sh.in index 4065dd02..d0088163 100755 --- a/fairmq/run/startMQBenchmark.sh.in +++ b/fairmq/run/startMQBenchmark.sh.in @@ -60,7 +60,7 @@ fi echo "" echo "Usage: startBenchmark [message size=1000000] [number of iterations=0] [transport=zeromq/nanomsg/shmem] [resend same message=true] [affinity=false]" -SAMPLER="bsampler" +SAMPLER="fairmq-bsampler" SAMPLER+=" --id bsampler1" #SAMPLER+=" --io-threads 2" #SAMPLER+=" --control static" @@ -76,7 +76,7 @@ echo "" echo "started: xterm -geometry 90x50+0+0 -hold -e $affinitySamp @CMAKE_CURRENT_BINARY_DIR@/$SAMPLER" echo "pid: $!" -SINK="sink" +SINK="fairmq-sink" SINK+=" --id sink1" #SINK+=" --io-threads 2" #SINK+=" --control static" diff --git a/fairmq/shmem/FairMQTransportFactorySHM.cxx b/fairmq/shmem/FairMQTransportFactorySHM.cxx index fa755659..32d124b3 100644 --- a/fairmq/shmem/FairMQTransportFactorySHM.cxx +++ b/fairmq/shmem/FairMQTransportFactorySHM.cxx @@ -117,17 +117,17 @@ FairMQTransportFactorySHM::FairMQTransportFactorySHM(const string& id, const Fai MonitorStatus* monitorStatus = fManager->ManagementSegment().find(bipc::unique_instance).first; if (monitorStatus == nullptr) { - LOG(debug) << "no shmmonitor found, starting..."; + LOG(debug) << "no fairmq-shmmonitor found, starting..."; StartMonitor(); } else { - LOG(debug) << "found shmmonitor."; + LOG(debug) << "found fairmq-shmmonitor."; } } catch (std::exception& e) { - LOG(error) << "Exception during shmmonitor initialization: " << e.what() << ", application will now exit"; + LOG(error) << "Exception during fairmq-shmmonitor initialization: " << e.what() << ", application will now exit"; exit(EXIT_FAILURE); } } @@ -149,7 +149,7 @@ void FairMQTransportFactorySHM::StartMonitor() auto env = boost::this_process::environment(); - boost::filesystem::path p = boost::process::search_path("shmmonitor"); + boost::filesystem::path p = boost::process::search_path("fairmq-shmmonitor"); if (!p.empty()) { @@ -160,7 +160,7 @@ void FairMQTransportFactorySHM::StartMonitor() MonitorStatus* monitorStatus = fManager->ManagementSegment().find(bipc::unique_instance).first; if (monitorStatus) { - LOG(debug) << "shmmonitor started"; + LOG(debug) << "fairmq-shmmonitor started"; break; } else @@ -168,7 +168,7 @@ void FairMQTransportFactorySHM::StartMonitor() this_thread::sleep_for(std::chrono::milliseconds(10)); if (++numTries > 1000) { - LOG(error) << "Did not get response from shmmonitor after " << 10 * 1000 << " milliseconds. Exiting."; + LOG(error) << "Did not get response from fairmq-shmmonitor after " << 10 * 1000 << " milliseconds. Exiting."; exit(EXIT_FAILURE); } } @@ -177,7 +177,7 @@ void FairMQTransportFactorySHM::StartMonitor() } else { - LOG(WARN) << "could not find shmmonitor in the path"; + LOG(WARN) << "could not find fairmq-shmmonitor in the path"; } } diff --git a/fairmq/shmem/Monitor.cxx b/fairmq/shmem/Monitor.cxx index a2b7f5c8..669ffb56 100644 --- a/fairmq/shmem/Monitor.cxx +++ b/fairmq/shmem/Monitor.cxx @@ -72,7 +72,7 @@ Monitor::Monitor(const string& sessionName, bool selfDestruct, bool interactive, MonitorStatus* monitorStatus = fManagementSegment.find(bipc::unique_instance).first; if (monitorStatus != nullptr) { - cout << "shmmonitor already started or not properly exited. Try `shmmonitor --cleanup`" << endl; + cout << "fairmq-shmmonitor already started or not properly exited. Try `fairmq-shmmonitor --cleanup`" << endl; exit(EXIT_FAILURE); } fManagementSegment.construct(bipc::unique_instance)(); diff --git a/fairmq/shmem/README.md b/fairmq/shmem/README.md index 10573a8a..00bf74de 100644 --- a/fairmq/shmem/README.md +++ b/fairmq/shmem/README.md @@ -23,7 +23,7 @@ Without the `--self-destruct` option, the monitor will run continuously, moitori Possible further implementation would be to run the monitor with `--self-destruct` with each topology. -The FairMQShmMonitor class can also be used independently from the supplied executable (built from `runFairMQShmMonitor.cxx`), allowing integration on any level. For example invoking the monitor could be a functionality that a device offers. +The Monitor class can also be used independently from the supplied executable (built from `runMonitor.cxx`), allowing integration on any level. For example invoking the monitor could be a functionality that a device offers. FairMQ Shared Memory currently uses following names to register shared memory on the system: