[Pkg-openmpi-maintainers] Bug#376833: Bug#376833: Next steps
Adam C Powell IV
hazelsct at debian.org
Thu Mar 20 21:51:23 UTC 2008
On Thu, 2008-03-20 at 09:32 -0400, Adam C Powell IV wrote:
> On Thu, 2008-03-20 at 09:31 -0400, Jeff Squyres wrote:
> > On Mar 20, 2008, at 9:17 AM, Adam C Powell IV wrote:
> >
> > >> | https://svn.open-mpi.org/svn/ompi/tmp-public/libatomic-ops
> > >
> > > Trouble in paradise. I checked this out, but in the libatomic-ops
> > > directory, opal/include/opal/sys/atomic.h has:
> > >
> > > #elif OMPI_ASSEMBLY_ARCH == OMPI_LIBATOMIC_OPS
> > > #include "opal/sys/libatomic_ops/atomic.h"
> > >
> > > But it's not there. opal/include/opal/sys doesn't have the
> > > libatomic_ops directory at all. Forgot to check in a directory?
> >
> > Oops; yes, I missed the "svn add" for this from Brian's patch. It's
> > committed now:
> >
> > https://svn.open-mpi.org/trac/ompi/changeset/17892
> >
> > Sorry about that!
>
> Got it, thanks!
I'm attaching two patches: a new patch 70 (against openmpi 1.2.5) and a
quick patch against debian/ files. With these, the package builds on
amd64 using its default assembler.
However, it does not build when I force it to use libatomic-ops. I'm
building by the following procedure:
* debian/rules patch-stamp
* Remove the section of configure from line 25324 to 25588 (the
architecture "case" statement), forcing the case to go straight
to *) which uses libatomic-ops.
* debian/rules build
This procedure produces a problematic warning then an error, first the
warning (repeated frequently):
In file included from ../opal/include/opal/sys/atomic.h:124,
from ../opal/threads/mutex_unix.h:47,
from ../opal/threads/mutex.h:337,
from threads/mutex.c:21:
../opal/include/opal/sys/libatomic_ops/atomic.h: In function ‘opal_atomic_cmpset_acq_64’:
../opal/include/opal/sys/libatomic_ops/atomic.h:140: warning: pointer targets in passing argument 1 of ‘AO_compare_and_swap_full’ differ in signedness
../opal/include/opal/sys/libatomic_ops/atomic.h: In function ‘opal_atomic_cmpset_rel_64’:
../opal/include/opal/sys/libatomic_ops/atomic.h:146: warning: pointer targets in passing argument 1 of ‘AO_compare_and_swap_full’ differ in signedness
../opal/include/opal/sys/libatomic_ops/atomic.h: In function ‘opal_atomic_cmpset_64’:
../opal/include/opal/sys/libatomic_ops/atomic.h:152: warning: pointer targets in passing argument 1 of ‘AO_compare_and_swap_full’ differ in signedness
../opal/include/opal/sys/libatomic_ops/atomic.h: In function ‘opal_atomic_add_32’:
../opal/include/opal/sys/libatomic_ops/atomic.h:161: warning: pointer targets in passing argument 1 of ‘AO_int_fetch_and_add_full’ differ in signedness
../opal/include/opal/sys/libatomic_ops/atomic.h: In function ‘opal_atomic_sub_32’:
../opal/include/opal/sys/libatomic_ops/atomic.h:167: warning: pointer targets in passing argument 1 of ‘AO_int_fetch_and_add_full’ differ in signedness
../opal/include/opal/sys/libatomic_ops/atomic.h: In function ‘opal_atomic_add_64’:
../opal/include/opal/sys/libatomic_ops/atomic.h:176: warning: pointer targets in passing argument 1 of ‘AO_fetch_and_add_full’ differ in signedness
../opal/include/opal/sys/libatomic_ops/atomic.h: In function ‘opal_atomic_sub_64’:
../opal/include/opal/sys/libatomic_ops/atomic.h:182: warning: pointer targets in passing argument 1 of ‘AO_fetch_and_add_full’ differ in signedness
In file included from ../opal/include/opal/sys/atomic.h:528,
from ../opal/threads/mutex_unix.h:47,
from ../opal/threads/mutex.h:337,
from threads/mutex.c:21:
../opal/include/opal/sys/atomic_impl.h: In function ‘opal_atomic_trylock’:
../opal/include/opal/sys/atomic_impl.h:346: warning: implicit declaration of function ‘opal_atomic_cmpset_acq_32’
I don't know how severe the signedness issues will be, but am not too
concerned. The biggest problem is that AO_HAVE_int_compare_and_swap is
not defined (except on ia64 and 32-bit systems), so there is no 32-bit
compare-and-swap operation in libatomic-ops.
The error is related:
libtool: link: gcc -DNDEBUG -Wall -g -O2 -finline-functions -fno-strict-aliasing -pthread -o .libs/opal_wrapper opal_wrapper.o -Wl,--export-dynamic ../../../opal/.libs/libopen-pal.so -ldl -lnsl -lutil -lm -pthread -Wl,-rpath -Wl,/usr/lib/openmpi/lib
../../../opal/.libs/libopen-pal.so: undefined reference to `opal_atomic_cmpset_acq_32'
collect2: ld returned 1 exit status
make[3]: *** [opal_wrapper] Error 1
make[3]: Leaving directory `/home/hazelsct/openmpi-1.2.5/opal/tools/wrappers'
So the 32-bit compare-and-swap is necessary for this to function. And
there's no automatic method to do it on 64-bit arches in libatomic-ops,
unlike 32-bit arches which have AO_compare_double_and_swap_double* for
64 bits.
I went ahead and filed wishlist bug 471886 against libatomic-ops-dev for
this purpose. Can someone test this on a 32-bit arch? (I don't have a
32-bit system on my 64-bit machine.)
Regards,
-Adam
--
GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6
Engineering consulting with open source tools
http://www.opennovation.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libatomic_ops.patch
Type: text/x-patch
Size: 1523 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-openmpi-maintainers/attachments/20080320/e01cc67f/attachment-0002.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 70support_libatomic_ops.dpatch
Type: application/x-shellscript
Size: 37939 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-openmpi-maintainers/attachments/20080320/e01cc67f/attachment-0003.bin
More information about the Pkg-openmpi-maintainers
mailing list