static mkl compiling options

Problems with Dalton installation? Find answers or ask for help here
Post Reply
User avatar
jmelo
Posts: 64
Joined: 27 Aug 2013, 16:59
First name(s): Juan
Middle name(s): Ignacio
Last name(s): Melo
Affiliation: Dpto. Fisica Fac. Ciencias Exactas y Naturales, Univ. Bs As. And IFIBA- CONICET
Country: Argentina
Location: Facultad de Ciencas Exactas y Naturales, Universidad de Buenos Aires, Argentina
Contact:

static mkl compiling options

Post by jmelo » 21 Jul 2015, 18:27

Hola to all

I am suffering a ' user experience' on a cluster where i am not the admin. Aiming to install and run LSdalton.
LS/Dalton builds and run test perfectly on central node, but does not run on any node in this cluster.
Reason, mkl is not installed on compute nodes.

The answer i got from sysadmin is ' compile statically mkl libs '
So,
Is it there any way to link statically mkl libs ?
any sort of ./setup --please-link-static-mkl ??

thanks in advance !.


juan melo

bast
Posts: 1210
Joined: 26 Aug 2013, 13:22
First name(s): Radovan
Last name(s): Bast
Affiliation: none
Country: Germany

Re: static mkl compiling options

Post by bast » 21 Jul 2015, 19:04

dear Juan,
i think that should be possible with some minor hacking.
i will look at it ASAP and write you about my findings.
best greetings,
radovan

taylor
Posts: 600
Joined: 15 Oct 2013, 05:37
First name(s): Peter
Middle name(s): Robert
Last name(s): Taylor
Affiliation: Tianjin University
Country: China

Re: static mkl compiling options

Post by taylor » 21 Jul 2015, 19:57

I used to compile (admittedly earlier versions) as static binaries for some reason: not sure what compiler you're using but there should be some sort of option through the -Wl (that is, command options to be passed to the link step) like -Wl"B=static" or something similar to that --- this may be old-school terminology and you should look at more recent documentation but I simply used to modify the final linking line in the Makefile to do this.

Whether this should be a made a more general option to the setup step is an open question, I think. It certainly allows more portability of a binary, since it should basically run anywhere that has the underlying (say, x86_64) hardware support. But in your case (Juan) it seems to me that even if you're "just a user" the system you are using is configured very oddly. Surely it means that no-one who has built a code on the front end is able to run that code on the compute nodes (unless they do indeed build a static binary)? A very old-fashioned, and in terms of storage a very inefficient state of affairs! Not to say potentially in violation of licensing terms and conditions, since a truly complete static binary compiled and linked in this way could be run anywhere, even if that site does not have and/or (say for export control reasons) is not entitled to a licence for the software stack used to build it.

Best regards
Pete

bast
Posts: 1210
Joined: 26 Aug 2013, 13:22
First name(s): Radovan
Last name(s): Bast
Affiliation: none
Country: Germany

Re: static mkl compiling options

Post by bast » 21 Jul 2015, 20:04

good suggestion to edit the link line directly.
this is a good workaround until we have a better solution.

so one thing you can always do is this:

Code: Select all

cd build
cat CMakeFiles/dalton.x.dir/link.txt   # inspect link line
vi CMakeFiles/dalton.x.dir/link.txt    # edit it
`cat CMakeFiles/dalton.x.dir/link.txt` # manually link bypassing cmake

bast
Posts: 1210
Joined: 26 Aug 2013, 13:22
First name(s): Radovan
Last name(s): Bast
Affiliation: none
Country: Germany

Re: static mkl compiling options

Post by bast » 01 Aug 2015, 12:51

dear Juan, please try whether manually specifying the link line
worked for you. alternatively use --explicit-libs.
if this solves the problem we can also look how to do it nicer within
the cmake code.
radovan

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests