Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] openmpi-1.6.4 mpicc fails to compile hello_c.c
From: Limin Gu (lgu_at_[hidden])
Date: 2013-03-06 12:55:05


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

I have PATH and LD_LIBRARY_PATH set correctly.

[root_at_tesla examples]# echo $LD_LIBRARY_PATH
[root_at_tesla examples]# which 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'
collect2: ld returned 1 exit status
[root_at_tesla examples]#

But mpicxx does compile:
[root_at_tesla examples]# which mpicxx
[root_at_tesla examples]# mpicxx -o hello_cxx
[root_at_tesla examples]#

Any idea about what is wrong here? I have the same error on both RHEL5 and
RHEL6 systems.

Thank you!