110 likes | 260 Views
voodoo. D0 on EDG. Get certificate. certificate.nikhef.nl Organization nikhef ? Open ssl necessary on dors?. Install mcp11. Make tarballs of mcc-dist mc_runjob Make rpm of mcc-dist LBCG mcc-dist Install mc_runjob on user interface mc_runjob checks existence of card file.
E N D
voodoo D0 on EDG
Get certificate • certificate.nikhef.nl • Organization nikhef ? • Open ssl necessary on dors?
Install mcp11 • Make tarballs of • mcc-dist • mc_runjob • Make rpm of mcc-dist • LBCG mcc-dist • Install mc_runjob on user interface • mc_runjob checks existence of card file
mc_runjob (1) • Runs on user interface • Generates directory structure • Tars d/s • Puts d/s in sandbox • Submits job to grid
mc_runjob (2) • Batch job • Unpacks tar file • Executes mcc • Stores output in compute element
Useful commands • grid-proxy-init • grid-proxy-info –all • dg-job-submit • dg-job-status • dg-job-get-output • dg-job-cancel • dg-job-list-match
dg-job-submit d0.jdl • dg-job-get-output \ • https://lxshare0382.cern.ch:7846/192.16.186.233/ \ • 135912320218356?lxshare0382.cern.ch:7771 • cp /tmp/135912320218356/* .
Executable = "/bin/sh"; StdOutput = "d0mcc.out"; StdError = "d0mcc.err"; InputSandbox = {"submit","macro"}; OutputSandbox = {"d0mcc.err","d0mcc.out"}; Arguments = "submit macro"; Requirements = Member(other.RunTimeEnvironment,"D0MCC-0.1-4"); D0.jdl #!/bin/sh macro=$1 pwd=`pwd` cd /d0/mcc/mcc-dist . mcc_dist_setup.sh cd $pwd dir=/home/willem/mc_runjob/py_script python $dir/Linker.py script=$macro submit
macro SaveOnMake attach samglobal cfg samglobal define string JobName Request-184- cfg samglobal define int RequestID 184 cfg samglobal define string DestinationDir /home/dzero002/local/dest cfg samglobal define string CurrentDir /home/dzero002/local/curr cfg samglobal define string Phase mcp10 cfg samglobal define string OriginName nikhef cfg samglobal define string FacilityName testbed cfg samglobal define string ProducedByName Willem van Leeuwen cfg samglobal define string GroupName mcc99 attach pythia cfg pythia define string CardfileDir np cfg pythia define string CardfileVersion v00-03-43 cfg pythia define float CollisionEnergy 1960.0 cfg pythia define string Production qcd cfg pythia define string Decay incl cfg pythia define string Generator pythia cfg pythia define string D0Release p10.15.03 cfg pythia define int UseMaxopt 1 cfg pythia define float PtGt 40. cfg pythia define int NumRecords 2 attach runjob_testbed repeat 1 reset chain cfg pythia make seeds make job save print script cfg runjob_testbed run end return
class RunJob_testbed(RunJob_batch) : def __init__(self,name=None) : RunJob_batch.__init__(self,name) self.myType="runjob_testbed" def Run(self) : self.jobname = self.linker.CurrentJob() self.jobnaam = string.splitfields(self.jobname,'/')[-1] comm = 'chmod +x ' + self.jobname commands.getoutput(comm) if self.tdconf['RunOption'] == 'RunInBackground' : RunJob_batch.Run(self) else : bq = self.tdconf['BatchQueue'] dirn = os.path.dirname(self.jobname) print dirn comm = 'sh ' + self.jobnaam + ' `pwd`'
self.batch_file=open(dirn+'/batch','w') self.batch_file.write('#!/bin/sh\n') self.batch_file.write('cd /d0/mcc/mcc-dist\n') self.batch_file.write('. mcc_dist_setup.sh\n') self.batch_file.write('cd '+dirn+'\n') self.batch_file.write('export PATH=`pwd`:$PATH \n') self.batch_file.write(comm+' > log\n') self.batch_file.close() runcommand('cd ' + dirn + ' ; sh ./batch')