Commit 5a180404 authored by hrchilds's avatar hrchilds

Update from March 6, 2005

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@425 18c085ea-50e0-402c-830e-de6fd14e8384
parent a3e0468c
......@@ -57,6 +57,9 @@ $0 = shift @ARGV;
# Jeremy Meredith, Tue Feb 22 18:57:58 PST 2005
# Renamed convert to visitconvert because it is more unique.
#
# Hank Childs, Sun Mar 6 08:56:30 PST 2005
# Added -allowdynamic to fullhelp listing.
#
###############################################################################
......@@ -184,6 +187,10 @@ $fullusage = "$usage
to processor 0, every Pth domain starting from the
second to processor 1, etc.
-lb-random Randomly assign domains to processors.
-allowdynamic Dedicate one processor to spreading the work
dynamically among the other processors. This mode
has limitations in the types of queries it can
perform. Under development.
Advanced options
---------------------------------------------------------------------------
......
......@@ -102,6 +102,9 @@
# Mark C. Miller, Tue Jan 18 12:44:34 PST 2005
# Removed 'scalable,parallel:lineout.py' from skip list. Last one, yeah!
#
# Hank Childs, Sat Mar 5 12:33:28 PST 2005
# Add skips for dynamic load balancing mode. Run the DLB mode every Sunday.
#
# ----------------------------------------------------------------------------
# list of users who want email every night with the log file
......@@ -228,12 +231,13 @@ curdate=`date +%Y-%m-%d-%p%I%M`
#modes="serial parallel scalable"
modes="serial parallel scalable,parallel"
if test "`date +%A`" = "Sunday"; then
modes="serial,hdf5 parallel,hdf5 scalable,parallel,hdf5"
modes="serial,hdf5 parallel,hdf5 scalable,parallel,hdf5 dlb"
fi
# set list of tests/modes to skip
#skipList="dummy_mode:tests/dummy_category/dummy_file.py"
skipList=
skipList="dlb:tests/databases/global_node_ids.py \
dlb:tests/queries/pick.py"
# run the test(s)
error=0
......
......@@ -1032,10 +1032,15 @@ avtDatabase::GetIOInformation(int stateIndex)
// Programmer: Hank Childs
// Creation: October 25, 2001
//
// Modifications:
//
// Hank Childs, Sun Feb 27 11:20:39 PST 2005
// Added data specification argument.
//
// ****************************************************************************
bool
avtDatabase::CanDoDynamicLoadBalancing(void)
avtDatabase::CanDoDynamicLoadBalancing(avtDataSpecification_p)
{
return true;
}
......
......@@ -205,6 +205,9 @@ typedef struct {
// Kathleen Bonnell, Tue Jan 25 07:59:28 PST 2005
// Added const char* arg to QueryCoords.
//
// Hank Childs, Sun Feb 27 11:20:39 PST 2005
// Added argument to CanDoDynamicLoadBalancing.
//
// ****************************************************************************
class DATABASE_API avtDatabase
......@@ -230,9 +233,10 @@ class DATABASE_API avtDatabase
virtual void ClearCache(void);
virtual void FreeUpResources(void);
virtual bool CanDoDynamicLoadBalancing(void);
virtual bool MetaDataIsInvariant(void);
virtual bool SILIsInvariant(void);
virtual bool CanDoDynamicLoadBalancing(
avtDataSpecification_p);
virtual int NumStagesForFetch(avtDataSpecification_p);
const avtIOInformation &GetIOInformation(int stateIndex);
......
......@@ -220,6 +220,14 @@ class PickVarInfo;
// Kathleen Bonnell, Tue Jan 25 07:59:28 PST 2005
// Added const char* arg to QueryCoords.
//
// Hank Childs, Sun Feb 27 11:20:39 PST 2005
// Added argument to CanDoDynamicLoadBalancing.
//
// Hank Childs, Sat Mar 5 19:28:52 PST 2005
// Added argument to functions that typically do collective communication,
// indicating whether or not they can safely do collective communication
// (typically for error handling) or whether they should blow it off.
//
// ****************************************************************************
class DATABASE_API avtGenericDatabase : public avtDatasetDatabase
......@@ -235,13 +243,14 @@ class DATABASE_API avtGenericDatabase : public avtDatasetDatabase
avtSourceFromDatabase *);
virtual void FreeUpResources(void);
virtual bool CanDoDynamicLoadBalancing(void);
virtual int NumStagesForFetch(avtDataSpecification_p);
virtual const char *GetFilename(int);
virtual bool HasInvariantMetaData(void) const;
virtual bool HasInvariantSIL(void) const;
virtual bool CanDoDynamicLoadBalancing(
avtDataSpecification_p);
virtual void ActivateTimestep(int stateIndex);
......@@ -329,7 +338,7 @@ class DATABASE_API avtGenericDatabase : public avtDatasetDatabase
bool CommunicateGhosts(avtGhostDataType,
avtDatasetCollection &, intVector &,
avtDataSpecification_p &,
avtSourceFromDatabase *);
avtSourceFromDatabase *, intVector &,bool);
bool CommunicateGhostZonesFromDomainBoundaries(
avtDomainBoundaries *,
avtDatasetCollection &, intVector &,
......@@ -342,7 +351,7 @@ class DATABASE_API avtGenericDatabase : public avtDatasetDatabase
bool CommunicateGhostNodesFromDomainBoundariesFromFile(
avtDatasetCollection &, intVector &,
avtDataSpecification_p &,
avtSourceFromDatabase *);
avtSourceFromDatabase *, intVector &);
bool CommunicateGhostZonesFromGlobalNodeIds(
avtDatasetCollection &, intVector &,
avtDataSpecification_p &,
......@@ -354,7 +363,7 @@ class DATABASE_API avtGenericDatabase : public avtDatasetDatabase
bool ApplyGhostForDomainNesting(avtDatasetCollection &,
intVector &, intVector &,
avtDataSpecification_p &);
avtDataSpecification_p &, bool);
void MaterialSelect(avtDatasetCollection &,
intVector &, avtDataSpecification_p &,
avtSourceFromDatabase *, bool);
......
......@@ -131,6 +131,9 @@ avtSourceFromDatabase::~avtSourceFromDatabase()
// Hank Childs, Fri Oct 17 21:56:36 PDT 2003
// Don't crash when NULL filenames are encountered.
//
// Hank Childs, Sun Mar 6 11:15:11 PST 2005
// Add special support for NeedBoundarySurfaces in lieu of fix for '5723.
//
// ****************************************************************************
bool
......@@ -227,6 +230,13 @@ avtSourceFromDatabase::FetchDataset(avtDataSpecification_p spec,
atts.SetFilename(string(greatest));
}
// '5723 BEGIN
bool addBoundarySurf = false;
if (*lastSpec != NULL && lastSpec->NeedBoundarySurfaces() &&
strcmp(spec->GetVariable(), lastSpec->GetVariable()) == 0)
addBoundarySurf = true;
// '5723 END
//
// We can't just share a reference to that specification, because it might
// change. No good copy constructor for data specification, so make use
......@@ -235,6 +245,11 @@ avtSourceFromDatabase::FetchDataset(avtDataSpecification_p spec,
lastSpec = new avtDataSpecification(spec, 0);
lastSpec = spec;
// '5723 BEGIN
if (addBoundarySurf)
lastSpec->TurnBoundarySurfacesOn();
// '5723 END
return rv;
}
......@@ -391,6 +406,9 @@ avtSourceFromDatabase::FetchSpeciesAuxiliaryData(const char *type, void *args,
// Hank Childs, Thu Sep 25 16:27:38 PDT 2003
// If a 'last spec' is available, use its variable.
//
// Hank Childs, Sun Mar 6 11:15:11 PST 2005
// Add special support for NeedBoundarySurfaces in lieu of fix for '5723.
//
// ****************************************************************************
avtDataSpecification_p
......@@ -410,7 +428,16 @@ avtSourceFromDatabase::GetFullDataSpecification(void)
string mesh = md->MeshForVar(variable);
silr->SetTopSet(mesh.c_str());
return new avtDataSpecification(acting_var, timestep, silr);
avtDataSpecification_p rv =
new avtDataSpecification(acting_var, timestep, silr);
// '5723 BEGIN
if (*lastSpec != NULL)
if (lastSpec->NeedBoundarySurfaces())
rv->TurnBoundarySurfacesOn();
// '5723 END
return rv;
}
......@@ -457,24 +484,6 @@ avtSourceFromDatabase::DatabaseProgress(int cur, int tot, const char *desc)
}
// ****************************************************************************
// Method: avtSourceFromDatabase::CanDoDynamicLoadBalancing
//
// Purpose:
// Returns whether or not this source can do dynamic load balancing.
//
// Programmer: Hank Childs
// Creation: October 25, 2001
//
// ****************************************************************************
bool
avtSourceFromDatabase::CanDoDynamicLoadBalancing(void)
{
return database->CanDoDynamicLoadBalancing();
}
// ****************************************************************************
// Method: avtSourceFromDatabase::NumStagesForFetch
//
......@@ -635,3 +644,27 @@ avtSourceFromDatabase::GetSIL(int timestate)
{
return database->GetSIL(timestate);
}
// ****************************************************************************
// Method: avtSourceFromDatabase::ReleaseData
//
// Purpose:
// Releases the data associated with the input database.
//
// Programmer: Hank Childs
// Creation: February 27, 2005
//
// ****************************************************************************
void
avtSourceFromDatabase::ReleaseData(void)
{
avtTerminatingDatasetSource::ReleaseData();
if (GetOutput()->GetInfo().GetValidity().GetIsThisDynamic())
{
database->FreeUpResources();
}
}
......@@ -81,6 +81,10 @@ class PickAttributes;
// Kathleen Bonnell, Tue Jan 25 07:59:28 PST 2005
// Added const char* arg to QueryCoords.
//
// Hank Childs, Sun Feb 27 12:44:40 PST 2005
// Removed method CanDoDynamicLoadBalancing. Database is now asked
// directly. Also added new ReleaseData method that is aware of DLB.
//
// ****************************************************************************
class DATABASE_API avtSourceFromDatabase : public avtTerminatingDatasetSource
......@@ -114,6 +118,8 @@ class DATABASE_API avtSourceFromDatabase : public avtTerminatingDatasetSource
virtual void GetDomainName(const std::string &, const int,
const int, std::string &);
virtual void ReleaseData(void);
protected:
avtDatasetDatabase *database;
char *variable;
......@@ -121,7 +127,6 @@ class DATABASE_API avtSourceFromDatabase : public avtTerminatingDatasetSource
avtDataSpecification_p lastSpec;
virtual bool FetchDataset(avtDataSpecification_p, avtDataTree_p &);
virtual bool CanDoDynamicLoadBalancing(void);
virtual int NumStagesForFetch(avtDataSpecification_p);
};
......
// ************************************************************************* //
// avtDomainBoundaries.h //
// ************************************************************************* //
#ifndef AVT_DOMAIN_BOUNDARIES_H
#define AVT_DOMAIN_BOUNDARIES_H
#include <database_exports.h>
#include <avtGhostData.h>
#include <vector>
using std::vector;
......@@ -34,7 +41,12 @@ class avtMaterial;
// Hank Childs, Sat Aug 14 06:41:00 PDT 2004
// Added ghost nodes.
//
// Hank Childs, Sun Feb 27 12:00:12 PST 2005
// Added pure virtual methods RequiresCommunication. Added "allDomains"
// argument to CreateGhostNodes.
//
// ****************************************************************************
class DATABASE_API avtDomainBoundaries
{
public:
......@@ -63,7 +75,9 @@ class DATABASE_API avtDomainBoundaries
const vector<avtMaterial*> mats,
vector<avtMixedVariable*> mixvars) =0;
virtual void CreateGhostNodes(vector<int> domainNum,
vector<vtkDataSet*> meshes) =0;
vector<vtkDataSet*> meshes,
vector<int> &) =0;
virtual bool RequiresCommunication(avtGhostDataType) = 0;
virtual bool ConfirmMesh(vector<int> domainNum,
vector<vtkDataSet*> meshes) =0;
};
......
......@@ -2058,6 +2058,32 @@ avtStructuredDomainBoundaries::ExchangeMixVar(vector<int> domainNum,
return out;
}
// ****************************************************************************
// Method: avtStructuredDomainBoundaries::RequiresCommunication
//
// Purpose:
// Determines if this domain boundaries object will need to perform
// collective communication to create the type of ghost data requested.
//
// Programmer: Hank Childs
// Creation: February 27, 2005
//
// ****************************************************************************
bool
avtStructuredDomainBoundaries::RequiresCommunication(avtGhostDataType gtype)
{
if (gtype == NO_GHOST_DATA)
return false;
else if (gtype == GHOST_NODE_DATA)
return false;
// (gtype == GHOST_ZONE_DATA)
return true;
}
// ****************************************************************************
// Method: avtStructuredDomainBoundaries::ConfirmMesh
//
......@@ -2403,13 +2429,31 @@ avtRectilinearDomainBoundaries::ExchangeMesh(vector<int> domainNum,
// Hank Childs, Fri Aug 27 16:16:52 PDT 2004
// Renamed ghost data array.
//
// Hank Childs, Sun Feb 27 14:47:45 PST 2005
// Added argument allDomains.
//
// ****************************************************************************
void
avtStructuredDomainBoundaries::CreateGhostNodes(vector<int> domainNum,
vector<vtkDataSet*> meshes)
vector<vtkDataSet*> meshes,
vector<int> &allDomains)
{
vector<int> domain2proc = CreateDomainToProcessorMap(domainNum);
//
// If we are doing DLB, we want to mark nodes as ghost, even if their
// neighboring domains are not being used on this iteration. Do this by
// consulting the "allDomains" list. Note that we can only play this
// trick because the rest of the routine does not care which domains
// are on which processors -- only that we are using them.
//
for (int i = 0 ; i < allDomains.size() ; i++)
{
if (domain2proc[allDomains[i]] < 0)
domain2proc[allDomains[i]] = 0;
}
CreateCurrentDomainBoundaryInformation(domain2proc);
for (int i = 0 ; i < domainNum.size() ; i++)
......
// ************************************************************************* //
// avtStructuredDomainBoundaries.h //
// ************************************************************************* //
#ifndef AVT_STRUCTURED_DOMAIN_BOUNDARIES_H
#define AVT_STRUCTURED_DOMAIN_BOUNDARIES_H
#include <database_exports.h>
#include <avtDomainBoundaries.h>
......@@ -167,6 +172,9 @@ class BoundaryHelperFunctions
// Kathleen Bonnell, Tue Feb 8 15:32:22 PST 2005
// Added GetExtents.
//
// Hank Childs, Sun Feb 27 12:14:32 PST 2005
// Added RequiresCommunication. Added new argument to CreateGhostNodes.
//
// ****************************************************************************
class DATABASE_API avtStructuredDomainBoundaries : public avtDomainBoundaries
......@@ -209,8 +217,10 @@ class DATABASE_API avtStructuredDomainBoundaries : public avtDomainBoundaries
vector<avtMixedVariable*> mixvars);
virtual void CreateGhostNodes(vector<int> domainNum,
vector<vtkDataSet*> meshes);
vector<vtkDataSet*> meshes,
vector<int> &);
virtual bool RequiresCommunication(avtGhostDataType);
virtual bool ConfirmMesh(vector<int> domainNum,
vector<vtkDataSet*> meshes);
......
......@@ -774,6 +774,31 @@ avtUnstructuredDomainBoundaries::ExchangeMixVar(vector<int> domainNum,
}
// ****************************************************************************
// Method: avtUnstructuredDomainBoundaries::RequiresCommunication
//
// Purpose:
// Determines if this domain boundaries object will need to perform
// collective communication to create the type of ghost data requested.
//
// Programmer: Hank Childs
// Creation: February 27, 2005
//
// ****************************************************************************
bool
avtUnstructuredDomainBoundaries::RequiresCommunication(avtGhostDataType gtype)
{
if (gtype == NO_GHOST_DATA)
return false;
else if (gtype == GHOST_NODE_DATA)
return false;
// (gtype == GHOST_ZONE_DATA)
return true;
}
// ****************************************************************************
// Method: avtUnstructuredDomainBoundaries::ConfirmMesh
//
......@@ -1635,11 +1660,15 @@ avtUnstructuredDomainBoundaries::CommunicateDataInformation(
// Hank Childs, Fri Aug 27 16:34:46 PDT 2004
// Rename ghost data arrays.
//
// Hank Childs, Sun Feb 27 14:47:45 PST 2005
// Added argument allDomains.
//
// ****************************************************************************
void
avtUnstructuredDomainBoundaries::CreateGhostNodes(vector<int> domainNum,
vector<vtkDataSet*> meshes)
vector<vtkDataSet*> meshes,
vector<int> &allDomains)
{
int i, j;
......
......@@ -33,12 +33,14 @@
// Hank Childs, Sat Dec 13 10:57:57 PST 2003
// Added pd2cd.
//
// Hank Childs, Fri Mar 4 08:21:04 PST 2005
// Removed centering conversion modules.
//
// ****************************************************************************
avtGradientFilter::avtGradientFilter()
{
cd2pd = vtkCellDataToPointData::New();
pd2cd = vtkPointDataToCellData::New();
;
}
......@@ -53,43 +55,14 @@ avtGradientFilter::avtGradientFilter()
// Hank Childs, Sat Dec 13 10:57:57 PST 2003
// Added pd2cd.
//
// ****************************************************************************
avtGradientFilter::~avtGradientFilter()
{
if (cd2pd != NULL)
{
cd2pd->Delete();
cd2pd = NULL;
}
if (pd2cd != NULL)
{
pd2cd->Delete();
pd2cd = NULL;
}
}
// ****************************************************************************
// Method: avtGradientFilter::ReleaseData
//
// Purpose:
// Releases the data associated with the gradient filter.
//
// Programmer: Hank Childs
// Creation: December 13, 2003
// Hank Childs, Fri Mar 4 08:21:04 PST 2005
// Removed centering conversion modules.
//
// ****************************************************************************
void
avtGradientFilter::ReleaseData(void)
avtGradientFilter::~avtGradientFilter()
{
avtSingleInputExpressionFilter::ReleaseData();
cd2pd->SetInput(NULL);
cd2pd->SetOutput(NULL);
pd2cd->SetInput(NULL);
pd2cd->SetOutput(NULL);
;
}
......@@ -127,6 +100,9 @@ avtGradientFilter::ReleaseData(void)
// Optimize for rectilinear data. Also allow the cell data to stay as
// cell data in the output.
//
// Hank Childs, Fri Mar 4 08:21:04 PST 2005
// Create centering conversion modules if needed.
//
// ****************************************************************************
vtkDataArray *
......@@ -148,17 +124,14 @@ avtGradientFilter::DeriveVariable(vtkDataSet *in_ds)
" be found.");
}
vtkCellDataToPointData *cd2pd = vtkCellDataToPointData::New();
cd2pd->SetInput(in_ds);
vtkDataSet *ds = (vtkDataSet*)in_ds->NewInstance();
cd2pd->SetOutput(ds);
ds->Update();
ds->SetSource(NULL);
cd2pd->Update();
scalarValues = ds->GetPointData()->GetScalars();
scalarValues = cd2pd->GetOutput()->GetPointData()->GetScalars();
scalarValues->Register(NULL); // so we don't lose it
recentered = true;
ds->Delete();
cd2pd->Delete();
}
int nPoints = in_ds->GetNumberOfPoints();
......@@ -235,21 +208,19 @@ avtGradientFilter::DeriveVariable(vtkDataSet *in_ds)
new_ds->CopyStructure(in_ds);
new_ds->GetPointData()->SetVectors(results);
vtkPointDataToCellData *pd2cd = vtkPointDataToCellData::New();
pd2cd->SetInput(new_ds);
pd2cd->Update();
vtkDataSet *ds = (vtkDataSet*)in_ds->NewInstance();
pd2cd->SetOutput(ds);
ds->Update();
ds->SetSource(NULL);
vtkDataArray *new_results = ds->GetCellData()->GetVectors();
vtkDataArray *new_results = pd2cd->GetOutput()->GetCellData()
->GetVectors();
new_results->Register(NULL); // so we don't lose it
results->Delete();
results = new_results;
new_ds->Delete();
ds->Delete();
pd2cd->Delete();
scalarValues->Delete();
}
......
......@@ -5,18 +5,14 @@
#ifndef AVT_GRADIENT_FILTER_H
#define AVT_GRADIENT_FILTER_H
#include <avtSingleInputExpressionFilter.h>
class vtkCell;
class vtkCellDataToPointData;
class vtkDataArray;
class vtkDataSet;
class vtkIdList;
class vtkPointDataToCellData;
class vtkRectilinearGrid;
class vtkScalarData;
// ****************************************************************************
......@@ -35,6 +31,9 @@ class vtkScalarData;
// Added support for rectilinear meshes. Also don't force cell data to be
// point data in the output. Added ReleaseData to avoid memory bloat.
//
// Hank Childs, Fri Mar 4 08:21:04 PST 2005
// Removed data centering conversion modules.
//
// ****************************************************************************
class EXPRESSION_API avtGradientFilter : public avtSingleInputExpressionFilter
......@@ -47,8 +46,6 @@ class EXPRESSION_API avtGradientFilter : public avtSingleInputExpressionFilter
virtual const char *GetDescription(void)
{ return "Calculating Gradient of Each Node"; };
virtual void ReleaseData(void);
protected:
virtual vtkDataArray *DeriveVariable(vtkDataSet *);
virtual int GetVariableDimension() { return 3; }
......@@ -60,9 +57,6 @@ class EXPRESSION_API avtGradientFilter : public avtSingleInputExpressionFilter
float EvaluateValue(float, float, float, vtkDataSet *,
vtkDataArray *,vtkIdList *,bool &);
vtkDataArray *RectilinearGradient(vtkRectilinearGrid *);
vtkCellDataToPointData *cd2pd;
vtkPointDataToCellData *pd2cd;
};
......
......@@ -268,6 +268,12 @@ avtCondenseDatasetFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
// Programmer: Hank Childs
// Creation: September 10, 2002
//
// Modifications:
//
// Hank Childs, Fri Mar 4 08:12:25 PST 2005
// Do not set outputs of filters to NULL, since this will prevent them
// from re-executing correctly in DLB-mode.
//
// ****************************************************************************
void
......@@ -276,9 +282,9 @@ avtCondenseDatasetFilter::ReleaseData(void)
avtStreamer::ReleaseData();
rpfPD->SetInput(NULL);
rpfPD->SetOutput(NULL);
rpfPD->SetOutput(vtkPolyData::New());
rpfUG->SetInput(NULL);
rpfUG->SetOutput(NULL);
rpfUG->SetOutput(vtkUnstructuredGrid::New());
}
......@@ -64,13 +64,15 @@ using std::string;
// Brad Whitlock, Tue May 20 13:42:25 PST 2003
// I made it use the updated ContourOpAttributes.
//
// Hank Childs, Sun Mar 6 08:18:53 PST 2005
// Removed cd2pd.
//
// ****************************************************************************
avtContourFilter::avtContourFilter(const ContourOpAttributes &a)
{
atts = a;
cf = vtkVisItContourFilter::New();
cd2pd = vtkCellDataToPointData::New();
stillNeedExtents = true;