Paths to use in your job scripts
As of January 31, 2020, we have released a new module called ccs/lcc-user
that is automatically loaded for all users. It sets up some environment variables that point to some important paths on the system. It is vital that you use these environment variables instead of hard-coding paths in your job scripts. These environment variables allow our system to be storage-agnostic so that we can move users between different storage appliances based on performance or other factors.
You should update all of your existing job scripts using the following guide, or you may find your jobs breaking in the future.
For the following exemplary table, assume your username is user123
and that you are in a project called pi456_uksr
.
DON'T USE | DO USE | Command to show the 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 |
If you run module list
you'll notice the ccs/lcc-user
module is loaded with an (S) next to it. The (S) means sticky so that the module won't be unloaded when you run module purge which a lot of users do at the beginning of their job scripts. This helps ensure that this module stays loaded and that your environment is configured correctly.
[jdch223@login001 ~]$ 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) Where: S: Module is Sticky, requires --force to unload or purge [jdch223@login001 ~]$ module purge The following modules were not unloaded: (Use "module --force purge" to unload all): 1) ccs/lcc-user [jdch223@login001 ~]$ module list Currently Loaded Modules: 1) ccs/lcc-user (S) Where: S: Module is Sticky, requires --force to unload or purge
*Note: command "echo $SCRATCH" will point to your scratch space or the command "cd $SCRATCH ; pwd " will point to your scratch.
Center for Computational Sciences