Skip to content

Commit

Permalink
8.0.2.rc (#974)
Browse files Browse the repository at this point in the history
* moench: changed max shifts of adc clk from 240 to 200 (#909)

* moench server name and version renaming

* 802/moench default speed (#910)

* moench:change default speed to half speed

* Protect from getenv("HOME") returning nullptr  (#907)

* Protect from getenv("HOME") returning nullptr (e.g., in case running in systemd)

* Write proper warning in Module.cpp

* moench: min exptime and also a firmware update required (#911)

* moench server: changed default values of adcphase for full speed from 300 to 150 and dac vipre_cds from 800 to 1280 (#921)

* client bug fix: m3 multi module bad channel file throws bad allocation when modules skipped, needed to add vectors in 2d vector of bad channel list (#919)

* 8.0.2.rc: client: blocking acquire stop with slave temporarily in waiting (#925)

* client: stopping a blocking acquire of multi modules checks status to catch slaves that might still be in waiting. Problem is (gotthard2 25um at least) slave is in waiting only temporarily before going go idle/stopped. So a 50ms sleep is necessary ot not throw an unnecessary error

* client: when stopping blocking acquire, wait up to 1s in 50ms increments for slave to stop waiting temporarily

* fix to rapidjson for build with gcc 14 (#928)

* 8.0.2.rc: m3 clkdiv0 20 (#923)

* m3: clk 0 changed from 10 to 20 (100MHz to 50MHz)

* g2: startup clk div back to 10 as in firmware but setting in software startup to 20

* 8.0.2.rc: moench empty data callback (#935)

* moench: empty data call back so that zmq sockets are still made and listened to in acquire that it waits for the dummy packet to be done

* moench zmq postprocessor: remove NEWZMQ ifdefs and remove connect for publisher socket

* changed enum from READOUT_ACTION_ZMQ to READOUT_ZMQ_ACTION for consistency

* 8.0.2.rc: client: status for blocking acquire stop with slave temporarily in waiting (#943)

* acq finish call back gets status squashed with default error but before that need to wait for gotthard slaves to catch up from waiting to stopped

* bug fixes related to file saving (#931)

* fix the file path resetting issue of GUI in the case where different modules have different fpath setting.

* fix stack-buffer-overflow issue when using HDF5 HDF5DataFile::parameterDataTypes have 64bit type (i.e. STD_U64LE), the size of fill_value should be at least 8 bytes.

* change the type of fill_value to uint64_t

* updated documentation from martin (#947)

* 802: jungfrau HW 1.0: adc output clock phase to 120  (#951)

* jungfrau: change adc output clock phase from 180 to 120 for v1.0 boards for reliable readout of adc #2

* formatting

* 802/release notes (#954)

* updated release notes

* versioning

* fixed a warning about narrowing conversion from size_t to int (#962)

* updating client versioning

* dont build doc for Tobi Schluter from libzmq, which uses iso-8859-1 and the umlaut cause compilation to fail on some machines (#972)

* updated release notes

---------

Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
Co-authored-by: Z.H. Li <zhenghenge@gmail.com>
  • Loading branch information
4 people committed Sep 17, 2024
1 parent 97f0c1f commit 4880f87
Show file tree
Hide file tree
Showing 37 changed files with 222 additions and 112 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2021 Contributors to the SLS Detector Package
cmake_minimum_required(VERSION 3.14)
project(slsDetectorPackage)
set(PROJECT_VERSION 8.0.1)
set(PROJECT_VERSION 8.0.2)

set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")

Expand Down
114 changes: 97 additions & 17 deletions RELEASE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SLS Detector Package Major Release 8.0.1 released on 16.01.2024
===============================================================
SLS Detector Package Bug Fix Release 8.0.2 released on 18.09.2024
=================================================================

This document describes the differences between v8.0.1 and v8.0.0
This document describes the differences between v8.0.2 and v8.0.1



Expand All @@ -24,19 +24,100 @@ This document describes the differences between v8.0.1 and v8.0.0
-----------


* Fixed compilation error when building without zmq-devel installed
and removed dependency on zeromq in conda build.
* Rapidjson compilation with gcc 14
Fixed a compile issue with gcc 14. Same fix in later commits to rapidjson.


* Fixed libzmq compilation error to build the package as a submodule.
Client
------


Calibration
-----------
* getenv("HOME") returning nullptr
When this happens, especially for systemd, it segfaults. Protection
provided by using empty string in this case.


* [Mythen3] Bad channel list for multi module
Exception thrown when loading multi module bad channel file skipping
modules in between. Fixed.


* [Gotthard2] Stopping a blocking acquisition
A check added in v8.0.0 to catch slaves that might be in waiting forever
also catches Gotthard2 25um slaves that might only be in waiting
temporarily. This is fixed with a 50ms sleep before checking again
(upto 1s).


* [Moench] Acquire finished processing call back
New executable 'sls_detector_acquire_zmq' added to listen to all zmq
packets from post processor or external process to signal end of post
processing. Post processor refactoring of zmq socket creation added.


Gui / Callback
--------------


* [Gotthard2] Stopping a blocking acquisition
From the previous issue, call back for acquisition finished status gives
error for inconsistent states. Again, a check every 50ms upto 1s is
added to let go the temporarily waiting slave.


* Different file paths
Fixes file path resetting when different modules have different fpath set.


Receiver
--------


* HDF5 fill value
Fix the fill value to accomodate all datatypes.


Firmware
--------


* [Moench] Overflow with exptime of 0
Fixed overflow when subtracting 1 clock cycle from exptime.


On-board Detector Server
------------------------


* [Moench] Few changes in Server:
- Max shifts of adc clock changed from 240 to 200.

- Fixed overflow when subtracting 2 clock cycles from exptime of 0ms.

- Default readout speed to half speed from quarter.

- Change default ADC phase to 150 for full readout speed.

- Change default vipre_cds dac from 800 to 1280.


* [Mythen3] Change Clk divider from 10 (100MHz) to 20 (50MHz) at startup.


* [Jungfrau] Fix for HW v1.0 boards for unreliable ADC 2
Issues sometimes seen on some HW v 1.0 boards are fixed with phase
relationship of 120 degrees. HW v2.0 boards are not affected.


Documentation
-------------


* Updated troubleshooting documentaion to check links and disable firewall

* [Moench] Fixed Moench calibration

* Excluded non UTF-8 encoded libzmq documents due to machine dependent
compilation issues.



Expand All @@ -45,11 +126,11 @@ This document describes the differences between v8.0.1 and v8.0.0


Eiger 8.0.0
Jungfrau 8.0.0
Mythen3 8.0.0
Jungfrau 8.0.2
Mythen3 8.0.2
Gotthard2 8.0.0
Gotthard 8.0.0
Moench 8.0.0
Moench 8.0.2
Ctb 8.0.0


Expand All @@ -58,8 +139,6 @@ This document describes the differences between v8.0.1 and v8.0.0

From v6.1.0 (without tftp):
Using command 'updatedetectorserver'
From 5.0.0 (with tftp):
Using command 'copydetectorserver'

Instructions available at
https://slsdetectorgroup.github.io/devdoc/serverupgrade.html
Expand All @@ -83,7 +162,8 @@ This document describes the differences between v8.0.1 and v8.0.0
Gotthard 08.02.2018 (50um and 25um Master)
09.02.2018 (25 um Slave)

Moench 10.07.2023 (v0.3.2) (updated in 8.0.0, under development)
Moench 26.10.2023 (v0.3.2) (updated in 8.0.2,
under development)

Ctb 28.08.2023 (v1.2) (updated in 8.0.0)

Expand All @@ -104,10 +184,10 @@ This document describes the differences between v8.0.1 and v8.0.0

Except Eiger,
upgrade
Using command 'programfpga' or
using command 'programfpga' or

udpate both server and firmware simultaneously
Using command 'update'
using command 'update'


Instructions available at
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*

EXCLUDE_PATTERNS = */docs/* */tests/* */python/* */manual */slsDetectorServers/* */libs/* */integrationTests *README* */slsDetectorGui/* */ctbGui/* */slsDetectorCalibration/*
EXCLUDE_PATTERNS = */docs/* */tests/* */python/* */manual */slsDetectorServers/* */libs/* */integrationTests *README* */slsDetectorGui/* */ctbGui/* */slsDetectorCalibration/* *TobiSchluter*

# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
Expand Down
13 changes: 12 additions & 1 deletion docs/src/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Common
* Check transeiver and fibers are compatible (all MMF 850nm or all SMF 1030nm)
* Check fiber
* Check fiber polarity (if short range, unplug the link anywhere, and look at the light/dark pattern: dark has to mate with light)
* For Jungfrau, check if the blue sfp light is blinking rapidly (even when it is not sending data). If so, most likely the link is down and something is wrong with the board. If it connected to a switch, then you do not see it with the ethtool command if link is down. One option is to connect it directly to a pc to see if link is down.
* With nc, try "nc -u -p 50001 -l" in receiving pc, and from another pc try "echo hallo | nc -u 10.1.2.172 50001" to send something to the recieving pc interface to see if the link is up and see if the other nc console receives the hallo.

#. Detector is not acquiring (Not Eiger)
* Take an acquisition with many images and using the following steps instead of acquire:
Expand All @@ -47,11 +49,20 @@ Common
* Ensure that the interfaces (on NIC and the switch) used in receiver pc have MTU 9000 (jumbo frames) enabled.


#. Check if 'rx_frames' counter in 'ifconfig' do not increment for interface.
#. Check if 'rx packets' counter in 'ifconfig' do not increment for interface.
* If no, check switch configuration if present. Port counters of switch can also help to identify problem.
* If yes, but receiver software does not see it:

* Check no firewall (eg. firewalld) is present or add rules

.. code-block:: bash
# Stop and disable firewall
service firewalld stop
systemctl disable firewalld
# Check status
service firewalld status
* Check that selinux is disabled ( or add rules)

#. Source UDP IP in config file (Not Eiger)
Expand Down
3 changes: 2 additions & 1 deletion libs/rapidjson/rapidjson/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ struct GenericStringRef {

GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}

GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
// Removed to fix failing build in GCC 14
// GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }

//! implicit conversion to plain CharType pointer
operator const Ch *() const { return s; }
Expand Down
1 change: 0 additions & 1 deletion serverBin/jungfrauDetectorServerv8.0.0

This file was deleted.

1 change: 1 addition & 0 deletions serverBin/jungfrauDetectorServerv8.0.2
1 change: 0 additions & 1 deletion serverBin/moenchDetectorServerv8.0.0

This file was deleted.

1 change: 1 addition & 0 deletions serverBin/moenchDetectorServerv8.0.2
1 change: 0 additions & 1 deletion serverBin/mythen3DetectorServerv8.0.0

This file was deleted.

1 change: 1 addition & 0 deletions serverBin/mythen3DetectorServerv8.0.2
58 changes: 9 additions & 49 deletions slsDetectorCalibration/moenchExecutables/moenchZmqProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ int main(int argc, char *argv[]) {
gainfname = args["gainfile"];
etafname = args["etafilefile"];

if (atoi(args["nuninterfaces"].c_str())>1){
cprintf(RED, "Sorry, at the moment only a single interface is supported instead of %d\n",atoi(args["nuninterfaces"].c_str()));
if (atoi(args["numinterfaces"].c_str())>1){
cprintf(RED, "Sorry, at the moment only a single interface is supported instead of %d\n",atoi(args["numinterfaces"].c_str()));
return EXIT_FAILURE;
}

Expand Down Expand Up @@ -272,54 +272,35 @@ int main(int argc, char *argv[]) {

sls::ZmqSocket *zmqsocket = NULL;

#ifdef NEWZMQ
// receive socket
try {
#endif

zmqsocket = new sls::ZmqSocket(socketip.c_str(), portnum);

#ifdef NEWZMQ
} catch (...) {
cprintf(RED,
"Error: Could not create Zmq socket on port %d with ip %s\n",
portnum, socketip.c_str());
delete zmqsocket;
return EXIT_FAILURE;
}
#endif

#ifndef NEWZMQ
if (zmqsocket->IsError()) {
cprintf(RED,
"Error: Could not create Zmq socket on port %d with ip %s\n",
"Error: Could not create Zmq receiving socket on port %d with ip %s\n",
portnum, socketip.c_str());
delete zmqsocket;
return EXIT_FAILURE;
}
#endif
if (zmqsocket->Connect()) {
cprintf(RED, "Error: Could not connect to socket %s\n",
cprintf(RED, "Error: Could not connect to zmq receiving socket %s\n",
(zmqsocket->GetZmqServerAddress()).c_str());
delete zmqsocket;
return EXIT_FAILURE;
} else
printf("Zmq Client at %s\n", zmqsocket->GetZmqServerAddress().c_str());

printf("Zmq receiving at %s\n", zmqsocket->GetZmqServerAddress().c_str());

// send socket
sls::ZmqSocket *zmqsocket2 = 0;
// cout << "zmq2 " << endl;
if (send) {
#ifdef NEWZMQ
// receive socket
try {
#endif
zmqsocket2 = new sls::ZmqSocket(portnum2, socketip2.c_str());

#ifdef NEWZMQ
zmqsocket2 = new sls::ZmqSocket(portnum2, socketip2.c_str());
} catch (...) {
cprintf(RED,
"Error: Could not create Zmq socket server on port %d and "
"Error: Could not create Zmq sending socket on port %d and "
"ip %s\n",
portnum2, socketip2.c_str());
// delete zmqsocket2;
Expand All @@ -328,28 +309,7 @@ int main(int argc, char *argv[]) {
// return EXIT_FAILURE;
send = false;
}
#endif

#ifndef NEWZMQ
if (zmqsocket2->IsError()) {
cprintf(RED,
"AAA Error: Could not create Zmq socket server on port %d "
"and ip %s\n",
portnum2, socketip2.c_str());
// delete zmqsocket2;
// delete zmqsocket;
// return EXIT_FAILURE;
send = false;
}
#endif
if (zmqsocket2->Connect()) {
cprintf(RED, "BBB Error: Could not connect to socket %s\n",
zmqsocket2->GetZmqServerAddress().c_str());
// delete zmqsocket2;
send = false;
// return EXIT_FAILURE;
} else
printf("Zmq Client at %s\n",
printf("Zmq sending socket at %s\n",
zmqsocket2->GetZmqServerAddress().c_str());
}

Expand Down
4 changes: 2 additions & 2 deletions slsDetectorGui/src/qTabMeasurement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,8 @@ void qTabMeasurement::UpdateProgress() {
int qTabMeasurement::VerifyOutputDirectoryError() {
try {
auto retval = det->getFilePath();
for (auto &it : retval) {
det->setFilePath(it);
for (int i = 0; i < static_cast<int>(retval.size()); ++i) {
det->setFilePath(retval[i], {i});
}
return slsDetectorDefs::OK;
}
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ void setupDetector() {
AD9257_SetDefines(ADC_SPI_REG, ADC_SPI_SRL_CS_OTPT_MSK,
ADC_SPI_SRL_CLK_OTPT_MSK, ADC_SPI_SRL_DT_OTPT_MSK,
ADC_SPI_SRL_DT_OTPT_OFST);
AD9257_Set_Jungfrau_Hardware_Version_1_0(isHardwareVersion_1_0());
AD9257_Disable();
AD9257_Configure();

Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 4880f87

Please sign in to comment.