How to use the maximum speed and memory available on your PC?

Dear @mohammed.fayiz,
optimization of your FLUKA code and the way how you run job will give you significantly higher performance boost that optimization of the FLUKA installation.
Modern virtualization technology allows to run FLUKA task from Ubuntu installed using Windows WLS virtually with the same performance as from pure Ubuntu installation. The main difference is that you PC will not run background Windows tasks at the same time, if you have direct Ubuntu installation. THe FLUKA installation routine described in the manual is quite optimal, so keeping all pre-required libraries updated is the main recommendation.
.
You have to know your required model accuracy and hardware configuration to optimize calculation performance and adjust your code accordantly.
Main suggestions to improve performance of calculations are following.

  1. Estimate required precision of the simulation according to your needs: optimal statistics that fulfil accuracy requirements, select scored regions area and resolution according to your real needs, select particle transport thresholds according to your physical model. It is efficient to “trap” particles in the black hole region, if it is not important to score them. Remember that MC estimator accuracy depends non-linearly on the number of primaries: sigma = 1/sqrt(primaries number).
  2. Minimize usage of parenthesis in your geometry definition.
  3. Use multithreaded job ran. Optimal is to set number of spawns (Runs card in Flair) as N-1, where N is the number of physical cores of your CPU. Here is one trick, that if cooling of your CPU is not sufficient, PC will decrees CPU frequency, so advantage will not be linear to the thread number.
  4. Select scoring volume according to the memory available in your PC (e.g. number of USRBIN scoring card and total number of bins, 1000 x 1000 x 1000 mash requires 8 Gb of memory to allocate). You will minimize your hard drive / ssd recall events, and increase performance. Fluka biasing technique https://indico.cern.ch/event/956531/contributions/4020245/attachments/2121550/3570935/14_Biasing_2020_online.pdf may help you to optimize scoring complexity.

If you have computation time limitation for a certain model/project, feel free to consult on its optimization! Note, that regardless listed recommendations, many tasks cannot be calculated using a conventional PC with the reasonable accuracy, so usage of the computer cluster is required.

Best regards,
Illia

1 Like