Skip to content

Commit

Permalink
Fix: Don't access AMICI rdata->x with non-full reporting mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Jul 27, 2020
1 parent b2a0035 commit 27fe478
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parpeamici/multiConditionProblem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ AmiciSimulationRunner::AmiciResultPackageSimple runAndLogSimulation(
* better exception handling, we check those fields to deduce where
* the error occurred
*/
bool forwardFailed = std::isnan(rdata->x[rdata->x.size() - 1]);
bool forwardFailed = std::isnan(rdata->llh);
bool backwardFailed = solver->getSensitivityOrder() >= amici::SensitivityOrder::first
&& solver->getSensitivityMethod() == amici::SensitivityMethod::adjoint
&& !rdata->sllh.empty() && std::isnan(rdata->sllh[0]);
Expand Down

0 comments on commit 27fe478

Please sign in to comment.