Commit 833cecb9 authored by hrchilds's avatar hrchilds
Browse files

Update from May 11, 2005

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@466 18c085ea-50e0-402c-830e-de6fd14e8384
parent fc1ce106
......@@ -129,6 +129,11 @@
# Mark C. Miller, Tue May 3 21:49:22 PDT 2005
# Modified skipList
#
# Mark C. Miller, Tue May 10 19:53:08 PDT 2005
# Removed HDF5 from nightly. Changed Sunday morning's modes
# Added a pass for an optimized build
# Added calls to clean up ipc resources
#
# ----------------------------------------------------------------------------
# list of users who want email every night with the log file
......@@ -201,6 +206,11 @@ export DISPLAY
PATH=/misc/gapps/mpich/1.2.4/Linux/serial/64/debug/bin:/home/visit/bin:/data_vobs/VisIt/clearcase_bin:/home/visit/clearcase_bin:/usr/atria/bin:/usr/security/bin:/sbin:/usr/sbin:/usr/bsd:/usr/local/bin:/usr/bin:/bin:/etc:/usr/bin/X11:/usr/local/X11:/usr/etc:/usr/lib:/usr/atria/bin:/usr/ccs/bin:/usr/SUNWspro/bin:.
export PATH
# clean up ipc resources
ipcs -m | grep visit | cut -d' ' -f2 | xargs -n 1 ipcrm -m 1> /dev/null 2>&1
ipcs -s | grep visit | cut -d' ' -f2 | xargs -n 1 ipcrm -s 1> /dev/null 2>&1
ipcs -q | grep visit | cut -d' ' -f2 | xargs -n 1 ipcrm -q 1> /dev/null 2>&1
# rebuild visit
cleartool startview visit_VOBowner_test 1> /dev/null 2>&1
cd /view/visit_VOBowner_test/data_vobs/VisIt
......@@ -253,9 +263,9 @@ cd ..
curdate=`date +%Y-%m-%d-%p%I%M`
# set mode to run in
modes="serial parallel scalable,parallel hdf5"
modes="serial parallel scalable,parallel purify"
if test "`date +%A`" = "Sunday"; then
modes="serial,hdf5 parallel,hdf5 scalable,parallel,hdf5 dlb"
modes="hdf5 dlb serial,purify scalable,parallel,purify"
fi
# set list of tests/modes to skip
......@@ -281,6 +291,50 @@ for m in $modes; do
fi
done
# clean up ipc resources
ipcs -m | grep visit | cut -d' ' -f2 | xargs -n 1 ipcrm -m 1> /dev/null 2>&1
ipcs -s | grep visit | cut -d' ' -f2 | xargs -n 1 ipcrm -s 1> /dev/null 2>&1
ipcs -q | grep visit | cut -d' ' -f2 | xargs -n 1 ipcrm -q 1> /dev/null 2>&1
# rebuild an optimized visit
cleartool startview visit_VOBowner_testopt 1> /dev/null 2>&1
cd /view/visit_VOBowner_testopt/data_vobs/VisIt
rm -f config.cache
rm -f buildlog
echo -e "LD_LIBRARY_PATH = $LD_LIBRARY_PATH" 1> buildlog 2>&1
echo -e "Forcing LD_LIBRARY_PATH to /usr/local/lib" 1> buildlog 2>&1
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH
env CXXFLAGS="-O2" ./configure --enable-parallel 1>> buildlog 2>&1
rm -f plugins/*/*.so
(cd data; clearmake clean 1> /dev/null 2>&1 )
clearmake -J 2 1>> buildlog 2>&1
error=$?
# make sure all needed data files exist
cd data
make test 1> /dev/null 2>&1
# (we should probably check for errors here)
cd ..
# run the test
error=0
cd test
if test "$skipList" = ""; then
./runtest -q -p -m optimized -d "$curdate" -notrackmem -minor-error 5 -major-error 20
else
./runtest -q -s "$skipList" -p -m optimized -d "$curdate" -notrackmem -minor-error 5 -major-error 20
fi
curerror=$?
if test ! "$curerror" = "0"; then
error=1
fi
# clean up ipc resources
ipcs -m | grep visit | cut -d' ' -f2 | xargs -n 1 ipcrm -m 1> /dev/null 2>&1
ipcs -s | grep visit | cut -d' ' -f2 | xargs -n 1 ipcrm -s 1> /dev/null 2>&1
ipcs -q | grep visit | cut -d' ' -f2 | xargs -n 1 ipcrm -q 1> /dev/null 2>&1
# restart the list of modifiers
if test -f "/home/visit/public_html/modifiers"; then
mv /home/visit/public_html/modifiers /home/visit/public_html/current
......
......@@ -504,179 +504,19 @@ avtExpressionEvaluatorFilter::ReleaseData(void)
// Kathleen Bonnell, Fri May 28 18:31:15 PDT 2004
// Account for pick type DomainZone.
//
// Kathleen Bonnell, Wed May 11 17:07:25 PDT 2005
// Removed code that parsed and processed missing expression vars,
// this hasn't been necessary for a long while, since avtPickQuery started
// using an 'Update' so that information that gets retrieved always
// reflect the current SILRestriction. (about March, 2004).
//
// ****************************************************************************
void
avtExpressionEvaluatorFilter::Query(PickAttributes *pa)
{
int i, j, k;
//
// Sanity check.
//
if (*(GetInput()) == NULL)
EXCEPTION0(NoInputException);
//
// We need to identify if there are expression variables that have been
// requested for the pick that are missing. If so, we will have to
// re-execute.
//
const stringVector &orig_vars = pa->GetVariables();
stringVector expr_vars;
std::vector<int> indices;
for (i = 0 ; i < orig_vars.size() ; i++)
{
Expression *exp = ParsingExprList::GetExpression(orig_vars[i]);
if (exp != NULL)
{
expr_vars.push_back(orig_vars[i]);
indices.push_back(i);
}
}
stringVector unmatched_vars;
if (expr_vars.size() > 0)
{
avtDataset_p output = GetTypedOutput();
VarList vl;
avtDatasetExaminer::GetVariableList(output, vl);
for (i = 0 ; i < expr_vars.size() ; i++)
{
bool foundMatch = false;
for (j = 0 ; j < vl.nvars ; j++)
{
if (expr_vars[i] == vl.varnames[j])
foundMatch = true;
}
if (!foundMatch)
{
unmatched_vars.push_back(expr_vars[i]);
}
}
modified = true;
}
if (unmatched_vars.size() > 0)
{
for (i = 0 ; i < unmatched_vars.size() ; i++)
lastUsedSpec->GetDataSpecification()->AddSecondaryVariable(
unmatched_vars[i].c_str());
//
// Force the update.
//
GetOutput()->Update(lastUsedSpec);
}
//
// Start by going to the new queryable source upstream (most likely the
// terminating source corresponding to the database) and ask it to pick
// with our new pick attributes.
//
avtQueryableSource *src = GetInput()->GetQueryableSource();
src->Query(pa);
//
// Now iterate over the expressions and add where possible.
//
if (expr_vars.size() > 0)
{
bool canUseNativeArray =
GetInput()->GetInfo().GetValidity().GetZonesPreserved();
const intVector &incidentElements = pa->GetIncidentElements();
int element = pa->GetElementNumber();
int domain = pa->GetDomain();
bool zonePick = pa->GetPickType() == PickAttributes::Zone ||
pa->GetPickType() == PickAttributes::DomainZone;
avtDataset_p output = GetTypedOutput();
for (i = 0 ; i < expr_vars.size() ; i++)
{
avtCentering cent = AVT_UNKNOWN_CENT;
vtkDataArray *arr = avtDatasetExaminer::GetArray(output,
expr_vars[i].c_str(), domain, cent);
if (arr == NULL)
{
continue;
}
PickVarInfo varInfo;
varInfo.SetVariableName(expr_vars[i]);
int ncomps = arr->GetNumberOfComponents();
if (ncomps == 1)
varInfo.SetVariableType("scalar");
else if (ncomps == 3)
varInfo.SetVariableType("vector");
else if (ncomps == 9)
varInfo.SetVariableType("tensor");
bool zoneCent = (cent == AVT_ZONECENT);
varInfo.SetCentering(zoneCent ? PickVarInfo::Zonal
: PickVarInfo::Nodal);
std::vector<double> vals;
std::vector<std::string> names;
char temp[1024];
if (canUseNativeArray)
{
if (zoneCent != zonePick)
{
for (j = 0 ; j < incidentElements.size() ; j++)
{
sprintf(temp, "(%d)", incidentElements[j]);
names.push_back(temp);
float mag = 0.;
for (k = 0 ; k < arr->GetNumberOfComponents() ; k++)
{
float val=arr->GetComponent(incidentElements[j],k);
mag += val*val;
vals.push_back(val);
}
mag = sqrt(mag);
vals.push_back(mag);
}
}
else
{
// the info we're after is associated with element
sprintf(temp, "(%d)", element);
names.push_back(temp);
float mag = 0.;
for (k = 0 ; k < arr->GetNumberOfComponents() ; k++)
{
float val = arr->GetComponent(element, k);
mag += val*val;
vals.push_back(val);
}
mag = sqrt(mag);
vals.push_back(mag);
}
}
if (!vals.empty())
{
varInfo.SetNames(names);
varInfo.SetValues(vals);
int index = -1;
for (int ii = 0 ; ii < pa->GetNumPickVarInfos() ; ii++)
{
PickVarInfo &vi = pa->GetPickVarInfo(ii);
if (vi.GetVariableName() == varInfo.GetVariableName())
{
index = ii;
break;
}
}
if (index >= 0)
{
PickVarInfo &varInfo2 = pa->GetPickVarInfo(index);
varInfo2 = varInfo;
}
else
{
pa->AddPickVarInfo(varInfo);
}
}
}
}
}
......
......@@ -84,6 +84,9 @@ avtPickByNodeQuery::~avtPickByNodeQuery()
// Hank Childs, Thu Mar 10 10:36:51 PST 2005
// Fix memory leak.
//
// Kathleen Bonnell, Wed May 11 17:14:03 PDT 200
// Convert varnmames to Global names when the DB supplied the ids.
//
// ****************************************************************************
void
......@@ -103,9 +106,9 @@ avtPickByNodeQuery::Execute(vtkDataSet *ds, const int dom)
{
pickAtts.SetDomain(-1);
pickAtts.SetElementNumber(-1);
pickAtts.SetErrorMessage("Pick could not be performed because a global "
"node id was specified for Pick but the mesh "
"does not contain global node information.");
pickAtts.SetErrorMessage("Pick could not be performed because a global"
" node id was specified for Pick but the mesh"
" does not contain global node information.");
pickAtts.SetError(true);
return;
}
......@@ -124,7 +127,8 @@ avtPickByNodeQuery::Execute(vtkDataSet *ds, const int dom)
{
if (pickAtts.GetElementIsGlobal())
{
nodeid = vtkVisItUtility::GetLocalElementForGlobal(ds, nodeid, false);
nodeid = vtkVisItUtility::GetLocalElementForGlobal(ds, nodeid,
false);
if (nodeid == -1)
return;
pickAtts.SetGlobalElement(pickAtts.GetElementNumber());
......@@ -139,7 +143,8 @@ avtPickByNodeQuery::Execute(vtkDataSet *ds, const int dom)
}
else
{
// the incidient zones could not be found, no further processing required.
// the incidient zones could not be found,
// no further processing required.
// SetDomain and ElementNumber to -1 to indicate failure.
pickAtts.SetDomain(-1);
pickAtts.SetElementNumber(-1);
......@@ -159,11 +164,13 @@ avtPickByNodeQuery::Execute(vtkDataSet *ds, const int dom)
//
src->Query(&pickAtts);
if (!pickAtts.GetFulfilled())
return;
if (pickAtts.GetElementIsGlobal() && DBsuppliedNodeId)
{
if (!pickAtts.GetFulfilled())
return;
nodeid = GetCurrentNodeForOriginal(ds, pickAtts.GetElementNumber());
ConvertElNamesToGlobal();
}
if (pickAtts.GetMatSelected())
......@@ -203,8 +210,8 @@ avtPickByNodeQuery::Execute(vtkDataSet *ds, const int dom)
// placed. This should be the actual node coordinates if the plot was
// NOT transformed.
//
// If the plot was transformed && the transform is available, then transform
// the node coordinates.
// If the plot was transformed && the transform is available,
// then transform the node coordinates.
//
// If the plot was transformed && inverseTransform is NOT available,
// there is no way to determine the location of the picked node in
......
......@@ -10,6 +10,7 @@
#include <vtkFieldData.h>
#include <vtkIntArray.h>
#include <vtkVisItUtility.h>
#include <PickVarInfo.h>
#include <avtMatrix.h>
#include <avtTerminatingSource.h>
......@@ -82,6 +83,9 @@ avtPickByZoneQuery::~avtPickByZoneQuery()
// Added test for presence of avtGlobalZoneNumbers array, create error
// message when not available but should be.
//
// Kathleen Bonnell, Wed May 11 17:14:03 PDT 200
// Convert varnmames to Global names when the DB supplied the ids.
//
// ****************************************************************************
void
......@@ -168,6 +172,7 @@ avtPickByZoneQuery::Execute(vtkDataSet *ds, const int dom)
{
zoneid = GetCurrentZoneForOriginal(ds, pickAtts.GetElementNumber());
userZoneId = zoneid;
ConvertElNamesToGlobal();
}
pickAtts.SetElementNumber(userZoneId+cellOrigin);
......
......@@ -273,6 +273,10 @@ avtPickQuery::PostExecute(void)
// Kathleen Bonnell, Mon Dec 20 14:09:21 PST 2004
// Turn on OriginalZone/Node numbers when turning on Global versions.
//
// Kathleen Bonnell, Wed May 11 16:46:51 PDT 2005
// Reworked so that an 'Update' is issued only if secondary variables
// are needed, or input has been MatSelected, or global ids are necessary.
//
// ****************************************************************************
avtDataObject_p
......@@ -311,6 +315,8 @@ avtPickQuery::ApplyFilters(avtDataObject_p inData)
singleDomain = false;
}
bool requiresUpdate = false;
dspec = new avtDataSpecification(pickAtts.GetActiveVariable().c_str(),
pickAtts.GetTimeStep(), querySILR);
//
......@@ -319,15 +325,6 @@ avtPickQuery::ApplyFilters(avtDataObject_p inData)
//
int maxDom = UnifyMaximumValue(pickAtts.GetDomain());
if (!singleDomain && maxDom != -1)
{
intVector dlist;
if (maxDom == pickAtts.GetDomain())
{
dlist.push_back(pickAtts.GetDomain());
}
dspec->GetRestriction()->RestrictDomains(dlist);
}
//
// Only set vars and turn on zone/node numbers if this process
......@@ -341,7 +338,10 @@ avtPickQuery::ApplyFilters(avtDataObject_p inData)
if (dspec->GetVariable() != vars[i])
{
if (!dspec->HasSecondaryVariable(vars[i].c_str()))
{
dspec->AddSecondaryVariable(vars[i].c_str());
requiresUpdate = true;
}
}
}
......@@ -349,6 +349,7 @@ avtPickQuery::ApplyFilters(avtDataObject_p inData)
{
dspec->TurnZoneNumbersOn();
dspec->TurnNodeNumbersOn();
requiresUpdate = true;
}
if (pickAtts.GetDisplayGlobalIds() || pickAtts.GetElementIsGlobal())
{
......@@ -356,13 +357,32 @@ avtPickQuery::ApplyFilters(avtDataObject_p inData)
dspec->TurnGlobalNodeNumbersOn();
dspec->TurnZoneNumbersOn();
dspec->TurnNodeNumbersOn();
requiresUpdate = true;
}
}
requiresUpdate = (bool)UnifyMaximumValue((int)requiresUpdate);
avtPipelineSpecification_p pspec = new avtPipelineSpecification(dspec, 0);
if (requiresUpdate && !singleDomain && maxDom != -1)
{
intVector dlist;
if (maxDom == pickAtts.GetDomain())
{
dlist.push_back(pickAtts.GetDomain());
}
dspec->GetRestriction()->RestrictDomains(dlist);
//requiresUpdate = true;
}
if (!requiresUpdate)
return inData;
avtPipelineSpecification_p pspec = new avtPipelineSpecification(dspec, 0);
// We don't want to disturb the original pipeline, so get the
// terminating source's output, and tack on an EEF, in case any of
// the vars are Expressions.
avtDataObject_p t1 = inData->GetTerminatingSource()->GetOutput();
avtDataObject_p temp;
CopyTo(temp, inData);
CopyTo(temp, t1);
eef->SetInput(temp);
avtDataObject_p retObj = eef->GetOutput();
retObj->Update(pspec);
......@@ -629,7 +649,8 @@ avtPickQuery::GetZoneCoords(vtkDataSet *ds, const int zoneId)
void
avtPickQuery::RetrieveVarInfo(vtkDataSet* ds)
{
RetrieveVarInfo(ds, pickAtts.GetElementNumber(), pickAtts.GetIncidentElements());
RetrieveVarInfo(ds, pickAtts.GetElementNumber(),
pickAtts.GetIncidentElements());
}
......@@ -695,8 +716,6 @@ avtPickQuery::RetrieveVarInfo(vtkDataSet* ds, const int findElement,
bool zoneCent;
bool foundData = true;
int numVars;
if (pickAtts.GetFulfilled())
numVars = pickAtts.GetNumPickVarInfos();
......@@ -709,9 +728,9 @@ avtPickQuery::RetrieveVarInfo(vtkDataSet* ds, const int findElement,
PickVarInfo::Centering centering;
if (pickAtts.GetFulfilled())
{
if (pickAtts.GetPickVarInfo(varNum).HasInfo() &&
pickAtts.GetPickVarInfo(varNum).GetVariableType() != "species" &&
pickAtts.GetPickVarInfo(varNum).GetVariableType() != "scalar")
if (pickAtts.GetPickVarInfo(varNum).HasInfo()
&& pickAtts.GetPickVarInfo(varNum).GetVariableType() != "species"
&& pickAtts.GetPickVarInfo(varNum).GetVariableType() != "scalar")
continue;
vName = pickAtts.GetPickVarInfo(varNum).GetVariableName();
......@@ -756,7 +775,7 @@ avtPickQuery::RetrieveVarInfo(vtkDataSet* ds, const int findElement,
// Determine if the data is a label. All label variables have
// this marker in their field data.
labelData = (nComponents > 1) &&
(ds->GetFieldData()->GetArray("avtLabelVariableSize") != 0);
(ds->GetFieldData()->GetArray("avtLabelVariableSize") != 0);
temp = new double[nComponents];
intVector globalIncEl = pickAtts.GetGlobalIncidentElements();
......@@ -927,13 +946,13 @@ avtPickQuery::RetrieveNodes(vtkDataSet *ds, int zone)
unsigned char *gZones = NULL;
vtkIdList *cells;
bool findGhosts = (ghostType == AVT_HAS_GHOSTS &&
((ds->GetPointData()->GetArray("avtGhostNodes") != NULL) ||
(ds->GetCellData()->GetArray("avtGhostZones") != NULL)));
((ds->GetPointData()->GetArray("avtGhostNodes") != NULL) ||
(ds->GetCellData()->GetArray("avtGhostZones") != NULL)));
pickAtts.SetIncludeGhosts(findGhosts);
if (findGhosts)
{
vtkUnsignedCharArray *gn =
(vtkUnsignedCharArray*)ds->GetPointData()->GetArray("avtGhostNodes");
vtkUnsignedCharArray *gn = (vtkUnsignedCharArray*)ds->
GetPointData()->GetArray("avtGhostNodes");
if (gn)
{
gNodes = gn->GetPointer(0);
......@@ -997,7 +1016,8 @@ avtPickQuery::RetrieveNodes(vtkDataSet *ds, int zone)
}
else
{
SNPRINTF(buff, 80, "<%d, %d, %d>", ijk[0], ijk[1], ijk[2]);
SNPRINTF(buff, 80, "<%d, %d, %d>",
ijk[0], ijk[1], ijk[2]);
}
dnodeCoords.push_back(buff);
}
......@@ -1011,7 +1031,8 @@ avtPickQuery::RetrieveNodes(vtkDataSet *ds, int zone)
}
else
{
SNPRINTF(buff, 80, "<%d, %d, %d>", ijk[0], ijk[1], ijk[2]);
SNPRINTF(buff, 80, "<%d, %d, %d>",
ijk[0], ijk[1], ijk[2]);
}
bnodeCoords.push_back(buff);
}
......@@ -1025,7 +1046,8 @@ avtPickQuery::RetrieveNodes(vtkDataSet *ds, int zone)
}
else
{
SNPRINTF(buff, 80, "<%g, %g, %g>", coord[0], coord[1], coord[2]);
SNPRINTF(buff, 80, "<%g, %g, %g>",
coord[0], coord[1], coord[2]);
}
pnodeCoords.push_back(buff);
}
......@@ -1165,8 +1187,8 @@ avtPickQuery::RetrieveZones(vtkDataSet *ds, int foundNode)
{
if (pickAtts.GetShowZoneDomainLogicalCoords())
{
vtkVisItUtility::GetLogicalIndices(ds, true, cells[i], ijk,
false);
vtkVisItUtility::GetLogicalIndices(ds, true, cells[i],
ijk, false);
if (pickAtts.GetDimension() == 2)
{
......@@ -1182,8 +1204,8 @@ avtPickQuery::RetrieveZones(vtkDataSet *ds, int foundNode)
}
if (pickAtts.GetShowZoneBlockLogicalCoords())
{
vtkVisItUtility::GetLogicalIndices(ds, true, cells[i], ijk,
true);
vtkVisItUtility::GetLogicalIndices(ds, true, cells[i],
ijk, true);
if (pickAtts.GetDimension() == 2)
{
......@@ -1191,7 +1213,8 @@ avtPickQuery::RetrieveZones(vtkDataSet *ds, int foundNode)
}
else
{
SNPRINTF(buff, 80, "<%d, %d, %d>", ijk[0], ijk[1], ijk[2]);
SNPRINTF(buff, 80, "<%d, %d, %d>",
ijk[0], ijk[1], ijk[2]);
}
bzoneCoords.push_back(buff);
}
......@@ -1218,7 +1241,7 @@ avtPickQuery::RetrieveZones(vtkDataSet *ds, int foundNode)
//
// Purpose:
// Determines the zone in the dataset whose original node designation
/// matches that of the passed node.
// matches that of the passed node.
//
// Arguments:
// ds The dataset to retrieve information from.
......@@ -1331,7 +1354,8 @@ avtPickQuery::GetCurrentZoneForOriginal(vtkDataSet *ds, const int origZone)
// ****************************************************************************
intVector
avtPickQuery::GetCurrentZoneForOriginal(vtkDataSet *ds, const intVector &origZones)
avtPickQuery::GetCurrentZoneForOriginal(vtkDataSet *ds,
const intVector &origZones)
{
intVector currentZones = origZones;
vtkUnsignedIntArray *origCells = vtkUnsignedIntArray::SafeDownCast(
......@@ -1409,3 +1433,59 @@ avtPickQuery::SetGlobalIds(vtkDataSet *ds, int element)
}
pickAtts.SetGlobalIncidentElements(gie);
}
// ****************************************************************************
// Method: avtPickQuery::ConvertElNamesToGlobal
//
// Purpose:
// Converts the element names stored in pick atts to the global form.
//
// Programmer: Kathleen Bonnell
// Creation: May 11, 2005
//
// Modifications:
//