Skip to content

Commit

Permalink
change memory limit to max RSS
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgurakgun committed Mar 25, 2024
1 parent bd76c1e commit 1a75904
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/conjure-help.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--use-existing-models=FILE</td><td style='padding-left:2ex;'>File names of Essence' models generated beforehand.<br />If given, Conjure skips the modelling phase and uses the existing models for solving.<br />The models should be inside the output directory (See -o).</td></tr>
<tr><td colspan='3'>runsolver:</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--runsolver-cpu-time-limit=INT</td><td style='padding-left:2ex;'>Use runsolver to limit total CPU time (in seconds)</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--runsolver-memory-limit=INT</td><td style='padding-left:2ex;'>Use runsolver to limit total memory usage (in megabytes). <br />This is the total memory usage: both RAM and swap space.</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--runsolver-memory-limit=INT</td><td style='padding-left:2ex;'>Use runsolver to limit total memory usage (Maximum RSS - in megabytes).</td></tr>
<tr><td colspan='3'>Options for other tools:</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--savilerow-options=ITEM</td><td style='padding-left:2ex;'>Options passed to Savile Row.</td></tr>
<tr><td style='padding-left:2ex;'>&nbsp;<td style='padding-left:1ex; white-space:nowrap;'>--solver-options=ITEM</td><td style='padding-left:2ex;'>Options passed to the backend solver.</td></tr>
Expand Down
3 changes: 1 addition & 2 deletions docs/conjure-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,7 @@
The models should be inside the output directory (See -o).
runsolver:
--runsolver-cpu-time-limit=INT Use runsolver to limit total CPU time (in seconds)
--runsolver-memory-limit=INT Use runsolver to limit total memory usage (in megabytes).
This is the total memory usage: both RAM and swap space.
--runsolver-memory-limit=INT Use runsolver to limit total memory usage (Maximum RSS - in megabytes).
Options for other tools:
--savilerow-options=ITEM Options passed to Savile Row.
--solver-options=ITEM Options passed to the backend solver.
Expand Down
3 changes: 1 addition & 2 deletions src/Conjure/UI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,7 @@ ui = modes
&= name "runsolver-memory-limit"
&= groupname "runsolver"
&= explicit
&= help "Use runsolver to limit total memory usage (in megabytes). \n\
\This is the total memory usage: both RAM and swap space."
&= help "Use runsolver to limit total memory usage (Maximum RSS - in megabytes)."
, logLevel
= def
&= name "log-level"
Expand Down
2 changes: 1 addition & 1 deletion src/Conjure/UI/MainHelper.hs
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ savileRowNoParam ui@Solve{..} (modelPath, eprimeModel) = sh $ errExit False $ do
(outBase, modelPath, "<no param file>", ui)
tr (1::Int)
let runsolverArgs = maybe [] (\ limit -> ["-C", show limit]) runsolverCPUTimeLimit ++
maybe [] (\ limit -> ["-V", show limit]) runsolverMemoryLimit
maybe [] (\ limit -> ["-R", show limit]) runsolverMemoryLimit
(stdoutSR, solutions) <- partitionEithers <$>
if null runsolverArgs
then runHandle savilerowScriptName srArgs handler
Expand Down

0 comments on commit 1a75904

Please sign in to comment.