[Bio] / ClusterTools / get_work.pl Repository:
ViewVC logotype

View of /ClusterTools/get_work.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Sat Feb 26 03:03:11 2005 UTC (14 years, 8 months ago) by olson
Branch: MAIN
CVS Tags: HEAD
some cluster stuff

use Time::HiRes qw(time);

use Data::Dumper;
use FIG_Config;
use FIG;

use strict;

my $f = new FIG;

use Cluster;

my $c = new Cluster::Broker($f);

my $id = $c->register_cluster("ci", "this is the info");

print "registered, cluster_id=$id\n";

my $h = `hostname`;
chomp $h;

my $pid = "1234";
my $t1 = time;
my $wid = $c->register_worker($h, (getpwuid($>))[0], $pid, $0, $id, ['stage', 'sim', 'stage_nr']);
my $t2 = time;
my $elap = 1000 * ($t2 - $t1);
printf "Got worker id $wid (%5.2d ms)\n", $elap;
$t1  = time;
my $work = $c->get_work($wid);
$t2  = time;
$elap = 1000 * ($t2 - $t1);
printf "Got work in %.2f ms\n", $elap;
print Dumper($work);

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3