1 .. NOTE: Below is a useful bash one-liner to verify whether there are variables in this file
2 .. no longer present in the code.
3 .. ( export INPUT_FILE='docs/user-guide/environment-variables.rst' GIT_PAGER="cat "; for s in $(grep '^`' $INPUT_FILE | sed 's/`//g' | sed 's/,/ /g'); do count=$(git grep $s | grep -v $INPUT_FILE | wc -l); [ $count -eq 0 ] && printf "%-30s%s\n" $s $count; done ; )
4 .. Another useful one-liner to find undocumentedvariables:
5 .. ( export INPUT_FILE=docs/user-guide/environment-variables.rst; GIT_PAGER="cat "; for ss in `for s in $(git grep getenv | sed 's/.*getenv("\(.*\)".*/\1/' | sort -u | grep '^[A-Z]'); do [ $(grep $s $INPUT_FILE -c) -eq 0 ] && echo $s; done `; do git grep $ss ; done )
7 .. TODO: still undocumented GMX_QM_GAUSSIAN_NCPUS
12 |Gromacs| programs may be influenced by the use of
13 environment variables. First of all, the variables set in
14 the ``GMXRC`` file are essential for running and
15 compiling |Gromacs|. Some other useful environment variables are
16 listed in the following sections. Most environment variables function
17 by being set in your shell to any non-NULL value. Specific
18 requirements are described below if other values need to be set. You
19 should consult the documentation for your shell for instructions on
20 how to set environment variables in the current shell, or in configuration
21 files for future shells. Note that requirements for exporting
22 environment variables to jobs run under batch control systems vary and
23 you should consult your local documentation for details.
28 Print constraint virial and force virial energy terms.
31 Neighbour list dump level; default 0.
34 |Gromacs| automatically backs up old
35 copies of files when trying to write a new file of the same
36 name, and this variable controls the maximum number of
37 backups that will be made, default 99. If set to 0 it fails to
38 run if any output file already exists. And if set to -1 it
39 overwrites any output file without making a backup.
42 if this is explicitly set, no cool quotes
43 will be printed at the end of a program.
46 prevent dumping of step files during
47 (for example) blowing up during failure of constraint
51 dump all configurations to a :ref:`pdb`
52 file that have an interaction energy less than the value set
53 in this environment variable.
56 ``GMX_VIEW_XVG``, ``GMX_VIEW_EPS`` and ``GMX_VIEW_PDB``, commands used to
57 automatically view :ref:`xvg`, :ref:`xpm`, :ref:`eps`
58 and :ref:`pdb` file types, respectively; they default to ``xv``, ``xmgrace``,
59 ``ghostview`` and ``rasmol``. Set to empty to disable
60 automatic viewing of a particular file type. The command will
61 be forked off and run in the background at the same priority
62 as the |Gromacs| tool (which might not be what you want).
63 Be careful not to use a command which blocks the terminal
64 (e.g. ``vi``), since multiple instances might be run.
67 the size of the buffer for file I/O. When set
68 to 0, all file I/O will be unbuffered and therefore very slow.
69 This can be handy for debugging purposes, because it ensures
70 that all files are always totally up-to-date.
73 set display color for logo in :ref:`gmx view`.
75 ``GMX_PRINT_LONGFORMAT``
76 use long float format when printing
80 Applies for computational electrophysiology setups
81 only (see reference manual). The initial structure gets dumped to
82 :ref:`pdb` file, which allows to check whether multimeric channels have
83 the correct PBC representation.
85 ``GMX_TRAJECTORY_IO_VERBOSITY``
86 Defaults to 1, which prints frame count e.g. when reading trajectory
87 files. Set to 0 for quiet operation.
89 ``GMX_ENABLE_GPU_TIMING``
90 Enables GPU timings in the log file for CUDA. Note that CUDA timings
91 are incorrect with multiple streams, as happens with domain
92 decomposition or with both non-bondeds and PME on the GPU (this is
93 also the main reason why they are not turned on by default).
95 ``GMX_DISABLE_GPU_TIMING``
96 Disables GPU timings in the log file for OpenCL.
100 ``GMX_PRINT_DEBUG_LINES``
101 when set, print debugging info on line numbers.
104 number of steps that elapse between dumping
105 the current DD to a PDB file (default 0). This only takes effect
106 during domain decomposition, so it should typically be
107 0 (never), 1 (every DD phase) or a multiple of :mdp:`nstlist`.
109 ``GMX_DD_NST_DUMP_GRID``
110 number of steps that elapse between dumping
111 the current DD grid to a PDB file (default 0). This only takes effect
112 during domain decomposition, so it should typically be
113 0 (never), 1 (every DD phase) or a multiple of :mdp:`nstlist`.
116 general debugging trigger for every domain
117 decomposition (default 0, meaning off). Currently only checks
118 global-local atom index mapping for consistency.
121 over-ride the number of DD pulses used
122 (default 0, meaning no over-ride). Normally 1 or 2.
124 ``GMX_DISABLE_ALTERNATING_GPU_WAIT``
125 disables the specialized polling wait path used to wait for the PME and nonbonded
126 GPU tasks completion to overlap to do the reduction of the resulting forces that
127 arrive first. Setting this variable switches to the generic path with fixed waiting
130 There are a number of extra environment variables like these
131 that are used in debugging - check the code!
133 Performance and Run Control
134 ---------------------------
135 ``GMX_DO_GALACTIC_DYNAMICS``
136 planetary simulations are made possible (just for fun) by setting
137 this environment variable, which allows setting :mdp:`epsilon-r` to -1 in the :ref:`mdp`
138 file. Normally, :mdp:`epsilon-r` must be greater than zero to prevent a fatal error.
139 See webpage_ for example input files for a planetary simulation.
141 ``GMX_BONDED_NTHREAD_UNIFORM``
142 Value of the number of threads per rank from which to switch from uniform
143 to localized bonded interaction distribution; optimal value dependent on
144 system and hardware, default value is 4.
146 ``GMX_CUDA_NB_EWALD_TWINCUT``
147 force the use of twin-range cutoff kernel even if :mdp:`rvdw` equals
148 :mdp:`rcoulomb` after PP-PME load balancing. The switch to twin-range kernels is automated,
149 so this variable should be used only for benchmarking.
151 ``GMX_CUDA_NB_ANA_EWALD``
152 force the use of analytical Ewald kernels. Should be used only for benchmarking.
154 ``GMX_CUDA_NB_TAB_EWALD``
155 force the use of tabulated Ewald kernels. Should be used only for benchmarking.
157 ``GMX_DISABLE_CUDA_TIMING``
158 Deprecated. Use ``GMX_DISABLE_GPU_TIMING`` instead.
161 times all code during runs. Incompatible with threads.
163 ``GMX_CYCLE_BARRIER``
164 calls MPI_Barrier before each cycle start/stop call.
167 build domain decomposition cells in the order
168 (z, y, x) rather than the default (x, y, z).
170 ``GMX_DD_USE_SENDRECV2``
171 during constraint and vsite communication, use a pair
172 of ``MPI_Sendrecv`` calls instead of two simultaneous non-blocking calls
173 (default 0, meaning off). Might be faster on some MPI implementations.
175 ``GMX_DLB_BASED_ON_FLOPS``
176 do domain-decomposition dynamic load balancing based on flop count rather than
177 measured time elapsed (default 0, meaning off).
178 This makes the load balancing reproducible, which can be useful for debugging purposes.
179 A value of 1 uses the flops; a value > 1 adds (value - 1)*5% of noise to the flops to increase the imbalance and the scaling.
181 ``GMX_DLB_MAX_BOX_SCALING``
182 maximum percentage box scaling permitted per domain-decomposition
183 load-balancing step (default 10)
185 ``GMX_DD_RECORD_LOAD``
186 record DD load statistics for reporting at end of the run (default 1, meaning on)
188 ``GMX_DETAILED_PERF_STATS``
189 when set, print slightly more detailed performance information
190 to the :ref:`log` file. The resulting output is the way performance summary is reported in versions
191 4.5.x and thus may be useful for anyone using scripts to parse :ref:`log` files or standard output.
193 ``GMX_DISABLE_SIMD_KERNELS``
194 disables architecture-specific SIMD-optimized (SSE2, SSE4.1, AVX, etc.)
195 non-bonded kernels thus forcing the use of plain C kernels.
197 ``GMX_DISABLE_GPU_TIMING``
198 timing of asynchronously executed GPU operations can have a
199 non-negligible overhead with short step times. Disabling timing can improve performance in these cases.
201 ``GMX_DISABLE_GPU_DETECTION``
202 when set, disables GPU detection even if :ref:`gmx mdrun` was compiled
205 ``GMX_GPU_APPLICATION_CLOCKS``
206 setting this variable to a value of "0", "ON", or "DISABLE" (case insensitive)
207 allows disabling the CUDA GPU allication clock support.
209 ``GMX_DISRE_ENSEMBLE_SIZE``
210 the number of systems for distance restraint ensemble
211 averaging. Takes an integer value.
214 emulate GPU runs by using algorithmically equivalent CPU reference code instead of
215 GPU-accelerated functions. As the CPU code is slow, it is intended to be used only for debugging purposes.
218 disable exiting upon encountering a corrupted frame in an :ref:`edr`
219 file, allowing the use of all frames up until the corruption.
222 update forces when invoking ``mdrun -rerun``.
225 set in the same way as ``mdrun -gpu_id``, ``GMX_GPU_ID``
226 allows the user to specify different GPU IDs for different ranks, which can be useful for selecting different
227 devices on different compute nodes in a cluster. Cannot be used in conjunction with ``mdrun -gpu_id``.
230 set in the same way as ``mdrun -gputasks``, ``GMX_GPUTASKS`` allows the mapping
231 of GPU tasks to GPU device IDs to be different on different ranks, if e.g. the MPI
232 runtime permits this variable to be different for different ranks. Cannot be used
233 in conjunction with ``mdrun -gputasks``. Has all the same requirements as ``mdrun -gputasks``.
235 ``GMX_IGNORE_FSYNC_FAILURE_ENV``
236 allow :ref:`gmx mdrun` to continue even if
240 when set to a floating-point value, overrides the default tolerance of
241 1e-5 for force-field floating-point parameters.
243 ``GMX_MAXCONSTRWARN``
244 if set to -1, :ref:`gmx mdrun` will
245 not exit if it produces too many LINCS warnings.
248 use the generic C kernel. Should be set if using
249 the group-based cutoff scheme and also sets ``GMX_NO_SOLV_OPT`` to be true,
250 thus disabling solvent optimizations as well.
253 neighbor list balancing parameter used when running on GPU. Sets the
254 target minimum number pair-lists in order to improve multi-processor load-balance for better
255 performance with small simulation systems. Must be set to a non-negative integer,
256 the 0 value disables list splitting.
257 The default value is optimized for supported GPUs
258 therefore changing it is not necessary for normal usage, but it can be useful on future architectures.
261 use neighbor list and kernels based on charge groups.
264 when set, print detailed neighbor search cycle counting.
266 ``GMX_NBNXN_EWALD_ANALYTICAL``
267 force the use of analytical Ewald non-bonded kernels,
268 mutually exclusive of ``GMX_NBNXN_EWALD_TABLE``.
270 ``GMX_NBNXN_EWALD_TABLE``
271 force the use of tabulated Ewald non-bonded kernels,
272 mutually exclusive of ``GMX_NBNXN_EWALD_ANALYTICAL``.
274 ``GMX_NBNXN_SIMD_2XNN``
275 force the use of 2x(N+N) SIMD CPU non-bonded kernels,
276 mutually exclusive of ``GMX_NBNXN_SIMD_4XN``.
278 ``GMX_NBNXN_SIMD_4XN``
279 force the use of 4xN SIMD CPU non-bonded kernels,
280 mutually exclusive of ``GMX_NBNXN_SIMD_2XNN``.
282 ``GMX_NOOPTIMIZEDKERNELS``
283 deprecated, use ``GMX_DISABLE_SIMD_KERNELS`` instead.
286 disables optimized all-vs-all kernels.
288 ``GMX_NO_CART_REORDER``
289 used in initializing domain decomposition communicators. Rank reordering
290 is default, but can be switched off with this environment variable.
292 ``GMX_NO_LJ_COMB_RULE``
293 force the use of LJ paremeter lookup instead of using combination rules
294 in the non-bonded kernels.
296 ``GMX_NO_INT``, ``GMX_NO_TERM``, ``GMX_NO_USR1``
297 disable signal handlers for SIGINT,
298 SIGTERM, and SIGUSR1, respectively.
301 do not use separate inter- and intra-node communicators.
304 skip non-bonded calculations; can be used to estimate the possible
305 performance gain from adding a GPU accelerator to the current hardware setup -- assuming that this is
306 fast enough to complete the non-bonded calculations while the CPU does bonded force and PME computation.
307 Freezing the particles will be required to stop the system blowing up.
309 ``GMX_PULL_PARTICIPATE_ALL``
310 disable the default heuristic for when to use a separate pull MPI communicator (at >=32 ranks).
313 shell positions are not predicted.
316 turns off solvent optimizations; automatic if ``GMX_NB_GENERIC``
319 ``GMX_NO_UPDATEGROUPS``
320 turns off update groups. May allow for a decomposition of more
321 domains for small systems at the cost of communication during update.
324 the ideal number of charge groups per neighbor searching grid cell is hard-coded
325 to a value of 10. Setting this environment variable to any other integer value overrides this hard-coded
328 ``GMX_PME_NUM_THREADS``
329 set the number of OpenMP or PME threads; overrides the default set by
330 :ref:`gmx mdrun`; can be used instead of the `-npme` command line option,
331 also useful to set heterogeneous per-process/-node thread count.
334 use P3M-optimized influence function instead of smooth PME B-spline interpolation.
336 ``GMX_PME_THREAD_DIVISION``
337 PME thread division in the format "x y z" for all three dimensions. The
338 sum of the threads in each dimension must equal the total number of PME threads (set in
342 if the number of domain decomposition cells is set to 1 for both x and y,
343 decompose PME in one dimension.
345 ``GMX_REQUIRE_SHELL_INIT``
346 require that shell positions are initiated.
348 ``GMX_REQUIRE_TABLES``
349 require the use of tabulated Coulombic
350 and van der Waals interactions.
353 the minimum value for soft-core sigma. **Note** that this value is set
354 using the :mdp:`sc-sigma` keyword in the :ref:`mdp` file, but this environment variable can be used
355 to reproduce pre-4.5 behavior with respect to this parameter.
358 should contain multiple masses used for test particle insertion into a cavity.
359 The center of mass of the last atoms is used for insertion into the cavity.
362 use graph for bonded interactions.
364 ``GMX_VERLET_BUFFER_RES``
365 resolution of buffer size in Verlet cutoff scheme. The default value is
366 0.001, but can be overridden with this environment variable.
369 Not strictly a |Gromacs| environment variable, but on large machines
370 the hwloc detection can take a few seconds if you have lots of MPI processes.
371 If you run the hwloc command `lstopo out.xml` and set this environment
372 variable to point to the location of this file, the hwloc library will use
373 the cached information instead, which can be faster.
376 the ``mpirun`` command used by :ref:`gmx tune_pme`.
379 the :ref:`gmx mdrun` command used by :ref:`gmx tune_pme`.
381 ``GMX_DISABLE_DYNAMICPRUNING``
382 disables dynamic pair-list pruning. Note that :ref:`gmx mdrun` will
383 still tune nstlist to the optimal value picked assuming dynamic pruning. Thus
384 for good performance the -nstlist option should be used.
386 ``GMX_NSTLIST_DYNAMICPRUNING``
387 overrides the dynamic pair-list pruning interval chosen heuristically
388 by mdrun. Values should be between the pruning frequency value
389 (1 for CPU and 2 for GPU) and :mdp:`nstlist` ``- 1``.
391 ``GMX_USE_TREEREDUCE``
392 use tree reduction for nbnxn force reduction. Potentially faster for large number of
393 OpenMP threads (if memory locality is important).
395 .. _opencl-management:
399 Currently, several environment variables exist that help customize some aspects
400 of the OpenCL_ version of |Gromacs|. They are mostly related to the runtime
401 compilation of OpenCL kernels, but they are also used in device selection.
403 ``GMX_OCL_NOGENCACHE``
404 If set, disable caching for OpenCL kernel builds. Caching is
405 normally useful so that future runs can re-use the compiled
406 kernels from previous runs. Currently, caching is always
407 disabled, until we solve concurrency issues.
410 Enable OpenCL binary caching. Only intended to be used for
411 development and (expert) testing as neither concurrency
412 nor cache invalidation is implemented safely!
414 ``GMX_OCL_NOFASTGEN``
415 If set, generate and compile all algorithm flavors, otherwise
416 only the flavor required for the simulation is generated and
419 ``GMX_OCL_DISABLE_FASTMATH``
420 Prevents the use of ``-cl-fast-relaxed-math`` compiler option.
423 If defined, the OpenCL build log is always written to the
424 mdrun log file. Otherwise, the build log is written to the
425 log file only when an error occurs.
428 If defined, it enables verbose mode for OpenCL kernel build.
429 Currently available only for NVIDIA GPUs. See ``GMX_OCL_DUMP_LOG``
430 for details about how to obtain the OpenCL build log.
432 ``GMX_OCL_DUMP_INTERM_FILES``
434 If defined, intermediate language code corresponding to the
435 OpenCL build process is saved to file. Caching has to be
436 turned off in order for this option to take effect (see
437 ``GMX_OCL_NOGENCACHE``).
439 - NVIDIA GPUs: PTX code is saved in the current directory
440 with the name ``device_name.ptx``
441 - AMD GPUs: ``.IL/.ISA`` files will be created for each OpenCL
442 kernel built. For details about where these files are
443 created check AMD documentation for ``-save-temps`` compiler
447 Use in conjunction with ``OCL_FORCE_CPU`` or with an AMD device.
448 It adds the debug flag to the compiler options (-g).
451 Disable optimisations. Adds the option ``cl-opt-disable`` to the
454 ``GMX_OCL_FORCE_CPU``
455 Force the selection of a CPU device instead of a GPU. This
456 exists only for debugging purposes. Do not expect |Gromacs| to
457 function properly with this option on, it is solely for the
458 simplicity of stepping in a kernel and see what is happening.
460 ``GMX_OCL_DISABLE_I_PREFETCH``
461 Disables i-atom data (type or LJ parameter) prefetch allowing
464 ``GMX_OCL_ENABLE_I_PREFETCH``
465 Enables i-atom data (type or LJ parameter) prefetch allowing
466 testing on platforms where this behavior is not default.
468 ``GMX_OCL_NB_ANA_EWALD``
469 Forces the use of analytical Ewald kernels. Equivalent of
470 CUDA environment variable ``GMX_CUDA_NB_ANA_EWALD``
472 ``GMX_OCL_NB_TAB_EWALD``
473 Forces the use of tabulated Ewald kernel. Equivalent
474 of CUDA environment variable ``GMX_OCL_NB_TAB_EWALD``
476 ``GMX_OCL_NB_EWALD_TWINCUT``
477 Forces the use of twin-range cutoff kernel. Equivalent of
478 CUDA environment variable ``GMX_CUDA_NB_EWALD_TWINCUT``
480 ``GMX_OCL_FILE_PATH``
481 Use this parameter to force |Gromacs| to load the OpenCL
482 kernels from a custom location. Use it only if you want to
483 override |Gromacs| default behavior, or if you want to test
486 ``GMX_OCL_DISABLE_COMPATIBILITY_CHECK``
487 Disables the hardware compatibility check. Useful for developers
488 and allows testing the OpenCL kernels on non-supported platforms
489 (like Intel iGPUs) without source code modification.
491 Analysis and Core Functions
492 ---------------------------
494 accuracy in Gaussian L510 (MC-SCF) component program.
496 ``GMX_QM_ORCA_BASENAME``
497 prefix of :ref:`tpr` files, used in Orca calculations
498 for input and output file names.
501 when set to a nonzero value, Gaussian QM calculations will
502 iteratively solve the CP-MCSCF equations.
504 ``GMX_QM_MODIFIED_LINKS_DIR``
505 location of modified links in Gaussian.
508 used by :ref:`gmx do_dssp` to point to the ``dssp``
509 executable (not just its path).
512 directory where Gaussian is installed.
515 name of the Gaussian executable.
517 ``GMX_DIPOLE_SPACING``
518 spacing used by :ref:`gmx dipoles`.
521 sets the maximum number of residues to be renumbered by
522 :ref:`gmx grompp`. A value of -1 indicates all residues should be renumbered.
524 ``GMX_NO_FFRTP_TER_RENAME``
525 Some force fields (like AMBER) use specific names for N- and C-
526 terminal residues (NXXX and CXXX) as :ref:`rtp` entries that are normally renamed. Setting
527 this environment variable disables this renaming.
530 ``gunzip`` executable, used by :ref:`gmx wham`.
533 name of X11 font used by :ref:`gmx view`.
536 the time unit used in output files, can be
537 anything in fs, ps, ns, us, ms, s, m or h.
539 ``GMX_QM_GAUSSIAN_MEMORY``
540 memory used for Gaussian QM calculation.
543 name of the ``multiprot`` executable, used by the
544 contributed program ``do_multiprot``.
547 number of CPUs to be used for Gaussian QM calculation
550 directory where Orca is installed.
553 simulated annealing step size for Gaussian QM calculation.
555 ``GMX_QM_GROUND_STATE``
556 defines state for Gaussian surface hopping calculation.
559 name of the ``total`` executable used by the contributed
560 ``do_shift`` program.
563 make :ref:`gmx energy` and :ref:`gmx eneconv`
567 where to find VMD plug-ins. Needed to be
568 able to read file formats recognized only by a VMD plug-in.
571 base path of VMD installation.
574 sets viewer to ``xmgr`` (deprecated) instead of ``xmgrace``.