Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] Memchecker failure with empty struct type
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2012-09-25 15:04:37

The following C program:

#include <mpi.h>

int main(int argc, char** argv) {
   int blocklengths;
   MPI_Aint displacements;
   MPI_Datatype types, dt;
   int x;
   MPI_Init(&argc, &argv);
   MPI_Type_struct(0, &blocklengths, &displacements, &types, &dt);
   MPI_Send(&x, 1, dt, MPI_PROC_NULL, 0, MPI_COMM_WORLD);
   return 0;

produces a segmentation fault (caused by a NULL pointer dereference) when
run with Open MPI 1.6.1, but only when using Valgrind. Running without
Valgrind does not cause any issues; the failure appears to be in the code
that checks whether MPI buffers are valid. The configure flags I used to
build Open MPI were a prefix and:

--disable-pretty-print-stacktrace --enable-mpi-thread-multiple
--enable-memchecker --enable-mca-no-build=btl-openib --enable-debug

and I am using GCC 4.7.1 on Linux. Is this a known issue? Thank you for
your help.

-- Jeremiah Willcock