Skip to content

Commit

Permalink
Release of 5.1.0 (#237)
Browse files Browse the repository at this point in the history
* Setting pattern from memory (#218)

* ToString accepts c-style arrays

* fixed patwait time bug in validation

* Introduced pattern class

* compile for servers too

* Python binding for Pattern

* added scanParameters in Python

* slsReceiver: avoid potential memory leak around Implementation::generalData

* additional constructors for scanPrameters in python

* bugfix: avoid potentital memory leak in receiver if called outside constructor context

* added scanParameters in Python

* additional constructors for scanPrameters in python

* M3defaultpattern (#227)

* default pattern for m3 and moench including Python bindings

* M3settings (#228)

* some changes to compile on RH7 and in the server to load the default chip status register at startup

* Updated mythen3DeectorServer_developer executable with correct initialization at startup

Co-authored-by: Erik Frojdh <[email protected]>
Co-authored-by: Anna Bergamaschi <[email protected]>

* Pattern.h as a public header files (#229)

* fixed buffer overflow but caused by using global instead of local enum

* replacing out of range trimbits with edge values

* replacing dac values that are out of range after interpolation

* updated pybind11 to 2.6.2

* Mythen3 improved synchronization (#231)

Disabling scans for multi module Mythen3, since there is no feedback of the detectors being ready
startDetector first starts the slaves then the master
acquire firs calls startDetector for the slaves then acquire on the master
getMaster to read back from hardware which one is master

* New server for JF to go with the new FW (#232)

* Modified Jungfrau speed settings for HW1.0 - FW fix version 1.1.1, compilation date 210218

* Corrected bug. DBIT clk phase is implemented in both HW version 1.0 and 2.0. Previous version did not update the DBIT phase shift on the configuration of a speed.

* fix for m3 scan with single module

* m3 fw version

* m3 server

* bugfix for bottom when setting quad

* new strategy for finding zmq based on cppzmq



Co-authored-by: Dhanya Thattil <[email protected]>
Co-authored-by: Dhanya Thattil <[email protected]>
Co-authored-by: Alejandro Homs Puron <[email protected]>
Co-authored-by: Anna Bergamaschi <[email protected]>
Co-authored-by: Xiaoqiang Wang <[email protected]>
Co-authored-by: lopez_c <[email protected]>
  • Loading branch information
7 people authored Mar 22, 2021
1 parent 64de9f3 commit 2f2fe4d
Show file tree
Hide file tree
Showing 168 changed files with 3,588 additions and 9,031 deletions.
33 changes: 31 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.12)
project(slsDetectorPackage)
set(PROJECT_VERSION 5.0.0)
set(PROJECT_VERSION 5.1.0)
include(CheckIPOSupported)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")

Expand Down Expand Up @@ -157,8 +157,37 @@ set(CMAKE_INSTALL_RPATH $ORIGIN)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)


set(ZeroMQ_HINT "" CACHE STRING "Hint where ZeroMQ could be found")
#Adapted from: https://github.com/zeromq/cppzmq/
if (NOT TARGET libzmq)
if(ZeroMQ_HINT)
message(STATUS "Looking for ZeroMQ in: ${ZeroMQ_HINT}")
find_package(ZeroMQ 4
NO_DEFAULT_PATH
HINTS ${ZeroMQ_DIR}
)
else()
find_package(ZeroMQ 4)
endif()



find_package(ZeroMQ 4 REQUIRED)
# libzmq autotools install: fallback to pkg-config
if(NOT ZeroMQ_FOUND)
message(STATUS "CMake libzmq package not found, trying again with pkg-config (normal install of zeromq)")
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/libzmq-pkg-config)
find_package(ZeroMQ 4 REQUIRED)
endif()

# TODO "REQUIRED" above should already cause a fatal failure if not found, but this doesn't seem to work
if(NOT ZeroMQ_FOUND)
message(FATAL_ERROR "ZeroMQ was not found, neither as a CMake package nor via pkg-config")
endif()

if (ZeroMQ_FOUND AND NOT TARGET libzmq)
message(FATAL_ERROR "ZeroMQ version not supported!")
endif()
endif()

if (SLS_USE_TESTS)
enable_testing()
Expand Down
59 changes: 38 additions & 21 deletions RELEASE.txt
Original file line number Diff line number Diff line change
@@ -1,59 +1,76 @@
SLS Detector Package 5.0.1 released on 25.11.2020 (Bug Fix Release)
SLS Detector Package 5.1.0 released on 22.03.2020 (Minor Release)
===================================================================

This document describes the differences between 5.0.1 and 5.0.0 releases.
This document describes the differences between 5.1.0 and 5.0.1 releases.



CONTENTS
--------
1. Topics Concerning
1. New Features
2. Resolved Issues
3. Known Issues
4. Firmware Requirements
5. Download, Documentation & Support



1. Topics Concerning
====================

- Python bindings
- CMake improvements
1. New Features
===============

Client
------

1. Added settings and threshold features for Mythen3.
2. Internal modification of acquire for Mythen3.
3. Added getMaster for Mythen3
4. Mythen3, API function to set pattern from memory


Mythen3 server
-----------------

1. Setting timing to auto, sets timing to trigger for slaves


2. Resolved Issues
==================

Python bindings
---------------

1. Fixed function signatures for getRxUDPSocketBufferSize,
setRxUDPSocketBufferSize and getRxRealUDPSocketBufferSize.
Receiver
--------

1. Current code only calls Implementation::setDetectorType from constructor,
but potential memory leak if called out of constructor context. Fixed.


Client
------

2. Updated pybind11 to v2.6.1 to remove warnings with Python 3.9 and
better handling of C++ standard.
1. Fixed missing scanParameters class in Python

3. Added missing properties in Python.
2. cmk.sh refactored to have better option handling

3. Fixed hardcoded path accidentally ending up in the exported CMake package

CMake improvements
------------------
Server
--------

1. Explicitly state Python 3.6 or greater.
1. Bottom port not mirrored correctly for Eiger quad

2. Finds the Python of the activated environment when using conda
without having to supply additional arguments.

3. Removed redundant libraries for linking targets.



3. Firmware Requirements
========================

No updates from 5.0.0
Mythen3: 0x210201
Jungfrau: 0x210218 (1.0 pcb)
0x200721 (2.0 pcb, not changed)

Other detectors no updates from 5.0.0



Expand Down
112 changes: 0 additions & 112 deletions cmake/FindZeroMQ.cmake

This file was deleted.

6 changes: 6 additions & 0 deletions cmake/package_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ install(FILES
DESTINATION ${CMAKE_INSTALL_DIR}
)

install(FILES
"${CMAKE_SOURCE_DIR}/libzmq-pkg-config/FindZeroMQ.cmake"
COMPONENT devel
DESTINATION ${CMAKE_INSTALL_DIR}/libzmq-pkg-config
)

if (PROJECT_LIBRARIES OR PROJECT_STATIC_LIBRARIES)
install(
EXPORT "${TARGETS_EXPORT_NAME}"
Expand Down
15 changes: 14 additions & 1 deletion cmake/project-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,21 @@ include(CMakeFindDependencyMacro)

set(SLS_USE_HDF5 "@SLS_USE_HDF5@")

# Add optional dependencies here

find_package(ZeroMQ 4 QUIET)
# libzmq autotools install: fallback to pkg-config
if(NOT ZeroMQ_FOUND)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/libzmq-pkg-config)
find_package(ZeroMQ 4 REQUIRED)
endif()

if(NOT ZeroMQ_FOUND)
message(FATAL_ERROR "ZeroMQ was NOT found!")
endif()

find_dependency(Threads)

# Add optional dependencies here
if (SLS_USE_HDF5)
find_dependency(HDF5)
endif ()
Expand Down
7 changes: 4 additions & 3 deletions conda-recepie/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DSLS_USE_HDF5=OFF\


cmake --build . -- -j10
NCORES=$(getconf _NPROCESSORS_ONLN)
echo "Building using: ${NCORES} cores"
cmake --build . -- -j${NCORES}
cmake --build . --target install

CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2
CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2
4 changes: 2 additions & 2 deletions conda-recepie/copy_gui.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Copy the GUI
mkdir $PREFIX/bin
cp build/bin/slsDetectorGui $PREFIX/bin/.
mkdir -p $PREFIX/bin
cp build/install/bin/slsDetectorGui $PREFIX/bin/.
4 changes: 2 additions & 2 deletions conda-recepie/copy_lib.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

mkdir $PREFIX/lib
mkdir $PREFIX/bin
mkdir -p $PREFIX/lib
mkdir -p $PREFIX/bin
mkdir -p $PREFIX/include/sls
# mkdir $PREFIX/include/slsDetectorPackage

Expand Down
19 changes: 19 additions & 0 deletions conda-recepie/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ outputs:
script: copy_lib.sh

requirements:
build:
- {{ compiler('c') }}
- {{compiler('cxx')}}
- libstdcxx-ng
- libgcc-ng
- zeromq

host:
- zeromq

run:
- libstdcxx-ng
- libgcc-ng
Expand All @@ -78,6 +88,8 @@ outputs:

host:
- python
- {{ pin_subpackage('slsdetlib', exact=True) }}


run:
- libstdcxx-ng
Expand All @@ -94,6 +106,13 @@ outputs:
- name: slsdetgui
script: copy_gui.sh
requirements:

build:
- {{ compiler('c') }}
- {{compiler('cxx')}}
- {{ pin_subpackage('slsdetlib', exact=True) }}
- qwt 6.*

run:
- {{ pin_subpackage('slsdetlib', exact=True) }}
- qwt 6.*
Expand Down
2 changes: 1 addition & 1 deletion libs/pybind11
Submodule pybind11 updated 79 files
+1 −1 .appveyor.yml
+21 −0 .clang-format
+43 −4 .github/CONTRIBUTING.md
+7 −2 .github/dependabot.yml
+2 −1 .github/pull_request_template.md
+230 −60 .github/workflows/ci.yml
+1 −1 .github/workflows/configure.yml
+4 −4 .pre-commit-config.yaml
+26 −15 CMakeLists.txt
+30 −14 README.rst
+11 −0 docs/advanced/cast/stl.rst
+13 −5 docs/advanced/exceptions.rst
+2 −0 docs/advanced/functions.rst
+4 −2 docs/advanced/pycpp/numpy.rst
+8 −1 docs/basics.rst
+122 −1 docs/changelog.rst
+25 −13 docs/compiling.rst
+6 −1 docs/conf.py
+3 −1 docs/installing.rst
+20 −5 docs/release.rst
+4 −4 docs/requirements.txt
+1 −1 docs/upgrade.rst
+1 −1 include/pybind11/attr.h
+63 −21 include/pybind11/cast.h
+6 −8 include/pybind11/detail/class.h
+11 −3 include/pybind11/detail/common.h
+2 −2 include/pybind11/detail/internals.h
+9 −5 include/pybind11/iostream.h
+121 −48 include/pybind11/pybind11.h
+14 −5 include/pybind11/pytypes.h
+18 −3 include/pybind11/stl_bind.h
+1 −1 pybind11/_version.py
+27 −19 pybind11/setup_helpers.py
+21 −7 setup.cfg
+46 −9 tests/CMakeLists.txt
+13 −0 tests/pybind11_tests.h
+4 −2 tests/requirements.txt
+2 −0 tests/test_buffers.py
+80 −1 tests/test_builtin_casters.cpp
+104 −0 tests/test_builtin_casters.py
+4 −1 tests/test_callbacks.cpp
+13 −1 tests/test_class.cpp
+6 −1 tests/test_cmake_build/CMakeLists.txt
+2 −2 tests/test_cmake_build/subdirectory_embed/CMakeLists.txt
+1 −1 tests/test_cmake_build/subdirectory_function/CMakeLists.txt
+1 −1 tests/test_cmake_build/subdirectory_target/CMakeLists.txt
+22 −0 tests/test_constants_and_functions.cpp
+11 −0 tests/test_constants_and_functions.py
+2 −1 tests/test_copy_move.cpp
+2 −2 tests/test_copy_move.py
+7 −6 tests/test_custom_type_casters.cpp
+8 −0 tests/test_docstring_options.cpp
+3 −0 tests/test_docstring_options.py
+5 −4 tests/test_eigen.cpp
+3 −0 tests/test_embed/CMakeLists.txt
+27 −18 tests/test_enum.py
+12 −1 tests/test_exceptions.py
+30 −19 tests/test_factory_constructors.cpp
+45 −0 tests/test_iostream.cpp
+23 −0 tests/test_iostream.py
+1 −1 tests/test_local_bindings.py
+11 −9 tests/test_methods_and_attributes.cpp
+13 −0 tests/test_modules.py
+12 −10 tests/test_numpy_array.cpp
+33 −25 tests/test_pickling.cpp
+7 −4 tests/test_pytypes.cpp
+8 −6 tests/test_pytypes.py
+37 −7 tests/test_smart_ptr.cpp
+12 −4 tests/test_smart_ptr.py
+7 −7 tests/test_stl_binders.cpp
+1 −2 tests/test_virtual_functions.py
+118 −0 tests/valgrind-numpy-scipy.supp
+135 −0 tests/valgrind-python.supp
+3 −0 tools/FindEigen3.cmake
+2 −0 tools/FindPythonLibsNew.cmake
+63 −0 tools/make_changelog.py
+1 −1 tools/pybind11Config.cmake.in
+37 −16 tools/pybind11NewTools.cmake
+27 −7 tools/pybind11Tools.cmake
27 changes: 27 additions & 0 deletions libzmq-pkg-config/FindZeroMQ.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#From: https://github.com/zeromq/cppzmq/
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON)
find_package(PkgConfig)
pkg_check_modules(PC_LIBZMQ QUIET libzmq)

set(ZeroMQ_VERSION ${PC_LIBZMQ_VERSION})
find_library(ZeroMQ_LIBRARY NAMES libzmq.so libzmq.dylib libzmq.dll
PATHS ${PC_LIBZMQ_LIBDIR} ${PC_LIBZMQ_LIBRARY_DIRS})
find_library(ZeroMQ_STATIC_LIBRARY NAMES libzmq-static.a libzmq.a libzmq.dll.a
PATHS ${PC_LIBZMQ_LIBDIR} ${PC_LIBZMQ_LIBRARY_DIRS})

if(ZeroMQ_LIBRARY OR ZeroMQ_STATIC_LIBRARY)
set(ZeroMQ_FOUND ON)
endif()

if (TARGET libzmq)
# avoid errors defining targets twice
return()
endif()

add_library(libzmq SHARED IMPORTED)
set_property(TARGET libzmq PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PC_LIBZMQ_INCLUDE_DIRS})
set_property(TARGET libzmq PROPERTY IMPORTED_LOCATION ${ZeroMQ_LIBRARY})

add_library(libzmq-static STATIC IMPORTED ${PC_LIBZMQ_INCLUDE_DIRS})
set_property(TARGET libzmq-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PC_LIBZMQ_INCLUDE_DIRS})
set_property(TARGET libzmq-static PROPERTY IMPORTED_LOCATION ${ZeroMQ_STATIC_LIBRARY})
Loading

0 comments on commit 2f2fe4d

Please sign in to comment.