lofar-astron / DP3

DP3: streaming processing pipeline for radio interferometric data
GNU General Public License v3.0
15 stars 10 forks source link

Everybeam broken in last release #342

Closed abourramouss closed 6 months ago

abourramouss commented 6 months ago

Hello, I am trying to build from the latest release and i get the following error:

34.83 In file included from /EveryBeam/external/aocommon/include/aocommon/hmatrix4x4.h:377, 34.83 from /EveryBeam/cpp/aterms/../griddedresponse/griddedresponse.h:19, 34.83 from /EveryBeam/cpp/aterms/everybeamaterm.cc:9: 34.83 /EveryBeam/external/aocommon/include/aocommon/matrix4x4.h: In member function ‘constexpr double aocommon::Matrix4x4::Norm() const’: 34.83 /EveryBeam/external/aocommon/include/aocommon/matrix4x4.h:189:21: error: call to non-‘constexpr’ function ‘_Tp std::norm(const std::complex<_Tp>&) [with _Tp = double]’ 34.83 n += std::norm(_data[i]); 34.83 ~~~^~~~

Building with 0.5.2 version works.

tammojan commented 6 months ago

Thanks for the bug report! We just ran into it today ourselves. We'll fix this soon, and release shortly. The problem is a use of constexpr which is not supported on older compilers. If you're in a hurry, you can remove the word constexpr on the line

constexpr double Norm() const {

in include/aocommon/matrix4x4.h.

tammojan commented 6 months ago

The related merge request in aocommon is here: https://gitlab.com/aroffringa/aocommon/-/merge_requests/169

abourramouss commented 6 months ago

Oh! Thanks for the fast response.

Yes, I will try with the fix you suggested, thank you very much

abourramouss commented 6 months ago
32.29 /EveryBeam/external/aocommon/include/aocommon/matrix4x4.h: In member function ‘constexpr double aocommon::Matrix4x4::Norm() const’:
32.29 /EveryBeam/external/aocommon/include/aocommon/matrix4x4.h:189:21: error: call to non-‘constexpr’ function ‘_Tp std::norm(const std::complex<_Tp>&) [with _Tp = double]’
32.29        n += std::norm(_data[i]);
32.29             ~~~~~~~~~^~~~~~~~~~

I have tried with the branch that has the aocommon fix, but haven't managed to fix it.

tammojan commented 6 months ago

Could you try the latest everybeam master branch? The fix should be in there.

abourramouss commented 6 months ago

I have tried with the latest everybeam branch, now it's wsclean:

38.80 /wsclean/external/aocommon/include/aocommon/matrix4x4.h: In member function ‘constexpr double aocommon::Matrix4x4::Norm() const’: 38.80 /wsclean/external/aocommon/include/aocommon/matrix4x4.h:189:21: error: call to non-‘constexpr’ function ‘_Tp std::norm(const std::complex<_Tp>&) [with _Tp = double]’ 38.80 n += std::norm(_data[i]); 38.80 ~~~~~~~~~^~~~~~~~~~ 38.95 make[2]: *** [CMakeFiles/wsclean-object.dir/build.make:174: CMakeFiles/wsclean-object.dir/gridding/averagecorrection.cpp.o] Error 1 38.95 make[2]: *** Waiting for unfinished jobs.... 39.35 /wsclean/main/stopwatch.cpp: In constructor ‘boost::posix_time::seconds::seconds(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*) [with T = int; typename boost::enable_if<boost::is_integral<T>, void>::type = void]’: 39.35 /wsclean/main/stopwatch.cpp:8:76: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] 39.35 Stopwatch::Stopwatch() : _running(false), _sum(boost::posix_time::seconds(0)) {} 39.35 ^ 40.93 In file included from /wsclean/external/aocommon/include/aocommon/hmatrix4x4.h:378, 40.93 from /wsclean/main/../math/imageoperations.h:7, 40.93 from /wsclean/main/wsclean.cpp:3: 40.93 /wsclean/external/aocommon/include/aocommon/matrix4x4.h: In member function ‘constexpr double aocommon::Matrix4x4::Norm() const’: 40.93 /wsclean/external/aocommon/include/aocommon/matrix4x4.h:189:21: error: call to non-‘constexpr’ function ‘_Tp std::norm(const std::complex<_Tp>&) [with _Tp = double]’ 40.93 n += std::norm(_data[i]); 40.93 ~~~~~~~~~^~~~~~~~~~ 41.05 In file included from /wsclean/main/wsclean.h:29, 41.05 from /wsclean/main/commandline.cpp:2: 41.05 /wsclean/main/../gridding/msgridderbase.h: In instantiation of ‘void internal::CollapseData(size_t, std::complex<float>*, aocommon::PolarizationEnum) [with long unsigned int PolarizationCount = 2; size_t = long unsigned int; aocommon::PolarizationEnum = aocommon::Polarization::PolarizationEnum]’: 41.05 /wsclean/main/../gridding/msgridderbase.h:504:49: required from here 41.05 /wsclean/main/../gridding/msgridderbase.h:48:53: warning: parameter ‘polarization’ set but not used [-Wunused-but-set-parameter] 41.05 aocommon::PolarizationEnum polarization) { 41.05 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ 41.05 /wsclean/main/../gridding/msgridderbase.h: In instantiation of ‘void internal::ExpandData(size_t, std::complex<float>*, std::complex<float>*, aocommon::PolarizationEnum) [with long unsigned int PolarizationCount = 2; size_t = long unsigned int; aocommon::PolarizationEnum = aocommon::Polarization::PolarizationEnum]’: 41.05 /wsclean/main/../gridding/msgridderbase.h:539:75: required from here 41.05 /wsclean/main/../gridding/msgridderbase.h:66:51: warning: parameter ‘polarization’ set but not used [-Wunused-but-set-parameter] 41.05 aocommon::PolarizationEnum polarization) { 41.05 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ 42.51 make[2]: *** [CMakeFiles/wsclean-object.dir/build.make:160: CMakeFiles/wsclean-object.dir/main/wsclean.cpp.o] Error 1 43.75 make[1]: *** [CMakeFiles/Makefile2:506: CMakeFiles/wsclean-object.dir/all] Error 2 43.75 make: *** [Makefile:136: all] Error 2

tammojan commented 6 months ago

The issue has been fixed in the latest wsclean master now as well.

abourramouss commented 6 months ago

Thanks!

Is it possible to get a release of the packages after the bug fix?

tammojan commented 6 months ago

We'll release soon, but this may take a few days. In the meantime, please use the main branches.

aroffringa commented 6 months ago

I think that Tammo Jan was thinking of a new EveryBeam release. For Dp3 and WSClean, we won't release a new package directly. Dp3 wasn't affected by this, and the previous release of the WSClean neither -- only the master temporarily.

abourramouss commented 6 months ago

That does wonders. Thanks for the great work and fast responses, for now I will be using the main branch and when a release happens will modify the dockerfile.

Closing as completed.