Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Running Parallel Perl Script on Linux Cluster

by salva (Canon)
on Apr 01, 2006 at 18:14 UTC ( [id://540666]=note: print w/replies, xml ) Need Help??


in reply to Re: Running Parallel Perl Script on Linux Cluster
in thread Running Parallel Perl Script on Linux Cluster

a similar result can be attained changing the shell wrapper instead of the perl script that runs on the cluster nodes:
#!/usr/bin/bash cd ~/some_dir (perl mycode.pl $1 $2 > ~/some_out_dir/param_set$1.out.tmp && mv ~/some_out_dir/param_set$1.out) || touch ~/some_out_dir/param_set$1.fail
then, on the master you will have to poll from time to time to see if all the result files exist or if "fail" files are there, to requeue the jobs.

Though, it should be better ways to synchronize partial jobs over the cluster.

Replies are listed 'Best First'.
Re^3: Running Parallel Perl Script on Linux Cluster
by monkfan (Curate) on Apr 02, 2006 at 07:11 UTC
    ...you will have to poll from time to time to see if all the result files exist or if "fail" files are there, to requeue the jobs.
    Hi salva,

    Thanks for the answer. Roughly, I suppose that one would use glob to check the file (fail or not)? But not sure how to 'reqeue' the jobs.

    Can you give a simple example how would one do the above step as you suggested?

    Regards,
    Edward
      the best way to check if a file exists is with the -f operator (it is documented in perlfunc).

      To requeue a job, you would need to run the corresponding qsub command again, ensure that you delete the "fail" file first with unlink.

      Hi monkfan, Can you share how the code worked? I'd like to try out a variation on a 32 proc cluster in a classroom environment. Thanks! vanallp

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://540666]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-26 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found