CORSIKA on Stoomboot

Run CORSIKA simulations on Stoomboot

In order to quickly get a good sample of simulated showers we use the Nikhef computer cluster Stoomboot to run multiple jobs simultaneously. For this purpose a script has been written that will make this easy. The qsub_corsika script can submit as many jobs as you want with the parameters that you desire. It automatically ensures that a unique combination of seeds for the random number sequences are used for each simulation.

To run this file correctly do it in the correct env:

$ source activate corsika

The syntax for calling the script can be seen by calling its help:

$ qsub_corsika --help

For example, running 100 showers with proton primaries of 1e16 eV coming in at 22.5 degrees zenith and 90 degrees azimuth on the standard Stoomboot queue with the default CORSIKA configuration:

$ qsub_corsika 100 16 proton 22.5 -q generic -a 90
class sapphire.corsika.qsub_corsika.CorsikaBatch(energy=16, particle='proton', zenith=22.5, azimuth=180, queue='generic', corsika='corsika74000Linux_QGSII_gheisha')

Run many simultaneous CORSIKA simulations using Stoomboot

Stoomboot is the Nikhef computer cluster.

  • energy – the energy of the primary particle in log10(E[eV]), so an energy of 16 (10**16 eV) corresponds to 10**7 GeV, integer values and values ending in .5 are allowed.
  • particle – name of primary particle, e.g. proton, gamma or iron
  • zenith – zenith angle of the primary particle (in degrees), common choices: 0, 7.5, 15, 22.5, 30, 37.5, 45 and 52.5.
  • azimuth – azimuth angle of the primary particle (in degrees), common choices: 0, 45, 90, 135, 180, 225, 270 and 315.
  • queue – choose a queue to sumbit the job to: express - max 10 minutes, max 2 jobs short - max 4 hours, max 1000 jobs generic - max 24 hours, max 500 jobs long - max 96 hours (default 48 hours), max 500 jobs
  • corsika – name of the compiled CORSIKA executable to use: corsika74000Linux_EPOS_gheisha corsika74000Linux_QGSII_gheisha corsika74000Linux_QGSJET_gheisha corsika74000Linux_SIBYLL_gheisha

Convert energy to format for CORSIKA input

Convert from log10(E/eV) to E[GeV] and split value to multiplier and power.

Parameters:energy – primary particle energy as log10(E/eV).
Returns:separate multiplier and power

Setup CORSIKA environment


Submit job to Stoomboot


Get list of seeds already used


Get unused combination of two seeds for CORSIKA

Parameters:taken – List of seed combinations already taken each is formatted like this: ‘seed1_seed2’

Make the run directory


Move into the run directory


Get run directory path


Make CORSIKA steering file


Make Stoomboot script file


Copy the CORSIKA config file to the output directory

This way we can always check how CORSIKA was configured for each run.

sapphire.corsika.qsub_corsika.multiple_jobs(n, energy, particle, zenith, azimuth, queue, corsika, progress=True)

Use this to sumbit multiple jobs to Stoomboot

  • n – Number of jobs to submit
  • energy – log10(E[eV]) energy of primary particle
  • particle – Particle kind (as string, see particles for possibilities)
  • zenith – Zenith angle in degrees of the primary particle
  • azimuth – Azimuth angle in degrees of the primary particle
  • queue – Stoomboot queue to submit to
  • corsika – Name of the CORSIKA executable to use
  • progress – if True print an overview of the chosen paramters and show a progressbar of the job submission progress.