From 4493acc390a92ba53c7d76766024e7d64c7b31ce Mon Sep 17 00:00:00 2001 From: Boud Roukema Date: Fri, 15 May 2020 04:42:58 +0200 Subject: New software: Valgrind and Patch With this commit, Maneage now includes instructions to build the memory tracing tool Valgrind and the program 'patch' (to apply corrections/patches in text files and in particular the sources of programs). For this version of Valgrind, some patches were necessary for an interface with OpenMPI 2.x (which is the case now). Also note that this version of Valgrind's checks can fail with GCC 10.1.x (when using '--host-cc'), and the failures aren't due to internal problems but due to how the tests are designed (https://bugs.gentoo.org/707598). So currently if any of Valgrind's checks fail, Maneage still assumes that Valgrind was built and installed successfully. While testing on macOS, we noticed that it needs the macOS-specific 'mig' program which we can't build in Maneage. DESCRIPTION: The mig command invokes the Mach Interface Generator to generate Remote Procedure Call (RPC) code for client-server style Mach IPC from specification files. So a symbolic link to the system's 'mig' is now added to the project's programs on macOS systems. This commit's build of Patch and Valgrind has been tested on two GNU/Linux distributions (Debian and ArchLinux) as well as macOS. Work on this commit started by Boud Roukema, but also involved tests and corrections by Mohammad Akhlaghi and Raul Infante-Sainz. --- .../patches/valgrind-3.15.0-mpi-fix1.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 reproduce/software/patches/valgrind-3.15.0-mpi-fix1.patch (limited to 'reproduce/software/patches/valgrind-3.15.0-mpi-fix1.patch') diff --git a/reproduce/software/patches/valgrind-3.15.0-mpi-fix1.patch b/reproduce/software/patches/valgrind-3.15.0-mpi-fix1.patch new file mode 100644 index 0000000..94dcab5 --- /dev/null +++ b/reproduce/software/patches/valgrind-3.15.0-mpi-fix1.patch @@ -0,0 +1,37 @@ +--- + mpi/libmpiwrap.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + Patch by Samuel Thibault: + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946329;msg=10 + and hacked further by Boud Roukema 2020-05-10. +--- a/mpi/libmpiwrap.c ++++ b/mpi/libmpiwrap.c +@@ -278,8 +278,12 @@ static void showTy ( FILE* f, MPI_Dataty + else if (ty == MPI_LONG_INT) fprintf(f,"LONG_INT"); + else if (ty == MPI_SHORT_INT) fprintf(f,"SHORT_INT"); + else if (ty == MPI_2INT) fprintf(f,"2INT"); ++# if defined(MPI_UB_ENABLED_IN_MPI1) + else if (ty == MPI_UB) fprintf(f,"UB"); ++# endif ++# if defined(MPI_LB_ENABLED_IN_MPI1) + else if (ty == MPI_LB) fprintf(f,"LB"); ++# endif + # if defined(MPI_WCHAR) + else if (ty == MPI_WCHAR) fprintf(f,"WCHAR"); + # endif +@@ -733,8 +737,14 @@ void walk_type ( void(*f)(void*,long), c + f(base + offsetof(Ty,loc), sizeof(int)); + return; + } +- if (ty == MPI_LB || ty == MPI_UB) ++#if defined(MPI_LB_ENABLED_IN_MPI1) ++ if (ty == MPI_LB) ++ return; /* have zero size, so nothing needs to be done */ ++#endif ++#if defined(MPI_UB_ENABLED_IN_MPI1) ++ if (ty == MPI_UB) + return; /* have zero size, so nothing needs to be done */ ++#endif + goto unhandled; + /*NOTREACHED*/ + } -- cgit v1.2.1