Commit b7db3165 authored by hrchilds's avatar hrchilds
Browse files

Update from July 6, 2005

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@495 18c085ea-50e0-402c-830e-de6fd14e8384
parent 24e7b861
......@@ -73,6 +73,9 @@ $0 = shift @ARGV;
# Added support for -newconsole. I split the makemovie.py script and
# made this program call makemoviemain.py.
#
# Jeremy Meredith, Wed Jul 6 14:46:56 PDT 2005
# Added xlc compiler-specific support.
#
###############################################################################
......@@ -595,9 +598,18 @@ for ($os) {
/aix/ && do {
if ($ENV{OBJECT_MODE} and $ENV{OBJECT_MODE} eq "64")
{
push @supportedarchs, "ibm-aix-pwr64";
if ($req_compiler eq "xlc") {
push @supportedarchs, "ibm-aix-pwr64-xlc";
}
else {
push @supportedarchs, "ibm-aix-pwr64";
}
}
if ($req_compiler eq "xlc") {
push @supportedarchs, "ibm-aix-pwr-xlc";
} else {
push @supportedarchs, "ibm-aix-pwr";
}
push @supportedarchs, "ibm-aix-pwr";
$launch = "poe" if ($procs_set && $launch eq "");
last;
};
......
......@@ -192,7 +192,7 @@
# launch tools without passing them as an argument to the visit script.
#
# Jeremy Meredith, Tue Feb 22 18:55:53 PST 2005
# Renamed convert to the more unique visitconver.
# Renamed convert to the more unique visitconvert.
#
# Jeremy Meredith, Thu Mar 17 11:31:49 PST 2005
# Added xml2plugin back into the distribution.
......@@ -206,6 +206,9 @@
# Brad Whitlock, Thu Jun 23 17:11:21 PST 2005
# Made it copy makemoviemain.py
#
# Jeremy Meredith, Wed Jul 6 14:46:56 PDT 2005
# Added xlc compiler-specific support.
#
#------------------------------------------------------------------------------
set DataFiles = "TRUE"
......@@ -470,7 +473,7 @@ endif
mkdir distribution/visit/$Version
mkdir distribution/visit/$Version/bin
ln -s $Version distribution/visit/current
set platforms="hp-hpux-pa sgi-irix6-mips2 sun4-sunos5-sparc ibm-aix-pwr ibm-aix-pwr64 dec-osf1-alpha linux-intel linux-intel-icc linux-ia64 linux-alpha linux-x86_64 darwin-ppc"
set platforms="hp-hpux-pa sgi-irix6-mips2 sun4-sunos5-sparc ibm-aix-pwr ibm-aix-pwr-xlc ibm-aix-pwr64 ibm-aix-pwr64-xlc dec-osf1-alpha linux-intel linux-intel-icc linux-ia64 linux-alpha linux-x86_64 darwin-ppc"
foreach platform ($platforms)
mkdir distribution/visit/$Version/$platform
mkdir distribution/visit/$Version/$platform/bin
......@@ -540,11 +543,21 @@ switch ($os)
echo "Found an AIX version of visit"
if ("${?OBJECT_MODE}") then
if ("${OBJECT_MODE}" == "64") then
set osver = aix64
set visitbindir = ibm-aix-pwr64
if (("$CompilerGiven" == "TRUE") && ("$compiler" == "xlc")) then
set osver = aix64-xlc
set visitbindir = ibm-aix-pwr64-xlc
else
set osver = aix64
set visitbindir = ibm-aix-pwr64
endif
else
set osver = aix
set visitbindir = ibm-aix-pwr
if (("$CompilerGiven" == "TRUE") && ("$compiler" == "xlc")) then
set osver = aix-xlc
set visitbindir = ibm-aix-pwr-xlc
else
set osver = aix
set visitbindir = ibm-aix-pwr
endif
endif
else
set osver = aix
......
......@@ -201,31 +201,63 @@ Boundary::AddNeighbor(int d, int mi, int o[3], int e[6])
// Programmer: Jeremy Meredith
// Creation: November 21, 2001
//
// Modifications:
//
// Hank Childs, Tue Jul 5 14:05:09 PDT 2005
// Do not call FindNeighborIndex, since it assumes that any pair of domains
// can have at most one boundary.
//
// ****************************************************************************
void
Boundary::DeleteNeighbor(int d)
Boundary::DeleteNeighbor(int d, vector<Boundary> &wholelist)
{
int n = FindNeighborIndex(d);
// Stop expansion of the boundary
if (neighbors[n].type == IMIN)
expand[0] = 0;
if (neighbors[n].type == IMAX)
expand[1] = 0;
if (neighbors[n].type == JMIN)
expand[2] = 0;
if (neighbors[n].type == JMAX)
expand[3] = 0;
if (neighbors[n].type == KMIN)
expand[4] = 0;
if (neighbors[n].type == KMAX)
expand[5] = 0;
// Remove the neighbor from the list
for (int i=n+1; i<neighbors.size(); i++)
neighbors[i-1] = neighbors[i];
neighbors.resize(neighbors.size()-1);
int i;
vector<int> delete_list;
for (i=0; i<neighbors.size(); i++)
if (neighbors[i].domain == d)
delete_list.push_back(i);
if (delete_list.size() == 0)
{
// If we have two boundaries between two domains, both those boundaries
// will be removed when this method is called. But because of
// bookkeeping issues, this method may be called twice. So just ignore
// rather than throwing an exception.
//
// EXCEPTION1(VisItException,
// "No match for domain in Boundary::DeleteNeighbor");
return;
}
for (i = delete_list.size()-1 ; i >= 0 ; i--)
{
int n = delete_list[i];
// Stop expansion of the boundary
if (neighbors[n].type == IMIN)
expand[0] = 0;
if (neighbors[n].type == IMAX)
expand[1] = 0;
if (neighbors[n].type == JMIN)
expand[2] = 0;
if (neighbors[n].type == JMAX)
expand[3] = 0;
if (neighbors[n].type == KMIN)
expand[4] = 0;
if (neighbors[n].type == KMAX)
expand[5] = 0;
// Remove the neighbor from the list
for (int i=n+1; i<neighbors.size(); i++)
{
int d = neighbors[i].domain;
int entry = neighbors[i].match;
wholelist[d].neighbors[entry].match--;
neighbors[i-1] = neighbors[i];
}
neighbors.resize(neighbors.size()-1);
}
Finish();
}
......@@ -268,29 +300,6 @@ Boundary::Finish()
newzextents[5] = oldzextents[5] + expand[5];
}
// ****************************************************************************
// Method: Boundary::FindNeighborIndex
//
// Purpose:
// Finds the index the requested domain in our list.
//
// Arguments:
// d the domain to find
//
// Programmer: Jeremy Meredith
// Creation: November 21, 2001
//
// ****************************************************************************
int
Boundary::FindNeighborIndex(int d)
{
for (int i=0; i<neighbors.size(); i++)
if (neighbors[i].domain == d)
return i;
EXCEPTION1(VisItException,
"No match for domain in Boundary::FindNeighborIndex");
}
// ****************************************************************************
// Method: Boundary::IsGhostZone
......
......@@ -4,6 +4,8 @@
#include <avtStructuredDomainBoundaries.h>
#include <algorithm>
#include <vtkCellData.h>
#include <vtkFloatArray.h>
#include <vtkIntArray.h>
......@@ -15,6 +17,7 @@
#include <avtIntervalTree.h>
#include <avtMaterial.h>
#include <avtMixedVariable.h>
#include <avtParallel.h>
#include <TimingsManager.h>
#include <VisItException.h>
......@@ -22,11 +25,12 @@
#ifdef PARALLEL
#include <mpi.h>
#include <avtParallel.h>
#endif
using std::string;
using std::vector;
using std::sort;
// ----------------------------------------------------------------------------
......@@ -96,6 +100,9 @@ avtStructuredDomainBoundaries::CreateDomainToProcessorMap(const vector<int> &dom
// Hank Childs, Mon Jun 27 10:02:55 PDT 2005
// Added timing info.
//
// Hank Childs, Wed Jul 6 06:50:55 PDT 2005
// Add argument to DeleteNeighbor.
//
// ****************************************************************************
void
avtStructuredDomainBoundaries::CreateCurrentDomainBoundaryInformation(
......@@ -116,7 +123,7 @@ avtStructuredDomainBoundaries::CreateCurrentDomainBoundaryInformation(
for (int j=0; j<wbi.neighbors.size(); j++)
{
if (domain2proc[wbi.neighbors[j].domain] < 0)
boundary[i].DeleteNeighbor(wbi.neighbors[j].domain);
boundary[i].DeleteNeighbor(wbi.neighbors[j].domain, boundary);
}
}
visitTimer->StopTimer(t0, "avtStructuredDomainBoundaries::CurrentDBI");
......@@ -172,6 +179,11 @@ BoundaryHelperFunctions<T>::InitializeBoundaryData()
// Jeremy Meredith, Thu Dec 13 11:54:58 PST 2001
// Templatized this function.
//
// Hank Childs, Wed Jul 6 06:50:55 PDT 2005
// Instead of calculating index into domain's neighbor list in a non-robust
// way, use the "match", which is already pre-computed by the client for
// this purpose.
//
// ****************************************************************************
template <class T>
void
......@@ -191,7 +203,7 @@ BoundaryHelperFunctions<T>::FillBoundaryData(int d1,
bnddata[d1][n] = new T[n1->ncells * ncomp];
int d2 = n1->domain;
int mi = sdb->boundary[d2].FindNeighborIndex(d1);
int mi = n1->match;
Neighbor *n2 = &(sdb->boundary[d2].neighbors[mi]);
int *n2extents = (isPointData ? n2->nextents : n2->zextents);
......@@ -240,6 +252,11 @@ BoundaryHelperFunctions<T>::FillBoundaryData(int d1,
// Hank Childs, Thu Nov 13 08:56:18 PST 2003
// Removed unused variables.
//
// Hank Childs, Wed Jul 6 06:50:55 PDT 2005
// Instead of calculating index into domain's neighbor list in a non-robust
// way, use the "match", which is already pre-computed by the client for
// this purpose.
//
// ****************************************************************************
template <class T>
void
......@@ -260,7 +277,7 @@ BoundaryHelperFunctions<T>::FillRectilinearBoundaryData(int d1,
bnddata[d1][n] = new T[n1->npts*3];
int d2 = n1->domain;
int mi = sdb->boundary[d2].FindNeighborIndex(d1);
int mi = n1->match;
Neighbor *n2 = &(sdb->boundary[d2].neighbors[mi]);
int *n2extents = n2->nextents;
......@@ -307,6 +324,13 @@ BoundaryHelperFunctions<T>::FillRectilinearBoundaryData(int d1,
// Note: bnddata, bndmixmat, and bndmixzone may each be NULL.
// olddata may be NULL as well as long as the mixlen is zero.
//
// Modifications:
//
// Hank Childs, Wed Jul 6 06:50:55 PDT 2005
// Instead of calculating index into domain's neighbor list in a non-robust
// way, use the "match", which is already pre-computed by the client for
// this purpose.
//
// ****************************************************************************
template <class T>
void
......@@ -325,7 +349,7 @@ BoundaryHelperFunctions<T>::FillMixedBoundaryData(int d1,
{
Neighbor *n1 = &bi->neighbors[n];
int d2 = n1->domain;
int mi = sdb->boundary[d2].FindNeighborIndex(d1);
int mi = n1->match;
Neighbor *n2 = &(sdb->boundary[d2].neighbors[mi]);
int *n2extents = n2->zextents;
......@@ -573,6 +597,11 @@ BoundaryHelperFunctions<T>::CommunicateBoundaryData(const vector<int> &domain2pr
// Mark C. Miller, Wed Jun 9 21:50:12 PDT 2004
// Eliminated use of MPI_ANY_TAG and modified to use GetUniqueMessageTags
//
// Hank Childs, Wed Jul 6 06:50:55 PDT 2005
// Instead of calculating index into domain's neighbor list in a non-robust
// way, use the "match", which is already pre-computed by the client for
// this purpose.
//
// ****************************************************************************
template <class T>
void
......@@ -601,7 +630,7 @@ BoundaryHelperFunctions<T>::CommunicateMixedBoundaryData(const vector<int> &doma
{
Neighbor *n1 = &bi->neighbors[n];
int d2 = n1->domain;
int mi = sdb->boundary[d2].FindNeighborIndex(bi->domain);
int mi = n1->match;
if (domain2proc[d1] != domain2proc[d2])
{
......@@ -632,7 +661,7 @@ BoundaryHelperFunctions<T>::CommunicateMixedBoundaryData(const vector<int> &doma
{
Neighbor *n1 = &bi->neighbors[n];
int d2 = n1->domain;
int mi = sdb->boundary[d2].FindNeighborIndex(bi->domain);
int mi = n1->match;
int size = bndmixlen[d1][n];
if (domain2proc[d1] != domain2proc[d2])
......@@ -930,6 +959,11 @@ avtStructuredDomainBoundaries::SetExistence(int d1,
// Jeremy Meredith, Thu Dec 13 11:54:58 PST 2001
// Templatized this function.
//
// Hank Childs, Wed Jul 6 06:50:55 PDT 2005
// Instead of calculating index into domain's neighbor list in a non-robust
// way, use the "match", which is already pre-computed by the client for
// this purpose.
//
// ****************************************************************************
template <class T>
void
......@@ -945,7 +979,7 @@ BoundaryHelperFunctions<T>::SetNewBoundaryData(int d1,
Neighbor *n1 = &bi->neighbors[n];
int d2 = n1->domain;
int mi = sdb->boundary[d2].FindNeighborIndex(bi->domain);
int mi = n1->match;
T *data = bnddata[d2][mi];
if (!data)
EXCEPTION1(VisItException,"Null array");
......@@ -990,6 +1024,13 @@ BoundaryHelperFunctions<T>::SetNewBoundaryData(int d1,
// Programmer: Hank Childs
// Creation: November 11, 2003
//
// Modifications:
//
// Hank Childs, Wed Jul 6 06:50:55 PDT 2005
// Instead of calculating index into domain's neighbor list in a non-robust
// way, use the "match", which is already pre-computed by the client for
// this purpose.
//
// ****************************************************************************
template <class T>
void
......@@ -1006,8 +1047,8 @@ BoundaryHelperFunctions<T>::SetNewRectilinearBoundaryData(int d1,
{
Neighbor *n1 = &bi->neighbors[n];
int d2 = n1->domain;
int mi = n1->match;
int mi = sdb->boundary[d2].FindNeighborIndex(bi->domain);
T *data = coord[d2][mi];
if (!data)
EXCEPTION1(VisItException,"Null array");
......@@ -1072,6 +1113,11 @@ BoundaryHelperFunctions<T>::SetNewRectilinearBoundaryData(int d1,
// Jeremy Meredith, Mon Oct 28 19:29:12 PST 2002
// Added newmixlen as an output argument.
//
// Hank Childs, Wed Jul 6 06:50:55 PDT 2005
// Instead of calculating index into domain's neighbor list in a non-robust
// way, use the "match", which is already pre-computed by the client for
// this purpose.
//
// ****************************************************************************
template <class T>
void
......@@ -1096,7 +1142,7 @@ BoundaryHelperFunctions<T>::SetNewMixedBoundaryData(int d1,
{
Neighbor *n1 = &bi->neighbors[n];
int d2 = n1->domain;
int mi = sdb->boundary[d2].FindNeighborIndex(bi->domain);
int mi = n1->match;
if (!bndmatlist[d2][mi])
EXCEPTION1(VisItException,"Null array");
......@@ -1923,6 +1969,11 @@ avtStructuredDomainBoundaries::ExchangeIntVector(vector<int> domainNum,
// Hank Childs, Wed Jun 29 15:24:35 PDT 2005
// Cache domain2proc.
//
// Hank Childs, Wed Jul 6 06:50:55 PDT 2005
// Instead of calculating index into domain's neighbor list in a non-robust
// way, use the "match", which is already pre-computed by the client for
// this purpose.
//
// ****************************************************************************
vector<avtMaterial*>
avtStructuredDomainBoundaries::ExchangeMaterial(vector<int> domainNum,
......@@ -1977,8 +2028,8 @@ avtStructuredDomainBoundaries::ExchangeMaterial(vector<int> domainNum,
for (int n=0; n<bi.neighbors.size(); n++)
{
int d1 = bi.domain;
int mi = bi.neighbors[n].match;
int d2 = bi.neighbors[n].domain;
int mi = boundary[d2].FindNeighborIndex(d1);
newmixlen += mixlen[d2][mi];
}
......@@ -2069,6 +2120,11 @@ avtStructuredDomainBoundaries::ExchangeMaterial(vector<int> domainNum,
// Hank Childs, Wed Jun 29 15:24:35 PDT 2005
// Cache domain2proc.
//
// Hank Childs, Wed Jul 6 06:50:55 PDT 2005
// Instead of calculating index into domain's neighbor list in a non-robust
// way, use the "match", which is already pre-computed by the client for
// this purpose.
//
// ****************************************************************************
vector<avtMixedVariable*>
avtStructuredDomainBoundaries::ExchangeMixVar(vector<int> domainNum,
......@@ -2164,8 +2220,8 @@ avtStructuredDomainBoundaries::ExchangeMixVar(vector<int> domainNum,
for (int n=0; n<bi.neighbors.size(); n++)
{
int d1 = bi.domain;
int mi = bi.neighbors[n].match;
int d2 = bi.neighbors[n].domain;
int mi = boundary[d2].FindNeighborIndex(d1);
newmixlen += mixlen[d2][mi];
}
......@@ -2896,6 +2952,10 @@ avtStructuredDomainBoundaries::SetIndicesForAMRPatch(int domain,
// Hank Childs, Mon Jun 27 10:48:41 PDT 2005
// Re-wrote to use interval trees for more efficient overlap finding.
//
// Hank Childs, Wed Jul 6 06:56:02 PDT 2005
// Do some sorting so that we know the "match" entry for the neighbor
// index will be correct.
//
// ****************************************************************************
void
......@@ -2934,6 +2994,12 @@ avtStructuredDomainBoundaries::CalculateBoundaries(void)
max_vec[2] = (float) extents[6*i+5];
vector<int> list;
itree.GetDomainsListFromRange(min_vec, max_vec, list);
// To get the "match" entry correct, we have to sort the list. This
// will ensure that we can predict what a domain's match number will be
// for its neighbor.
sort(list.begin(), list.end());
for (j = 0 ; j < list.size() ; j++)
{
if (i == list[j])
......
......@@ -30,9 +30,17 @@ struct Neighbor
int type;
};
// ****************************************************************************
//
// Class: Boundary
//
// Modifications:
//
// Hank Childs, Tue Jul 5 14:05:09 PDT 2005
// Removed method FindNeighborIndex which did not work if two domains
// shared multiple boundaries.
//
// ****************************************************************************
struct Boundary
{
enum BoundaryType
......@@ -67,10 +75,9 @@ struct Boundary
// Creation methods
void SetExtents(int[6]);
void AddNeighbor(int,int,int[3],int[6]);
void DeleteNeighbor(int);
void DeleteNeighbor(int, vector<Boundary> &);
void Finish();
// Utility methods
int FindNeighborIndex(int);
bool IsGhostZone(int,int);
bool IsGhostZone(int,int,int);
int OldPointIndex(int, int, int);
......
......@@ -118,6 +118,9 @@ avtDatasetVerifier::VerifyDatasets(int nlist, vtkDataSet **list,
// Kathleen Bonnell, Tue Feb 1 10:36:59 PST 2005
// Convert non-float Points to float. Convert unsigned char data to float.
//
// Hank Childs, Tue Jul 5 16:22:56 PDT 2005
// Add variable names to warning message ['6368].
//
// ****************************************************************************
void
......@@ -186,7 +189,7 @@ avtDatasetVerifier::VerifyDataset(vtkDataSet *ds, int dom)
if (nscalars != nPts)
{
CorrectVarMismatch(pt_var, ds->GetPointData(), nPts);
IssueVarMismatchWarning(nscalars, nPts, true, dom);
IssueVarMismatchWarning(nscalars, nPts,true,dom,pt_var->GetName());
}
if (pt_var->GetDataType() == VTK_UNSIGNED_CHAR &&
strncmp(pt_var->GetName(), "avt", 3) != 0)
......@@ -234,7 +237,8 @@ avtDatasetVerifier::VerifyDataset(vtkDataSet *ds, int dom)
}
}
if (issueWarning)
IssueVarMismatchWarning(nscalars, nCells, false, dom);
IssueVarMismatchWarning(nscalars, nCells, false, dom,
cell_var->GetName());
}
if (cell_var->GetDataType() == VTK_UNSIGNED_CHAR &&
strncmp(cell_var->GetName(), "avt", 3) != 0)
......@@ -277,26 +281,30 @@ avtDatasetVerifier::VerifyDataset(vtkDataSet *ds, int dom)
// Hank Childs, Fri Jan 9 09:43:13 PST 2004
// Added argument dom.
//
// Hank Childs, Tue Jul 5 16:18:02 PDT 2005
// Added variable name. ['6368]
//
// ****************************************************************************
void
avtDatasetVerifier::IssueVarMismatchWarning(int nVars, int nUnits,
bool isPoint, int dom)
avtDatasetVerifier::IssueVarMismatchWarning(int nVars, int nUnits,bool isPoint,
int dom, const char *varname)
{
if (issuedWarningForVarMismatch)
{
return;
}
const char *vname = (varname != NULL ? varname : "<unnamed>");
const char *unit_string = (isPoint ? "nodal" : "zonal");
const char *action = ((nVars < nUnits)
? "Extra 0.'s were added"
: "Some values were removed");
char msg[1024];
sprintf(msg, "In domain %d, your %s variable has %d values, but it should "
"have %d. %s to ensure VisIt runs smoothly.",
dom, unit_string, nVars, nUnits, action);
sprintf(msg, "In domain %d, your %s variable \"%s\" has %d values, but it "
"should have %d. %s to ensure VisIt runs smoothly.",
dom, unit_string, vname, nVars, nUnits, action);
avtCallback::IssueWarning(msg);
issuedWarningForVarMismatch = true;
......
......@@ -40,6 +40,9 @@ class vtkDataSetAttributes;
// Changed arguments for CorrectVarMismatch, to make the method able to
// handle more var types.
//
// Hank Childs, Tue Jul 5 16:22:56 PDT 2005
// Add variable name to IssueWarning call.
//
// ****************************************************************************
class PIPELINE_API avtDatasetVerifier
......@@ -56,7 +59,7 @@ class PIPELINE_API avtDatasetVerifier
void VerifyDataset(vtkDataSet *, int);
void CorrectVarMismatch(vtkDataArray *, vtkDataSetAttributes*, int);
void IssueVarMismatchWarning(int, int, bool, int);
void IssueVarMismatchWarning(int, int, bool, int, const char *);
};
......
......@@ -6,107 +6,211 @@ VISITHOME=/usr/gapps/visit
##
## Use the g++ 3.1 compiler.
##
CC=gcc-3.1
CXX=g++-3.1
##
## If MESA is not set, use VisIt's mesa.
##
if test -z "$MESA"; then
MESA=$VISITHOME/mesa/5.0/aix
if test -z "$CXX"; then
CC=gcc-3.1
fi
##
## If VTK is not set, use VisIt's vtk.
##
if test -z "$VTK"; then
VTK=$VISITHOME/vtk/2003.10.28/aix_5
if test -z "$CC"; then
CXX=g++-3.1
fi
##
## If QT is not set, use VisIt's Qt.
##
if test -z "$QT_BIN"; then
QT_BIN=$VISITHOME/qt/3.3.2/aix_5_gcc_3.1/bin