Commit 0ce3f805 authored by hrchilds's avatar hrchilds

Update from June 24, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@268 18c085ea-50e0-402c-830e-de6fd14e8384
parent 2251be9c
......@@ -322,6 +322,10 @@ $0 = shift @ARGV;
# Hank Childs, Sun May 9 11:48:58 PDT 2004
# Add a line to the usage regarding "default_format".
#
# Eric Brugger, Thu Jun 24 11:12:44 PDT 2004
# I modified the setting of the LD_LIBRARY_PATH so that /usr/local/lib
# is at the end of the path instead of at the beginning.
#
###############################################################################
......@@ -1066,7 +1070,7 @@ $ENV{LIBPATH} = "$visitlibdir:$ENV{LIBPATH}";
# Add /usr/local/lib to the shared library path. This was added for the
# c++ library on some sun systems, but it may have broader applicability.
$ENV{LD_LIBRARY_PATH} = "/usr/local/lib:$ENV{LD_LIBRARY_PATH}";
$ENV{LD_LIBRARY_PATH} = "$ENV{LD_LIBRARY_PATH}:/usr/local/lib";
# Set up some environment flags that let VisIt run on Darwin.
if($os eq "darwin")
......
......@@ -237,6 +237,9 @@ avtGenericDatabase::SetDatabaseMetaData(avtDatabaseMetaData *md, int timeState)
// Add OriginalNodesArray whenever MatSelect will be performed,
// to ensure that pick will operate correctly.
//
// Kathleen Bonnell, Wed Jun 23 17:04:23 PDT 2004
// Add TRY-CATCH, so that no process skips the parallel communication.
//
// ****************************************************************************
avtDataTree_p
......@@ -264,45 +267,66 @@ avtGenericDatabase::GetOutput(avtDataSpecification_p spec,
int nDomains = domains.size();
avtDatasetCollection datasetCollection(nDomains);
//
// This is the primary routine that reads things in from disk.
//
ReadDataset(datasetCollection, domains, spec, src);
//
// Now that we have read things in from disk, verify that the dataset
// is valid, since routines like the MIR downstream will assume they are.
//
avtDatasetVerifier verifier;
vtkDataSet **ds_list = new vtkDataSet*[nDomains];
int i;
for (i = 0 ; i < nDomains ; i++)
bool shouldDoMatSelect = false;
bool hadError = false;
TRY
{
ds_list[i] = datasetCollection.GetDataset(i, 0);
}
verifier.VerifyDatasets(nDomains, ds_list, domains);
delete [] ds_list;
//
// This is the primary routine that reads things in from disk.
//
ReadDataset(datasetCollection, domains, spec, src);
//
// Do species selection if appropriate.
//
vector<bool> speciesList;
if (trav.GetSpecies(speciesList))
{
SpeciesSelect(datasetCollection, domains, speciesList, spec, src);
}
//
// Now that we have read things in from disk, verify that the dataset
// is valid, since routines like the MIR downstream will assume they are.
//
avtDatasetVerifier verifier;
vtkDataSet **ds_list = new vtkDataSet*[nDomains];
int i;
for (i = 0 ; i < nDomains ; i++)
{
ds_list[i] = datasetCollection.GetDataset(i, 0);
}
verifier.VerifyDatasets(nDomains, ds_list, domains);
delete [] ds_list;
//
// Do species selection if appropriate.
//
vector<bool> speciesList;
if (trav.GetSpecies(speciesList))
{
SpeciesSelect(datasetCollection, domains, speciesList, spec, src);
}
//
// HACK!!! Pick requires original cells array whenever MaterialSelection
// has occurred. Rather than incur the expense of re-execution at StartPick,
// always send the array when MatSelected, until a better solution is derived.
//
bool shouldDoMatSelect = false;
for (i = 0 ; i < datasetCollection.GetNDomains() ; i++)
//
// HACK!!! Pick requires original cells array whenever
// MaterialSelection has occurred. Rather than incur the expense of
// re-execution at StartPick, always send the array when MatSelected,
// until a better solution is derived.
//
for (i = 0 ; i < datasetCollection.GetNDomains() ; i++)
{
shouldDoMatSelect = shouldDoMatSelect ||
datasetCollection.needsMatSelect[i];
}
}
CATCH2(VisItException, e)
{
shouldDoMatSelect = shouldDoMatSelect || datasetCollection.needsMatSelect[i];
//
// Only set an error condition, the early exit from this method
// is after the parallel communication. There may be a better
// way to handle this.
//
hadError = true;
debug1 << "Catching the exception at the generic database level." << endl;
avtDataValidity &v = src->GetOutput()->GetInfo().GetValidity();
v.ErrorOccurred();
string tmp = e.GetMessage(); // Otherwise there is a const problem.
v.SetErrorMessage(tmp);
}
ENDTRY
#ifdef PARALLEL
//
......@@ -315,6 +339,12 @@ avtGenericDatabase::GetOutput(avtDataSpecification_p spec,
shouldDoMatSelect = bool(shouldDoMatSelectAsIntCollective);
#endif
if (hadError)
{
avtDataTree_p rv = new avtDataTree();
return rv;
}
if (shouldDoMatSelect)
{
spec->TurnZoneNumbersOn();
......
......@@ -64,6 +64,11 @@ MIRConnectivity::~MIRConnectivity()
// Brad Whitlock, Tue Sep 23 09:41:14 PDT 2003
// Made it build on Windows.
//
// Jeremy Meredith, Wed Jun 23 15:31:07 PDT 2004
// Added true voxel cases. Doing a translation here forced us to do
// more translations later. It is both easier and faster to get the
// shape type correct.
//
// ****************************************************************************
void
......@@ -112,13 +117,13 @@ MIRConnectivity::SetUpConnectivity(vtkDataSet *ds)
*c++ = 8;
*c++ = zOff + yOff + i;
*c++ = zOff + yOff + i+1;
*c++ = zOff + yOff1 + i+1;
*c++ = zOff + yOff1 + i;
*c++ = zOff + yOff1 + i+1;
*c++ = zOff1 + yOff + i;
*c++ = zOff1 + yOff + i+1;
*c++ = zOff1 + yOff1 + i+1;
*c++ = zOff1 + yOff1 + i;
celltype[cell_idx++] = VTK_HEXAHEDRON;
*c++ = zOff1 + yOff1 + i+1;
celltype[cell_idx++] = VTK_VOXEL;
}
}
}
......@@ -141,9 +146,9 @@ MIRConnectivity::SetUpConnectivity(vtkDataSet *ds)
*c++ = 4;
*c++ = yOff + i;
*c++ = yOff + i+1;
*c++ = yOff1 + i+1;
*c++ = yOff1 + i;
celltype[cell_idx++] = VTK_QUAD;
*c++ = yOff1 + i+1;
celltype[cell_idx++] = VTK_PIXEL;
}
}
}
......
......@@ -75,6 +75,9 @@ CellReconstructor::~CellReconstructor()
// as it was blatantly wrong. The faster way was using matsAtCellOneAway,
// but it needed to be using matsAtCellOrig.
//
// Jeremy Meredith, Thu Jun 24 10:38:05 PDT 2004
// Added Voxel and Pixel input shapes.
//
// ****************************************************************************
void
CellReconstructor::ReconstructCell(int cellid_, int celltype_,
......@@ -248,6 +251,12 @@ CellReconstructor::ReconstructCell(int cellid_, int celltype_,
numOutput = numClipShapesHex[lookup_case];
vertices_from_edges = hexVerticesFromEdges;
break;
case VTK_VOXEL:
startIndex = startClipShapesVox[lookup_case];
splitCase = &clipShapesVox[startIndex];
numOutput = numClipShapesVox[lookup_case];
vertices_from_edges = voxVerticesFromEdges;
break;
case VTK_TRIANGLE:
startIndex = startClipShapesTri[lookup_case];
splitCase = &clipShapesTri[startIndex];
......@@ -260,6 +269,12 @@ CellReconstructor::ReconstructCell(int cellid_, int celltype_,
numOutput = numClipShapesQua[lookup_case];
vertices_from_edges = quadVerticesFromEdges;
break;
case VTK_PIXEL:
startIndex = startClipShapesPix[lookup_case];
splitCase = &clipShapesPix[startIndex];
numOutput = numClipShapesPix[lookup_case];
vertices_from_edges = pixelVerticesFromEdges;
break;
}
//
......
......@@ -53,6 +53,9 @@ typedef void (*ProgressCallback)(void *, const char *, const char *,int,int);
// Kathleen Bonnell, Tue May 4 14:18:26 PDT 2004
// Replaced SetSILUseSet with SetILRestriction.
//
// Kathleen Bonnell, Thu Jun 24 07:45:47 PDT 2004
// Added intVector and string arguments to PerformQueryInTime.
//
// ****************************************************************************
class QUERY_API avtDataObjectQuery : public virtual avtDataObjectSink
......@@ -68,7 +71,8 @@ class QUERY_API avtDataObjectQuery : public virtual avtDataObjectSink
virtual void PerformQuery(QueryAttributes *) = 0;
virtual void PerformQueryInTime(QueryAttributes *,
const int, const int, const int,
const int, doubleVector &) {;};
const int, doubleVector &, intVector &,
std::string &) {;};
virtual std::string GetResultMessage(void) = 0;
static void RegisterInitializeProgressCallback(
......
......@@ -3,13 +3,17 @@
// ************************************************************************* //
#include <avtDatasetQuery.h>
#include <avtSourceFromAVTDataset.h>
#include <vtkDataSet.h>
#include <DebugStream.h>
#include <BadIndexException.h>
#include <ImproperUseException.h>
#include <NoInputException.h>
#include <avtSourceFromAVTDataset.h>
#include <DebugStream.h>
#ifdef PARALLEL
#include <mpi.h>
#endif
// ****************************************************************************
......@@ -124,6 +128,7 @@ avtDatasetQuery::PerformQuery(QueryAttributes *qA)
// Creation: November 15, 2002
//
// ****************************************************************************
void
avtDatasetQuery::Execute(avtDataTree_p inDT)
{
......@@ -308,7 +313,16 @@ avtDatasetQuery::GetResultValue(const int i)
//
// Arguments:
// qA The attributes controlling this query.
// timeSteps The timespeps for this query.
// startT The starting timestep.
// endT The ending timestep.
// stride The stride between timesteps.
// timeType Indicates which type of time (cyle, time, timestep) to be
// returned in 'times.' (used for X-axis values).
// times A place to store the 'time'.
// skippedTimeSteps A place to store timesteps where an error
// was encountered.
// errorMessage A place to store a message concerning the type of error
// encountered.
//
// Programmer: Kathleen Bonnell
// Creation: March 24, 2004
......@@ -320,12 +334,19 @@ avtDatasetQuery::GetResultValue(const int i)
// Kathleen Bonnell, Thu May 6 13:43:01 PDT 2004
// Ensure that last time step doesn't get repreated.
//
// Kathleen Bonnell, Thu Jun 24 07:47:56 PDT 2004
// Added intVector and string arguments, to indicate error conditions.
// Added TRY-CATCH, and a test for Error in avtDataValidity. Skip
// the timestep in those cases and indicate in the args.
//
// ****************************************************************************
void
avtDatasetQuery::PerformQueryInTime(QueryAttributes *qA, const int startT ,
const int endT, const int stride,
const int timeType, doubleVector &times)
const int timeType, doubleVector &times,
intVector &skippedTimeSteps,
string &errorMessage)
{
queryAtts = *qA;
int nFrames = (int) ceil((((float)endT -startT))/(float)stride) + 1;
......@@ -353,6 +374,7 @@ avtDatasetQuery::PerformQueryInTime(QueryAttributes *qA, const int startT ,
avtDataObject_p origInput;
avtDataObject_p input = GetInput();
CopyTo(origInput, input);
avtDataObject_p dob;
for (i = startT; i < actualEnd; i+=stride)
{
if (i < endT)
......@@ -360,7 +382,45 @@ avtDatasetQuery::PerformQueryInTime(QueryAttributes *qA, const int startT ,
else
queryAtts.SetTimeStep(endT);
avtDataObject_p dob = ApplyFilters(origInput);
bool inError = false;
TRY
{
dob = ApplyFilters(origInput);
if (dob->GetInfo().GetValidity().HasErrorOccurred())
{
// If there was some kind of problem, we want to
// skip this timestep, but also note where the problem
// occurred.
origInput->GetInfo().GetValidity().ResetErrorOccurred();
dob->GetInfo().GetValidity().ResetErrorOccurred();
errorMessage = dob->GetInfo().GetValidity().GetErrorMessage();
inError = true;
}
}
CATCH2(VisItException, e)
{
errorMessage = e.GetMessage();
inError = true;
}
ENDTRY
#ifdef PARALLEL
//
// If any processor experienced a problem at this timestep,
// they all should skip further processing.
//
int hadError = (inError ? 1 : 0);
int collectiveHadError;;
MPI_Allreduce(&hadError, &collectiveHadError, 1, MPI_INT,
MPI_MAX, MPI_COMM_WORLD);
inError = bool(collectiveHadError);
#endif
if (inError)
{
skippedTimeSteps.push_back(queryAtts.GetTimeStep());
continue;
}
//
// Reset the input so that we have access to the data tree.
......
......@@ -55,6 +55,9 @@ class vtkDataSet;
// Kathleen Bonnell, Fri Apr 2 08:51:17 PST 2004
// Changed args to PerformQueryInTime.
//
// Kathleen Bonnell, Thu Jun 24 07:45:47 PDT 2004
// Added intVector and string arguments to PerformQueryInTime.
//
// ****************************************************************************
class QUERY_API avtDatasetQuery : public avtDataObjectQuery,
......@@ -68,7 +71,8 @@ class QUERY_API avtDatasetQuery : public avtDataObjectQuery,
virtual void PerformQuery(QueryAttributes *);
virtual void PerformQueryInTime(QueryAttributes*,
const int, const int, const int,
const int, doubleVector &);
const int, doubleVector &,
intVector &, std::string &);
virtual std::string GetResultMessage(void) { return resMsg; };
virtual void SetResultMessage(const std::string &m)
{ resMsg = m; };
......
......@@ -4,6 +4,8 @@
#include <float.h>
#include <snprintf.h>
#include <string.h>
#include <strstream.h>
#include <avtQueryOverTimeFilter.h>
#include <avtQueryFactory.h>
......@@ -36,12 +38,13 @@
#include <avtWeightedVariableSummationQuery.h>
#include <avtCallback.h>
#include <avtExtents.h>
#include <avtDatasetExaminer.h>
#include <avtExtents.h>
#include <VisItException.h>
#include <DebugStream.h>
using std::string;
//
// Function Prototypes
//
......@@ -117,6 +120,11 @@ avtQueryOverTimeFilter::Create(const AttributeGroup *atts)
// Kathleen Bonnell, Tue May 4 14:21:37 PDT 2004
// Replaced query->SetSILUseSet with query->SetSILRestriction.
//
// Kathleen Bonnell, Thu Jun 24 07:54:44 PDT 2004
// Pass storage for skippedTimesteps and error message to the query.
// Check for skippedTimeSteps and issue a Warning message.
// Changed CATCH to CATCHALL. Reset avtDataValidity before processing.
//
// ****************************************************************************
void
......@@ -146,13 +154,22 @@ avtQueryOverTimeFilter::Execute(void)
int endTime = atts.GetEndTime();
int stride = atts.GetStride();
int timeType = (int) atts.GetTimeType(); // 0 = cycle, 1 = time, 2 = timestep
intVector skippedTimes;
string eM;
//
// Make sure that out Output doesn't have any error settings hanging around
// from the CloneNetwork process that don't pertain to this execution:
//
GetOutput()->GetInfo().GetValidity().ResetErrorOccurred();
TRY
{
query->PerformQueryInTime(&qatts, startTime, endTime, stride,
timeType, times);
timeType, times, skippedTimes, eM);
}
CATCH( ... )
CATCHALL( ... )
{
avtDataTree_p dummy = new avtDataTree();
SetOutputDataTree(dummy);
......@@ -173,10 +190,24 @@ avtQueryOverTimeFilter::Execute(void)
<< results.size() << ") does not equal number "
<< "of timesteps (" << times.size() << ")." << endl;
avtCallback::IssueWarning(
"QueryOverTime error, number of results does not equal "
"\nQueryOverTime error, number of results does not equal "
"number of timestates. Curve being created may be missing "
"some values. Please contact a VisIt developer.");
}
if (skippedTimes.size() != 0)
{
ostrstream osm;
osm << "\nQueryOverTime ( " << qatts.GetName() << ") experienced\n"
<< "problems with the following timesteps and \n"
<< "skipped them while generating the curve:\n ";
for (int j = 0; j < skippedTimes.size(); j++)
osm << skippedTimes[j] << " ";
osm << "\nLast message received: " << eM << endl;
string errorMessage = osm.str();
debug5 << errorMessage.c_str() << endl;
avtCallback::IssueWarning(errorMessage.c_str());
}
SetOutputDataTree(tree);
delete query;
......
......@@ -1269,6 +1269,11 @@ fi
TOPDIR=`$pwd`
emptycxxflags="no"
if test -z $CXXFLAGS; then
emptycxxflags="yes"
fi
### Init the tflops_override variable.
tflops_override=no
......@@ -2900,6 +2905,11 @@ echo "$as_me: error: Please specify one of \"all\" or \"base\" for --with-dbs."
esac
defaultcxxflags="no"
if test -z "$CXXFLAGS"; then
defaultcxxflags="yes"
fi
# Check for programs.
# We shouldn't depend on too many!
ac_ext=cc
......@@ -4449,6 +4459,14 @@ if test "$ac_cv_search_strerror" != no; then
fi
if test $emptycxxflags = "yes"; then
if test $defaultcxxflags = "yes"; then
CXXFLAGS="-O2"
else
CXXFLAGS="-O2 $CXXFLAGS"
fi
fi
# Check to see if we're running clearmake.
# If we are, set the build verbosity to 0 so that output won't mess up the rest
# of "configure".
......
......@@ -484,6 +484,10 @@ dnl
dnl Brad Whitlock, Thu May 20 18:58:29 PST 2004
dnl Fixed a bug that made configure report the wrong Qt version.
dnl
dnl Jeremy Meredith, Tue Jun 22 09:45:01 PDT 2004
dnl Have it build optimized if no CXXFLAGS were specified through
dnl the environment variable.
dnl
dnl --------------------------------------------------------------------------
dnl
......@@ -505,6 +509,15 @@ fi
TOPDIR=`$pwd`
AC_SUBST(TOPDIR)
dnl
dnl Make note if no CXXFLAGS have yet been specified; we won't like the
dnl defaults that configure chooses and this lets us override them easily
dnl
emptycxxflags="no"
if test -z $CXXFLAGS; then
emptycxxflags="yes"
fi
### Init the tflops_override variable.
tflops_override=no
......@@ -1133,6 +1146,17 @@ case $withval in
esac
AC_SUBST(DB_OPTIONAL_DIRS)
dnl
dnl Make note if no CXXFLAGS have STILL yet been specified; this is the
dnl same check as for emptycxxflags above, except it is possible that a
dnl config-site file added some, in which case we need to append, not
dnl replace, the cxxflags.
dnl
defaultcxxflags="no"
if test -z "$CXXFLAGS"; then
defaultcxxflags="yes"
fi
# Check for programs.
# We shouldn't depend on too many!
AC_PROG_CXX
......@@ -1146,6 +1170,18 @@ AC_PROG_RANLIB
AC_CHECK_PROG(MAKEDEPEND,makedepend,makedepend)
AC_ISC_POSIX
dnl
dnl If they didn't specify any CXXFLAGS through an environment variable,
dnl then we should choose optimized for them.
dnl
if test $emptycxxflags = "yes"; then
if test $defaultcxxflags = "yes"; then
CXXFLAGS="-O2"
else
CXXFLAGS="-O2 $CXXFLAGS"
fi
fi
# Check to see if we're running clearmake.
# If we are, set the build verbosity to 0 so that output won't mess up the rest
# of "configure".
......
......@@ -5,7 +5,7 @@
#include <avtImageFileFormat.h>
#include <string>
#include <iostream>
#include <iostream.h>
#include <vtkFloatArray.h>
#include <vtkRectilinearGrid.h>
......@@ -29,9 +29,7 @@
#include <vtkCellData.h>
#include <vector>
using std::vector;
using std::string;
using namespace std;
// ****************************************************************************
// Method: avtImage constructor
......
......@@ -97,6 +97,9 @@
# Chris Wojtan, Tue Jun 15 15:46:54 PDT 2004
# Added Image file format reader.
#
# Hank Childs, Thu Jun 24 12:46:07 PDT 2004
# Remove Vista from the required format list to the HDF5 list.
#
##############################################################################
@SET_MAKE@
......@@ -108,12 +111,12 @@ BOXLIB2D=Boxlib2D
BOXLIB3D=Boxlib3D
EXODUS=Exodus TimeVaryingExodus
HDF4=Cosmos
HDF5=Tetrad SAMRAI CosmosPP
HDF5=Tetrad SAMRAI CosmosPP Vista
MILI=Mili
PDB=KullLite PDB
SAF=SAF
SAMPLES=Rect Hex
REQUIRED=ANALYZE BOV Curve2D EnSight Image Lines PLOT2D PLOT3D Point3D STL Silo Spheral VTK WavefrontOBJ Vista
REQUIRED=ANALYZE BOV Curve2D EnSight Image Lines PLOT2D PLOT3D Point3D STL Silo Spheral VTK WavefrontOBJ
OPTIONAL=
......
......@@ -117,6 +117,12 @@ avtSTLFileFormat::ReadInDataset(void)
// Programmer: Hank Childs
// Creation: May 24, 2002
//
// Modifications:
//
// Hank Childs, Thu Jun 24 10:23:18 PDT 2004
// Make sure to increment the reference count, since the caller will believe
// that it owns the returned dataset.
//
// ****************************************************************************
vtkDataSet *
......@@ -134,6 +140,7 @@ avtSTLFileFormat::GetMesh(const char *mesh)
ReadInDataset();
}
dataset->Register(NULL);
return dataset;
}
......
......@@ -3720,6 +3720,10 @@ avtSiloFileFormat::GetUnstructuredMesh(DBfile *dbfile, const char *mn,
// Hank Childs, Thu Jan 15 07:24:23 PST 2004
// Accounted for quads that are stored as hexahedrons.
//
// Hank Childs, Thu Jun 24 09:15:03 PDT 2004
// Make sure the cell locations for quads that are stored as hexahedrons