improving the generation of random numbers in placet
DESCRIPTION
Improving the Generation of Random Numbers in PLACET. Comparision of RNG replacements. Martin Blaha University of Vienna AT CERN 31.07.2013. Random Number Generators. Current state. 37 functions to run RNGs ~3 functions per RNG redundancy danger of confusion. Random Number Generators. - PowerPoint PPT PresentationTRANSCRIPT
Improving the Generation of Random Numbers in PLACET
Comparision of RNG replacements
Martin BlahaUniversity of Vienna AT
CERN 31.07.2013
Random Number Generators
Current state
37 functions to run RNGs~3 functions per RNGredundancydanger of confusion
Random Number Generatorsrndmst5b rndm1 rndm5 rndm7 gasdev2 RANDOM_GAUSS
rndm5b rndmst2 rndmst5a rndmst8 rndmst RandomSelect
rndm5b_copy_data rndm2 rndm5a rndm8 rndm_save RndmSelect
rndmst0 rndmst3 rndmst6 expdev rndm_load gasdev8_select
rndm0 rndm3 rndm6 gasdev_0 RANDOM rndmst8_select
rndmst1 rndmst5 rndmst7 gasdev RANDOM8 rndm8_select
new implementation
one class for RNGsuse of gsl library - up to datemore functionalityprovidence of different RNGs as "streams"
Random Number Generators
New class
Functionalityset seeds and generatorsreset RNGsstorage of stateuniform/gaussian/discrete distributions
7 global “streams”Misalignments CavityRadiation GroundmotionInstrumentation SelectUser
Testing Random Numbers
Problem of comparision
→ numdiff tests not working
Kolmogorov Sminorv Test76% probability for same function
→ still good idea to compare distances
Performed Tests
1. Random Numbers from normal distribution
2. Emittance growth without correction
3. Emittance growth with simple correction
4. Beamtracking without correction
5. Beamtracking with correction
6. Radiation in beam delivery system
7. Groundmotion ATL law
8. Groundmotion Generator
1. Random Number Generators
Comparision between old and new Placet implementation of 100 and 10 000 sorted random numbers, weight by a gaussian distribution
Distance betwee the random number functions and close up for the first 3500 numbers(2 different tests)
Numbers are distributed between +/- 4 Distance for 1000 samples 0.04 <1% of the total range
1. Random Number Generators
2. Emittance growth - no correction
Comparision of emittance growth without correction Numbers are distributed between (0,7e6) Distance for 3500 samples 1.823e4 <1% of the total range
3. Emittance growth - simple correction
Comparision of emittance growth with correction Numbers are distributed between (0,13)Distance for 3500 samples 0.039 <1% of the total range
4. Beamtracking - no correction
Comparision of emittance without correction Numbers are distributed between (0,7e5)Distance for 3500 samples 1500,3 <1% of the total range
5. Beamtracking - simple correction
Comparision of emittance with correction Numbers are distributed between (0,3)Distance for 3500 samples 0.031 ~1% of the total range
6. Radiation in Beam delivery system
Radiation is single particle effect
→ difficult to compare→ needs many particles - 30 000
Tracking and Radiation
6. Radiation in Beam delivery system
Comparision of radiationAll distributions show distances below 1% of the total range
6. RadiationComparision of covariance matrices
Covariance matrix of new code
Covariance matrix of old code
6. RadiationComparision of covariance matrices
Squareroot of covariance matrix of new code
Squareroot of covariance matrix of old code
Frobenius norm:
7. Groundmotion ATL law
Beam trackingNumbers are distributed between (0.2,0.2002)Distance for 100 machines 2.49e-6 ~1% of the total range
5 timesteps, no filters, no bpm noise, no feedback
7. Groundmotion ATL law
Beam tracking in measure station 1Numbers are distributed between (2033.12,2033.14)Distance for 100 machines 0.001 ~5% of the total range
5 timesteps, no filters, no bpm noise, no feedback
8. Groundmotion Generator
Beam trackingNumbers are distributed between (0,2,0.205)Distance for 100 machines 7.4e-5 <1% of the total rangeDistance for 1000 machines 1.6e-5 <1% of total range
5 timesteps, no filters, no bpm noise, no feedback
8. Groundmotion Generator
Beam tracking in measure Station 1Numbers are distributed between (2033.65,2033.95)Distance for 100 machines 0.09174 ~30% of the total rangeDistance for 1000 machines 0.013082 ~3% of total range
5 timesteps, no filters, no bpm noise, no feedback
8. Groundmotion Generatorfunction behaviour
Beam Tracking in Measure Station 1 Conclusion: 1000 machines are not enough
Standarddeviation for 100 machinesStandarddeviation for 1000 machines
What has been done - Outlook# changed lines ~ 2500# removed lines ~ 900# headers and files ~ 30Testing: Results show similar behaviour
Conclusion:results are reproduceable
ready to make code parallel
new TCL implimentations allow more flexibility