[ARVADOS] updated: 847459b3c257aba65df3e0cbf6777f7148542af2

git at public.curoverse.com git at public.curoverse.com
Mon Jul 7 09:32:36 EDT 2014


Summary of changes:
 crunch_scripts/run-command | 4 ++++
 sdk/cli/bin/crunch-job     | 1 +
 2 files changed, 5 insertions(+)

       via  847459b3c257aba65df3e0cbf6777f7148542af2 (commit)
      from  e9c0ab574e6bae899556e82d4ba0da439a976093 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 847459b3c257aba65df3e0cbf6777f7148542af2
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Jul 7 09:32:33 2014 -0400

    Add $(node.cores) substitution to run-program, and add CRUNCH_NODE_SLOTS to
    environment passed to docker jobs. no issue #

diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command
index a8aae24..2eb5589 100755
--- a/crunch_scripts/run-command
+++ b/crunch_scripts/run-command
@@ -37,8 +37,12 @@ def sub_link(v):
 def sub_tmpdir(v):
     return os.path.join(arvados.current_task().tmpdir, 'tmpdir')
 
+def sub_cores(v):
+     return os.environ['CRUNCH_NODE_SLOTS']
+
 subst.default_subs["link "] = sub_link
 subst.default_subs["tmpdir"] = sub_tmpdir
+subst.default_subs["node.cores"] = sub_cores
 
 rcode = 1
 
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index ac39340..9c9d9c1 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -678,6 +678,7 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
           }
         }
       }
+      $command .= "--env=\QCRUNCH_NODE_SLOTS=$ENV{CRUNCH_NODE_SLOTS}\E ";
       $command .= "\Q$docker_hash\E ";
       $command .= "stdbuf --output=0 --error=0 ";
       $command .= "/tmp/crunch-src/crunch_scripts/" . $Job->{"script"};

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list