Skip to content

Commit

Permalink
mcf: add workaround to avoid hang during tropical median
Browse files Browse the repository at this point in the history
needed until next polymake release.
somehow the system call behaves slightly different inside julia and
needs -q to quit automatically.
  • Loading branch information
benlorenz committed Feb 12, 2024
1 parent a537177 commit 46e5060
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Polymake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,13 @@ function __init__()
application("polytope")
shell_execute("require LPparser;")

# workaround until next polymake release to make sure mcf does not get stuck
Polymake.shell_execute(raw"""
if (application("graph")->configured->{"mcf.rules"} > 0) {
$mcf = "$mcf -q" unless ($mcf =~ / -q/);
}
""")

for app in call_function(:common, :startup_applications)
application(app)
end
Expand Down

0 comments on commit 46e5060

Please sign in to comment.