Commit 35013a0c authored by hrchilds's avatar hrchilds

Update from January 19, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@160 18c085ea-50e0-402c-830e-de6fd14e8384
parent df724bc6
......@@ -59,7 +59,7 @@ using std::string;
<< " RPC before an engine was started" << endl \
<< "**** on " << hostName << ". Starting an engine on " \
<< hostName << ".\n****" << endl; \
CreateEngine(hostName_, restartArguments); \
CreateEngine(hostName_, restartArguments, numRestarts); \
engineIndex = GetEngineIndex(hostName); \
} \
if(engineIndex >= 0) \
......@@ -81,7 +81,7 @@ using std::string;
retry = true; \
RemoveFailedEngine(engineIndex); \
LaunchMessage(hostName); \
CreateEngine(hostName_, restartArguments); \
CreateEngine(hostName_, restartArguments, numRestarts); \
++numAttempts; \
} \
else \
......@@ -180,6 +180,11 @@ using std::string;
UpdateEngineList(); \
return retval;
//
// to remember numRestarts across VEM destructors
//
static int numRestarts = -1;
//
// Global variables. These should be removed.
//
......@@ -226,6 +231,10 @@ static void UpdatePlotAttsCallback(void*,const string&,int,AttributeSubject*);
// Brad Whitlock, Fri Dec 27 12:00:59 PDT 2002
// I added initialization for restartArguments.
//
// Mark C. Miller, Sat Jan 17 12:40:16 PST 2004
// Changed numRestarts to file scope static and changed it numRestarts it
// gets initialized here
//
// ****************************************************************************
ViewerEngineManager::ViewerEngineManager() : ViewerServerManager(),
......@@ -234,7 +243,8 @@ ViewerEngineManager::ViewerEngineManager() : ViewerServerManager(),
executing = false;
nEngines = 0;
engines = 0;
numRestarts = 2;
if (numRestarts == -1)
numRestarts = 2;
avtCallback::RegisterImageCallback(GetImageCallback, this);
avtCallback::RegisterUpdatePlotAttributesCallback(UpdatePlotAttsCallback,
this);
......@@ -431,6 +441,9 @@ ViewerEngineManager::GetEngineIndex(const char *hostName) const
// parsed from the SSH_CLIENT (or related) environment variables. Added
// ability to specify an SSH port.
//
// Mark C. Miller, Sat Jan 17 12:40:16 PST 2004
// Changed how numRestarts is set
//
// ****************************************************************************
void
......@@ -443,7 +456,13 @@ ViewerEngineManager::CreateEngine(const char *hostName,
// Make sure that we're not using the string "localhost".
//
hostName = RealHostName(hostName);
numRestarts = numRestarts_;
if (numRestarts_ == -1)
{
if (numRestarts == -1)
numRestarts = 2;
}
else
numRestarts = numRestarts_;
//
// Check if an engine already exists for the host.
......@@ -886,7 +905,7 @@ ViewerEngineManager::GetEngine(const char *hostName_)
LaunchMessage(hostName);
// Try to launch an engine.
CreateEngine(hostName, restartArguments);
CreateEngine(hostName, restartArguments, numRestarts);
// Lookup the engine to see if it launched.
engineIndex = GetEngineIndex(hostName);
......
......@@ -119,6 +119,10 @@ typedef struct
// Mark C. Miller, Wed Oct 29 16:56:14 PST 2003
// Added method UseDataObjectReader
//
// Mark C. Miller, Sat Jan 17 12:40:16 PST 2004
// Removed 'numRestarts' data member. Made numRestarts argument to
// CreateEngine default to -1 (e.g. unknown)
//
// ****************************************************************************
class VIEWER_API ViewerEngineManager : public ViewerServerManager,
......@@ -133,7 +137,7 @@ class VIEWER_API ViewerEngineManager : public ViewerServerManager,
void CreateEngine(const char *hostname,
const std::vector<std::string> &arguments,
bool skipChooser=false,
int numRestarts=2);
int numRestarts=-1);
void CloseEngines();
void CloseEngine(const char *hostName);
void InterruptEngine(const char *hostName);
......@@ -210,7 +214,6 @@ class VIEWER_API ViewerEngineManager : public ViewerServerManager,
int nEngines;
EngineListEntry **engines;
std::vector<std::string> restartArguments;
int numRestarts;
// Global engine computation attributes
static MaterialAttributes *materialClientAtts;
......
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