Commit c20851d5 authored by hrchilds's avatar hrchilds

Update from January 7, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@155 18c085ea-50e0-402c-830e-de6fd14e8384
parent 1e98540b
......@@ -456,9 +456,9 @@ env command for configure.
#
# Build and install it in the visit directory.
#
gunzip visit031215.tar.gz
tar xf visit031215.tar
cd visit031215/config-site
gunzip visit040112.tar.gz
tar xf visit040112.tar
cd visit040112/config-site
echo VISITHOME=`cat ../../visitpath` > `hostname`.conf
cat Template.conf >> `hostname`.conf
cd ..
......@@ -467,11 +467,11 @@ make
clearcase_bin/visit-bin-dist
# Use the appropriate install command based on the operating system on
# which you built VisIt.
clearcase_bin/visit-install 1.2.5 aix `cat ../visitpath`
clearcase_bin/visit-install 1.2.5 irix6 `cat ../visitpath`
clearcase_bin/visit-install 1.2.5 linux `cat ../visitpath`
clearcase_bin/visit-install 1.2.5 osf1 `cat ../visitpath`
clearcase_bin/visit-install 1.2.5 sunos5 `cat ../visitpath`
clearcase_bin/visit-install 1.2.6 aix `cat ../visitpath`
clearcase_bin/visit-install 1.2.6 irix6 `cat ../visitpath`
clearcase_bin/visit-install 1.2.6 linux `cat ../visitpath`
clearcase_bin/visit-install 1.2.6 osf1 `cat ../visitpath`
clearcase_bin/visit-install 1.2.6 sunos5 `cat ../visitpath`
When running the configure script you can enable or disable certain dependent
packages. All the configure options are listed at the beginning of the
......
......@@ -17,7 +17,7 @@ Unix and Mac OS X:
where
"version" will be 1.2.5 for the current distribution.
"version" will be 1.2.6 for the current distribution.
"platform" will be one of the following: aix, darwin, irix6, linux,
osf1, or sunos5 depending on the machine. The one you use should
......@@ -28,17 +28,17 @@ Unix and Mac OS X:
For example
visit-install 1.2.5 irix6 /usr/local/visit
visit-install 1.2.6 irix6 /usr/local/visit
will install the irix6, 1.2.5 version of visit in the directory
will install the irix6, 1.2.6 version of visit in the directory
"/usr/local/visit". Note that you will need to have the file
"visit1_2_5.irix6.tar.gz" present in the current directory for this
"visit1_2_6.irix6.tar.gz" present in the current directory for this
to function properly. You can install multiple binaries into the
same directory. For example, you could then execute
visit-install -a 1.2.5 linux /usr/local/visit
visit-install -a 1.2.6 linux /usr/local/visit
to add a linux, 1.2.5 version of visit to the same directory.
to add a linux, 1.2.6 version of visit to the same directory.
2. Add the bin directory below the installation directory
(/usr/local/visit/bin in our example) to each user's search path.
......@@ -76,8 +76,8 @@ Unix and Mac OS X:
Windows:
1. Copy the file visit1.2.5.exe to your desktop.
1. Copy the file visit1.2.6.exe to your desktop.
2. Double click on the visit1.2.5.exe icon to run the installer.
2. Double click on the visit1.2.6.exe icon to run the installer.
3. Follow the directions provided by the installer.
......@@ -243,8 +243,8 @@
<Field name="hostAliases" type="string">mcr#.llnl.gov mcr##.llnl.gov mcr###.llnl.gov mcr####.llnl.gov mcr# mcr## mcr### mcr####</Field>
<Field name="timeout" type="int">480</Field>
<Field name="numProcessors" type="int">8</Field>
<Field name="numNodesSet" type="bool">true</Field>
<Field name="numNodes" type="int">1</Field>
<Field name="numNodesSet" type="bool">false</Field>
<Field name="numNodes" type="int">0</Field>
<Field name="partitionSet" type="bool">true</Field>
<Field name="partition" type="string">pdebug</Field>
<Field name="bankSet" type="bool">false</Field>
......@@ -463,8 +463,8 @@
<Field name="hostAliases" type="string">pvc#.llnl.gov pvc##.llnl.gov pvc###.llnl.gov pvc# pvc## pvc###</Field>
<Field name="timeout" type="int">480</Field>
<Field name="numProcessors" type="int">16</Field>
<Field name="numNodesSet" type="bool">true</Field>
<Field name="numNodes" type="int">8</Field>
<Field name="numNodesSet" type="bool">false</Field>
<Field name="numNodes" type="int">0</Field>
<Field name="partitionSet" type="bool">true</Field>
<Field name="partition" type="string">pbatch</Field>
<Field name="bankSet" type="bool">false</Field>
......
// ************************************************************************* //
// BJHash.C //
// ************************************************************************* //
#include <BJHash.h>
typedef unsigned int ub4;
typedef unsigned char ub1;
// ****************************************************************************
// Function: Hash
//
// Purpose:
// Hash a variable length stream of bytes into a 32-bit value.
//
// Can also be used effectively as a checksum.
//
// The best hash table sizes are powers of 2. There is no need to do
// mod a prime (mod is sooo slow!). If you need less than 32 bits,
// use a bitmask. For example, if you need only 10 bits, do
// h = (h & BJHashmask(10));
// In which case, the hash table should have hashsize(10) elements.
//
// If you are hashing n strings (ub1 **)k, do it like this:
// for (i=0, h=0; i<n; ++i) h = hash( k[i], len[i], h);
//
// Arguments:
// k: the key ((the unaligned variable-length array of bytes)
// length: the length of the key, in bytes
// initval: can be any 4-byte value
//
// Returns: A 32-bit value. Every bit of the key affects every bit of
// the return value. Every 1-bit and 2-bit delta achieves avalanche.
//
// Programmer: By Bob Jenkins, 1996. bob_jenkins@burtleburtle.net.
//
// You may use this code any way you wish, private, educational, or
// commercial. It's free. However, do NOT use for cryptographic purposes.
//
// See http://burtleburtle.net/bob/hash/evahash.html
// ****************************************************************************
#define mix(a,b,c) \
{ \
a -= b; a -= c; a ^= (c>>13); \
b -= c; b -= a; b ^= (a<<8); \
c -= a; c -= b; c ^= (b>>13); \
a -= b; a -= c; a ^= (c>>12); \
b -= c; b -= a; b ^= (a<<16); \
c -= a; c -= b; c ^= (b>>5); \
a -= b; a -= c; a ^= (c>>3); \
b -= c; b -= a; b ^= (a<<10); \
c -= a; c -= b; c ^= (b>>15); \
}
ub4 BJHash::Hash(register ub1 *k, register ub4 length, register ub4 initval)
{
register ub4 a,b,c,len;
len = length;
a = b = 0x9e3779b9;
c = initval;
while (len >= 12)
{
a += (k[0] +((ub4)k[1]<<8) +((ub4)k[2]<<16) +((ub4)k[3]<<24));
b += (k[4] +((ub4)k[5]<<8) +((ub4)k[6]<<16) +((ub4)k[7]<<24));
c += (k[8] +((ub4)k[9]<<8) +((ub4)k[10]<<16)+((ub4)k[11]<<24));
mix(a,b,c);
k += 12; len -= 12;
}
c += length;
switch(len)
{
case 11: c+=((ub4)k[10]<<24);
case 10: c+=((ub4)k[9]<<16);
case 9 : c+=((ub4)k[8]<<8);
case 8 : b+=((ub4)k[7]<<24);
case 7 : b+=((ub4)k[6]<<16);
case 6 : b+=((ub4)k[5]<<8);
case 5 : b+=k[4];
case 4 : a+=((ub4)k[3]<<24);
case 3 : a+=((ub4)k[2]<<16);
case 2 : a+=((ub4)k[1]<<8);
case 1 : a+=k[0];
}
mix(a,b,c);
return c;
}
// ************************************************************************* //
// BJHash.h //
// ************************************************************************* //
#ifndef BJHASH_H
#define BJHASH_H
namespace BJHash
{
unsigned int Hash(unsigned char *k, unsigned int length, unsigned int initval);
unsigned int Mask(int n);
}
inline unsigned int BJHash::Mask(int n)
{
return ((unsigned int)1<<n) - 1;
}
#endif
......@@ -73,8 +73,8 @@ LIBS=
##
## Files...
##
SRC=NamingConvention.C Utility.C void_ref_ptr.C
HDR=NamingConvention.h Utility.h ref_ptr.h array_ref_ptr.h void_ref_ptr.h
SRC=BJHash.C NamingConvention.C Utility.C void_ref_ptr.C
HDR=BJHash.h NamingConvention.h Utility.h ref_ptr.h array_ref_ptr.h void_ref_ptr.h
OBJ=$(SRC:.C=.o)
LIB=libutility
NOT_DISTRIB=
......
<?xml version="1.0"?>
<Plugin name="CosmosPP" label="CosmosPP" type="database" dbtype="MTMD" version="1.0">
<Extensions> cosmospp cosmos++ </Extensions>
<CXXFLAGS> $(HDF5_INCLUDE) </CXXFLAGS>
<LIBS> $(HDF5_LIB) </LIBS>
</Plugin>
#include <CosmosPPPluginInfo.h>
#include <avtCosmosPPFileFormat.h>
#include <avtMTMDFileFormatInterface.h>
#include <avtGenericDatabase.h>
// ****************************************************************************
// Method: CosmosPPCommonPluginInfo::GetDatabaseType
//
// Purpose:
// Returns the type of a CosmosPP database.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// ****************************************************************************
DatabaseType
CosmosPPCommonPluginInfo::GetDatabaseType()
{
return DB_TYPE_MTMD;
}
// ****************************************************************************
// Method: CosmosPPCommonPluginInfo::GetDefaultExtensions
//
// Purpose:
// Returns the default extensions for a CosmosPP database.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// ****************************************************************************
std::vector<std::string>
CosmosPPCommonPluginInfo::GetDefaultExtensions()
{
std::vector<std::string> defaultExtensions;
defaultExtensions.push_back("cosmospp");
defaultExtensions.push_back("cosmos++");
return defaultExtensions;
}
// ****************************************************************************
// Method: CosmosPPCommonPluginInfo::GetWriter
//
// Purpose:
// Sets up a CosmosPP writer.
//
// Returns: A CosmosPP writer.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// ****************************************************************************
avtDatabaseWriter *
CosmosPPCommonPluginInfo::GetWriter(void)
{
return NULL;
}
// ****************************************************************************
// Method: CosmosPPCommonPluginInfo::SetUpCosmosPPDatabase
//
// Purpose:
// Sets up a CosmosPP database.
//
// Arguments:
// list A list of file names.
// nList The number of timesteps in list.
// nBlocks The number of blocks in the list.
//
// Returns: A CosmosPP database from list.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// ****************************************************************************
avtDatabase *
CosmosPPCommonPluginInfo::SetupDatabase(const char *const *list,
int nList, int nBlock)
{
return new avtGenericDatabase(
new avtMTMDFileFormatInterface(
new avtCosmosPPFileFormat(list[0])));
}
#include <CosmosPPPluginInfo.h>
#if defined(__APPLE__)
#define GetEngineInfo CosmosPP_GetEngineInfo
#endif
// ****************************************************************************
// Function: GetEngineInfo
//
// Purpose:
// Return a new EnginePluginInfo for the CosmosPP database.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// ****************************************************************************
extern "C" EngineDatabasePluginInfo* GetEngineInfo()
{
return new CosmosPPEnginePluginInfo;
}
// this makes compilers happy... remove if we ever have functions here
void CosmosPPEnginePluginInfo::dummy()
{
}
#include <CosmosPPPluginInfo.h>
#if defined(__APPLE__)
#define GetMDServerInfo CosmosPP_GetMDServerInfo
#endif
// ****************************************************************************
// Function: GetMDServerInfo
//
// Purpose:
// Return a new MDServerPluginInfo for the CosmosPP database.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// ****************************************************************************
extern "C" MDServerDatabasePluginInfo* GetMDServerInfo()
{
return new CosmosPPMDServerPluginInfo;
}
// this makes compilers happy... remove if we ever have functions here
void CosmosPPMDServerPluginInfo::dummy()
{
}
// ************************************************************************* //
// File: CosmosPPPluginInfo.C
// ************************************************************************* //
#include <CosmosPPPluginInfo.h>
#if defined(__APPLE__)
#define GetGeneralInfo CosmosPP_GetGeneralInfo
#endif
// ****************************************************************************
// Function: GetGeneralInfo
//
// Purpose:
// Return a new GeneralPluginInfo for the CosmosPP database.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// ****************************************************************************
extern "C" GeneralDatabasePluginInfo* GetGeneralInfo()
{
return new CosmosPPGeneralPluginInfo;
}
// ****************************************************************************
// Method: CosmosPPGeneralPluginInfo::GetName
//
// Purpose:
// Return the name of the database plugin.
//
// Returns: A pointer to the name of the database plugin.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// ****************************************************************************
char *
CosmosPPGeneralPluginInfo::GetName() const
{
return "CosmosPP";
}
// ****************************************************************************
// Method: CosmosPPGeneralPluginInfo::GetVersion
//
// Purpose:
// Return the version of the database plugin.
//
// Returns: A pointer to the version of the database plugin.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// ****************************************************************************
char *
CosmosPPGeneralPluginInfo::GetVersion() const
{
return "1.0";
}
// ****************************************************************************
// Method: CosmosPPGeneralPluginInfo::GetID
//
// Purpose:
// Return the id of the database plugin.
//
// Returns: A pointer to the id of the database plugin.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// ****************************************************************************
char *
CosmosPPGeneralPluginInfo::GetID() const
{
return "CosmosPP_1.0";
}
// ****************************************************************************
// Method: CosmosPPGeneralPluginInfo::EnabledByDefault
//
// Purpose:
// Return true if this plugin should be enabled by default; false otherwise.
//
// Returns: true/false
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// ****************************************************************************
bool
CosmosPPGeneralPluginInfo::EnabledByDefault() const
{
return true;
}
// ****************************************************************************
// CosmosPPPluginInfo.h
// ****************************************************************************
#ifndef COSMOSPP_PLUGIN_INFO_H
#define COSMOSPP_PLUGIN_INFO_H
#include <DatabasePluginInfo.h>
#include <database_plugin_exports.h>
class avtDatabase;
class avtDatabaseWriter;
// ****************************************************************************
// Class: CosmosPPDatabasePluginInfo
//
// Purpose:
// Classes that provide all the information about the CosmosPP plugin.
// Portions are separated into pieces relevant to the appropriate
// components of VisIt.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Dec 31 14:13:52 PST 2003
//
// Modifications:
//
// ****************************************************************************
class CosmosPPGeneralPluginInfo : public virtual GeneralDatabasePluginInfo
{
public:
virtual char *GetName() const;
virtual char *GetVersion() const;
virtual char *GetID() const;
virtual bool EnabledByDefault() const;
};
class CosmosPPCommonPluginInfo : public virtual CommonDatabasePluginInfo, public virtual CosmosPPGeneralPluginInfo
{
public:
virtual DatabaseType GetDatabaseType();
virtual std::vector<std::string> GetDefaultExtensions();
virtual avtDatabase *SetupDatabase(const char * const *list,
int nList, int nBlock);
virtual avtDatabaseWriter *GetWriter(void);
};
class CosmosPPMDServerPluginInfo : public virtual MDServerDatabasePluginInfo, public virtual CosmosPPCommonPluginInfo
{
public:
// this makes compilers happy... remove if we ever have functions here
virtual void dummy();
};
class CosmosPPEnginePluginInfo : public virtual EngineDatabasePluginInfo, public virtual CosmosPPCommonPluginInfo
{
public:
// this makes compilers happy... remove if we ever have functions here
virtual void dummy();
};
#endif
// ************************************************************************* //
// avtCosmosPPFileFormat.C //
// ************************************************************************* //
#include <avtCosmosPPFileFormat.h>
#include <ctype.h>
#include <float.h>
#include <math.h>
#include <vtkCellData.h>
#include <vtkCellType.h>
#include <vtkFloatArray.h>
#include <vtkIntArray.h>
#include <vtkPointLocator.h>
#include <vtkPoints.h>
#include <vtkUnsignedCharArray.h>
#include <vtkUnstructuredGrid.h>
#include <avtDatabaseMetaData.h>
#include <BadIndexException.h>
#include <DebugStream.h>
#include <ImproperUseException.h>
#include <InvalidDBTypeException.h>
#include <InvalidVariableException.h>
#include <hdf5.h>
using std::vector;
using std::string;
static string GetDirName(const char *path);
// ****************************************************************************
// Constructor: avtCosmosPPFileFormat::avtCosmosPPFileFormat
//
// Arguments:
// fname the file name of the master CosmosPP file
//
// Programmer: Hank Childs
// Creation: November 24, 2003
//
// ****************************************************************************
avtCosmosPPFileFormat::avtCosmosPPFileFormat(const char *fname)
: avtMTMDFileFormat(fname)
{
dirname = GetDirName(fname);
ifstream ifile(fname);
if (ifile.fail())
{
EXCEPTION1(InvalidDBTypeException, "Unable to open cosmos file.");
}
ntimesteps = ndomains = rank = -1;
int i, j;
//
// Parse the master file to find out the information that we need.
// We're not too picky about the format as long as the necessary
// parts are there, and that #DOMAINS is defined before the
// grid and variable files.
//
for (;;)
{
string key;
ReadString(ifile, key);
if (ifile.eof() || ifile.fail())
break;
if (key == "#DOMAINS")
{
ifile >> ndomains;
proc_names.resize(ndomains);
}
else if (key == "#TIMESTEPS")
{
ifile >> ntimesteps;
cycles.resize(ntimesteps);
times.resize(ntimesteps);
dump_names.resize(ntimesteps);
debug1 << "Reading timesteps = " << ntimesteps << endl;
}
else if (key == "#DUMP_CYCLE_TIME_FILENAME")
{
if (ntimesteps <= 0)
{