Mgdraw routine generates same collision file on each new run with single cycle

Dear FLUKA experts
I have a slightly peculiar problem with the output of the mgdraw routine. My simulation is a beam of gamma rays incident on a thin tungsten foil target. I have the set the positron transport and production threshold to 1000 eV. I record the positrons that are terminated in the target on account of their KE reducing below the transport threhold. The recording is done through ENDRAW routine. The problem is that I get the exact same collision file for every time I do a run with SINGLE CYCLE. If I do multiple cycles in one run, I get different collision files for each cycle and thats alright. I am attaching the input file and mgdraw routine. Can some one please take a look?
slow_e_gamma1.inp (1.5 KB) slow_e_gamma1.flair (2.1 KB) mgdraw_pos_yield.f (3.4 KB)

Dear Saurabh,

It should come as no wonder that you get the same output if you run the same input with the same (default) random seeds: the random-number generator undergoes the same sequence. And this is by construction: if the initial seeds were random there would be no practical way of debugging in case of problems with the code. When the current cycle finishes, the state of the random-number generator is passed to the next cycle, which picks up from there (that’s why you see different outputs).


Note that you can get different results also with single cycle runs, provided that you change the random seed initialization by putting a different number in the second field of the dedicated RANDOMIZe card. That card must normally be included in your input, and allows you to run (not identical!) parallel jobs.

Dear Cesc and Francesco
thank you for the answer! Till now, I have never given much thought to RANDOMIZe card. thank you again for the answer.