mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 00:31:14 +00:00
Formatting
This commit is contained in:
parent
edbdc57332
commit
1f26883b75
|
@ -7,10 +7,10 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
add_library(Example11Lib STATIC
|
add_library(Example11Lib STATIC
|
||||||
"Sampler.cxx"
|
"Sampler.cxx"
|
||||||
"Sampler.h"
|
"Sampler.h"
|
||||||
"Sink.cxx"
|
"Sink.cxx"
|
||||||
"Sink.h"
|
"Sink.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(Example11Lib PUBLIC FairMQ)
|
target_link_libraries(Example11Lib PUBLIC FairMQ)
|
||||||
|
@ -40,12 +40,12 @@ set_tests_properties(Example.1-1.shmem PROPERTIES TIMEOUT "30" RUN_SERIAL true P
|
||||||
# install
|
# install
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
fairmq-ex-1-1-sampler
|
fairmq-ex-1-1-sampler
|
||||||
fairmq-ex-1-1-sink
|
fairmq-ex-1-1-sink
|
||||||
|
|
||||||
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# configure run script with different executable paths for build and for install directories
|
# configure run script with different executable paths for build and for install directories
|
||||||
|
@ -54,7 +54,7 @@ set(FAIRMQ_BIN_DIR ${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_BINDIR}/fairmq)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-1-1.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-1-1.sh_install)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-1-1.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-1-1.sh_install)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-1-1.sh_install
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-1-1.sh_install
|
||||||
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
RENAME fairmq-start-ex-1-1.sh
|
RENAME fairmq-start-ex-1-1.sh
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
add_library(Example1N1Lib STATIC
|
add_library(Example1N1Lib STATIC
|
||||||
"Sampler.cxx"
|
"Sampler.cxx"
|
||||||
"Sampler.h"
|
"Sampler.h"
|
||||||
"Processor.cxx"
|
"Processor.cxx"
|
||||||
"Processor.h"
|
"Processor.h"
|
||||||
"Sink.cxx"
|
"Sink.cxx"
|
||||||
"Sink.h"
|
"Sink.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(Example1N1Lib PUBLIC FairMQ)
|
target_link_libraries(Example1N1Lib PUBLIC FairMQ)
|
||||||
|
@ -48,13 +48,13 @@ set_tests_properties(Example.1-n-1.shmem PROPERTIES TIMEOUT "30" RUN_SERIAL true
|
||||||
# install
|
# install
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
fairmq-ex-1-n-1-sampler
|
fairmq-ex-1-n-1-sampler
|
||||||
fairmq-ex-1-n-1-processor
|
fairmq-ex-1-n-1-processor
|
||||||
fairmq-ex-1-n-1-sink
|
fairmq-ex-1-n-1-sink
|
||||||
|
|
||||||
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# configure run script with different executable paths for build and for install directories
|
# configure run script with different executable paths for build and for install directories
|
||||||
|
@ -64,12 +64,12 @@ set(FAIRMQ_BIN_DIR ${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_BINDIR}/fairmq)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-1-n-1.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-1-n-1.sh_install)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-1-n-1.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-1-n-1.sh_install)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-1-n-1.sh_install
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-1-n-1.sh_install
|
||||||
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
RENAME fairmq-start-ex-1-n-1.sh
|
RENAME fairmq-start-ex-1-n-1.sh
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/ex-1-n-1.json
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/ex-1-n-1.json
|
||||||
DESTINATION ${PROJECT_INSTALL_DATADIR}
|
DESTINATION ${PROJECT_INSTALL_DATADIR}
|
||||||
)
|
)
|
||||||
|
|
|
@ -34,7 +34,7 @@ set(FAIRMQ_BIN_DIR ${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_BINDIR}/fairmq)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-builtin-devices.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-builtin-devices.sh_install)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-builtin-devices.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-builtin-devices.sh_install)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-builtin-devices.sh_install
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-builtin-devices.sh_install
|
||||||
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
RENAME fairmq-start-ex-builtin-devices.sh
|
RENAME fairmq-start-ex-builtin-devices.sh
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
add_library(ExampleCopyPushLib STATIC
|
add_library(ExampleCopyPushLib STATIC
|
||||||
"Sampler.cxx"
|
"Sampler.cxx"
|
||||||
"Sampler.h"
|
"Sampler.h"
|
||||||
"Sink.cxx"
|
"Sink.cxx"
|
||||||
"Sink.h"
|
"Sink.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(ExampleCopyPushLib PUBLIC FairMQ)
|
target_link_libraries(ExampleCopyPushLib PUBLIC FairMQ)
|
||||||
|
@ -41,12 +41,12 @@ set_tests_properties(Example.CopyPush.shmem PROPERTIES TIMEOUT "30" RUN_SERIAL t
|
||||||
# install
|
# install
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
fairmq-ex-copypush-sampler
|
fairmq-ex-copypush-sampler
|
||||||
fairmq-ex-copypush-sink
|
fairmq-ex-copypush-sink
|
||||||
|
|
||||||
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# configure run script with different executable paths for build and for install directories
|
# configure run script with different executable paths for build and for install directories
|
||||||
|
@ -55,7 +55,7 @@ set(FAIRMQ_BIN_DIR ${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_BINDIR}/fairmq)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-copypush.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-copypush.sh_install)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-copypush.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-copypush.sh_install)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-copypush.sh_install
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-copypush.sh_install
|
||||||
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
RENAME fairmq-start-ex-copypush.sh
|
RENAME fairmq-start-ex-copypush.sh
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
add_library(ExampleMultipartLib STATIC
|
add_library(ExampleMultipartLib STATIC
|
||||||
"Sampler.cxx"
|
"Sampler.cxx"
|
||||||
"Sampler.h"
|
"Sampler.h"
|
||||||
"Sink.cxx"
|
"Sink.cxx"
|
||||||
"Sink.h"
|
"Sink.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(ExampleMultipartLib PUBLIC FairMQ)
|
target_link_libraries(ExampleMultipartLib PUBLIC FairMQ)
|
||||||
|
@ -45,12 +45,12 @@ endif()
|
||||||
# install
|
# install
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
fairmq-ex-multipart-sampler
|
fairmq-ex-multipart-sampler
|
||||||
fairmq-ex-multipart-sink
|
fairmq-ex-multipart-sink
|
||||||
|
|
||||||
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# configure run script with different executable paths for build and for install directories
|
# configure run script with different executable paths for build and for install directories
|
||||||
|
@ -59,7 +59,7 @@ set(FAIRMQ_BIN_DIR ${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_BINDIR}/fairmq)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-multipart.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multipart.sh_install)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-multipart.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multipart.sh_install)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multipart.sh_install
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multipart.sh_install
|
||||||
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
RENAME fairmq-start-ex-multipart.sh
|
RENAME fairmq-start-ex-multipart.sh
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
add_library(ExampleMultipleChannelsLib STATIC
|
add_library(ExampleMultipleChannelsLib STATIC
|
||||||
"Sampler.cxx"
|
"Sampler.cxx"
|
||||||
"Sampler.h"
|
"Sampler.h"
|
||||||
"Broadcaster.cxx"
|
"Broadcaster.cxx"
|
||||||
"Broadcaster.h"
|
"Broadcaster.h"
|
||||||
"Sink.cxx"
|
"Sink.cxx"
|
||||||
"Sink.h"
|
"Sink.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(ExampleMultipleChannelsLib PUBLIC FairMQ)
|
target_link_libraries(ExampleMultipleChannelsLib PUBLIC FairMQ)
|
||||||
|
@ -42,13 +42,13 @@ set_tests_properties(Example.MultipleChannels.zeromq PROPERTIES TIMEOUT "30" RUN
|
||||||
# install
|
# install
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
fairmq-ex-multiple-channels-sampler
|
fairmq-ex-multiple-channels-sampler
|
||||||
fairmq-ex-multiple-channels-broadcaster
|
fairmq-ex-multiple-channels-broadcaster
|
||||||
fairmq-ex-multiple-channels-sink
|
fairmq-ex-multiple-channels-sink
|
||||||
|
|
||||||
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# configure run script with different executable paths for build and for install directories
|
# configure run script with different executable paths for build and for install directories
|
||||||
|
@ -57,7 +57,7 @@ set(FAIRMQ_BIN_DIR ${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_BINDIR}/fairmq)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-multiple-channels.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multiple-channels.sh_install)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-multiple-channels.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multiple-channels.sh_install)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multiple-channels.sh_install
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multiple-channels.sh_install
|
||||||
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
RENAME fairmq-start-ex-multiple-channels.sh
|
RENAME fairmq-start-ex-multiple-channels.sh
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
add_library(ExampleMultipleTransportsLib STATIC
|
add_library(ExampleMultipleTransportsLib STATIC
|
||||||
"Sampler1.cxx"
|
"Sampler1.cxx"
|
||||||
"Sampler1.h"
|
"Sampler1.h"
|
||||||
"Sampler2.cxx"
|
"Sampler2.cxx"
|
||||||
"Sampler2.h"
|
"Sampler2.h"
|
||||||
"Sink.cxx"
|
"Sink.cxx"
|
||||||
"Sink.h"
|
"Sink.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(ExampleMultipleTransportsLib PUBLIC FairMQ)
|
target_link_libraries(ExampleMultipleTransportsLib PUBLIC FairMQ)
|
||||||
|
@ -41,13 +41,13 @@ set_tests_properties(Example.MultipleTransports PROPERTIES TIMEOUT "30" RUN_SERI
|
||||||
# install
|
# install
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
fairmq-ex-multiple-transports-sampler1
|
fairmq-ex-multiple-transports-sampler1
|
||||||
fairmq-ex-multiple-transports-sampler2
|
fairmq-ex-multiple-transports-sampler2
|
||||||
fairmq-ex-multiple-transports-sink
|
fairmq-ex-multiple-transports-sink
|
||||||
|
|
||||||
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# configure run script with different executable paths for install directories
|
# configure run script with different executable paths for install directories
|
||||||
|
@ -56,7 +56,7 @@ set(FAIRMQ_BIN_DIR ${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_BINDIR}/fairmq)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-multiple-transports.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multiple-transports.sh_install)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-multiple-transports.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multiple-transports.sh_install)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multiple-transports.sh_install
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-multiple-transports.sh_install
|
||||||
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
RENAME fairmq-start-ex-multiple-transports.sh
|
RENAME fairmq-start-ex-multiple-transports.sh
|
||||||
)
|
)
|
||||||
|
|
|
@ -29,15 +29,15 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-readout-processing.sh
|
||||||
# install
|
# install
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
fairmq-ex-readout-readout
|
fairmq-ex-readout-readout
|
||||||
fairmq-ex-readout-builder
|
fairmq-ex-readout-builder
|
||||||
fairmq-ex-readout-processor
|
fairmq-ex-readout-processor
|
||||||
fairmq-ex-readout-sender
|
fairmq-ex-readout-sender
|
||||||
fairmq-ex-readout-receiver
|
fairmq-ex-readout-receiver
|
||||||
|
|
||||||
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# configure run script with different executable paths for build and for install directories
|
# configure run script with different executable paths for build and for install directories
|
||||||
|
@ -47,13 +47,13 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-readout.sh.in ${CMAKE
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-readout-processing.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-readout-processing.sh_install)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-readout-processing.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-readout-processing.sh_install)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-readout.sh_install
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-readout.sh_install
|
||||||
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
RENAME fairmq-start-ex-readout.sh
|
RENAME fairmq-start-ex-readout.sh
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-readout-processing.sh_install
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-readout-processing.sh_install
|
||||||
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
RENAME fairmq-start-ex-readout-processing.sh
|
RENAME fairmq-start-ex-readout-processing.sh
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
add_library(ExampleRegionLib STATIC
|
add_library(ExampleRegionLib STATIC
|
||||||
"Sampler.cxx"
|
"Sampler.cxx"
|
||||||
"Sampler.h"
|
"Sampler.h"
|
||||||
"Sink.cxx"
|
"Sink.cxx"
|
||||||
"Sink.h"
|
"Sink.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(ExampleRegionLib PUBLIC FairMQ)
|
target_link_libraries(ExampleRegionLib PUBLIC FairMQ)
|
||||||
|
@ -40,12 +40,12 @@ set_tests_properties(Example.Region.shmem PROPERTIES TIMEOUT "30" RUN_SERIAL tru
|
||||||
# install
|
# install
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
fairmq-ex-region-sampler
|
fairmq-ex-region-sampler
|
||||||
fairmq-ex-region-sink
|
fairmq-ex-region-sink
|
||||||
|
|
||||||
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# configure run script with different executable paths for build and for install directories
|
# configure run script with different executable paths for build and for install directories
|
||||||
|
@ -54,7 +54,7 @@ set(FAIRMQ_BIN_DIR ${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_BINDIR}/fairmq)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-region.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-region.sh_install)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-region.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-region.sh_install)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-region.sh_install
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-region.sh_install
|
||||||
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
RENAME fairmq-start-ex-region.sh
|
RENAME fairmq-start-ex-region.sh
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
add_library(ExampleReqRepLib STATIC
|
add_library(ExampleReqRepLib STATIC
|
||||||
"Client.cxx"
|
"Client.cxx"
|
||||||
"Client.h"
|
"Client.h"
|
||||||
"Server.cxx"
|
"Server.cxx"
|
||||||
"Server.h"
|
"Server.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(ExampleReqRepLib PUBLIC FairMQ)
|
target_link_libraries(ExampleReqRepLib PUBLIC FairMQ)
|
||||||
|
@ -41,12 +41,12 @@ set_tests_properties(Example.ReqRep.shmem PROPERTIES TIMEOUT "30" RUN_SERIAL tru
|
||||||
# install
|
# install
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
fairmq-ex-req-rep-client
|
fairmq-ex-req-rep-client
|
||||||
fairmq-ex-req-rep-server
|
fairmq-ex-req-rep-server
|
||||||
|
|
||||||
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${PROJECT_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# configure run script with different executable paths for build and for install directories
|
# configure run script with different executable paths for build and for install directories
|
||||||
|
@ -55,7 +55,7 @@ set(FAIRMQ_BIN_DIR ${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_BINDIR}/fairmq)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-req-rep.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-req-rep.sh_install)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fairmq-start-ex-req-rep.sh.in ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-req-rep.sh_install)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-req-rep.sh_install
|
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fairmq-start-ex-req-rep.sh_install
|
||||||
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
DESTINATION ${PROJECT_INSTALL_BINDIR}
|
||||||
RENAME fairmq-start-ex-req-rep.sh
|
RENAME fairmq-start-ex-req-rep.sh
|
||||||
)
|
)
|
||||||
|
|
|
@ -486,7 +486,6 @@ void FairMQDevice::RunWrapper()
|
||||||
}
|
}
|
||||||
|
|
||||||
PostRun();
|
PostRun();
|
||||||
|
|
||||||
} catch (const out_of_range& oor) {
|
} catch (const out_of_range& oor) {
|
||||||
LOG(error) << "out of range: " << oor.what();
|
LOG(error) << "out of range: " << oor.what();
|
||||||
LOG(error) << "incorrect/incomplete channel configuration?";
|
LOG(error) << "incorrect/incomplete channel configuration?";
|
||||||
|
@ -504,17 +503,12 @@ void FairMQDevice::HandleSingleChannelInput()
|
||||||
{
|
{
|
||||||
bool proceed = true;
|
bool proceed = true;
|
||||||
|
|
||||||
if (fMsgInputs.size() > 0)
|
if (fMsgInputs.size() > 0) {
|
||||||
{
|
while (!NewStatePending() && proceed) {
|
||||||
while (!NewStatePending() && proceed)
|
|
||||||
{
|
|
||||||
proceed = HandleMsgInput(fInputChannelKeys.at(0), fMsgInputs.begin()->second, 0);
|
proceed = HandleMsgInput(fInputChannelKeys.at(0), fMsgInputs.begin()->second, 0);
|
||||||
}
|
}
|
||||||
}
|
} else if (fMultipartInputs.size() > 0) {
|
||||||
else if (fMultipartInputs.size() > 0)
|
while (!NewStatePending() && proceed) {
|
||||||
{
|
|
||||||
while (!NewStatePending() && proceed)
|
|
||||||
{
|
|
||||||
proceed = HandleMultipartInput(fInputChannelKeys.at(0), fMultipartInputs.begin()->second, 0);
|
proceed = HandleMultipartInput(fInputChannelKeys.at(0), fMultipartInputs.begin()->second, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -524,75 +518,55 @@ void FairMQDevice::HandleMultipleChannelInput()
|
||||||
{
|
{
|
||||||
// check if more than one transport is used
|
// check if more than one transport is used
|
||||||
fMultitransportInputs.clear();
|
fMultitransportInputs.clear();
|
||||||
for (const auto& k : fInputChannelKeys)
|
for (const auto& k : fInputChannelKeys) {
|
||||||
{
|
|
||||||
fair::mq::Transport t = fChannels.at(k).at(0).fTransportType;
|
fair::mq::Transport t = fChannels.at(k).at(0).fTransportType;
|
||||||
if (fMultitransportInputs.find(t) == fMultitransportInputs.end())
|
if (fMultitransportInputs.find(t) == fMultitransportInputs.end()) {
|
||||||
{
|
|
||||||
fMultitransportInputs.insert(pair<fair::mq::Transport, vector<string>>(t, vector<string>()));
|
fMultitransportInputs.insert(pair<fair::mq::Transport, vector<string>>(t, vector<string>()));
|
||||||
fMultitransportInputs.at(t).push_back(k);
|
fMultitransportInputs.at(t).push_back(k);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
fMultitransportInputs.at(t).push_back(k);
|
fMultitransportInputs.at(t).push_back(k);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& mi : fMsgInputs)
|
for (const auto& mi : fMsgInputs) {
|
||||||
{
|
for (auto& i : fChannels.at(mi.first)) {
|
||||||
for (auto& i : fChannels.at(mi.first))
|
|
||||||
{
|
|
||||||
i.fMultipart = false;
|
i.fMultipart = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& mi : fMultipartInputs)
|
for (const auto& mi : fMultipartInputs) {
|
||||||
{
|
for (auto& i : fChannels.at(mi.first)) {
|
||||||
for (auto& i : fChannels.at(mi.first))
|
|
||||||
{
|
|
||||||
i.fMultipart = true;
|
i.fMultipart = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if more than one transport is used, handle poll of each in a separate thread
|
// if more than one transport is used, handle poll of each in a separate thread
|
||||||
if (fMultitransportInputs.size() > 1)
|
if (fMultitransportInputs.size() > 1) {
|
||||||
{
|
|
||||||
HandleMultipleTransportInput();
|
HandleMultipleTransportInput();
|
||||||
}
|
} else { // otherwise poll directly
|
||||||
else // otherwise poll directly
|
|
||||||
{
|
|
||||||
bool proceed = true;
|
bool proceed = true;
|
||||||
|
|
||||||
FairMQPollerPtr poller(fChannels.at(fInputChannelKeys.at(0)).at(0).fTransportFactory->CreatePoller(fChannels, fInputChannelKeys));
|
FairMQPollerPtr poller(fChannels.at(fInputChannelKeys.at(0)).at(0).fTransportFactory->CreatePoller(fChannels, fInputChannelKeys));
|
||||||
|
|
||||||
while (!NewStatePending() && proceed)
|
while (!NewStatePending() && proceed) {
|
||||||
{
|
|
||||||
poller->Poll(200);
|
poller->Poll(200);
|
||||||
|
|
||||||
// check which inputs are ready and call their data handlers if they are.
|
// check which inputs are ready and call their data handlers if they are.
|
||||||
for (const auto& ch : fInputChannelKeys)
|
for (const auto& ch : fInputChannelKeys) {
|
||||||
{
|
for (unsigned int i = 0; i < fChannels.at(ch).size(); ++i) {
|
||||||
for (unsigned int i = 0; i < fChannels.at(ch).size(); ++i)
|
if (poller->CheckInput(ch, i)) {
|
||||||
{
|
if (fChannels.at(ch).at(i).fMultipart) {
|
||||||
if (poller->CheckInput(ch, i))
|
|
||||||
{
|
|
||||||
if (fChannels.at(ch).at(i).fMultipart)
|
|
||||||
{
|
|
||||||
proceed = HandleMultipartInput(ch, fMultipartInputs.at(ch), i);
|
proceed = HandleMultipartInput(ch, fMultipartInputs.at(ch), i);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
proceed = HandleMsgInput(ch, fMsgInputs.at(ch), i);
|
proceed = HandleMsgInput(ch, fMsgInputs.at(ch), i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!proceed)
|
if (!proceed) {
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!proceed)
|
if (!proceed) {
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -606,64 +580,49 @@ void FairMQDevice::HandleMultipleTransportInput()
|
||||||
|
|
||||||
fMultitransportProceed = true;
|
fMultitransportProceed = true;
|
||||||
|
|
||||||
for (const auto& i : fMultitransportInputs)
|
for (const auto& i : fMultitransportInputs) {
|
||||||
{
|
|
||||||
threads.emplace_back(thread(&FairMQDevice::PollForTransport, this, fTransports.at(i.first).get(), i.second));
|
threads.emplace_back(thread(&FairMQDevice::PollForTransport, this, fTransports.at(i.first).get(), i.second));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (thread& t : threads)
|
for (thread& t : threads) {
|
||||||
{
|
|
||||||
t.join();
|
t.join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FairMQDevice::PollForTransport(const FairMQTransportFactory* factory, const vector<string>& channelKeys)
|
void FairMQDevice::PollForTransport(const FairMQTransportFactory* factory, const vector<string>& channelKeys)
|
||||||
{
|
{
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
FairMQPollerPtr poller(factory->CreatePoller(fChannels, channelKeys));
|
FairMQPollerPtr poller(factory->CreatePoller(fChannels, channelKeys));
|
||||||
|
|
||||||
while (!NewStatePending() && fMultitransportProceed)
|
while (!NewStatePending() && fMultitransportProceed) {
|
||||||
{
|
|
||||||
poller->Poll(500);
|
poller->Poll(500);
|
||||||
|
|
||||||
for (const auto& ch : channelKeys)
|
for (const auto& ch : channelKeys) {
|
||||||
{
|
for (unsigned int i = 0; i < fChannels.at(ch).size(); ++i) {
|
||||||
for (unsigned int i = 0; i < fChannels.at(ch).size(); ++i)
|
if (poller->CheckInput(ch, i)) {
|
||||||
{
|
|
||||||
if (poller->CheckInput(ch, i))
|
|
||||||
{
|
|
||||||
lock_guard<mutex> lock(fMultitransportMutex);
|
lock_guard<mutex> lock(fMultitransportMutex);
|
||||||
|
|
||||||
if (!fMultitransportProceed)
|
if (!fMultitransportProceed) {
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fChannels.at(ch).at(i).fMultipart)
|
if (fChannels.at(ch).at(i).fMultipart) {
|
||||||
{
|
|
||||||
fMultitransportProceed = HandleMultipartInput(ch, fMultipartInputs.at(ch), i);
|
fMultitransportProceed = HandleMultipartInput(ch, fMultipartInputs.at(ch), i);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
fMultitransportProceed = HandleMsgInput(ch, fMsgInputs.at(ch), i);
|
fMultitransportProceed = HandleMsgInput(ch, fMsgInputs.at(ch), i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fMultitransportProceed)
|
if (!fMultitransportProceed) {
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!fMultitransportProceed)
|
if (!fMultitransportProceed) {
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} catch (exception& e) {
|
||||||
catch (exception& e)
|
|
||||||
{
|
|
||||||
LOG(error) << "FairMQDevice::PollForTransport() failed: " << e.what() << ", going to ERROR state.";
|
LOG(error) << "FairMQDevice::PollForTransport() failed: " << e.what() << ", going to ERROR state.";
|
||||||
throw runtime_error(tools::ToString("FairMQDevice::PollForTransport() failed: ", e.what(), ", going to ERROR state."));
|
throw runtime_error(tools::ToString("FairMQDevice::PollForTransport() failed: ", e.what(), ", going to ERROR state."));
|
||||||
}
|
}
|
||||||
|
@ -673,12 +632,9 @@ bool FairMQDevice::HandleMsgInput(const string& chName, const InputMsgCallback&
|
||||||
{
|
{
|
||||||
unique_ptr<FairMQMessage> input(fChannels.at(chName).at(i).fTransportFactory->CreateMessage());
|
unique_ptr<FairMQMessage> input(fChannels.at(chName).at(i).fTransportFactory->CreateMessage());
|
||||||
|
|
||||||
if (Receive(input, chName, i) >= 0)
|
if (Receive(input, chName, i) >= 0) {
|
||||||
{
|
|
||||||
return callback(input, i);
|
return callback(input, i);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -687,12 +643,9 @@ bool FairMQDevice::HandleMultipartInput(const string& chName, const InputMultipa
|
||||||
{
|
{
|
||||||
FairMQParts input;
|
FairMQParts input;
|
||||||
|
|
||||||
if (Receive(input, chName, i) >= 0)
|
if (Receive(input, chName, i) >= 0) {
|
||||||
{
|
|
||||||
return callback(input, 0);
|
return callback(input, 0);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,7 @@ struct Region
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(debug) << "AcksSender for " << fName << " leaving " << "(blocks left to free: " << fBlocksToFree.size() << ", "
|
LOG(trace) << "AcksSender for " << fName << " leaving " << "(blocks left to free: " << fBlocksToFree.size() << ", "
|
||||||
<< " blocks left to send: " << blocksToSend << ").";
|
<< " blocks left to send: " << blocksToSend << ").";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ struct Region
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(debug) << "AcksReceiver for " << fName << " leaving (remaining queue size: " << fQueue->get_num_msg() << ").";
|
LOG(trace) << "AcksReceiver for " << fName << " leaving (remaining queue size: " << fQueue->get_num_msg() << ").";
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReleaseBlock(const RegionBlock& block)
|
void ReleaseBlock(const RegionBlock& block)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user