- 相关推荐
脚本中语句整理
一、三个节点
172.20.130.2 pengqiong pengqiong@123
202.197.234.149 linjin lijin*120384
202.197.234.6 node6work2 nohup sh run.sh
二、脚本投任务
172.20.130.2中脚本,开头固定格式如下: #PBS -N MoSi2 #(名称)
#PBS -l nodes=1:ppn=32
#PBS -j oe
#PBS -q middle
#PBS -l walltime=1000:00:00
cd $PBS_O_WORKDIR
NP=`cat $PBS_NODEFILE|wc -l`
source /public/software/http://cankao.gcw818.com
for i in 0.05 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15
do
cp POSCAR $i/ cd $i/
cat>>INCAR<<! ISPIN=2
!
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj |/public/software/vasp/date_lj.sh > log cd ..
done
cd /public/home/pengqiong/MoSi2/C11b-stable/7/2/scf/scf/ chmod 777 vasp.pbs
qusb vasp.pbs
for i in NoH H HH
do mkdir $i/
cp INCAR* KPOINTS* $i/ cp POSCAR$i $i/POSCAR
cp POTCAR$i $i/POTCAR
cd $i/
mkdir relax/
cp INCARrelax KPOINTS POTCAR POSCAR relax/
cd relax/
cp INCARrelax INCAR
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj |/public/software/vasp/date_lj.sh cp CONTCAR ../POSCAR
cd ..
cp INCARscf INCAR
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj |/public/software/vasp/date_lj.sh
mkdir dos/
cp INCARdos KPOINTS POTCAR POSCAR CHGCAR dos/
cd dos/
cp INCARdos INCAR
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj |/public/software/vasp/date_lj.sh cd ..
mkdir bands1/
cp INCARbands KPOINTSbands1 POTCAR POSCAR CHGCAR bands1/
cd bands1/
cp KPOINTSbands1 KPOINTS
cp INCARbands INCAR
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj |/public/software/vasp/date_lj.sh cd ..
mkdir bands2/
cp INCARbands KPOINTSbands2 POTCAR POSCAR CHGCAR bands2/
cd bands2/
cp KPOINTSbands2 KPOINTS
cp INCARbands INCAR
《脚本中语句整理》全文内容当前网页未完全显示,剩余内容请访问下一页查看。
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj |/public/software/vasp/date_lj.sh cd ..
mkdir bands3/
cp INCARbands KPOINTSbands3 POTCAR POSCAR CHGCAR bands3/
cd bands3/
cp KPOINTSbands3 KPOINTS
cp INCARbands INCAR
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj |/public/software/vasp/date_lj.sh cd ..
cd ..
done
for i in HH H NoH
do
cd $i/
mkdir berry/
cp INCARberry KPOINTSberry POTCAR POSCAR CHGCAR berry/
cd berry/
cp INCARberry INCAR
cp KPINTSberry KPOINTS
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj |/public/software/vasp/date_lj.sh >logberry cd ..
cd ..
done
for i in 7 8 9 10 11 12 13 14 15 16 17 18 19 20
do
mkdir $i
cp INCAR POTCAR POSCAR $i/
cd $i/ cat>KPOINTS<<! A
0 G
$i $i 1
!
time -p /home/lijin/software/openmpi/openmpi_install/bin/mpirun -np 1 vasp5.3 | dateify.sh >logscf
E=`grep TOTEN OUTCAR | tail -1 | cut -c28-45`
Mag=`grep mag vasp.log | cut -c 70-80` printf " %18.16f %18.16f\n" $E $Mag >>../dat cd ..
done
cp INCARscf INCAR
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj |/public/software/vasp/date_lj.sh>logscf
mkdir dos/
cp INCARdos KPOINTS POTCAR POSCAR CHGCAR dos/
cd dos/
cp INCARdos INCAR
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj |/public/software/vasp/date_lj.sh>logdos cd ..
mkdir bands1/
cp INCARbands KPOINTSbands1 POTCAR POSCAR CHGCAR bands1/
cd bands1/
cp KPOINTSbands1 KPOINTS
cp INCARbands INCAR
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj|/public/software/vasp/date_lj.sh>logbands1 cd ..
mkdir bands2/
cp INCARbands KPOINTSbands2 POTCAR POSCAR CHGCAR bands2/
《脚本中语句整理》全文内容当前网页未完全显示,剩余内容请访问下一页查看。
cd bands2/
cp KPOINTSbands2 KPOINTS
cp INCARbands INCAR
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj|/public/software/vasp/date_lj.sh>logbands2 cd ..
mkdir bands3/
cp INCARbands KPOINTSbands3 POTCAR POSCAR CHGCAR bands3/
cd bands3/
cp KPOINTSbands3 KPOINTS
cp INCARbands INCAR
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp_lj|/public/software/vasp/date_lj.sh>logbands3
cd ..
cd ..
done
#PBS -N vasp #PBS -l nodes=1:ppn=32
#PBS -j oe
#PBS -q middle
#PBS -l walltime=1000:00:00
cd $PBS_O_WORKDIR
NP=`cat $PBS_NODEFILE|wc -l`
source /public/software/http://cankao.gcw818.com
mpirun -machinefile $PBS_NODEFILE -np $NP --bind-to-core /public/software/vasp/vasp52 >&vasp.log
Ncpu=16
vaspname=vasp5.2
for i in 7 8 9 10 11 12 13 14 15 16
do mkdir $i/
cp INCAR POSCAR POTCAR $i/ cd $i/ cat>>KPOINTS<<!
A 0
G
$i $i 1
0 0 0
!
time -p mpirun -np $Ncpu $vaspname >log
E=`grep TOTEN OUTCAR |tail -1 |cut -c32-42`
Mag=`grep mag= log |tail -1 |cut -c68-85`
echo $i $Mag $E >>../total.dat
cp CONTCAR ../POSCAR$i
cd ..
Done
for i in 13 14 15
do
#-----------no magnetic----------
mkdir NM/
cp INCAR* POSCAR POTCAR NM/
cd NM/
mkdir $i/
cp INCAR* POSCAR POTCAR $i/
cd $i/
cp INCARrelax INCAR cat>KPOINTS<<! A
G
$i $i 1
0.0 0.0 0.0
!
time -p mpirun -np 16 vasp5.2 >logrelax
cp INCARscf INCAR
cp CONTCAR POSCAR
time -p mpirun -np 16 vasp5.2 >logscf
cd ..
cd ..
done
for i in 12 13 14 15
do
#----------Ferro magnetic---------
mkdir FM/
cp INCAR* POTCAR POSCAR FM/
cd FM/
mkdir $i/
cp INCAR* POTCAR POSCAR $i/
cd $i/
cp INCARrelax INCAR
cat>>INCAR<<!
ISPIN=2
!
cat>KPOINTS<<!
A
G
$i $i 1
0.0 0.0 0.0
!
time -p mpirun -np 16 vasp5.2 >logrelax
cp INCARscf INCAR
cat>>INCAR<<!
ISPIN=2
!
cp CONTCAR POSCAR
time -p mpirun -np 16 vasp5.2 >logscf
cd ..
cd ..
done
cd /home/node6work2/PQ/for/5*5/ chmod 777 run.sh
nohup sh run.sh
for n in $(seq 1 8)
do
echo $n
/home/lijin/software/openmpi/openmpi_install/bin/mpirun -np $n vasp5.3 | dateify.sh
t=`grep "Total CPU" OUTCAR |awk '{print $6}'`
echo $n $t >>test_p.dat
done
for((j=0;j<21;j++))
do for((i=0;i<21;i++))
do jj=`echo "scale=8.8;$j/20"|bc` ii=`echo "scale=8.8;$i/20"|bc`
cat>>KPOINTSber<<!
$ii $jj 0.00000000 1.00 !
done
done
for i in 7 8 9 10 11 12 13 14 15 16 17 18 19 20 do
mkdir $i cp INCAR POTCAR POSCAR $i/
cd $i/
cat>KPOINTS<<!
A
G
$i $i 1
!
time -p /home/lijin/software/openmpi/openmpi_install/bin/mpirun -np 1 vasp5.3 | dateify.sh >logscf E=`grep TOTEN OUTCAR | tail -1 | cut -c28-45`
Mag=`grep mag vasp.log | cut -c 70-80`
printf " %18.16f %18.16f\n" $E $Mag >>../dat
cd ..
done
NCPU=24 vaspname=vasp5.3 for i in NoH H HH
do mkdir $i/
cp INCAR* KPOINTS POTCAR $i/
cp POSCAR$i $i/POSCAR
cp POTCAR$i $i/POTCAR
cd $i/
#--------------------no magnetic------------
mkdir NM/
cp INCAR* KPOINTS* POSCAR POTCAR NM/
cd NM/
cp INCARrelax INCAR
/home/lijin/software/openmpi/openmpi_install/bin/mpirun -np $NCPU $vaspname | dateify.sh >logrelax cp INCARscf INCAR
cp CONTCAR POSCAR
/home/lijin/software/openmpi/openmpi_install/bin/mpirun -np $NCPU $vaspname | dateify.sh >logscf cd ..
#----------------Ferro magnetic-------------
mkdir FM/
cp INCAR* KPOINTS POTCAR POSCAR FM/
cd FM/
cp INCARrelax INCAR
cat>>INCAR<<!
ISPIN=2
!
/home/lijin/software/openmpi/openmpi_install/bin/mpirun -np $NCPU $vaspname | dateify.sh >logrelax cp INCARscf INCAR
cat>>INCAR<<!
ISPIN=2
!
cp CONTCAR POSCAR
/home/lijin/software/openmpi/openmpi_install/bin/mpirun -np $NCPU $vaspname | dateify.sh >logscf
cd ..
#----------antiferro magnetic--------------- #mkdir AFM/
#cp INCAR* POSCAR KPOINTS POTCAR AM/ #cd AFM/
#cp INCARrelax INCAR
#cat >>INCAR<<!
#ISPIN=2
#MAGMOM=
#/home/lijin/software/openmpi/openmpi_install/bin/mpirun -np $NCPU $vaspname | dateify.sh >logrelax #cp INCARscf INCAR
#cp CONTCAR POSCAR
#/home/lijin/software/openmpi/openmpi_install/bin/mpirun -np $NCPU $vaspname | dateify.sh >logscf #cd ..
#-----------------------------------
cd .. # exit $i
done
cd /home/lijin/PQ/SMS/2L/
chmod 777 run.sh
./run.sh
mkdir scf/
cp INCARscf scf/INCAR
cp KPOINTSscf scf/KPOINTS
cp POTCAR POSCAR scf/
cd scf/
/home/lijin/software/openmpi/openmpi_install/bin/mpirun -np $n vasp5.3 | dateify.sh >logscf cd ..
mkdir dos/
cp INCARdos dos/INCAR
cp KPOINTSdos dos/KPOINTS
cp POTCAR POSCAR dos/
cp scf/CHG* WAVECAR dos/
cd dos/
/home/lijin/software/openmpi/openmpi_install/bin/mpirun -np $n vasp5.3 | dateify.sh >logdos rm CHG* WAVE* vasp*
cd ..
mkdir bands/ cp INCARbands bands/INCAR
cp KPOINTSbands bands/KPOINTS
cp POTCAR POSCAR bands/
cp scf/CHG* WAVECAR bands/
cd bands/
/home/lijin/software/openmpi/openmpi_install/bin/mpirun -np $n vasp5.3 | dateify.sh >logbands rm CHG* WAVE* vasp*
cd ..
#!/bin/sh
for i in 1.1 1.2 1.3 1.4 1.5 1.6 1.7 do
cat>POSCAR<<! Bi2Se3
$i
2.4189942319946462 0.0000000000000002 10.3661241500868702
-1.2094971159973227 2.0949102895767071 10.3661241500868702
-1.2094971159973227 -2.0949102895767071 10.3661241500868702
Se Bi
3 2
Selective dynamics
Direct
0.2204021036629392 0.2204021036629392 0.2204021036629392 T T T
0.7795978963370609 0.7795978963370609 0.7795978963370609 T T T
0.0000000000000000 0.0000000000000000 0.0000000000000000 T T T
0.3959198375051541 0.3959198375051542 0.3959198375051542 T T T
0.6040801624948458 0.6040801624948458 0.6040801624948458 T T T
0.00000000E+00 0.00000000E+00 0.00000000E+00
0.00000000E+00 0.00000000E+00 0.00000000E+00
0.00000000E+00 0.00000000E+00 0.00000000E+00
0.00000000E+00 0.00000000E+00 0.00000000E+00
0.00000000E+00 0.00000000E+00 0.00000000E+00
!
Echo “a=$i angstrom”; vasp
E=`grep “TOTEN” OUTCAR | tail -1 | awk{printf”%12.6f\n”,$5}` E=`grep “volume” OUTCAR | tail -1 | awk{printf”%12.4f\n”,$5}`
M=`grep ”number of electron” OUTCAR | tail -1 | awk {printf”%12.4f\n”,$6}` cp OUTCAR outcar.$i
echo $V $E >>EtVo.dat
Echo $i $E >>SUMMAY
Echo $i $M >>mag
一些常用sql脚本整理2017-04-26 17:32 | #2楼
一些实施和维护人员经常遇到的问题,在这稍做整理,希望对大家有所帮助。 注:执行这些脚本前,一定要备份数据。在测试环境中测试没有问题后,方可使用。
1.预算系统预制用户tbadmin删除,如何恢复?
首先,建立前台建立用户tbadmin,后执行以下脚本
update sm_user set cuserid= 'TB_NEW100000000004OP' where user_code='tbadmin' commit
2.5x版本固定资产做变动或者减少的时候,经常参照不到,如何处理?
问题原因:已经对该卡片做过变更操作,但是没有确认完成,就有可能造成单据丢失 解决sql:
通过公司编码查出公司pk
se-le-ct pk_corp from bd_corp where unitcode='3103' 1082
通过卡片编码和公司pk.查出卡片pk和变动单pk
se-le-ct pk_card, bill_code from fa_card where card_code='0000000001' and pk_corp='1082' 查出bill_code 为1082V510000000000HR0
通过变动单pk,查询变动单号
se-le-ct bill_code from fa_log where code='1082V510000000000HR0'
查出bill_code 为0_HG_BD0806180001
根据以上查询出结果,进行修改,删除变动单垃圾数据,删除前要查询唯一性,及备份相应的表
se-le-ct * from fa_altersheet where altersheet_code='HG_BD0806180001' and pk_corp='1082' update fa_altersheet set dr=1 where altersheet_code='HG_BD0806180001' and pk_corp='1082';
se-le-ct * from fa_bill where billcode='HG_BD0806180001' and pk_corp='1082'
update fa_bill set dr=1 where billcode='HG_BD0806180001' and pk_corp='1082';
se-le-ct * from fa_card where bill_code='0_HG_BD0806180001'
update fa_card set bill_code='' where bill_code='0_HG_BD0806180001';
se-le-ct * from fa_log where bill_code='0_HG_BD0806180001'
update fa_log set bill_code='' where bill_code='0_HG_BD0806180001'
3.删除非现金科目的现金流量辅助信息
执行以下sql,注意替换相应的账簿pk
create table ufbf2017071501 as se-le-ct * from gl_cashflowcase where pk_glorgbook = '0001V5100000000013SC' and pk_detail in(
se-le-ct distinct pk_detail from gl_detail,gl_voucher,bd_accsubj where gl_voucher.pk_voucher = gl_detail.pk_voucher and
gl_detail.pk_accsubj = bd_accsubj.pk_accsubj and gl_voucher.pk_glorgbook = '0001V5100000000013SC'
and bd_accsubj.CASHBANKFLAG = 0)
delete from gl_cashflowcase where pk_glorgbook = '0001V5100000000013SC' and pk_detail in(
se-le-ct distinct pk_detail from gl_detail,gl_voucher,bd_accsubj where gl_voucher.pk_voucher = gl_detail.pk_voucher and
gl_detail.pk_accsubj =
'0001V5100000000013SC' bd_accsubj.pk_accsubj and gl_voucher.pk_glorgbook =
and bd_accsubj.CASHBANKFLAG = 0)
4.余额表翻倍
问题原因:有可能是期初执行ctrl+alt+t后,没有马上重建余额表
一定要先备份数据库
查找有问题的主体账簿主键(pk_glorgbook)
se-le-ct pk_glorgbook from bd_glorgbook where glorgbookcode = ''
执行脚本,pk_glorgbook = '' 中写入有问题的主体账簿主键,注意修改相应年度
update gl_detail set debitamount=debitamount/2,creditamount=creditamount/2,
fracdebitamount=fracdebitamount/2,fraccreditamount=fraccreditamount/2,
localdebitamount=localdebitamount/2,localcreditamount=localcreditamount/2,
debitquantity=debitquantity/2,creditquantity=creditquantity/2
where pk_voucher in (se-le-ct pk_voucher from gl_voucher where year = ''
and voucherkind = 2 and pk_glorgbook = '' and dr = 0)
【脚本中语句整理】相关文章:
flash课件制作常用的脚本语句09-24
校园电影脚本09-24
电影脚本制作09-24
平面拍摄脚本09-24
婚礼摄像脚本09-24
电影脚本写作09-24
牙膏广告脚本09-24
宣传短片脚本09-24
CS各种脚本解释全解包含经典复活变身脚本09-24