Skip to content

Commit

Permalink
add new shell submit and make
Browse files Browse the repository at this point in the history
  • Loading branch information
haidi-ustc committed Jun 28, 2020
1 parent 4a41f7a commit 8ee62af
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
20 changes: 20 additions & 0 deletions shell/prepare_vasp_input.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
path=`pwd`
list=`ls -d $path/prim-*/*.vasp`
kk=1
for i in $list
do
if [ ! -d $path/$kk ];then
mkdir $path/$kk
fi

cd $path/$kk
rm -f POSCAR INCAR POTCAR
ln -s $i POSCAR
ln -s $path/INCAR .
ele=`sed -n 6p POSCAR`
for i in $ele
do
cat $path/POT_$i >>POTCAR
done
let kk=kk+1
done
46 changes: 46 additions & 0 deletions shell/slurm-submit-parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
path=`pwd`
if [ ! -d $path/job ];then
mkdir $path/job
fi
group_size=5
total_task=1495
numb_task=`python -c "print(int($total_task/$group_size)-1)"`
echo $numb_task
list=`seq 0 $numb_task`
for i in $list
do
k1=`echo "${group_size}*$i+1" | bc`
k2=`echo "${group_size}*($i+1)" | bc`
echo $k1 $k2
cat>$path/job/job-${i}-opt.sub<<!
#!/usr/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=28
#SBATCH --partition=cpu
#SBATCH --get-user-env
#SBATCH --job-name=AlMg-$i
#SBATCH --output=out-$i
#SBATCH --error=err-$i
#SBATCH --mem=200G
module load intel/2018.4
module load vasp/5.4.4
!
for kk in `seq $k1 $k2`
do
cat>>$path/job/job-${i}-opt.sub<<!
echo -----------sys-$kk----------
if [ -f $path/$kk/tago ];then
echo "ok"
else
cd $path/$kk/
mpirun -np 28 vasp_std > runlog
touch tago
fi
!
done
cd $path/job
#sbatch job-${i}-opt.sub
done

0 comments on commit 8ee62af

Please sign in to comment.