I wanted to note that MacOS 10.4 on *X86* has the same "WEAK" definitions in opal_config.h.
Yet it can build ompi-1.5.x with only WARNING about duplicate symbols.
I just tried, and the test code Matthias sent worked too:

$ ./bin/mpicc pmpi_test.c
/usr/bin/ld: warning multiple definitions of symbol _MPI_Finalize
/var/tmp//cc7tP6zp.o definition of _MPI_Finalize in section (__TEXT,__text)
/Users/phhargrove/OMPI/openmpi-1.5.5rc1/INST/lib/libmpi.dylib(single module) definition of _MPI_Finalize

$ ./a.out
inside MPI_Finalize() wrapper

So, I don't think (A) is an appropriate solution.
I am also wondering if there is some compiler/linker flag we could/should pass to "fix" the PPC.


Going back to the 10.4/PPC I see now that despite the warnings, a working executable WAS generated:
$ ./a.out
inside MPI_Finalize() wrapper

So, I don't think we have managed to reproduce the source of the build problem.

-Paul

On 2/15/2012 9:25 AM, Matthias Jurenz wrote:
Thanks for testing, Paul.

I think we need an additional configure test which disables VT if

a) weak symbol support is disabled/not available

- or more precise -

b) configuring on PPC/Mac10.4 and the used GNU compiler version is older or
equal to 4.0.1

I prefer to option b) because VT (i.e. PMPI) should also work without weak
symbol support (at least it does on my laptop with gcc 4.4.3 and '--disable-
weak-symbols'). On the other hand, in the most cases the compiler supports
weak symbols, so option a) would also work, unless weak symbol support is
disabled by the configure option '--disable-weak-symbols'.
Jeff, what's your opinion?

Matthias

On Wednesday 15 February 2012 10:33:30 Paul Hargrove wrote:
See responses mixed in below.

On Wed, Feb 15, 2012 at 1:02 AM, Matthias Jurenz<

matthias.jur...@tu-dresden.de>  wrote:
Unfortunately, we don't have access to a PPC system with MacOS 10.4 to
try to
reproduce the error.
Not too surprising.  I'll see what I can do to help resolve the problem.

Paul, could you please check for the definition of the macro
OPAL_HAVE_WEAK_SYMBOLS in ompi_config.h?
ompi_config.h doesn't contain that macro.
However, opal_config.h shows no weak symbol support:
#define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 0
#define OPAL_HAVE_ATTRIBUTE_WEAK_ALIAS 0
#define OPAL_HAVE_WEAK_SYMBOLS 0

I assume that the ancient GNU compiler
on PPC/MacOS10.4 does not support weak-symbols which cause the multiply
definitions.
Does that mean I should simply not expect to get VT built there?

Furthermore, could you please try to build the following code to test
whether
the PMPI interface of Open MPI works in general?

#include<stdio.h>
#include<mpi.h>

int MPI_Finalize() {

  printf( "inside MPI_Finalize() wrapper\n" );
  return PMPI_Finalize();

}

int main(int argc, char** argv) {

   MPI_Init(&argc,&argv);
   MPI_Finalize();

}
I am assuming I am supposed to build that with VT disabled in my OMPI
build.
Doing so, I see that PMPI is apparently not working:
$ ./bin/mpicc pmpi_test.c
/usr/bin/ld: warning multiple definitions of symbol _MPI_Finalize
/var/tmp//ccHZvZ3B.o definition of _MPI_Finalize in section (__TEXT,__text)
/Users/phargrov/OMPI/openmpi-1.5.5rc1/INST/lib/libmpi.dylib(single module)
definition of _MPI_Finalize

Maybe the error occurs only if this code is in a shared library which
depends
on the MPI library (as does the libvt-mpi). Therefor, run the following:

$ gcc -fPIC -shared pmpi_test.c -I<mpi-inc-dir>  -o libpmpi_test.dylib
-L<mpi-
lib-dir>  -lmpi
I assume this check might be redundant given that the previous one failed.
However, here it is anyway:
$ gcc -fPIC -shared pmpi_test.c -Iinclude -o libpmpi_test.dylib -Llib
powerpc-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
/usr/bin/ld: Undefined symbols:
_MPI_Init
_PMPI_Finalize
collect2: ld returned 1 exit status


-Paul

Thanks!

Matthias

On 12/14/2011 2:51 PM, Paul H. Hargrove wrote:
I've attempted to reproduce the failure reported below for MacOS 10.4
for PPC on an X86-64 system.
First, I've realized that while I reported "make check" as the source
of the problem, it occurs at "make".

Regardless of that mistake in my reporting, I was unable to reproduce
the problem, making this a PPC-specific problem as far as I can tell.
Instead of 255 instances of "ld: multiple definitions of symbol _MPI_*"
I get instances of "ld: warning multiple definitions of symbol _MPI*",
where the only difference is the addition of the word "warning".
However, this is apparently non-fatal on the x86-64 but fatal by
default on PPC.

-Paul

On 12/13/2011 9:30 PM, Paul H. Hargrove wrote:
Using the 1.5.5rc1 tarball, I've repeated tests on the following
platforms for which I recently reported 1.4.5rc1 results:

MacOS 10.5 (Leopard) on PPC:
powerpc-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5488)
MacOS 10.4 (Tiger) on PPC:
powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc.
build 5341)
MacOS 10.3 (Panther) on PPC:
gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1666)

On MacOS 10.5 "make all install check" completed w/o incident.

Unfortunately, on MacOS 10.4 (Tiger) I get multiply defined symbols

from VT in "make check":
Making check in vtlib
CCLD libvt-mpi.la
ld: multiple definitions of symbol _MPI_Abort
.libs/libvt_mpi_la-vt_mpiwrap.o definition of _MPI_Abort in section
(__TEXT,__text)
/Users/phargrov/openmpi-1.5.5rc1/BUILD-
dflt/ompi/contrib/vt/vt/../../../.libs/libmpi.dylib(single

module) definition of _MPI_Abort
[...253 more "ld: multiple definitions of symbol" errors...]

ld: multiple definitions of symbol _MPI_Win_wait
.libs/libvt_mpi_la-vt_mpiwrap.o definition of _MPI_Win_wait in
section (__TEXT,__text)
/Users/phargrov/openmpi-1.5.5rc1/BUILD-
dflt/ompi/contrib/vt/vt/../../../.libs/libmpi.dylib(single

module) definition of _MPI_Win_wait
/usr/bin/libtool: internal link edit command failed
make[4]: *** [libvt-mpi.la] Error 1
Unlike the compilation failure for 1.4.5rc1 on MacOS 10.3 (Panther),
I

got the following at configure time:
configure: WARNING: Open MPI does not support OS X prior to version
10.4 (Tiger)
configure: error: Cannot continue
So I would like to "CMR" this logic to the 1.4 branch.


-Paul

On 12/13/2011 8:36 PM, Jeff Squyres wrote:
In the usual place:

http://www.open-mpi.org/software/ompi/v1.5/

Please test! I would really like to get this out by the end of the
week.

Two issues *might* still be considered for this release:

Putting back the openib minor fixes
https://svn.open-mpi.org/trac/ompi/ticket/2930

Making the "your SM file is on an NFS!" warning disable-able
(this is the v1.4 ticket)
https://svn.open-mpi.org/trac/ompi/ticket/2937

They would both need to be fixed in the *immediate future* to be
considered.
--
Paul H. Hargrove                          PHHargrove_at_[hidden]
Future Technologies Group
HPC Research Department                   Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900

--
Paul H. Hargrove                          phhargr...@lbl.gov
Future Technologies Group
HPC Research Department                   Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900

Reply via email to