Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] conflict among differenv MPIs
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2008-09-22 14:28:52

On Sep 22, 2008, at 2:12 PM, Shafagh Jafer wrote:

> I am gonna kill myself :( i dont know what the problem is... I 'm
> gonna explain the details again, please bare me and help me :(
> Ok yes I used mpic++. Actually I checked mpicxx -show and the path
> were correct. let me describe my problem again.
> When I run my code (after making sure that openmpi is installed
> correctly and all the env varibles are set properly), i get the
> following error which is when I make a call to the following function:
> ----------------------------------------------
> int CommPhyMPI:: physicalGetSize() const {
> int size ;
> MPI_Comm_size(MPI_COMM_WORLD,&size);
> return size ;
> }
> -------------------------------------------
> The errors i get are the follwoing:
> =====================
> [DeepThought:31144] *** Process received signal ***
> [DeepThought:31144] Signal: Segmentation fault (11)
> [DeepThought:31144] Signal code: Address not mapped (1)
> [DeepThought:31144] Failing at address: 0xcf
> [DeepThought:31144] [ 0] /lib/tls/ [0xc16f80]
> [DeepThought:31144] [ 1] /nfs/sjafer/phd/openMPI/latest_cd+
> +_timewarp/cd++(physicalGetId__C10CommPhyMPI+0x14) [0x8305880]

This *likely* indicates that you are mixing MPI implementations.

> So I thought that maybe my problem is that when I include "mpi.h" in
> my source code, it picks the wrong one. So in my source code instead
> of just saying include "mpi.h" I put the path too, so it looks like
> => "include /opt/openmpi/1.2.7/include/mpi.h", and now when I run my
> code aftre this change, aside from errors which I will paste below,
> i get a warning that shows mpi.h in mpicxx.h is the wrong one from
> usr/local/include and not from /opt/openmpi/...
> ------------------
> In file included from /usr/local/include/mpidefs.h:49,

What is /usr/local/include/mpidefs.h? Is that part of your application?

> from /usr/local/include/mpi.h:230,

This definitely indicates that you're including the wrong file.

I don't know what the exact cause of your problem is, but it seems
like you are somehow mixing multiple mpi.h files together. This can
definitely lead to segv's at run time.

As I think I indicated before, I think your best solution is likely to
uninstall MPICH from /usr/local and install it somewhere else (e.g., /
opt/mpich). Then the compiler won't automatically pick up header
files from MPICH (it shouldn't do that anyway, but there seems to be
some confusion on your system, so who knows?).

You should probably get your local system administrator involved; they
can actually see exactly what is happening on your system, diagnose
the default compiler include paths, etc. But I'd try moving the MPICH
install first.

Jeff Squyres
Cisco Systems