copy the following file and name it xxx.py.
$ vi get_sam_ww.py
import os, sys, time
############################################################################
#
project_definition = "singletop_recovery_p20mu_201002271038"
sam_station = os.environ['SAM_STATION']
snapshot_version = 'new'
appname = 'generic'
version = "1"
group = "dzero"
max_file_amt = 1000
##verbosity = "--verbose"
verbosity = ""
# Give up on all exceptions
give_up = 1
def file_ready(filename):
now = time.strftime( '%H:%M:%S', time.localtime(time.time()) )
print("<%s> MY PROJECT: working on a file named >%s<" % (now,filename))
# Modify the destination below to copy the files somewhere
os.system('cp %s /work/landshark-clued0/weigang/TriggerStudy/MU/SAM_WW_copy' % filename)
return
run the python script:
weak-clued0:~/work_area/TriggerStudy/MU/Topos> setup sam
weak-clued0:~/work_area/TriggerStudy/MU/Topos> sam run project get_sam_ww.py
<03/01/10 16:54:01> Submission information has been written into the file: /home/weigang/sam_batch_submit_info.weigang_20100301165400.txt
<03/01/10 16:54:01> Job submission was successful:
Project name: weigang_20100301165400
Batch system: pbs
Batch queue: GENERAL
you will get an email like below. after it's finished. it's very fast.
PBS Job Id: 3260559.timber-clued0.fnal.gov
Job Name: sam_batch_project.weigang_ 20100301165400.sh
Execution terminated
Exit_status=0
resources_used.cput=00:00:15
resources_used.mem=20340kb
resources_used.vmem=61100kb
resources_used.walltime=00:02: 57
$ vi get_sam_ww.py
import os, sys, time
############################################################################
#
project_definition = "singletop_recovery_p20mu_201002271038"
sam_station = os.environ['SAM_STATION']
snapshot_version = 'new'
appname = 'generic'
version = "1"
group = "dzero"
max_file_amt = 1000
##verbosity = "--verbose"
verbosity = ""
# Give up on all exceptions
give_up = 1
def file_ready(filename):
now = time.strftime( '%H:%M:%S', time.localtime(time.time()) )
print("<%s> MY PROJECT: working on a file named >%s<" % (now,filename))
# Modify the destination below to copy the files somewhere
os.system('cp %s /work/landshark-clued0/weigang/TriggerStudy/MU/SAM_WW_copy' % filename)
return
run the python script:
weak-clued0:~/work_area/TriggerStudy/MU/Topos> setup sam
weak-clued0:~/work_area/TriggerStudy/MU/Topos> sam run project get_sam_ww.py
<03/01/10 16:54:01> Submission information has been written into the file: /home/weigang/sam_batch_submit_info.weigang_20100301165400.txt
<03/01/10 16:54:01> Job submission was successful:
Project name: weigang_20100301165400
Batch system: pbs
Batch queue: GENERAL
you will get an email like below. after it's finished. it's very fast.
PBS Job Id: 3260559.timber-clued0.fnal.gov
Job Name: sam_batch_project.weigang_
Execution terminated
Exit_status=0
resources_used.cput=00:00:15
resources_used.mem=20340kb
resources_used.vmem=61100kb
resources_used.walltime=00:02:
Comments
Post a Comment
https://gengwg.blogspot.com/