Saturday, January 2, 2016

Gordon, foreach doMC network aging run, 1.grid.network.2015Oct/net1


[hongqin@gordon-ln3 1.grid.network.2015Oct]$ cat grid_aging_gordon.pbs 
#!/bin/bash
#PBS -l nodes=1:ppn=8
#PBS -l walltime=12:30:00

module load R

echo hostname
cd /oasis/scratch/hongqin/temp_project/mactower-network-failure-simulation/1.grid.network.2015Oct
pwd

Rscript netwk_aging_sim.v0.1b.R -if1 net1/Degree4N1000_network.csv -if2 net1/Degree4N1000_EssenLookupTb.csv -l1 0.006 -l2 0.0002 -dt 0 -p 0.95 -n 50  -op net1 -od net1 -d 1 -iC 4 -h /oasis/scratch/hongqin/temp_project/mactower-network-failure-simulation/1.grid.network.2015Oct


Rscript netwk_aging_sim.v0.1b.R -if1 net1/Degree4N1000_network.csv -if2 net1/Degree4N1000_EssenLookupTb.csv -l1 0.006 -l2 0.0002 -dt 0 -p 0.89 -n 50  -op net1 -od net1 -d 1 -iC 4 -h /oasis/scratch/hongqin/temp_project/mactower-network-failure-simulation/1.grid.network.2015Oct



[hongqin@gordon-ln3 1.grid.network.2015Oct]$ cat grid_aging_gordon.pbs.e2390416
Loading required package: iterators
Loading required package: parallel
Error in library(GetoptLong) : there is no package called 'GetoptLong'
Execution halted
Loading required package: iterators
Loading required package: parallel
Error in library(GetoptLong) : there is no package called 'GetoptLong'
Execution halted

Try to install GetoptLong 
[hongqin@gordon-ln3 1.grid.network.2015Oct]$ module load R
[hongqin@gordon-ln3 1.grid.network.2015Oct]$ 


5:22pm. I can run the R-foreach-doMC code locally. 
$ Rscript netwk_aging_sim.v0.1b.R -if1 net1/Degree4N1000_network.csv -if2 net1/Degree4N1000_EssenLookupTb.csv -l1 0.006 -l2 0.0002 -dt 0 -p 0.95 -n 50  -op net1 -od net1 -d 1 -iC 4 -h /oasis/scratch/hongqin/temp_project/mactower-network-failure-simulation/1.grid.network.2015Oct

5:30pm qsub grid_aging_gordon.pbs 
Finally worked. 

Try  shell loop 
[hongqin@gordon-ln3 1.grid.network.2015Oct]$ cat grid_aging_loopgordon.pbs 
#!/bin/bash
#PBS -l nodes=1:ppn=8
#PBS -l walltime=12:30:00

module load R

echo hostname
cd /oasis/scratch/hongqin/temp_project/mactower-network-failure-simulation/1.grid.network.2015Oct
pwd

for p in 1.0 0.98 0.95 0.94 0.93 0.92 0.9 0.89 0.88 0.87 0.86 0.85 0.82 0.8 
do
   for LOne in 0.003 0.0035 0.004 0.0045 0.005 0.0055 0.006 0.0065 0.007 0.0075 0.008
   do
      echo "$p $LOne"
      #R --vanilla --slave -f 20151101-net-sim-ginppi.R --args $LOne 0.0002 5 $p 1000
      Rscript netwk_aging_sim.v0.1b.R -if1 net1/Degree4N1000_network.csv -if2 net1/Degree4N1000_EssenLookupTb.csv -l1 $LOne -l2 $LOne/10 -dt 0 -p $p -n 50  -op net1 -od net1 -d 1 -iC 4 -h /oasis/scratch/hongqin/temp_project/mactower-network-failure-simulation/1.grid.network.2015Oct
   done
done

Note: -l2 $LOne/10 DID NOT WORK!


5:57pm
[hongqin@gordon-ln3 1.grid.network.2015Oct]$ qsub grid_aging_loopgordon.pbs 
2390490.gordon-fe2.local
This job ran for 37 minutes much longer than I thought. 



=> modified netwk_aging_sim.v0.1b.R to take default lambda2.

=>by 6:57pm,  modified grid_aging_loopgordon.pbs  for a test run. 

[hongqin@gordon-ln3 1.grid.network.2015Oct]$ cat grid_aging_loopgordon.pbs
#!/bin/bash
#PBS -l nodes=1:ppn=16
#PBS -l walltime=07:00:00:00

module load R

echo hostname
cd /oasis/scratch/hongqin/temp_project/mactower-network-failure-simulation/1.grid.network.2015Oct
pwd

for p in 1.0 0.98 0.95 0.94 0.93 0.92 0.9 0.89 0.88 0.87 0.86 0.85 0.82 0.8 
do
   for LOne in 0.003 0.0035 0.004 0.0045 0.005 0.0055 0.006 0.0065 0.007 0.0075 0.008
   do
      echo "$p $LOne"
      #R --vanilla --slave -f 20151101-net-sim-ginppi.R --args $LOne 0.0002 5 $p 1000
      Rscript netwk_aging_sim.v0.1b.R -if1 net1/Degree4N1000_network.csv -if2 net1/Degree4N1000_EssenLookupTb.csv -l1 $LOne -l2 0 -dt 0 -p $p -n 5000  -op net1 -od net1 -d 1 -iC 16 -h /oasis/scratch/hongqin/temp_project/mactower-network-failure-simulation/1.grid.network.2015Oct
   done
done

7:01pm
[hongqin@gordon-ln3 1.grid.network.2015Oct]$ qsub grid_aging_loopgordon.pbs
2390576.gordon-fe2.local
This job could run for ~450 minutes. Each n.5000 simulation only take about 4 minutes. 


It turns out that this job from 16:05 to 05:43 PST, which is almost 14 hours (840 minutes)  for 157 runs. 






No comments:

Post a Comment