ComputationalRadiationPhysics / libSplash

libSplash - Simple Parallel file output Library for Accumulating Simulation data using Hdf5
GNU Lesser General Public License v3.0
15 stars 15 forks source link

Topic attributes for not existing groups #250

Closed psychocoderHPC closed 8 years ago

psychocoderHPC commented 8 years ago

close #231 Attribute Writing: Create Group if Missing

extent attribute test case (paralllel/serial)

psychocoderHPC commented 8 years ago

I checked the performance impact for checking each time if a group/dataset exists. I compared it to the case where I only handle not existing groups if the opening of a group/dataset fails.

Result: Can't see an performance impact.

ax3l commented 8 years ago

I checked the performance impact for checking each time if a group/dataset exists. I compared it to the case where I only handle not existing groups if the opening of a group/dataset fails.

Result: Can't see an performance impact.

Did you try with 10-thousands of MPI ranks? ;) I know it sounds rediculous, but thats the only case where I would expect a visible impact: 10'000 ranks write 1e6 different attributes to non-existing groups.

ax3l commented 8 years ago

forgot to write this first: thank you so much for implementing and testing! :sparkles:

psychocoderHPC commented 8 years ago

This would only show that writing attributes is slow not which case of implementation is slow. I think writing different attributes in parallel is not allowed, but I need to check if write attribute is a collective operation.

Am 13. September 2016 20:32:34 MESZ, schrieb Axel Huebl notifications@github.com:

I checked the performance impact for checking each time if a group/dataset exists. I compared it to the case where I only handle not existing groups if the opening of a group/dataset fails.

Result: Can't see an performance impact.

Did you try with 10-thousands of MPI ranks? ;) I know it sounds rediculous, but thats the only case where I would expect a visible impact: 10'000 ranks write 1e6 different attributes to non-existing groups.

You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/ComputationalRadiationPhysics/libSplash/pull/250#issuecomment-246778243

Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

ax3l commented 8 years ago

it is actually collective afaik.

slow: yes, I did mean "test with both implementations (test & create vs. throw and create)" but imho not important for now.

ax3l commented 8 years ago

Please add to writeGlobalAttribute and writeAttribute of DataCollector.hpp and IParallelDataCollector.hpp:

writeGlobalAttribute:
 /**
  * Writes global attribute to HDF5 file (default group).
  *
+ * If the path to \p name does not exist the missing groups will be created.
  *
  * @param ...

writeAttribute:
  /**
   * Writes an attribute to a single dataset.
   *
   * @param id ID for iteration.
   * @param type Type information for data.
   * @param dataName Name of the dataset in group \p id to write attribute to.
   * If dataName is NULL, the attribute is written for the iteration group.
 + * If the path dataName does not yet exist, missing groups will be created.
   * @param attrName Name of the attribute.
   * @param buf Buffer to be written as attribute.
   */
psychocoderHPC commented 8 years ago

I checked the code again and writeGlobalAttribute() is not using the changed method. Therefore I added no comments for this function call.

ax3l commented 8 years ago

thank you! :sparkles: :rocket: