wiki:OGCEIntegration

USSomo-OGCE Bridge Clients Information

Submit Job

Used to submit job to resource using GFAC. This service needs a xml message with job parameters and header data to submit job to compute resource.

Registered resources are

lonestar.tacc.teragrid.org
alamo.uthscsa.edu
ranger.tacc.teragrid.org

Service URL :

http://gw61.quarry.iu.teragrid.org:8080/ogce-rest/job/runjob/async

Method : POST

Post the xml according to sample xml to this url to submit the job. Most of the parameter in header are optional. they are only helpful to configure runtime parameters to your job. You can leave the experimentid also blank and service will create one for you.

Sample XML :

<?xml version="1.0" encoding="UTF-8"?>
<Message>
  <Header>
        <experimentid>US-SOMO-$UID</experimentid> (optional)
        <hostname>lonestar.tacc.teragrid.org</hostname> 
        <processorcount>12</processorcount>
        <hostcount>1</hostcount>
        <queuename>normal</queuename> 
        <walltime>60</walltime>
        <userdn>$userid</userdn>
        <emailid>emailid</emailid>
        <emailparam>abe</emailparam>(optional:Same as PBS param. default is set to abort(a) in GFAC. If you want email on job start and end)
        <executable>executablename</executable>(optional:by default it will take the defined executable. If the path of new executable is different then provide full path)
  </Header>
    <Body>
        <Method>run</Method>
        <input>
          <parameters>
           <name>param</name>
           <value>iq</value>
          </parameters>
          <parameters>  
           <name>inputfile</name>
           <value>ussomo_test/myjob.tar</value>
          </parameters>
        </input>
    </Body>
</Message>

This service returns you a xml message with experimentid in following format

<?xml version="1.0" encoding="UTF-8"?>
<MessageResponse>
    <experimentid>US-SOMO-$UID</experimentid>
</MessageResponse>

Job Status

To get status of current experiment. You need to create following url with experimentid which was returned from Submit job service.

Service URL :

http://gw61.quarry.iu.teragrid.org:8080/ogce-rest/job/jobstatus/$experimentid

Method: GET

Service will return xml message with status of current job status on compute resource. Response format is

<?xml version="1.0" encoding="UTF-8"?>
<MessageResponse>
    <status>COMPLETED</status>
    <message>Job working folders etc</message>
</MessageResponse>

Other status are : SUBMITTED|INITIALIZED|PENDING|ACTIVE|COMPLETED|CANCELED|FAILED|UNKNOWN(if job id does not exit in job database)

Cancel Job

To cancel running or queued jobs from compute resource. Pass experimentid from Submit Job service.

Service URL :

http://gw61.quarry.iu.teragrid.org:8080/ogce-rest/job/canceljob/$experimentid

Method : GET

Service will return call status. It can either be Success or Already Canceled in following xml format

<?xml version="1.0" encoding="UTF-8"?>
<MessageResponse>
    <status>Success</status>
</MessageResponse>

Other status are: CANCELED | NOTALLOWED(if already canceled or completed) | UNKNOWN(if job id does not exit in job database)

Services Code

SVN location of this code is

https://ogce.svn.sourceforge.net/svnroot/ogce/gateway-staging/ultrascan/US3RestServices/
Last modified 7 years ago Last modified on Apr 13, 2012 3:19:23 PM