edf-hpc / verrou

floating-point errors checker
https://edf-hpc.github.io/verrou/vr-manual.html
GNU General Public License v2.0
49 stars 13 forks source link

Does not compile with openmpi-4.0.3 (and it seems with any openmpi >= 3.0) #35

Open ojamond opened 3 years ago

ojamond commented 3 years ago

Hi,

Verrou fails to compile on my ubuntu20.04 where openmpi is 4.0.3. It seems that it fails with any openmpi >= 3.0, as the error message looks like:

 >> 1628    /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h:322:57: error: expected expression before '_Static_assert'
     1629      322 | #define THIS_SYMBOL_WAS_REMOVED_IN_MPI30(func, newfunc) _Static_assert(0, #func " was removed in MPI-3.0.  Use " #newfunc " instead.")
     1630          |                                                         ^~~~~~~~~~~~~~
     1631    /usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h:745:45: note: in expansion of macro 'THIS_SYMBOL_WAS_REMOVED_IN_MPI30'
     1632      745 | #        define MPI_COMBINER_STRUCT_INTEGER THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_COMBINER_STRUCT_INTEGER, MPI_COMBINER_STRUCT);
     1633          |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1634    libmpiwrap.c:366:12: note: in expansion of macro 'MPI_COMBINER_STRUCT_INTEGER'
     1635      366 |       case MPI_COMBINER_STRUCT_INTEGER: fprintf(f, "STRUCT_INTEGER"); break;

It works with openmpi-2.1.6.

The spack build also fails for the same reason (the dependency with mpi seems to be missing in the spack package).

Thanks! Olivier

pablooliveira commented 3 years ago

Thanks @ojamond. Your workaround helps, here is the diff on the spack recipe if it can help others:

--- a/var/spack/repos/builtin/packages/verrou/package.py
+++ b/var/spack/repos/builtin/packages/verrou/package.py
@@ -58,6 +58,7 @@ class Verrou(AutotoolsPackage):
     depends_on('automake', type='build')
     depends_on('libtool', type='build')
     depends_on('m4', type='build')
+    depends_on('openmpi@2.1.6', type='build')

     depends_on('python@:2.99.99', when='@1.1.0:2.0.99', type=('build', 'run'))
     depends_on('python@3.0:', when='@2.1.0:', type=('build', 'run'))
lathuili commented 3 years ago

It's a problem already reported in the valgrind bugtracker (https://bugs.kde.org/show_bug.cgi?id=420518 )

As verrou do not use the mpi wrapper, you can use old versions of openmpi. For other valgrind tool (memcheck dhar ...) I don't know what are the consequences.