Unfortunately, as the bug at Sun's web site points out, their compiler is
borked. There's not a lot we can do about that fact, without causing a
whole host of other problems.
If you aren't using C++, I'd recommend compiling Open MPI with GCC and
then reseting the wrapper compilers to invoke the Sun C compiler for
applications. The two compilers are link-time compatible, so this won't
cause any problems and you're unlikely to see any performance difference
depending on which compiler you use to compile Open MPI (applications are,
of course, a different story). Have a look at the following FAQ entry for
a quick how-to.
On Fri, 3 Apr 2009, Segovia, Andrea wrote:
> I am trying to compile OpenMPI on a Red Hat Enterprise Linux 5 platform
> with the Sun Studio 12 compiler suite. (I currently have the Red
> Hat-bundled OpenMPI w/GNU compilers running).
> I have already encountered and addressed the problem of the C++ compiler
> not working in 64 bit mode with the Red Hat-bundled GNU ld by not
> including sunCC in the OpenMPI compilation, since we do not need C++
> However, I have encountered another problem when attempting to compile
> (at the "make all" stage):
> asm/.libs/libasm.a(atomic-asm.o): In function `opal_atomic_mb':
> (.text+0x0): multiple definition of `opal_atomic_mb'
> asm/.libs/libasm.a(asm.o):asm.c:(.text+0x0): first defined here
> asm/.libs/libasm.a(atomic-asm.o): In function `opal_atomic_rmb':
> (.text+0x6): multiple definition of `opal_atomic_rmb'
> asm/.libs/libasm.a(asm.o):asm.c:(.text+0x10): first defined here
> ..(small excerpt)
> Sun has published bug information about a similar error here:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6567405 but I don't
> know if it applies. Besides, their suggested fix is to change the source
> code, something I would be extremely reluctant to do.
> The OpenMPI users mailing list has at one reference to this problem here:
> http://www.open-mpi.org/community/lists/users/2008/10/6908.php but I have
> not been able to find a solution.
> I am enclosing a gzipped tar file with the configure output, config.log
> and make output as suggested.
> I am using the following options to configure (based on the
> recommendations on the OpenMPI FAQ here:
> http://www.open-mpi.org/faq/?category=building#build-sun-compilers )This
> section references the errors found above but does not provide a
> $ ./configure CC=suncc F77=sunf77 FC=sunf90
> --prefix=/export/home/segovia/RunTime_Environ/ --enable-heterogeneous
> --enable-shared--enable-orterun-prefix-by-default --enable-mpi-f90
> --with-mpi-f90-size=small --disable-mpi-threads
> --disable-progress-threads --disable-debug --with-openib --without-udapl
> Has anyone been successful with this build? What options/workarounds were
> necessary to compile?
> Any help or information would be greatly appreciated.
> Andrea Segovia
> IM&TS, Data Centre Services, East / GIST, Services du Centre de
> traitement des données de l' est
> Fisheries and Oceans Canada | Pêches et Océans Canada