Skip to content

Commit

Permalink
Fix for ubuntu coredump
Browse files Browse the repository at this point in the history
  • Loading branch information
tturocy committed May 24, 2024
1 parent a945950 commit 7215256
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
10 changes: 10 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
"features": {
"ghcr.io/devcontainers/features/python:1": {
"installTools": true,
"version": "3.11"
},
"ghcr.io/devcontainers-contrib/features/gdbgui:2": {
"version": "latest"
},
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
"packages": "automake,autoconf,gdb"
}
}
}
17 changes: 9 additions & 8 deletions src/solvers/logit/efglogit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,10 @@ List<LogitQREMixedBehaviorProfile> LogitBehaviorSolve(const LogitQREMixedBehavio
p_regret *= scale;
}

Game game = p_start.GetGame();
Vector<double> x(ProfileToPoint(p_start));
TracingCallbackFunction callback(p_start.GetGame(), p_observer);
EquationSystem system(p_start.GetGame());
TracingCallbackFunction callback(game, p_observer);
EquationSystem system(game);
tracer.TracePath(
[&system](const Vector<double> &p_point, Vector<double> &p_lhs) {
system.GetValue(p_point, p_lhs);
Expand All @@ -366,12 +367,11 @@ List<LogitQREMixedBehaviorProfile> LogitBehaviorSolve(const LogitQREMixedBehavio
system.GetJacobian(p_point, p_jac);
},
x, p_omega,
[p_start, p_regret](const Vector<double> &p_point) {
return RegretTerminationFunction(p_start.GetGame(), p_point, p_regret);
[game, p_regret](const Vector<double> &p_point) {
return RegretTerminationFunction(game, p_point, p_regret);
},
[&callback](const Vector<double> &p_point) -> void { callback.AppendPoint(p_point); });
// return callback.GetProfiles();
return List<LogitQREMixedBehaviorProfile>();
return callback.GetProfiles();
}

LogitQREMixedBehaviorProfile LogitBehaviorSolveLambda(const LogitQREMixedBehaviorProfile &p_start,
Expand All @@ -383,9 +383,10 @@ LogitQREMixedBehaviorProfile LogitBehaviorSolveLambda(const LogitQREMixedBehavio
tracer.SetMaxDecel(p_maxAccel);
tracer.SetStepsize(p_firstStep);

Game game = p_start.GetGame();
Vector<double> x(ProfileToPoint(p_start));
TracingCallbackFunction callback(p_start.GetGame(), p_observer);
EquationSystem system(p_start.GetGame());
TracingCallbackFunction callback(game, p_observer);
EquationSystem system(game);
tracer.TracePath(
[&system](const Vector<double> &p_point, Vector<double> &p_lhs) {
system.GetValue(p_point, p_lhs);
Expand Down

0 comments on commit 7215256

Please sign in to comment.