Rob Edwards > ScheduleSGE-0.02 > Schedule::SGE

Download:
SGE/ScheduleSGE-0.02.tgz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.01   Source  

Schedule::SGE ^

Interact with the Sun Grid Engine. This module locates the executables (qstat, qsub, etc), sets the level of verbosity, and other general commands related to the using the SGE.

ABSTRACT ^

Schedule::SGE is a suite of modules for interacting with the Sun Grid Engine. The base module Schedule::SGE handles locating the executables and making sure everything works fine. The three modules Schedule::SGE::Run, Schedule::SGE::Control, and Schedule::SGE::Status are for different interactions with the queues

AUTHOR ^

 Rob Edwards (rob@salmonella.org)
 3/24/05

new()

Instantiate the object, and preload some data. For example

my $sge=Schedule::SGE->new( -project=>'redwards', -mailto=>'rob@salmonella.org', -executable=>{qsub=>'/usr/local/bin/qsub', qstat=>'/usr/local/bin/qstat'}, -verbose=>1, );

verbose()

Increase the level of error messages that are printed out.

executable()

Get or set the executables that we will use. This method takes upto two arguments. With no arguments we will try and guess the settings that we need, and if we fail we will die. With a single argument we will return that executable path/program, guess it if we don't know it, and then finally fail. With two arguments we will assume that the second is the location of the executable (incl. path) of the first.

We will also take a reference to a hash as the single argument. In this case, we will use the hash as locations of the executables.

e.g.s:

# using a hash to set all the executables at once (recommended as we don't have to guess anything) my $exec={'qsub'=>'/usr/local/bin/qsub', 'qstat'=>'/usr/local/bin/qstat'} $sge->exectuable($exec); my $pid=$sge->job_id;

# guessing all the executables (not recommended) $sge->exectuables(); my $pid=$sge->job_id;

# getting the value for qsub my $qsubexec=$sge->executable('qsub');

# setting a single value for qsub only my $qsubexec=$sge->executable('qsub', '/usr/local/bin/qsub');

At the moment we try and figure out locations for each of the following applications qstat qsub qdel

syntax highlighting: