Commit 1be0b3e6 authored by miller86's avatar miller86

reduced dependencies in DebugStream; removed H5open() calls from some HDF5...

reduced dependencies in DebugStream; removed H5open() calls from some HDF5 plugins; added ability to buffer debug logs; updated ITAPS plugin

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@6953 18c085ea-50e0-402c-830e-de6fd14e8384
parent 7f041357
......@@ -780,7 +780,15 @@ $fullusage = "$usage
---------------------------------------------------------------------------
-debug <level> Run with <level> levels of output logging.
<level> must be between 1 and 5. This will generate
debug logs for ALL components.
debug logs (called 'vlogs' for ALL components.
Note that debug logs are UNbuffered. However, if
you also specify 'b' immediately after the digit
indicating the debug level (e.g. '-debug 3b'), the
logs will be buffered. This can substantially improve
performance when a lot of debug output is generated.
However, also beware that when debug logs are buffered,
there isn't necessarily any guarentee they will contain
the most recent debug output just prior to a crash.
-debug_<compname> <level>
Run specified component with <level> of output
logging. For example, '-debug_mdserver 4' will run
......@@ -788,10 +796,13 @@ $fullusage = "$usage
'-debug_<compname> <level>' args are allowed.
-debug_engine_rank <r>
Restrict debug output to the specified rank.
-clobber_vlogs By default, each invokation or restart of a VisIt
component will write its debug logs to new files.
This flag causes VisIt to overwrite existing debug
logs rather than creating new ones.
-clobber_vlogs By default, VisIt maintains debug logs from the 5
most recent invokations or restarts of each VisIt
component. They are named something like
A.mdserver.5.vlog, A.engine_ser.5.vlog, etc with
the leading letter (A-E) indicating most to least
recent. The clobber_vlogs flag causes VisIt to remove
all debug logs and begin creating them anew.
-vtk-debug Turn on debugging of vtk objects used in pipelines.
-pid Append process ids to the names of log files.
-timing Save timing data to files.
......
......@@ -40,111 +40,34 @@
// 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>
#include <vector>
#include <signal.h>
#include <stdlib.h>
// ****************************************************************************
// Class: DebugStream
//
// Purpose:
// An implementation of ostream designed for error and message logging.
// A DebugStream has a "level" assigned to it as a priority (lower number
// is higher priority). Multiple DebugStreams can be created. When
// output is written to one DebugStream, it is simultaneously written to
// all DebugStreams with a higher level.
//
// In this specific implementation, five debug levels are used. Only
// the highest priority messages go to debug1, but every message will go
// to debug5.
//
// Programmer: Jeremy Meredith
// Creation: November 16, 2000
//
// Modified:
// Jeremy Meredith, Fri Jun 1 17:18:03 PDT 2001
// Added the ability to check if a DebugStream was enabled.
//
// Brad Whitlock, Thu Mar 14 13:37:34 PST 2002
// Added exports.
//
// Jeremy Meredith, Thu Jan 16 11:40:29 PST 2003
// Made debug streams macros so that we could skip the logic to
// do the formatting if the debug output was disabled. Removed the
// ability to delete a debug stream automatically on close.
//
// Eric Brugger, Tue Aug 3 11:00:56 PDT 2004
// Change the DebugStreamBuf member to be a pointered value instead of
// a referenced value so that it works with the MIPSpro compiler.
//
// Jeremy Meredith, Tue May 17 11:20:51 PDT 2005
// Allow disabling of signal handlers.
//
// ****************************************************************************
class MISC_API DebugStream : public ostream
{
public:
DebugStream(int level_);
~DebugStream();
operator bool() {return enabled;};
void open(const char *progname, bool);
void close();
static void Initialize(const char *, int, bool=true, bool=false);
private:
class DebugStreamBuf : public streambuf
{
public:
DebugStreamBuf();
~DebugStreamBuf();
void SetLevel(int level_);
void close();
void open(const char *filename_);
int put(int c);
virtual int overflow(int c);
virtual int underflow() { return 0; };
private:
// the priority of the current messages being logged
static int curLevel;
// the list of all buffers
static std::vector<DebugStreamBuf*> allBuffers;
// the level of this DebugStreamBuf
int level;
// the filename being to which to write the messages
char filename[256];
// the ostream used to write the log file
ofstream *out;
};
// the streambuf used for this ostream
DebugStreamBuf *buf;
// the level of this DebugStream
int level;
// true if enabled
bool enabled;
};
#define debug1 if (!debug1_real) ; else debug1_real
#define debug2 if (!debug2_real) ; else debug2_real
#define debug3 if (!debug3_real) ; else debug3_real
#define debug4 if (!debug4_real) ; else debug4_real
#define debug5 if (!debug5_real) ; else debug5_real
extern MISC_API DebugStream debug1_real;
extern MISC_API DebugStream debug2_real;
extern MISC_API DebugStream debug3_real;
extern MISC_API DebugStream debug4_real;
extern MISC_API DebugStream debug5_real;
#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)
// 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)
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
......
......@@ -36,7 +36,8 @@
*
*****************************************************************************/
#include <DebugStream.h>
#include <DebugStreamFull.h>
#include <visitstream.h>
#if defined(_WIN32)
#include <windows.h>
......@@ -56,11 +57,22 @@ vector<DebugStream::DebugStreamBuf*> DebugStream::DebugStreamBuf::allBuffers;
int DebugStream::DebugStreamBuf::curLevel;
// global DebugStreams
DebugStream debug1_real(1);
DebugStream debug2_real(2);
DebugStream debug3_real(3);
DebugStream debug4_real(4);
DebugStream debug5_real(5);
// 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;
// ****************************************************************************
// Function: close_streams
......@@ -80,11 +92,11 @@ DebugStream debug5_real(5);
static void
close_streams()
{
if (debug1_real) debug1_real.close();
if (debug2_real) debug2_real.close();
if (debug3_real) debug3_real.close();
if (debug4_real) debug4_real.close();
if (debug5_real) debug5_real.close();
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();
}
// ****************************************************************************
......@@ -322,9 +334,11 @@ DebugStream::DebugStreamBuf::close()
// Apparently setbuf is not public on some platforms. I added an #ifdef
// to disable it based on a configure'd define.
//
// Mark C. Miller, Tue Apr 14 16:01:49 PDT 2009
// Added option to buffer the debug logs.
// ****************************************************************************
void
DebugStream::DebugStreamBuf::open(const char *filename_)
DebugStream::DebugStreamBuf::open(const char *filename_, bool buffer_debug)
{
close();
strcpy(filename, filename_);
......@@ -338,11 +352,13 @@ DebugStream::DebugStreamBuf::open(const char *filename_)
else
{
// flush the buffer after every operation
out->setf(ios::unitbuf);
if (!buffer_debug)
out->setf(ios::unitbuf);
#ifndef NO_SETBUF
// the previous flag does nothing on SunOS;
// I hate to do this, but I'm doing it to force automatic flushing:
out->rdbuf()->setbuf((char*)0,0);
if (!buffer_debug)
out->rdbuf()->setbuf((char*)0,0);
#endif
}
}
......@@ -502,11 +518,14 @@ DebugStream::~DebugStream()
// This has some undesirable behavior if you happening to be editing a vlog
// and re-run VisIt as it may cause the editor to save a swap file because
// the file's name is getting changed out from underneath the editor.
//
// Mark C. Miller, Tue Apr 14 16:01:49 PDT 2009
// Added option to buffer the debug logs.
// ****************************************************************************
void
DebugStream::open(const char *progname, bool clobber)
DebugStream::open(const char *progname, bool clobber, bool buffer_debug)
{
char filename[256];
sprintf(filename, "A.%s.%d.vlog", progname, level);
......@@ -532,7 +551,7 @@ DebugStream::open(const char *progname, bool clobber)
}
// ok, open the stream
buf->open(filename);
buf->open(filename, buffer_debug);
enabled = true;
}
......@@ -604,23 +623,25 @@ DebugStream::close()
// Jeremy Meredith, Tue May 17 11:20:51 PDT 2005
// Allow disabling of signal handlers.
//
// Mark C. Miller, Tue Apr 14 16:01:49 PDT 2009
// Added option to buffer the debug logs.
// ****************************************************************************
void
DebugStream::Initialize(const char *progname, int debuglevel, bool sigs,
bool clobber)
bool clobber, bool buffer_debug)
{
switch (debuglevel)
{
case 5: debug5_real.open(progname, clobber);
case 5: debug5_realobj.open(progname, clobber, buffer_debug);
/* FALLTHRU */
case 4: debug4_real.open(progname, clobber);
case 4: debug4_realobj.open(progname, clobber, buffer_debug);
/* FALLTHRU */
case 3: debug3_real.open(progname, clobber);
case 3: debug3_realobj.open(progname, clobber, buffer_debug);
/* FALLTHRU */
case 2: debug2_real.open(progname, clobber);
case 2: debug2_realobj.open(progname, clobber, buffer_debug);
/* FALLTHRU */
case 1: debug1_real.open(progname, clobber);
case 1: debug1_realobj.open(progname, clobber, buffer_debug);
break;
default:
break;
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400142
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
// ************************************************************************* //
// DebugStreamFull.h //
// ************************************************************************* //
#ifndef DEBUG_STREAM_FULL_H
#define DEBUG_STREAM_FULL_H
#include <misc_exports.h>
#include <visitstream.h>
#include <DebugStream.h>
#include <vector>
#include <signal.h>
#include <stdlib.h>
// ****************************************************************************
// Class: DebugStream
//
// Purpose:
// An implementation of ostream designed for error and message logging.
// A DebugStream has a "level" assigned to it as a priority (lower number
// is higher priority). Multiple DebugStreams can be created. When
// output is written to one DebugStream, it is simultaneously written to
// all DebugStreams with a higher level.
//
// In this specific implementation, five debug levels are used. Only
// the highest priority messages go to debug1, but every message will go
// to debug5.
//
// Programmer: Jeremy Meredith
// Creation: November 16, 2000
//
// Modified:
// Jeremy Meredith, Fri Jun 1 17:18:03 PDT 2001
// Added the ability to check if a DebugStream was enabled.
//
// Brad Whitlock, Thu Mar 14 13:37:34 PST 2002
// Added exports.
//
// Jeremy Meredith, Thu Jan 16 11:40:29 PST 2003
// Made debug streams macros so that we could skip the logic to
// do the formatting if the debug output was disabled. Removed the
// ability to delete a debug stream automatically on close.
//
// Eric Brugger, Tue Aug 3 11:00:56 PDT 2004
// Change the DebugStreamBuf member to be a pointered value instead of
// a referenced value so that it works with the MIPSpro compiler.
//
// Jeremy Meredith, Tue May 17 11:20:51 PDT 2005
// Allow disabling of signal handlers.
//
// ****************************************************************************
class MISC_API DebugStream : public ostream
{
public:
DebugStream(int level_);
~DebugStream();
operator bool() {return enabled;};
void open(const char *progname, bool, bool);
void close();
static void Initialize(const char *, int, bool=true, bool=false, bool=false);
private:
class DebugStreamBuf : public streambuf
{
public:
DebugStreamBuf();
~DebugStreamBuf();
void SetLevel(int level_);
void close();
void open(const char *filename_, bool=false);
int put(int c);
virtual int overflow(int c);
virtual int underflow() { return 0; };
private:
// the priority of the current messages being logged
static int curLevel;
// the list of all buffers
static std::vector<DebugStreamBuf*> allBuffers;
// the level of this DebugStreamBuf
int level;
// the filename being to which to write the messages
char filename[256];
// the ostream used to write the log file
ofstream *out;
};
// the streambuf used for this ostream
DebugStreamBuf *buf;
// the level of this DebugStream
int level;
// true if enabled
bool enabled;
};
#endif
......@@ -70,6 +70,9 @@
# Brad Whitlock, Fri Apr 10 16:12:30 PDT 2009
# I moved some code from utility into InstallationFunctions.C
#
# Mark C. Miller, Tue Apr 21 14:37:24 PDT 2009
# Added DebugStreamFull.[Ch] (really a rename of DebugStream.[Ch])
#
##############################################################################
##
......@@ -84,9 +87,9 @@ CPPFLAGS=-I. @CPPFLAGS@
##
## Files...
##
SRC=DebugStream.C Environment.C FileFunctions.C InstallationFunctions.C \
SRC=DebugStreamFull.C Environment.C FileFunctions.C InstallationFunctions.C \
PTY.C StackTimer.C TimingsManager.C VisItException.C VisItInit.C
HDR=DebugStream.h Environment.h FileFunctions.C InstallationFunctions.h \
HDR=DebugStreamFull.h DebugStream.h Environment.h FileFunctions.C InstallationFunctions.h \
PTY.h StackTimer.h TimingsManager.h VisItException.h VisItInit.h
OBJ=$(SRC:.C=.o)
LIB=libmisc
......
......@@ -55,7 +55,7 @@
#include <new>
#include <cstring>
#include <DebugStream.h>
#include <DebugStreamFull.h>
#include <InstallationFunctions.h>
#include <TimingsManager.h>
#include <visit-config.h>
......@@ -220,6 +220,9 @@ NewHandler(void)
// Brad Whitlock, Fri Apr 10 16:00:55 PDT 2009
// I added support for reading -dv.
//
// Mark C. Miller, Tue Apr 21 14:24:18 PDT 2009
// Added logic to manage buffering of debug logs; an extra 'b' after level.
//
// ****************************************************************************
void
......@@ -236,6 +239,7 @@ VisItInit::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool si
#else
bool usePid = false;
#endif
bool bufferDebug = false;
bool clobberVlogs = false;
bool vtk_debug = false;
bool enableTimings = false;
......@@ -277,6 +281,7 @@ VisItInit::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool si
debuglevel = atoi(argv[i+1]);
else
cerr << "Warning: debug level not specified, assuming 1\n";
if (debuglevel > 5)
{
cerr << "Warning: clamping debug level to 5\n";
......@@ -287,6 +292,9 @@ VisItInit::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool si
cerr << "Warning: clamping debug level to 0\n";
debuglevel = 0;
}
if (i+1 < argc && *(argv[i+1]+1) == 'b')
bufferDebug = true;
if(strip)
{
striparg(i,2, argc,argv);
......@@ -383,7 +391,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);
DebugStream::Initialize(progname, debuglevel, sigs, clobberVlogs, bufferDebug);
for(i = 0; i < argc; ++i)
debug1 << argv[i] << " ";
debug1 << endl;
......
......@@ -167,10 +167,10 @@ DEFAULT_VISUS_LIB=/usr/gapps/visit/visus/linux_rhel3_gcc_3.2.3_new/lib
## along with whatever other entries in the implementation specification you need
## and then just work directly on the source code in src/databases/ITAPS_C.
##
#DEFAULT_ITAPS_IMPLS="MOAB:cub,vmesh:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/MOAB/include:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/MOAB/lib,-liMesh,-lMOAB,/misc/gapps/hdf5/1.6.5/LinuxE3/serial/64/optim/lib/libhdf5.a,-L/usr/gapps/visit/netcdf/3.6.0/linux_rhel3_gcc_3.2.3/lib,-lnetcdf_c++,-lnetcdf FMDB:sms:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/FMDB/include:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/FMDB/lib,-lFMDB,-lSCORECModel,-lSCORECUtil GRUMMP:bdry,smesh,vmesh:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/GRUMMP/include:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/GRUMMP/lib,-liMesh_GRUMMP,-lGR_3D,-lGR_surf,-lGR_2D,-lGR_base,-lSUMAAlog_lite,-lOptMS"
# Note that we do not include any explicit paths to HDF5 or SZIP in the string below because the lib dir's Makefile
# will be creating links for them.
DEFAULT_ITAPS_IMPLS="MOAB:cub:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/MOAB.old.hdf5/include:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/MOAB.old.hdf5/lib,-liMesh,-lMOAB,-lhdf5,-lsz,-lz,-L/usr/gapps/visit/netcdf/3.6.0/linux_rhel3_gcc_3.2.3/lib,-lnetcdf_c++,-lnetcdf,-lvtkGraphics FMDB:sms:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/FMDB/include:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/FMDB/lib,-lFMDB,-lSCORECModel,-lSCORECUtil,-lvtkGraphics GRUMMP:bdry,smesh,vmesh:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/GRUMMP/include:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/GRUMMP/lib,-liMesh_GRUMMP,-lGR_3D,-lGR_surf,-lGR_2D,-lGR_base,-lSUMAAlog_lite,-lOptMS,-lvtkGraphics"
#DEFAULT_ITAPS_IMPLS="MOAB:cub:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/MOAB.old.hdf5/include:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/MOAB.old.hdf5/lib,-liMesh,-lMOAB,-lhdf5,-lsz,-lz,-L/usr/gapps/visit/netcdf/3.6.0/linux_rhel3_gcc_3.2.3/lib,-lnetcdf_c++,-lnetcdf,-lvtkGraphics FMDB:sms:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/FMDB/include:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/FMDB/lib,-lFMDB,-lSCORECModel,-lSCORECUtil,-lvtkGraphics GRUMMP:bdry,smesh,vmesh:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/GRUMMP/include:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/GRUMMP/lib,-liMesh_GRUMMP,-lGR_3D,-lGR_surf,-lGR_2D,-lGR_base,-lSUMAAlog_lite,-lOptMS,-lvtkGraphics"
DEFAULT_ITAPS_IMPLS="MOAB:cub:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/ITAPS-1.0/MOAB/include:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/ITAPS-1.0/MOAB/lib,-liMesh,-lMOAB,-lhdf5,-lsz,-lz,-L/usr/gapps/visit/netcdf/3.6.0/linux_rhel3_gcc_3.2.3/lib,-lnetcdf_c++,-lnetcdf,-lvtkGraphics FMDB:sms:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/ITAPS-1.0/FMDB/include/FMDB:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/ITAPS-1.0/FMDB/lib,-lFMDB,-lSCORECModel,-lSCORECUtil,-lvtkGraphics GRUMMP:bdry,smesh,vmesh:-I/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/ITAPS-1.0/GRUMMP/include:-L/usr/gapps/visit/itaps/linux_rhel3_gcc_3.2.3/ITAPS-1.0/GRUMMP/lib,-liMesh_GRUMMP,-lGR_3D,-lGR_surf,-lGR_2D,-lGR_base,-lSUMAAlog_lite,-lOptMS,-lvtkGraphics"
##
## CCMIO
......
......@@ -198,12 +198,20 @@ avtFLASHFileFormat::InitializeHDF5(void)
// Programmer: Mark C. Miller
// Creation: March 5, 2007
//
// Modifications:
//
// Mark C. Miller, Tue Apr 14 17:21:23 PDT 2009
// Replaced call to H5close with H5garbage_collect. Calling H5close is
// problematic as VisIt may have other plugins instantiated which are
// still interacting with HDF5. Calling garbage collect routine achieves
// the desired goal of reducing memory usage without effecting other
// plugins that might still be using the HDF5 library.
// ****************************************************************************
void
avtFLASHFileFormat::FinalizeHDF5(void)
{
debug5 << "Finalizing HDF5 Library" << endl;
H5close();
debug5 << "Garbage collecting HDF5 Library" << endl;
H5garbage_collect();
}
// ****************************************************************************
......
This diff is collapsed.
......@@ -85,6 +85,9 @@ typedef struct _VisItEntitySetInfo {
// Mark C. Miller, Tue Apr 22 23:20:43 PDT 2008
// Added stuff to handle more interesting subsetting.
//
// Mark C. Miller, Tue Apr 21 16:08:19 PDT 2009
// Removed class storage for vert, edge, face and regn entities.
// Used symbolic names for size of arrays of entity type.
// ****************************************************************************
class avtITAPS_CFileFormat : public avtSTMDFileFormat
......@@ -110,23 +113,12 @@ class avtITAPS_CFileFormat : public avtSTMDFileFormat
string vmeshFileName;
iMesh_Instance itapsMesh;
iBase_EntitySetHandle rootSet;
iBase_EntityHandle *vertEnts;
int vertEnts_allocated;
iBase_EntityHandle *edgeEnts;
int edgeEnts_allocated;
iBase_EntityHandle *faceEnts;
int faceEnts_allocated;
iBase_EntityHandle *regnEnts;
int regnEnts_allocated;
int geomDim;
int topoDim;
int numVerts;
int numEdges;
int numFaces;
int numRegns;
iBase_EntityType domToEntType[4];
int numOfType[iBase_ALL_TYPES];
iBase_EntityType domToEntType[iBase_ALL_TYPES];
bool haveMixedElementMesh;
vector<iBase_TagHandle> primitiveTagHandles[4];
vector<iBase_TagHandle> primitiveTagHandles[iBase_ALL_TYPES];
map<iBase_EntitySetHandle,VisItEntitySetInfo_t> esMap;
map<string, vector<iBase_EntitySetHandle> > topLevelSets;
......
......@@ -92,6 +92,10 @@ GetITAPS_CReadOptions(void)
// Modifications:
// Mark C. Miller, Wed Jan 14 17:57:10 PST 2009
// Added various bools to control output behavior.
//
// Mark C. Miller, Tue Apr 21 16:04:38 PDT 2009
// Ensure all options are available, even to GRUMMP, but set their default
// values appropriately for GRUMMP.
// ****************************************************************************
DBOptionsAttributes *
......@@ -99,7 +103,7 @@ GetITAPS_CWriteOptions(void)
{
DBOptionsAttributes *rv = new DBOptionsAttributes;
#ifdef ITAPS_MOAB
#if defined(ITAPS_MOAB)
rv->SetEnum("Format", 0);
vector<string> formats;
formats.push_back("MOAB"); // 0
......@@ -113,14 +117,16 @@ GetITAPS_CWriteOptions(void)
rv->SetEnumStrings("Format", formats);
#endif
// Flag to indicate if the mesh should be converted
// to simplices, triangles in 2D or tetrahedra in 3D
// Since GRUMMP can ONLY handle tetrahedra, it is
// always true for GRUMMP
#ifndef ITAPS_GRUMMP
// GRUMMP requires some extra stuff so we turn that on
// by default here.
#if defined(ITAPS_GRUMMP)
rv->SetBool("Simplexify", true);
rv->SetBool("Add faces for 3Dents", true);
#else
rv->SetBool("Simplexify", false);
#endif
rv->SetBool("Add faces for 3Dents", false);
#endif
rv->SetBool("Prevent duplicates to iMesh", false);
return rv;
......
This diff is collapsed.
......@@ -55,12 +55,34 @@ using std::map;
using std::string;
using std::vector;