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: Shafagh Jafer (barfy27_at_[hidden])
Date: 2008-09-22 14:12:38


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/libpthread.so.0 [0xc16f80]
[DeepThought:31144] [ 1] /nfs/sjafer/phd/openMPI/latest_cd++_timewarp/cd++(physicalGetId__C10CommPhyMPI+0x14) [0x8305880]
[DeepThought:31144] [ 2] /nfs/sjafer/phd/openMPI/latest_cd++_timewarp/cd++(physicalCommGetId__Fv+0x43) [0x82ff81b]
[DeepThought:31144] [ 3] /nfs/sjafer/phd/openMPI/latest_cd++_timewarp/cd++(openComm__16StandAloneLoader+0x1f) [0x80fdf43]
[DeepThought:31144] [ 4] /nfs/sjafer/phd/openMPI/latest_cd++_timewarp/cd++(run__21ParallelMainSimulator+0x1640) [0x81ea53c]
[DeepThought:31144] [ 5] /nfs/sjafer/phd/openMPI/latest_cd++_timewarp/cd++(main+0xde) [0x80a58ce]
[DeepThought:31144] [ 6] /lib/tls/libc.so.6(__libc_start_main+0xda) [0x1c979a]
[DeepThought:31144] [ 7] /nfs/sjafer/phd/openMPI/latest_cd++_timewarp/cd++(sinh+0x4d) [0x80a2221]
[DeepThought:31144] *** End of error message ***
mpirun noticed that job rank 0 with PID 31144 on node DeepThought.sce.carleton.ca exited on signal 11 (Segmentation fault).
=====================
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,
from /usr/local/include/mpi.h:230,
from /opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:32,
from /opt/openmpi/1.2.7/include/mpi.h:1795,
from CommPhyMPI.cc:36:
/usr/local/include/mpio.h:79: warning: `MPI_FILE_NULL' redefined
/opt/openmpi/1.2.7/include/mpi.h:456: warning: this is the location of the previous definition
In file included from /opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:32,
from /opt/openmpi/1.2.7/include/mpi.h:1795,
from CommPhyMPI.cc:36:
/usr/local/include/mpi.h:263: warning: `MPI_STATUS_IGNORE' redefined
/opt/openmpi/1.2.7/include/mpi.h:458: warning: this is the location of the previous definition
/usr/local/include/mpi.h:264: warning: `MPI_STATUSES_IGNORE' redefined
/opt/openmpi/1.2.7/include/mpi.h:459: warning: this is the location of the previous definition
------------------
 
here are the errors:
============================
In file included from /opt/openmpi/1.2.7/include/mpi.h:1795,
from CommPhyMPI.cc:36:
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:167: openmpi/ompi/mpi/cxx/constants.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:168: openmpi/ompi/mpi/cxx/functions.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:169: openmpi/ompi/mpi/cxx/datatype.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:193: openmpi/ompi/mpi/cxx/exception.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:194: openmpi/ompi/mpi/cxx/op.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:195: openmpi/ompi/mpi/cxx/status.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:196: openmpi/ompi/mpi/cxx/request.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:197: openmpi/ompi/mpi/cxx/group.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:198: openmpi/ompi/mpi/cxx/comm.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:199: openmpi/ompi/mpi/cxx/win.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:200: openmpi/ompi/mpi/cxx/file.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:201: openmpi/ompi/mpi/cxx/errhandler.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:202: openmpi/ompi/mpi/cxx/intracomm.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:203: openmpi/ompi/mpi/cxx/topology.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:204: openmpi/ompi/mpi/cxx/intercomm.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:205: openmpi/ompi/mpi/cxx/info.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:244: openmpi/ompi/mpi/cxx/datatype_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:245: openmpi/ompi/mpi/cxx/functions_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:246: openmpi/ompi/mpi/cxx/request_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:247: openmpi/ompi/mpi/cxx/comm_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:248: openmpi/ompi/mpi/cxx/intracomm_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:249: openmpi/ompi/mpi/cxx/topology_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:250: openmpi/ompi/mpi/cxx/intercomm_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:251: openmpi/ompi/mpi/cxx/group_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:252: openmpi/ompi/mpi/cxx/op_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:253: openmpi/ompi/mpi/cxx/errhandler_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:254: openmpi/ompi/mpi/cxx/status_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:255: openmpi/ompi/mpi/cxx/info_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:256: openmpi/ompi/mpi/cxx/win_inln.h: No such file or directory
/opt/openmpi/1.2.7/include/openmpi/ompi/mpi/cxx/mpicxx.h:257: openmpi/ompi/mpi/cxx/file_inln.h: No such file or directory
make[1]: *** [/nfs/sjafer/phd/openMPI/latest_cd++_timewarp/warped/TimeWarp/src/obj/CommPhyMPI.o] Error 1
=============================

--- 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, 10:33 AM

On Sep 22, 2008, at 1:24 PM, Shafagh Jafer wrote:

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

mpic++. I was showing you the -E functionality so that you could
determine whether it really is picking up the wrong mpi.h or not.

>
> --- 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
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

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