CMake: Merged into option JFJOCH_WRITER_ONLY

This commit is contained in:
2023-11-15 10:51:23 +01:00
parent e8d576a563
commit 9b59482b8d
6 changed files with 34 additions and 40 deletions
+18 -26
View File
@@ -24,9 +24,7 @@ IF (CMAKE_CUDA_COMPILER)
FIND_LIBRARY(CUDART_LIBRARY cudart_static PATHS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES} REQUIRED)
ENDIF()
SET(JFJOCH_COMPILE_WRITER ON CACHE BOOL "Compile HDF5 writer")
SET(JFJOCH_COMPILE_INDEXER ON CACHE BOOL "Compile indexer")
SET(JFJOCH_COMPILE_TESTS OFF CACHE BOOL "Compile tests")
SET(JFJOCH_WRITER_ONLY OFF CACHE BOOL "Compile HDF5 writer only")
INCLUDE_DIRECTORIES(include)
INCLUDE(CheckIncludeFile)
@@ -39,37 +37,32 @@ LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
FIND_PACKAGE(ZeroMQ 4 REQUIRED)
ADD_SUBDIRECTORY(jungfrau)
ADD_SUBDIRECTORY(frame_serialize)
ADD_SUBDIRECTORY(grpc)
ADD_SUBDIRECTORY(compression)
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(broker)
ADD_SUBDIRECTORY(etc)
ADD_SUBDIRECTORY(fpga)
ADD_SUBDIRECTORY(acquisition_device)
ADD_SUBDIRECTORY(receiver)
ADD_SUBDIRECTORY(image_analysis)
ADD_SUBDIRECTORY(detector_control)
ADD_SUBDIRECTORY(writer)
ADD_SUBDIRECTORY(frame_serialize)
SET(jfjoch_executables jfjoch_broker)
IF (JFJOCH_COMPILE_TESTS OR JFJOCH_COMPILE_WRITER)
ADD_SUBDIRECTORY(writer)
LIST(APPEND jfjoch_executables jfjoch_writer jfjoch_writer_multi)
ENDIF()
IF (JFJOCH_COMPILE_TESTS)
IF (JFJOCH_WRITER_ONLY)
MESSAGE(STATUS "Compiling HDF5 writer only")
SET(jfjoch_executables jfjoch_writer)
ELSE()
ADD_SUBDIRECTORY(grpc)
ADD_SUBDIRECTORY(broker)
ADD_SUBDIRECTORY(etc)
ADD_SUBDIRECTORY(fpga)
ADD_SUBDIRECTORY(acquisition_device)
ADD_SUBDIRECTORY(receiver)
ADD_SUBDIRECTORY(image_analysis)
ADD_SUBDIRECTORY(detector_control)
ADD_SUBDIRECTORY(tests)
ADD_SUBDIRECTORY(tools)
LIST(APPEND jfjoch_executables CatchTest DataAnalysisPerfTest CompressionBenchmark HDF5DatasetWriteTest jfjoch_udp_simulator)
ENDIF()
SET(jfjoch_executables jfjoch_broker jfjoch_writer CatchTest DataAnalysisPerfTest CompressionBenchmark HDF5DatasetWriteTest jfjoch_udp_simulator sls_detector_put sls_detector_get)
LIST(APPEND jfjoch_executables)
ENDIF()
ADD_CUSTOM_COMMAND(OUTPUT frontend_ui/build/index.html
COMMAND npm run build
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/frontend_ui
DEPENDS jfjoch-grpc-js)
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/frontend_ui)
ADD_CUSTOM_TARGET(frontend DEPENDS frontend_ui/build/index.html)
ADD_CUSTOM_TARGET(jfjoch DEPENDS ${jfjoch_executables})
@@ -77,4 +70,3 @@ ADD_CUSTOM_TARGET(jfjoch DEPENDS ${jfjoch_executables})
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX /opt/jfjoch CACHE PATH "Default directory" FORCE)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+13 -3
View File
@@ -52,10 +52,8 @@ For license check LICENSE file in respective directory
### Software components
* `jfjoch_receiver` in `fpga/host` - the main component of Jungfraujoch, used to receive data with FPGA smart network cards, compress images and send them over ZeroMQ
* `jfjoch_broker` in `broker` - gRPC based broker, controlling all Jungfraujoch components
* `jfjoch_broker` in `broker` - main service running on the Jungfraujoch server, responsible for control of the detector and data acquisition
* `jfjoch_writer` in `writer` - HDF5 writer
* `jfjoch_detector` in `detector` - wrapper over detector control
Configuration for the modules is given in configuration files present in `etc` directory.
@@ -98,6 +96,18 @@ cmake ..
make jfjoch
```
### Compilation (writer only)
In most use cases it is better to have a separate machine, with access to distributed file system, for writing.
Such machine needs only a HDF5 writer service with less dependencies. For compilation use the following commands:
```
git submodule update --init --recursive
mkdir build
cd build
cmake -DJFJOCH_WRITER_ONLY=ON ..
make jfjoch
```
## Tests
To enable compiling test routines use parameter `-DJFJOCH_COMPILE_TESTS=ON` for `cmake`.
+1 -4
View File
@@ -3,9 +3,6 @@ ADD_LIBRARY(JFCalibration STATIC
JFConversionFloatingPoint.cpp JFConversionFloatingPoint.h
JFModulePedestal.cpp JFModulePedestal.h
JFModuleGainCalibration.cpp JFModuleGainCalibration.h
JFPedestalCalc.cpp JFPedestalCalc.h
)
JFPedestalCalc.cpp JFPedestalCalc.h)
SET_SOURCE_FILES_PROPERTIES(JFPedestalCalc.cpp JFConversionFloatingPoint.cpp PROPERTIES COMPILE_FLAGS -Ofast)
TARGET_LINK_LIBRARIES(JFCalibration JFJochProtoBuf Compression)
-1
View File
@@ -2,7 +2,6 @@
#include "JFCalibration.h"
#include "../compression/JFJochCompressor.h"
#include <cstring>
JFCalibration::JFCalibration(size_t in_nmodules, size_t in_nstorage_cells) :
-4
View File
@@ -2,10 +2,6 @@
#include "JFModulePedestal.h"
#include <bitshuffle/bitshuffle.h>
#include "../common/JFJochException.h"
JFModulePedestal::JFModulePedestal()
: JFModulePedestal(0) {}
+2 -2
View File
@@ -1,6 +1,6 @@
FIND_PACKAGE(HDF5 1.10 REQUIRED)
ADD_LIBRARY(HDF5Wrappers STATIC HDF5Objects.cpp HDF5Objects.h HDF5DataFile.h HDF5DataFile.cpp ../compression/bitshuffle/bshuf_h5filter.c)
ADD_LIBRARY(HDF5Wrappers STATIC HDF5Objects.cpp HDF5Objects.h HDF5DataFile.h HDF5DataFile.cpp ../compression/bitshuffle/bshuf_h5filter.c)
TARGET_LINK_LIBRARIES(HDF5Wrappers Compression ${HDF5_LIBRARIES})
TARGET_INCLUDE_DIRECTORIES(HDF5Wrappers PUBLIC ${HDF5_INCLUDE_DIRS})
@@ -13,7 +13,7 @@ ADD_LIBRARY(JFJochWriter STATIC
ZMQImagePuller.cpp ZMQImagePuller.h
StreamWriter.cpp StreamWriter.h)
TARGET_LINK_LIBRARIES(JFJochWriter HDF5Wrappers CommonFunctions JFJochProtoBuf)
TARGET_LINK_LIBRARIES(JFJochWriter HDF5Wrappers CommonFunctions)
TARGET_LINK_LIBRARIES(jfjoch_writer JFJochWriter)