Closed amontoison closed 4 years ago
Ça pourrait être parce que la librairie ne se trouve pas dans deps/usr/lib
?!
J'ai ajouté les chemins au .bash_profile
pour aider un peu :
# NOMAD
export PATH="${PATH}:/home/almonf/.julia/dev/NOMAD/deps/nomad.3.9.1/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/home/almonf/.julia/dev/NOMAD/deps/nomad.3.9.1/lib"
Et j'ai la même erreur malheureusement, il n'arrive pas à trouver la librairie.
Il faut peut-être encourager Julia avec
using Libdl
push!(Libdl.DL_LOAD_PATH, "/home/almonf/.julia/dev/NOMAD/deps/nomad.3.9.1/lib")
J'ai modifié les chemins pour prendre exactement les même que ceux de l'installation automatique de Pierrick :
# NOMAD
export PATH="${PATH}:/home/almonf/.julia/dev/NOMAD/deps/nomad.3.9.1/builds/release/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/home/almonf/.julia/dev/NOMAD/deps/nomad.3.9.1/builds/release/lib"
et en plus j'ai assisté Julia en ajoutant directement le chemin de la librairie de NOMAD
using Libdl
push!(Libdl.DL_LOAD_PATH, "/home/almonf/.julia/dev/NOMAD/deps/nomad.3.9.1/builds/release/lib")
Et ça ne fonctionne toujours pas.
L'erreur vient directement de ce bout de code :
try
Libdl.dlopen(path_to_nomad * "/lib/libnomad.so", Libdl.RTLD_GLOBAL)
catch
error("NOMAD.jl error : initialization failed, cannot access NOMAD libraries, first need to build them")
end
Si tu enlèves le catch
, est-ce qu'un message d'erreur utile apparaît ? Tu peux aussi examiner ldd lib/libnomad.so
. Une librairie est peut-être manquante.
I found the guilty!
[almonf@frontal22 lib]$ ldd libnomad.so
linux-vdso.so.1 (0x00007ffc889ef000)
libsgtelib.so => /home/almonf/.julia/packages/NOMAD/EPMSG/deps/nomad.3.9.1/lib/./libsgtelib.so (0x00007fdd5ea87000)
libstdc++.so.6 => /home/almonf/.linuxbrew/lib/libstdc++.so.6 (0x00007fdd5e6c9000)
libm.so.6 => /home/almonf/.linuxbrew/lib/libm.so.6 (0x00007fdd5e5cb000)
libgcc_s.so.1 => /home/almonf/.linuxbrew/lib/libgcc_s.so.1 (0x00007fdd5e3b4000)
libc.so.6 => /home/almonf/.linuxbrew/lib/libc.so.6 (0x00007fdd5e216000)
libdl.so.2 => /home/almonf/.linuxbrew/lib/libdl.so.2 (0x00007fdd5e211000)
/home/almonf/.linuxbrew/Cellar/glibc/2.23/lib64/ld-linux-x86-64.so.2 (0x00007fdd5ece4000)
[almonf@frontal22 lib]$ ldd libsgtelib.so
linux-vdso.so.1 (0x00007ffe465e8000)
libdl.so.2 => /home/almonf/.linuxbrew/lib/libdl.so.2 (0x00007f0d0a806000)
libstdc++.so.6 => /home/almonf/.linuxbrew/lib/libstdc++.so.6 (0x00007f0d0a449000)
libm.so.6 => /home/almonf/.linuxbrew/lib/libm.so.6 (0x00007f0d0a34a000)
libc.so.6 => /home/almonf/.linuxbrew/lib/libc.so.6 (0x00007f0d0a1ad000)
libgcc_s.so.1 => /home/almonf/.linuxbrew/lib/libgcc_s.so.1 (0x00007f0d09f96000)
/home/almonf/.linuxbrew/Cellar/glibc/2.23/lib64/ld-linux-x86-64.so.2 (0x00007f0d0a893000)
using Libdl
path_to_libnomad = "/home/almonf/.julia/packages/NOMAD/EPMSG/deps/nomad.3.9.1/lib/libnomad.so"
Libdl.dlopen(path_to_libnomad, Libdl.RTLD_GLOBAL)
ERROR: could not load library "/home/almonf/.julia/packages/NOMAD/EPMSG/deps/nomad.3.9.1/lib/libnomad.so"
/lib64/libm.so.6: version `GLIBC_2.23' not found (required by /home/almonf/.julia/packages/NOMAD/EPMSG/deps/nomad.3.9.1/lib/libsgtelib.so)
gcc -v
gcc version 5.5.0 (Homebrew gcc 5.5.0_4)
gcc was too old... I install the gcc version 7.4.0 (I have the same one with my ubuntu).
brew uninstall gcc
brew install gcc@7
(v1.1) pkg> build -v NOMAD
(v1.1) pkg> test NOMAD
Testing NOMAD
Status `/tmp/tmp0Ff7Wk/Manifest.toml`
[b99e7846] BinaryProvider v0.5.4
[a0b5b9ef] Cxx v0.3.0
[d227bf30] NOMAD v0.1.0 #master (https://github.com/amontoison/NOMAD.jl.git)
[2a0f44e3] Base64 [`@stdlib/Base64`]
[8ba89e20] Distributed [`@stdlib/Distributed`]
[b77e0a4c] InteractiveUtils [`@stdlib/InteractiveUtils`]
[8f399da3] Libdl [`@stdlib/Libdl`]
[56ddb016] Logging [`@stdlib/Logging`]
[d6f4376e] Markdown [`@stdlib/Markdown`]
[3fa0cd96] REPL [`@stdlib/REPL`]
[9a3f8284] Random [`@stdlib/Random`]
[ea8e919c] SHA [`@stdlib/SHA`]
[9e88b42a] Serialization [`@stdlib/Serialization`]
[6462fe0b] Sockets [`@stdlib/Sockets`]
[8dfed614] Test [`@stdlib/Test`]
/home/almonf/.julia/packages/NOMAD/EPMSG/src
/home/almonf/.julia/packages/NOMAD/EPMSG
[ Info: loading NOMAD libraries
MADS run {
BBE ( SOL ) OBJ
1 ( 5.0000000000 5.0000000000 ) 164.0000000000
2 ( 4.0000000000 6.0000000000 ) 162.0000000000
6 ( 1.0000000000 5.0000000000 ) 20.0000000000
8 ( 0.0000000000 4.0000000000 ) 2.0000000000
10 ( 1.0000000000 3.0000000000 ) 0.0000000000
100 ( 1.0000000000 3.0000000000 ) 0.0000000000
} end of run (max number of blackbox evaluations)
blackbox evaluations : 100
best feasible solution : ( 1 3 ) h=0 f=0
MADS run {
BBE ( SOL ) OBJ
1 ( 5.0000000000 5.0000000000 ) 164.0000000000
2 ( 4.0000000000 4.0000000000 ) 74.0000000000
4 ( 2.0000000000 2.0000000000 ) 2.0000000000
17 ( 2.0000000000 2.2000000000 ) 1.8000000000
100 ( 2.0000000000 2.2000000000 ) 1.8000000000
} end of run (max number of blackbox evaluations)
blackbox evaluations : 100
best feasible solution : ( 2 2.2 ) h=0 f=1.8
MADS run {
BBE ( SOL ) OBJ
1 ( 9.0000000000 9.0000000000 ) 938.5861000000
2 ( 8.0000000000 8.0000000000 ) 690.8677000000
3 ( 5.0000000000 5.0000000000 ) 175.4245000000
4 ( 1.0000000000 1.0000000000 ) 19.4949000000
9 ( 3.0000000000 1.0000000000 ) 7.6501000000
15 ( 1.0000000000 2.0000000000 ) 4.3133000000
16 ( 2.0000000000 2.0000000000 ) 1.5493000000
18 ( 1.0000000000 3.0000000000 ) 0.1205000000
24 ( 1.3800000000 2.5900000000 ) 0.1094036800
29 ( 1.3500000000 2.6200000000 ) 0.0830593600
30 ( 1.2600000000 2.7100000000 ) 0.0292552000
36 ( 1.2300000000 2.7300000000 ) 0.0166984000
37 ( 1.1700000000 2.7800000000 ) 0.0051272000
45 ( 1.1600000000 2.7800000000 ) 0.0024539200
46 ( 1.1700000000 2.7600000000 ) 0.0013556800
57 ( 1.1500000000 2.7700000000 ) 0.0000417600
72 ( 1.1469000000 2.7703000000 ) 0.0000000047
88 ( 1.1469000000 2.7703320000 ) 0.0000000001
94 ( 1.1468960000 2.7703320000 ) 0.0000000000
104 ( 1.1468960000 2.7703320500 ) 0.0000000000
109 ( 1.1468960500 2.7703320500 ) 0.0000000000
120 ( 1.1468960500 2.7703320500 ) 0.0000000000
} end of run (max number of blackbox evaluations)
blackbox evaluations : 120
best feasible solution : ( 1.14689605 2.77033205 ) h=0 f=8.000004166e-17
Testing NOMAD tests passed
Maybe you should add a test to check the version of gcc
before building NOMAD
?
J'obtiens ce problème lors de l'installation de NOMAD.jl sur la grille de calcul. Si tu arrives à faire marcher NOMAD sur cette machine, ton script d'installation sera bien robuste. Y a jamais rien qui marche par défaut dessus...