Skip to content

Allow Append After Write: Expose max_dims #233

@s0vereign

Description

@s0vereign

I'm trying testwise to append a value to a Dataset written by SerialDataCollector using the following:

...

// Create necessary attributes 
   splash::SerialDataCollector HDFile(1);
   splash::DataCollector::FileCreationAttr fa;
    splash::DataCollector::initFileCreationAttr(fa);
    fa.fileAccType = splash::DataCollector::FAT_CREATE;
//  This is taken from a class therefore filename is known
    HDFile.open(filename.c_str(), fa);
    splash::ColTypeDouble ctDouble;

// Create and fill data Vector
    std::vector<double> p_sav(7);
 ...
// Prepare writing object
    splash::ColTypeDouble ctdouble;
    splash::Dimensions local(7,1,1);
    splash::Selection sel(local);

//  Write Operation
    HDFile.write(1, ctdouble,1, sel,"param_data",p_sav.data());

   // Prepare Data to append
   std::vector<double> p2(1);
   p2[0] = param->getne();

   // Append data
    HDFile.append(1, ctdouble, 1,"param_data", p2.data());
    HDFile.close();
...

Using this gives me the following error:

terminate called after throwing an instance of 'splash::DCException'
  what():  Exception for DCDataSet [param_data] append: Failed to extend dataset

The writing worked fine, but the appending doesn't, did I just misinterpret the docs or could this be a bug?

Already thanks in advance ;)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions