1. we check at an interactive machine running with Alma9 OS
ssh lxui10.jinr.ru;
launch update Kerberos ticket и AFS tocken:
{{{
krenew -a -b -K 60 -t
}}}
launching the interactive test job :
{{{
srun -n 1 -N 1 –pty –mem=1000M –tmp=5G /bin/bash -i
}}}
This job will most likely be performed at a machine with Alma9 .
We run the same job at the SLURM batch at calculating machines with SL7:
srun -p sl7 -n 1 -N 1 –pty –mem=1000M –tmp=5G /bin/bash -i ;
check access at AFS HOME in these job:
klist;
token;
cat .profile >/dev/null
2 . running the test job at computing machines in batch mode
cd $HOME/slurm
sbatch test-new.sh
at computing SL7 machines:
sbatch test-new-sl7.sh
The scripts for sbatch and the test jobs are listed below.
F.Y.A. : <your_name>= <your user name
——————– test-new.sh
#!/bin/bash
#SBATCH –job-name=testdeva # Job name
#SBATCH –mail-type=END,FAIL # Mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH –mail-user=<your_name>@jinr.ru # Where to send mail
#SBATCH –no-requeue
#SBATCH –ntasks=1 # Run on a single CPU
#SBATCH –cpus-per-task=1
#SBATCH –mem=1000mb # Job memory request
#SBATCH –time=1-00:00:00 # Time limit days-hrs:min:sec
#SBATCH –tmp=1G
#SBATCH –propagate=NONE
#SBATCH –array=1-5 # array of 5 jobs
#SBATCH –output=none
$HOME/slurm/test-job-new.sh
——————– test-new-sl7.s
#!/bin/bash
#SBATCH –job-name=testdeva # Job name
#SBATCH –mail-type=END,FAIL # Mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH –mail-user=<your_name>@jinr.ru # Where to send mail
#SBATCH –no-requeue
#SBATCH –ntasks=1 # Run on a single CPU
#SBATCH –cpus-per-task=1
#SBATCH –mem=1000mb # Job memory request
#SBATCH –time=1-00:00:00 # Time limit days-hrs:min:sec
#SBATCH –tmp=1G
#SBATCH –propagate=NONE
#SBATCH –array=1-5 # array of 5 jobs
#SBATCH –output=none
#SBATCH –partition=sl7 # allocate SL7 node only
$HOME/slurm/test-job-new.sh
——————– test-job-new.sh
#!/bin/bash
# Final log file
LOGFILE=$SLURM_SUBMIT_DIR/$SLURM_JOB_ID-final.log
#Current log file
CURLOG=$TMPDIR/$SLURM_JOB_ID.log
# Redirec stdout & strerr
exec > $CURLOG 2>&1
echo “Start at: “`date`
echo “—— ARGV: 0=\”$0\” 1=\”$1\” 2=\”$2\” 3=\”$3\” 4=\”$4\””
echo “—— currunt dir”
pwd
OPWD=`pwd`
echo “—— cd $TMPDIR”
cd $TMPDIR
pwd
echo “—— hostname -f”
hostname -f
echo “—— whoami”
whoami
echo “—— id”
id
echo “—— ulimit -a”
ulimit -a
echo “—— klist”
klist
echo “—— tokens”
tokens
echo “—— eos whoami”
eos whoami
echo “—— cat $HOME/.profile >/dev/null”
cat $HOME/.profile >/dev/null
echo “—— environment”
env | grep -E “^[A-Z]” | grep -v LS_COLORS | sort
for i in `seq -w 1 3` ; do
date
echo “###################################################################### step $i”
echo “—— klist”
klist
echo “—— tokens”
tokens
echo “—— eos -b whoami”
eos -b whoami
echo “—— ps auxwww | grep -E $USER | grep -v [g]rep”
ps auxwww | grep -E “$USER” | grep -v [g]rep
echo “—— ssh -x $SLURM_SUBMIT_HOST /bin/true”
ssh -xT $SLURM_SUBMIT_HOST /bin/true
echo “—— sleep 60”
sleep 60
done
echo “Done “`date`
echo “—— rsync -aH $CURLOG $SLURM_SUBMIT_HOST:$LOGFILE-rsync”
rsync -aH $CURLOG $SLURM_SUBMIT_HOST:$LOGFILE-rsync
echo “—— cat $CURLOG | ssh -x $SLURM_SUBMIT_HOST \”cat – > $LOGFILE\””
cat $CURLOG | ssh -x $SLURM_SUBMIT_HOST “cat – > $LOGFILE”
# exit from exec
exit 0
# exit fron the job
exit 0