Commit 73364c64 authored by miller86's avatar miller86

fixing interface to DebugStream

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@6975 18c085ea-50e0-402c-830e-de6fd14e8384
parent e8c6b05b
This diff is collapsed.
......@@ -467,6 +467,8 @@ avtIVPDopri5::GuessInitialStep(const avtIVPField* field,
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
avtIVPSolver::Result
......@@ -484,7 +486,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
t_max = -t_max;
}
if (debug5_real)
if (DebugStream::Level5())
debug5<<"End= "<<end<<" t_max= "<<t_max<<endl;
const double direction = sign( 1.0, t_max - t );
......@@ -527,7 +529,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
// stepsize underflow?
if( 0.1*std::abs(h) <= std::abs(t)*epsilon )
{
if (debug5_real)
if (DebugStream::Level5())
debug5 << "\tavtIVPDopri5::step(): exiting at t = "
<< t << ", step size too small (h = " << h << ")\n";
return STEPSIZE_UNDERFLOW;
......@@ -542,7 +544,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
n_steps++;
if (debug5_real)
if (DebugStream::Level5())
debug5 << "\tavtIVPDopri5::step(): t = " << t << ", y = " << y
<< ", h = " << h << ", t+h = " << t+h << '\n';
......@@ -622,7 +624,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
if( iasti == 15 )
{
if (debug5_real)
if (DebugStream::Level5())
debug5 << "\tavtIVPDopri5::step(): exiting at t = "
<< t << ", problem seems stiff (y = " << y
<< ")\n";
......@@ -687,7 +689,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
// normal exit
if (debug5_real)
if (DebugStream::Level5())
debug5 << "\tavtIVPDopri5::step(): normal exit, now at t = "
<< t << ", y = " << y << ", h = " << h << '\n';
return OK;
......@@ -703,7 +705,7 @@ avtIVPDopri5::Step(const avtIVPField* field,
h = h_new;
if (debug5_real)
if (DebugStream::Level5())
debug5 << "\tavtIVPDopri5::step(): step rejected, retry with h = "
<< h << '\n';
}
......
......@@ -109,18 +109,20 @@ avtIVPVTKTimeVaryingField::~avtIVPVTKTimeVaryingField()
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
avtVec
avtIVPVTKTimeVaryingField::operator()(const double& t, const avtVecRef& x) const
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<"Eval( "<<t<<", "<<x<<") = ";
// Check for inclusion in this time boundary.
if (t < time1 || t > time2)
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<" **OUT of TIME**\n";
throw Undefined();
}
......@@ -129,7 +131,7 @@ avtIVPVTKTimeVaryingField::operator()(const double& t, const avtVecRef& x) const
avtVec y1(x.dim()), param(pad(x,t)), y2(x.dim());
if ( ! iv1->Evaluate(param.values(), y1.values(), t))
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<" **OUT of BOUNDS**\n";
throw Undefined();
}
......@@ -137,7 +139,7 @@ avtIVPVTKTimeVaryingField::operator()(const double& t, const avtVecRef& x) const
avtVec y(x.dim());
y = y1;
if (debug5_real)
if (DebugStream::Level5())
debug5<<"T= "<<t<<" ["<<time1<<" "<<time2<<"]"<<" Y1 = "<<y1<<" Y2= "<<y2<<" y= "<<y<<endl;
if ( normalized )
......
......@@ -202,6 +202,8 @@ avtStreamline::Advance(const avtIVPField* field,
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
avtIVPSolver::Result
......@@ -230,15 +232,15 @@ avtStreamline::DoAdvance(avtIVPSolver* ivp,
try
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<"Step( mode= "<<termType<<" end= "<<end<<endl;
result = ivp->Step(field, termType, end, step);
if (debug5_real)
if (DebugStream::Level5())
debug5<<" T= "<<ivp->GetCurrentT()<<" "<<ivp->GetCurrentY()<<endl;
}
catch( avtIVPField::Undefined& )
{
if (debug5_real)
if (DebugStream::Level5())
debug5<<ivp->GetCurrentY()<<" not in domain\n";
// integrator left the domain, retry with smaller step
// if step size is below given minimum, give up
......@@ -263,7 +265,7 @@ avtStreamline::DoAdvance(avtIVPSolver* ivp,
{
delete step;
HandleGhostZones((end > 0.0), haveGhostZones, extents);
if (debug5_real)
if (DebugStream::Level5())
debug5<<"avtStreamline::DoAdvance() DONE result= OUTSIDE_DOMAIN\n";
return avtIVPSolver::OUTSIDE_DOMAIN;
}
......@@ -331,6 +333,8 @@ avtStreamline::DoAdvance(avtIVPSolver* ivp,
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -382,9 +386,9 @@ avtStreamline::HandleGhostZones(bool forward,
dir /= len;
double leapingDistance = minRange * 0.001;
if (debug5_real)
if (DebugStream::Level5())
debug5<< "Leaping: "<<leapingDistance<< " dir = "<<dir<<endl;
if (debug5_real)
if (DebugStream::Level5())
debug5<< "Leap: "<<pt;
dir *= leapingDistance;
avtVec newPt = pt + dir;
......@@ -396,7 +400,7 @@ avtStreamline::HandleGhostZones(bool forward,
else
(*_steps.begin())->tEnd -= leapingDistance;
if (debug5_real)
if (DebugStream::Level5())
debug5<<" ==> "<<newPt<<" T: "<<_ivpSolver->GetCurrentT()<<endl;
}
......@@ -541,6 +545,8 @@ avtStreamline::PtEnd(avtVec &end)
// Put if statements in front of debug's. The generation of strings to
// output to debug was doubling the total integration time.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -560,7 +566,7 @@ avtStreamline::Serialize(MemStream::Mode mode, MemStream &buff,
}
else
{
if (debug5_real)
if (DebugStream::Level5())
debug5 << "avtStreamline READ: listSz = " << _steps.size() <<endl;
_steps.clear();
size_t sz = 0;
......@@ -594,6 +600,6 @@ avtStreamline::Serialize(MemStream::Mode mode, MemStream &buff,
_ivpSolver = solver->Clone();
_ivpSolver->PutState(solverState);
}
if (debug5_real)
if (DebugStream::Level5())
debug5 << "DONE: avtStreamline::Serialize. sz= "<<buff.buffLen() << endl;
}
......@@ -161,6 +161,8 @@ avtTerminatingSink::~avtTerminatingSink()
// Cyrus Harrison, Wed Apr 1 12:03:19 PDT 2009
// Change so memory usage info scales up to 4 gigabytes.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -206,7 +208,7 @@ avtTerminatingSink::Execute(avtContract_p contract)
input->Update(contract);
visitTimer->StopTimer(t, "First pipeline update.");
if (debug3_real)
if (DebugStream::Level3())
{
unsigned int size = 0, rss = 0;
GetMemorySize(size, rss);
......@@ -238,7 +240,7 @@ avtTerminatingSink::Execute(avtContract_p contract)
dob->Merge(*input);
iter++;
if (debug3_real)
if (DebugStream::Level3())
{
unsigned int size = 0, rss = 0;
GetMemorySize(size, rss);
......
......@@ -40,35 +40,39 @@
// DebugStream.h //
// ************************************************************************* //
// Expose the ONLY parts of a debug stream object we really need in MOST
// of the source code.
#ifndef DEBUG_STREAM_H
#define DEBUG_STREAM_H
#include <misc_exports.h>
#include <visitstream.h>
#define debug1 if (!(*debug1_realp)) ; else (*debug1_realp)
#define debug2 if (!(*debug2_realp)) ; else (*debug2_realp)
#define debug3 if (!(*debug3_realp)) ; else (*debug3_realp)
#define debug4 if (!(*debug4_realp)) ; else (*debug4_realp)
#define debug5 if (!(*debug5_realp)) ; else (*debug5_realp)
//
// Hide as much of DebugStream interface as possible.
//
namespace DebugStream
{
// Query if a given level is enabled
extern MISC_API bool Level1();
extern MISC_API bool Level2();
extern MISC_API bool Level3();
extern MISC_API bool Level4();
extern MISC_API bool Level5();
// These are defined to maintain backward compatibility with the
// 'debugN_real' symbols before they were turned into pointers
// and which are used variously throughout VisIt.
#define debug1_real (*debug1_realp)
#define debug2_real (*debug2_realp)
#define debug3_real (*debug3_realp)
#define debug4_real (*debug4_realp)
#define debug5_real (*debug5_realp)
// Obtain a given level's stream object
extern MISC_API ostream& Stream1();
extern MISC_API ostream& Stream2();
extern MISC_API ostream& Stream3();
extern MISC_API ostream& Stream4();
extern MISC_API ostream& Stream5();
extern MISC_API ostream *debug1_realp;
extern MISC_API ostream *debug2_realp;
extern MISC_API ostream *debug3_realp;
extern MISC_API ostream *debug4_realp;
extern MISC_API ostream *debug5_realp;
#endif
// Query what the current level is (more expensive than LevelN())
extern MISC_API int GetLevel();
}
#define debug1 if (!DebugStream::Level1()) ; else (DebugStream::Stream1())
#define debug2 if (!DebugStream::Level2()) ; else (DebugStream::Stream2())
#define debug3 if (!DebugStream::Level3()) ; else (DebugStream::Stream3())
#define debug4 if (!DebugStream::Level4()) ; else (DebugStream::Stream4())
#define debug5 if (!DebugStream::Level5()) ; else (DebugStream::Stream5())
#endif
......@@ -37,6 +37,7 @@
*****************************************************************************/
#include <DebugStreamFull.h>
#include <DebugStream.h>
#include <visitstream.h>
#if defined(_WIN32)
......@@ -53,26 +54,40 @@
using std::vector;
// static DebugStreamBuf class data
vector<DebugStream::DebugStreamBuf*> DebugStream::DebugStreamBuf::allBuffers;
int DebugStream::DebugStreamBuf::curLevel;
vector<DebugStreamFull::DebugStreamBuf*> DebugStreamFull::DebugStreamBuf::allBuffers;
int DebugStreamFull::DebugStreamBuf::curLevel;
// global DebugStreams
// We make these static so they are NOT visible outside this file
static DebugStream debug1_realobj(1);
static DebugStream debug2_realobj(2);
static DebugStream debug3_realobj(3);
static DebugStream debug4_realobj(4);
static DebugStream debug5_realobj(5);
// global DebugStream pointers
// These are the only things visible outside this file. Doing this
// prevents all of VisIt from being recompiled when only the interface
// to the DebugStream class changes.
ostream *debug1_realp = &debug1_realobj;
ostream *debug2_realp = &debug2_realobj;
ostream *debug3_realp = &debug3_realobj;
ostream *debug4_realp = &debug4_realobj;
ostream *debug5_realp = &debug5_realobj;
static DebugStreamFull debug1_realobj(1);
static DebugStreamFull debug2_realobj(2);
static DebugStreamFull debug3_realobj(3);
static DebugStreamFull debug4_realobj(4);
static DebugStreamFull debug5_realobj(5);
bool DebugStream::Level1() { return debug1_realobj.isenabled(); };
bool DebugStream::Level2() { return debug2_realobj.isenabled(); };
bool DebugStream::Level3() { return debug3_realobj.isenabled(); };
bool DebugStream::Level4() { return debug4_realobj.isenabled(); };
bool DebugStream::Level5() { return debug5_realobj.isenabled(); };
ostream& DebugStream::Stream1() { return *((ostream*) &debug1_realobj); };
ostream& DebugStream::Stream2() { return *((ostream*) &debug2_realobj); };
ostream& DebugStream::Stream3() { return *((ostream*) &debug3_realobj); };
ostream& DebugStream::Stream4() { return *((ostream*) &debug4_realobj); };
ostream& DebugStream::Stream5() { return *((ostream*) &debug5_realobj); };
int
DebugStream::GetLevel()
{
int level = 0;
level += debug1_realobj.isenabled();
level += debug2_realobj.isenabled();
level += debug3_realobj.isenabled();
level += debug4_realobj.isenabled();
level += debug5_realobj.isenabled();
return level;
}
// ****************************************************************************
// Function: close_streams
......@@ -92,11 +107,11 @@ ostream *debug5_realp = &debug5_realobj;
static void
close_streams()
{
if (debug1_realobj) debug1_realobj.close();
if (debug2_realobj) debug2_realobj.close();
if (debug3_realobj) debug3_realobj.close();
if (debug4_realobj) debug4_realobj.close();
if (debug5_realobj) debug5_realobj.close();
if (debug1_realobj.isenabled()) debug1_realobj.close();
if (debug2_realobj.isenabled()) debug2_realobj.close();
if (debug3_realobj.isenabled()) debug3_realobj.close();
if (debug4_realobj.isenabled()) debug4_realobj.close();
if (debug5_realobj.isenabled()) debug5_realobj.close();
}
// ****************************************************************************
......@@ -242,7 +257,7 @@ signalhandler_exit(int sig)
// Creation: November 17, 2000
//
// ****************************************************************************
DebugStream::DebugStreamBuf::DebugStreamBuf() : streambuf()
DebugStreamFull::DebugStreamBuf::DebugStreamBuf() : streambuf()
{
allBuffers.push_back(this);
level = 0;
......@@ -260,7 +275,7 @@ DebugStream::DebugStreamBuf::DebugStreamBuf() : streambuf()
// Creation: November 17, 2000
//
// ****************************************************************************
DebugStream::DebugStreamBuf::~DebugStreamBuf()
DebugStreamFull::DebugStreamBuf::~DebugStreamBuf()
{
close();
}
......@@ -280,7 +295,7 @@ DebugStream::DebugStreamBuf::~DebugStreamBuf()
//
// ****************************************************************************
void
DebugStream::DebugStreamBuf::SetLevel(int level_)
DebugStreamFull::DebugStreamBuf::SetLevel(int level_)
{
level=level_;
}
......@@ -299,7 +314,7 @@ DebugStream::DebugStreamBuf::SetLevel(int level_)
//
// ****************************************************************************
void
DebugStream::DebugStreamBuf::close()
DebugStreamFull::DebugStreamBuf::close()
{
if (out)
{
......@@ -338,7 +353,7 @@ DebugStream::DebugStreamBuf::close()
// Added option to buffer the debug logs.
// ****************************************************************************
void
DebugStream::DebugStreamBuf::open(const char *filename_, bool buffer_debug)
DebugStreamFull::DebugStreamBuf::open(const char *filename_, bool buffer_debug)
{
close();
strcpy(filename, filename_);
......@@ -383,7 +398,7 @@ DebugStream::DebugStreamBuf::open(const char *filename_, bool buffer_debug)
//
// ****************************************************************************
int
DebugStream::DebugStreamBuf::put(int c)
DebugStreamFull::DebugStreamBuf::put(int c)
{
if (out &&
curLevel <= level)
......@@ -413,7 +428,7 @@ DebugStream::DebugStreamBuf::put(int c)
//
// ****************************************************************************
int
DebugStream::DebugStreamBuf::overflow(int c)
DebugStreamFull::DebugStreamBuf::overflow(int c)
{
curLevel = level;
for (size_t i=0; i<allBuffers.size(); i++)
......@@ -425,16 +440,16 @@ DebugStream::DebugStreamBuf::overflow(int c)
// ****************************************************************************
// ****************************************************************************
// class DebugStream
// class DebugStreamFull
// ****************************************************************************
// ****************************************************************************
// ****************************************************************************
// Constructor: DebugStream::DebugStream
// Constructor: DebugStreamFull::DebugStreamFull
//
// Purpose:
// constructor for the DebugStream
// constructor for the DebugStreamFull
//
// Arguments:
// level_ the debug level of this ostream
......@@ -451,7 +466,7 @@ DebugStream::DebugStreamBuf::overflow(int c)
// referenced value so that it works with the MIPSpro compiler.
//
// ****************************************************************************
DebugStream::DebugStream(int level_) : ostream(new DebugStreamBuf)
DebugStreamFull::DebugStreamFull(int level_) : ostream(new DebugStreamBuf)
{
level = level_;
buf = (DebugStreamBuf*)(rdbuf());
......@@ -461,10 +476,10 @@ DebugStream::DebugStream(int level_) : ostream(new DebugStreamBuf)
// ****************************************************************************
// Destructor: DebugStream::~DebugStream
// Destructor: DebugStreamFull::~DebugStreamFull
//
// Purpose:
// destructor for the DebugStream
// destructor for the DebugStreamFull
//
// Programmer: Jeremy Meredith
// Creation: November 17, 2000
......@@ -475,14 +490,14 @@ DebugStream::DebugStream(int level_) : ostream(new DebugStreamBuf)
// referenced value so that it works with the MIPSpro compiler.
//
// ****************************************************************************
DebugStream::~DebugStream()
DebugStreamFull::~DebugStreamFull()
{
buf->close();
}
// ****************************************************************************
// Method: DebugStream::open
// Method: DebugStreamFull::open
//
// Purpose:
// create a file for logging given the program name
......@@ -525,7 +540,7 @@ DebugStream::~DebugStream()
void
DebugStream::open(const char *progname, bool clobber, bool buffer_debug)
DebugStreamFull::open(const char *progname, bool clobber, bool buffer_debug)
{
char filename[256];
sprintf(filename, "A.%s.%d.vlog", progname, level);
......@@ -557,7 +572,7 @@ DebugStream::open(const char *progname, bool clobber, bool buffer_debug)
// ****************************************************************************
// Method: DebugStream::close
// Method: DebugStreamFull::close
//
// Purpose:
// close the file, but don't delete it
......@@ -578,14 +593,14 @@ DebugStream::open(const char *progname, bool clobber, bool buffer_debug)
//
// ****************************************************************************
void
DebugStream::close()
DebugStreamFull::close()
{
buf->close();
enabled = false;
}
// ****************************************************************************
// Method: DebugStream::Initialize
// Method: DebugStreamFull::Initialize
//
// Purpose:
// This should be called once to initalize all the debug streams.
......@@ -628,7 +643,7 @@ DebugStream::close()
// ****************************************************************************
void
DebugStream::Initialize(const char *progname, int debuglevel, bool sigs,
DebugStreamFull::Initialize(const char *progname, int debuglevel, bool sigs,
bool clobber, bool buffer_debug)
{
switch (debuglevel)
......
......@@ -45,14 +45,12 @@
#include <misc_exports.h>
#include <visitstream.h>
#include <DebugStream.h>
#include <vector>
#include <signal.h>
#include <stdlib.h>
// ****************************************************************************
// Class: DebugStream
// Class: DebugStreamFull
//
// Purpose:
// An implementation of ostream designed for error and message logging.
......@@ -87,15 +85,17 @@
// Jeremy Meredith, Tue May 17 11:20:51 PDT 2005
// Allow disabling of signal handlers.
//
// Mark C. Miller, Wed Apr 22 13:32:22 PDT 2009
// Changed name to DebugStreamFull
// ****************************************************************************
class MISC_API DebugStream : public ostream
class MISC_API DebugStreamFull : public ostream
{
public:
DebugStream(int level_);
~DebugStream();
DebugStreamFull(int level_);
~DebugStreamFull();
operator bool() {return enabled;};
bool isenabled() const { return enabled; };
void open(const char *progname, bool, bool);
void close();
static void Initialize(const char *, int, bool=true, bool=false, bool=false);
......
......@@ -41,6 +41,7 @@
// ************************************************************************* //
#include <VisItException.h>
#include <DebugStreamFull.h>
#include <DebugStream.h>
#include <VisItInit.h>
......@@ -65,7 +66,7 @@ VisItException::VisItException()
msg = "<The reason for the exception was not described>";
type = "VisItException";
line = -1;
log = &debug1_real;
log = &DebugStream::Stream1();
}
// ****************************************************************************
......@@ -105,7 +106,7 @@ VisItException::VisItException(const std::string &m)
}
type = "VisItException";
line = -1;
log = &debug1_real;
log = &DebugStream::Stream1();
}
// ****************************************************************************
......@@ -198,7 +199,7 @@ void
VisItException::LogCatch(const char *exceptionName, const char *srcFile,
int srcLine)
{
debug1_real << "catch(" << exceptionName << ") " << srcFile << ":" << srcLine << endl;
debug1 << "catch(" << exceptionName << ") " << srcFile << ":" << srcLine << endl;
}
#ifdef FAKE_EXCEPTIONS
......
......@@ -56,6 +56,7 @@
#include <cstring>
#include <DebugStreamFull.h>
#include <DebugStream.h>
#include <InstallationFunctions.h>
#include <TimingsManager.h>
#include <visit-config.h>
......@@ -391,7 +392,7 @@ VisItInit::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool si
// Initialize the debug streams and also add the command line arguments
// to the debug logs.
DebugStream::Initialize(progname, debuglevel, sigs, clobberVlogs, bufferDebug);
DebugStreamFull::Initialize(progname, debuglevel, sigs, clobberVlogs, bufferDebug);
for(i = 0; i < argc; ++i)
debug1 << argv[i] << " ";
debug1 << endl;
......
......@@ -1038,6 +1038,8 @@ avtCGNSFileFormat::AddReferenceStateExpressions(avtDatabaseMetaData *md,
// Totally rewrote to support reading data from multiple bases. It's more
// modular too.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -1094,8 +1096,8 @@ avtCGNSFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md,
debug4 << "==================== BASE INFORMATION ====================" << endl;
for(int bi = 0; bi < baseInfo.size(); ++bi)
{
if(debug4_real)
PrintBaseInformation(debug4_real, baseInfo[bi]);
if(DebugStream::Level4())
PrintBaseInformation(DebugStream::Stream4(), baseInfo[bi]);
}
bool someInvalidCenterings = false;
......
......@@ -314,6 +314,8 @@ avtADAPTFileFormat::GetMeshFile()
// Jeremy Meredith, Thu Aug 25 12:55:29 PDT 2005
// Added group origin to mesh metadata constructor.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -321,8 +323,8 @@ avtADAPTFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
{
const char *mName = "avtADAPTFileFormat::PopulateDatabaseMetaData: ";
debug4 << mName << endl;
if(debug4_real)
fileObject->PrintFileContents(debug4_real);
if(DebugStream::Level4())
fileObject->PrintFileContents(DebugStream::Stream4());
// Assemble a database title.
std::string comment(GetType()), titleString, create_version,
......
......@@ -189,6 +189,7 @@ avtBasicNETCDFFileFormat::~avtBasicNETCDFFileFormat()
void
avtBasicNETCDFFileFormat::FreeUpResources()
{
cerr << "Got here 2" << endl;
debug4 << "avtBasicNETCDFFileFormat::FreeUpResources" << endl;
fileObject->Close();
}
......@@ -267,14 +268,16 @@ avtBasicNETCDFFileFormat::ActivateTimestep()
// Hank Childs, Fri Feb 23 09:20:38 PST 2007
// Fix memory leak.
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
avtBasicNETCDFFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
{
debug4 << "avtBasicNETCDFFileFormat::PopulateDatabaseMetaData" << endl;
if(debug4_real)
fileObject->PrintFileContents(debug4_real);
if(DebugStream::Level4())
fileObject->PrintFileContents(DebugStream::Stream4());
int status, nDims, nVars, nGlobalAtts, unlimitedDimension;
status = nc_inq(fileObject->GetFileHandle(), &nDims, &nVars, &nGlobalAtts,
......
......@@ -338,6 +338,10 @@ avtCCSMFileFormat::GetTimes(std::vector<double> &times)
// Programmer: Brad Whitlock
// Creation: Wed Jul 11 11:28:20 PDT 2007
//
// Modifications:
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -345,8 +349,8 @@ avtCCSMFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md, int timeSta
{
const char *mName = "avtCCSMFileFormat::PopulateDatabaseMetaData: ";
debug4 << mName << endl;
if(debug4_real)
fileObject->PrintFileContents(debug4_real);
if(DebugStream::Level4())
fileObject->PrintFileContents(DebugStream::Stream4());
int status, nDims, nVars, nGlobalAtts, unlimitedDimension;
status = nc_inq(fileObject->GetFileHandle(), &nDims, &nVars, &nGlobalAtts,
......
......@@ -402,6 +402,10 @@ avtFVCOMParticleFileFormat::FreeUpResources(void)
// Programmer: David Stuebe
// Creation: Thu May 18 08:39:01 PDT 2006
//
// Modifications:
//
// Mark C. Miller, Wed Apr 22 13:48:13 PDT 2009
// Changed interface to DebugStream to obtain current debug level.
// ****************************************************************************
void
......@@ -419,8 +423,8 @@ avtFVCOMParticleFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md, in
if(status != NC_NOERR) fileObject-> HandleError(status);
if(debug4_real)
fileObject->PrintFileContents(debug4_real);
if(DebugStream::Level4())
fileObject->PrintFileContents(DebugStream::Stream4());