SciML / Sundials.jl

Julia interface to Sundials, including a nonlinear solver (KINSOL), ODE's (CVODE and ARKODE), and DAE's (IDA) in a SciML scientific machine learning enabled manner
https://diffeq.sciml.ai
BSD 2-Clause "Simplified" License
209 stars 77 forks source link

error installing sundials #19

Closed rajeev2010 closed 10 years ago

rajeev2010 commented 10 years ago

I have installed Sundials successfully on my laptop running ubuntu. However on a server running opensuse, upon giving Pkg.add("Sundials") I get the following error. I checked the directory ~/.julia/v0.3/Sundials/deps/usr/lib64 and all the shared libraries seem to be there.

==============================[ ERROR: Sundials ]===============================

Provider BuildProcess failed to satisfy dependency libsundials_idas
while loading /home/rajeev/.julia/v0.3/Sundials/deps/build.jl, in expression starting on line 32

================================================================================

================================[ BUILD ERRORS ]================================

WARNING: Sundials had build errors.

 - packages with build errors remain installed in /home/rajeev/.julia/v0.3
 - build a package and all its dependencies with `Pkg.build(pkg)`
 - build a single package by running its `deps/build.jl` script

================================================================================```
acroy commented 10 years ago

Have you tried to run Pkg.build("Sundials") after restarting Julia? Could you provide a listing of the files in ~/.julia/v0.3/Sundials/deps/usr/lib64?

rajeev2010 commented 10 years ago

I did try Pkg.build("Sundials") but I get the same error. The files in sundials library are -

$ cd .julia/v0.3/Sundials/deps/usr/lib64/
$ ls
libsundials_cvode.a          libsundials_idas.so.0
libsundials_cvode.la         libsundials_idas.so.0.0.0
libsundials_cvodes.a         libsundials_kinsol.a
libsundials_cvodes.la        libsundials_kinsol.la
libsundials_cvode.so         libsundials_kinsol.so
libsundials_cvode.so.1       libsundials_kinsol.so.1
libsundials_cvode.so.1.0.0   libsundials_kinsol.so.1.0.0
libsundials_cvodes.so        libsundials_nvecparallel.a
libsundials_cvodes.so.2      libsundials_nvecparallel.la
libsundials_cvodes.so.2.0.0  libsundials_nvecparallel.so
libsundials_ida.a            libsundials_nvecparallel.so.0
libsundials_ida.la           libsundials_nvecparallel.so.0.0.2
libsundials_idas.a           libsundials_nvecserial.a
libsundials_idas.la          libsundials_nvecserial.la
libsundials_ida.so           libsundials_nvecserial.so
libsundials_ida.so.2         libsundials_nvecserial.so.0
libsundials_ida.so.2.0.0     libsundials_nvecserial.so.0.0.2
libsundials_idas.so
acroy commented 10 years ago

Strange - cc: @tkelman

acroy commented 10 years ago

As a workaround you could probably create deps/deps.jl manually (or copy the one from your Ubuntu machine). It should probably look like this

macro checked_lib(libname, path)
        (dlopen_e(path) == C_NULL) && error("Unable to load \n\n$libname ($path)\n\nPlease re-run Pkg.build(package), and restart Julia.")
        quote const $(esc(libname)) = $path end
    end
@checked_lib libsundials_cvode "/home/rajeev/.julia/v0.3/Sundials/deps/usr/lib64/libsundials_cvode"
@checked_lib libsundials_cvodes "/home/rajeev/.julia/v0.3/Sundials/deps/usr/lib64/libsundials_cvodes"
@checked_lib libsundials_idas "/home/rajeev/.julia/v0.3/Sundials/deps/usr/lib64/libsundials_idas"
@checked_lib libsundials_ida "/home/rajeev/.julia/v0.3/Sundials/deps/usr/lib64/libsundials_ida"
@checked_lib libsundials_kinsol "/home/rajeev/.julia/v0.3/Sundials/deps/usr/lib64/libsundials_kinsol"
@checked_lib libsundials_nvecserial "/home/rajeev/.julia/v0.3/Sundials/deps/usr/lib64/libsundials_nvecserial"
acroy commented 10 years ago

Uups, wrong button ...

tkelman commented 10 years ago

This is BinDeps having trouble with the lib64 thing on OpenSuse - https://github.com/JuliaLang/BinDeps.jl/issues/52

Try Pkg.checkout("BinDeps") then restart Julia and run Pkg.build("Sundials") again

rajeev2010 commented 10 years ago

This last suggestion worked. Thanks.

acroy commented 10 years ago

@rajeev2010 : Good to hear that it works now. @tkelman : Thanks for the quick help!