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: Reuti (reuti_at_[hidden])
Date: 2013-03-07 09:31:54


Am 06.03.2013 um 18:55 schrieb Limin Gu:

> I have successfully built openmpi-1.6.3 and many previous openmpi versions on both RHEL5 and RHEL6, for the new openmpi-1.6.4 I do the same configure, make and install as before, but the resulting mpicc does not compile hello_c.c.
>
> I have PATH and LD_LIBRARY_PATH set correctly.
>
> [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)?

-- Reuti

> collect2: ld returned 1 exit status
> [root_at_tesla examples]#
>
> But mpicxx does compile:
> [root_at_tesla examples]# which mpicxx
> /opt/scyld/openmpi/1.6.4/gnu/bin/mpicxx
> [root_at_tesla examples]# mpicxx -o hello_cxx hello_cxx.cc
> [root_at_tesla examples]#
>
> Any idea about what is wrong here? I have the same error on both RHEL5 and RHEL6 systems.
>
> Thank you!
>
> Limin
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users