next up previous contents index
Next: Sparse Matrix Package Up: Environment Variables Previous: Microsoft Windows   Contents   Index

WRspice Environment Variables

The following environment variables are used by all XicTools programs.

If found in the environment when WRspice starts, it is expected to contain a path to the WRspice installation area or equivalent, which defaults to ``/usr/local/xictools/wrspice''. This overrides XT_PREFIX if that environment variable is also found.

There is an important subtlety when using this variable. Although it allows WRspice to find its startup files anywhere, only the directory structure implied by XT_PREFIX, that is, for <i>WRspice</i>,

is compatible with the program installation script. The variable is perhaps useful for pointing WRspice toward a secondary set of startup files, perhaps heavily customized by the user, which may reside in an arbitrary location.

When WRspice starts, it creates a ``named pipe'', otherwise known as a fifo (see 3.16.11). Text written to the fifo is piped into WRspice, as if input with the source command. If this variable is found in the environment, the text of this variable is taken as the base name for the fifo, instead of ``wrsfifo''. In Unix/Linux, this name can have a full path. All components of the path except for the file name must exist. If there is a conflict with an existing entity, an integer suffix will be added to make the name unique. In Windows, any path given is stripped and ignored.

By default, Unix/Linux versions of Xic and WRspice use authorization provided by an external license server, possibly hosted on a different machine. On the other hand, the Windows versions and XicII/Xiv use built-in authorization. Both the external license server and the programs not using the license server make use of a file named ``LICENSE'' provided by Whiteley Research, Inc., which provides authorization to run on the host computer.

It is possible to run Xic and WRspice without a license server, and to run XicII/Xiv from a license server. The status is set with the environment variable XT_AUTH_MODE. This variable has meaning if set to one of the keywords ``Server'' or ``Local''

If set to ``Server'', XicII and Xiv will validate through a license server the same way as Xic and WRspice normally do. If set to ``Local'', Xic and WRspice will be self-validating the way XicII normally is.

Xic and/or WRspice users on a single licensed workstation may prefer to set the environment variable in their shell startup file and not use the external license server.

When the programs look for the LICENSE file in ``Local'' mode, if the file is not found in the startup or license directories, the programs will look in the home and current directories, in that order, unless XT_LICENSE_PATH is also set.

When using local validation (i.e., not using the license server) XT_LICENSE_PATH can be set to the full path to the license file. Only this file will be used - the regular search is suppressed.

This provides the host name of the host running the license server needed to validate the application. It is in a format understandable to the local name server. The host name can optionally be suffixed by ``:port'', where port is the port number in use by the server. There should be no space around the colon when using this form.

All of the XicTools programs respond to the XT_PREFIX environment variable. When the tools are installed in a non-standard location, i.e., other than /usr/local, this can be set to the directory prefix which effectively replaces ``/usr/local'', and the programs will be able to access the installation library files without further directives. This should not be needed under Windows, as the Registry provides the default paths.

If the variable XTNETDEBUG is defined, Xic and WRspice will echo interprocess messages sent and received to the console. In server mode, Xic will not go into the background, but will remain in the foreground, printing status messages while servicing requests.

This can be set to the full path to the KLU (sparse matrix solver) plug-in. For example, this path by default in a Linux installation is
The plug-in is found automatically so this variable is needed only for special cases.

The KLU version changed in wrspice-4.2.7, and the plug-ins are not compatible. Current WRspice releases will not load the old plug-in, however older releases will load a new plug-in if found in the default location, which will likely cause a program crash. This variable can be set in this case to avoid the problem.

Linux and FreeBSD releases can use an included local memory allocation package. In earlier WRspice releases, this allocator, rather than the allocator provided by the operating system, was used by default. In 32-bit releases, the local allocator was often able to allocate more memory than the allocators provided by the operating system. It also provided custom error reporting and statistics.

This feature is now disabled, as in modern operating systems there is dubious benefit, and it can produce stability problems in some cases. However, if this variable is set in the environment when WRspice is started, the local allocator will be used. The interested user is encouraged to experiment.

This variable was once used to disable the internal local memory allocator, which in earlier releases was enabled by default. Currently, this variable is ignored.

There are several environment variables which can be used to alter some of the WRspice defaults. On startup, WRspice checks for the following variables in the environment, and alters internal defaults accordingly. The defaults can be modified when the program is built, the defaults listed below are those assigned in the distribution.

This is used only in the Microsoft Windows version, and can be set to a full directory path which will be taken as the user's home directory.

This variable defines the X window system display that WRspice will use, but is ignored if the -d option is used on the WRspice command line. The display must be specified for graphics to be enabled in WRspice.

If defined to the invoking string for a text editor, that editor will be used in the edit command. This is superseded by the SPICE_EDITOR variable, if set.

The text editor called by the edit command can be set with this variable. The variable is defined to the command string one would type to invoke the editor. This will supersede the EDITOR variable, if set, but which would otherwise have the same effect. If no editor is specified in the environment, or with the editor shell variable, which supersedes the environment variables, a default internal editor is used. The default internal editor can also be specified by setting SPICE_EDITOR to nothing, ``default'', or ``xeditor''.

This specifies a directory to use for temporary files, and is superseded by SPICE_TMP_DIR, if defined. The default location if not specified is /tmp.

When WRspice creates a temporary file, it will look for a directory named by the SPICE_TMP_DIR environment variable, and if not found the directory named in the TMPDIR variable, and if still not found the file will be created in /tmp.

This variable can be used to define the directory containing the XicTools binaries, used by the aspice command and the wrspiced daemon. If not set, the default is ``/usr/local/xictools/bin'', or, if XT_PREFIX is set, its value replaces ``/usr/local''.

This can be used to set the full path to the WRspice executable, for the aspice command and the wrspiced daemon. If not set, the default is ``/usr/local/xictools/bin/wrspice'', or, if XT_PREFIX is set, its value replaces ``/usr/local''. The SPICE_EXEC_DIR variable can also be used for this purpose, unless the wrspice executable has been renamed. The spicepath shell variable, if set, will override the path set in the environment.

This variable can be used to change the default location where WRspice looks for system startup files. If not set, the internal default is ``/usr/local/xictools/wrspice/startup'', or, if XT_PREFIX is set, its value replaces ``/usr/local''.

This can be set to a list of directories to search for input files and scripts. If not set, the internal default is ``( . /usr/local/xictools/wrspice/scripts )'', or, if XT_PREFIX is set, its value replaces ``/usr/local''.

This can be set to a list of directories to search for help database files. If not set, the internal default is ``( /usr/local/xictools/wrspice/help )'', or, if XT_PREFIX is set, its value replaces ``/usr/local''. This is superseded by the helppath shell variable, if set.

This variable can be set to the full path to a text file which is printed when WRspice starts. If not set, the file /usr/local/xictools/wrspice/startup/news will be printed, if it exists (if XT_PREFIX is set, its value replaces ``/usr/local'').

This variable can be set to an internet mail address to use in the bug reporting command. If not set, the built in default is the Whiteley Research technical support address.

This variable can be defined to a character that will be used to flag options on the WRspice command line. If not defined, the option character is ``- ''.

If this variable is defined to ``0'' (zero), or to a word starting with `f' or `F' such as ``False'', or `n' or `N' such as ``No'', WRspice will create binary plot-data files (rawfiles). If not set or set to something else, WRspice will create the default ASCII-format rawfiles. The filetype shell variable can also be used to set the mode, which will supersede the environment variable. The rawfiles are normally created with the write command.

This variable can be used to set the host name to use for remote SPICE runs. The host name can optionally be suffixed by a colon followed by the port number to use for communication with the wrspiced daemon. If not given, the port is obtained from the operating system for ``wrspice/tcp'', or 6114 (the IANA registered port number for this service) if this is not defined. There is no default for this variable. Hosts can also be specified with the rhost command, and given with the rhost shell variable.

This variable is used by the wrspiced daemon program to set an alternate path for the log file. The default path is /tmp/wrspiced.log.

If the variable SPICENOMAIL is set, no mail will be sent during a program crash. If a fatal error is encountered, a file named ``gdbout'' is created in the current directory, which contains a stack backtrace from the stack frame of the error. Despite the name, the file is generated internally on all platforms, and no longer makes use of the gdb program.

By default, this file will be emailed to Whiteley Research for analysis. However, the emailing can be suppressed by setting this variable in the environment. The gdbout file is produced in any case, and would be very useful to Whiteley Research for fixing program bugs.

This has the same effect as SPICENOMAIL but also prevents email from the Xic program.

next up previous contents index
Next: Sparse Matrix Package Up: Environment Variables Previous: Microsoft Windows   Contents   Index
Stephen R. Whiteley 2017-02-22