Paths to use in your job scripts

Paths to use in your job scripts

This page explains how to use system-provided environment variables on the Lipscomb Compute Cluster (LCC). These variables ensure job scripts remain functional if storage locations change.



Overview

As of January 31, 2020, the module ccs/lcc-user is automatically loaded for all users. This module defines environment variables that point to important storage locations.

You should use these variables instead of hard-coding file paths in job scripts. This allows system administrators to move storage locations without breaking workflows.

 

Important

Important: Do not hard-code storage paths in job scripts.
Always use environment variables such as $HOME, $SCRATCH, and $PROJECT.
Jobs that use fixed paths may fail if storage systems change.

 

Example Environment Variables

The table below shows recommended usage.

Assumptions:

  • Username: user123

  • Project: pi456_uksr

Do Not Use

Use Instead

Command to Show Actual Path

Do Not Use

Use Instead

Command to Show Actual Path

/home/user123

$HOME

echo $HOME

/scratch/user123

$SCRATCH

echo $SCRATCH

/share

$SHARE

echo $SHARE

/project/pi456_uksr

$PROJECT/pi456_uksr

echo $PROJECT/pi456_uksr

/pscratch/pi456_uksr

$PSCRATCH/pi456_uksr

echo $PSCRATCH/pi456_uksr

 

Sticky Module Behavior

If you run module list, you will see the module ccs/lcc-user loaded with an (S) indicator.
This means the module is sticky and will remain loaded even after running module purge.

This behavior ensures that required environment variables remain available.

Example

module list Currently Loaded Modules: 1) autotools 2) prun/1.3 3) intel/19.0.4.243 4) impi/2019.4.243 5) ohpc 6) ccs/lcc-user (S)
module purge The following modules were not unloaded: (Use "module --force purge" to unload all): 1) ccs/lcc-user
module list Currently Loaded Modules: 1) ccs/lcc-user (S)

 

 

Verifying Storage Paths

To verify your scratch directory location, run:

echo $SCRATCH

Alternatively:

cd $SCRATCH pwd

These commands display the actual filesystem path assigned to your scratch space.

Center for Computational Sciences