...
 
Commits (4)
......@@ -8,7 +8,8 @@ endif()
if(ENABLE_HDF5)
add_executable(HDF5EndPoint HDF5EndPoint.cpp)
target_link_libraries(HDF5EndPoint PRIVATE opts sensei timer sHDF5 sMPI)
#target_link_libraries(HDF5EndPoint PRIVATE opts sensei timer sHDF5 sMPI)
target_link_libraries(HDF5EndPoint PRIVATE opts sensei sHDF5 sMPI)
install(TARGETS HDF5EndPoint
RUNTIME DESTINATION bin)
......
......@@ -621,6 +621,7 @@ int DataAdaptor::GetMeshMetadata(unsigned int id, sensei::MeshMetadataPtr &metad
metadata->MeshName = (id == 0 ? "mesh" : "ucdmesh");
metadata->MeshType = VTK_MULTIBLOCK_DATA_SET;
metadata->BlockType = (id == 0 ? VTK_IMAGE_DATA : VTK_UNSTRUCTURED_GRID);
metadata->NumBlocks = this->Internals->NumBlocks;
metadata->NumBlocksLocal = {nBlocks};
metadata->NumGhostCells = this->Internals->NumGhostCells;
metadata->NumArrays = 1;
......
......@@ -74,7 +74,7 @@ int HDF5DataAdaptor::Initialize(pugi::xml_node& node)
//----------------------------------------------------------------------------
// int HDF5DataAdaptor::Open(const std::string& fileName)
int HDF5DataAdaptor::OpenStream()
{
{
timer::MarkEvent mark("HDF5DataAdaptor::OpenStream");
if (m_StreamName.size() == 0)
......@@ -289,7 +289,11 @@ int HDF5DataAdaptor::AddArray(vtkDataObject* mesh,
int association,
const std::string& arrayName)
{
timer::MarkEvent mark("HDF5DataAdaptor::AddArray");
std::ostringstream oss;
oss<<"HDF5DataAdaptor::AddArray mesh="<<meshName<<" array="<<arrayName;
//timer::MarkEvent mark("HDF5DataAdaptor::AddArray");
timer::MarkEvent mark(oss.str().c_str());
// the mesh should never be null. there must have been an error
// upstream.
......
#include "HDF5Schema.h"
#include "timer.h"
#include "VTKUtils.h"
#include <vtkCellArray.h>
......@@ -340,7 +341,10 @@ void HDF5VarGuard::ReadSlice(void *buf,
const hsize_t *block)
{
hid_t memDataSpace = H5Screate_simple(ndim, count, NULL);
hssize_t bytes = H5Sget_simple_extent_npoints(memDataSpace);
std::ostringstream oss; oss<<"H5BytesRead="<<bytes;
timer::MarkEvent mark(oss.str().c_str());
H5Sselect_hyperslab(m_VarSpace, H5S_SELECT_SET, start, stride, count, block);
H5Dread(m_VarID, m_VarType, memDataSpace, m_VarSpace, H5P_DEFAULT, buf);
......@@ -854,6 +858,8 @@ bool ReadStream::ReadBinary(const std::string &name, sensei::BinaryStream &str)
str.SetReadPos(0);
str.SetWritePos(nbytes);
std::ostringstream oss; oss<<"H5BytesReadBinary="<<nbytes;
timer::MarkEvent mark(oss.str().c_str());
g.ReadAll(str.GetData());
return true;
......@@ -1826,6 +1832,9 @@ VTKObjectFlow::VTKObjectFlow(const sensei::MeshMetadataPtr &md,
: m_Metadata(md)
, m_MeshID(meshID)
{
if (md->NumBlocks != md->BlockCellArraySize.size()) {
return;
}
gGetNameStr(m_CellTypeVarName, m_MeshID, "cell_types");
gGetNameStr(m_CellArrayVarName, m_MeshID, "cell_array");
gGetNameStr(m_PointVarName, m_MeshID, "points");
......@@ -2359,6 +2368,12 @@ bool WriteStream::WriteVar(hid_t &varID,
hid_t h5Type,
void *data)
{
hsize_t bytes= H5Sget_simple_extent_npoints(space.m_MemSpaceID);
std::ostringstream oss; oss<<"H5BytesWrote="<<bytes;
//oss<<" WVrank="<<m_Rank<<" name=["<<name<<"]"<<varID;
//std::cout<< oss.str()<<std::endl;
timer::MarkEvent mark(oss.str().c_str());
if(-1 == varID)
varID = CreateVar(name, space, h5Type);
......@@ -2368,7 +2383,7 @@ bool WriteStream::WriteVar(hid_t &varID,
space.m_FileSpaceID,
m_CollectiveTxf,
data);
return true;
}
......@@ -2420,6 +2435,9 @@ WriteStream::~WriteStream()
bool WriteStream::WriteBinary(const std::string &name,
sensei::BinaryStream &str)
{
std::ostringstream oss; oss<<"H5BytesWroteBinary="<<str.Size();
timer::MarkEvent mark(oss.str().c_str());
hid_t h5Type = H5T_NATIVE_CHAR;
hsize_t strlen[1] = { str.Size() };
......