Enviroment Variables

From HPC

(Difference between revisions)
Jump to: navigation, search
(General)
(While job is running)
Line 50: Line 50:
==While job is running==
==While job is running==
-
   SGE_O_SHELL – The content of the SHELL environment variable in the context of job submission command.
+
   SGE_O_SHELL The content of the SHELL environment variable in the context of job submission command.
 +
 
 +
  SGE_O_TZ  The content of the TZ environment variable in the context of the job submission command.
 +
 
 +
  SGE_O_WORKDIR  The working directory of the job submission command.
 +
 
 +
  SGE_CKPT_ENV  The checkpointing environment under which a checkpointing job runs. The checkpointing environment is selected with the qsub -ckpt command.
 +
 
 +
  SGE_CKPT_DIR  The path ckpt_dir of the checkpoint interface. Set only for checkpointing jobs. For more information, see the checkpoint(5) man page.
 +
 
 +
  SGE_STDERR_PATH  The path name of the file to which the standard error stream of the job is diverted. This file is commonly used for enhancing the output with error messages from prolog, epilog, parallel environment start and stop scripts, or checkpointing scripts.
 +
 
 +
  SGE_STDOUT_PATH  The path name of the file to which the standard output stream of the job is diverted. This file is commonly used for enhancing the output with messages from prolog, epilog, parallel environment start and stop scripts, or checkpointing scripts.
 +
 
 +
  SGE_TASK_ID  The task identifier in the array job represented by this task.
 +
 
 +
  ENVIRONMENT  Always set to BATCH. This variable indicates that the script is run in batch mode.
 +
 
 +
  HOME  The user's home directory path from the passwd file.
 +
 
 +
  HOSTNAME  The host name of the node on which the job is running.
 +
 
 +
  JOB_ID  A unique identifier assigned by the sge_qmaster when the job was submitted. The job ID is a decimal integer from 1 through 9,999,999.
 +
 
 +
  JOB_NAME  The job name, which is built from the qsub script filename, a period, and the digits of the job ID. You can override this default with qsub -N.
 +
 
 +
  LOGNAME  The user's login name from the passwd file.
 +
 
 +
  NHOSTS  The number of hosts in use by a parallel job.
 +
 
 +
  NQUEUES  The number of queues that are allocated for the job. This number is always 1 for serial jobs.
 +
 
 +
  NSLOTS  The number of queue slots in use by a parallel job.
 +
 
 +
  PATH A default shell search path of:
-
  SGE_O_TZ – The content of the TZ environment variable in the context of the job submission command.
 
-
  SGE_O_WORKDIR – The working directory of the job submission command.
 
-
I
 
-
  SGE_CKPT_ENV – The checkpointing environment under which a checkpointing
 
-
I
 
-
  job runs. The checkpointing environment is selected with the qsub -ckpt
 
-
  command.
 
-
  SGE_CKPT_DIR – The path ckpt_dir of the checkpoint interface. Set only for
 
-
I
 
-
  checkpointing jobs. For more information, see the checkpoint(5) man page.
 
-
  SGE_STDERR_PATH – The path name of the file to which the standard error stream
 
-
I
 
-
  of the job is diverted. This file is commonly used for enhancing the output with
 
-
  error messages from prolog, epilog, parallel environment start and stop scripts, or
 
-
  checkpointing scripts.
 
-
  SGE_STDOUT_PATH – The path name of the file to which the standard output
 
-
I
 
-
  stream of the job is diverted. This file is commonly used for enhancing the output
 
-
  with messages from prolog, epilog, parallel environment start and stop scripts, or
 
-
  checkpointing scripts.
 
-
  SGE_TASK_ID – The task identifier in the array job represented by this task.
 
-
I
 
-
  ENVIRONMENT – Always set to BATCH. This variable indicates that the script is run
 
-
I
 
-
  in batch mode.
 
-
  HOME – The user’s home directory path from the passwd file.
 
-
I
 
-
  HOSTNAME – The host name of the node on which the job is running.
 
-
I
 
-
  JOB_ID – A unique identifier assigned by the sge_qmaster when the job was
 
-
I
 
-
  submitted. The job ID is a decimal integer from 1 through 9,999,999.
 
-
  JOB_NAME – The job name, which is built from the qsub script filename, a period,
 
-
I
 
-
  and the digits of the job ID. You can override this default with qsub -N.
 
-
  LOGNAME – The user’s login name from the passwd file.
 
-
I
 
-
  NHOSTS – The number of hosts in use by a parallel job.
 
-
I
 
-
  NQUEUES – The number of queues that are allocated for the job. This number is
 
-
I
 
-
  always 1 for serial jobs.
 
-
  NSLOTS – The number of queue slots in use by a parallel job.
 
-
I
 
-
  PATH – A default shell search path of:
 
-
I
 
   /usr/local/bin:/usr/ucb:/bin:/usr/bin.
   /usr/local/bin:/usr/ucb:/bin:/usr/bin.
-
   PE – The parallel environment under which the job runs. This variable is for
+
 
-
I
+
   PE The parallel environment under which the job runs. This variable is for parallel jobs only.
-
  parallel jobs only.
+
[[Category:Getting Started]]
[[Category:Getting Started]]

Revision as of 11:55, 17 October 2008

Contents

Enviroment Variables

Enviroment variables are used by the operationing system, programs and possibly your scripts. This variables can be set and access from the command line as well as in scripts/programs.

You can set enviroment variables

export ENV_NAME=env_value
export ENV_NAME="env_value"

Example

export MY_DATA=/users/username/datafiles

Viewing the contents of enviroment variables

echo $ENV_NAME

Example

> echo $MY_DATA
/users/username/datafiles
>

General

PATH

This is the path the OS will search to find programs

export PATH=/dir/to/my/prog:$PATH

JAVA_HOME

The path to java

CFLAGS

C compiler flags

CXXFLAGS

C++ compiler Flags

SGE Variables

General

While job is running

 SGE_O_SHELL  The content of the SHELL environment variable in the context of job submission command.
 SGE_O_TZ  The content of the TZ environment variable in the context of the job submission command.
 SGE_O_WORKDIR  The working directory of the job submission command.
 SGE_CKPT_ENV  The checkpointing environment under which a checkpointing job runs. The checkpointing environment is selected with the qsub -ckpt command.
 SGE_CKPT_DIR   The path ckpt_dir of the checkpoint interface. Set only for checkpointing jobs. For more information, see the checkpoint(5) man page.
 SGE_STDERR_PATH  The path name of the file to which the standard error stream of the job is diverted. This file is commonly used for enhancing the output with error messages from prolog, epilog, parallel environment start and stop scripts, or checkpointing scripts.
 SGE_STDOUT_PATH  The path name of the file to which the standard output stream of the job is diverted. This file is commonly used for enhancing the output with messages from prolog, epilog, parallel environment start and stop scripts, or checkpointing scripts.
 SGE_TASK_ID  The task identifier in the array job represented by this task.
 ENVIRONMENT  Always set to BATCH. This variable indicates that the script is run in batch mode.
 HOME  The user's home directory path from the passwd file.
 HOSTNAME  The host name of the node on which the job is running.
 JOB_ID  A unique identifier assigned by the sge_qmaster when the job was submitted. The job ID is a decimal integer from 1 through 9,999,999.
 JOB_NAME  The job name, which is built from the qsub script filename, a period, and the digits of the job ID. You can override this default with qsub -N.
 LOGNAME  The user's login name from the passwd file.
 NHOSTS  The number of hosts in use by a parallel job.
 NQUEUES   The number of queues that are allocated for the job. This number is always 1 for serial jobs.
 NSLOTS  The number of queue slots in use by a parallel job.
 PATH A default shell search path of:
 /usr/local/bin:/usr/ucb:/bin:/usr/bin.
 PE  The parallel environment under which the job runs. This variable is for parallel jobs only.
Personal tools