  A new parallel equilibrium reconstruction code for tokamak plasmas is
presented. GPEC allows to compute equilibrium flux distributions sufficiently
accurate to derive parameters for plasma control within 1 ms of runtime which
enables real-time applications at the ASDEX Upgrade experiment (AUG) and other
machines with a control cycle of at least this size. The underlying algorithms
are based on the well-established offline-analysis code CLISTE, following the
classical concept of iteratively solving the Grad-Shafranov equation and
feeding in diagnostic signals from the experiment. The new code adopts a hybrid
parallelization scheme for computing the equilibrium flux distribution and
extends the fast, shared-memory-parallel Poisson solver which we have described
previously by a distributed computation of the individual Poisson problems
corresponding to different basis functions. The code is based entirely on
open-source software components and runs on standard server hardware and
software environments. The real-time capability of GPEC is demonstrated by
performing an offline-computation of a sequence of 1000 flux distributions
which are taken from one second of operation of a typical AUG discharge and
deriving the relevant control parameters with a time resolution of a
millisecond. On current server hardware the new code allows employing a grid
size of 32x64 zones for the spatial discretization and up to 15 basis
functions. It takes into account about 90 diagnostic signals while using up to
4 equilibrium iterations and computing more than 20 plasma-control parameters,
including the computationally expensive safety-factor q on at least 4 different
levels of the normalized flux.
