compute cluster Ncell cluster/atom 2.5
compute Nchunk Ncell chunk/atom c_cluster compress yes nchunk once ids once
I have small doubt whether c_Nchunk really was calculated only once. My data shows that it may be recalculated at every timestep, according to c_ cluster which is also recalculated at each timestep.
Have you ever encountered a similar problem? Welcome to leave a message.
There is too much context missing here to make an assessment of what you are observing.
If you believe that LAMMPS is not acting according to its documentation, please provide a minimal input deck that can be run quickly and serves no other purpose than to demonstrate the inconsistency that you are observing and explain how it manifests.
We can then take your test input and evaluate it further.
Thank you very much for your help. This is the result of my run. The abnormal chunkID for 4th atom appears in the last two runs. Leave it alone in time, but one thing is certain: ‘chunk/atom ids once’ is not calculated only once, but changes with the clusterID, as can be seen from the previous three chunkIDs.
By the way, this is why a minimal working example is very important and helpful.
Your log certainly shows the “wrong” output (my log from the develop branch code shows 1 1 2 3 for the chunk variables, every time). Your log also shows that you were using an older version of LAMMPS. Have you tried replicating this with the latest stable version? (For example, Atomify LAMMPS - a real time simulator in the browser gives the correct output.)
There is a run 0 command in my script (multiple times, in fact), so I am not sure what you are asking. All of the variables and computes in my example script have their values calculated because of and immediately at the end ofrun 0.
You can inspect the source code for yourself to understand how all this works. Or if you don’t know enough C++ to do so (and I certainly don’t know every single line of code) you can use the scientific method: hypothesize about how changing a line in the script will lead to a difference in the output, and then observe for yourself if you were right. Since the Atomify interface gives the documented result for its stated version (23 Jun 2022, update 1), you don’t even need to compile the code yet (although eventually you will have to).
I can verify that changing the number of processors changes the result of the compute and causes undocumented behavior. I will file a bug report on GitHub.