Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #12 - Updated to include explicit _gc dir scan #14

Merged
merged 1 commit into from
Jul 16, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions make_cmip5_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
PJD 9 Jul 2015 - Added checkPID function
PJD 13 Jul 2015 - Added PID test before purging and regenerating xmls
- Generalize path indices using DRS cmip[5-6]/output[1-5] reference point
PJD 16 Jul 2015 - Added /cmip5_css02/scratch/_gc/ to search path (new scan)

- TODO:
Add check to ensure CSS/GDO systems are online, if not abort - use sysCallTimeout function
Expand Down Expand Up @@ -166,6 +167,7 @@ def pathToFile(inpath,start_time,queue1):

if files != [] and dirs == []:
# Append to list variable
#$#print i1,path #$#
data_paths += [path]
i1 = i1 + 1 ; # Increment counter

Expand Down Expand Up @@ -625,6 +627,10 @@ def xmlWrite(inpath,outfile,host_path,cdat_path,start_time,queue1):
queue7 = manager0.Queue(maxsize=0)
p7 = Process(target=pathToFile,args=('/cmip5_css02/cmip5/data/cmip5/',start_time,queue7))
p7.start() ; print "".join(['p7 pid: ',str(p7.ident)])
# css02_\_gc
queue8 = manager0.Queue(maxsize=0)
p8 = Process(target=pathToFile,args=('/cmip5_css02/scratch/_gc/',start_time,queue8))
p8.start() ; print "".join(['p8 pid: ',str(p8.ident)])

# Consider parallelising css02_scratch in particular - queue object doesn't play with p.map
'''
Expand Down Expand Up @@ -685,6 +691,9 @@ def job(path,id):
p7.join()
[css02_cm5_outfiles,css02_cm5_outfiles_paths,time_since_start,i1,i2,len_vars] = queue7.get_nowait()
logWrite(logfile,time_since_start,'css02_cmip5',i1,css02_cm5_outfiles,len_vars)
p8.join()
[css02_gc_outfiles,css02_gc_outfiles_paths,time_since_start,i1,i2,len_vars] = queue8.get_nowait()
logWrite(logfile,time_since_start,'css02_gc',i1,css02_gc_outfiles,len_vars)

# Generate master lists from sublists
outfiles_paths = list(gdo2_data_outfiles_paths)
Expand All @@ -694,6 +703,7 @@ def job(path,id):
outfiles_paths.extend(css02_data_outfiles_paths) ; # Add css02_data to master
outfiles_paths.extend(css02_scratch_outfiles_paths) ; # Add css02_scratch to master
outfiles_paths.extend(css02_cm5_outfiles_paths) ; # Add css02_cmip5 to master
outfiles_paths.extend(css02_gc_outfiles_paths) ; # Add css02_gc to master

outfiles = list(gdo2_data_outfiles)
outfiles.extend(gdo2_scratch_outfiles) ; # Add gdo2_scratch to master
Expand All @@ -702,6 +712,7 @@ def job(path,id):
outfiles.extend(css02_data_outfiles) ; # Add css02_data to master
outfiles.extend(css02_scratch_outfiles) ; # Add css02_scratch to master
outfiles.extend(css02_cm5_outfiles) ; # Add css02_cmip5 to master
outfiles.extend(css02_gc_outfiles) ; # Add css02_gc to master

# Sort lists by outfiles
outfilesAndPaths = zip(outfiles,outfiles_paths)
Expand Down