Simple job with data manipulation

From MediaWiki

Revision as of 17:34, 27 May 2012 by Ngrkic (Talk | contribs)
Jump to: navigation, search

This is simple single job submitting example with data management. In this case, WN will download source code and executing script from SE and after successful ending of job, result will be uploaded on SE.

Content of uploaded files:


#include <stdio.h>

int main()
 printf ("hello world!!\n");
 return 0;

1. Extract files

[ngrkic@ui jobovi]$ tar xvzf hello.SE.tgz

2. Enter directory hello.SE

[ngrkic@ui jobovi]$ cd hello.SE

3. List directory

[ngrkic@ui hello.SE]$ ll hello.SE

4. See content of files

[ngrkic@ui hello.SE]$ cat hello.jdl 
Executable = "";
Arguments = "";
StdOutput = "std.out";
StdError = "std.err";
InputSandbox = {""};
OutputSandbox = {"std.out", "std.err"};
Requirements =  RegExp("*",other.GlueCEUniqueID);
[ngrkic@ui hello.SE]$ cat 
#Downloading source for SE
lcg-cp lfn:/grid/aegis/nikola/hello.SE/hello.c 'hello.c'

#Downloading script that compiles source code and execute program
lcg-cp lfn:/grid/aegis/nikola/hello.SE/ ''

#runing compile & execute script
chmod +x

#Uploads output to SE
lcg-cr -l lfn:/grid/aegis/nikola/hello.SE/std.out file:`pwd`/std.out
lcg-cr -l lfn:/grid/aegis/nikola/hello.SE/std.err file:`pwd`/std.err 

5. Creating VOMS proxy:

[ngrkic@ui hello.SE]$ voms-proxy-init -voms aegis

6. Submiting hello job:

[ngrkic@ui hello.SE]$ glite-wms-job-submit -a hello.jdl

7. Requesting Job status:

[ngrkic@ui hello.SE]$ glite-wms-job-status

======================= glite-wms-job-status Success =====================

Status info for the Job :
Current Status:     Done (Success)
Logged Reason(s):
    - Job terminated successfully
Exit code:          0
Status Reason:      Job terminated successfully
Submitted:          Sat Dec 10 22:54:28 2011 CET

8. Download output file from SE

[ngrkic@ui hello.SE]$ lcg-cp lfn:/grid/aegis/nikola/hello.SE/std.out file:/home/ngrkic/jobovi/hello.SE/std.out

9. Cat std.out

hello world!!
Personal tools