Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] openmpi-1.6.4 mpicc fails to compile hello_c.c
From: Limin Gu (lgu_at_[hidden])
Date: 2013-03-07 13:16:39


Hi Jeff and Reuti, thank you for your responds.

"ldd hello_cxx" gave me some clue, and I found it was linked to some mpich
library which was installed under/usr/lib64. When I removed mpich
libraries, and recompile, everything includes mpicc and mpirun worked fine.

I didn't have that problem with eariler openmpi versions like 1.6.x and
1.5.x. I would like to keep mpich libraries on the system, is there any
confiure option I can use to make 1.6.4 library link the same as 1.6.3?

Thanks again!
Limin

On Thu, Mar 7, 2013 at 9:34 AM, Jeff Squyres (jsquyres)
<jsquyres_at_[hidden]>wrote:

> On Mar 7, 2013, at 9:31 AM, Reuti <reuti_at_[hidden]> wrote:
>
> >> [root_at_tesla examples]# echo $LD_LIBRARY_PATH
> >> /opt/scyld/openmpi/1.6.4/gnu/lib
> >> [root_at_tesla examples]# which mpicc
> >> /opt/scyld/openmpi/1.6.4/gnu/bin/mpicc
> >> [root_at_tesla examples]# mpicc -o hello_c hello_c.c
> >> /tmp/ccuZg1I9.o: In function `main':
> >> hello_c.c:(.text+0x1d): undefined reference to `ompi_mpi_comm_world'
> >> hello_c.c:(.text+0x2b): undefined reference to `ompi_mpi_comm_world'
> >
> > What is the output if you compile in addition with -v (verbose)?
>
> Also, what's the output if you use --showme? I'd like to see the
> underlying command that is being used.
>
> When you successfully compile/link hello_cxx, what does "ldd hello_cxx"
> show?
>
> --
> Jeff Squyres
> jsquyres_at_[hidden]
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>