Commit 451730e4 authored by pugmire's avatar pugmire
Browse files

Renamed the ADIOS reader (Adios to ADIOS)

Updated the reader to support ADIOS 1.0 libraries.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@9663 18c085ea-50e0-402c-830e-de6fd14e8384
parent c2ce70af
<?xml version="1.0"?>
<Plugin name="Adios" type="database" label="Adios" version="1.0" enabled="true" mdspecificcode="true" engspecificcode="true" onlyengine="false" noengine="false" dbtype="MTMD" haswriter="false" hasoptions="false" filePatternsStrict="false">
<Plugin name="ADIOS" type="database" label="ADIOS" version="1.0" enabled="true" mdspecificcode="true" engspecificcode="true" onlyengine="false" noengine="false" dbtype="MTMD" haswriter="false" hasoptions="false" filePatternsStrict="false" opensWholeDirectory="false">
<CXXFLAGS>
$(ADIOS_INCLUDE_DIR)
</CXXFLAGS>
......
......@@ -36,49 +36,49 @@
*
*****************************************************************************/
#include <AdiosPluginInfo.h>
#include <avtAdiosFileFormat.h>
#include <ADIOSPluginInfo.h>
#include <avtADIOSFileFormat.h>
#include <avtMTMDFileFormatInterface.h>
#include <avtGenericDatabase.h>
// ****************************************************************************
// Method: AdiosCommonPluginInfo::GetDatabaseType
// Method: ADIOSCommonPluginInfo::GetDatabaseType
//
// Purpose:
// Returns the type of a Adios database.
// Returns the type of a ADIOS database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
DatabaseType
AdiosCommonPluginInfo::GetDatabaseType()
ADIOSCommonPluginInfo::GetDatabaseType()
{
return DB_TYPE_MTMD;
}
// ****************************************************************************
// Method: AdiosCommonPluginInfo::SetupDatabase
// Method: ADIOSCommonPluginInfo::SetupDatabase
//
// Purpose:
// Sets up a Adios database.
// Sets up a ADIOS 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 Adios database from list.
// Returns: A ADIOS database from list.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
avtDatabase *
AdiosCommonPluginInfo::SetupDatabase(const char *const *list,
ADIOSCommonPluginInfo::SetupDatabase(const char *const *list,
int nList, int nBlock)
{
return new avtGenericDatabase(
new avtMTMDFileFormatInterface(
new avtAdiosFileFormat(list[0])));
new avtADIOSFileFormat(list[0])));
}
......@@ -36,37 +36,37 @@
*
*****************************************************************************/
#include <AdiosPluginInfo.h>
#include <ADIOSPluginInfo.h>
// ****************************************************************************
// Function: GetEngineInfo
//
// Purpose:
// Return a new EnginePluginInfo for the Adios database.
// Return a new EnginePluginInfo for the ADIOS database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
extern "C" DBP_EXPORT EngineDatabasePluginInfo* Adios_GetEngineInfo()
extern "C" DBP_EXPORT EngineDatabasePluginInfo* ADIOS_GetEngineInfo()
{
return new AdiosEnginePluginInfo;
return new ADIOSEnginePluginInfo;
}
// ****************************************************************************
// Method: AdiosEnginePluginInfo::GetWriter
// Method: ADIOSEnginePluginInfo::GetWriter
//
// Purpose:
// Sets up a Adios writer.
// Sets up a ADIOS writer.
//
// Returns: A Adios writer.
// Returns: A ADIOS writer.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
avtDatabaseWriter *
AdiosEnginePluginInfo::GetWriter(void)
ADIOSEnginePluginInfo::GetWriter(void)
{
return NULL;
}
......
......@@ -36,25 +36,25 @@
*
*****************************************************************************/
#include <AdiosPluginInfo.h>
#include <ADIOSPluginInfo.h>
// ****************************************************************************
// Function: GetMDServerInfo
//
// Purpose:
// Return a new MDServerPluginInfo for the Adios database.
// Return a new MDServerPluginInfo for the ADIOS database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
extern "C" DBP_EXPORT MDServerDatabasePluginInfo* Adios_GetMDServerInfo()
extern "C" DBP_EXPORT MDServerDatabasePluginInfo* ADIOS_GetMDServerInfo()
{
return new AdiosMDServerPluginInfo;
return new ADIOSMDServerPluginInfo;
}
// this makes compilers happy... remove if we ever have functions here
void AdiosMDServerPluginInfo::dummy()
void ADIOSMDServerPluginInfo::dummy()
{
}
......@@ -37,31 +37,31 @@
*****************************************************************************/
// ************************************************************************* //
// File: AdiosPluginInfo.C
// File: ADIOSPluginInfo.C
// ************************************************************************* //
#include <AdiosPluginInfo.h>
#include <ADIOSPluginInfo.h>
#include <visit-config.h>
extern "C" DBP_EXPORT const char *AdiosVisItPluginVersion = VISIT_VERSION;
extern "C" DBP_EXPORT const char *ADIOSVisItPluginVersion = VISIT_VERSION;
// ****************************************************************************
// Function: GetGeneralInfo
//
// Purpose:
// Return a new GeneralPluginInfo for the Adios database.
// Return a new GeneralPluginInfo for the ADIOS database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
extern "C" DBP_EXPORT GeneralDatabasePluginInfo* Adios_GetGeneralInfo()
extern "C" DBP_EXPORT GeneralDatabasePluginInfo* ADIOS_GetGeneralInfo()
{
return new AdiosGeneralPluginInfo;
return new ADIOSGeneralPluginInfo;
}
// ****************************************************************************
// Method: AdiosGeneralPluginInfo::GetName
// Method: ADIOSGeneralPluginInfo::GetName
//
// Purpose:
// Return the name of the database plugin.
......@@ -74,13 +74,13 @@ extern "C" DBP_EXPORT GeneralDatabasePluginInfo* Adios_GetGeneralInfo()
// ****************************************************************************
const char *
AdiosGeneralPluginInfo::GetName() const
ADIOSGeneralPluginInfo::GetName() const
{
return "Adios";
return "ADIOS";
}
// ****************************************************************************
// Method: AdiosGeneralPluginInfo::GetVersion
// Method: ADIOSGeneralPluginInfo::GetVersion
//
// Purpose:
// Return the version of the database plugin.
......@@ -93,13 +93,13 @@ AdiosGeneralPluginInfo::GetName() const
// ****************************************************************************
const char *
AdiosGeneralPluginInfo::GetVersion() const
ADIOSGeneralPluginInfo::GetVersion() const
{
return "1.0";
}
// ****************************************************************************
// Method: AdiosGeneralPluginInfo::GetID
// Method: ADIOSGeneralPluginInfo::GetID
//
// Purpose:
// Return the id of the database plugin.
......@@ -112,12 +112,12 @@ AdiosGeneralPluginInfo::GetVersion() const
// ****************************************************************************
const char *
AdiosGeneralPluginInfo::GetID() const
ADIOSGeneralPluginInfo::GetID() const
{
return "Adios_1.0";
return "ADIOS_1.0";
}
// ****************************************************************************
// Method: AdiosGeneralPluginInfo::EnabledByDefault
// Method: ADIOSGeneralPluginInfo::EnabledByDefault
//
// Purpose:
// Return true if this plugin should be enabled by default; false otherwise.
......@@ -130,12 +130,12 @@ AdiosGeneralPluginInfo::GetID() const
// ****************************************************************************
bool
AdiosGeneralPluginInfo::EnabledByDefault() const
ADIOSGeneralPluginInfo::EnabledByDefault() const
{
return true;
}
// ****************************************************************************
// Method: AdiosGeneralPluginInfo::HasWriter
// Method: ADIOSGeneralPluginInfo::HasWriter
//
// Purpose:
// Return true if this plugin has a database writer.
......@@ -148,22 +148,22 @@ AdiosGeneralPluginInfo::EnabledByDefault() const
// ****************************************************************************
bool
AdiosGeneralPluginInfo::HasWriter() const
ADIOSGeneralPluginInfo::HasWriter() const
{
return false;
}
// ****************************************************************************
// Method: AdiosGeneralPluginInfo::GetDefaultFilePatterns
// Method: ADIOSGeneralPluginInfo::GetDefaultFilePatterns
//
// Purpose:
// Returns the default patterns for a Adios database.
// Returns the default patterns for a ADIOS database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
std::vector<std::string>
AdiosGeneralPluginInfo::GetDefaultFilePatterns() const
ADIOSGeneralPluginInfo::GetDefaultFilePatterns() const
{
std::vector<std::string> defaultPatterns;
defaultPatterns.push_back("*.bp");
......@@ -172,10 +172,10 @@ AdiosGeneralPluginInfo::GetDefaultFilePatterns() const
}
// ****************************************************************************
// Method: AdiosGeneralPluginInfo::AreDefaultFilePatternsStrict
// Method: ADIOSGeneralPluginInfo::AreDefaultFilePatternsStrict
//
// Purpose:
// Returns if the file patterns for a Adios database are
// Returns if the file patterns for a ADIOS database are
// intended to be interpreted strictly by default.
//
// Programmer: generated by xml2info
......@@ -183,16 +183,16 @@ AdiosGeneralPluginInfo::GetDefaultFilePatterns() const
//
// ****************************************************************************
bool
AdiosGeneralPluginInfo::AreDefaultFilePatternsStrict() const
ADIOSGeneralPluginInfo::AreDefaultFilePatternsStrict() const
{
return false;
}
// ****************************************************************************
// Method: AdiosGeneralPluginInfo::OpensWholeDirectory
// Method: ADIOSGeneralPluginInfo::OpensWholeDirectory
//
// Purpose:
// Returns if the Adios plugin opens a whole directory name
// Returns if the ADIOS plugin opens a whole directory name
// instead of a single file.
//
// Programmer: generated by xml2info
......@@ -200,7 +200,7 @@ AdiosGeneralPluginInfo::AreDefaultFilePatternsStrict() const
//
// ****************************************************************************
bool
AdiosGeneralPluginInfo::OpensWholeDirectory() const
ADIOSGeneralPluginInfo::OpensWholeDirectory() const
{
return false;
}
......@@ -37,7 +37,7 @@
*****************************************************************************/
// ****************************************************************************
// AdiosPluginInfo.h
// ADIOSPluginInfo.h
// ****************************************************************************
#ifndef ADIOS_PLUGIN_INFO_H
......@@ -49,10 +49,10 @@ class avtDatabase;
class avtDatabaseWriter;
// ****************************************************************************
// Class: AdiosDatabasePluginInfo
// Class: ADIOSDatabasePluginInfo
//
// Purpose:
// Classes that provide all the information about the Adios plugin.
// Classes that provide all the information about the ADIOS plugin.
// Portions are separated into pieces relevant to the appropriate
// components of VisIt.
//
......@@ -63,7 +63,7 @@ class avtDatabaseWriter;
//
// ****************************************************************************
class AdiosGeneralPluginInfo : public virtual GeneralDatabasePluginInfo
class ADIOSGeneralPluginInfo : public virtual GeneralDatabasePluginInfo
{
public:
virtual const char *GetName() const;
......@@ -76,7 +76,7 @@ class AdiosGeneralPluginInfo : public virtual GeneralDatabasePluginInfo
virtual bool OpensWholeDirectory() const;
};
class AdiosCommonPluginInfo : public virtual CommonDatabasePluginInfo, public virtual AdiosGeneralPluginInfo
class ADIOSCommonPluginInfo : public virtual CommonDatabasePluginInfo, public virtual ADIOSGeneralPluginInfo
{
public:
virtual DatabaseType GetDatabaseType();
......@@ -84,14 +84,14 @@ class AdiosCommonPluginInfo : public virtual CommonDatabasePluginInfo, public vi
int nList, int nBlock);
};
class AdiosMDServerPluginInfo : public virtual MDServerDatabasePluginInfo, public virtual AdiosCommonPluginInfo
class ADIOSMDServerPluginInfo : public virtual MDServerDatabasePluginInfo, public virtual ADIOSCommonPluginInfo
{
public:
// this makes compilers happy... remove if we ever have functions here
virtual void dummy();
};
class AdiosEnginePluginInfo : public virtual EngineDatabasePluginInfo, public virtual AdiosCommonPluginInfo
class ADIOSEnginePluginInfo : public virtual EngineDatabasePluginInfo, public virtual ADIOSCommonPluginInfo
{
public:
virtual avtDatabaseWriter *GetWriter(void);
......
# DO NOT EDIT THIS FILE! THIS FILE IS AUTOMATICALLY GENERATED BY xml2cmake
PROJECT(Adios)
PROJECT(ADIOS)
SET(COMMON_SOURCES
AdiosPluginInfo.C
AdiosCommonPluginInfo.C
ADIOSPluginInfo.C
ADIOSCommonPluginInfo.C
)
SET(LIBI_SOURCES
AdiosPluginInfo.C
ADIOSPluginInfo.C
)
SET(LIBM_SOURCES
AdiosMDServerPluginInfo.C
ADIOSMDServerPluginInfo.C
${COMMON_SOURCES}
avtAdiosFileFormat.C
avtADIOSFileFormat.C
)
SET(LIBE_SOURCES
AdiosEnginePluginInfo.C
ADIOSEnginePluginInfo.C
${COMMON_SOURCES}
avtAdiosFileFormat.C
avtADIOSFileFormat.C
)
INCLUDE_DIRECTORIES(
......@@ -53,36 +53,36 @@ SET(LIBRARY_OUTPUT_PATH ${VISIT_PLUGIN_DIR}/databases)
LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} ${ADIOS_LIBRARY_DIR} )
ADD_LIBRARY(IAdiosDatabase ${LIBI_SOURCES})
TARGET_LINK_LIBRARIES(IAdiosDatabase visitcommon)
SET(INSTALLTARGETS IAdiosDatabase)
ADD_LIBRARY(IADIOSDatabase ${LIBI_SOURCES})
TARGET_LINK_LIBRARIES(IADIOSDatabase visitcommon)
SET(INSTALLTARGETS IADIOSDatabase)
IF(NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
ADD_LIBRARY(MAdiosDatabase ${LIBM_SOURCES} )
TARGET_LINK_LIBRARIES(MAdiosDatabase visitcommon avtdbatts avtdatabase_ser -ladiosread_nompi )
SET_TARGET_PROPERTIES(MAdiosDatabase
ADD_LIBRARY(MADIOSDatabase ${LIBM_SOURCES} )
TARGET_LINK_LIBRARIES(MADIOSDatabase visitcommon avtdbatts avtdatabase_ser -ladiosread_nompi )
SET_TARGET_PROPERTIES(MADIOSDatabase
PROPERTIES
COMPILE_FLAGS "-DMDSERVER"
)
SET(INSTALLTARGETS ${INSTALLTARGETS} MAdiosDatabase)
SET(INSTALLTARGETS ${INSTALLTARGETS} MADIOSDatabase)
ENDIF(NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
ADD_LIBRARY(EAdiosDatabase_ser ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(EAdiosDatabase_ser visitcommon avtdatabase_ser avtpipeline_ser -ladiosread_nompi )
SET_TARGET_PROPERTIES(EAdiosDatabase_ser
ADD_LIBRARY(EADIOSDatabase_ser ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(EADIOSDatabase_ser visitcommon avtdatabase_ser avtpipeline_ser -ladiosread_nompi )
SET_TARGET_PROPERTIES(EADIOSDatabase_ser
PROPERTIES
COMPILE_FLAGS "-DENGINE"
)
SET(INSTALLTARGETS ${INSTALLTARGETS} EAdiosDatabase_ser)
SET(INSTALLTARGETS ${INSTALLTARGETS} EADIOSDatabase_ser)
IF(VISIT_PARALLEL)
ADD_PARALLEL_LIBRARY(EAdiosDatabase_par ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(EAdiosDatabase_par visitcommon avtdatabase_par avtpipeline_par -ladiosread )
SET_TARGET_PROPERTIES(EAdiosDatabase_par
ADD_PARALLEL_LIBRARY(EADIOSDatabase_par ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(EADIOSDatabase_par visitcommon avtdatabase_par avtpipeline_par -ladiosread )
SET_TARGET_PROPERTIES(EADIOSDatabase_par
PROPERTIES
COMPILE_FLAGS "-DENGINE"
)
SET(INSTALLTARGETS ${INSTALLTARGETS} EAdiosDatabase_par)
SET(INSTALLTARGETS ${INSTALLTARGETS} EADIOSDatabase_par)
ENDIF(VISIT_PARALLEL)
VISIT_INSTALL_DATABASE_PLUGINS(${INSTALLTARGETS})
......@@ -37,18 +37,18 @@
*****************************************************************************/
// ************************************************************************* //
// avtAdiosFileFormat.h //
// avtADIOSFileFormat.h //
// ************************************************************************* //
#ifndef AVT_Adios_FILE_FORMAT_H
#define AVT_Adios_FILE_FORMAT_H
#ifndef AVT_ADIOS_FILE_FORMAT_H
#define AVT_ADIOS_FILE_FORMAT_H
#ifdef PARALLEL
#include <mpi.h>
#else
#define NOMPI
#define _NOMPI
#endif
#include <avtMTMDFileFormat.h>
#include <vector>
......@@ -62,23 +62,40 @@ extern "C"
#include <adios_read.h>
}
template <class T> static inline void
SwapIndices(int dim, T *arr)
{
if (dim <= 1) return;
else if (dim == 2)
{
T i0 = arr[0], i1 = arr[1];
arr[0] = i1; arr[1] = i0;
}
else if (dim == 3)
{
T i0 = arr[0], i2 = arr[2];
arr[0] = i2; arr[2] = i0;
}
}
// ****************************************************************************
// Class: avtAdiosFileFormat
// Class: avtADIOSFileFormat
//
// Purpose:
// Reads in Adios files as a plugin to VisIt.
// Reads in ADIOS files as a plugin to VisIt.
//
// Programmer: Dave Pugmire
// Creation: Thu Sep 17 11:23:05 EDT 2009
//
// ****************************************************************************
class avtAdiosFileFormat : public avtMTMDFileFormat
class avtADIOSFileFormat : public avtMTMDFileFormat
{
public:
avtAdiosFileFormat(const char *);
virtual ~avtAdiosFileFormat();
avtADIOSFileFormat(const char *);
virtual ~avtADIOSFileFormat();
//
// This is used to return unconvention data -- ranging from material
......@@ -99,7 +116,7 @@ class avtAdiosFileFormat : public avtMTMDFileFormat
virtual int GetNTimesteps(void);
virtual const char *GetType(void) { return "Adios"; };
virtual const char *GetType(void) { return "ADIOS"; };
virtual void FreeUpResources(void);
virtual vtkDataSet *GetMesh(int, int, const char *);
......@@ -114,6 +131,7 @@ class avtAdiosFileFormat : public avtMTMDFileFormat
std::string filename;
bool fileOpened;
char errmsg[1024];
class meshInfo
{
......@@ -127,19 +145,26 @@ class avtAdiosFileFormat : public avtMTMDFileFormat
}
~meshInfo() {}
int dim, start[3], count[3], global[3];
int dim;
int start[3], count[3], global[3];
std::string name;
void SwapIndices()
{
::SwapIndices(dim, start);
::SwapIndices(dim, count);
::SwapIndices(dim, global);
}
};
class varInfo : public meshInfo
{
public:
varInfo() : meshInfo() {type=0; groupIdx=0, timeVarying=false;}
varInfo() : meshInfo() {type=-1; groupIdx=-1, varid=-1, timedim=-1;}
~varInfo() {}
std::string meshName;
int groupIdx, type;
bool timeVarying;
int groupIdx, type, varid, timedim;
};
std::map<std::string, meshInfo> meshes;
......@@ -150,11 +175,9 @@ class avtAdiosFileFormat : public avtMTMDFileFormat
virtual void PopulateDatabaseMetaData(avtDatabaseMetaData *, int);
// Global variables for one opened file
int64_t fh; // file handle
int numTimeSteps; // number of timesteps
BP_FILE_INFO finfo; // file information structure
BP_GROUP_INFO *ginfos; // group information structure
int64_t *ghs; // group handlers
ADIOS_FILE *fp; // file information structure
ADIOS_GROUP **gps; // group information structures (>= 1!)
};
......
......@@ -74,7 +74,7 @@ ENDMACRO(THIRDPARTY_DEPENDENT_PLUGINS libname targets)
# library are added to the mix.
UNSET(TMP_THIRDPARTY_IO_LIBRARY_DIR)
UNSET(TMP_THIRDPARTY_IO_LIB)
THIRDPARTY_DEPENDENT_PLUGINS(ADIOS Adios)
THIRDPARTY_DEPENDENT_PLUGINS(ADIOS ADIOS)
THIRDPARTY_DEPENDENT_PLUGINS(ADVIO Adventure)
THIRDPARTY_DEPENDENT_PLUGINS(BOXLIB2D Boxlib2D)
THIRDPARTY_DEPENDENT_PLUGINS(BOXLIB3D Boxlib3D)
......
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