About the random seed #198
Replies: 4 comments
-
Dear @keithbennett, |
Beta Was this translation helpful? Give feedback.
-
Dear @keithbennett I find a possible place: ic_module.f90 I put a random subroutine inside this file and use it to generate the particle velocity distribution. Then the random number becomes independent on different HPC. The problem mentioned above is temporarily fixed, although it is not the best way. Could you tell which f90 file is used for the default initial random sampling? Cheers. |
Beta Was this translation helpful? Give feedback.
-
If you want to be able to produce a fixed set of random numbers, independent of number of cores, this is a non-trivial task. The obvious way to achieve this would be to use a per-cell random number generator, and seed that based on the global cell index. This would require modifying a lot of files. You'd have to essentially set-up an array of random state types, and pass that as an argument whenever you wanted to generate random numbers. That, in itself, although you'd want to be careful to check you'd modified all of the calls to Given the amount of changes required this isn't something we'd be able to support you doing, nor is it an option we're planning on adding to EPOCH. I don't understand why you want this functionality. You initially say "Sometimes the reviewer will ask to save the data analysis results with a higher cadence" but then request this functionality "without saving the restart file" which contradicts the initial motivation. I don't think simply adding a random subroutine to the ic_module will work. The random number generator in EPOCH is already deterministic and (by default) reproducible. |
Beta Was this translation helpful? Give feedback.
-
Dear @TomGoffrey Thank you for your detailed reply. Yes, you are right. Epoch provides a good restart function, and we should make full use of it. One question please, you mentioned above, "The random number generator in EPOCH is already deterministic and (by default) reproducible." --> Under what circumstances can the random number be fully reproduced? E.g., The total number of grids is the same, the values of nprocx, nprocy and nprocz are the same. Is there anything else? Thank you very much! |
Beta Was this translation helpful? Give feedback.
-
Dear developers,
Sometimes the reviewer will ask to save the data analysis results with a higher cadence. Can I specify the use of the same set of random numbers in Epoch for the initialization of particles under different HPC clusters and different CPU numbers (without saving the restart file)? Thank you!
If not, could you add an option in Makefile? Then we could choose to use the same random number or not :)
Best regards,
Zhongwei
Beta Was this translation helpful? Give feedback.
All reactions