How to Work with the /local partition#
Each compute node has a 300GB partition, called `/local', which the user can use while using the node. When a node is assigned to a user, a directory is created in this partition with the Job ID as a name and whose owner is the user, so that the user can create, modify or delete files in this directory.
The use of this partition is not restricted to any queue, it can be used even when using the node in interactive mode, through the sbatch
command.
Note
Once the execution is completely finished, the contents of this partition will be deleted, so the data resulting from the execution must be moved to, for example, the /data
partition, a partition intended to be used for each user to work on.
Example of execution using the /local partition#
# !/bin/bash
#SBATCH -J <job_name>
#SBATCH -p <partition>
#SBATCH -N 1
#SBATCH --constrains=<node arquitecture> # sandy, ilk (icelake)... arquitecture
#SBATCH -o <out.log>
#SBATCH -e <error.log>
#SBATCH -D .
##########################################################
module load <modules>
# Copy the data to /local
cp file1 file2 file3 ... /local/$SLURM_JOBID/
# Move into the /local directory
cd /local/$SLURM_JOBID
# Run software
...
# Once everything is finished, we move the results to our working directory
mv result1 result2 result3 ... ~/data/work_dir/