I read it in other topics that people are talking about using Flair to run multiple cycle at once. However, I failed to find a detailed guide on how to achieve this. Therefore, I would like to know if anyone could guide me through this process and I think it will also be beneficial to other new beginners like me.
…and proceed to enter the number of CPUs at your disposal, for the sake of argument 8. If you then click on the “+” symbol next to “myrun” you’ll see a list unfold with the 8 prepared input files that will run concurrently:
Flair takes care to set different random seeds for each of the 8 spawned cases.
Keeping the top level “myrun” selected as in the screenshot, you can click the “Start” button. You should see that, for each cycle, 8 concurrent runs are happily running in independent threads. The processing stage should take care to merge all 5 cycles (each with its respective 8 contributions).
Hopefully this (or a minor variation thereof) helps!
Not in a general sense, i.e. you can’t throw in two completely unrelated input files. However, if the different cases you need to consider imply changes on certain aspects (different beam, different geometry, different scoring, different biasing, etc.), you can exploit the FLUKA preprocessor instructions in your input file:
#define A
#ifdef A
(a first block of input cards)
#else
(a second block of input cards)
#endif
If you leave the #define card in (uncommented) then the first block of input cards will be active. If you comment it out (effectively NOT defining A) then the second block will be active. E.g. if you want to switch between a photon and an e- beam:
Note the checkbox with the label A. If you leave it checked, when issuing a run, Flair will leave A defined, and therefore the first block (photon beam) will hold.
Click on the “Clone” button (next to “Add”), call the other run “noA”, and leave the checkbox unselected. Flair then prepares an input file with “#define A” uncommented (effectively not defining A) and therefore the second block (electron beam) will hold.
Thus, if your input files differ only in certain sections, you can exploit this method to effectively handle two different input files in the same Flair project. You can include further #define’s to increase the number of cases.
By the way, for each of the runs you can use the same Spawn magic discussed above. Note however that if you run both cases, each spawning Ncpu cases (where Ncpu is the number of CPUs) you would have 2*Ncpu concurrent processes… So it would then make sense to either halve Ncpu or run one case after the other.
you can run more than one instance of Flair on your computer and in each instance, calculate on a different input file, possibly even on parallel threads. My experience shows that you can go to as many threads over all Flair-instances as you have physical cores on your computer. Using virtual cores does not bring a speed gain.