Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3684 closed defect (fixed)

index reduction fails with a singular jacobian

Reported by: dersh Owned by: wbraun
Priority: critical Milestone: 1.9.4
Component: Backend Version: v1.9.4-dev-nightly
Keywords: Cc:

Description

I have run into a problem where one of my models shows no results in OMEdit. If I run a simulation and then I try to plot results for any variables, I don't see any values, except for variables that don't change at all. Even "time" doesn't show anything.
The model doesn't report any errors, and appears to complete.
To debug I tried to output a csv and then to just view it. That file has just a single row of data after the header. My other models seem to work correctly (at least I haven't yet seen this error with other models)
I have tested a number of different versions and I have narrowed down the problem's appearance:
The problem doesn't occur in 1.9.4~dev-701 but does occur in 1.9.4~dev.beta1-3-g3e511de and all "beta1" versions I have tried since then (I haven't tried every one, but I have tried as recent as 1.9.4~dev.beta1-94-g8721141.)
Unfortunate, I can't publicly post the model that is showing this problem. Any suggestions for what might be wrong? It seems as though either the simulation just quits early, with no error, or the simulation just doesn't write the data that it should, with no error.

Change History (12)

comment:1 follow-up: Changed 9 years ago by dersh

I just tried to run this in OMShell, instead of OMEdit. In OMShell, here is what I get:

>> simulate(FlowPackage.VarySlopeM2)
record SimulationResult
    resultFile = "",
    simulationOptions = "startTime = 0.0, stopTime = 3600.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'FlowPackage.VarySlopeM2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
    messages = "Simulation execution failed for model: FlowPackage.VarySlopeM2
assert            | debug   | Error, singular Jacobian for dynamic state selection at time 7.200000
|                 | |       | Use -lv LOG_DSS_JAC to get the Jacobian
stdout            | warning | Integrator attempt to handle a problem with a called assert.
assert            | debug   | Error, singular Jacobian for dynamic state selection at time 3.600000
|                 | |       | Use -lv LOG_DSS_JAC to get the Jacobian
stdout            | info    | model terminate | Simulation terminated by an assert at time: 3.6
",
    timeFrontend = 0.6805860410000001,
    timeBackend = 0.251583305,
    timeSimCode = 0.04466246,
    timeTemplates = 0.123499822,
    timeCompile = 0.847006519
end SimulationResult;
Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.

So, I guess there are a few different things going on.
1) Why did this model work in prior to the beta nightly, but no longer does
2) What does the above error indicate?
3) Why doesn't OMEdit report any error or problem.

comment:2 Changed 9 years ago by dersh

One other observation is that my results variable list includes a $STATESET1 with a single variable called: der(x)
That is not a variable that I created.

comment:3 Changed 9 years ago by dersh

What strikes me as particularly strange is that the problem is not with initialization. It finds reasonable values for that. And, even if I make a simulation that is static (doesn’t change in time) it successfully initializes, and if I review the initialization variables they seem reasonable. But, if I view the log of the Jacobian, what I see is a warning at the first stepSize followed be a debug error of a singular Jacobian. Then the same thing warning and error at half the stepStep time (ie for first at .002 seconds then at 0.001 seconds) For this simulation pipeHt1.v and pipeHt1.phi were reasonable at initialization and neither one is zero. And, for this simplified simulation, those same initial results should be valid at all times. Yet below the jacobian is singular. This error did not occur in versions prior to beta1.

LOG_DSS_JAC       | info    | Caluculate one col:
|                 | |       | | seed: data->simulationInfo->analyticJacobians[index].seedVars[0]= 1.000000
|                 | |       | | seed: data->simulationInfo->analyticJacobians[index].seedVars[1]= 0.000000
LOG_DSS           | warning | jacobian 1x2 [id: 0]
|                 | |       | | -0.00000e+00 0.00000e+00 
|                 | |       | | pipeHt1.v
|                 | |       | | pipeHt1.phi
assert            | debug   | Error, singular Jacobian for dynamic state selection at time 0.002000
|                 | |       | Use -lv LOG_DSS_JAC to get the Jacobian
stdout            | warning | Integrator attempt to handle a problem with a called assert.
LOG_DSS_JAC       | info    | Caluculate one col:
|                 | |       | | seed: data->simulationInfo->analyticJacobians[index].seedVars[0]= 0.000000
|                 | |       | | seed: data->simulationInfo->analyticJacobians[index].seedVars[1]= 1.000000
LOG_DSS_JAC       | info    | Caluculate one col:
|                 | |       | | seed: data->simulationInfo->analyticJacobians[index].seedVars[0]= 1.000000
|                 | |       | | seed: data->simulationInfo->analyticJacobians[index].seedVars[1]= 0.000000
LOG_DSS           | warning | jacobian 1x2 [id: 0]
|                 | |       | | -0.00000e+00 0.00000e+00 
|                 | |       | | pipeHt1.v
|                 | |       | | pipeHt1.phi
assert            | debug   | Error, singular Jacobian for dynamic state selection at time 0.001000
|                 | |       | Use -lv LOG_DSS_JAC to get the Jacobian
stdout            | info    | model terminate | Simulation terminated by an assert at time: 0.001

comment:4 Changed 9 years ago by lochel

  • Milestone changed from Future to 1.9.4

comment:5 in reply to: ↑ 1 Changed 9 years ago by anonymous

Replying to dersh:

That file has just a single row of data after the header.

Have you try to change the stopTime? e.g 2.0

comment:6 Changed 9 years ago by dersh

Yes. In fact when I was first testing I was using 3600 sec for the stopTime and the error is still at step 1 (ie 3600/500) seconds.

comment:7 Changed 9 years ago by dersh

Additionally, I see the same error in a version where v should actually change in time, so the results should be different.
So, it really seems like it is successfully initializing, so time 0 is correct, but then is not using those values, but is instead using 0, at the first time step.

comment:8 Changed 9 years ago by wbraun

  • Component changed from *unknown* to Backend
  • Owner changed from somebody to wbraun
  • Status changed from new to assigned
  • Summary changed from No results in OMEdit to index reduction fails with a singular jacobian

comment:9 Changed 9 years ago by wbraun

For the symbolic jacobian I activated recently the module "wrapFunctionCall" which leads to a side effect, that the following assumption isn't true any more: all equations of the symbolic jacobian are none discrete, so no need to generate such.

comment:10 Changed 9 years ago by wbraun

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in 5a950a9.

comment:11 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.4-1.9.x

Milestone renamed

comment:12 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4-1.9.x to 1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.