Commit 597bc38c authored by hrchilds's avatar hrchilds
Browse files

Update from July 7, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@274 18c085ea-50e0-402c-830e-de6fd14e8384
parent 6fd3f73c
......@@ -76,6 +76,9 @@
# Kathleen Bonnell, Wed May 19 16:31:04 PDT 2004
# Added queryMultiWindow.py to skipList for parallel and scalable,parallel.
#
# Hank Childs, Wed Jul 7 08:32:25 PDT 2004
# Remove volume.py from the skipList.
#
# ----------------------------------------------------------------------------
# list of users who want email every night with the log file
......@@ -203,9 +206,7 @@ curdate=`date +%Y-%m-%d-%p%I%M`
modes="serial parallel scalable,parallel"
# set list of tests/modes to skip
skipList="parallel:tests/rendering/volume.py \
scalable,parallel:tests/hybrid/lineout.py \
scalable,parallel:tests/rendering/volume.py \
skipList="scalable,parallel:tests/hybrid/lineout.py \
parallel:tests/queries/queryMultiWindow.py \
scalable,parallel:tests/queries/queryMultiWindow.py"
......
......@@ -109,6 +109,9 @@
# Brad Whitlock, Thu Apr 22 16:44:07 PST 2004
# Added more libraries to make prebinding possible on the Mac.
#
# Jeremy Meredith, Wed Jul 7 12:12:52 PDT 2004
# I changed _ser.o to simply be .o.
#
##############################################################################
@SET_MAKE@
......@@ -149,7 +152,7 @@ Ghost_src= \
CPPFLAGS=-I../../include @COMPONENT_CPPFLAGS@ @CPPFLAGS@
SEROBJ=$(SRC:.C=_ser.o)
SEROBJ=$(SRC:.C=.o)
PAROBJ=$(SRC:.C=_par.o)
LIB=libdatabase
COMMONLIBS=-ldbatts -lavtexceptions -lstate -lcomm -lmisc -lplugin -lparser -lutility -lmir -lvisit_vtk -llightweight_visit_vtk
......
......@@ -416,6 +416,10 @@ float avtGradientFilter::EvaluateValue(float x, float y, float z,
// Programmer: Hank Childs
// Creation: December 13, 2003
//
// Modifications:
// Jeremy Meredith, Fri Jul 2 15:58:01 PDT 2004
// Added a check to make sure the scalars existed before proceeding.
//
// ****************************************************************************
vtkDataArray *
......@@ -440,6 +444,12 @@ avtGradientFilter::RectilinearGradient(vtkRectilinearGrid *rg)
if (s == NULL)
{
s = rg->GetCellData()->GetScalars();
if (s == NULL)
{
EXCEPTION1(ExpressionException, "the scalar variable could not"
" be found.");
}
isNodal = false;
dims[0] -= 1;
dims[1] -= 1;
......
......@@ -72,6 +72,9 @@
# Jeremy Meredith, Tue Jun 8 13:26:51 PDT 2004
# Added specmf.
#
# Jeremy Meredith, Wed Jul 7 12:12:52 PDT 2004
# I changed _ser.o to simply be .o.
#
##############################################################################
@SET_MAKE@
......@@ -185,7 +188,7 @@ MeshQuality_src= \
CPPFLAGS=@COMPONENT_CPPFLAGS@ @CPPFLAGS@
SEROBJ=$(SRC:.C=_ser.o)
SEROBJ=$(SRC:.C=.o)
PAROBJ=$(SRC:.C=_par.o)
LIB=libexpressions
COMMONLIBS=-ldbatts -lavtexceptions -lstate -lcomm -lmisc -lparser -lutility -lvisit_vtk -llightweight_visit_vtk
......
......@@ -38,6 +38,9 @@
# Brad Whitlock, Fri Apr 23 15:53:11 PST 2004
# Added more libraries so we can prebind on MacOS X.
#
# Jeremy Meredith, Wed Jul 7 12:12:52 PDT 2004
# I changed _ser.o to simply be .o.
#
##############################################################################
##
......@@ -64,7 +67,7 @@ avtWholeImageCompositer.C avtWorldSpaceToImageSpaceTransform.C
CPPFLAGS=@COMPONENT_CPPFLAGS@ @CPPFLAGS@
SEROBJ=$(SRC:.C=_ser.o)
SEROBJ=$(SRC:.C=.o)
PAROBJ=$(SRC:.C=_par.o)
LIB=libavtfilters
COMMONLIBS=-ldbatts -lstate -lcomm -lmisc -lavtexceptions -lparser -lutility -lavtview -lvisit_vtk -llightweight_visit_vtk
......
......@@ -35,6 +35,9 @@
# Jeremy Meredith, Wed Jan 16 09:54:48 PST 2002
# Make this library build serial and parallel versions concurrently.
#
# Jeremy Meredith, Wed Jul 7 12:12:52 PDT 2004
# I changed _ser.o to simply be .o.
#
##############################################################################
##
......@@ -52,7 +55,7 @@ SRC=avtMatrix.C avtVector.C avtQuaternion.C avtTrackball.C
CPPFLAGS=@COMPONENT_CPPFLAGS@ @SILO_INCLUDE@ @CPPFLAGS@
SEROBJ=$(SRC:.C=_ser.o)
SEROBJ=$(SRC:.C=.o)
PAROBJ=$(SRC:.C=_par.o)
LIB=libavtmath
......
......@@ -64,24 +64,19 @@ avtDatasetExaminer::GetNumberOfZones(avtDataset_p &ds)
// Hank Childs, Fri Mar 15 17:18:00 PST 2002
// Moved from class avtDataset.
//
// Hank Childs, Wed Jul 7 08:10:46 PDT 2004
// Get the variable list using meta-data information, rather than by
// searching the dataset.
//
// ****************************************************************************
void
avtDatasetExaminer::GetVariableList(avtDataset_p &ds, VarList &vl)
{
avtDataTree_p dataTree = ds->dataTree;
bool success = false;
if (*dataTree != NULL)
{
dataTree->Traverse(CGetVariableList, &vl, success); }
if (!success)
{
debug1 << "HIGHLY UNUSUAL: the data tree was not able to determine "
<< "its variable list." << endl;
vl.nvars = 0;
}
avtDataAttributes &atts = ds->GetInfo().GetAttributes();
vl.nvars = atts.GetNumberOfVariables();
for (int i = 0 ; i < vl.nvars ; i++)
vl.varnames.push_back(atts.GetVariableName(i));
}
......
......@@ -13,6 +13,7 @@
#include <avtFacelist.h>
#include <avtIntervalTree.h>
#include <avtTerminatingSource.h>
#include <avtMixedVariable.h>
#include <avtTypes.h>
#include <ImproperUseException.h>
......@@ -317,3 +318,42 @@ avtMetaData::GetPipelineSpecification(int domain)
}
// ****************************************************************************
// Method: avtMetaData::GetMixedVar
//
// Purpose:
// Gets an avtMixedVariable object.
//
// Returns: The mixed variable for the dataset, if one exists.
//
// Programmer: Kathleen Bonnell
// Creation: July 1, 2004
//
// Modifications:
//
// ****************************************************************************
avtMixedVariable *
avtMetaData::GetMixedVar(int domain, int timestep)
{
VoidRefList list;
avtPipelineSpecification_p spec = GetPipelineSpecification(domain);
//
// If a timestep has been specified, set it in DataSpecification.
//
if (timestep != -1)
spec->GetDataSpecification()->SetTimestep(timestep);
source->GetVariableAuxiliaryData(AUXILIARY_DATA_MIXED_VARIABLE, NULL, spec,list);
if (list.nList == 0)
{
return NULL;
}
if (list.nList != 1)
{
EXCEPTION0(ImproperUseException);
}
return (avtMixedVariable *) *(list.list[0]);
}
......@@ -12,6 +12,7 @@
class avtFacelist;
class avtIntervalTree;
class avtMaterial;
class avtMixedVariable;
class avtSpecies;
class avtTerminatingSource;
......@@ -52,6 +53,9 @@ class avtTerminatingSource;
// Kathleen Bonnell, Mon Jun 28 08:05:38 PDT 2004
// Added optional int arg (for time) to GetMaterial, GetSpecies.
//
// Kathleen Bonnell, Thu Jul 1 16:41:57 PDT 2004
// Added GetMixedVar.
//
// ****************************************************************************
class PIPELINE_API avtMetaData
......@@ -66,6 +70,7 @@ class PIPELINE_API avtMetaData
avtFacelist *GetExternalFacelist(int);
avtMaterial *GetMaterial(int, int = -1);
avtSpecies *GetSpecies(int, int = -1);
avtMixedVariable *GetMixedVar(int, int = -1);
protected:
avtTerminatingSource *source;
......
......@@ -54,10 +54,15 @@ avtNullData::Instance(void)
// Programmer: Mark C. Miller
// Creation: March 12, 2003
//
// Modifications:
//
// Mark C. Miller, Wed Jul 7 11:42:09 PDT 2004
// Added bool argument to call to construct the writer
//
// ****************************************************************************
avtDataObjectWriter *
avtNullData::InstantiateWriter(void)
avtNullData::InstantiateWriter()
{
return new avtNullDataWriter;
return new avtNullDataWriter(writerShouldMergeParallelStreams);
}
......@@ -36,6 +36,9 @@ const char * const AVT_NULL_DATASET_MSG
// Mark C. Miller, Wed Feb 4 19:47:30 PST 2004
// Added Instance & DerivedCopy, needed by avtDataObject->Clone
//
// Mark C. Miller, Wed Jul 7 11:42:09 PDT 2004
// Added method SetWriterShouldMergeParallelStreams and assoc. data member
//
// ****************************************************************************
class PIPELINE_API avtNullData : public avtDataObject
......@@ -43,14 +46,17 @@ class PIPELINE_API avtNullData : public avtDataObject
public:
avtNullData(avtDataObjectSource *src, const char *_typeStr = NULL)
: avtDataObject(src)
{ typeStr = _typeStr ? _typeStr : "avtNullData"; };
{ typeStr = _typeStr ? _typeStr : "avtNullData";
writerShouldMergeParallelStreams = false; };
virtual ~avtNullData();
virtual const char *GetType(void) { return typeStr.c_str(); };
virtual int GetNumberOfCells(bool polysOnly = false) const { return 0;};
virtual void SetType(char *_typeStr ) { typeStr = _typeStr; };
void SetWriterShouldMergeParallelStreams()
{ writerShouldMergeParallelStreams = true; };
avtDataObject *Instance(void);
avtDataObjectWriter *InstantiateWriter(void);
avtDataObjectWriter *InstantiateWriter();
protected:
virtual void DerivedCopy(avtDataObject *) {;};
......@@ -58,6 +64,7 @@ class PIPELINE_API avtNullData : public avtDataObject
private:
std::string typeStr;
bool writerShouldMergeParallelStreams;
};
typedef ref_ptr<avtNullData> avtNullData_p;
......
......@@ -173,6 +173,9 @@
# Brad Whitlock, Thu Apr 22 15:15:37 PST 2004
# Added more libraries to the link line.
#
# Jeremy Meredith, Wed Jul 7 12:12:52 PDT 2004
# I changed _ser.o to simply be .o.
#
##############################################################################
@SET_MAKE@
......@@ -305,7 +308,7 @@ Sources_src= \
CPPFLAGS=@COMPONENT_CPPFLAGS@ @CPPFLAGS@
SEROBJ=$(SRC:.C=_ser.o)
SEROBJ=$(SRC:.C=.o)
PAROBJ=$(SRC:.C=_par.o)
LIB=libpipeline
SERLIBS=-ldbatts -lavtexceptions -lstate -lcomm -lmisc -lutility -lparser -lavtmath_ser @VTK_LIBS@ $(X_LIBS) @LIBS@
......
......@@ -17,11 +17,15 @@
// Programmer: Hank Childs
// Creation: February 5, 2004
//
// Modifications:
// Mark C. Miller, Wed Jul 7 11:42:09 PDT 2004
// Added bool argument
//
// ****************************************************************************
avtNullDataWriter::avtNullDataWriter()
avtNullDataWriter::avtNullDataWriter(bool _mustMerge)
{
;
mustMerge = _mustMerge;
}
......
......@@ -29,19 +29,27 @@ class avtDataObjectString;
// Moved inlined constructor and destructor definitions to .C files
// because certain compilers have problems with them.
//
// Mark C. Miller, Wed Jul 7 11:42:09 PDT 2004
// Added argument to constructor and associated data member
//
// ****************************************************************************
class PIPELINE_API avtNullDataWriter : public avtOriginatingNullDataSink,
public avtDataObjectWriter
{
public:
avtNullDataWriter();
avtNullDataWriter(bool _mustMerge = false);
virtual ~avtNullDataWriter();
//virtual bool MustMergeParallelStreams(void) { return true; };
bool MustMergeParallelStreams(void)
{ return mustMerge; };
protected:
void DataObjectWrite(avtDataObjectString &);
private:
bool mustMerge;
};
......
......@@ -8,10 +8,12 @@
#ifdef PARALLEL
#include <mpi.h>
#include <BufferConnection.h>
#endif
#include <DebugStream.h>
#include <ImproperUseException.h>
#include <AttributeGroup.h>
using std::string;
using std::vector;
......@@ -894,3 +896,134 @@ int GetUniqueMessageTag()
#endif
return retval;
}
// ****************************************************************************
// Function: GetAttToRootProc
//
// Purpose:
// Gets an attribute to processor 0.
//
// Arguments:
// att The att to get to proc 0.
// hasAtt Inidicates whether his processor has the attribute or not.
//
// Programmer: Kathleen Bonnell
// Creation: July 6, 2004
//
// Modifications:
//
// ****************************************************************************
void
GetAttToRootProc(AttributeGroup &att, int hasAtt)
{
#ifdef PARALLEL
int rank, nprocs, size, i;
BufferConnection b;
unsigned char *buf;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
int mpiHasAttTag = GetUniqueMessageTag();
int mpiSizeTag = GetUniqueMessageTag();
int mpiDataTag = GetUniqueMessageTag();
if (rank == 0)
{
for (i = 1; i < nprocs; i++)
{
MPI_Status stat, stat2;
MPI_Recv(&hasAtt, 1, MPI_INT, MPI_ANY_SOURCE,
mpiHasAttTag, MPI_COMM_WORLD, &stat);
if (hasAtt)
{
MPI_Recv(&size, 1, MPI_INT, stat.MPI_SOURCE, mpiSizeTag,
MPI_COMM_WORLD, &stat2);
buf = new unsigned char[size];
MPI_Recv(buf, size, MPI_UNSIGNED_CHAR, stat.MPI_SOURCE, mpiDataTag,
MPI_COMM_WORLD, &stat2);
b.Append(buf, size);
att.Read(b);
delete [] buf;
}
}
}
else
{
MPI_Send(&hasAtt, 1, MPI_INT, 0, mpiHasAttTag, MPI_COMM_WORLD);
if (hasAtt)
{
att.SelectAll();
att.Write(b);
size = att.CalculateMessageSize(b);
buf = new unsigned char[size];
for (int i = 0; i < size; ++i)
b.Read(buf+i);
MPI_Send(&size, 1, MPI_INT, 0, mpiSizeTag, MPI_COMM_WORLD);
MPI_Send(buf, size, MPI_UNSIGNED_CHAR, 0, mpiDataTag, MPI_COMM_WORLD);
delete [] buf;
}
}
#endif
}
// ****************************************************************************
// Function: GetFloatArrayToRootProc
//
// Purpose:
// Gets a float array to processor 0.
//
// Arguments:
// fa The float array.
// nf The number of items in the array.
// success Inidicates whether or not this processor has the float array.
//
// Programmer: Kathleen Bonnell
// Creation: July 6, 2004
//
// Modifications:
//
// ****************************************************************************
void
GetFloatArrayToRootProc(float *fa, int nf, bool &success)
{
#ifdef PARALLEL
int myRank, numProcs;
MPI_Comm_rank(MPI_COMM_WORLD, &myRank);
MPI_Comm_size(MPI_COMM_WORLD, &numProcs);
int mpiGoodTag = GetUniqueMessageTag();
int mpiFloatArrayTag = GetUniqueMessageTag();
if (myRank == 0)
{
MPI_Status stat, stat2;
int good;
for (int i = 1; i < numProcs; i++)
{
MPI_Recv(&good, 1, MPI_INT, MPI_ANY_SOURCE,
mpiGoodTag, MPI_COMM_WORLD, &stat);
if (good)
{
MPI_Recv(fa, nf, MPI_FLOAT, stat.MPI_SOURCE, mpiFloatArrayTag,
MPI_COMM_WORLD, &stat2);
success = good;
}
}
}
else
{
MPI_Send(&success, 1, MPI_INT, 0, mpiGoodTag, MPI_COMM_WORLD);
if (success)
{
MPI_Send(fa, nf, MPI_FLOAT, 0, mpiFloatArrayTag, MPI_COMM_WORLD);
}
}
#endif
}
......@@ -9,6 +9,7 @@
#include <vector>
#include <string>
class AttributeGroup;
PIPELINE_API void Barrier(void);
PIPELINE_API bool Collect(float *, int);
......@@ -37,6 +38,9 @@ PIPELINE_API bool GetListToRootProc(std::vector<std::string> &, int);
PIPELINE_API int GetUniqueMessageTag();
PIPELINE_API void GetAttToRootProc(AttributeGroup &, int);
PIPELINE_API void GetFloatArrayToRootProc(float *, int, bool &);
#endif
......@@ -4,6 +4,7 @@
#include <avtDatasetQuery.h>
#include <avtParallel.h>
#include <avtSourceFromAVTDataset.h>
#include <vtkDataSet.h>
......@@ -11,9 +12,6 @@
#include <BadIndexException.h>
#include <DebugStream.h>
#ifdef PARALLEL
#include <mpi.h>
#endif
// ****************************************************************************
......@@ -339,6 +337,9 @@ avtDatasetQuery::GetResultValue(const int i)
// Added TRY-CATCH, and a test for Error in avtDataValidity. Skip
// the timestep in those cases and indicate in the args.
//
// Kathleen Bonnell, Tue Jul 6 15:38:28 PDT 2004
// Removed mpi call, used UnifyMaximumValue instead.
//
// ****************************************************************************
void
......@@ -405,17 +406,12 @@ avtDatasetQuery::PerformQueryInTime(QueryAttributes *qA, const int startT ,
}
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
inError = bool(UnifyMaximumValue(hadError));
if (inError)
{
skippedTimeSteps.push_back(queryAtts.GetTimeStep());
......
......@@ -85,6 +85,9 @@
# Kathleen Bonnell, Thu Jun 10 17:57:41 PDT 2004
# Added avtNodeCoordsQuery.
#
# Jeremy Meredith, Wed Jul 7 12:12:52 PDT 2004
# I changed _ser.o to simply be .o.
#
##############################################################################
@SET_MAKE@
......@@ -147,12 +150,13 @@ Queries_src= \
Queries/avtVariableQuery.C \
Queries/avtVariableSummationQuery.C \
Queries/avtWeightedVariableSummationQuery.C \
Queries/avtZoneCenterQuery.C
Queries/avtZoneCenterQuery.C \
Queries/MinMaxInfo.C
CPPFLAGS=@COMPONENT_CPPFLAGS@ @CPPFLAGS@
SEROBJ=$(SRC:.C=_ser.o)
SEROBJ=$(SRC:.C=.o)
PAROBJ=$(SRC:.C=_par.o)
LIB=libquery
COMMONLIBS=-ldbatts -lavtexceptions -lstate -lcomm -lmisc -lparser -lutility -lavtview -lvisit_vtk -llightweight_visit_vtk
......
......@@ -14,17 +14,12 @@
#include <avtExpressionEvaluatorFilter.h>
#include <avtMatrix.h>
#include <avtParallel.h>