forked from hanig/TEISER
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubmit_parallel_scripts.pl
50 lines (41 loc) · 1.19 KB
/
submit_parallel_scripts.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/perl
my $teiserdir ;
BEGIN{
if ((!$ENV{TEISERDIR}) || ($ENV{TEISERDIR} eq '')) {
$teiserdir="./" ;
print "The TEISERDIR environment variable is not set. It is set to default.\n";
}
else{
print "The TEISERDIR environment variable is".$ENV{TEISERDIR}."\n" ;
$teiserdir = $ENV{TEISERDIR};
}
}
my $programdir = $teiserdir."/Programs" ;
my $scriptdir = $teiserdir."/Scripts" ;
my $pwd = `pwd`; $pwd =~ s/\n//;
use lib "$teiserdir/Scripts";
use PBS ;
use strict;
use Sets;
use Table;
use Getopt::Long;
use Data::Dumper;
my $dirname = shift @ARGV ;
my $expfile = shift @ARGV ;
for (my $i=0 ; $i<19 ; $i++){
my $pbs = PBS->new ;
my $seedfile = "$dirname/filtered.%02d.bin"
my $dataoutfile = "$dirname/filtered.%02d.txt"
$pbs->setScriptName("$seedfile.script");
$pbs->addCmd("export TEISERDIR=$teiserdir") ;
$pbs->addCmd("cd $pwd") ;
$pbs->addCmd("perl $programdir/mi_mi_seed.pl -seedfile $seedfile -dataoutfile $dataoutfile -expfile $expfile -quantized 1") ;
my $teiser_jobid ;
if ($submit==0){
$pbs->execute ;
}elsif ($submit==1){
my $teiser_jobid = $pbs->submit ;
push(@dep_jobs, $teiser_jobid);
print "Submitted job $teiser_jobid.\n";
}
}