Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In 'VtkHdfV2PostProcessor', use kilo-byte as unit (instead of byte) for maximum write size #1649

Merged
merged 1 commit into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
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 @@
// 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);

Check warning on line 749 in arcane/src/arcane/std/VtkHdfV2PostProcessor.cc

View check run for this annotation

Codecov / codecov/patch

arcane/src/arcane/std/VtkHdfV2PostProcessor.cc#L749

Added line #L749 was not covered by tests
}
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
Loading