#!/bin/sh #################################################################### # # set the needed environment variables . ../environment_variables #################################################################### rm -f si.scf.out si.etot_vs_ecut touch si.etot_vs_ecut start_time=`date +%s` echo $start_time for ecut in 5.0 6.0 7.0 8.0 9.0 10.0 12.0 14.0 16.0 20.0 24.0 28.0 32.0 ; do # self-consistent calculation echo $ecut cat > si.scf.in << EOF &control prefix='Si', pseudo_dir = '$PSEUDO_DIR/', outdir='$TMP_DIR/', calculation = 'scf' , restart_mode = 'from_scratch' , wf_collect = .false. , / &system ibrav= 2, celldm(1)= 10.2, nat= 2, ntyp= 1, ecutwfc = $ecut , / &electrons / ATOMIC_SPECIES Si 28.086 Si.vbc.UPF ATOMIC_POSITIONS Si 0.00 0.00 0.00 Si 0.25 0.25 0.25 K_POINTS automatic 4 4 4 1 1 1 EOF mpirun -H dell-m4800 -np 4 --map-by core $PW_ROOT/pw.x si.scf.out # mpirun -H dell-t7500 -np 6 --map-by core $PW_ROOT/pw.x si.scf.out # mpirun --mca btl_tcp_if_include "10.42.0.0/16" -H dell-m4800,dell-t7500 -np 10 --map-by core $PW_ROOT/pw.x si.scf.out grep -e 'kinetic-energy cutoff' -e ! si.scf.out | awk '/kinetic-energy/{ecut=$(NF-1)}/!/{print ecut, $(NF-1)}' >> si.etot_vs_ecut done end_time=`date +%s` elaps=$(($end_time - $start_time)) echo "This script took $elaps seconds to complete" sed -n '/Parallel version (MPI & OpenMP)/, +2p' si.scf.out sed -n '/PWSCF :/, +8p' si.scf.out