[torqueusers] Perl Threads

Michel Béland michel.beland at calculquebec.ca
Tue Aug 20 08:01:57 MDT 2013

Hi Dimitrakakis,

> I have a program that uses perl threads to run in parallel.
> I would like to know if there is a way for Torque to understand the number
> of threads used in order to assign the proper number of processors for the
> specific job or do I have to specify them explicitly in the submit script?

You do it the other way around: you tell Torque how many cores you want 
with -lnodes=1:ppn=8, for example, and the the perl script can figure 
out how many threads it can launch according to the number of lines in 
$PBS_NODEFILE. This works only inside Torque so your perl script has to 
default to something else if $PBS_NODEFILE is undefined and you want 
your script to also run outside Torque.

> What about distribution in more than one nodes? Is it possible?

Threads work in shared memory so it is restricted to one node, unless 
you trick it to believe that there is only one node. ScaleMP comes to 
mind, but it is a commercial product.

Michel Béland, analyste en calcul scientifique
michel.beland at calculquebec.ca
bureau S-250, pavillon Roger-Gaudry (principal), Université de Montréal
téléphone : 514 343-6111 poste 3892     télécopieur : 514 343-2155
Calcul Québec (www.calculquebec.ca)
Calcul Canada (calculcanada.ca)

More information about the torqueusers mailing list