From: <bsc...@us...> - 2012-09-27 13:36:57
|
Revision: 14424 http://unicore.svn.sourceforge.net/unicore/?rev=14424&view=rev Author: bschuller Date: 2012-09-27 13:36:47 +0000 (Thu, 27 Sep 2012) Log Message: ----------- apply slurm patch from Rafal Modified Paths: -------------- tsi/trunk/CHANGES tsi/trunk/tsi/linux_slurm/GetStatusListing.pm tsi/trunk/tsi/linux_slurm/Submit.pm tsi/trunk/tsi/linux_slurm/tsi Modified: tsi/trunk/CHANGES =================================================================== --- tsi/trunk/CHANGES 2012-09-27 13:26:05 UTC (rev 14423) +++ tsi/trunk/CHANGES 2012-09-27 13:36:47 UTC (rev 14424) @@ -15,6 +15,7 @@ - new feature: ResourceReservation.pm module for Slurm - improvement: updated ResourceReservation.pm module for Maui, added to Torque TSI + - improvement: SLURM: handle reservation, better GetStatusListing.pm Version 6.5.0 ------------- Modified: tsi/trunk/tsi/linux_slurm/GetStatusListing.pm =================================================================== --- tsi/trunk/tsi/linux_slurm/GetStatusListing.pm 2012-09-27 13:26:05 UTC (rev 14423) +++ tsi/trunk/tsi/linux_slurm/GetStatusListing.pm 2012-09-27 13:36:47 UTC (rev 14424) @@ -72,10 +72,12 @@ my %decoder = {}; $decoder{'CANCELLED'} = 'UNKNOWN'; $decoder{'COMPLETED'} = 'RUNNING'; + $decoder{'CONFIGURING'} = 'QUEUED'; $decoder{'COMPLETING'} = 'RUNNING'; $decoder{'FAILED'} = 'UNKNOWN'; $decoder{'NODE_FAIL'} = 'UNKNOWN'; $decoder{'PENDING'} = 'QUEUED'; + $decoder{'PREEMPTED'} = 'SUSPENDED'; $decoder{'RUNNING'} = 'RUNNING'; $decoder{'SUSPENDED'} = 'SUSPENDED'; $decoder{'TIMEOUT'} = 'UNKNOWN'; Modified: tsi/trunk/tsi/linux_slurm/Submit.pm =================================================================== --- tsi/trunk/tsi/linux_slurm/Submit.pm 2012-09-27 13:26:05 UTC (rev 14423) +++ tsi/trunk/tsi/linux_slurm/Submit.pm 2012-09-27 13:36:47 UTC (rev 14424) @@ -81,6 +81,7 @@ my $queue = ""; my $email = ""; my $interactive = ""; + my $reservation_id = ""; my $stdout = "stdout"; my $stderr = "stderr"; my $project = ""; @@ -104,13 +105,13 @@ $queue = $2 if $1 eq "QUEUE"; $email = $2 if $1 eq "EMAIL"; $interactive = $2 if $1 eq "PREFER_INTERACTIVE"; + $reservation_id = $2 if $1 eq "RESERVATION_REFERENCE"; $stdout = $2 if $1 eq "STDOUT"; $stderr = $2 if $1 eq "STDERR"; $project = $2 if $1 eq "PROJECT"; $nodes_filter = ($nodes_filter eq "") ? $2 : $nodes_filter . '&' . $2 if $1 eq "BSS_NODES_FILTER"; } - } if ( $interactive eq "true" ) { start_report("Interactively executing a job"); @@ -121,10 +122,10 @@ # Jobname (source man page) if ( !$jobname || $jobname eq "NONE" ) { - $jobname = "--job-name=$main::default_job_name"; + $jobname = "--job-name=\"$main::default_job_name\""; } else { - $jobname = "--job-name=$jobname"; + $jobname = "--job-name=\"$jobname\""; } # Queue (source man page) @@ -165,7 +166,7 @@ $memory = ""; } else { - $memory = "--mem-per-cpu=$memory"; + $memory = "--mem=$memory"; } # Convert time in the SLURM understandable syntax @@ -207,6 +208,12 @@ $email = "--mail-user=$email"; } + # Resource reservation specification + my $reservation_specification = ""; + if ($reservation_id ne "") { + $reservation_specification = "--reservation=$reservation_id"; + } + # Tell the BSS to put the batch job's stdout and stderr # into these files my $stdout_loc = "-o $outcome_dir/$stdout"; @@ -240,7 +247,7 @@ else { my $command = -"$main::submit_cmd $queue $nodes_filter $nodes $processors $processors_per_node $email $memory $time $jobname $project $stdout_loc $stderr_loc <$uspace_dir/$Submit::tsi_unique_file_name"; +"$main::submit_cmd $queue $reservation_specification $nodes_filter $nodes $processors $processors_per_node $email $memory $time $jobname $project $stdout_loc $stderr_loc <$uspace_dir/$Submit::tsi_unique_file_name"; command_report($command); addperms 0700, $Submit::tsi_unique_file_name; Modified: tsi/trunk/tsi/linux_slurm/tsi =================================================================== --- tsi/trunk/tsi/linux_slurm/tsi 2012-09-27 13:26:05 UTC (rev 14423) +++ tsi/trunk/tsi/linux_slurm/tsi 2012-09-27 13:36:47 UTC (rev 14424) @@ -70,7 +70,7 @@ # Disabling this line passes the TSI user's PATH to the user. $ENV{PATH} = ":/usr/local/bin:/usr/bin:/bin:/usr/lib/java/bin"; -$main::my_os = "Linux"; +$main::my_os = "SLURM"; # END OF CONFIGURATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |