Simple job with data manipulation
From MediaWiki
(Difference between revisions)
Line 24: | Line 24: | ||
./hello | ./hello | ||
+ | |||
+ | |||
+ | |||
+ | 1. Extract files | ||
+ | |||
+ | [ngrkic@ui jobovi]$ tar xvzf hello.SE.tgz | ||
+ | |||
+ | 2. Enter directory hello.SE | ||
+ | |||
+ | cd hello.SE | ||
+ | |||
+ | 3. List directory | ||
+ | |||
+ | ll hello.SE | ||
+ | |||
+ | 4. See content of files | ||
+ | |||
+ | [ngrkic@ui hello.SE]$ cat hello.jdl | ||
+ | Executable = "run.sh"; | ||
+ | Arguments = ""; | ||
+ | StdOutput = "std.out"; | ||
+ | StdError = "std.err"; | ||
+ | InputSandbox = {"run.sh"}; | ||
+ | OutputSandbox = {"std.out", "std.err"}; | ||
+ | Requirements = RegExp("ce64.ipb.ac.rs*",other.GlueCEUniqueID); | ||
+ | |||
+ | [ngrkic@ui hello.SE]$ cat run.sh | ||
+ | #Downloading source code from SE | ||
+ | lcg-cp lfn:/grid/aegis/nikola/hello.SE/hello.c 'pwd' | ||
+ | |||
+ | #Downloading script that compiles source code and execute program | ||
+ | lcg-cp lfn:/grid/aegis/nikola/hello.SE/hello.sh 'pwd' | ||
+ | |||
+ | #runing compile & execute script | ||
+ | ./hello.sh | ||
+ | |||
+ | #Uploads output to SE | ||
+ | lcg-cr -l lfn:/grid/aegis/nikola/hello.SE/std.out file:`pwd`/std.out | ||
+ | |||
+ | 5. |
Revision as of 13:51, 9 December 2011
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:
hello.c
#include <stdio.h> int main() { printf ("hello world!!\n"); return 0; }
hello.sh
#Compile C file gcc hello.c -o hello #Execute hello program ./hello
1. Extract files
[ngrkic@ui jobovi]$ tar xvzf hello.SE.tgz
2. Enter directory hello.SE
cd hello.SE
3. List directory
ll hello.SE
4. See content of files
[ngrkic@ui hello.SE]$ cat hello.jdl Executable = "run.sh"; Arguments = ""; StdOutput = "std.out"; StdError = "std.err"; InputSandbox = {"run.sh"}; OutputSandbox = {"std.out", "std.err"}; Requirements = RegExp("ce64.ipb.ac.rs*",other.GlueCEUniqueID);
[ngrkic@ui hello.SE]$ cat run.sh #Downloading source code from SE lcg-cp lfn:/grid/aegis/nikola/hello.SE/hello.c 'pwd' #Downloading script that compiles source code and execute program lcg-cp lfn:/grid/aegis/nikola/hello.SE/hello.sh 'pwd' #runing compile & execute script ./hello.sh #Uploads output to SE lcg-cr -l lfn:/grid/aegis/nikola/hello.SE/std.out file:`pwd`/std.out
5.