Question: Single and Multi threading on one machine
gravatar for jasperkoehorst
3.7 years ago by
jasperkoehorst10 wrote:

I am trying to set up galaxy tools either single or multithreaded on a 24 core machine.

So what I would like to achieve is to have a maximum of 20 single core workers running and if a multi threaded job is started of lets say 6 cores then I can have a maximum of 20-6 = 14 single core runners and 1 multi core runner.

However I am having a very hard time to get this working and am probably missing something.

My multi threaded tool command looks like:

<command interpreter="python3.4"> '-input' '$input' '--seqtype' '$seqtype' '-f' 'TSV' '--applications' '$appl' '-output' '$outfile' -sourcedb XYZ '-num_threads' \${GALAXY_SLOTS:-6}

My job_conf.xml file looks like this:

        <plugin id="local" type="runner" load="" workers="20"/>
        <handler id="main"/>
    <destinations default="single">
        <destination id="single" runner="local">
        <param id="local_slots">20</param>

I digged a bit in the code and noticed:

            slots_statement = 'GALAXY_SLOTS="%d"; export GALAXY_SLOTS; GALAXY_SLOTS_CONFIGURED="1"; export GALAXY_SLOTS_CONFIGURED;' % ( int( slots ) )

Which is set to one as 1 runner is running, but shouldnt it in theory not be set to 6 as it consumes 6 slots cores?


threading multi • 1.7k views
ADD COMMENTlink modified 3.6 years ago by jmchilton1.1k • written 3.7 years ago by jasperkoehorst10
gravatar for jmchilton
3.6 years ago by
United States
jmchilton1.1k wrote:

What is 1 in this context - GALAXY_SLOTS or GALAXY_SLOTS_CONFIGURED? In your example GALAXY_SLOTS should be set to 20 which should cause all 20 of the local runner threads to each use 20 cores - this is not great.

Have you looked at this answer

Adapting it to your 20 core machine - you might want to have say two 8 core threads and 4 single core threads That would look something like this:

        <plugin id="local" type="runner" load="" workers="4"/>
        <plugin id="multilocal" type="runner" load="" workers="2"/>
    <destinations default="local">
        <destination id="local" runner="local"/>
        <destination id="multicore8" runner="multilocal">
          <param id="local_slots">8</param>
    <tool id="bowtie2" destination="multicore8" />
    <tool id="bowtie"  destination="multicore8" />
    <tool id="deeptools"  destination="multicore8" />
    <tool id="cufflinks" destination="multicore8" />
    <tool id="cuffdiff"  destination="multicore8" />
    <tool id="cuffmerge" destination="multicore8" />
    <tool id="tophat2" destination="multicore8" />


There are some things you can do to work through different permutations in this file - but ultimately Galaxy isn't a resource manager and you should probably install something like SLURM or Condor to make most effective use of your resources.

ADD COMMENTlink written 3.6 years ago by jmchilton1.1k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 172 users visited in the last hour