libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fortran libraries on the Blue Gene with mpi


From: John R. Cary
Subject: Re: Fortran libraries on the Blue Gene with mpi
Date: Thu, 16 Apr 2009 15:13:54 -0600
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Hi Ralf,

Ralf Wildenhues wrote:
Hello John,


OK.  That's fairly easy to support in Libtool then: the only thing we
need to get right is to turn off shared library support completely for
BG/L.

I gave the wrong impression.  This is a BG/P.  My previous reference to the
compilers was because the BG/L compilers (I thought) are the same.

Can we assume bg* produces code for the compute nodes only?  Let's turn
the question around: how can we reliably detect that code is being
compiled for the compute nodes?

I don't know for sure, but the experiments at the end of this indicate that
bg compiled code works on the login nodes.
What do
  path/to/config.guess
login5.intrepid$ ./config.guess
./config.guess: unable to guess system type

This script, last modified 2009-02-03, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <address@hidden> in order to provide the needed
information to handle your system.

config.guess timestamp = 2009-02-03

uname -m = 4400
uname -r = 4.0
uname -s = iainfo2
uname -v = 3.0

/usr/bin/uname -p =
/bin/uname -X     =

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       =
/bin/arch              = ppc64
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = 4400
UNAME_RELEASE = 4.0
UNAME_SYSTEM  = iainfo2
UNAME_VERSION = 3.0

and
  CC=/opt/ibmcmp/xlc/bg/9.0/bin/bgcc path/to/config.guess
login5.intrepid$ CC=/opt/ibmcmp/vac/bg/9.0/bin/bgcc config.guess
././config.guess: unable to guess system type

This script, last modified 2009-02-03, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run (././config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <address@hidden> in order to provide the needed
information to handle your system.

config.guess timestamp = 2009-02-03

uname -m = 4400
uname -r = 4.0
uname -s = iainfo2
uname -v = 3.0

/usr/bin/uname -p =
/bin/uname -X     =

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       =
/bin/arch              = ppc64
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = 4400
UNAME_RELEASE = 4.0
UNAME_SYSTEM  = iainfo2
UNAME_VERSION = 3.0


output for the system triplets?  Please download the latest config.guess
and config.sub files from <http://savannah.gnu.org/projects/config> for
this test, and adjust CC so that it points to a C compiler (or MPI
wrapper compiler like mpixlc) defaulting to code for the compute nodes.



-dy instead of -dynamic (gcc)
-G instead of -qmkshrobj (xlc)
-qnostaticlink is for xlc/xlC, -Wl,-dy is for xlf*

It documents LD_LIBRARY_PATH as suitable for shlibpath_var.
No mention of hardcoding facilities.

I am unsure whether -dy/-dynamic/-qnostaticlink is the default mode of
operation.  Can you find this out for me, for both compiler suites?
(Create a shared library without an accompanying static one, link a
program with it and find out whether you need to pass the flag).
Untested:
  echo 'int foo () { return 0; }' > foo.c
  xlc -qpic -c foo.c
  xlc -qmkshrobj -o libfoo.so foo.o
  echo 'extern int foo (); int main () { return foo (); }' > main.c
  xlc -c main.c
  xlc -o main main.o -L. -lfoo  # without/with -qnostaticlink
Both link, neither runs

login5.intrepid$ xlc -o main main.o -L. -lfoo  # without/with -qnostaticlink
login5.intrepid$ ./main
./main: error while loading shared libraries: libfoo.so: cannot open shared object file: No such file or directory
login5.intrepid$ xlc -o main main.o -L. -lfoo  -qnostaticlink
login5.intrepid$ ./main
./main: error while loading shared libraries: libfoo.so: cannot open shared object file: No such file or directory

But with -R they do

login5.intrepid$ xlc -o main main.o -L. -lfoo  -R.
login5.intrepid$ ./main

Neither of these documents provide any indication as to hardcoding or
run paths into libraries or programs.  Can you find out whether the
runtime linker and the link editor have any kind of run path support?
You might need to look into the man pages for ld and ld.so (or whatever
its name is on this system) and search for "run path", "rpath",
"DT_RPATH", "-R", or similar names.

But I am doing all this for the xlc compilers, as in your example. For the bg
compilers, it seems that the -qnostaticlink flag is necessary even to link,
and -R to run.

login5.intrepid$ bgxlc -qpic -c foo.c
login5.intrepid$ bgxlc -qmkshrobj -o libfoo.so foo.o
login5.intrepid$ bgxlc -c main.c
login5.intrepid$ bgxlc -o main main.o -L. -lfoo
/bgsys/drivers/ppcfloor/gnu-linux/powerpc-bgp-linux/bin/ld: cannot find -lfoo
login5.intrepid$ bgxlc -o main main.o -L. -lfoo -qnostaticlink
login5.intrepid$ ./main
./main: error while loading shared libraries: libfoo.so: cannot open shared object file: No such file or directory
login5.intrepid$ bgxlc -o main main.o -L. -lfoo -qnostaticlink -R.
login5.intrepid$ ./main

rpath also works:

login5.intrepid$ bgxlc -o main main.o -L. -lfoo -qnostaticlink -Wl,-rpath,.
login5.intrepid$ ./main
login5.intrepid$

John










reply via email to

[Prev in Thread] Current Thread [Next in Thread]