Project

General

Profile

« Previous | Next » 

Revision 92fd8a10

Added by Adam Wilson about 12 years ago

Updated script to accurately set paths for HEG tool to facilitate parallel processing of gridding procedure using swtif. Multicore package is used to parallelize which limits processing to a single node. Next step is to explore use of foreach package to allow multiple nodes

View differences:

climate/procedures/Pleiades.R
11 11

  
12 12
cat(paste("
13 13
#PBS -S /bin/bash
14
#PBS -l select=32:ncpus=4:mpiprocs=4:model=wes
15
####old PBS -l select=64:ncpus=4:mpiprocs=4:model=wes
14
##PBS -l select=1:ncpus=16:model=san
15
###PBS -l select=4:ncpus=8:model=neh
16
#PBS -l select=1:ncpus=12:model=wes
16 17
####### old: select=48:ncpus=8:mpiprocs=8:model=neh
17
#PBS -l walltime=1:00:00
18
#PBS -l walltime=10:00:00
18 19
#PBS -j oe
19 20
#PBS -m e
20 21
#PBS -V
21 22
####PBS -W group_list=s1007
22
#PBS -q devel
23
###PBS -q devel
23 24
#PBS -o log/log_^array_index^
24 25
#PBS -o log/log_DataCompile
25 26
#PBS -M adam.wilson@yale.edu
......
35 36
  source /usr/local/lib/global.profile
36 37
  source /u/awilso10/.bashrc
37 38
## export a few important variables
39
  export NCORES=24  # use to limit mclapply() to set nubmer of cores, should be select*ncpus above
38 40
  export PATH=$PATH:/nobackupp1/awilso10/bin:/nobackupp1/awilso10/software/bin
39 41
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/nobackupp1/awilso10/software/lib
40
  export MRTDATADIR=/nobackupp1/awilso10/software/heg/data
41
  export PGSHOME=/nobackupp1/awilso10/software/heg
42
  export MRTBINDIR=/nobackupp1/awilso10/software/TOOLKIT_MTD
43 42
  export R_LIBS=\"/u/awilso10/R/x86_64-unknown-linux-gnu-library/2.15/\"
44 43
  export TMPDIR=/nobackupp1/awilso10/mod06/tmp
44
## HEG related variables
45
  export MRTDATADIR=/nobackupp1/awilso10/software/heg/data
46
  export PGSHOME=/nobackupp1/awilso10/software/heg/TOOLKIT_MTD
47
  export HEGUSER=ME
45 48
## load modules
46 49
  module load gcc mpi-sgi/mpt.2.06r6 hdf4 udunits R nco
47 50
## Run the script!
51
## current version not parallelizing across nodes!
48 52
  TMPDIR=$TMPDIR Rscript --verbose --vanilla /u/awilso10/environmental-layers/climate/procedures/MOD06_L2_process.r 
49 53
exit 0
54
exit 0
50 55
",sep=""),file="MOD06_process")
51 56

  
52 57
### Check the file
53 58
system("cat MOD06_process")
54 59
#system("cat ~/environmental-layers/climate/procedures/MOD06_L2_process.r")
55 60

  
61
## check queue status
62
system("/u/scicon/tools/bin/node_stats.sh")
63

  
56 64
## Submit it (and keep the pid)!
57 65
pid=system("qsub MOD06_process",intern=T); pid; pid=strsplit(pid,split="[.]")[[1]][1]
58 66

  
59 67
#system("qsub MOD06_process")
60 68

  
61 69
## work in interactive mode
62
#system("qsub -I -l walltime=1:00:00 -lselect=1:ncpus=2:model=wes -q devel")
70
# system("qsub -I -l walltime=1:00:00 -lselect=2:ncpus=16:model=san -q devel")
63 71

  
64 72
## check progress
65 73
system("qstat -u awilso10")
74
system(paste("/u/scicon/tools/bin/qps ",pid))
66 75
system(paste("qstat -t -x",pid))
67 76

  
68 77
system("qstat devel ") 

Also available in: Unified diff