* not done. The 'setsockopt(SO_RECVBUF)' system call cannot set the socket buffer size lager than the specified in net.core.rmem_max. The requested value was 2 GB (commit 3b0e2e6), which is far too large for this application, so it was restored to the acceptable 100 MB value. * The syscall does not fail if the requested buffer size is larger than net.core.rmem_max. Use 'setsockopt(SO_RECVBUFFORCE)' to actually force a value larger than the system limit, which can be done if run in a privileged context (capability CAP_NET_ADMIN set). * The real value is read with 'getsockopt(SO_RECVBUF)'. If it corresponds to twice the requested value (see 'man 7 socket'), it is printed in green, otherwise it is signalled in red. * The 'setsockopt(SO_RECVBUFFORCE)' syscall removes the need to write to /proc/sys/net/core/rmem_max, so this was was suppressed in the 'UDPStandardImplementation' constructor. * The test on EIGER detectors before setting the system buffers was removed. Was there for 9m/2m eiger, but one can take care of memory requirements using a customizable max socket buffer size(only with permissions). to be implmented later. * The file /proc/sys/net/core/netdev_max_backlog is first read by the receiver to check is the current value is OK. If it is not, the receiver directly writes the good value into the file (instead of delegating to the system shell), printing a red error message if there is an access error (non-privileged user).
Documentation
Detailed documentation can be found on the official site.
Binaries
Documentation to obtain the binaries via the conda package is available here.
Source code
One can also obtain the source code from this repository and compile while realizing the setup dependencies as required.
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
Setup dependencies
- Gui Client
Requirements: Qt 4.8 and Qwt 6.0
export QTDIR=/usr/local/Trolltech/
export QWTDIR=/usr/local/qwt-6.0.1/
If either of them does not exist, the GUI client will not be built.
- Calibration wizards
Requirements: ROOT
export ROOTSYS=/usr/local/root-5.34
Compilation
Compiling can be done in two ways.
1. Compile using script cmk.sh
After compiling, the libraries and executables will be found in slsDetectorPackage/build/bin
directory
Usage: [-c] [-b] [-h] [-d HDF5 directory] [-j]
- -[no option]: only make
- -c: Clean
- -b: Builds/Rebuilds CMake files normal mode
- -h: Builds/Rebuilds Cmake files with HDF5 package
- -d: HDF5 Custom Directory
- -t: Build/Rebuilds only text client
- -r: Build/Rebuilds only receiver
- -g: Build/Rebuilds only gui
- -j: Number of threads to compile through
Basic Option: ./cmk.sh -b
For only make: ./cmk.sh
For make clean;make: ./cmk.sh -c
For using hdf5 without custom dir /blabla: ./cmk.sh -h -d /blabla
For rebuilding cmake without hdf5 ./cmk.sh -b
For using multiple cores to compile faster:
./cmk.sh -j9
For rebuilding only certain sections
./cmk.sh -tg #only text client and gui
./cmk.sh -r #only receiver
2. Compile without script
Use cmake to create out-of-source builds, by creating a build folder parallel to source directory.
$ cd ..
$ mkdir slsDetectorPackage-build
$ cd slsDetectorPackage-build
$ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DUSE_HDF5=OFF
$ make
Use the following as an example to compile statically and using specific hdf5 folder
$ HDF5_ROOT=/opt/hdf5v1.10.0 cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DUSE_HDF5=ON
After compiling, the libraries and executables will be found at bin
directory
$ ls bin/
gui_client libSlsDetector.a libSlsDetector.so libSlsReceiver.a libSlsReceiver.so
sls_detector_acquire sls_detector_get slsDetectorGui sls_detector_help sls_detector_put slsReceiver