Opened 5 years ago

Last modified 5 years ago

#1640 new bug

Does not link libopa on Renesas SH4 and Sparc

Reported by: iwamatsu@… Owned by:
Priority: major Milestone: future
Component: mpich Keywords:
Cc:

Description (last modified by balaji)

Sorry, this is the problem which has occurred by Debian.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666140
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660259

Renesas SH4 and Sparc can not build mpich2 package on Debian.
These architechture does not support native OPA, but these work with
emulation OPA.
This problem is caused by the fact that libopa is not linked when
libmpich is created.
We can confirm this from build log.

make[2]: Entering directory
`/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1'
(cd lib && /build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/util/createshlib
--mode=link  -version-info "3:2" -o libmpich.la  -rpath /usr/lib -L.
-ldflags " -Wl,-z,defs" -lrt -lpthread   -lmpl)
.tmp/ch3_isend.o: In function `OPA_load_ptr':
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:75:
undefined reference to `OPA_emulation_lock'
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:75:
undefined reference to `OPA_emulation_lock'
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:75:
undefined reference to `OPA_emulation_lock'
.tmp/ch3_isend.o: In function `OPA_store_ptr':
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:83:
undefined reference to `OPA_emulation_lock'
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:83:
undefined reference to `OPA_emulation_lock'
.tmp/ch3_isend.o:/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:83:
more undefined references to `OPA_emulation_lock' follow
.tmp/mpid_nem_alloc.o: In function `MPIDI_CH3I_Seg_commit':
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_alloc.c:306:
undefined reference to `OPA_Interprocess_lock_init'
.tmp/mpid_nem_alloc.o: In function `check_alloc':
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_alloc.c:496:
undefined reference to `OPA_emulation_lock'
.tmp/mpid_nem_alloc.o: In function `OPA_store_int':
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:67:
undefined reference to `OPA_emulation_lock'
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:67:
undefined reference to `OPA_emulation_lock'
.tmp/mpid_nem_alloc.o: In function `OPA_load_int':
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:59:
undefined reference to `OPA_emulation_lock'
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:59:
undefined reference to `OPA_emulation_lock'
.tmp/mpid_nem_alloc.o:/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:59:
more undefined references to `OPA_emulation_lock' follow
.tmp/mpid_nem_alloc.o: In function `MPIDI_CH3I_Seg_commit':
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_alloc.c:374:
undefined reference to `OPA_Interprocess_lock_init'
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_alloc.c:345:
undefined reference to `OPA_Interprocess_lock_init'
.tmp/mpid_nem_alloc.o: In function `OPA_store_int':
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:67:
undefined reference to `OPA_emulation_lock'
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:67:
undefined reference to `OPA_emulation_lock'
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:67:
undefined reference to `OPA_emulation_lock'
.tmp/mpid_nem_barrier.o: In function `OPA_store_int':
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:67:
undefined reference to `OPA_emulation_lock'
/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:67:
undefined reference to `OPA_emulation_lock'
.tmp/mpid_nem_barrier.o:/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1/src/openpa/src/primitives/opa_by_lock.h:67:
more undefined references to `OPA_emulation_lock' follow
collect2: ld returned 1 exit status
if [ -n "" -a \
		"mpich" != "pmpich" ] ; then \
	(cd lib && /build/buildd-mpich2_1.4debian-sparc@lists.debian.org>
.1-4-sparc-yHCiJa/mpich2-1.4.1/src/util/createshlib --mode=link
-version-info "3:2" -o libpmpich.la  -rpath /usr/lib -ldflags
"-Wl,-z,defs");\
	fi
make[2]: Leaving directory
`/build/buildd-mpich2_1.4.1-4-sparc-yHCiJa/mpich2-1.4.1'
make lib/libfmpich.s

When we added libopa (-lopa) to linker, The creating of the library succeeds.

cd lib/
../src/util/createshlib --mode=link  -version-info "3:2" -o
libmpich.la  -rpath /usr/lib -L.   -ldflags " -Wl,-z,defs" -lrt
-lpthread  -lopa -lmp

I attached config.log of mpich2 and opa.

Best regards,

Nobuhiro

Attachments (2)

config.log (424.2 KB) - added by iwamatsu@… 5 years ago.
config log
config.log.openpa (52.3 KB) - added by iwamatsu@… 5 years ago.
config log of openpa

Download all attachments as: .zip

Change History (9)

Changed 5 years ago by iwamatsu@…

config log

Changed 5 years ago by iwamatsu@…

config log of openpa

comment:1 Changed 5 years ago by goodell

  • Description modified (diff)

(reformat for trac)

comment:2 Changed 5 years ago by goodell

This is actually somewhat tricky to fix in a nice way. My first instinct was to just add -lopa to the LIBS inside the configure script. This would work fine for a system-installed copy of OPA, but won't work when we are building the "embedded" copy that is shipped with MPICH2. The configure script will try to do a bunch of linking tests and won't be able to find the yet-to-be-built libopa, so those tests will fail.

Having the user add -lopa to LIBS manually is probably the best solution for the moment, unfortunately.

comment:3 Changed 5 years ago by goodell

Sorry, that suggestion (for the user to add -lopa) is of course nonsense, since otherwise this would work internally. I'm not sure even what the best temporary workaround is right now...

comment:4 Changed 5 years ago by goodell

One option for something like Debian is to package OPA separately and then pass --with-openpa=system to the mpich2 configure. This will use the system-installed OPA instead of the "embedded" copy, which is a cleaner model for this stuff in general.

comment:5 Changed 5 years ago by balaji

  • Milestone set to mpich2-1.5
  • Owner set to goodell
  • Status changed from new to assigned

comment:6 Changed 5 years ago by balaji

  • Milestone changed from mpich2-1.5 to future

comment:7 Changed 5 years ago by balaji

  • Description modified (diff)
  • Owner goodell deleted
  • Status changed from assigned to new
Note: See TracTickets for help on using tickets.