Skip to content
f-schmitt-zih edited this page Mar 26, 2014 · 2 revisions

You are here: Home > PIConGPU User Documentation > Plugins


This section introduces PIConGPUs plugin system and will show you how to setup a plugin for your simulation. There is also a comprehensive summary which lists all available plugins. It is recommended to read the Starting a Simulation section first.

  • Plugins provide an important part of PIConGPUs functionality, next to the core functions provided. However, most plugins are not mandatory to run a simulation and can be added or removed, depending on which features you want to use in your simulation run.

  • This tutorial will show you how to setup the PNG plugin which creates images of 2D slices of the simulation area.

  • The first step to use a plugin is making sure that PIConGPU compiles with the plugin enabled. Most plugins that ship with PIConGPU are enabled in the code by default, given that required includes and libraries (if any) are found during compile configuration. Plugin source code can be found under $PICSRC/src/picongpu/include/plugins/.

  • For this example, you will need pngwriter. Installation instructions can be found in INSTALL.md. When pngwriter is found during compile configuration, the plugin is enabled for compilation automatically in PluginController.hpp.

  • Which plugins are used at runtime can be configured in your simulation's .cfg file. Let us assume you installed your LaserWakefield simulation in $PIC_PARAM/lw/ as described here, the configuration file would be $PIC_PARAM/lw/submit/0001gpus.cfg.

  • Open the file and go to the Optional Variables section. Here you can modify or define new TBG variables for plugins. Directly below the existing TBG_pngYX, define a new variable: TBG_pngXZ="--png_e.period 64 --png_e.axis yz --png_e.slicePoint 0.5 --png_e.folder pngElectronsYZ".

  • Now, we need to tell PIConGPU to actually use our new variable. To do this, add it to the TBG_plugins variable in the same file like this:

TBG_plugins="!TBG_pngYX \
             !TBG_pngYZ \
             !TBG_binaryDensity \
             --elec_cnt.period 100"
  • The variable defines that you want to use the png plugin for electron densities (png_e) to create an image of the simulation area's yz axis, at slice point 0.5 (50%) in the directory pngElectronsYZ every 64timesteps.

  • When you start a new simulation run, PIConGPU will recognize this plugin setting and create png images in the simOutput directory of your lw_test_01 simulation run: $PIC_RUNS/lw_test_01/simOutput/pngElectronsYZ.

Continue with "Post-Processing and Visualization".

Clone this wiki locally