Commit eec7e200 authored by hrchilds's avatar hrchilds
Browse files

Update from March 29, 2007

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@844 18c085ea-50e0-402c-830e-de6fd14e8384
parent a6fcb796
......@@ -40,6 +40,12 @@
# Removed incorrect instructions verbage regarding having to install
# plugin on both client and server.
#
# Mark C. Miller, Thu Mar 29 11:26:36 PDT 2007
# Added ability to have -c option specify a file. Re-arranged instructions
# a bit to make them clearer. Fixed some usage comments.
#
# Mark C. Miller, Thu Mar 29 13:21:55 PDT 2007
# Set email and reply-to fields of mutt's message
# ----------------------------------------------------------------------------
#
......@@ -64,14 +70,36 @@ cleanPluginDir () {
makeInstructionsFile () {
typeset upperPluginName=`echo $pluginName | tr \[a-z\] \[A-Z\]`
cat > $1 <<- EOF
The associated tarball is a VisIt plugin. This update is being
furnished to you to address the following problem(s)...
rm -f $1
echo "The associated tarball is a VisIt plugin. This update is being" > $1
echo "furnished to you to address the following problem(s)..." >> $1
echo "" >> $1
if test -n "$commentSource"; then
if test -e "$commentSource"; then
cat "$commentSource" >> $1
else
echo "$commentSource" >> $1
fi
echo "" >> $1
fi
if test $testBuild -ne 0; then
if test -n "$testRun"; then
echo "Prior to sending you this tarball, it was confirmed to build and" >> $1
echo "run correctly with version $versionBuiltWith of VisIt." >> $1
echo "" >> $1
else
echo "Prior to sending you this tarball, it was confirmed to build with" >> $1
echo "version $versionBuiltWith of VisIt." >> $1
echo "" >> $1
fi
fi
$commentString
cat >> $1 <<- EOF
Simple commands for installing and UNinstalling a plugin
(Works in most cases)
(Works in most cases for VisIt versions 1.6 and newer)
--------------------------------------------------------------
(Note: no '.tar.gz' after the plugin's name)
To install...
......@@ -95,6 +123,20 @@ cat > $1 <<- EOF
Additional information to be aware of
-------------------------------------
If you would like VisIt to test the plugin and automatically
uninstall it if the test fails and the visit_plugin tool is
available in your installation, give the command
% visit_plugin -install . -testrun <Filename>:<PlotType>:<Varname>
VisIt will build the plugin, install it and then attempt to open
the specified file and display the specified plot with the
specified variable. If this test fails, VisIt will automatically
uninstall the plugin and inform you of the failure.
If the tarball we've sent you was test-run'd before we emailed it
to you, installing it will automatically behave as described above.
That is, it will automatically attempt to run the plugin and, if
it cannot, UNinstall it.
If you are running a version of VisIt that is older than the most
current release, be aware there is always a chance the plugin
will not install or, once installed, not run correctly. You may
......@@ -103,25 +145,6 @@ cat > $1 <<- EOF
trys to avoid this situation but depending on where we are in a
release cycle, it can crop up and is something to be aware of.
EOF
if test $testBuild -ne 0; then
if test -n "$testRun"; then
cat >> $1 <<- EOF
Prior to sending you this tarball, it was confirmed to build and
run correctly with version $versionBuiltWith of VisIt.
EOF
else
cat >> $1 <<- EOF
Prior to sending you this tarball, it was confirmed to build with
version $versionBuiltWith of VisIt.
EOF
fi
fi
cat >> $1 <<- EOF
The commands to install and uninstall a plugin create and remove
shared libraries in ~/.visit/<arch>/plugins/databases.
When VisIt starts up, it looks in ~/.visit/<arch>/plugins/databases
......@@ -142,11 +165,12 @@ cat >> $1 <<- EOF
you did not build and install it from sources) or if VisIt was
installed on your system without this database plugin,
then you will most likely have to use the Manual approach for
installing and UNinstalling the plugin. Also, you will most likely
have to modify the Makefile that gets created by xml2makefile to
specify the location(s) of any applicable third party include and
library files. Typically, you would do this by editing Makefile
and defining something like...
installing and UNinstalling the plugin. Also, if you know the
plugin you are using requires special purpose libraries to read
the files, you will have to modify the Makefile that gets created
by xml2makefile to specify the location(s) of these libraries.
Typically, you would do this by editing Makefile and defining
something like...
${upperPluginName}_INCLUDE="-I/usr/local/foo/include -I/usr/local/bar/include"
${upperPluginName}_LIB="-L/usr/local/foo/lib -lfoo -L/usr/local/bar/lib -lbar"
......@@ -162,19 +186,6 @@ cat >> $1 <<- EOF
${upperPluginName}_LIB like so...
${upperPluginName}_LIB="/usr/local/foo/lib/libfoo.a /usr/local/bar/lib/libbar.a"
If you would like VisIt to test the plugin and automatically
uninstall it if the test fails, give the command
% visit_plugin -install . -testrun <Filename>:<PlotType>:<Varname>
VisIt will build the plugin, install it and then attempt to open
the specified file and display the specified plot with the
specified variable. If this test fails, VisIt will automatically
uninstall the plugin and inform you of the failure.
If the tarball we've sent you was test-run'd before we emailed it
to you, installing it will automatically behave as described above.
That is, it will automatically attempt to run the plugin and, if
it cannot, UNinstall it from your private plugins.
EOF
}
......@@ -193,9 +204,9 @@ packagePluginDir () {
fi
if test -n "$testRun"; then
inputFileName=`echo $testRun | cut -d':' -f1`
pushd
pushd 1>/dev/null 2>&1
cp $inputFileName $TMPDIR/${theDir}_tmp.$$/$theDir/.
pushd
pushd 1>/dev/null 2>1
echo $testRun > $theDir/.TEST_RUN_COMMAND
fi
tar cf - $theDir | gzip > $theDir.tar.gz
......@@ -313,8 +324,9 @@ origArgs=$*
testBuild=0
versionBuiltWith=
testRun=
commentString="user requested update `date`"
commentSource="user requested update `date`"
dontRemoveTarball=0
meEmail=visit-help@llnl.gov
for options
do
case $1 in
......@@ -380,12 +392,21 @@ do
shift 2
fi
;;
-me)
if test -z "$2"; then
echo "Expected email address for $1"
optError=1
else
meEmail="$2"
shift 2
fi
;;
-c|-comment)
if test -z "$2"; then
echo "Expected quoted string for $1"
echo "Expected either quoted string or name of file for $1"
optError=1
else
commentString=$2
commentSource=$2
shift 2
fi
;;
......@@ -440,17 +461,22 @@ if test "$optError" = "1"; then
echo " -v | -versions quoted list of space separated version numbers(s)."
echo " Multiple -v options are also allowed."
echo " -p | -pack Pack up the plugin into a tarball for email."
echo " -i | -install Install the plugin."
echo " -i | -install Install the plugin from a .tar.gz file."
echo " -u | -uninstall Uninstall the plugin."
echo " -tb | -testbuild After packing up, test that it will build."
echo " -tr | -testrun <Filename:PlotType:VarName>"
echo " After packing up, test that it will run with"
echo " specified plot and variable. -tr implies -tb."
echo " -dr | dontremove Don't remove the tarball after its emailed."
echo " -dr | -dontremove Don't remove the tarball after its emailed."
echo " -e | -email email address or quoted list of email addresses"
echo " to send tarball too."
echo " -c | -comment Add a short comment to the email/readme file indicating"
echo " what is new about this plugin."
echo " to send tarball too. Multiple -email options are allowed"
echo " -me email address of person executing this script. Both the"
echo " sender and reply-to field of the email header will be set"
echo " to this address. Default is 'visit-help@llnl.gov'"
echo " -c | -comment <string>"
echo " Add a comment to the email/readme file indicating"
echo " what is new about this plugin. If <string> is the name"
echo " of a file, use the contents of the file."
echo " <plugin name> plugin name to process (e.g. SAMI or CGNS)."
echo " If -p is specified, $0 will search for directories with"
echo " the given name to package up. If -i is specified, $0 will"
......@@ -458,13 +484,6 @@ if test "$optError" = "1"; then
exit 1
fi
#
# This is supposed to be the email of the person executing this
# script (e.g. a VisIt developer most likely). I don't have
# a good way of generating it from a login name.
#
execEmail=unknown
#
# Set the versionBuilWith variable if we every need it
#
......@@ -552,11 +571,7 @@ if test $action = pack; then
chmod 700 $TMPDIR
makeInstructionsFile mutt.msg 1>/dev/null 2>&1
while true; do
if test "$execEmail" = "unknown"; then
mutt -s "Updated $pluginName plugin" -a $pluginName.tar.gz $emailRecipients < mutt.msg >& $TMPDIR/mutt.errors
else
mutt -c $execEmail -s "Updated $pluginName plugin" -a $pluginName.tar.gz $emailRecipients < mutt.msg
fi
env EMAIL="$meEmail" REPLYTO="$meEmail" mutt -s "Updated $pluginName plugin" -a $pluginName.tar.gz $emailRecipients < mutt.msg >& $TMPDIR/mutt.errors
if test -z "`cat $TMPDIR/mutt.errors`"; then
break;
else
......
#!/bin/sh
# Do a little magic to run perl from anywhere in your path.
lines=`cat $0 | wc -l`
lines=`expr $lines - 10`
tail -$lines $0 > /tmp/visitperl$$
echo "__END__" >> /tmp/visitperl$$
echo "$0 $*" >> /tmp/visitperl$$
exec perl /tmp/visitperl$$ $0 ${1+"$@"}
unlink($0);
$0 = shift @ARGV;
# ----------------------------------------------------------------------------
if (! -d "engine")
{
die "invoke $0 from the root of the VisIt source tree\n";
}
sub get ($@)
{
my ($dir, $recursearg) = @_;
@tmpfiles = `svn ls $recursearg $dir | egrep -v /\$`;
my @files = ();
foreach (@tmpfiles)
{
chomp;
push @files, "$dir/$_";
}
return @files
}
sub get_recursive ($@)
{
my ($dir) = @_;
return get($dir, "-R");
}
sub get_norecursive ($@)
{
my ($dir) = @_;
return get($dir, "");
}
@files = ();
push @files, get_norecursive ".";
push @files, get_recursive "./common";
push @files, get_recursive "./visit_vtk";
push @files, get_recursive "./engine";
push @files, get_recursive "./launcher";
push @files, get_recursive "./components";
push @files, get_recursive "./vtkqt";
push @files, get_recursive "./plots";
push @files, get_recursive "./operators";
push @files, get_recursive "./databases";
push @files, get_recursive "./winutil";
push @files, get_recursive "./viewer";
push @files, get_recursive "./gui";
push @files, get_recursive "./mdserver";
push @files, get_recursive "./visitpy";
push @files, get_recursive "./java";
push @files, get_recursive "./tools";
push @files, get_recursive "./sim";
push @files, get_recursive "./data";
push @files, get_recursive "./include";
push @files, get_recursive "./bin";
push @files, get_recursive "./exe";
push @files, get_norecursive "./lib";
push @files, get_norecursive "./help";
push @files, get_recursive "./archives";
push @files, get_recursive "./plugins";
push @files, get_recursive "./clearcase_bin";
push @files, get_recursive "./config-site";
push @files, get_recursive "./cqscore";
push @files, get_recursive "./third_party_builtin";
foreach (sort @files)
{
print "$_\n";
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -65,6 +65,10 @@
// Jeremy Meredith, Wed Feb 16 15:01:40 PST 2005
// Initialized members to disable MIR and Expressions.
//
// Jeremy Meredith, Tue Mar 27 17:16:23 EDT 2007
// Added a saved pipeline spec in case we need to re-execute the
// pipeline to get the requested variables.
//
// ****************************************************************************
avtDatabaseWriter::avtDatabaseWriter()
......@@ -79,6 +83,7 @@ avtDatabaseWriter::avtDatabaseWriter()
shouldChangeTotalZones = false;
nTargetChunks = 1;
targetTotalZones = 1;
savedPipelineSpec = NULL;
}
......@@ -197,6 +202,16 @@ avtDatabaseWriter::Write(const std::string &filename,
// Hank Childs, Thu Mar 30 12:05:56 PST 2006
// Do not assume we are writing a mesh. It might be a curve.
//
// Jeremy Meredith, Tue Mar 27 17:11:14 EDT 2007
// Fixed a number of bugs: (a) in parallel with all or specified
// variables, all processors execute and save all domains, (b) chunk
// IDs are not guaranteed to be unique or sequential, (c) the number
// of domains/blocks is incorrectly taken from the metadata instead
// of using what was actually in the data tree.
//
// Hank Childs, Wed Mar 28 10:29:36 PDT 2007
// Add support for "default".
//
// ****************************************************************************
void
......@@ -221,8 +236,11 @@ avtDatabaseWriter::Write(const std::string &filename,
// here.
//
avtTerminatingSource *src = dob->GetTerminatingSource();
avtPipelineSpecification_p spec =
src->GetGeneralPipelineSpecification();
avtPipelineSpecification_p spec;
if (*savedPipelineSpec)
spec = savedPipelineSpec;
else
spec = src->GetGeneralPipelineSpecification();
avtDataSpecification_p ds = spec->GetDataSpecification();
std::string meshname;
if (md->GetNumMeshes() > 0)
......@@ -230,7 +248,8 @@ avtDatabaseWriter::Write(const std::string &filename,
else if (md->GetNumCurves() > 0)
meshname = md->GetCurve(0)->name;
else
EXCEPTION0(ImproperUseException);
EXCEPTION1(ImproperUseException,
"No meshes or curves appear to exist");
//
// We want to process all of the variables in the dataset, so dummy up
......@@ -241,6 +260,9 @@ avtDatabaseWriter::Write(const std::string &filename,
{
for (j = 0 ; j < varlist.size() ; j++)
{
if (varlist[j] == "default")
varlist[j] = ds->GetVariable();
for (i = 0 ; i < md->GetNumScalars() ; i++)
{
const avtScalarMetaData *smd = md->GetScalar(i);
......@@ -352,6 +374,11 @@ avtDatabaseWriter::Write(const std::string &filename,
//
// Actually force the read of the data.
//
// Note: if we attempt to export in the middle
// of an already existing pipeline (e.g. via a
// hypothetical Export Operator, this call
// needs to be skipped.)
//
dob->Update(spec);
}
else
......@@ -369,15 +396,41 @@ avtDatabaseWriter::Write(const std::string &filename,
}
}
//
// Get the data tree
//
avtDataTree_p rootnode = GetInputDataTree();
//
// In parallel, we need to find a start chunk ID for this processor
// to guarantee that chunk IDs go from 0..n-1 across all processors.
//
int numMyChunks = rootnode->GetNumberOfLeaves();
int arrlen = PAR_Size()+1;
int *startIndexArrayTmp = new int[arrlen];
int *startIndexArray = new int[arrlen];
for (int i=0; i<arrlen; i++)
startIndexArrayTmp[i] = (i>PAR_Rank()) ? numMyChunks : 0;
SumIntArrayAcrossAllProcessors(startIndexArrayTmp,startIndexArray,arrlen);
int numTotalChunks = startIndexArray[arrlen-1];
int startIndex = startIndexArray[PAR_Rank()];
delete[] startIndexArrayTmp;
delete[] startIndexArray;
if (numTotalChunks == 0)
{
EXCEPTION1(ImproperUseException, "Dataset to export was empty. "
"It is possible an invalid variable was requested.");
}
//
// Call virtual function that the derived type re-defines to do the
// actual writing. All of the remaining code is devoted to writing out
// the file.
//
OpenFile(filename);
OpenFile(filename, numTotalChunks);
WriteHeaders(md, scalarList, vectorList, materialList);
avtDataTree_p rootnode = GetInputDataTree();
std::vector<avtDataTree_p> nodelist;
nodelist.push_back(rootnode);
......@@ -385,6 +438,7 @@ avtDatabaseWriter::Write(const std::string &filename,
// This 'for' loop is a bit tricky. We are adding to the nodelist as we
// go, so nodelist.size() keeps going. This is in lieu of recursion.
//
int chunkID = startIndex;
for (int cur_index = 0 ; cur_index < nodelist.size() ; cur_index++)
{
avtDataTree_p dt = nodelist[cur_index];
......@@ -398,11 +452,8 @@ avtDatabaseWriter::Write(const std::string &filename,
else
{
vtkDataSet *in_ds = dt->GetDataRepresentation().GetDataVTK();
int chunk = dt->GetDataRepresentation().GetDomain();
if (md->GetFormatCanDoDomainDecomposition())
chunk = PAR_Rank();
WriteChunk(in_ds, chunk);
WriteChunk(in_ds, chunkID);
chunkID++;
}
}
......@@ -410,3 +461,24 @@ avtDatabaseWriter::Write(const std::string &filename,
}
// ****************************************************************************
// Method: avtDatabaseWriter::SetPipelineSpecToUse
//
// Purpose:
// Save a pipeline specification to use when re-executing a pipeline.
/// If this is not set by the caller, then all processors will
// get all domains if the pipeline re-executes, which is a problem
// in parallel.
//
// Arguments:
// ps the pipeline specification to use later
//
// Programmer: Jeremy Meredith
// Creation: March 28, 2007
//
// ****************************************************************************
void
avtDatabaseWriter::SetPipelineSpecToUse(avtPipelineSpecification_p ps)
{
savedPipelineSpec = ps;
}
......@@ -89,6 +89,11 @@ class avtDatabaseMetaData;
// Hank Childs, Tue Sep 27 10:21:36 PDT 2005
// Use virtual inheritance.
//
// Jeremy Meredith, Tue Mar 27 17:17:16 EDT 2007
// Pass the number of blocks into the OpenFile virtual function,
// because we can't trust the meta data. Also, allow for a saved
// pipeline specification in case we need to re-execute the pipeline.
//
// ****************************************************************************
class PIPELINE_API avtDatabaseWriter : public virtual avtOriginatingDatasetSink
......@@ -113,6 +118,7 @@ class PIPELINE_API avtDatabaseWriter : public virtual avtOriginatingDatasetSink
bool SetTargetChunks(int nChunks);
bool SetTargetZones(VISIT_LONG_LONG nTotalZones);
void SetVariableList(std::vector<std::string> &);
void SetPipelineSpecToUse(avtPipelineSpecification_p ps);
protected:
bool shouldAlwaysDoMIR;
......@@ -126,9 +132,11 @@ class PIPELINE_API avtDatabaseWriter : public virtual avtOriginatingDatasetSink
int nTargetChunks;
VISIT_LONG_LONG targetTotalZones;
avtPipelineSpecification_p savedPipelineSpec;
virtual bool CanHandleMaterials(void) { return false; };
virtual void OpenFile(const std::string &) = 0;
virtual void OpenFile(const std::string &, int) = 0;
virtual void WriteHeaders(const avtDatabaseMetaData *,
std::vector<std::string>&,std::vector<std::string>&,
std::vector<std::string> &) = 0;
......
......@@ -56,7 +56,8 @@
#include <vtkImageMapper.h>
#include <vtkMatrix4x4.h>
#include <vtkRenderer.h>
#include <vtkTIFFReader.h>
#include <vtkTextMapper.h>
#include <vtkTextProperty.h>
#include <ImproperUseException.h>
#include <DebugStream.h>
......@@ -96,12 +97,29 @@ static bool GetCameraLeftEye(const vtkCamera *const vtkCam)
// Programmer: Mark C. Miller
// Creation: December 7, 2002
//
// Modifications:
//
// Mark C. Miller, Wed Mar 28 15:56:15 PDT 2007
// Added stuff to support the 'in-progress' visual queue
//
// ****************************************************************************
avtExternallyRenderedImagesActor::avtExternallyRenderedImagesActor()
{
myMapper = vtkImageMapper::New();
visualQueueMapper = vtkTextMapper::New();
visualQueueProps = vtkTextProperty::New();
dummyImage = vtkImageData::New();
visualQueueProps->SetJustificationToCentered();
visualQueueProps->SetVerticalJustificationToCentered();
visualQueueProps->BoldOn();
visualQueueProps->SetFontSize(24);
visualQueueProps->SetColor(1.0, 0.0, 0.0);
visualQueueMapper->SetInput("Waiting for parallel rendering...");
visualQueueMapper->SetTextProperty(visualQueueProps);
lastNonDummyImage = NULL;
myMapper->SetInput(dummyImage);
myMapper->SetColorWindow(255);
......@@ -111,6 +129,9 @@ avtExternallyRenderedImagesActor::avtExternallyRenderedImagesActor()
extRenderCallback = NULL;
extRenderCallbackArgs = NULL;
makeExternalRenderRequests = false;
for (int i = 0; i < sizeof(renderTimeHistory)/sizeof(renderTimeHistory[0]); i++)
renderTimeHistory[i] = 0.0;
rtIdx = 0;
}
......@@ -120,9 +141,13 @@ avtExternallyRenderedImagesActor::avtExternallyRenderedImagesActor()
// Programmer: Mark C. Miller
// Creation: December 7, 2002
//
// Kathleen Bonnell, Fri Jan 7 15:11:25 PST 2005
// Fix memory leak -- delete dummyImage.
// Modifications:
//
// Kathleen Bonnell, Fri Jan 7 15:11:25 PST 2005
// Fix memory leak -- delete dummyImage.
//
// Mark C. Miller, Wed Mar 28 15:56:15 PDT 2007
// Added stuff to support the 'in-progress' visual queue
// ****************************************************************************
avtExternallyRenderedImagesActor::~avtExternallyRenderedImagesActor()
......@@ -147,6 +172,16 @@ avtExternallyRenderedImagesActor::~avtExternallyRenderedImagesActor()
dummyImage->Delete();
dummyImage = NULL;
}
if (visualQueueMapper != NULL)
{
visualQueueMapper->Delete();
visualQueueMapper = NULL;
}
if (visualQueueProps != NULL)
{
visualQueueProps->Delete();
visualQueueProps = NULL;
}
}
......@@ -188,8 +223,9 @@ avtExternallyRenderedImagesActor::RegisterExternalRenderCallback(
// Mark C. Miller, Fri Jul 21 08:05:15 PDT 2006
// Build a buffer of args to pass multiple args to call back
//
// Mark C. Miller, Wed Mar 28 15:56:15 PDT 2007
// Added timing stuff to support the 'in-progress' visual queue
// ****************************************************************************
void
avtExternallyRenderedImagesActor::DoExternalRender(avtDataObject_p &dob,