#! /usr/bin/perl
# Written by T. Barras and S. Metson
# Resubmits failed MadGraph jobs, to be run in the SubProcesses directory
opendir(DIR, ".");
while(defined($file=readdir(DIR))){
if($file=~/^P.+_.+/){
opendir(SUBDIR,"./$file");
while(defined($subfile=readdir(SUBDIR))){
if($subfile=~/wait\.ajob/){
#print"$file\n";
#print"$subfile\n";
$subfile=~s/wait\.//;
#print"$subfile\n";
$name = substr($file,0,13)."_".substr($subfile,4,1);
#Just to check its not over qsubs 15char limit
$name = substr($name,0,14);
#print"$name\n";
chdir("./$file");
#print"qsub " . $subfile . " -q bulk -N " . $name."\n";
system("qsub " . $subfile . " -q bulk -N " . $name);
chdir("../");
}
}
close(SUBDIR);
}
}
close(DIR);
Thursday, January 20, 2005
Command for cat'ing MadGraph events together
grep -v '#' file2|cat file1 - > file0
This will strip the header from file2 and create file0 as a sum of file1 and file2. It's probably best to have file1 as the bigger of the two files to join. The "-" takes the stdout from the grep as the input to the cat.
This will strip the header from file2 and create file0 as a sum of file1 and file2. It's probably best to have file1 as the bigger of the two files to join. The "-" takes the stdout from the grep as the input to the cat.
Tuesday, January 04, 2005
Subscribe to:
Comments (Atom)