- Index
- » Developer
- » OpenModelica development
- » --daeMode segfault with -idaLS=klu
--daeMode segfault with -idaLS=klu
--daeMode segfault with -idaLS=klu
OMCompiler v1.17.0-dev.224+g4c291412fa on x86_64 x86_64 x86_64 GNU/Linux
simulation option: -idaLS=klu -lv LOG_SOLVER
Code:
Limited backtrace at point of segmentation fault
/lib64/libpthread.so.0(+0x132d0)[0x7f3d054022d0]
/usr/local/bin/../lib/x86_64-linux-gnu/omc/libsundials_sunlinsolklu.so.3(SUNLinSolSolve_KLU+0x92)[0x7f3d03b70f52]
/usr/local/bin/../lib/x86_64-linux-gnu/omc/libsundials_idas.so.4(idaLsSolve+0x1b7)[0x7f3d02860e17]
/usr/local/bin/../lib/x86_64-linux-gnu/omc/libsundials_idas.so.4(IDACalcIC+0x6b3)[0x7f3d0285df23]
/usr/local/bin/../lib/x86_64-linux-gnu/omc/libSimulationRuntimeC.so(ida_event_update+0x2b1)[0x7f3d08404021]
/usr/local/bin/../lib/x86_64-linux-gnu/omc/libSimulationRuntimeC.so(updateDiscreteSystem+0x89)[0x7f3d083ee969]
/usr/local/bin/../lib/x86_64-linux-gnu/omc/libSimulationRuntimeC.so(initialization+0x40b)[0x7f3d0841886b]
/usr/local/bin/../lib/x86_64-linux-gnu/omc/libSimulationRuntimeC.so(initializeModel+0xde)[0x7f3d083f9cce]
/usr/local/bin/../lib/x86_64-linux-gnu/omc/libSimulationRuntimeC.so(solver_main+0x140)[0x7f3d083fae30]
/usr/local/bin/../lib/x86_64-linux-gnu/omc/libSimulationRuntimeC.so(+0xd3e41)[0x7f3d08441e41]
/usr/local/bin/../lib/x86_64-linux-gnu/omc/libSimulationRuntimeC.so(startNonInteractiveSimulation+0xd1c)[0x7f3d08440f5c]
/usr/local/bin/../lib/x86_64-linux-gnu/omc/libSimulationRuntimeC.so(_main_SimulationRuntime+0x72)[0x7f3d08443fb2]
./DFIM10(main+0x19b)[0x416ad1]
/lib64/libc.so.6(__libc_start_main+0xea)[0x7f3d0505834a]
./DFIM10(_start+0x2a)[0x41490a]
Code:
LOG_SOLVER | info | NO override given on the command line.
LOG_SOLVER | info | numberOfIntervals = 10500
LOG_SOLVER | info | Allocated simulation result data storage for method 'mat' and file='DFIM10_res.mat'
LOG_SOLVER | info | recognized solver: ida
LOG_SOLVER | info | Initializing IDA DAE Solver
LOG_SOLVER | info | ## IDA ## Initializing solver of size 111 in DAE mode.
| | | | | The relative tolerance is 1e-08. Following absolute tolerances are used for the states:
| | | | | IDA uses internal root finding method YES
| | | | | Maximum integration order 5
| | | | | use equidistant time grid YES
| | | | | IDA linear solver method selected ida use sparse direct solver KLU. (default)
| | | | | Jacobian is calculated by "Colored numerical Jacobian, which is default for dassl and ida. With option -idaLS=klu a sparse matrix is used."
| | | | | initial step size is set automatically.
LOG_SOLVER | info | ##IDA## do event update at -0.5
LOG_SOLVER | info | ##IDA## corrected step-size at 2.22044604925031e-16
LOG_SOLVER | info | #### IDA error message #####
| | | | | -> error code -22
| | | | | -> module IDAS
| | | | | -> function IDACalcIC
| | | | | Message: tout1 too close to t0 to attempt initial condition calculation.
LOG_SOLVER | info | ##IDA## IDACalcIC run status -22.
| | | | Iterations : 0
LOG_SOLVER | info | ##IDA## first event iteration failed. Start next try without line search!
simulation option -idaLS=dense -lv LOG_SOLVER
results as expected
Code:
LOG_SOLVER | info | NO override given on the command line.
LOG_SOLVER | info | numberOfIntervals = 10500
LOG_SOLVER | info | Allocated simulation result data storage for method 'mat' and file='DFIM10_res.mat'
LOG_SOLVER | info | recognized solver: ida
LOG_SOLVER | info | Initializing IDA DAE Solver
LOG_SOLVER | info | ## IDA ## Initializing solver of size 111 in DAE mode.
| | | | | The relative tolerance is 1e-08. Following absolute tolerances are used for the states:
| | | | | IDA uses internal root finding method YES
| | | | | Maximum integration order 5
| | | | | use equidistant time grid YES
| | | | | IDA linear solver method selected ida internal dense method.
| | | | | Jacobian is calculated by "Colored numerical Jacobian, which is default for dassl and ida. With option -idaLS=klu a sparse matrix is used."
| | | | | initial step size is set automatically.
LOG_SOLVER | info | ##IDA## do event update at -0.5
LOG_SOLVER | info | ##IDA## corrected step-size at 2.22044604925031e-16
LOG_SOLVER | info | #### IDA error message #####
| | | | | -> error code -22
| | | | | -> module IDAS
| | | | | -> function IDACalcIC
| | | | | Message: tout1 too close to t0 to attempt initial condition calculation.
LOG_SOLVER | info | ##IDA## IDACalcIC run status -22.
| | | | Iterations : 0
LOG_SOLVER | info | ##IDA## first event iteration failed. Start next try without line search!
LOG_SOLVER | info | ##IDA## IDACalcIC run status 0.
| | | | Iterations : 0
LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
LOG_SOLVER | info | Wrote parameters to the file after initialization (for output formats that support this)
LOG_SOLVER | info | Start numerical solver from -0.5 to 10
LOG_SOLVER | info | Sparse structure of DAE sparse pattern [size: 111x111]
| | | | | 393 nonzero elements
| | | | | Transposed sparse structure (rows: states)
with version v1.16.0 sparse direct solver was working.
BR / Johann
Re: --daeMode segfault with -idaLS=klu
Thanks for finding this bug. We are always happy to get bugs reported, so we can fix them.
You can report bus in our OpenModelica GitHub or on Trac (but the Trac will be depreacted soon).
We updated SUNDIALS to a newer version and a lot of API calls changed. And apparently the daeMode didn't got tested enough to find all problems.
I broke it, so I guess I have to fix that as soon as possible.
I opened a ticket on Trac for this one: ticket#6275
- AnHeuermann
- 52 Posts
Re: --daeMode segfault with -idaLS=klu
hanshell, I need more info to reproduce your issue.
I can't reproduce the segmentation fault. Can you provide a minimal working example?
Please add it to the ticket https://trac.openmodelica.org/OpenModelica/ticket/6275
- AnHeuermann
- 52 Posts
Re: --daeMode segfault with -idaLS=klu
I will prepare a simple example. In the meantime I checked deaMode with other models - the same problem.
Is it OK to work with OMCompiler v1.17.0-dev.224+g4c291412fa ??
with v1.16.0 I had no problems with --deaMode and sparse solver
with v1.16.1 I received an error during compilation so I switched to v1.17.0-dev....
BR Johann
Re: --daeMode segfault with -idaLS=klu
> Is it OK to work with OMCompiler v1.17.0-dev.224+g4c291412fa ??
Well, it's a nightly build, so there can always be some bugs introduced in that specific version.
But I doubt that the problem you are describing is specific to that commit. We will see what will happen with the example.
- AnHeuermann
- 52 Posts
- Index
- » Developer
- » OpenModelica development
- » --daeMode segfault with -idaLS=klu