inria-parkas / sundialsml Goto Github PK
View Code? Open in Web Editor NEWAn OCaml interface to the Sundials suite of numeric solvers.
Home Page: http://inria-parkas.github.io/sundialsml/
License: Other
An OCaml interface to the Sundials suite of numeric solvers.
Home Page: http://inria-parkas.github.io/sundialsml/
License: Other
Two comments on opam packaging from having a quick look at the new opam packages.
opam
file at the root of the project sources, from which the opam files submitted to the opam-repository at release time are derived. This source-local package may have a version field indicating the next version, or just dev
. This enables package pinning: people that would download the sources and tweak them can easily convince opam to let them install this tweaked version of the package in stead of the default one.depexts
field in your package description, it is often useful to separate them in separate conf-*
packages that encapsulate a bunch of depexts on many different systems. In your case, sundials
is arguably a package-specific dependency (one could create a conf-lapack
package but you would be the only user), but there already is a conf-lapack package and it would be better to depend on it rather than list the same depext dependencies. In particular, the package contains a piece of code to detect the presence of the library at build time and it will fail explicitly if it is absent from the system. On the other hand, conf-lapack
does not have the lapack
depext, so you should probably add it there (by sending a pull request to the opam-repository). The advantage is that it shares the work between packages.Installation failed with OCaml 4.12.0 (see error log below).
With MacOS big Sur (11.2.3), and sundials 3.2.1
[ERROR] The installation of sundialsml failed at "make install-findlib".
#=== ERROR while installing sundialsml.3.1.1p0-1 ==============================#
# context 2.0.7 | macos/x86_64 | ocaml-base-compiler.4.12.0 | https://opam.ocaml.org#6904c8dd
# path ~/.opam/4.12.0/.opam-switch/build/sundialsml.3.1.1p0-1
# command ~/.opam/opam-init/hooks/sandbox.sh install make install-findlib
# exit-code 2
# env-file ~/.opam/log/sundialsml-26316-d2c37b.env
# output-file ~/.opam/log/sundialsml-26316-d2c37b.out
### output ###
# [...]
# ocamlopt.opt -bin-annot -I sundials -I nvectors -I lsolvers -I cvode -I cvodes -I ida -I idas -I arkode -I kinsol -c nvectors/nvector.ml
# ocamlopt.opt -bin-annot -I sundials -I nvectors -I lsolvers -I cvode -I cvodes -I ida -I idas -I arkode -I kinsol -c nvectors/nvector_serial.ml
# ocamlopt.opt -bin-annot -I sundials -I nvectors -I lsolvers -I cvode -I cvodes -I ida -I idas -I arkode -I kinsol -c lsolvers/sundials_Matrix.ml
# ocamlopt.opt -bin-annot -I sundials -I nvectors -I lsolvers -I cvode -I cvodes -I ida -I idas -I arkode -I kinsol -c lsolvers/sundials_LinearSolver_impl.ml
# ocamlopt.opt -bin-annot -I sundials -I nvectors -I lsolvers -I cvode -I cvodes -I ida -I idas -I arkode -I kinsol -c lsolvers/sundials_LinearSolver.ml
# File "lsolvers/sundials_LinearSolver.ml", line 1:
# Error: The files lsolvers/sundials_LinearSolver_impl.cmi
# and lsolvers/sundials_LinearSolver.cmi make inconsistent assumptions
# over interface Sundials_LinearSolver_impl
# make[1]: *** [variables.mk:16: lsolvers/sundials_LinearSolver.cmx] Error 2
# make[1]: Leaving directory '/Users/gbaudart/.opam/4.12.0/.opam-switch/build/sundialsml.3.1.1p0-1/src'
# make: *** [Makefile:57: install-findlib] Error 2
I have been using SundialsML before on earlier versions of macOS, but now when I installed opam
and sundialsml
from scratch on a clean macOS Catalina 10.15.5 installation, I get compilation errors.
First, I installed Sundials via brew (brew install sundials
). Then when I run opam install sundialsml
I get the following error:
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[sundialsml.3.1.1p0-1] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of sundialsml failed at
"/Users/davidbroman/.opam/opam-init/hooks/sandbox.sh build ./configure
--stubdir=/Users/davidbroman/.opam/default/lib/stublibs/
--libdir=/Users/davidbroman/.opam/default/lib/
--docdir=/Users/davidbroman/.opam/default/doc/".
#=== ERROR while compiling sundialsml.3.1.1p0-1 ===============================#
# context 2.0.7 | macos/x86_64 | ocaml-base-compiler.4.10.0 | https://opam.ocaml.org#1b6313ae
# path ~/.opam/default/.opam-switch/build/sundialsml.3.1.1p0-1
# command ~/.opam/opam-init/hooks/sandbox.sh build ./configure --stubdir=/Users/davidbroman/.opam/default/lib/stublibs/ --libdir=/Users/davidbroman/.opam/default/lib/ --docdir=/Users/davidbroman/.opam/default/doc/
# exit-code 1
# env-file ~/.opam/log/sundialsml-29857-1872ec.env
# output-file ~/.opam/log/sundialsml-29857-1872ec.out
### output ###
# -----------------------
# [...]
#
# Installation paths
# prefix: /usr/local/
# libdir: /Users/davidbroman/.opam/default/lib/
# stubdir: /Users/davidbroman/.opam/default/lib/stublibs/
# docdir: /Users/davidbroman/.opam/default/doc/
#
# Some errors occurred during configuration:
# error interpreting sundials_config.h
# error interpreting sundials_config.h
#
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build sundialsml 3.1.1p0-1
+-
- No changes have been performed
The packages you requested declare the following system dependencies. Please
make sure they are installed before retrying:
sundials
Any ideas what the problem is?
hi, i tried to install sundialsml on os x. beforehand i installed sundials via homebrew. at various stages, i got error messages:
opam depext sundialsml
complains about homebrew/science/sundials but that is deprecated in favor of homebrew/sundials.sundials_config.h
could be found so that compliation of sundialsml stopped at the configure stage.i finally got it to work after downgrading sundials to version 2.7.0_3 using homebrew.
it seems either sundialsml or some installation step on os x is incompatible with sundials 3.1 ?
as a suggestion: for user convenience would it make sense to define print functions e.g. for Sundials.Realarray.t that can be used with #install_printer
in the toplevel and with @a
in format strings?
Installing the package through OPAM fails with the following error:
#=== ERROR while installing sundialsml.2.7.0p0 ================================#
# opam-version 1.2.2
# os linux
# command make install-findlib
# path /home/trch/.opam/4.04.0/build/sundialsml.2.7.0p0
# compiler 4.04.0
# exit-code 2
# env-file /home/trch/.opam/4.04.0/build/sundialsml.2.7.0p0/sundialsml-20911-d2c37b.env
# stdout-file /home/trch/.opam/4.04.0/build/sundialsml.2.7.0p0/sundialsml-20911-d2c37b.out
# stderr-file /home/trch/.opam/4.04.0/build/sundialsml.2.7.0p0/sundialsml-20911-d2c37b.err
### stdout ###
# ocamlmklib -ocamlc "ocamlc.opt -annot " -ocamlopt "ocamlopt.opt " -verbose \
# [...]
# -lsundials_cvodes \
# \
# -lsundials_idas \
# -lsundials_kinsol \
# -lsundials_nvecserial -lm -llapack -lblas
# + gcc -shared -o ./dllmlsundials.so sundials/sundials_ml.o lsolvers/dls_ml.o nvectors/nvector_ml.o lsolvers/spils_ml.o kinsol/kinsol_ml.o cvodes/cvode_ml_s.o cvodes/cvodes_ml.o cvodes/cvode_klu_ml_s.o cvodes/cvodes_klu_ml.o cvodes/cvode_superlumt_ml_s.o cvodes/cvodes_superlumt_ml.o idas/ida_ml_s.o idas/idas_ml.o idas/ida_klu_ml_s.o idas/idas_klu_ml.o idas/ida_superlumt_ml_s.o idas/idas_superlumt_ml.o arkode/arkode_klu_ml.o arkode/arkode_superlumt_ml.o kinsol/kinsol_klu_ml.o kinsol/kinsol_superlumt_ml.o -lsundials_cvodes -lsundials_idas -lsundials_kinsol -lsundials_nvecserial -lm -llapack -lblas
# Makefile:17: recipe for target 'sundials.cma' failed
# make[1]: Leaving directory '/home/trch/.opam/4.04.0/build/sundialsml.2.7.0p0/src'
# Makefile:57: recipe for target 'install-findlib' failed
### stderr ###
# /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib/libsundials_cvodes.a(cvodes.o): relocation R_X86_64_PC32 against symbol `cvSensRhs1InternalDQ' can not be used when making a shared object; recompile with -fPIC
# /usr/bin/ld: final link failed: Bad value
# collect2: error: ld returned 1 exit status
# make[1]: *** [sundials.cma] Error 2
# make: *** [install-findlib] Error 2
On Fedora 29:
# opam-version 1.2.2
# os linux
# command ./configure --stubdir=/user/cstolze/home/.opam/4.07.0/lib/stublibs/ --libdir=/user/cstolze/home/.opam/4.07.0/lib/ --docdir=/user/cstolze/home/.opam/4.07.0/doc/
# path /user/cstolze/home/.opam/4.07.0/build/sundialsml.3.1.1p0
# compiler 4.07.0
# exit-code 1
# env-file /user/cstolze/home/.opam/4.07.0/build/sundialsml.3.1.1p0/sundialsml-6212-5f1023.env
# stdout-file /user/cstolze/home/.opam/4.07.0/build/sundialsml.3.1.1p0/sundialsml-6212-5f1023.out
# stderr-file /user/cstolze/home/.opam/4.07.0/build/sundialsml.3.1.1p0/sundialsml-6212-5f1023.err
### stdout ###
# [...]
# Some errors occurred during configuration:
# Can't compile with KLU. You may have to specify KLU_INCLUDE_DIR
# and/or KLU_LIBRARY_DIR.
# Saved test code as __configure_test_c_file__klu.c
# Compilation command was: cc __configure_test_c_file__klu.c -lklu -lamd -lcolamd -lbtf -lsuitesparseconfig -o __configure_test_c_file__klu
# Can't link to SuperLU_MT. You may have to specify SUPERLUMT_INCLUDE_DIR
# and/or SUPERLUMT_LIBRARY_DIR.
# Saved test code as __configure_test_c_file__superlumt.c
# Compilation command was: cc __configure_test_c_file__superlumt.c -lsuperlu_mt_PTHREAD -lpthread -lblas -o __configure_test_c_file__superlumt
#
The listed dependencies are:
# - lapack-devel
# - m4
# - sundials-devel
All of these dependencies are freshly installed on my machine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.