Skip to content

Configure an example

Thomas Kluge edited this page Apr 20, 2018 · 7 revisions

You are here: Home > PIConGPU User Documentation > Configure an example


This section shows you how to modify example configurations to fit your own simulation needs, i.e. to set the physical parameters to want to investigate in a run. In general, PIConGPU has two types of configuration files, compile-time configuration and run-time configuration. As the names imply, you need to re-compile your simulation once you change any compile-time configuration while run-time configuration changes only require to re-submit it to the batch system.

Run-time configuration

  • Once you copied a parameter set from an example or one of your previous parameter sets using e.g. $PICSRC/createParameterSet $PICSRC/share/picongpu/examples/LaserWakefield/ $PIC_PARAM/lw, run-time configuration files can be found in $PIC_PARAM/lw/submit.

  • Modify any of the existing .cfg files in $PIC_PARAM/lw/submit, e.g. 0008gpus.cfg to create a configuration for the desired number of GPUs to use.

  • cfg files consist of three sections, Required Variables, Optional Variables and Program Parameters. A detailed description of all used and possible variables for this file can be found in TBG_macros.cfg. Here, only some important variables are described. These variables are passed as command line parameters to PIConGPU (as described in TBG_macros.cfg).

  • TBG_gpu_x/y/z set the number of GPUs in each dimension.

  • TBG_gridSize sets the dimensions of the simulation grid.

  • TBG_steps sets the number of timesteps/iterations to simulate.

  • Besides required variables, any number of existing or user-specified optional variables can be used to pass additional parameters. For example, you should create a new variable for each plugin to want to use which declares all command line parameters for that plugin. This variable then needs to be added to TBG_plugins which tells TBG to add it to the PIConGPU command line.

  • For example, to use the HDF5/libSplash plugin, declare the following variable and add it to TBG_plugins: TBG_hdf5="--hdf5.period 100 --hdf5.file simData". It tells the plugin to dump simulation data every 100 steps to a file prefixed "simData".

  • See section Plugins for more information on how to use plugins.

Compile-time configuration

Continue with "Particle Attributes".