diff --git a/README.md b/README.md index 3e4469100cc1f82895ffabebacd7f1fb533cee5c..3a55e8c1c141451f1ff1aaa004119bca6ada2de0 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,7 @@ Next change the version in the following places: # Release Notes +* 0.38.1 Custom compiled casacore for improved beam-tracking performance * 0.38.0 Add metadata device publishing zmq events * 0.37.2 Improved event-subscription interface, avoid overlap between polling loops. * 0.37.1 Improved asyncio resource teardown when devices go Off. diff --git a/docker/lofar-device-base/Dockerfile b/docker/lofar-device-base/Dockerfile index af246c0f1bb44dda22ea4cf026ed6714c0fd98b9..be1dc25ed52bb7087df704a1f2b54b388c305c80 100644 --- a/docker/lofar-device-base/Dockerfile +++ b/docker/lofar-device-base/Dockerfile @@ -1,6 +1,5 @@ ARG SOURCE_IMAGE FROM ${SOURCE_IMAGE} - ARG TANGO_STATION_CONTROL ENV TANGO_STATION_CONTROL $TANGO_STATION_CONTROL @@ -19,6 +18,46 @@ RUN --mount=type=cache,target=/var/cache/apt \ RUN --mount=type=cache,target=/var/cache/apt \ sudo apt-get install -y netcat +# Compile casacore and python-casacore ourselves to get the latest +# versions and custom tuning. +ENV CASACORE_VERSION=master +ARG CXX_FLAGS="--std=c++11 -W -Wall -Woverloaded-virtual -Wno-unknown-pragmas -D_GLIBCXX_USE_CXX11_ABI=1 -O3" + +# Have -mtune reflect the target platform, see +# gcc -march=native -Q --help=target | grep mtune +# Have the extensions flags reflect the common subset of all target platforms, use +# gcc -march=native -Q --help=target > xyz-native.txt +# to get the flags supported on a specific host, and use +# sort amd-native.txt intel-native.txt | uniq -d | grep enabled | awk '{ printf $1 " " }' +# to get the overlap of supported extensions on two platforms. +ARG CXX_ARG_FLAGS="-mtune=skylake -m128bit-long-double -m64 -m80387 -mabm -madx -maes -malign-stringops -mavx2 -mavx -mbmi2 -mbmi -mclflushopt -mcrc32 -mcx16 -mf16c -mfancy-math-387 -mfma -mfp-ret-in-387 -mfsgsbase -mfxsr -mglibc -mhard-float -mhle -mieee-fp -mlong-double-80 -mlzcnt -mmmx -mmovbe -mmwait -mpclmul -mpopcnt -mprfchw -mpush-args -mrdrnd -mrdseed -mred-zone -msahf -msgx -msse2 -msse3 -msse4.1 -msse4.2 -msse4 -msse -mssse3 -mstv -mtls-direct-seg-refs -mvzeroupper -mxsavec -mxsave -mxsaveopt -mxsaves" + +RUN --mount=type=cache,target=/var/cache/apt \ + sudo apt-get install -y wget cmake gfortran flex bison libreadline-dev libncurses-dev libopenblas-dev libfftw3-dev libboost-filesystem-dev libboost-test-dev libboost-system-dev libcfitsio-dev wcslib-dev python3-numpy-dev libhdf5-dev libgsl-dev + +RUN mkdir -p /tmp/casacore/build && \ + cd /tmp/casacore && git clone --depth 1 --shallow-submodules --branch ${CASACORE_VERSION} https://github.com/casacore/casacore.git src && \ + cd /tmp/casacore/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DDATA_DIR=/opt/IERS -DBUILD_PYTHON3=ON -DBUILD_PYTHON=OFF -DPYTHON_EXECUTABLE=/usr/bin/python3 -DENABLE_TABLELOCKING=OFF -DUSE_OPENMP=ON -DUSE_FFTW3=TRUE -DUSE_HDF5=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${CXX_ARG_FLAGS} -fsigned-char -DNDEBUG" ../src/ && \ + cd /tmp/casacore/build && make -j && \ + cd /tmp/casacore/build && sudo make install && \ + rm -rf /tmp/casacore + +# update ld.so.cache so casacore libraries will be found, as python-casacore does not link in the full path +RUN sudo ldconfig + +ENV PYTHON_CASACORE_VERSION=v3.5.2 \ + PYTHON_VERSION=3.10 + +RUN --mount=type=cache,target=/var/cache/apt \ + sudo apt-get install -y make python3-setuptools libcfitsio-dev wcslib-dev + +RUN mkdir /tmp/python-casacore && \ + cd /tmp/python-casacore && git clone --depth 1 --shallow-submodules --branch ${PYTHON_CASACORE_VERSION} https://github.com/casacore/python-casacore.git && \ + cd /tmp/python-casacore/python-casacore && python3 ./setup.py build_ext -I/usr/local/include/ -L/usr/local/lib/ && \ + cd /tmp/python-casacore/python-casacore && sudo python3 ./setup.py install && \ + sudo rm -rf /tmp/python-casacore + +# Install tangostationcontrol and its dependencies COPY tmp/requirements.txt /tangostationcontrol-requirements.txt RUN echo "TANGO_STATION_CONTROL: ${TANGO_STATION_CONTROL}" diff --git a/tangostationcontrol/VERSION b/tangostationcontrol/VERSION index ca75280b09b20e8cbe40563adac1dcf41a02f412..bb22182d4f72fd2a28c50b8ecfa5df74501dc431 100644 --- a/tangostationcontrol/VERSION +++ b/tangostationcontrol/VERSION @@ -1 +1 @@ -0.38.0 +0.38.1