[torqueusers] Perl Threads

Michael Lackner michael.lackner at unileoben.ac.at
Wed Aug 21 00:34:41 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.

I believe you can make Perl use MPI via Parallel::MPI, see here:

http://search.cpan.org/~josh/Parallel-MPI/MPI.pm

However, i have never used MPI as I am no programmer, neither have any of our users. If
your cluster is configured with MPI, this might be a way to parallelize across nodes, but
I guess it will require significant modification of your Perl code, that's the downside.

-- 
Michael Lackner
Lehrstuhl für Informationstechnologie (CiT)
Montanuniversität Leoben
Tel.: +43 (0)3842/402-1505 | Mail: michael.lackner at unileoben.ac.at
Fax.: +43 (0)3842/402-1502 | Web: http://institute.unileoben.ac.at/infotech


More information about the torqueusers mailing list