mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
prefix general executables with 'fairmq-'
This commit is contained in:
parent
4b05fda0d8
commit
f68b5425a6
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/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="fairmq-ex-multiple-transports-sink"
|
||||||
SINK+=" --id sink1"
|
SINK+=" --id sink1"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
msgSize="1000000"
|
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
|
# 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="fairmq-ex-region-sampler"
|
||||||
SAMPLER+=" --id sampler1"
|
SAMPLER+=" --id sampler1"
|
||||||
|
|
|
@ -241,32 +241,32 @@ set_target_properties(FairMQ PROPERTIES
|
||||||
# executables #
|
# executables #
|
||||||
###############
|
###############
|
||||||
|
|
||||||
add_executable(bsampler run/runBenchmarkSampler.cxx)
|
add_executable(fairmq-bsampler run/runBenchmarkSampler.cxx)
|
||||||
target_link_libraries(bsampler FairMQ)
|
target_link_libraries(fairmq-bsampler FairMQ)
|
||||||
|
|
||||||
add_executable(merger run/runMerger.cxx)
|
add_executable(fairmq-merger run/runMerger.cxx)
|
||||||
target_link_libraries(merger FairMQ)
|
target_link_libraries(fairmq-merger FairMQ)
|
||||||
|
|
||||||
add_executable(multiplier run/runMultiplier.cxx)
|
add_executable(fairmq-multiplier run/runMultiplier.cxx)
|
||||||
target_link_libraries(multiplier FairMQ)
|
target_link_libraries(fairmq-multiplier FairMQ)
|
||||||
|
|
||||||
add_executable(proxy run/runProxy.cxx)
|
add_executable(fairmq-proxy run/runProxy.cxx)
|
||||||
target_link_libraries(proxy FairMQ)
|
target_link_libraries(fairmq-proxy FairMQ)
|
||||||
|
|
||||||
add_executable(sink run/runSink.cxx)
|
add_executable(fairmq-sink run/runSink.cxx)
|
||||||
target_link_libraries(sink FairMQ)
|
target_link_libraries(fairmq-sink FairMQ)
|
||||||
|
|
||||||
add_executable(splitter run/runSplitter.cxx)
|
add_executable(fairmq-splitter run/runSplitter.cxx)
|
||||||
target_link_libraries(splitter FairMQ)
|
target_link_libraries(fairmq-splitter FairMQ)
|
||||||
|
|
||||||
add_executable(runConfigExample options/runConfigEx.cxx)
|
add_executable(runConfigExample options/runConfigEx.cxx)
|
||||||
target_link_libraries(runConfigExample FairMQ)
|
target_link_libraries(runConfigExample FairMQ)
|
||||||
|
|
||||||
add_executable(shmmonitor shmem/runMonitor.cxx)
|
add_executable(fairmq-shmmonitor shmem/runMonitor.cxx)
|
||||||
target_link_libraries(shmmonitor FairMQ)
|
target_link_libraries(fairmq-shmmonitor FairMQ)
|
||||||
|
|
||||||
add_executable(uuidGen run/runUuidGenerator.cxx)
|
add_executable(fairmq-uuid-gen run/runUuidGenerator.cxx)
|
||||||
target_link_libraries(uuidGen FairMQ)
|
target_link_libraries(fairmq-uuid-gen FairMQ)
|
||||||
|
|
||||||
###########
|
###########
|
||||||
# install #
|
# install #
|
||||||
|
@ -274,14 +274,14 @@ target_link_libraries(uuidGen FairMQ)
|
||||||
install(
|
install(
|
||||||
TARGETS # FairMQFull, tests are not installed
|
TARGETS # FairMQFull, tests are not installed
|
||||||
FairMQ
|
FairMQ
|
||||||
bsampler
|
fairmq-bsampler
|
||||||
merger
|
fairmq-merger
|
||||||
multiplier
|
fairmq-multiplier
|
||||||
proxy
|
fairmq-proxy
|
||||||
sink
|
fairmq-sink
|
||||||
splitter
|
fairmq-splitter
|
||||||
shmmonitor
|
fairmq-shmmonitor
|
||||||
uuidGen
|
fairmq-uuid-gen
|
||||||
|
|
||||||
EXPORT ${PROJECT_EXPORT_SET}
|
EXPORT ${PROJECT_EXPORT_SET}
|
||||||
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
||||||
|
|
|
@ -60,7 +60,7 @@ fi
|
||||||
echo ""
|
echo ""
|
||||||
echo "Usage: startBenchmark [message size=1000000] [number of iterations=0] [transport=zeromq/nanomsg/shmem] [resend same message=true] [affinity=false]"
|
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+=" --id bsampler1"
|
||||||
#SAMPLER+=" --io-threads 2"
|
#SAMPLER+=" --io-threads 2"
|
||||||
#SAMPLER+=" --control static"
|
#SAMPLER+=" --control static"
|
||||||
|
@ -76,7 +76,7 @@ echo ""
|
||||||
echo "started: xterm -geometry 90x50+0+0 -hold -e $affinitySamp @CMAKE_CURRENT_BINARY_DIR@/$SAMPLER"
|
echo "started: xterm -geometry 90x50+0+0 -hold -e $affinitySamp @CMAKE_CURRENT_BINARY_DIR@/$SAMPLER"
|
||||||
echo "pid: $!"
|
echo "pid: $!"
|
||||||
|
|
||||||
SINK="sink"
|
SINK="fairmq-sink"
|
||||||
SINK+=" --id sink1"
|
SINK+=" --id sink1"
|
||||||
#SINK+=" --io-threads 2"
|
#SINK+=" --io-threads 2"
|
||||||
#SINK+=" --control static"
|
#SINK+=" --control static"
|
||||||
|
|
|
@ -117,17 +117,17 @@ FairMQTransportFactorySHM::FairMQTransportFactorySHM(const string& id, const Fai
|
||||||
MonitorStatus* monitorStatus = fManager->ManagementSegment().find<MonitorStatus>(bipc::unique_instance).first;
|
MonitorStatus* monitorStatus = fManager->ManagementSegment().find<MonitorStatus>(bipc::unique_instance).first;
|
||||||
if (monitorStatus == nullptr)
|
if (monitorStatus == nullptr)
|
||||||
{
|
{
|
||||||
LOG(debug) << "no shmmonitor found, starting...";
|
LOG(debug) << "no fairmq-shmmonitor found, starting...";
|
||||||
StartMonitor();
|
StartMonitor();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(debug) << "found shmmonitor.";
|
LOG(debug) << "found fairmq-shmmonitor.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
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);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ void FairMQTransportFactorySHM::StartMonitor()
|
||||||
|
|
||||||
auto env = boost::this_process::environment();
|
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())
|
if (!p.empty())
|
||||||
{
|
{
|
||||||
|
@ -160,7 +160,7 @@ void FairMQTransportFactorySHM::StartMonitor()
|
||||||
MonitorStatus* monitorStatus = fManager->ManagementSegment().find<MonitorStatus>(bipc::unique_instance).first;
|
MonitorStatus* monitorStatus = fManager->ManagementSegment().find<MonitorStatus>(bipc::unique_instance).first;
|
||||||
if (monitorStatus)
|
if (monitorStatus)
|
||||||
{
|
{
|
||||||
LOG(debug) << "shmmonitor started";
|
LOG(debug) << "fairmq-shmmonitor started";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -168,7 +168,7 @@ void FairMQTransportFactorySHM::StartMonitor()
|
||||||
this_thread::sleep_for(std::chrono::milliseconds(10));
|
this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
if (++numTries > 1000)
|
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);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ void FairMQTransportFactorySHM::StartMonitor()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(WARN) << "could not find shmmonitor in the path";
|
LOG(WARN) << "could not find fairmq-shmmonitor in the path";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ Monitor::Monitor(const string& sessionName, bool selfDestruct, bool interactive,
|
||||||
MonitorStatus* monitorStatus = fManagementSegment.find<MonitorStatus>(bipc::unique_instance).first;
|
MonitorStatus* monitorStatus = fManagementSegment.find<MonitorStatus>(bipc::unique_instance).first;
|
||||||
if (monitorStatus != nullptr)
|
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);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
fManagementSegment.construct<MonitorStatus>(bipc::unique_instance)();
|
fManagementSegment.construct<MonitorStatus>(bipc::unique_instance)();
|
||||||
|
|
|
@ -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.
|
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:
|
FairMQ Shared Memory currently uses following names to register shared memory on the system:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user