Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] conflict among differenv MPIs
From: Shafagh Jafer (barfy27_at_[hidden])
Date: 2008-09-22 13:24:42


I am confused now...should I use "/openmpi/mpic++ -E"  or "/openmpi/mpic++" to compile my entire code??

--- On Mon, 9/22/08, Jeff Squyres <jsquyres_at_[hidden]> wrote:

From: Jeff Squyres <jsquyres_at_[hidden]>
Subject: Re: [OMPI users] conflict among differenv MPIs
To: "Open MPI Users" <users_at_[hidden]>
Date: Monday, September 22, 2008, 6:12 AM

On Sep 22, 2008, at 8:48 AM, Robert Kubrick wrote:

> Recompile your own version of openmpi in a local directory, set your
> PATH to your local openmpi install.
>
> export PATH=/my/openmpi/install/include:/usr/local/include
>
> mpicxx -show

mpicxx --showme should show you the exact command that Open MPI's
wrapper compiler is using to compile your application. There should
already be an explicit -I there for where OMPI's mpi.h resides. If
that's the case, the compiler should look there *first* for mpi.h,
not /usr/local/include. Consider following example:

- I created include-test.c which just does an "#include
<stdio.h>".
- If I run this through the preprocessor, you can see that it's
getting /usr/include/stdio.h:

[6:09] svbu-mpi:~/tmp % cat include-test.c
#include <stdio.h>
[6:09] svbu-mpi:~/tmp % gcc -E include-test.c | head
# 1 "include-test.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "include-test.c"
# 1 "/usr/include/stdio.h" 1 3 4
# 28 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/features.h" 1 3 4
# 319 "/usr/include/features.h" 3 4
# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 320 "/usr/include/features.h" 2 3 4

- But now I make my-include-dir/stdio.h with a single line in it
- Then I recompile with an explicit -I for that directory and you can
see that the compiler picks up that stdio.h, not /usr/include/stdio.h

[6:09] svbu-mpi:~/tmp % cat my-include-dir/stdio.h
typedef int foo;
[6:09] svbu-mpi:~/tmp % gcc -E -Imy-include-dir include-test.c | head
# 1 "include-test.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "include-test.c"
# 1 "my-include-dir/stdio.h" 1
typedef int foo;
# 2 "include-test.c" 2
[6:10] svbu-mpi:~/tmp %

Are you sure that OMPI's mpicxx.h is picking up MPICH's mpi.h? If so,

how? Did you run it through the preprocessor (perhaps similar to
above), or step through a debugger or something?

-- 
Jeff Squyres
Cisco Systems
_______________________________________________
users mailing list
users_at_[hidden]
http://www.open-mpi.org/mailman/listinfo.cgi/users