</table>
</td><td>
<table class="table table-condensed">
- <% j.resource_limits.sort.each do |k,v| %>
+ <% j.runtime_constraints.sort.each do |k,v| %>
<tr><td><%= v %></td><td><%= k %></td></tr>
<% end %>
</table>
A step cannot be run until all steps with lower sequence numbers have completed.
Job steps with the same sequence number can be run in any order.|
|parameters{}|list||
-|resource_limits{}|list|Constraints that must be satisfied by the job/task scheduler in order to run the task (see below).|
+|runtime_constraints{}|list|Constraints that must be satisfied by the job/task scheduler in order to run the task (see "Jobs":Jobs.html).|
|output|string||
|progress|float||
|success|boolean|Is null if the task has neither completed successfully nor failed permanently.|
|*Property name*|*Type*|*Description*|*Notes*|
|submit_id|string|Unique ID provided by client when job was submitted|Optional. Can be used by client to ensure idempotence|
|priority|string|||
-|resource_limits{}|list|Constraints that must be satisfied by the job/task scheduler in order to run the job.|See below.|
+|runtime_constraints{}|list|Constraints that must be satisfied by the job/task scheduler in order to run the job.|See below.|
|script_name|string|Name of MapReduce script||
|script_parameters{}|list|Parameters passed to MapReduce script||
|script_version|string|git commit/tree used when running the job|If the job has not started, this can be a tag/branch instead of an unambiguous commit id.|
|success|boolean|Whether the job indicated successful completion|Is null if job has not finished|
|is_locked_by_uuid|string|UUID of the user who has locked this job|Is null if job is not locked. The system user locks the job when starting the job, in order to prevent job attributes from being altered.|
-h3. Resource limits
+h3. Runtime constraints
table(table table-bordered table-condensed).
|*Key*|*Type*|*Description*|*Implemented*|
-|min_nodes|integer||✓|
+|dependencies{}|list|[
+ {
+ "name": "freebayes",
+ "package_type": "git",
+ "origin": "https://github.com/ekg/freebayes.git",
+ "version": "011561f4a96619125d4388b66b2e82b173f3de7a"
+ },
+ ...
+]||
+|min_nodes|integer||✓|
|max_nodes|integer|||
-|max_tasks_per_node|integer|Maximum simultaneous tasks on a single node|✓|
+|max_tasks_per_node|integer|Maximum simultaneous tasks on a single node|✓|
|min_ram_per_task|integer|Minimum real memory (KiB) per task||
|min_ram_per_node|integer|Minimum real memory (KiB) per node||
\ No newline at end of file
"optional":false
}
},
- "resource_limits":{
+ "runtime_constraints":{
"max_tasks_per_node":1
}
},
debuglog "component #{cname} new job."
job = JobCache.create(:script => c[:script],
:script_parameters => c[:script_parameters],
- :resource_limits => c[:resource_limits] || {},
+ :runtime_constraints => c[:runtime_constraints] || {},
:script_version => c[:script_version] || 'master')
if job
debuglog "component #{cname} new job #{job[:uuid]}"
-$Job->{'resource_limits'} ||= {};
-$Job->{'resource_limits'}->{'max_tasks_per_node'} ||= 0;
-my $max_ncpus = $Job->{'resource_limits'}->{'max_tasks_per_node'};
+$Job->{'runtime_constraints'} ||= {};
+$Job->{'runtime_constraints'}->{'max_tasks_per_node'} ||= 0;
+my $max_ncpus = $Job->{'runtime_constraints'}->{'max_tasks_per_node'};
Log (undef, "check slurm allocation");
-foreach (qw (script script_version script_parameters resource_limits))
+foreach (qw (script script_version script_parameters runtime_constraints))
{
Log (undef,
"$_ " .
return service
class JobTask:
- def __init__(self, parameters=dict(), resource_limits=dict()):
- print "init jobtask %s %s" % (parameters, resource_limits)
+ def __init__(self, parameters=dict(), runtime_constraints=dict()):
+ print "init jobtask %s %s" % (parameters, runtime_constraints)
class job_setup:
@staticmethod
class Arvados::V1::JobsController < ApplicationController
accept_attribute_as_json :script_parameters, Hash
- accept_attribute_as_json :resource_limits, Hash
+ accept_attribute_as_json :runtime_constraints, Hash
accept_attribute_as_json :tasks_summary, Hash
skip_before_filter :find_object_by_uuid, :only => :queue
include KindAndEtag
include CommonApiTemplate
serialize :script_parameters, Hash
- serialize :resource_limits, Hash
+ serialize :runtime_constraints, Hash
serialize :tasks_summary, Hash
before_create :ensure_unique_submit_id
before_create :ensure_script_version_is_commit
t.add :running
t.add :is_locked_by_uuid
t.add :log
- t.add :resource_limits
+ t.add :runtime_constraints
t.add :tasks_summary
t.add :dependencies
end
--- /dev/null
+class RenameResourceLimitsToRuntimeConstraints < ActiveRecord::Migration
+ def change
+ rename_column :jobs, :resource_limits, :runtime_constraints
+ end
+end
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130724153034) do
+ActiveRecord::Schema.define(:version => 20131007180607) do
create_table "api_client_authorizations", :force => true do |t|
t.string "api_token", :null => false
t.string "is_locked_by_uuid"
t.string "log"
t.text "tasks_summary"
- t.text "resource_limits"
+ t.text "runtime_constraints"
end
add_index "jobs", ["created_at"], :name => "index_jobs_on_created_at"
min_nodes = 1
begin
- if job.resource_limits['min_nodes']
- min_nodes = begin job.resource_limits['min_nodes'].to_i rescue 1 end
+ if job.runtime_constraints['min_nodes']
+ min_nodes = begin job.runtime_constraints['min_nodes'].to_i rescue 1 end
end
end
next if @idle_slurm_nodes and @idle_slurm_nodes < min_nodes