XGC Preprocessor Macros

Here is a list of preprocessor macros in XGC.

ACTIVE_TE_SEP_CONTROL
Interactive control of heating and cooling power with and input file (XGCa only)
Default: OFF
ALIGN_SIMD
Option to align variables to the SIMD. Useful for wide-vector optimizations.
Default: OFF
BICUB_SPLIT_LOOPS
???
Default: OFF
CCE_DEBUG
Debug flag for core edge coupling
Default: OFF
CCE_FCOUPLING
Flag for coupling of distribution function in buffer
Default: OFF
CHARGEE_SCATTER_UNIT_READ
Current method for unit testing scatter
Default: OFF
CHARGEI_SCATTER_UNIT_READ
Current method for unit testing scatter
Default: OFF
CHARGE_SCATTER_USE_ATOMIC
Option for using OMP atomics instead of array replication
Default: OFF
COL_CONSERV_TEST
Runs collision operator test (conservation of Maxwellian distribution function)
Default: OFF
COL_F_NAN_CHECK
Activates checks for NaNs in the input distribution function of the collision operator
Default: OFF
COL_F_POSITIVITY_OPT
Activates an optimization that removes negative values of the distribution function after the collision operation by conserving relaxation to a Maxwellian. This works only if the velocity grid sizes (f0_nmu+1) and (2*f0_nvp+1) are not prime numbers!
Default: OFF
COL_NO_EDGE_CONSERV
???
Default: OFF
COL_RELAX_FLOW
Runs collision operator test (Parallel flow relaxation)
Default: OFF
COL_RELAX_TEST
Runs collision operator test (Relaxation of anisotropic temperature Maxwellian)
Default: OFF
CONVERT_GRID2
Advanced grid infrastructure (flux-surface average, straight field-line poloidal angle, Fourier filter, etc.)
Default: OFF
CYLINDRICAL
Use cylindrical geometry. B-field calculation (both poloidal and toroidal B-field) ignores R variation. Also volume elements ignores R variation.
Default: OFF
DELTAF_CONV
Use this flag for classical delta-f simulation excluding the neoclassical terms in the gyrokinetic equation
Default: OFF
DIAG_F0_REAL4
Write out f0 in real4 to reduce data size
Default: OFF
DIAG_NOISE
Computes noise diagnostics in velocity space
Default: OFF
DIFFUSION_TEST
???
Default: OFF
EFIELD2
Alternative calculation of the parallel electric field (XGC1 only)
Default: OFF
EM_B_PARA_EFF
Temporary flag to prevent the use of sml_em_b_para_eff until its implementation has been confirmed as correct.
Default: OFF
EXPLICIT_EM
Build the explicit fully-kinetic electromagnetic version of XGC
Default: OFF
EXPLICIT_EM_LINEAR
For linear electromagnetic delta-f simulation. Requires RHO_PARA_DERIVS and RHO_PARA_DERIVS_CPU.
Default: OFF
EXPLICIT_EM_NONLIN_TERMS
Turn on Ah^2 nonlinear term in Hamiltonian for EM. EXPLICIT_EM should be on.
Default: ON
EXTENDED_SHEATH_LOGIC
Some stuff I used to play with the logical sheath boundary condition
Default: OFF
EXTRA_DWDT
(probably related to DELTAF_CONV)
Default: OFF
F0_NODE_TEMP
(Use temperature on vertex for particle-mesh velocity space interpolation)
Default: ON
F0_TOR_LINEAR
If defined, linear toroidal interpolation (with some caveats) is used for interpolation between 5D grid and particles instead of nearest neighbor interpolation (if unsure, ask R. Hager or S. Ku for more information)
Default: OFF
F0_UPDATE_ANALYTIC_OLD
Uses old version of f0_update_analytic_f0
Default: ON
F_USE_MARKER_DEN
Using marker density to get density instead of sum(w)/V. It uses marker density g
Default: OFF
F_USE_MARKER_DEN2
variation version – Both F_USE_MARKER_DEN and F_USE_MARKER_DEN2 requires tests for noise reduction and verification.
Default: OFF
GAM_TEST
In load.F90 - load particles to test GAMs?
Default: OFF
GENE_SIDE
???
Default: OFF
GEOM_SORT
Alternative sorting algorithm in sort_particles.F90. Not sure which is better when
Default: OFF
GYRO_AVG_RADIAL
???
Default: OFF
HEAT_TORQUE_MAXWELL
Compute delta-f from heating/torque based on Maxwellian - this code has some bug, but it could be useful for small size particle simulation.
Default: OFF
HEAT_TORQUE_POLYNOMIAL
Compute delta-f from heating/torque with polynomial scaling of f instead of shifting phase space density with linear interpolation
Default: OFF
IDEN_DEBUG
???
Default: OFF
ITER_GRID
Use more space for flux average matrix – needs update. Use two stage method. 1st stage - get matrix off-diagonal size, 2nd stage - calculate actual matrix elements. Ultimately, matrix data structure needs to be imporved to reduce memory usage. (This is applies only if CONVERT_GRID2 is not defined)
Default: ON
MAX_DDEN
Used in poisson.F90, impose a max on something?
Default: OFF
MESH_BATCH_SIZE
Number of mesh points to be computed simultaneously in collision routine
Default: 14
MULTISPECIES_INPUT
Use namelist parameter format that allows multiple ion species
Default: OFF
NAN_CHECK_PUSHE_VEC
Does a NaN check after search and sort in the pushe kernel
Default: OFF
NEOCLASSICAL_TEST
Activates some of the optimizations for axisymmetric plasma used in XGCa. For verification of neoclassical physics in XGC1.
Default: OFF
NEWGYROMATRIX
Flag to compile with adaptive gyroaveraging matrices. (Use a thermal grid instead of a fixed grid and projects weight when preserving mu)
Default: OFF
NEW_FLX_AIF
Use new format of flx.aif file (required for CONVERT_GRID2 with RPI meshes generated after ~12/2018)
Default: OFF
NO_FLUSH
In the past, there have been compilers that did not support the flush command in fortran. However, flush is very important on some systems, e.g. Summit, to be able to monitor job progress by examining standard out. This was a compromise to support both types of systems.
Default: OFF
NO_PETSC
Bypasses PETSc related code for the stand-alone push kernel
Default: OFF
NO_SEARCH_TR_CHECK
DON’T check the current triangle before doing particle search
Default: OFF
PILL_SUB_ELLIP
Sizable piece of code in collisionsf2.F90, unclear what it does or who wrote it
Default: OFF
PLANE_MAJOR
The 1D process ordering is mapped to the 2D virtual process grid used to define the parallel decompostion so that either consecutive processes are in different planes (INTERPLANE_MAJOR), the default, or in the same plane (PLANE_MAJOR). Which is most efficient has been system-specific (and perhaps problem case specific).
Default: OFF
POL_MODE
In load.F90 - subset of GAM_TEST
Default: OFF
PTB_3DB_RZ_GRID
Use (R,Z) grid for interpolation of the perturbed magnetic field instead of linear interpolation on the triangular mesh)
Default: OFF
PURE_RK2
Do pure RK2 timestep
Default: OFF
PURE_RK4
Do pure RK4 timestep rather than hybrid. Needed for GENE coupling
Default: OFF
PUSHE_KERNEL
Compile stand-alone pushe kernel
Default: OFF
PUSHE_UNIT_READ
Current method for unit testing push
Default: OFF
RHO_PARA_DERIVS
Use old phase derivatives using rho_|| in GPU
Default: OFF
RHO_PARA_DERIVS_CPU
Use old phase derivatives using rho_|| in CPU
Default: OFF
SDEV_DEADLOCK_HACK
???
Default: OFF
SIMD_SIZE
Cabana version: Specify length of vectorizable loop. Should be 1 for GPU case, 32(?) for KNL, etc
Default:
SOLVERLU
Use LU decomposition for matrix solver in collision routine
Default: ON
SOLVER_TEST
Run test of Poisson solver, then exit
Default: OFF
TITAN
titan does not support atomic — disable omp threads
Default: OFF
TRIANGLE_GYRO_AVG
???
Default: OFF
UNIT_TEST
Run a unit test
Default: OFF
USE_BICUB_MOD
Use Ed’s inhouse cubic interpolation instead of pspline. pspline is required for initial setup. The code is much faster with this flag.
Default: ON
USE_CPP_COLLISIONS
Use the kokkos collision module instead of the fortran openacc module
Default: OFF
USE_EXPLICIT
Looks to be very niche, just used in interpolation.F90, looks deletable
Default: OFF
USE_INQUIRE_DIRECTORY
Required for determining where to put timing data. Intel fortran compiler requires this to be defined. All other compilers (?) require that this not be defined.
Default: OFF
USE_OLD_READ_INPUT
For performance efficiency, the default is for one process to read the input file as a string, broadcast this, then each process reads the namelist input from this string. This requires a 2003 Fortran compliant compiler. If USE_OLD_READ_INPUT is defined, then every process reads the input file for every namelist (so multiple times).
Default: OFF
USE_ONE_D_I_CUB_MOD
Flag to use in-house code for interpolation of I(psi) and bypasses a pspline interpolation call. Performance unknown.
Default: ON
VALIDATION
Re-initialize seed for randomization in XGCa setup
Default: OFF
VEC_LEN
Cabana hard-coded value. In the AoSoA, VEC_LEN is the number of particles per structure
Default:
V_PERP
Using V_PERP for f0 grid. If not defined, sqrt(mu) is used. The essential difference is normalized constant of v_perp grid. With V_PERP, grid spacing in v_perp grid is equally spaced in velocity space in certain flux surface. Without V_PERP, grid spacing in v_perp grid is equally spaced in sqrt(mu) or v_perp/sqrt(B) in certain flux surface.
Default: ON
WRITE_DPOT_N0_ES
Write dpot_n0 and dpot_es to xgc.3d.xxxxx.bp
Default: OFF
XGC1
Compile XGC1
Default: OFF
XGCA
Compile XGCa
Default: OFF
XGC_COUPLING_CORE_EDGE
compile with core-edge coupling communicaitons
Default: OFF
XGC_DEBUG1
Output matrix during setup_grid
Default: OFF
XGC_FLAT_B
Use axis B field in poisson solver. Poisson eq has 1/B^2 factor in front of grad operator.
Default: OFF
XGC_F_COUPLING
???
Default: OFF