Hi:
I was running my OpenMPI 1.2.3 application under Valgrind and I observed
this error message:

==14322== Source and destination overlap in memcpy(0x41F5BD0, 0x41F5BD8,
16)
==14322==    at 0x49070AD: memcpy (mc_replace_strmem.c:116)
==14322==    by 0x4A45CF4: ompi_ddt_copy_content_same_ddt
(in /home/scratch/DMP/RHEL4-GCC4/lib/libmpi.so.0.0.0)
==14322==    by 0x7A6C386: ompi_coll_tuned_allgather_intra_bruck
(in /home/scratch/DMP/RHEL4-GCC4/lib/openmpi/mca_coll_tuned.so)
==14322==    by 0x4A29FFE: ompi_comm_split
(in /home/scratch/DMP/RHEL4-GCC4/lib/libmpi.so.0.0.0)
==14322==    by 0x4A4E322: MPI_Comm_split
(in /home/scratch/DMP/RHEL4-GCC4/lib/libmpi.so.0.0.0)
==14322==    by 0x400A26: main
(in /home/scratch/DMP/severian_tests/ompi/a.out)

Attached is a reduced code example. I run it like:

mpirun -np 3 valgrind ./a.out

I only see this error if there are an odd number of processes! I don't
know if this is really a problem or not, though. My OMPI application
seems to work OK. However, the linux man page for memcpy says
overlapping range copying is undefined.

Other details: x86_64 (one box, two dual-core opterons), RHEL 4.5,
OpenMPI-1.2.3 compiled with the RHEL-supplied GCC 4 (gcc4 (GCC) 4.1.1
20070105 (Red Hat 4.1.1-53)), valgrind 3.2.3. 

Thanks,
Allen


-- 
Allen Barnett
Transpire, Inc.
e-mail: al...@transpireinc.com
Ph: 518-887-2930

#include <stdio.h>
#include <stdlib.h>
#include "mpi.h"

int main ( int argc, char* argv[] )
{
  int rank, size, c;
  MPI_Comm* comms;

  MPI_Init( &argc, &argv );
  MPI_Comm_rank( MPI_COMM_WORLD, &rank );
  MPI_Comm_size( MPI_COMM_WORLD, &size );

  comms = malloc( size * sizeof(MPI_Comm) );

  for ( c = 0; c < size; c++ ) {
    int color = MPI_UNDEFINED;
    if ( c == rank )
      color = 0;
    MPI_Comm_split( MPI_COMM_WORLD, color, 0, &comms[c] );
  }

  MPI_Finalize();

  free( comms );

  return 0;
}

Attachment: info.bz2
Description: application/bzip

Reply via email to