Commit c703b77d authored by hrchilds's avatar hrchilds

Update from June 26, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@22 18c085ea-50e0-402c-830e-de6fd14e8384
parent f6095fca
......@@ -211,6 +211,15 @@ $0 = shift @ARGV;
# but since 1.0. This should be removed when the oldest previous
# version anyone will want to run is 1.1.4.
#
# Jeremy Meredith, Thu Jun 26 10:05:12 PDT 2003
# Added support for LANL's Q machine: I added a hack to update
# the user's paths. I allowed the VCL to be launched in parallel.
# I Added a parallel launcher ("-pl") argument. It is much
# like "-l", except it will only be triggered when launching the
# engine. I made the number of processors to be passed to the
# parallel launcher only when the number of processors was actually
# set. I added support for "bsub" as a launcher.
#
###############################################################################
......@@ -295,6 +304,7 @@ USAGE: visit [arguments]
Parallel arguments:
-par Select the parallel version. (optional)
-l <method> Launch in parallel using the given method.
-pl <method> Launch only the engine in parallel as specified.
-la <args> Additional arguments for the parallel launcher.
-np <# procs> The number of processors to use.
-nn <# nodes> The number of nodes to allocate.
......@@ -360,6 +370,7 @@ while (scalar(@ARGV) > 0) {
elsif ($arg eq "-np") { $procs= shift; $procs_set= 1; $parallel = 1; }
elsif ($arg eq "-nn") { $nodes= shift; $nodes_set= 1; }
elsif ($arg eq "-l") { $launch=shift; $launch_set=1; }
elsif ($arg eq "-pl") { $parlaunch=shift; $parlaunch_set=1; }
elsif ($arg eq "-la") { $_=shift; @launchargs=split; $launchargs_set=1; }
elsif ($arg eq "-n" ) { $name = shift; $name_set = 1; }
elsif ($arg eq "-p" ) { $part = shift; $part_set = 1; }
......@@ -447,6 +458,22 @@ if ($ver_set)
}
}
# ----
# HACK for LANL's Q machine:
#
# If we're on LANL's Q machine, then we need to make sure BSUB is in our
# path and that libstdc++ and libmpi are in our library path.
# ----
if ($host =~ /^q\d+$/ || $host =~ /^qfe\d$/)
{
$ENV{PATH} = join ':' , ("$ENV{PATH}","/lsfdir/Q/4.2/alpha5-rms/bin");
$ENV{LD_LIBRARY_PATH} = join ':' ,
("$ENV{LD_LIBRARY_PATH}",
"/usr/local/gnu/packages/gcc-3.0.4/lib",
"/lsfdir/Q_CD/4.2/alpha5-rms/lib",
"/usr/local/opt/Compaq_MPI_64_2.5UK1_r1/usr/shlib");
}
# -----------------------------------------------------------------------------
# Check for errors
# -----------------------------------------------------------------------------
......@@ -467,7 +494,9 @@ if (($procs_set) and ($procs < 1))
exit 1;
}
if ((($parallel) or ($launchengine)) and ($exe_name ne "engine"))
if ((($parallel) or ($launchengine)) and
($exe_name ne "engine") and
($exe_name ne "vcl"))
{
# If we're trying to run in parallel, or we've been explicitly
# told to launch an engine, add any parallel arguments back on
......@@ -586,6 +615,15 @@ if ($exe_name eq "engine")
{
$exe_name .= "_ser" if (!$parallel);
$exe_name .= "_par" if ($parallel);
# if we've designated a parallel launcher, then we are sharing
# one batch job between the mdserver and engine (through the vcl)
# so: if we're launching a parallel engine with -pl specified, then
# make the real launcher the parallel launcher
if ($parallel and $parlaunch_set)
{
$launch = $parlaunch;
}
}
# If a directory was specified or the executable exists in a first-level bin
......@@ -786,14 +824,14 @@ $ENV{MESA_GLX_FX} = disable;
@visitcmd = ("$visitbindir/$exe_name", @visitargs);
$printonly = grep(/^$exe_name$/, @norun) unless ($debug_totalview);
if ($procs_set)
if ($procs_set or ($parallel and $parlaunch_set))
{
# mpirun
if ($launch eq "mpirun")
{
@parcmd = ("mpirun");
push @parcmd, @launchargs if $launchargs_set;
push @parcmd, "-np", $procs;
push @parcmd, "-np", $procs if $procs_set;
push @parcmd, "-p", $part if $part_set;
push @parcmd, @visitcmd;
......@@ -806,7 +844,7 @@ if ($procs_set)
{
@parcmd = ("dmpirun");
push @parcmd, @launchargs if $launchargs_set;
push @parcmd, "-np", $procs;
push @parcmd, "-np", $procs if $procs_set;
push @parcmd, "-p", $part if $part_set;
push @parcmd, @visitcmd;
......@@ -819,7 +857,7 @@ if ($procs_set)
{
@parcmd = @visitcmd;
push @parcmd, @launchargs if $launchargs_set;
push @parcmd, "-procs", $procs;
push @parcmd, "-procs", $procs if $procs_set;
push @parcmd, "-nodes", $nodes if $nodes_set;
push @parcmd, "-rmpool", $part if $part_set;
......@@ -832,7 +870,7 @@ if ($procs_set)
{
@parcmd = ("prun");
push @parcmd, @launchargs if $launchargs_set;
push @parcmd, "-n", $procs;
push @parcmd, "-n", $procs if $procs_set;
push @parcmd, "-N", $nodes if $nodes_set;
push @parcmd, "-p", $part if $part_set;
push @parcmd, @visitcmd;
......@@ -858,7 +896,7 @@ if ($procs_set)
@parcmd = ("psub");
push @parcmd, @launchargs if $launchargs_set;
push @parcmd, "-x";
push @parcmd, "-g", $procs;
push @parcmd, "-g", $procs if $procs_set;
push @parcmd, "-ln", $nodes if $nodes_set;
push @parcmd, "-r", $name if $name_set;
push @parcmd, "-c", $part if $part_set;
......@@ -869,12 +907,29 @@ if ($procs_set)
@printcmd = @parcmd;
push @printcmd, ("\"".(pop @printcmd)."\"");
}
# bsub
elsif (substr($launch,0,4) eq "bsub")
{
($bsubcmd, $sublauncher) = split /\W+/, substr($launch,4);
$sublauncher = "" if (!defined $sublauncher);
if ($security_key_set) { push @visitcmd, "-key", $security_key; }
@parcmd = ("bsub");
push @parcmd, "-I";
push @parcmd, @launchargs if $launchargs_set;
push @parcmd, "-n", $procs if $procs_set;
push @parcmd, "-q", $part if $part_set;
push @parcmd, "-W" , $time if $time_set;
push @parcmd, $sublauncher;
push @parcmd, @visitcmd;
@printcmd = @parcmd;
push @printcmd, ("\"".(pop @printcmd)."\"");
}
# yod
elsif ($launch eq "yod")
{
@parcmd = ("/cougar/bin/yod");
push @parcmd, @launchargs if $launchargs_set;
push @parcmd, "-sz", $procs;
push @parcmd, "-sz", $procs if $procs_set;
push @parcmd, @visitcmd;
@printcmd = @parcmd;
......
......@@ -16,7 +16,112 @@
<Field name="id" type="stringVector">Streamline_1.0 </Field>
<Field name="enabled" type="intVector">0 </Field>
</Object>
<Object name="HostProfileList" childObjects="25">
<Object name="HostProfileList" childObjects="30">
<Object name="HostProfile" childObjects="0">
<Field name="shareOneBatchJob" type="bool">true</Field>
<Field name="profileName" type="string">Q-LANL parallel ldevq</Field>
<Field name="host" type="string">qfe1.lanl.gov qfe2.lanl.gov</Field>
<Field name="hostAliases" type="string">qfe# q# q## q### q####</Field>
<Field name="timeout" type="int">240</Field>
<Field name="numProcessors" type="int">4</Field>
<Field name="partitionSet" type="bool">true</Field>
<Field name="partition" type="string">ldevq</Field>
<Field name="bankSet" type="bool">false</Field>
<Field name="bank" type="string"></Field>
<Field name="timeLimitSet" type="bool">false</Field>
<Field name="timeLimit" type="string"></Field>
<Field name="launchMethodSet" type="bool">true</Field>
<Field name="launchMethod" type="string">bsub</Field>
<Field name="forceStatic" type="bool">true</Field>
<Field name="forceDynamic" type="bool">false</Field>
<Field name="active" type="bool">true</Field>
<Field name="arguments" type="stringVector">-pl prun -dir /usr/projects/llnl_b/visit </Field>
<Field name="parallel" type="bool">true</Field>
</Object>
<Object name="HostProfile" childObjects="0">
<Field name="shareOneBatchJob" type="bool">true</Field>
<Field name="profileName" type="string">Q-LANL parallel lsmallq</Field>
<Field name="host" type="string">qfe1.lanl.gov qfe2.lanl.gov</Field>
<Field name="hostAliases" type="string">qfe# q# q## q### q####</Field>
<Field name="timeout" type="int">240</Field>
<Field name="numProcessors" type="int">4</Field>
<Field name="partitionSet" type="bool">true</Field>
<Field name="partition" type="string">lsmallq</Field>
<Field name="bankSet" type="bool">false</Field>
<Field name="bank" type="string"></Field>
<Field name="timeLimitSet" type="bool">false</Field>
<Field name="timeLimit" type="string"></Field>
<Field name="launchMethodSet" type="bool">true</Field>
<Field name="launchMethod" type="string">bsub</Field>
<Field name="forceStatic" type="bool">true</Field>
<Field name="forceDynamic" type="bool">false</Field>
<Field name="active" type="bool">false</Field>
<Field name="arguments" type="stringVector">-pl prun -dir /usr/projects/llnl_b/visit </Field>
<Field name="parallel" type="bool">true</Field>
</Object>
<Object name="HostProfile" childObjects="0">
<Field name="shareOneBatchJob" type="bool">true</Field>
<Field name="profileName" type="string">Q-LANL parallel lsmallq</Field>
<Field name="host" type="string">qfe1.lanl.gov qfe2.lanl.gov</Field>
<Field name="hostAliases" type="string">qfe# q# q## q### q####</Field>
<Field name="timeout" type="int">240</Field>
<Field name="numProcessors" type="int">4</Field>
<Field name="partitionSet" type="bool">true</Field>
<Field name="partition" type="string">lvizq</Field>
<Field name="bankSet" type="bool">false</Field>
<Field name="bank" type="string"></Field>
<Field name="timeLimitSet" type="bool">false</Field>
<Field name="timeLimit" type="string"></Field>
<Field name="launchMethodSet" type="bool">true</Field>
<Field name="launchMethod" type="string">bsub</Field>
<Field name="forceStatic" type="bool">true</Field>
<Field name="forceDynamic" type="bool">false</Field>
<Field name="active" type="bool">false</Field>
<Field name="arguments" type="stringVector">-pl prun -dir /usr/projects/llnl_b/visit </Field>
<Field name="parallel" type="bool">true</Field>
</Object>
<Object name="HostProfile" childObjects="0">
<Field name="shareOneBatchJob" type="bool">true</Field>
<Field name="profileName" type="string">Q-LANL parallel lsmallq</Field>
<Field name="host" type="string">qfe1.lanl.gov qfe2.lanl.gov</Field>
<Field name="hostAliases" type="string">qfe# q# q## q### q####</Field>
<Field name="timeout" type="int">240</Field>
<Field name="numProcessors" type="int">4</Field>
<Field name="partitionSet" type="bool">true</Field>
<Field name="partition" type="string">llargeq</Field>
<Field name="bankSet" type="bool">false</Field>
<Field name="bank" type="string"></Field>
<Field name="timeLimitSet" type="bool">false</Field>
<Field name="timeLimit" type="string"></Field>
<Field name="launchMethodSet" type="bool">true</Field>
<Field name="launchMethod" type="string">bsub</Field>
<Field name="forceStatic" type="bool">true</Field>
<Field name="forceDynamic" type="bool">false</Field>
<Field name="active" type="bool">false</Field>
<Field name="arguments" type="stringVector">-pl prun -dir /usr/projects/llnl_b/visit </Field>
<Field name="parallel" type="bool">true</Field>
</Object>
<Object name="HostProfile" childObjects="0">
<Field name="shareOneBatchJob" type="bool">true</Field>
<Field name="profileName" type="string">Q-LANL parallel lsmallq</Field>
<Field name="host" type="string">qfe1.lanl.gov qfe2.lanl.gov</Field>
<Field name="hostAliases" type="string">qfe# q# q## q### q####</Field>
<Field name="timeout" type="int">240</Field>
<Field name="numProcessors" type="int">4</Field>
<Field name="partitionSet" type="bool">true</Field>
<Field name="partition" type="string">lhighq</Field>
<Field name="bankSet" type="bool">false</Field>
<Field name="bank" type="string"></Field>
<Field name="timeLimitSet" type="bool">false</Field>
<Field name="timeLimit" type="string"></Field>
<Field name="launchMethodSet" type="bool">true</Field>
<Field name="launchMethod" type="string">bsub</Field>
<Field name="forceStatic" type="bool">true</Field>
<Field name="forceDynamic" type="bool">false</Field>
<Field name="active" type="bool">false</Field>
<Field name="arguments" type="stringVector">-pl prun -dir /usr/projects/llnl_b/visit </Field>
<Field name="parallel" type="bool">true</Field>
</Object>
<Object name="HostProfile" childObjects="0">
<Field name="profileName" type="string">serial</Field>
<Field name="host" type="string">adelie.llnl.gov</Field>
......
......@@ -21,7 +21,10 @@ class RemoteProcess;
// Creation: Fri May 2 14:12:55 PST 2003
//
// Modifications:
//
// Jeremy Meredith, Tue Jun 17 11:55:51 PDT 2003
// Added parallel functions that were only needed for the engine but
// that are helpful to have in the base class.
//
// ****************************************************************************
class PROXYBASE_API RemoteProxyBase
......@@ -40,6 +43,11 @@ public:
virtual bool Parallel() const;
virtual std::string GetComponentName() const = 0;
virtual void SetNumProcessors(int) { }
virtual void SetNumNodes(int) { }
virtual void SetLoadBalancing(int) { }
protected:
virtual void SetupComponentRPCs() = 0;
std::string GetVisItString() const;
......
......@@ -248,6 +248,7 @@ CreateMessageStrings(char **lists, int *count, int nl)
//
// Purpose:
// Match a pattern to a string, using normal '*' and '?' wildcards.
// Also match '#' to single numerical digits.
//
// Notes:
// Yes, recursive -- but it attempts to do a minimal number of recursion
......@@ -261,6 +262,10 @@ CreateMessageStrings(char **lists, int *count, int nl)
// Programmer: Jeremy Meredith
// Creation: February 12, 2002
//
// Modifications:
// Jeremy Meredith, Thu Jun 26 10:28:28 PDT 2003
// Added the '#' wildcard.
//
// ****************************************************************************
bool
WildcardStringMatch(const string &p, const string &s)
......@@ -287,9 +292,11 @@ WildcardStringMatch(const char *p, const char *s)
return false;
}
// first chars match ("?" matches any char), consume one char
if (*p == '?' ||
*p == *s)
// first chars match ("?" matches any char, "#" matches a digit),
// and consume one char
if ( *p == '?' ||
(*p == '#' && *s >= '0' && *s <= '9') ||
*p == *s)
{
return WildcardStringMatch(&p[1], &s[1]);
}
......
......@@ -149,6 +149,9 @@ class StatusAttributes;
// Brad Whitlock, Fri May 2 15:28:24 PST 2003
// I made it inherit from RemoteProxyBase.
//
// Jeremy Meredith, Thu Jun 26 10:31:39 PDT 2003
// Made the numprocs/nodes/lb methods virtual.
//
// ****************************************************************************
class ENGINE_PROXY_API EngineProxy : public RemoteProxyBase
......@@ -160,12 +163,12 @@ public:
virtual bool Parallel() const { return numProcs > 1; };
virtual std::string GetComponentName() const;
void SetNumProcessors(int np) { numProcs = np; };
void SetNumNodes(int nn) { numNodes = nn; };
void SetLoadBalancing(int lb) { loadBalancing = lb; };
int NumProcessors() const { return numProcs; };
int NumNodes() const { return numNodes; };
int LoadBalancing() const { return loadBalancing; };
virtual void SetNumProcessors(int np) { numProcs = np; };
virtual void SetNumNodes(int nn) { numNodes = nn; };
virtual void SetLoadBalancing(int lb) { loadBalancing = lb; };
virtual int NumProcessors() const { return numProcs; };
virtual int NumNodes() const { return numNodes; };
virtual int LoadBalancing() const { return loadBalancing; };
StatusAttributes *GetStatusAttributes() const;
......
......@@ -1530,6 +1530,9 @@ FileServerList::FileMatchesFilterList(const std::string &fileName,
// Brad Whitlock, Thu Sep 12 14:33:44 PST 2002
// Changed it so files that begin with '.' do not match the '*' filter.
//
// Jeremy Meredith, Thu Jun 26 10:32:59 PDT 2003
// Added a '#' wildcard that matches a single numerical digit.
//
// ****************************************************************************
bool
......@@ -1559,6 +1562,16 @@ FileServerList::FileMatchesFilter(const char *filter, const char *str, int &j)
return false;
}
break;
case '#':
if (str[i2] >= '0' && str[i2] <= '9')
{
i1++;
i2++;
} else
{
return false;
}
break;
case '*':
i1++;
val = (j == 0) ? (str[i2] != '.') : true;
......
......@@ -140,6 +140,9 @@ QvisHostProfileWindow::~QvisHostProfileWindow()
// Jeremy Meredith, Mon May 19 12:48:38 PDT 2003
// Added toggle button for sharing mdserver / engines in a single job.
//
// Jeremy Meredith, Thu Jun 26 10:37:09 PDT 2003
// Enabled the share-batch-job toggle.
//
// ****************************************************************************
void
QvisHostProfileWindow::CreateWindowContents()
......@@ -269,7 +272,6 @@ QvisHostProfileWindow::CreateWindowContents()
parLayout->addMultiCellWidget(shareMDServerCheckBox, prow,prow, 0,3);
connect(shareMDServerCheckBox, SIGNAL(toggled(bool)),
this, SLOT(toggleShareMDServer(bool)));
shareMDServerCheckBox->setEnabled(false);
prow++;
launchMethod = new QComboBox(false, parGroup, "launchMethod");
......@@ -635,6 +637,9 @@ QvisHostProfileWindow::UpdateProfileList()
// Jeremy Meredith, Mon Apr 14 17:21:25 PDT 2003
// Added hostAliases.
//
// Jeremy Meredith, Thu Jun 26 10:37:38 PDT 2003
// Update the share-batch-job toggle.
//
// ****************************************************************************
void
QvisHostProfileWindow::UpdateActiveProfile()
......@@ -709,6 +714,8 @@ QvisHostProfileWindow::UpdateActiveProfile()
timeout->setValue(current.GetTimeout());
parallelCheckBox->setChecked(current.GetParallel());
bool parEnabled = current.GetParallel();
if (parEnabled)
shareMDServerCheckBox->setChecked(current.GetShareOneBatchJob());
launchCheckBox->setChecked(parEnabled && current.GetLaunchMethodSet());
if (parEnabled && current.GetLaunchMethodSet())
{
......
......@@ -1216,6 +1216,8 @@ MDServerConnection::FileMatchesFilterList(const std::string &fileName,
// Creation: Wed Oct 4 15:18:18 PST 2000
//
// Modifications:
// Jeremy Meredith, Thu Jun 26 10:32:59 PDT 2003
// Added a '#' wildcard that matches a single numerical digit.
//
// ****************************************************************************
......@@ -1247,6 +1249,16 @@ MDServerConnection::FileMatchesFilter(const char *filter, const char *str,
return false;
}
break;
case '#':
if (str[i2] >= '0' && str[i2] <= '9')
{
i1++;
i2++;
} else
{
return false;
}
break;
case '*':
i1++;
val = (j == 0) ? (str[i2] != '.') : true;
......
......@@ -203,6 +203,9 @@
# Brad Whitlock, Fri May 2 15:49:25 PST 2003
# I added -lproxybase, -lvclproxy, and -lvclrpc to the list of libs.
#
# Jeremy Meredith, Thu Jun 26 10:39:54 PDT 2003
# Renamed ViewerEngineChooser to ViewerRemoteProcessChooser.
#
##############################################################################
##
......@@ -253,7 +256,6 @@ SRC= \
ViewerConfigManager.C \
ViewerConnectionProgressDialog.C \
ViewerEngineManager.C \
ViewerEngineChooser.C \
ViewerExpressionList.C \
ViewerFileServer.C \
ViewerHostProfileSelector.C \
......@@ -271,6 +273,7 @@ SRC= \
ViewerPopupMenu.C \
ViewerQuery.C \
ViewerQueryManager.C \
ViewerRemoteProcessChooser.C \
ViewerRPCObserver.C \
ViewerServerManager.C \
ViewerSubject.C \
......
......@@ -30,7 +30,7 @@
#include <WindowAttributes.h>
#include <DebugStream.h>
#include <ViewerConnectionProgressDialog.h>
#include <ViewerEngineChooser.h>
#include <ViewerRemoteProcessChooser.h>
#include <MaterialAttributes.h>
#include <avtCallback.h>
......@@ -409,6 +409,13 @@ ViewerEngineManager::GetEngineIndex(const char *hostName) const
// I moved some code into the base class and I made possible to launch
// the engine using a launcher program.
//
// Jeremy Meredith, Thu Jun 26 10:46:04 PDT 2003
// Allowed the engine to share a batch job with the mdserver. In this
// case, VCL gets launched in batch and the engine needs only add
// the 'par' arguments and can skip the profile chooser (since the
// user chose one when launching the VCL). Renamed ViewerEngineChooser
// to ViewerRemoteProcessChooser.
//
// ****************************************************************************
void
......@@ -433,13 +440,16 @@ ViewerEngineManager::CreateEngine(const char *hostName,
//
if(engineIndex < 0)
{
EngineProxy *newEngine =
ViewerEngineChooser::Instance()->GetNewEngine(clientAtts,hostName,
skipChooser);
ViewerRemoteProcessChooser *chooser =
ViewerRemoteProcessChooser::Instance();
if (!newEngine)
if (! chooser->SelectProfile(clientAtts,hostName,skipChooser))
return;
EngineProxy *newEngine = new EngineProxy;
chooser->AddProfileArguments(newEngine, !ShouldShareBatchJob(hostName));
//
// Add some arguments to the engine proxy before we try to
// launch the engine.
......@@ -475,7 +485,7 @@ ViewerEngineManager::CreateEngine(const char *hostName,
//
// Launch the engine.
//
if(HostIsLocalHost(hostName))
if (!ShouldShareBatchJob(hostName) && HostIsLocalHost(hostName))
newEngine->Create("localhost");
else
{
......@@ -508,7 +518,7 @@ ViewerEngineManager::CreateEngine(const char *hostName,
{
// Delete the new engine since it could not launch anyway.
delete newEngine;
ViewerEngineChooser::Instance()->ClearCache(hostName);
ViewerRemoteProcessChooser::Instance()->ClearCache(hostName);
// Tell the user that the engine could not be launched.
SNPRINTF(msg, 250, "VisIt could not launch a compute engine on host "
......@@ -521,7 +531,7 @@ ViewerEngineManager::CreateEngine(const char *hostName,
// Delete the new engine since talking to it could be bad since
// it is a different version.
delete newEngine;
ViewerEngineChooser::Instance()->ClearCache(hostName);
ViewerRemoteProcessChooser::Instance()->ClearCache(hostName);
// Tell the user that the engine is a different version.
SNPRINTF(msg, 250, "VisIt cannot use the compute engine on "
......@@ -534,7 +544,7 @@ ViewerEngineManager::CreateEngine(const char *hostName,
// Delete the new engine since talking to it could be bad since
// it did not provide the right credentials.
delete newEngine;
ViewerEngineChooser::Instance()->ClearCache(hostName);
ViewerRemoteProcessChooser::Instance()->ClearCache(hostName);
// Tell the user that the engine is a different version.
SNPRINTF(msg, 250, "VisIt cannot use the compute engine on host \"%s\""
......@@ -546,7 +556,7 @@ ViewerEngineManager::CreateEngine(const char *hostName,
{
// Delete the new engine since it was not launched
delete newEngine;
ViewerEngineChooser::Instance()->ClearCache(hostName);
ViewerRemoteProcessChooser::Instance()->ClearCache(hostName);
// Tell the user that the engine was not launched
SNPRINTF(msg, 250, "VisIt could not launch the compute engine on "
......@@ -557,7 +567,7 @@ ViewerEngineManager::CreateEngine(const char *hostName,
{
// Delete the new engine since it was not launched
delete newEngine;
ViewerEngineChooser::Instance()->ClearCache(hostName);
ViewerRemoteProcessChooser::Instance()->ClearCache(hostName);
// Tell the user that the engine was not launched
SNPRINTF(msg, 250, "The launch of the compute engine on "
......@@ -657,6 +667,9 @@ ViewerEngineManager::CloseEngines()
// Jeremy Meredith, Wed Aug 14 17:27:00 PDT 2002
// Added code to clear the cache for the engine launcher.
//
// Jeremy Meredith, Thu Jun 26 10:48:20 PDT 2003
// Renamed ViewerEngineChooser to ViewerRemoteProcessChooser.
//
// ****************************************************************************
void
......@@ -667,7 +680,7 @@ ViewerEngineManager::CloseEngine(const char *hostName)
// Since we're closing the engine intentionally, let us change
// the options the next time we launch an engine
ViewerEngineChooser::Instance()->ClearCache(realHostName);
ViewerRemoteProcessChooser::Instance()->ClearCache(realHostName);
char message[200];
int index = GetEngineIndex(realHostName);
......
......@@ -611,6 +611,10 @@ ViewerFileServer::StartServer(const std::string &host)
// I moved some code into the base class and made it possible to launch
// an mdserver through a launcher program.
//
// Jeremy Meredith, Thu Jun 26 10:49:08 PDT 2003
// Make the mdserver launch under the vcl if we're sharing a batch
// job with the engine.
//
// ****************************************************************************
void
......@@ -637,8 +641,10 @@ ViewerFileServer::StartServer(const std::string &host, const stringVector &args)
dialog = SetupConnectionProgressWindow(newServer, host);
// Start the mdserver on the specified host.
if(HostIsLocalHost(host))
if (!ShouldShareBatchJob(host) && HostIsLocalHost(host))
{
newServer->Create("localhost");
}
else
{
// Use VisIt's launcher to start the remote mdserver.
......
#ifndef VIEWERENGINECHOOSER_H
#define VIEWERENGINECHOOSER_H
#ifndef VIEWERREMOTEPROCESSCHOOSER_H
#define VIEWERREMOTEPROCESSCHOOSER_H
#include <viewer_exports.h>
#include <string>
class HostProfileList;
class EngineProxy;
class RemoteProxyBase;
class ViewerHostProfileSelector;
// ****************************************************************************
// Class: ViewerEngineChooser
// Class: ViewerRemoteProcessChooser
//
// Purpose:
// Picks a host profile and some parallel settings to launch the engine.
......@@ -28,23 +28,30 @@ class ViewerHostProfileSelector;
// Moved host-profile selection code to ViewerHostProfileSelector. Added
// member selector.
//
// Jeremy Meredith, Thu Jun 26 10:54:37 PDT 2003
// Renamed to ViewerRemoteProcessChooser. Split GetNewEngine into two
// functions (SelectProfile and AddProfileArguments) so that the caller
// could create a new proxy itself. This disassociates this object
// from the Engine and lets it be used with the VCL (for example).
//
// ****************************************************************************
class VIEWER_API ViewerEngineChooser
class VIEWER_API ViewerRemoteProcessChooser
{
public:
~ViewerEngineChooser();
~ViewerRemoteProcessChooser();
static ViewerEngineChooser *Instance();
static ViewerRemoteProcessChooser *Instance();
static void SetNoWinMode(bool nw);
EngineProxy *GetNewEngine(HostProfileList*, const std::string&, bool skip);
bool SelectProfile(HostProfileList*, const std::string&, bool skip);
void AddProfileArguments(RemoteProxyBase*, bool addParallelArgs);
void ClearCache(const std::string&);
private:
static bool nowin;
static ViewerEngineChooser *instance;
static ViewerRemoteProcessChooser *instance;
ViewerHostProfileSelector *selector;
ViewerEngineChooser();
ViewerRemoteProcessChooser();
};
#endif
......@@ -11,6 +11,7 @@
#include <ViewerConnectionProgressDialog.h>
#include <ViewerPasswordWindow.h>
#include <ViewerSubject.h>
#include <ViewerRemoteProcessChooser.h>
#include <DebugStream.h>
#include <avtCallback.h>
......@@ -266,6 +267,41 @@ ViewerServerManager::AddProfileArguments(RemoteProxyBase *component,
}
}
// ****************************************************************************
// Method: ViewerServerManager::ShouldShareBatchJob
//
// Purpose:
// This method finds a host profile that matches the specified hostname
// and checks if the MDServer and Engine should share a single batch
// job. (If so, then the launcher should start in batch.)
//
// Arguments:
// host : The host where the component will be run.
//
// Programmer: Jeremy Meredith
// Creation: June 17, 2003
//
// Modifications:
//
// ****************************************************************************
bool
ViewerServerManager::ShouldShareBatchJob(const std::string &host)
{
//
// Check for a host profile for the hostName. If one exists, check it.
//
const HostProfile *profile = clientAtts->FindMatchingProfileForHost(host);
if (profile != 0)
{
return profile->GetShareOneBatchJob();
}
else
{
return false;
}
}
// ****************************************************************************
// Method: ViewerServerManager::AddArguments
//
......@@ -404,6 +440,11 @@ ViewerServerManager::CloseLaunchers()
// Brad Whitlock, Tue Jun 10 14:21:38 PST 2003
// I made it use the visitPath if it is a valid value.
//
// Jeremy Meredith, Thu Jun 26 10:51:14 PDT 2003
// Added ability for launcher to start a parallel batch job
// for itself, the mdserver, and the engine if they are told
// to share one batch job in the host profile.
//
// ****************************************************************************
void
......@@ -412,7 +453,18 @@ ViewerServerManager::StartLauncher(const std::string &host,
{
if(launchers.find(host) == launchers.end())
{
// Create a new laucnher proxy and add the right arguments to it.
if (ShouldShareBatchJob(host))