Hello all,

Re:
http://lists.bx.psu.edu/pipermail/galaxy-dev/2012-June/010153.html
http://lists.bx.psu.edu/pipermail/galaxy-dev/2012-October/011557.html

Something I raised during the GCC2013, and we talked about
via Twitter as well was a Galaxy environment variable for use
within Tool Wrappers setting the number of threads/CPUs to
use.

The idea is that you can configure a default value, and then
override this per runner or per tool etc. James Taylor had
suggested calling this environment variable $GALAXY_CPUS
which seem fine to me (personally I'd say threads not CPUs
but I don't really mind). e.g.

<command>my_tool --threads "\$GALAXY_CPUS"
--input "$input" --output "$output"</command>

Everyone I spoke to about this seemed positive about the idea.

This would/should be integrated into the various cluster back
ends, for example for SGE/OGE the number of threads is
already configurable via the DRMAA settings and available
as the environment variable $NSLOTS for non-MPI jobs, so
my guess is all Galaxy needs to do is something like this:

$ hg diff
diff -r ce0d758bb995 lib/galaxy/jobs/runners/drmaa.py
--- a/lib/galaxy/jobs/runners/drmaa.py  Tue Jul 30 12:30:30 2013 +0100
+++ b/lib/galaxy/jobs/runners/drmaa.py  Tue Jul 30 16:10:40 2013 +0100
@@ -43,6 +43,7 @@
 #  - execute the command
 #  - take the command's exit code ($?) and write it to a file.
 drm_template = """#!/bin/sh
+export GALAXY_CPUS="$NSLOTS"
 GALAXY_LIB="%s"
 if [ "$GALAXY_LIB" != "None" ]; then
     if [ -n "$PYTHONPATH" ]; then

Is there an open Trello card for this?

Thanks,

Peter
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to