-env
Controls the propagation of the specified job submission environment variables to the execution hosts.
Categories
properties
Synopsis
bsub -env "none" | "all, [~var_name[, ~var_name] ...] [var_name=var_value[, var_name=var_value] ...]" | "var_name[=var_value][, var_name[=var_value] ...]"Description
Specify a comma-separated list of job submission environment variables to control the propagation to the execution hosts.
- Specify none with no other variables to submit jobs with no submission environment variables. All environment variables are removed while submitting the job.
- Specify the variable name without a value to propagate the environment variable with its default value.
- Specify the variable name with a value to propagate the environment
variable with the specified value to overwrite the default value.
The specified value may either be a new value or quote the value of
an existing environment variable (unless you are submitting job packs).
For example:
In UNIX, fullpath=/tmp/:$filename appends /tmp/ to the beginning of the filename environment variable and assigns this new value to the fullpath environment variable. Use a colon (:) to separate multiple environment variables.
In Windows, fullpath=\Temp\:%filename% appends \Temp\ to the beginning of the filename environment variable and assigns this new value to the fullpath environment variable. Use a semicolon (;) to separate multiple environment variables.
The shell under which you submitted the job will parse the quotation marks.
- Specify all at the beginning of the list
to propagate all existing submission environment variables to the
execution hosts. You may also assign values to specific environment
variables.
For example, -env "all, var1=value1, var2=value2" submits jobs with all the environment variables, but with the specified values for the var1 and var2 environment variables.
- When using the all keyword, add ~ to the beginning of the variable name and the environment variable is not propagated to the execution hosts.
The environment variable names cannot contain the following words and symbols: "none", "all", comma (,), tilde (~), equals sign (=), double quotation mark (") and single quotation mark (').
The variable value can contain a tilde (~) and a comma (,). However, if the value contains a comma (,), the entire value must be enclosed in single quotation marks. For example:
bsub -env "TEST='A, B' "
An esub can change the -env environment variables by writing them to the file specified by the LSB_SUB_MODIFY_FILE or LSF_SUB4_SUB_ENV_VARS environment variables. If both environment variables are specified, LSF_SUB_MODIFY_FILE takes effect.
When -env is not specified with bsub, the default value is -env "all" (that is, all environment variables are submitted with the default values).
The entire argument for the -env option may contain a maximum of 4094 characters for UNIX and Linux, or up to 255 characters for Windows.
If -env conflicts with -L, the value of -L takes effect.
The following environment variables are not propagated to execution hosts because they are only used in the submission host:
- HOME, LS_JOBPID, LSB_ACCT_MAP, LSB_EXIT_PRE_ABORT, LSB_EXIT_REQUEUE, LSB_EVENT_ATTRIB, LSB_HOSTS, LSB_INTERACTIVE, LSB_INTERACTIVE_SSH, LSB_INTERACTIVE_TTY, LSB_JOBFILENAME, LSB_JOBGROUP, LSB_JOBID, LSB_JOBNAME, LSB_JOB_STARTER, LSB_QUEUE, LSB_RESTART, LSB_TRAPSIGS, LSB_XJOB_SSH, LSF_VERSION, PWD, USER, VIRTUAL_HOSTNAME, and all variables with starting with LSB_SUB_
- Environment variables about non-interactive jobs: TERM, TERMCAP
- Windows-specific environment variables: COMPUTERNAME, COMSPEC, NTRESKIT, OS2LIBPATH, PROCESSOR_ARCHITECTURE, PROCESSOR_IDENTIFIER, PROCESSOR_LEVEL, PROCESSOR_REVISION, SYSTEMDRIVE, SYSTEMROOT, TEMP, TMP
The following environment variables do not take effect on the execution hosts: LSB_DEFAULTPROJECT, LSB_DEFAULT_JOBGROUP, LSB_TSJOB_ENVNAME, LSB_TSJOB_PASSWD, LSF_DISPLAY_ALL_TSC, LSF_JOB_SECURITY_LABEL, LSB_DEFAULT_USERGROUP, LSB_DEFAULT_RESREQ, LSB_DEFAULTQUEUE, BSUB_CHK_RESREQ, LSB_UNIXGROUP, LSB_JOB_CWD