Bug#1043227: patch still valid? (opm-common: test failure on ppc64el with -O3)
Markus Blatt
markus at dr-blatt.de
Tue Apr 2 22:36:42 BST 2024
Hi,
Concerning the patch: It seems like -O2 is the default in Debian now anyway.
Will the patch still work as it is?
I did some investigations on platti.debian.org. I have no idea what the problem
is. My hunch is that compiler optimization breaks the code here. If I add a
simple print statement like this then the test passes:
(sid_ppc64el-dchroot)blattms at platti:~/opm-common$ git diff opm/output/data/InterRegFlow.hpp
diff --git a/opm/output/data/InterRegFlow.hpp b/opm/output/data/InterRegFlow.hpp
index 0e1dadcc4..7e2aeabbe 100644
--- a/opm/output/data/InterRegFlow.hpp
+++ b/opm/output/data/InterRegFlow.hpp
@@ -29,7 +29,7 @@
#include <iterator>
#include <type_traits>
#include <utility>
-
+#include <iostream>
namespace Opm { namespace data {
/// Intermediary Protocol to Linearise Per-Connection Flow Rates Into Subrange.
@@ -271,7 +271,7 @@ namespace Opm { namespace data {
using sz_t = decltype(InterRegFlow::bufferSize());
const auto& [begin, end] = this->elements_;
-
+ std::cout<<"distance=";//<< std::distance(begin, end);// << " size="<< InterRegFlow::bufferSize()<<std::endl;
return static_cast<sz_t>(std::distance(begin, end))
== InterRegFlow::bufferSize();
}
(sid_ppc64el-dchroot)blattms at platti:~/opm-common$
Best,
Markus
More information about the debian-science-maintainers
mailing list