Parallelization

Submitted by rob1 on Thu, 02/18/2016 - 08:54

Good morning,

I am writing because I have a little doubt.

Can you guarantee that the results of a LIGGGHTS simulation are INDEPENDENT FROM THE NUMBER OF CORES used for its parallelization?
This should be at the basis of every code.

I have experienced a different particle insertion when changing number of cores, but after another discussion here I know how to overcome it. So, supposing that all the parameters (i.e. the script) is exactly the same, can you confirm that parallelization does not have any influence on the results?
As example, the attached graph reports a force (on a STL mesh) as function of time for exactly the same script, on 8 and 4 cores. How can you explain it?

Thank you very much for your support.
rob1

AttachmentSize
Image icon untitled.jpg18.62 KB
Plain text icon in.txt2.46 KB
ckloss's picture

ckloss | Mon, 02/22/2016 - 11:33

Hi Rob,

there have been lots of disccussion about this in the forum already - particle insertion in LIGGGHTS is not independant of the number of processes used. This is for efficiency reason. We thus decided to sacrifice the aforementioned property of exactly the same result if a fix insert/* command is used. However, STATISTICALLY the result is the same if everything is set up correctly.
If you want the exact same particle positions to start from, you have to read from a restart file or use read_data. Furthermore, demanding "exactly" the same results to me makes not too much sense for a particle code since there is lots of solution biforcation happening all the time which depends on round off errors. However, the results in LIGGGHTS are always reproducible (same input -> smae output) and the result (in statistical sense) is independant of # of procs used.

Best wishes
Christoph

rob1 | Mon, 02/22/2016 - 13:56

Thank you Christoph for your answer.
So what do you propose in order to compute the true value of a force exerted on a surface? Maybe should I run different times the same simulation and then doing an average of the obtained values?

Anyway I agree that the results must be reproducible. For this reason, I would be very grateful if you can have a look at my script, that I am attaching to the message above. Is there something that can be improved?

Thanks a lot again and have a nice day,
Roberto

ckloss's picture

ckloss | Mon, 04/25/2016 - 22:54

Hi Roberto,

the different simulations with different # of cores all represent valid ensembles! If needed, you can take an average, but typically this should not be necessary

Christoph