Skip to content

Commit

Permalink
Merge pull request #1649 from arcaneframework/dev/gg-use-kilo-byte-fo…
Browse files Browse the repository at this point in the history
…r-max-write-size

In 'VtkHdfV2PostProcessor', use kilo-byte as unit (instead of byte) for maximum write size
  • Loading branch information
grospelliergilles authored Sep 29, 2024
2 parents 85d81f4 + 5c31bdb commit ea7b84a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion arcane/src/arcane/std/VtkHdfV2PostProcessor.axl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<simple name="max-write-size" type="int64" default="0">
<userclass>User</userclass>
<description>
Taille maximale en octet d'un bloc pour une écriture collective.
Taille maximale en kilo-octet d'un bloc pour une écriture collective.
Si la taille maximale dépasse cette valeur, l'écriture est scindée en
plusieurs écritures. Cela n'est actif que pour les écritures avec MPI-IO.
</description>
Expand Down
9 changes: 5 additions & 4 deletions arcane/src/arcane/std/VtkHdfV2PostProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class VtkHdfV2DataWriter
ItemGroupCollectiveInfo m_all_nodes_info;

/*!
* \brief Taille maximum pour une écriture.
* \brief Taille maximale (en kilo-octet) pour une écriture.
*
* Si l'écriture dépasse cette taille, elle est scindée en plusieurs écriture.
* Cela peut être nécessaire avec MPI-IO pour les gros volumes.
Expand Down Expand Up @@ -379,9 +379,10 @@ beginWrite(const VariableCollection& vars)
if (pm->isHybridImplementation() || pm->isThreadImplementation())
m_is_collective_io = false;

if (is_first_call)
if (is_first_call) {
info() << "VtkHdfV2DataWriter: using collective MPI/IO ?=" << m_is_collective_io;

info() << "VtkHdfV2DataWriter: max_write_size (kB) =" << m_max_write_size;
}
// Vrai si on doit participer aux écritures
// Si on utilise MPI/IO avec HDF5, il faut tout de même que tous
// les rangs fassent toutes les opérations d'écriture pour garantir
Expand Down Expand Up @@ -745,7 +746,7 @@ _writeDataSetGeneric(const DataInfo& data_info, Int32 nb_dim,
// Cela n'est possible que pour l'écriture collective.
Int64 nb_interval = 1;
if (is_collective && m_max_write_size > 0) {
nb_interval = 1 + nb_write_byte / m_max_write_size;
nb_interval = 1 + nb_write_byte / (m_max_write_size * 1024);
}
info(4) << "WRITE global_size=" << nb_write_byte << " max_size=" << m_max_write_size << " nb_interval=" << nb_interval;

Expand Down
2 changes: 1 addition & 1 deletion arcane/tests/testHydro-1-vtkhdfv2-backward.arc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<arcane-post-processing>
<output-period>2</output-period>
<format name="VtkHdfV2PostProcessor" >
<max-write-size>15000</max-write-size>
<max-write-size>15</max-write-size>
</format>
<output>
<variable>CellMass</variable>
Expand Down
2 changes: 1 addition & 1 deletion arcane/tests/testHydro-1-vtkhdfv2.arc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<arcane-post-processing>
<output-period>5</output-period>
<format name="VtkHdfV2PostProcessor">
<max-write-size>15000</max-write-size>
<max-write-size>15</max-write-size>
</format>
<output>
<variable>CellMass</variable>
Expand Down

0 comments on commit ea7b84a

Please sign in to comment.