Operations in MPI run #1873
WeikangXian
started this conversation in
General
Replies: 1 comment 1 reply
-
No. The ranks cooperate to write a single file. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi HOOMD community,
I have a general question regarding operations (like logging) in MPI run. From the tutorials with MPI, it writes:
All ranks must load the same input file, define the same operations with the same parameters and triggers~~~into smaller domains, one assigned to each rank, and executes the same operations on each domain.
I wonder if all operations (like logging) will be executed separately in each rank. If so, will different ranks write repeatedly to the same logging file, which may cause problem.
For example, I tried two MPI (with 2 ranks) simulations with setting (1) and (2). The first runs fine but the second, as expected, runs into deadlocks.
(1)
sim.operations.writers.append(gsd_writer)
sim.operations.writers.append(table_file)
sim.operations.writers.append(hdf5_writer)
(2)
if device.communicator.rank == 0:
sim.operations.writers.append(gsd_writer)
sim.operations.writers.append(table_file)
sim.operations.writers.append(hdf5_writer)
But in the first case, will different ranks write the same data to the logging file such that everything will be written twice?
Thank you.
Best,
Weikang
Beta Was this translation helpful? Give feedback.
All reactions