Commit f8e5835e authored by miller86's avatar miller86
Browse files

adding -exec-timeout CL option to engine; deprecating -timeout in favor of -idle-timeout

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12636 18c085ea-50e0-402c-830e-de6fd14e8384
parent 7b1287e7
......@@ -657,6 +657,10 @@ $0 = shift @ARGV;
# Hank Childs, Tue Aug 31 19:55:04 PDT 2010
# Another change for longhorn.
#
# Mark C. Miller, Tue Sep 28 16:15:25 PDT 2010
# Added usage notes for -idle-timeout and -exec-timeout. Note that
# -timeout was never documented here and I deprecated it in engine so no
# need to document it here now.
###############################################################################
use POSIX qw(ceil);
......@@ -994,7 +998,23 @@ $fullusage = "$usage
processors maximally for 5 seconds before inserting
sleeps such that polling happens at the rate of 20
times per second.
-idle-timeout <int> An integer representing the number of minutes an
engine is allowed to idle (e.g. sit there doing no
executation whatsoever, waiting for commands from
the viewer). If this timeout is reached, the engine
will terminate itself. The default is 480 minutes
(8 hours).
-exec-timeout <int> An integer representing the number of minutes an
executing engine is allowed to remain in the
execution of any single command from the viewer.
If this timeout is reached, the engine will
terminate itself. the default is 30 minutes.
Beware that among other things, this timeout
effects how long orphaned parallel processes will
hang around, tying up parallel compute resources,
following an exit-triggering error condition on
any one process.
Developer options (most for xml2... tools)
---------------------------------------------------------------------------
-public xml2cmake: force install plugins publicly
......
......@@ -1782,6 +1782,9 @@ Engine::ProcessInput()
// Tom Fogal, Fri Apr 16 12:40:09 MDT 2010
// Ignore IceT flags if we've already seen -hw-accel.
//
// Mark C. Miller, Tue Sep 28 16:13:17 PDT 2010
// Added new name for '-timeout' option, '-idle-timeout' plus deprecation
// warning. Added '-exec-timeout' to control execution timeout option.
// ****************************************************************************
void
......@@ -1855,7 +1858,9 @@ Engine::ProcessCommandLine(int argc, char **argv)
visitTimer->WithholdOutput(true);
else if (strcmp(argv[i], "-never-output-timings") == 0)
visitTimer->NeverOutput(true);
else if (strcmp(argv[i], "-timeout") == 0)
else if (strcmp(argv[i], "-timeout") == 0 ||
strcmp(argv[i], "-idle-timeout") == 0 ||
strcmp(argv[i], "-exec-timeout") == 0)
{
if (i+1 < argc)
{
......@@ -1864,19 +1869,28 @@ Engine::ProcessCommandLine(int argc, char **argv)
long int to = strtol(argv[i+1], &endptr, 10);
if (*(argv[i+1]) != '\0' && *endptr == '\0' && errno == 0)
{
idleTimeoutMins = (int) to;
if (strcmp(argv[i], "-timeout") == 0)
{
cerr << "-timeout option will soon be deprecated. Use -idle-timeout or -exec-timeout." << endl;
debug1 << "-timeout option will soon be deprecated. Use -idle-timeout or -exec-timeout." << endl;
idleTimeoutMins = (int) to;
}
else if (strcmp(argv[i], "-idle-timeout") == 0)
idleTimeoutMins = (int) to;
else
executionTimeoutMins = (int) to;
}
else
{
cerr << "-timeout option ignored due to bad argument." << endl;
debug1 << "-timeout option ignored due to bad argument." << endl;
cerr << "\"" << argv[i] << "\" option ignored due to bad argument." << endl;
debug1 << "\"" << argv[i] << "\" option ignored due to bad argument." << endl;
}
i++;
}
else
{
cerr << "-timeout option ignored due to missing argument." << endl;
debug1 << "-timeout option ignored due to missing argument." << endl;
cerr << "\"" << argv[i] << "\" option ignored due to missing argument." << endl;
debug1 << "\"" << argv[i] << "\" option ignored due to missing argument." << endl;
}
}
else if (strcmp(argv[i], "-ui-bcast-thresholds") == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment