User Tools

Site Tools


soft:siman:scratch:running_calculations_on_scratch_disk

1. Update siman to the last version

2. In the description of clusters in simanrc, add 'scratch' variable and provide path to your scratch folder, which should start with /scr followed by you personal folder: On razor128 could be any name On Magnus (do not use, because we have old ssd disks on magnus ) should be different from your home folder name.

CLUSTERS['raz128'] = {
'address':'aksenov@10.30.98.103',
'vasp_com':'srun vasp_std',
'homepath':'/home/aksenov/',
'schedule':'SLURM',
'corenum':16,
'scratch':'/scr/aksenov/', # this is new variable, which turns on calculation on scratch
'modules':'source /etc/profile.d/modules.sh; module load devtools/mpi/mpich/4.2.1/gcc/11.2; module load devtools/math/mkl/2024.1.0.695; module load q-ch/vasp/5.4.4_mpich_mkl;'
}

To check the calculation progress you can add the following alias to your .bashrc:

alias qs="squeue -o '%o' | awk -F / '{\$(NF--)} {gsub(\" \",FS)}; {gsub(\"home\", \"scr\")} \$0=\"cd \"\$0 '"

But be aware that before switching to calculation folder on scratch you should ssh to the corresponding node:

squeue # check number node of your calculation, e.g. node02
ssh n2
qs # shows paths to scratch
cd path # choose required job from the output of qs

Below is example of script which will be created: You can see that your calculation folder is copied to scratch, the calculation is executed in scratch and then the results and moved back to you home folder

#!/bin/bash   
#SBATCH -J Fe26Al.ifn5.s4eqd1d20.0A22nclsons110
#SBATCH -N 1
#SBATCH -n 16
#SBATCH -o /home/aksenov/Fe/MAE/Fe26Al.ifn5.s4eqd1d20.0A22nclsons110/sbatch.out
#SBATCH -e /home/aksenov/Fe/MAE/Fe26Al.ifn5.s4eqd1d20.0A22nclsons110/sbatch.err
#SBATCH -p zen4
 
#create folder in scratch, copy files, and switch to scratch folder
mkdir -pv  /scr/aksenov/Fe/MAE/Fe26Al.ifn5.s4eqd1d20.0A22nclsons110
cp /home/aksenov/Fe/MAE/Fe26Al.ifn5.s4eqd1d20.0A22nclsons110/* /scr/aksenov/Fe/MAE/Fe26Al.ifn5.s4eqd1d20.0A22nclsons110
cd /scr/aksenov/Fe/MAE/Fe26Al.ifn5.s4eqd1d20.0A22nclsons110
 
source /etc/profile.d/modules.sh; module load zen4/vasp/5.4.4_openmpi_gcc_aocl
 
export PATH=$PATH:/home/aksenov//tools/
 
#Basic run:
 
python /home/aksenov//tools/siman/cluster_runners/shiftk.py > shiftk.log
 
#Footer section, copy files back and remove folder from scratch
 
mv /scr/aksenov/Fe/MAE/Fe26Al.ifn5.s4eqd1d20.0A22nclsons110/* /home/aksenov/Fe/MAE/Fe26Al.ifn5.s4eqd1d20.0A22nclsons110
rm -r /scr/aksenov/Fe/MAE/Fe26Al.ifn5.s4eqd1d20.0A22nclsons110
soft/siman/scratch/running_calculations_on_scratch_disk.txt · Last modified: 2025/08/09 11:53 by d.aksenov

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki