Skip to content

Commit

Permalink
adding files from /afs/cern.ch/group/si/slap/bin/sixdesk for reference
Browse files Browse the repository at this point in the history
  • Loading branch information
rdemaria committed Jun 23, 2014
1 parent 08db1e2 commit be768a9
Show file tree
Hide file tree
Showing 109 changed files with 4,251 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sixjobs/sixdeskenv
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export bunch_charge=1.1500e+11
# It must NOT contain a "%" (replacing "#") nor "_""_"
# It now includes the Version info e.g. v64lhc
# (If running mad6t you must have a $LHCDescrip.mask file in the subdirectory mask)
export LHCDescrip=job_tracking
export LHCDescrip=jobrefslhc_coll

# The workspace for the scripts, sixdesk.log and links to sixtrack_input, track and work,
# It must NOT contain a "%" (replacing "#") nor "__" (two consecutive underscores)
Expand Down Expand Up @@ -220,8 +220,8 @@ then
export turnsle=5
export writebinl=1000
export kinil=1
export kendl=19
export kmaxl=19
export kendl=5
export kmaxl=5
# and set up the LSF job type and queue
export lsfq=$longlsfq
export lsfjobtype=sixtracking
Expand Down
48 changes: 48 additions & 0 deletions sixutils/Bin/BNLdiffs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
1a2
> echo "uploadBNLWorkunit called: BNL=${BNL}."
8c9
< # and fort.16 files in the 'fileDir'.
---
> # and fort.16 files in the 'fileDir' and $sixdeskbnlin (fort.54) for BNL.
30c31
< memBound=100000000
---
> memBound=60000000
40c41
< # assigned to another client. Don't set this too low.
---
> # assigned to another client. Don't set this to low.
44,45d44
< delayBound=240000
< #about 3 days...
48c47
< redundancy=2
---
> redundancy=3
53c52
< copies=2
---
> copies=5
61c60
< numIssues=10
---
> numIssues=20
124a124,132
> if test "$BNL" != ""
> then
> if [ ! -f "$fileDir/$sixdeskbnlin" ]
> then
> echo "The file $fileDir/$sixdeskbnlin does not exist!"
> echo "Exiting.."
> exit 3
> fi
> fi
138c146,151
< zip $workunitName.zip fort.2 fort.3 fort.8 fort.16 >/dev/null 2>&1
---
> if test "$BNL" = ""
> then
> zip $workunitName.zip fort.2 fort.3 fort.8 fort.16 >/dev/null 2>&1
> else
> zip $workunitName.zip fort.2 fort.3 fort.8 fort.16 $sixdeskbnlin >/dev/null 2>&1
> fi
35 changes: 35 additions & 0 deletions sixutils/Bin/confirmResultDownload.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

use strict;
use FindBin;
use lib ("$FindBin::/afs/cern.ch/user/m/mcintosh/sixdesk/slap/Bin/perllib");

use TaskHandler;

my $th = new TaskHandler;

#$th->debugOn;

# creating a new TaskGroup

if ($#ARGV != 0)
{
print "error: The TaskId must be specified \n";
exit(2);
}

my $taskid = $ARGV[0];
$th->setTaskId("$taskid");
$th->setURL('http://cpss.web.cern.ch/cpss/confirm/resultdownload.asp');
#$th->setURL('http://pcitis06/');
my ($rc,$info) = $th->confirmResultDownload();

if ($rc==1)
{
print "error: $info\n";
exit(1);
}
else
{
my %data = %{$info};
print "Response: $data{'Action'}\n";
}
51 changes: 51 additions & 0 deletions sixutils/Bin/createTaskGroup.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

use strict;
use FindBin;
use lib ("$FindBin::/afs/cern.ch/user/m/mcintosh/sixdesk/slap/Bin/perllib");

use TaskHandler;

my $th = new TaskHandler;

#$th->debugOn;

# creating a new TaskGroup

if ($#ARGV != 5)
{
print "error: TaskName, TaskGroupId, ProgramId and path to data files must be specified \n";
exit(2);
}

my $TaskGroupName = $ARGV[0];
my $Description = $ARGV[1];
my $ProgramId = $ARGV[2];
my $Status = $ARGV[3];
my $Priority = $ARGV[4];
my $Comments = $ARGV[5];

$th->setTaskGroupName("$TaskGroupName");
$th->setDescription("$Description");
$th->setProgramId("$ProgramId");
$th->setStatus("$Status");
$th->setPriority("$Priority");
$th->setComments("$Comments");

$th->setURL('http://cpss.web.cern.ch/cpss/createTasks/createTaskgroup.asp');
#$th->setURL('http://pcitis06/');
my ($rc,$info) = $th->createTaskGroup();

if ($rc==1)
{
print "error: $info\n";
exit(1);
}
else
{
my %data = %{$info};
# foreach my $key (keys %data)
# {
# print $key . ": " . $data{$key} ."\n";
# };
print "TaskGroupID: $data{'TaskGroupID'}\n";
}
38 changes: 38 additions & 0 deletions sixutils/Bin/deleteTask.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

use strict;
use FindBin;
use lib ("$FindBin::Bin/perllib");

use TaskHandler;

my $th = new TaskHandler;

# $th->debugOn;

if ($#ARGV != 1)
{
print "error: TaskId and TaskGroupId must be specified \n";
exit(2);
}
my $TaskId = $ARGV[0];
my $TaskGroupId = $ARGV[1];

$th->setTaskId("$TaskId");
$th->setTaskGroupId("$TaskGroupId");
$th->setURL('http://cpss.web.cern.ch/cpss/request/deleteTask.asp');

my ($rc,$info) = $th->deleteTask();


if ($rc==1)
{
print "error: $info";
exit(1);
}
else
{
my %data = %{$info};
print "TaskId: " . $data{'TaskId'} . " in taskgroup " . $data{'TaskGroupId'} . " deleted\n";

# print "(rc,response)=($rc,$info)\n";
}
45 changes: 45 additions & 0 deletions sixutils/Bin/downloadResult.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

use strict;
use FindBin;
use lib ("$FindBin::/afs/cern.ch/user/m/mcintosh/sixdesk/slap/Bin/perllib");

use TaskHandler;

my $th = new TaskHandler;

#$th->debugOn;

if ($#ARGV != 1)
{
print "error: Both TaskGroupId and taskId must be specified \n";
exit(2);
}

my $TaskGroupID = $ARGV[0];
$th->setTaskGroupId("$TaskGroupID");

my $taskId = $ARGV[1];
my $resultFile = "sixres.tar.gz";
my $fileName = "task-" . $taskId . "-" . $resultFile;

my $resultURL = "http://cpss.web.cern.ch/cpss/results/incoming/$fileName";
my $localFile = "sixres.tar.gz" ;

# $th->setURL('http://pcitis06/');

my ($rc,$info) = $th->downloadResult($resultURL, $localFile);

if ($rc==1)
{
print "error: $info\n";
exit(1);
}
else
{
my %data = %{$info};
my @taskList = split (/\, /,$data{'ReadyTasks'} );
print "ResultsDownloaded: \n";
print "ContentLength: $data{'ContentLength'}\n";
print "OutputOk: $data{'OutputOk'}\n";

}
Loading

0 comments on commit be768a9

Please sign in to comment.