Coder Social home page Coder Social logo

paulflang / sbml2julia Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 21.03 MB

A tool to for optimizing parameters of ordinary differential equation (ODE) models. SBML2Julia translates a model from SBML/PEtab format into Julia for Mathematical Programming (JuMP), performs the optimization task and returns the results.

Home Page: https://sbml2julia.readthedocs.io/en/latest/

License: MIT License

Python 98.22% Dockerfile 1.78%
optimization ode julia ordinary-differential-equations systems-biology modelling sbml sbml-model

sbml2julia's People

Contributors

paulflang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mingtaoli

sbml2julia's Issues

Link to DifferentialEquations.jl?

Cool project! I think it would be cool if simulation-based methods could be supported here by hooking into DifferentialEquations.jl and its DiffEqFlux fast adjoint schemes (https://diffeqflux.sciml.ai/dev/). Usually this ends up being a bit faster than discrete-then-optimize techniques (when utilizing automatic differentiation mixed adjoints), so it would be a good technique to mix in.

MUMPS requires more memory

I just pushed c7cf5f3 to the multi_exp branch. I think the new code should correctly translate the PEtab problem specified in Disfit/tests/fixtures/G2M_copasi to a Julia JuMP problem (see DisFit/julia_code.jl). Unfortunately, when running the optimization I seem to run out of memory. @sshin23 : do you have any suggestions of how to solve this?

******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************

This is Ipopt version 3.12.10, running with linear solver mumps.
NOTE: Other linear solvers might be more efficient (see Ipopt documentation).

Number of nonzeros in equality constraint Jacobian...:   288116
Number of nonzeros in inequality constraint Jacobian.:       16
Number of nonzeros in Lagrangian Hessian.............:   415260

MUMPS returned INFO(1) = -9 and requires more memory, reallocating.  Attempt 1
  Increasing icntl[13] from 1000 to 2000.
MUMPS returned INFO(1) = -9 and requires more memory, reallocating.  Attempt 2
  Increasing icntl[13] from 2000 to 4000.

Cannot install linear solver

I am struggling to get the ma57 solver working. @sshin23 : do you have an idea what I am doing wrong? I ran

sudo apt-get install gcc g++ gfortran patch wget pkg-config liblapack-dev libmetis-dev

To obtain the HSL code, I followed the following steps:

  1. Go to http://hsl.rl.ac.uk/ipopt.
  2. Choose whether to download either the Archive code or the HSL Full code. To download, select the relevant "source" link.
  3. Follow the instructions on the website, read the license, and submit the registration form.
  4. Wait for an email containing a download link (this should take no more than one working day).
  5. Compile the HSL code via the COIN-OR Tools project ThirdParty-HSL.
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software$ git clone https://github.com/coin-or-tools/ThirdParty-HSL.git
Cloning into 'ThirdParty-HSL'...
remote: Enumerating objects: 165, done.
remote: Counting objects: 100% (165/165), done.
remote: Compressing objects: 100% (102/102), done.
remote: Total 1239 (delta 106), reused 114 (delta 63), pack-reused 1074
Receiving objects: 100% (1239/1239), 1.16 MiB | 342.00 KiB/s, done.
Resolving deltas: 100% (831/831), done.
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software$ cd ThirdParty-HSL
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL$ cd ..
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software$ ls
0001_objectivePrior  Benchmark-Models-PEtab  coinhsl-2019.05.21.tar.gz  DisFit  petab_test_suite  ThirdParty-HSL
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software$ tar -xzf coinhsl-2019.05.21.tar.gz 

I then copied the coinhsl-2019.05.21 directory into /media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL and renamed it to coinhsl. Next I configured, built and installed HSL:

(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software$ cd ThirdParty-HSL/
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL$ ./configure
configure: error: cannot find sources (coinhsl/common/deps.f) in . or ..
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL$ make
make: *** No targets specified and no makefile found.  Stop.
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL$ ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking how to get verbose linking output from gfortran... -v
checking for Fortran 77 libraries of gfortran...  -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. -lgfortran -lm -lquadmath
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
checking whether gfortran understands -c and -o together... yes
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking whether gfortran understands -c and -o together... yes
configure: WARNING: Libtool does not cope well with whitespace in `pwd`
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking the archiver (ar) interface... ar
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking if gfortran supports -c -o file.o... (cached) yes
checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking if gfortran supports -c -o file.o... (cached) yes
checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: libtool version info: -version-number 2:1:0
checking for pkgconf... no
checking for pkg-config... pkg-config
checking pkg-config is at least version 0.16.0... yes: 0.29.1
configure: pkg-config path is "/usr/local/lib/pkgconfig:"
checking for MC19... yes
checking for MA27... yes
checking for MA28... yes
checking for MA57... yes
checking for MA77... yes
checking for MA86... yes
checking for MA97... yes
checking for C interface to MC68... yes
checking for deps90.f90... yes
checking for function dsyev_ in -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm ... no
checking for function dsyev in -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm ... no
checking for function DSYEV_ in -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm ... no
checking for function DSYEV in -lmkl_core -lmkl_intel_lp64 -lmkl_sequential -lm ... no
checking for lapack.pc and blas.pc... yes
checking for function dsyev_ in -L/usr/lib/x86_64-linux-gnu/atlas -llapack ... yes
checking for library containing cos... -lm
checking for package Metis with function metis_nodend... yes
checking metis.h usability... yes
checking metis.h presence... yes
checking for metis.h... yes
checking for Fortran flag to compile preprocessed .F files... none
checking how to define symbols for preprocessed Fortran... -D
checking for Fortran flag to compile preprocessed .f files... -cpp
checking for Fortran flag to compile preprocessed .f90 files... -cpp
checking for gfortran option to support OpenMP... -fopenmp
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating coinhsl.pc
config.status: creating config.h
config.status: creating CoinHslConfig.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: Configuration of CoinHSL successful
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL$ make
make  all-am
make[1]: Entering directory '/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL'
  F77      coinhsl/common/deps.lo
coinhsl/common/deps.f:623:72:

  623 |               IF (IJFIR) 230,220,240
      |                                                                        1
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
coinhsl/common/deps.f:1160:72:

 1160 |             IF (IFIR) 860,880,870
      |                                                                        1
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
coinhsl/common/deps.f:1216:72:

 1216 |             IF (IFIR) 930,940,950
      |                                                                        1
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
coinhsl/common/deps.f:2614:72:

 2614 |    10 IW1(I,1) = IW1(I-1,1) + LENR(I-1)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 10 at (1)
coinhsl/common/deps.f:2632:72:

 2632 |    30 LENR(II) = LENOFF(I)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 30 at (1)
coinhsl/common/deps.f:2644:72:

 2644 |    40 IQ(I) = I
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 40 at (1)
coinhsl/common/deps.f:2659:72:

 2659 |    50 ICN(JJ) = ICN(J)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 50 at (1)
coinhsl/common/deps.f:2668:72:

 2668 |    70 IW(II,1) = IP(I)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 70 at (1)
coinhsl/common/deps.f:2670:72:

 2670 |    80 IP(I) = IW(I,1)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 80 at (1)
coinhsl/common/deps.f:2722:72:

 2722 |   100     IW1(I,1) = IW1(I-1,1) + LENOFF(I-1)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 100 at (1)
coinhsl/common/deps.f:2835:72:

 2835 |    10 W(I) = ZERO
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 10 at (1)
coinhsl/common/deps.f:2845:72:

 2845 |    30   WROWL = WROWL + DABS(A(JJ))
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 30 at (1)
coinhsl/common/deps.f:2854:72:

 2854 |    80   W(J) = DMAX1(DABS(A(JJ)),W(J))
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 80 at (1)
coinhsl/common/deps.f:2860:72:

 2860 |   200 AMAXU = DMAX1(AMAXU,W(I))
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 200 at (1)
  F77      coinhsl/mc19/mc19d.lo
coinhsl/mc19/mc19d.f:37:72:

   37 |       DO 10 I=1,N
      |                                                                        1
Warning: Fortran 2018 deleted feature: Shared DO termination label 10 at (1)
  F77      coinhsl/ma27/ma27d.lo
  F77      coinhsl/ma28/ma28d.lo
coinhsl/ma28/ma28d.f:658:72:

  658 |           IF (IW1(INEW,3)-IW1(JNEW,3)) 40,60,50
      |                                                                        1
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
coinhsl/ma28/ma28d.f:678:72:

  678 |             IF (JNEW-JCOMP) 80,130,90
      |                                                                        1
Warning: Fortran 2018 deleted feature: Arithmetic IF statement at (1)
  F77      coinhsl/ma57/ma57d.lo
  FC       coinhsl/common/deps90.lo
  FC       coinhsl/hsl_mc68/C/hsl_mc68i_ciface.lo
  FC       coinhsl/hsl_ma77/hsl_ma77d.lo
  FC       coinhsl/hsl_ma77/C/hsl_ma77d_ciface.lo
  FC       coinhsl/hsl_ma86/hsl_ma86d.lo
  FC       coinhsl/hsl_ma86/C/hsl_ma86d_ciface.lo
  FC       coinhsl/hsl_ma97/hsl_ma97d.lo
  FC       coinhsl/hsl_ma97/C/hsl_ma97d_ciface.lo
  CC       metis_adapter.lo
  F77LD    libcoinhsl.la
make[1]: Leaving directory '/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL'
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL$ sudo make install
[sudo] password for paul: 
make[1]: Entering directory '/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL'
 /usr/bin/mkdir -p '/usr/local/lib'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   libcoinhsl.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libcoinhsl.so.2.1.0 /usr/local/lib/libcoinhsl.so.2.1.0
libtool: install: (cd /usr/local/lib && { cp -pR -f libcoinhsl.so.2.1.0 libcoinhsl.so.2 || { rm -f libcoinhsl.so.2 && cp -pR libcoinhsl.so.2.1.0 libcoinhsl.so.2; }; })
libtool: install: (cd /usr/local/lib && { cp -pR -f libcoinhsl.so.2.1.0 libcoinhsl.so || { rm -f libcoinhsl.so && cp -pR libcoinhsl.so.2.1.0 libcoinhsl.so; }; })
libtool: install: /usr/bin/install -c .libs/libcoinhsl.lai /usr/local/lib/libcoinhsl.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib
/sbin/ldconfig.real: /usr/local/lib/libcoinhsl.so.2 is not a symbolic link

----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/usr/local/include/coin-or/hsl'
 /usr/bin/install -c -m 644 CoinHslConfig.h coinhsl/hsl_mc68/C/hsl_mc68i.h coinhsl/hsl_ma77/C/hsl_ma77d.h coinhsl/hsl_ma86/C/hsl_ma86d.h coinhsl/hsl_ma97/C/hsl_ma97d.h '/usr/local/include/coin-or/hsl'
 /usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 coinhsl.pc '/usr/local/lib/pkgconfig'
make[1]: Leaving directory '/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL'
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL$ 

Unfortunately, I could not find where the library and binaries are installed:

(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL$ cd /
(std) paul@paul-VirtualBox:/$ ls
'~'   bin   boot   cdrom   dev   etc   home   lib   lib32   lib64   libx32   lost+found   media   mnt   opt   proc   root   run   sbin   snap   srv   sys   tmp   usr   var
(std) paul@paul-VirtualBox:/$ cd opt
(std) paul@paul-VirtualBox:/opt$ ls
containerd  julia-1.0.5  VBoxGuestAdditions-6.0.20
(std) paul@paul-VirtualBox:/opt$ cd julia-1.0.5/
(std) paul@paul-VirtualBox:/opt/julia-1.0.5$ ls
bin  etc  include  lib  LICENSE.md  share
(std) paul@paul-VirtualBox:/opt/julia-1.0.5$ cd bin/
(std) paul@paul-VirtualBox:/opt/julia-1.0.5/bin$ ls
julia
(std) paul@paul-VirtualBox:/opt/julia-1.0.5/bin$ cd ..
(std) paul@paul-VirtualBox:/opt/julia-1.0.5$ cd lib/
(std) paul@paul-VirtualBox:/opt/julia-1.0.5/lib$ ls
julia  libjulia.so  libjulia.so.1  libjulia.so.1.0
(std) paul@paul-VirtualBox:/opt/julia-1.0.5/lib$ cd ..
(std) paul@paul-VirtualBox:/opt/julia-1.0.5$ ls
bin  etc  include  lib  LICENSE.md  share
(std) paul@paul-VirtualBox:/opt/julia-1.0.5$ cd ..
(std) paul@paul-VirtualBox:/opt$ ls
containerd  julia-1.0.5  VBoxGuestAdditions-6.0.20
(std) paul@paul-VirtualBox:/opt$ cd ..
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL$ ls
ar-lib              compile                   config.status              hsl_ma54_double.mod        hsl_ma97_double_ciface.mod   hsl_mc68_integer.mod  hsl_of01_integer.mod  LICENSE          metis_adapter.lo
coinhsl             config_coinhsl_default.h  config.sub                 hsl_ma64_double.mod        hsl_ma97_double.mod          hsl_mc68_single.mod   hsl_zb01_integer.mod  ltmain.sh        missing
CoinHslConfig.h     config.guess              configure                  hsl_ma77_double_iface.mod  hsl_mc34_double.mod          hsl_mc69_double.mod   hsl_zd11_double.mod   Makefile         README.md
CoinHslConfig.h.in  config.h                  configure.ac               hsl_ma77_double.mod        hsl_mc64_double.mod          hsl_mc78_integer.mod  install-sh            Makefile.am      stamp-h1
coinhsl.pc          config.h.in               depcomp                    hsl_ma86d_ciface.mod       hsl_mc68_double.mod          hsl_mc80_double.mod   libcoinhsl.la         Makefile.in      stamp-h2
coinhsl.pc.in       config.log                hsl_kb22_long_integer.mod  hsl_ma86_double.mod        hsl_mc68_integer_ciface.mod  hsl_of01_double.mod   libtool               metis_adapter.c
(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL$ 

I also did not know which binaries I have to provide the path to, so I just provided the path to where I extracted the HSL library. Unfortunately, the file libhsl.so was not found:

(std) paul@paul-VirtualBox:/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/ThirdParty-HSL$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.5 (2019-09-09)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |


julia> ENV["JULIA_IPOPT_LIBRARY_PATH"] = "/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/"
"/media/sf_DPhil_Project/Project07_Parameter Fitting/df_software/"

julia> import Pkg; Pkg.build("Ipopt")
  Building CodecZlib ─→ `~/.julia/packages/CodecZlib/5t9zO/deps/build.log`
  Building MbedTLS ───→ `~/.julia/packages/MbedTLS/X4xar/deps/build.log`
  Building ZipFile ───→ `~/.julia/packages/ZipFile/DW0Qr/deps/build.log`
  Building CodecBzip2 → `~/.julia/packages/CodecBzip2/T5yr7/deps/build.log`
  Building Ipopt ─────→ `~/.julia/packages/Ipopt/ruIXY/deps/build.log`

...

julia> for i_start in 1:1
           m = Model(with_optimizer(Ipopt.Optimizer, tol=1e-6, linear_solver="ma57"))
...
Optimizing:
Exception of type: OPTION_INVALID in file "../../../../Ipopt/src/Algorithm/IpAlgBuilder.cpp" at line 295:
 Exception message: Selected linear solver MA57 not available.
Tried to obtain MA57 from shared library "libhsl.so", but the following error occured:
libhsl.so: cannot open shared object file: No such file or directory

EXIT: Invalid option encountered.

Different time vectors for different exp. conditions

The time in the Plos Comp Bio measurement data differs slightly between conditions. It would be nice if DisFit would support that. More generally speaking, it may sometimes occur that each experiment and each observable has it's own time vector. In an attempt to support that sort of flexibility in time specification, I wrote the following code:
20200822_JuMP indexing issue.txt

Running the code results in the following error in line 153:

ERROR: MethodError: no method matching size(::JuMP.Containers.SparseAxisArray{Float64,2,Tuple{Int64,Int64}})
Closest candidates are:
  size(::AbstractArray{T,N}, ::Any) where {T, N} at abstractarray.jl:38
  size(::BitArray{1}) at bitarray.jl:70
  size(::BitArray{1}, ::Any) at bitarray.jl:74

To break things down a bit, the root case of the problem is that JuMP uses JuMP.Containers.SparseAxisArray instead of Array once the second index depends of the first like so:

# Define observables
println("Defining observables...")
@variable(m, 0.2 <= obs_a[j in 1:1, k in 1:length(t_exp[j])] <= 0.2, start=1.)
@NLconstraint(m, [j in 1:1, k in 1:length(t_exp)], obs_a[j, k] == A[j, t_sim_to_exp[k]])
@variable(m, 0.8 <= obs_b[j in 1:1, k in 1:length(t_exp)] <= 0.8, start=1.)
@NLconstraint(m, [j in 1:1, k in 1:length(t_exp)], obs_b[j, k] == B[j, t_sim_to_exp[k]])

julia> typeof(obs_a)
JuMP.Containers.SparseAxisArray{VariableRef,2,Tuple{Int64,Int64}}

julia> typeof(obs_b)
Array{VariableRef,2}

Anyway, in the end I would like to have a Dict of Dicts, where I can put in the simulation value of each observable in each condition like so: results_observable['condition_x']['observable_y'] = [1,2,3,4,5]

@sshin23 : Do you have a suggestion of how this can be achieved? Also, if you look at the code above, do you think this sort of flexible indexing will slow down JuMP substantially? Do you have an idea how to make the Julia code more elegant?

Thanks a lot!

Reading measurementData into Julia

I created a new branch multi_exp.

Unfortunately reading of measurementData does not yet support multiple experimental conditions (see comments in Disfit/DisFit/core.py line 339 of the multi_exp branch for more details).

The current output code for Julia can be found in DisFit/julia_code.jl of the multi_exp branch.

@sshin23 : I am struggling to fix this. Could you please give it a try? Let me know if you need more info.

Invalid number in NLP function or derivative detected

I am just trying the petab_test_suite cases and ran into a problem with case 0014. @sshin23 : could you please download case 0014 and have a look what's wrong with this code:
20200720_petab_test_suite_0014_problem.txt

The output I get is:

This is Ipopt version 3.12.10, running with linear solver mumps.
NOTE: Other linear solvers might be more efficient (see Ipopt documentation).

Number of nonzeros in equality constraint Jacobian...:      248
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:      169

Total number of variables............................:       86
                     variables with only lower bounds:        0
                variables with lower and upper bounds:       84
                     variables with only upper bounds:        0
Total number of equality constraints.................:       86
Total number of inequality constraints...............:        0
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0


Number of Iterations....: 0

Number of objective function evaluations             = 0
Number of objective gradient evaluations             = 1
Number of equality constraint evaluations            = 1
Number of inequality constraint evaluations          = 0
Number of equality constraint Jacobian evaluations   = 0
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations             = 0
Total CPU secs in IPOPT (w/o function evaluations)   =      0.006
Total CPU secs in NLP function evaluations           =      0.000

EXIT: Invalid number in NLP function or derivative detected.

Thanks!

Failing Benchmark-Models-PEtab cases

This issue regards the petab_suite branch.
I tried the Benchmark-Models-PEtab cases but Ipopt ran into problems with a few cases. @sshin23 : could you please download Benchmark-Models-PEtab and have a look what's wrong with this code:

20200810_test_petab_benchmark.txt (also to be found in the tests directory)

You can find more details about which cases cause what problems in line 30. If you get a NotImplementedError please temporarily comment out the lines where it is raised. If the resulting Ipopt failure is not related to the not implemented feature, we should try fixing it. Otherwise we can ignore it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.