Simple Job
From MediaWiki
(Difference between revisions)
(16 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | + | This is simple single job submitting example. | |
+ | Executing script will list first and second argument.Arguments are fileA and fileB. For demonstration use attached file. | ||
+ | [http://wiki.ipb.ac.rs/images/d/d8/Single.tgz single.tgz] | ||
+ | |||
+ | [http://wiki.ipb.ac.rs/images/3/34/Single2.tgz Single2.tgz] | ||
- | + | [http://wiki.ipb.ac.rs/images/0/04/Single_advanced.tgz Single_advanced.tgz] | |
- | + | ||
- | + | ||
1.Extract file with: | 1.Extract file with: | ||
- | [ngrkic@ui ~]$ tar | + | [ngrkic@ui ~]$ tar xvzf single.tgz |
2.Enter directory single with: | 2.Enter directory single with: | ||
Line 32: | Line 34: | ||
This is second file... | This is second file... | ||
+ | |||
+ | [ngrkic@ui single]$ cat test.sh | ||
+ | #!/bin/sh | ||
+ | echo "First file:" | ||
+ | cat $1 | ||
+ | echo "Second file:" | ||
+ | cat $2 | ||
+ | |||
+ | |||
[ngrkic@ui single]$ cat single.jdl | [ngrkic@ui single]$ cat single.jdl | ||
Line 42: | Line 53: | ||
OutputSandbox = {"std.out", "std.err"}; | OutputSandbox = {"std.out", "std.err"}; | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
4.Creating VOMS proxy: | 4.Creating VOMS proxy: | ||
Line 61: | Line 66: | ||
Your proxy is valid until Fri Oct 2 01:11:00 2009 </code> | Your proxy is valid until Fri Oct 2 01:11:00 2009 </code> | ||
- | |||
- | |||
Line 69: | Line 72: | ||
[ngrkic@ui single]$ glite-wms-job-submit -a single.jdl | [ngrkic@ui single]$ glite-wms-job-submit -a single.jdl | ||
- | Connecting to the service https://wms-aegis.ipb.ac.rs:7443/glite_wms_wmproxy_server | + | Connecting to the service <nowiki>https://wms-aegis.ipb.ac.rs:7443/glite_wms_wmproxy_server</nowiki> |
====================== glite-wms-job-submit Success ====================== | ====================== glite-wms-job-submit Success ====================== | ||
Line 76: | Line 79: | ||
Your job identifier is: | Your job identifier is: | ||
- | https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA | + | <nowiki>https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA</nowiki> |
========================================================================== | ========================================================================== | ||
Line 86: | Line 89: | ||
6.Requesting Job status: | 6.Requesting Job status: | ||
- | [ngrkic@ui single]$ glite-wms-job-status https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA | + | [ngrkic@ui single]$ glite-wms-job-status <nowiki>https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA</nowiki> |
************************************************************* | ************************************************************* | ||
BOOKKEEPING INFORMATION: | BOOKKEEPING INFORMATION: | ||
- | Status info for the Job : https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA | + | Status info for the Job : <nowiki>https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA</nowiki> |
Current Status: Done (Success) | Current Status: Done (Success) | ||
Logged Reason(s): | Logged Reason(s): | ||
Line 104: | Line 107: | ||
7.Requesting Job output: | 7.Requesting Job output: | ||
- | [ngrkic@ui single]$ glite-wms-job-output --dir /home/ngrkic/test https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA | + | [ngrkic@ui single]$ glite-wms-job-output --dir /home/ngrkic/test <nowiki>https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA |
- | + | </nowiki> | |
================================================================================ | ================================================================================ | ||
Line 111: | Line 114: | ||
Output sandbox files for the job: | Output sandbox files for the job: | ||
- | https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA | + | <nowiki>https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA</nowiki> |
have been successfully retrieved and stored in the directory: | have been successfully retrieved and stored in the directory: | ||
/home/ngrkic/test | /home/ngrkic/test | ||
Line 122: | Line 125: | ||
[ngrkic@ui ~]$ cd test | [ngrkic@ui ~]$ cd test | ||
[ngrkic@ui ~]$ cat std.out | [ngrkic@ui ~]$ cat std.out | ||
+ | First file: | ||
+ | This is first file.... | ||
+ | Second file: | ||
+ | This is second file... | ||
+ | |||
+ | |||
+ | ---- |
Latest revision as of 09:47, 27 May 2012
This is simple single job submitting example. Executing script will list first and second argument.Arguments are fileA and fileB. For demonstration use attached file.
1.Extract file with:
[ngrkic@ui ~]$ tar xvzf single.tgz
2.Enter directory single with:
[ngrkic@ui ~]$ cd single
3.List directory:
[ngrkic@ui single]$ ll -rw-rw-r-- 1 ngrkic ngrkic 23 Sep 30 23:43 fileA -rw-rw-r-- 1 ngrkic ngrkic 23 Sep 30 23:43 fileB -rw-rw-r-- 1 ngrkic ngrkic 184 Oct 1 13:00 single.jdl -rw-rw-r-- 1 ngrkic ngrkic 63 Sep 30 23:42 test.sh
This is content of files
[ngrkic@ui single]$ cat fileA
This is first file....
[ngrkic@ui single]$ cat fileB
This is second file...
[ngrkic@ui single]$ cat test.sh #!/bin/sh echo "First file:" cat $1 echo "Second file:" cat $2
[ngrkic@ui single]$ cat single.jdl
Executable = "test.sh"; Arguments = "fileA fileB"; StdOutput = "std.out"; StdError = "std.err"; InputSandbox = {"test.sh", "fileA", "fileB"}; OutputSandbox = {"std.out", "std.err"};
4.Creating VOMS proxy:
[ngrkic@ui single]$ voms-proxy-init -voms aegis
Cannot find file or dir: /home/ngrkic/.glite/vomses Enter GRID pass phrase: Your identity: /C=RS/O=AEGIS/OU=Institute of Physics Belgrade/CN=Nikola Grkic Creating temporary proxy ......................... Done Contacting voms.ipb.ac.rs:15001 [/C=RS/O=AEGIS/OU=Institute of Physics Belgrade/CN=host/voms.ipb.ac.rs] "aegis" Done Creating proxy ..................................................... Done Your proxy is valid until Fri Oct 2 01:11:00 2009 </code>
5.Submiting single job:
[ngrkic@ui single]$ glite-wms-job-submit -a single.jdl
Connecting to the service https://wms-aegis.ipb.ac.rs:7443/glite_wms_wmproxy_server ====================== glite-wms-job-submit Success ====================== The job has been successfully submitted to the WMProxy Your job identifier is: https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA ==========================================================================
Copy the job ID.Job is running now, and it should finish in few moments...
6.Requesting Job status:
[ngrkic@ui single]$ glite-wms-job-status https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA ************************************************************* BOOKKEEPING INFORMATION: Status info for the Job : https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA Current Status: Done (Success) Logged Reason(s): - - Job terminated successfully Exit code: 0 Status Reason: Job terminated successfully Destination: grid01.rcub.bg.ac.rs:2119/jobmanager-pbs-aegis Submitted: Thu Oct 1 13:38:10 2009 CEST *************************************************************
7.Requesting Job output:
[ngrkic@ui single]$ glite-wms-job-output --dir /home/ngrkic/test https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA ================================================================================ JOB GET OUTPUT OUTCOME Output sandbox files for the job: https://wms-aegis.ipb.ac.rs:9000/aV8X3jGTiR0cRSsfxhr3nA have been successfully retrieved and stored in the directory: /home/ngrkic/test ================================================================================
8.Go to test directory and see output with commands:
[ngrkic@ui single]$ cd [ngrkic@ui ~]$ cd test [ngrkic@ui ~]$ cat std.out First file: This is first file.... Second file: This is second file...