Parallel Python
Tuesday, 07 October 2008
Home arrow Forums arrow Python Forums arrow Parallel Python Forum arrow FAQ, Parallel Python
Cluster Computing on Demand
Use PP to run your software in parallel
Write about Parallel Python in your blog
Participate in Parallel Python Forum
Parallel Python Community Forums rss  
October 07, 2008, 09:20:40 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Parallel python forum is up and running!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: FAQ, Parallel Python  (Read 2097 times)
0 Members and 1 Guest are viewing this topic.
Vitalii
Global Moderator
Sr. Member
*****
Posts: 271


View Profile WWW
« on: June 11, 2008, 10:17:05 AM »

Q) How to check that execution of a task has been completed?

A) Task object, returned by submit call, has an argument finished which indicates status of the task:
Code
task = job_server.submit(f1, (a,b,c))

Code
if task.finished:
   print "The task is done!"
else
   print "Still working on it ..."


Q) I would like to perform an action at the time of completion for each individual task. Is it possible?

A) Yes, you need to setup callback argument of submit method, see PP callback example


Q) Is it possible to use Psyco with PP?

A) Yes it is definitely possible. This post explains how to incorporate Psyco in PP.


Q) I do not want to run any tasks on my local computer. How do I do that?

A) ncpus argument of the pp.Server specifies the number of local ppworkers to use. If you do not specify this argument PP uses the numbers of ppworkers equal to the number of effective processors on your local host. If you set it to 0, three will be no local execution of tasks.


Q) How can I use pp.Template class in my program?

A) The purpose of Template class is to simplify submission of similar pp-tasks, which execute the same function with different arguments. There are two steps in using the Template class.
1) Creating a template which glues together a function with its dependencies and given instance of pp.Server:
Code
fn = pp.Template(job_server, sum_primes, (isprime,), ("math",))
2) Using the template to submit jobs with different arguments:
Code
job1 = fn.submit(100)
job2 = fn.submit(200)
 
Please look at the following example for further clarification.


Q) How to use PP on a PBS cluster?

A) PP can be used with PBS with or without autodiscovery.
Without autodiscovery you simply need to start ppserver.py on all nodes assigned to a job and then add all of them to a ppserver variable in the client Python application.
With autodiscovery you need to run ppserver.py with -a switch (./ppserver.py -a ) and then set ppservers = ("*",) in the client application.
In both cases it is useful to use -t switch to automatically kill all ppservers when client exits.


(to be continued)
Please feel free to suggest question and answers for this FAQ in replies to the post.

« Last Edit: July 11, 2008, 07:41:04 PM by Vitalii » Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!

Cluster Computing on Demand

 Want to use Parallel Python on a large cluster?
 Access powerful Linux clusters from the Internet with Cluster On Demand Computing service from TTI.