Dear FLUKA expert:
I hope this message finds you well. I would like to share two suggestions for performance optimization related to phase space file processing in FLUKA, which I believe could enhance the user experience.
Firstly, regarding the issue of memory usage efficiency. In the simulation, when we using a 3 GB phase space file and starting 5 parallel processing processes (spawn), it was observed that each process would independently load a complete copy of the phase space file in memory. This has led to an increase in memory consumption, totaling about 5×3 GB. Although there is still abundant for CPU resources, memory resources have become extremely tight as a result. Would it be possible for future optimizations to consider implementing a shared memory mechanism? This approach could allow multiple parallel processes to access the same phase space file without duplicating its presence in memory, thereby reducing total memory usage to that of a single file and effectively alleviating pressure on available resources.
Secondly, regarding the issue of time efficiency in calculating cycles. Observations have shown that after each calculation cycle, the program releases the currently loaded phase space file data. At the beginning of the next calculation cycle, it will re read the file. For large phase space files, this reading introduces significant time overhead. If the simulation involves a large number of cycles, the accumulated read time will be considerable. In light of this observation, might it be feasible in future optimizations to cache phase space file data in memory across multiple consecutive cycles? By retaining this data after initially reading it during the first cycle and only releasing it once all relevant calculations are completed, we could avoid unnecessary duplicate disk accesses and reduce wasted computing time.
Thank you very much for considering these suggestions; I sincerely hope they provide useful insights for future developments within FLUKA.