Environment Management
To ensure the correct and repeatable behavior of the tools, the environment must be controlled. This chapter explains how VOV supports multiple reusable environments.
Environments Overview
When using the UNIX shell, it is standard procedure to establish a working environment by setting environment variables within the shell login script, such as the .profile or .cshrc file.
The Altair Accelerator products are built to establish control and direction from the values of environment variables. The set of such controls is long enough that it makes it hard to manage all the values. A technique is supported to help manage the complexity so that a person does not use a single monolithic login script to set every possible environment variable.
This technique is to partition the set of control environment variable into working groups that are appropriate for use in certain situations and by certain activities.
Each group is given a name, and tools are provided to modify the environment to add or delete environment variables by group name.
The technique of using FlowTracer tools to set a particular working environment by name is used instead of doing a native UNIX sourcing of a variety of different scripts as needed, or of one large script sourced at login.
Definitions and Benefits
% setenv VOVDIR /remote/VOV/<version>/<platform>
All jobs started by the shell inherit the environment. This enables finding the root directory of the VOV installation by looking up the value of the variable VOVDIR. The behavior of many programs is affected by such environment variables.
Environment indicates the collection of all the environment variables. A single environment that can execute all tools required in a project is desirable but not always feasible. For example, if a project requires tools from many vendors, the PATH variable may become too long. In other cases, there may be conflicting requirements for the value of some variables (for example, LM_LICENSE_FILE). for these reasons, multiple environments are a valuable asset.
To address these issues, some users have developed a more or less unstructured collection of setup files, scattered around the file system, leaving it up to the individual designers to remember to use those files when needed. Others have developed a system in which the designers, instead of invoking the tools directly, invoke specialized wrappers. Wrappers set up the appropriate environment for the tool on the fly before invoking the actual tool.
If you have scattered setup scripts, the VOV environment management facilities offers a way to organize them under a logical framework. If you have wrappers, you can keep using them as a complement to the VOV environment management facilities.
- Precisely control the environment used by each job in your flow
- Load each environment on demand rather than use an overloaded environment
- Simplify the shell startup script (such as ~/.cshrc)
- Create many small environments that are optimized and easy to maintain
- Share the environments across multiple shells (ksh, tcsh, ...)
- Share the environments among the project team members
- Share the environments among multiple projects
Environment Basics
Each VOV environment has a name. This name is an alphanumeric string, usually in
uppercase. Underscores are also allowed. For example, an environment could be named
TEX
for running Latex, and another environment named
SYNOPSYS
for running the Synopsys tools.
The name of the current environment is represented by the environment variable VOV_ENV. If this
variable is not set, VOV assumes that the name is DEFAULT
.
Environment definitions are found in the directory $VOVDIR/local/environments. The optional variable VOV_ENV_DIR can be used to identify other directories where additional environments can be found. The value of this variable is a list of directories separated by colons ":" on UNIX systems and by semicolons ";" on Windows.
The environment files may be written in C-shell, in Bourne Shell, or Tcl. Regardless of the syntax used to describe it, any environment can be used in any shell; an environment written in C-shell can be used, even if ksh is being used.
VOV stores the name of the environment that is used to execute each job. Before re-executing a job, VOV switches to the appropriate environment. The switch of environment is actually performed on the taskers. Taskers cache environments, resulting in instantaneous switches between environments.