NAME

Grid::Globus::Globusrun


DESCRIPTION

Module for the submission and manipulation of simple globus jobs.


SYNOPSIS

use Cog::Globus::Run;


EXAMPLES

use Cog::Globus::Run; use Cog::Globus::RSL;

###Create an RSL string

my $myRSL = Grid::Globus::RSL->new();

$myRSL->addAttribute('count','1');

$myRSL->addAttribute('executable','/bin/ls');

$myRSL->addAttribute('arguments','-l');

my @output = globusrun(args=>``-s -r'', host=>``tfglobus.sdsc.edu'', rsl=>$myRSL->toString(), timeout=>``25'' );

foreach(@output) { print; }


AUTHOR

Maytal Dahan, maytal@tacc.utexas.edu Catherine Mills, cmills@sdsc.edu Stephen Mock, mock@sdsc.edu


SUBROUTINES

globusrun()

        Description/Usage:
        Used to run a job on a remote resource using globus.
        This is essentially a simple wrapper to the globusrun
        exectuable.
                ###Create an RSL string
                my $myRSL = Cog::Globus::RSL->new();
                $myRSL->addAttribute('count','1');
                $myRSL->addAttribute('executable','/bin/ls');
                $myRSL->addAttribute('arguments','-l');
                my @output = globusrun(
                        args=>"-s -r",
                        host=>"$host",  
                        rsl=>$myRSL->toString(),
                        timeout=>"25");
        Required Arguments:
                host - the globus host contact string to submit the job to
                args - the arguments passed to the globusrun executable
                        (-s -r is probably the most common one if you have
                         no idea )
                rsl - the rsl string
        Optional Arguments:
                timeout - the time in seconds for the job to complete 
                        before the process is killed locally
        Returns:
                -on success: an array containing the output of the job
                -on failure: undef (undefined)

status()

        Description/Usage:
        Used to get the job status of a job using the jobid
                $status = Cog::Globus::Run->status(jobid=>$jobid);
        Required Arguments: 
                Globus job id - the jobid returned by submission of a globus
                        job.
        Returns:
                -on success: a scalar containing the job status

get_stderr()

        Description/Usage:
        Used to get the stderr of a job using the jobid
                $status = Cog::Globus::Run->get_stderr(jobid=>$jobid);
        Required Arguments:
                Globus job id - the jobid returned by submission of a globus
                        job.
        Returns:
                -on success: an array containing the job stderr

get_stdout()

        Description/Usage:
        Used to get the stdout of a job using the jobid
                $status = Cog::Globus::Run->get_stdout(jobid=>$jobid);
        Required Arguments:
                Globus job id - the jobid returned by submission of a globus
                        job.
        Returns:
                -on success: an array containing the job stdout

cancel()

        Description/Usage:
        Used to cancel a job using the jobid
                @cancel_out = Cog::Globus::Run->cancel(jobid=>$jobid);
        Required Arguments:
                Globus job id - the jobid returned by submission of a globus
                        job.
        Returns:
                -on success: an array containing the output of the cancellation

clean()

        Description/Usage:
        Used to clean the job from the globus gass cache
                @cancel_out = Cog::Globus::Run->clean(jobid=>$jobid);
        Required Arguments:
                Globus job id - the jobid returned by submission of a globus
                        job.
        Returns:
                -on success: an array containing the output of the clean


SEE ALSO

Cog::lib::Cog::Globus::Job, Cog::lib::Cog::Globus::RSL, Cog::lib::Cog::Globus::Run, Cog::lib::Cog::Globus::URLCopy, Cog::lib::Cog::MDS::Search, Cog::lib::Cog::Security::Cacl, Cog::lib::Cog::Security::Myproxy, Cog::lib::Cog::Security::Proxy, Cog::src::Config, CogUtil::lib::CogUtil::Log, CogUtil::lib::CogUtil::UnixRun, Gridport::lib::Gridport::Authentication, Gridport::lib::Gridport::FileTransfer, Gridport::lib::Gridport::Job, Gridport::lib::Gridport::ProxyForward, Gridport::lib::Gridport::SRB, NWS::lib::NWS, SRB::lib::SRB