It looks to me like a bad idea to set LD_PRELOAD in this case. As I see it, 
jemalloc can be used in two cases:

1) To transparently enhance runtime performance. In this case it is purely a 
runtime dependency (not build dependency) and LD_PRELOAD is needed when running 
the code that depends on jemalloc.
2) To use its non standard API. In this case it is a build and runtime 
dependency and LD_PRELOAD is not needed.

Case 2 is just fine. Case 1 is not really possible with EB right now (a 
dependency is always a build dependency). But besides that, I would say that 
preloading should be more a recommendation than a forced action (ie, the module 
shouldn’t affect the behaviour of every binary run). I don’t want to preload 
jemalloc to do an “ls”, for instance. From my point of view is up to the 
MariaDB installation to find a way to preload jemalloc (like creating a wrapper 
for instance).

Damian

From: <[email protected]> on behalf of Kenneth Hoste 
<[email protected]>
Reply-To: "[email protected]" <[email protected]>
Date: Wednesday 20 September 2017 at 17:57
To: "[email protected]" <[email protected]>, Joachim Hein 
<[email protected]>
Subject: Re: [easybuild] MariaDB-10.1.13-intel-2016a.eb

Hi Joachim,
On 20/09/2017 17:52, Joachim Hein wrote:

On 20 Sep 2017, at 17:45, Kenneth Hoste 
<[email protected]<mailto:[email protected]>> wrote:

Hi Joachim,

It's not entirely clear, but I *think* that Lmod itself gets broken by the 
"module load jemalloc/4.1.0" that is being done when test loading the generated 
MariaDB module.

Can you try and reproduce this outside of EasyBuild by:

    module load intel/2016a
    unset LD_LIBRARY_PATH
    module load jemalloc/4.1.0
    module list

Yep, get the issue.  We are on lmod 6.4.3.   Oh we.  We tried 7.6 recently, ran 
into issue and reverted to 6.4.3.

There are indeed some important changes to take into account for Lmod 7.

But updating to the latest 6.x should be a lot smoother...


regards,

Kenneth



Thanks
Joachim



The 'module list' will probably produce the same error "error while loading 
shared libraries: libiomp5.so ...".

The problem is that the jemalloc module sets $LD_PRELOAD to a library that 
requires libiomp5.so, but which is no longer available because EasyBuild clears 
$LD_LIBRARY_PATH every time it runs a module command (to try and avoid breaking 
Lmod, which is in this case backfiring).

Which Lmod version are you running here?

A recent version of Lmod should be robust enough not to suffer from this...
Based on https://github.com/TACC/Lmod/blob/master/README.md, Lmod 6.6 or more 
recent should suffice.


regards,

Kenneth
On 20/09/2017 17:28, Joachim Hein wrote:
Attached as requested.  Thanks for looking into this.

Best wishes
   Joachim



On 20 Sep 2017, at 14:49, Kenneth Hoste 
<[email protected]<mailto:[email protected]>> wrote:

Dear Joachim,

Can you send us the full debug log?

Are you running this installation in a clean environment (no modules loaded)?


regards,

Kenneth
On 20/09/2017 12:36, Joachim Hein wrote:
Hi,

I am trying to build MariaDB-10.1.13-intel-2016a.eb and it fails the sanity 
check in a way that I am lost on.

This is from the screen of the build:

== taking care of extensions...
== postprocessing...
== sanity checking...
== FAILED: Installation ended unsuccessfully (build directory: 
/local/easybuild/build/MariaDB/10.1.13/intel-2016a): build failed (first 300 
chars): Sanity check failed: loading fake module failed: 'Module command 
\'module load MariaDB/10.1.13\' failed with exit code 1; stderr: sh: error 
while loading shared libraries: libiomp5.so: cannot open shared object file: No 
such file or directory\nLmod has detected the following error: Failed to find \'


Looking into the logs I get:


<Screen Shot 2017-09-20 at 12.33.50.png>

There is a 
/sw/easybuild/software/Core/ifort/2016.1.150-GCC-4.9.3-2.25/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64/
 in that Library path and in there I get:

-bash-4.2$ ls 
/sw/easybuild/software/Core/ifort/2016.1.150-GCC-4.9.3-2.25/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64/libiomp5.*
/sw/easybuild/software/Core/ifort/2016.1.150-GCC-4.9.3-2.25/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64/libiomp5.a
/sw/easybuild/software/Core/ifort/2016.1.150-GCC-4.9.3-2.25/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64/libiomp5.dbg
/sw/easybuild/software/Core/ifort/2016.1.150-GCC-4.9.3-2.25/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64/libiomp5.so

the intel openmp library.  Anyone sees something I am missing?

Thanks
   Joachim








------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

Reply via email to