{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "tags": [
     "remove-input",
     "active-ipynb",
     "remove-output"
    ]
   },
   "outputs": [],
   "source": [
    "try:\n",
    "    from openmdao.utils.notebook_utils import notebook_mode  # noqa: F401\n",
    "except ImportError:\n",
    "    !python -m pip install openmdao[notebooks]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Quick Reference: OpenMDAO-Related Environment Variables\n",
    "\n",
    "In some cases, the way in which OpenMDAO operates is up to the preferences of the user.\n",
    "At this time, rather than using a preferences file, these optional OpenMDAO behaviors are based on the values of environment variables.\n",
    "\n",
    "Some of these environment variables are interpreted as either being \"truthy\" or \"falsey\".\n",
    "For OpenMDAO, an environment variable is considered `False` if it takes on one of the following values:\n",
    "- '0'\n",
    "- 'false'\n",
    "- 'no'\n",
    "- 'off'\n",
    "- 'none'\n",
    "- ''\n",
    "\n",
    "These are all string values and OpenMDAO interprets them in a case-insensitive way.\n",
    "Note that, for OpenMDAO, the empty string means that an unset environment variable will be interpreted as `False`.\n",
    "\n",
    "**Any other environment variable value other than those above is interpreted as `True`**.\n",
    "\n",
    "## User-Facing Environment Variables\n",
    "\n",
    "| Environment Variable | Description | See Also |\n",
    "| --- | --- | --- |\n",
    "| OPENMDAO_INVALID_DESVAR_BEHAVIOR | Specifies default driver behavior if the initial design variables are out of bounds. | [Paraboloid](examples_paraboloid:specifying_initial_values) |\n",
    "| OPENMDAO_REPORTS | May be boolean-like or the names of the desired reports to be generated. | [Reports](features:reports:report_system:controlling_reporting_using_an_environment_variable) |\n",
    "| OPENMDAO_USE_MPI | Set to True to force an exception when MPI is needed but mpi4py is unavailable. | [Controlling MPI](features:debugging:controlling_mpi) |\n",
    "| OPENMDAO_WORKDIR | Top-level directory for OpenMDAO outputs. Defaults to current working directory if not set. | [Reports System](reports_system:directory) |\n",
    "| OPENMDAO_NO_RELEVANCE | Turns off relevance. Sometimes useful when debugging OpenMDAO internals. |  |\n",
    "| OPENMDAO_DUMP | Dumps trace information and/or output of om_dump function to file, optionally by rank and/or PID. |  |\n",
    "| OPENMDAO_DISABLE_RICH | Prevents OpenMDAO from using colorized output with the rich python package. |  |\n",
    "| USE_PROC_FILES | Set to True to cause stdout/err from each MPI process to be written to `[rank].out`. | [Controlling MPI](features:debugging:controlling_mpi) |\n",
    "| OMPI_MCA_rmaps_base_oversubscribe | Set to '1' to fix **there are not enough slots available in the system** issue for some versions of MPI. | [Controlling MPI](features:debugging:controlling_mpi) |\n",
    "| OMPI_MCA_btl=self,tcp | Set to 'self,tcp' to fix **A system call failed during shared memory initialization that should not have...** error in some version of MPI | [Controlling MPI](features:debugging:controlling_mpi) |\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  }
 ],
 "metadata": {
  "celltoolbar": "Tags",
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
