📄 symmetry-suite
字号:
#!/bin/shno_procs=1batchcount=0batchstart=0totalcount=0c=parameters.inin=10clearscen=1clearout=1clearerr=0#no_nodes=$[ 32 - `showq | grep "Nodes Active" | awk '{print $1}'`]echo $no_nodesno_nodes=1echo "using $no_procs processors and $no_nodes nodes"echo "doing $n runs per parameter combination"batchsize=$[$no_procs*$no_nodes]echo "batchsize=$batchsize"echo ""f=.$$alg_vals="Node_Statistic"#alg_vals="Node_HTRefine Node_Savvides Node_EuclRefinePP"#alg_vals="Node_Statistic"multi_vals="true"a_vals="0.33"#a_vals="0.05"#a_vals="0.025 0.05 0.075 0.1 0.15 0.2"# Do equal_pairsp2_vals="true false"p1min_anc_vals="0"p1max_anc_vals="-1"#fl_vals="1 2 3 4 6 8 10"fl_vals="1"#fl_vals="-1 2 3 4 5 6 8"top_vals="PathPA"#top_vals="RandomPA"#top_vals="Random RandomPA GridRand"nn_vals="337"#nn_vals="225"#nn_vals="100 225"#pv_vals="0.1 0.2 0.3"pv_vals="0.2"scen_vals="scenario100"#v_vals="0.05 0.1 0.2 0.3"#v_vals="0 0.15 0.25"v_vals="0.025"#v_vals="0 0.01 0.025 0.05 0.075 0.1 0.15 0.25 0.35 0.5"#v_vals="0 0.025 0.05 0.1 0.15 0.2 0.3"r_vals="14"#r_vals="14"#r_vals="8.5 9 9.5 10 10.5 11 11.5 12 12.5 13 13.5 14 14.5 15 15.5 16"var0_vals="0"var1_vals="0"var2_vals="0"tri_alg_vals="0"#tri_alg_vals="0 1"rl_vals="0"#algorithmfor alg in $alg_valsdofor m in $multi_valsdo#anchor fracfor a in $a_valsdo#2nd phasefor p2 in $p2_valsdo#min anchors in p1for p1min_anc in $p1min_anc_valsdo#max anchors to use in p1for p1max_anc in $p1max_anc_valsdo#limit floodingfor fl in $fl_valsdo#topology typefor top in $top_valsdo#number of nodes, only relevant if top!=StandardFormat(Blind)for nn in $nn_valsdo#variance of anchor position, only relevant if top!=StandardFormat(Blind)for pv in $pv_valsdo#scenario file to read if top==StandardFormat(Blind)for scen in $scen_valsdo#rangefor r in $r_valsdo#range variance for vari in $v_valsdo#first multi purpose parameterfor var0 in $var0_valsdo#second multi purpose parameterfor var1 in $var1_valsdo#third multi purpose parameterfor var2 in $var2_valsdo#triangulation or minmax algorithmfor tri_alg in $tri_alg_valsdo#limit refinefor rl in $rl_valsdo#random seedfor s in `seedtool g 1 1000000 $n`do#if [ $alg = Node_HTRefine -a $tri_alg != 0 ]; then# continue#fi#if [ $alg = Node_Savvides -a $tri_alg != 1 ]; then# continue#fi#if [ $alg = Node_EuclRefinePP -a $tri_alg != 0 ]; then# continue#fi o=`basename $c .ini`-a$a-r$r-v$vari-n$n-p2$p2-fl$fl-$alg-$m-$top-$nn-$scen-$pv-$p1min_anc-$p1max_anc-$var0-$var1-$var2-$batchcount echo "Writing parameter file $f-$batchcount" echo "[General]" > $f-$batchcount echo "gen0-seed = $s" >> $f-$batchcount echo "gen1-seed = $s" >> $f-$batchcount echo "[Parameters]" >> $f-$batchcount echo "refine.top.topology.anchor_frac = $a" >> $f-$batchcount echo "refine.algorithm = \"$alg\"" >> $f-$batchcount echo "refine.do_2nd_phase = true" >> $f-$batchcount echo "refine.equal_pairs = $p2" >> $f-$batchcount echo "refine.phase1_min_anchors = $p1min_anc" >> $f-$batchcount echo "refine.phase1_max_anchors = $p1max_anc" >> $f-$batchcount echo "refine.flood_limit = $fl" >> $f-$batchcount echo "refine.refine_limit = $rl" >> $f-$batchcount echo "refine.multihop = $m" >> $f-$batchcount echo "refine.topology = \"$top\"" >> $f-$batchcount echo "refine.top.topology.num_nodes = $nn" >> $f-$batchcount echo "refine.top.topology.pos_variance = $pv" >> $f-$batchcount echo "refine.top.topology.sf.filename = \"$scen\"" >> $f-$batchcount echo "refine.top.topology.range = $r" >> $f-$batchcount echo "refine.top.topology.range_variance = $vari" >> $f-$batchcount echo "refine.top.topology.path = \"20,20-80,20;80,20-80,80;80,80-20,80;20,80-20,20;\"" >> $f-$batchcount #echo "refine.top.topology.path = \"20,20-80,80;80,20-20,80;\"" >> $f-$batchcount echo "refine.var0 = $var0" >> $f-$batchcount echo "refine.var1 = $var1" >> $f-$batchcount echo "refine.var2 = $var2" >> $f-$batchcount echo "refine.tri_alg = $tri_alg" >> $f-$batchcount echo "refine.top.topology.path_variance = 0" >> $f-$batchcount echo "refine.outputfile = \"output/scenario-$o-s$s\"" >> $f-$batchcount #cat $f-$batchcount echo $batchsize if [ $batchcount = $[$batchsize-1] ] then echo "Processing regular batch (runs $batchstart through $totalcount)" echo "" ./call_refine 0 $no_nodes $c $f if [ $clearout = 1 ] then rm output/log*out fi if [ $clearerr = 1 ] then grep -h RAWDATA output/log*err | sed s/RAWDATA\ // >> output/summary rm output/log*err fi if [ $clearscen = 1 ] then rm output/scenario* fi batchcount=0 batchstart=$[$totalcount+1]# Need to fix this. showq lags to much so batchcount become 0.. :(# no_nodes=$[ 32 - `showq | grep "Nodes Active" | awk '{print $1}'`] batchsize=$[$no_procs*$no_nodes] echo "new batchsize=$batchsize" rm -rf .$$* else batchcount=$[$batchcount+1] fi totalcount=$[$totalcount+1]done #refine limitdone #seeddone #var2done #var1done #var0done #tri_algdone #range variancedone #rangedone #scenario filedone #pos_variancedone #numnodesdone #topologydone #flood limitdone #phase1 max anchorsdone #phase1 min anchorsdone #do_phase2done #anchor fracdone #multihopdone #algorithmif [ $batchcount -gt 0 ]then echo "Processing left over jobs. (runs $batchstart through $[$totalcount-1]) (Not enough for full batch)" last_no_nodes=$[ $batchcount/$no_procs + 1 ]echo $last_no_nodes ./call_refine $last_no_nodes $c $f output/log-$o if [ $clearout = 1 ] then rm output/log*out fi if [ $clearerr = 1 ] then grep -h RAWDATA output/log*err | sed s/RAWDATA\ // >> output/summary rm output/log*err fi if [ $clearscen = 1 ] then rm output/scenario* fifirm -rf .$$*if [ $clearerr = 0 ]then grep -h RAWDATA output/log*err | sed s/RAWDATA\ // >> output/summaryfi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -