Skip to content

GNU build on MareNostrum 5 not working #282

@reuterbal

Description

@reuterbal

What happened?

multio build inside ifs-bundle fails on MN5 when using GNU 13.2.0, due to invalid comparison of size_t with eckit::Length. The following fixes this for me:

diff --git a/src/multio/action/statistics-mtg2/io/FstreamIO.cc b/src/multio/action/statistics-mtg2/io/FstreamIO.cc
index d988d5a8..f4ffb87c 100644
--- a/src/multio/action/statistics-mtg2/io/FstreamIO.cc
+++ b/src/multio/action/statistics-mtg2/io/FstreamIO.cc
@@ -69,7 +69,7 @@ void FstreamIO::checkFileExist(const std::string& name) const {

 void FstreamIO::checkFileSize(const std::string& name, size_t expectedSize) const {
     eckit::PathName file{name};
-    if (file.size() != expectedSize) {
+    if (file.size() != eckit::Length(expectedSize)) {
         std::ostringstream os;
         os << "ERROR : wrong file size for restart : (" << name << ")";
         throw eckit::SeriousBug{os.str(), Here()};
diff --git a/src/multio/action/statistics/io/FstreamIO.cc b/src/multio/action/statistics/io/FstreamIO.cc
index 292b62d6..fe8f3288 100644
--- a/src/multio/action/statistics/io/FstreamIO.cc
+++ b/src/multio/action/statistics/io/FstreamIO.cc
@@ -64,7 +64,7 @@ void FstreamIO::checkFileExist(const std::string& name) const {

 void FstreamIO::checkFileSize(const std::string& name, size_t expectedSize) const {
     eckit::PathName file{name};
-    if (file.size() != expectedSize) {
+    if (file.size() != eckit::Length(expectedSize)) {
         std::ostringstream os;
         os << "ERROR : wrong file size for restart : (" << name << ")";
         throw eckit::SeriousBug{os.str(), Here()};

What are the steps to reproduce the bug?

IFS bundle build for 49r3

Version

2.10.1

Platform (OS and architecture)

Linux alogin1 5.14.0-284.30.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 25 09:13:12 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux

Relevant log output

Accompanying data

No response

Organisation

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions