[Wien] Cluster Slurm

ahmed amine ahmedamine_dz at hotmail.fr
Sat Feb 25 15:46:00 CET 2017


Hello,

I am trying to run wien2k on cluster,
after submitting this bash job I found this error

ibnbadis15 nodelist
8
ibnbadis15
8 CPU
8
8
/var/log/slurm/spool_slurmd//job93135/slurm_script: /home/ahmedamine_dz/WIEN2k/run_lapw: /bin/csh: bad interpreter: No such file or directory

the bash script used :

#! /bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=8
#########################

export OMP_NUM_THREADS=1
export WIENROOT=/scratch/daint/piyusha/wien2k

echo $SLURM_NODELIST nodelist
echo $SLURM_JOB_CPUS_PER_NODE
list=`scontrol show hostname $SLURM_NODELIST | paste -d, -s`
echo $list
# Use , as list seperator
IFS=','
# Convert string to array
hcpus=($SLURM_JOB_CPUS_PER_NODE)
unset IFS

declare -a conv

# Expand compressed slurm array
for cpu in ${hcpus[@]}; do
     echo $cpu CPU
     if [[ $cpu =~ (.*)\(x(.*)\) ]]; then
    # found compressed value
#    value=4
    value=${BASH_REMATCH[1]}
    factor=${BASH_REMATCH[2]}
    for j in $(seq 1 $factor); do
        conv=( ${conv[*]} $value )
    done
     else
    conv=( ${conv[*]} $cpu )
     fi
done

# Build .machines file
rm -f .machines

#echo $list | awk -F "," '{printf ("lapw0:");for (i=1;i<=NF;i++){printf ("%s  ",$i)};printf("\n")}' >> .machines

nhost=0

echo -n 'lapw0:' >> .machines
echo ${conv[@]};

IFS=','
for node in $list
do
    declare -i cpuspernode=${conv[$nhost]};
    for ((i=0; i<${cpuspernode}; i++))
    do
    echo -n $node"  " >> .machines
    done
    let nhost+=1
done

echo  " " >> .machines
nhost=0

echo ${conv[@]};

IFS=','
for node in $list
do
    declare -i cpuspernode=${conv[$nhost]};
    echo -n 1: >> .machines
    for ((i=0; i<${cpuspernode}; i++))
    do
    echo -n $node" " >> .machines
    done
    echo " "  >> .machines
    let nhost+=1
done

echo 'granularity:1' >>.machines
echo 'extrafine:1' >>.machines

run_lapw -p

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20170225/457115fd/attachment.html>


More information about the Wien mailing list