Commit d53b2436 authored by hrchilds's avatar hrchilds

Update from November 4, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@111 18c085ea-50e0-402c-830e-de6fd14e8384
parent 3d146e22
......@@ -164,6 +164,9 @@ NetworkManager::ClearAllNetworks(void)
// Mark C. Miller Thu Oct 9 10:59:27 PDT 2003
// I modified to force GetMetaData and GetSIL if they're invariant
//
// Hank Childs, Tue Nov 4 14:19:05 PST 2003
// Checked in work-around (HACK) to avoid apparent compiler bug on AIX.
//
// ****************************************************************************
NetnodeDB *
......@@ -238,7 +241,42 @@ NetworkManager::GetDBFromCache(const string &filename, int time)
netDB->SetDBInfo(filename, "", time);
const avtIOInformation & ioinfo = db->GetIOInformation();
loadBalancer->AddDatabase(filename, ioinfo);
CATCH_RETURN2(1, netDB);
// The code here should be:
// CATCH_RETURN2(1, netDB);
//
// However: this is crashing on AIX when you do a re-open (see '3984).
// After investigating this bug, I have determined the following:
// (1) A valid pointer is being returned from this function. However
// the calling function receives NULL (leading to a seg fault).
// (2) When compiling with fake exceptions and running under purify
// on the Suns, there are no warnings.
// (3) The catch return unwinds into 3 calls. If you put a print
// statement right before the last one (the return), everything is
// returned correctly and there is no seg fault.
//
// I'm always very leery to call something a compiler bug. However,
// on different platforms there is no problem. I think it is even
// more fishy that things work if there is a print statement and don't
// if there is not. It certainly sounds like a compiler bug.
//
// Below is code that "makes this work". It is essentially a
// CATCH_RETURN2 with a print statement in the middle. If CATCH_RETURN
// were to ever change, this coding would have to change as well
// (thus, I have introduced a maintenance problem). As such, I put
// a comment in VisItException.h referencing this comment. If the
// coding below can ever be replaced with an everyday CATCH_RETURN,
// the comment in VisItException.h should be removed.
//
#ifdef FAKE_EXCEPTIONS
exception_delete(exception_caught);
jump_stack_top -= (1);
debug5 << "This debug statement (from the NetworkManager) is "
<< "being issued to get around a compiler bug." << endl;
return (netDB);
#else
return netDB;
#endif
}
CATCH(DatabaseException)
{
......
......@@ -2,6 +2,7 @@
#include <vtkCellArray.h>
#include <vtkCellData.h>
#include <vtkDataSetRemoveGhostCells.h>
#include <vtkObjectFactory.h>
#include <vtkPointData.h>
#include <vtkPolyData.h>
......@@ -424,11 +425,29 @@ void vtkRectilinearGridFacelistFilter::Execute()
}
// ****************************************************************************
// Modifications:
//
// Hank Childs, Tue Nov 4 13:34:38 PST 2003
// Do a better job handling ghost zones.
//
// ****************************************************************************
void vtkRectilinearGridFacelistFilter::ConsolidationExecute(void)
{
int i;
vtkDataSetRemoveGhostCells *ghost_remover = NULL;
vtkRectilinearGrid *input = GetInput();
if (input->GetCellData()->GetArray("vtkGhostLevels") &&
input->GetFieldData()->GetArray("avtRealDims"))
{
ghost_remover = vtkDataSetRemoveGhostCells::New();
ghost_remover->SetInput(input);
input = (vtkRectilinearGrid *) ghost_remover->GetOutput();
}
vtkPolyData *output = GetOutput();
vtkCellData *inCellData = input->GetCellData();
vtkPointData *inPointData = input->GetPointData();
......@@ -503,6 +522,10 @@ void vtkRectilinearGridFacelistFilter::ConsolidationExecute(void)
polys->Delete();
output->SetPoints(pts);
pts->Delete();
if (output->GetCellData()->GetArray("vtkGhostLevels") != NULL)
output->GetCellData()->RemoveArray("vtkGhostLevels");
if (ghost_remover != NULL)
ghost_remover->Delete();
}
void vtkRectilinearGridFacelistFilter::PrintSelf(ostream& os, vtkIndent indent)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment