NERSCPowering Scientific Discovery Since 1974

User Environment

There are two primary ways that users can control their environment:  CHOS and modules.


Carver runs Scientific Linux 6.4 as its native operating system.  The native operating system is not intended for general use.  Instead, the chos utility is used to create a Scientific Linux environment on both the login nodes and in batch jobs. Currently Scientific Linux 5.5 (sl5carver) is the default.  After September 22, 2014, the default will be Scientific Linux 6.3 (sl6carver).

To automatically select a system version you need to create a file in your home directory named .chos-carver (with the dot at the beginning). In this file you should have one and only one line:

In your .chos file: The operating system you get:
sl5carver 64-bit Scientific Linux 5.5
sl6carver 64-bit Scientific Linux 6.3

When you log in you should have a full working environment with the OS of your choice.

For most day-to-day work, the above approach is sufficient.  However, there are times when it may be necessary to move between OS versions, for example, when migrating applications from one OS release to another (e.g., from SL5.5 to SL6.3).

You can switch "live" between OS versions. To do that, set the CHOS variable to the OS you want to get and then run the "chos" command. For example, in csh/tcsh:

setenv CHOS sl6carver;chos

Or, in bash:

export CHOS=sl6carver;chos bash -l

The above commands will start a new shell; in that shell, the OS environment will be that specified by the CHOS environment variable.  Note that the above process will restore your modules environment to the default configuration; that is, any modules that you had loaded interactively will have to be reloaded after executing the chos command.

By default your batch jobs will run under the CHOS version from which you submitted them.  If you want your batch jobs to run under a different CHOS environment from the one in which you are interactively working, you can set the CHOS variable to the environment you want while submitting the job. This can be done as follows:

qsub -v CHOS=sl6carver ...

To see which CHOS environment you are currently in, use the chosenv command; to see what CHOS environments are available, use the chosavail command.  Note that the only supported user environments are those documented here; if you choose any other OS environment, unpredictable behavior may result.

Cron jobs must specify a CHOS environment to run in, otherwise they will run in a minimal CHOS environment that does not have access to modules or most system software. For example, to run a cron job in sl6:

0 */6 * * * CHOS=sl6carver chos <your_script>


Carver uses environment modules to control access to third-party software; more information is available here.