How to retrieve virial tensor when running on mutiple MPI ranks? #2135
Unanswered
Lynn3512138
asked this question in
Support
Replies: 1 comment
-
Access the global virial produced by each force directly with the Also, you should open and write to the file only on rank 0. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dear Community,
I've been trying to retireve the virial tensor from hoomd-blue because I'm running Brownian dynamics simulation where there is no velocity. When I ran on 1 cpu core and 1 gpu, I wrote a code that works fine as follows:
Then I add it to the operations.writers
However, when I try to run the simulation on mutiple cpus, since "cpu_local_snapshot" only returns data on a rank, the virial is wrong. Thus I changed the code to the following
And add it to the writers as follows:
And the same, it works fine using 1 core, but extremely slow when I use 2 cores. Even slower than when I use 1 core.
Therefore, I'd like to ask if anyone has a simple and fast way to output the virial tensor when the simulation is run on mutiple ranks? Thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions