On Tue, 2016-10-04 at 15:33 +0000, Lionel SPINELLI wrote:
> I have a micro grid (4 nodes) and I would like to configure a parallel
> environment so that when I launch a job that is multi-threaded (no
> openmpi or other, just tools that uses multi thread by their own), all
> the threads of the job is going to a single node and will not be
> dispatched over nodes.
> I have tried to use the allocation type with the default
> "$round_robin", the jobs seems strangely dispatched. I have tried with
> $pe_slots but in that case the job are not dispatched to the nodes and
> remain in the queue and with $fill_up, they also seems dispatched...
> 
> I have already configured such kind of mode but I can't remember the
> exact properties of my PE to achieve my goal.
> 
> Can someone help me?

Hi Lionel,

This is a major use-case at our site.

Here's an example of one of the parallel environments we use:

[cheiny@barrel ~]$ qconf -sp matcher
pe_name            matcher
slots              2048
user_lists         NONE
xuser_lists        NONE
start_proc_args    /bin/true
stop_proc_args     /bin/true
allocation_rule    $pe_slots
control_slaves     FALSE
job_is_first_task  FALSE
urgency_slots      min
accounting_summary FALSE
[cheiny@barrel ~]$


Then in the wrapper script, we use escapes to specify the number of
slots to allocate to a task (or you could just put this on your qsub
command line):

# This allocates 16 slots per task - we'll use 16 threads per task
#
#$ -pe matcher 16
#

The number of slots will be found in the NSLOTS environment variable, so
we use that to tell the program how many threads it has available.  We
also have a safety in case NSLOTS isn't set (which can happen if users
tweak the wrapper scripts).

if [ "${NSLOTS}" == "" ] ; then
    NSLOTS=1
fi

some_multithreaded_program ... a whole lot of args ...  --threads ${NSLOTS} ... 
still more args  ...

Of course, it's up to the program to parse the command line and figure
out how many threads to launch.  However, this approach gives us a lot
of flexibility in managing the threads & slots.

                                        Cheers,
                                                Chris

_______________________________________________
users mailing list
users@gridengine.org
https://gridengine.org/mailman/listinfo/users

Reply via email to