Create an script to print hello world in

  • Slides: 11
Download presentation
Create an script to print “hello world” in an output file with also the

Create an script to print “hello world” in an output file with also the information of an input file. The input file should be previously register in the catalogue. Get the ouput. 1. - Create the script to merge the input file with the “hello word” sentence. 2. - Create a JDL file. 3. - Look for a CE and SE where to send the job (IFCA or IAA). 4. - Send the job and save the ID in a file. 5. - Retrieve the files from the nodes.

file. Input. txt: [tut 27@cg 01 ~]$ cat file. Input. txt I'm Juan test.

file. Input. txt: [tut 27@cg 01 ~]$ cat file. Input. txt I'm Juan test. sh: #!/bin/bash DIRE=`pwd` lcg-cp srm: //griddpm 01. ifca. es/dpm/ifca. es/home/vo. formacion. es-ngi. eu/tut 27/fi. Input 2. txt file: //$DIRE/file. Input. txt echo $(cat file. Input. txt) >> file. Output. txt echo "hello World!" >> file. Output. txt

JDL: Type = "job"; Job. Type = "normal"; Executable = "test. sh"; Std. Output

JDL: Type = "job"; Job. Type = "normal"; Executable = "test. sh"; Std. Output = "test. out"; Std. Error = "test. err"; Input. Sandbox = { "test. sh" }; Output. Sandbox = { "test. err", "test. out", "file. Output. txt" }; requirements= other. Glue. CEUnique. ID =="ce. iaa. csic. es: 2119/jobmanager-lcgpbs-forngi"; virtualorganisation = "vo. formacion. es-ngi. eu";

[tut 27@cg 01 ~]$glite-wms-job-submit -o my. Ids -a test. jdl [tut 27@cg 01 ~]$glite-wms-job-status

[tut 27@cg 01 ~]$glite-wms-job-submit -o my. Ids -a test. jdl [tut 27@cg 01 ~]$glite-wms-job-status -i my. Ids [tut 27@cg 01 ~]$glite-wms-job-output --dir my. Dir -i my. Ids [tut 27@cg 01 ~]$lcg-infosites --vo vo. formacion. es-ngi. eu lfc [tut 27@cg 01 ~]$export LFC_HOST="gridlfc 01. ifca. es" [tut 27@cg 01 ~]$export LFC_HOME="/grid/vo. formacion. esngi. eu/tut 27" [tut 27@cg 01 ~]$ lfc-ls /grid/vo. formacion. es-ngi. eu [tut 27@cg 01 ~]$ lfc-mkdir /grid/vo. formacion. es-ngi. eu/tut 27 [tut 27@cg 01 ~]$ lfc-ls /grid/vo. formacion. es-ngi. eu tut 27

CE and SE: [tut 27@cg 01 ~]$ glite-wms-job-list-match test. jdl

CE and SE: [tut 27@cg 01 ~]$ glite-wms-job-list-match test. jdl

[tut 27@cg 01 ~]$ lcg-infosites --vo vo. formacion. es-ngi. eu ce #CPU Free Total

[tut 27@cg 01 ~]$ lcg-infosites --vo vo. formacion. es-ngi. eu ce #CPU Free Total Jobs Running Waiting Computing. Element -----------------------------208 0 0 0 ce 01 -tic. ciemat. es: 2119/jobmanager-lcgpbs-training 1 1 0 0 0 ce. egee. cesga. es: 2119/jobmanager-lcgsge-GRID_ngifor 156 1 0 1 ce 2. egee. cesga. es: 2119/jobmanager-lcgsge-GRID_ngifor 156 1 0 1 ce 3. egee. cesga. es: 2119/jobmanager-lcgsge-GRID_ngifor 56 56 0 0 0 ce-sge-ngi. ceta-ciemat. es: 2119/jobmanager-lcgsge-ngiform 22 22 0 0 0 ce-ieg. bifi. unizar. es: 2119/jobmanager-lcgpbs-formangi 248 238 0 0 0 ce-iber. bifi. unizar. es: 2119/jobmanager-lcgpbs-formangi 1616 0 0 0 gridce 01. ifca. es: 2119/jobmanager-sge-ngifor 8 8 0 0 0 e-ce. iaa. es: 2119/jobmanager-lcgpbs-forngi 448 0 0 0 ce. iaa. csic. es: 2119/jobmanager-lcgpbs-forngi 141 53 33 12 21 ce 01. macc. unican. es: 2119/jobmanager-lcgpbs-grid 42 41 0 0 0 ngiesce. i 3 m. upv. es: 2119/jobmanager-pbs-ngies [tut 27@cg 01 ~]$

[tut 27@cg 01 ~]$ lcg-infosites --vo vo. formacion. es-ngi. eu se Avail Space(Kb) Used

[tut 27@cg 01 ~]$ lcg-infosites --vo vo. formacion. es-ngi. eu se Avail Space(Kb) Used Space(Kb) Type SEs -----------------------------311634212 1120905751 n. a se 2. egee. cesga. es 62 214692993 n. a griddpm 01. ifca. es 232960000 7 n. a e-se. iaa. es 311634212 1120905751 n. a se 2. egee. cesga. es 1000 n. a storm. ifca. es 214637510 5996 n. a se 01. macc. unican. es 39959652288 22911301 n. a se 01 -tic. ciemat. es [tut 27@cg 01 ~]$

[tut 27@cg 01 ~]$ lcg-cr --vo vo. formacion. es-ngi. eu -v -P tut 27/fi.

[tut 27@cg 01 ~]$ lcg-cr --vo vo. formacion. es-ngi. eu -v -P tut 27/fi. Input. txt -d griddpm 01. ifca. es -l lfn: finput. txt file: file. Input. txt

[tut 27@cg 01 ~]$ lcg-cr --vo vo. formacion. es-ngi. eu -v -P tut 27/fi.

[tut 27@cg 01 ~]$ lcg-cr --vo vo. formacion. es-ngi. eu -v -P tut 27/fi. Input 2. txt -d griddpm 01. ifca. es -l lfn: finput 2. txt file: file. Input. txt Using grid catalog type: lfc Using grid catalog : gridlfc 01. ifca. es Checksum type: None SE type: SRMv 2 Destination SURL : srm: //griddpm 01. ifca. es/dpm/ifca. es/home/vo. formacion. es-ngi. eu/tut 27/fi. Input 2. txt Source SRM Request Token: cbe 7 cfdc-5582 -456 f-915 d-83 a 50 f 3 ef 952 Source URL: file: /home/tut 27/file. Input. txt File size: 9 VO name: vo. formacion. es-ngi. eu Destination specified: griddpm 01. ifca. es Destination URL for copy: gsiftp: //griddpm 01. ifca. es: /pool 00/vo. formacion. es-ngi. eu/2010 -0630/fi. Input 2. txt. 925364. 0 # streams: 1 9 bytes 0. 01 KB/sec avg 0. 01 KB/sec inst Transfer took 2040 ms

Using LFN: lfn: /grid/vo. formacion. es-ngi. eu/tut 27/finput 2. txt Using GUID: guid: 3

Using LFN: lfn: /grid/vo. formacion. es-ngi. eu/tut 27/finput 2. txt Using GUID: guid: 3 ae 1 e 303 -2 f 30 -4 a 62 -9 ba 8 -c 4 a 43 df 9 f 5 f 8 Registering LFN: /grid/vo. formacion. es-ngi. eu/tut 27/finput 2. txt (3 ae 1 e 303 -2 f 30 -4 a 62 -9 ba 8 c 4 a 43 df 9 f 5 f 8) Registering SURL: srm: //griddpm 01. ifca. es/dpm/ifca. es/home/vo. formacion. esngi. eu/tut 27/fi. Input 2. txt (3 ae 1 e 303 -2 f 30 -4 a 62 -9 ba 8 -c 4 a 43 df 9 f 5 f 8) guid: 3 ae 1 e 303 -2 f 30 -4 a 62 -9 ba 8 -c 4 a 43 df 9 f 5 f 8 [tut 27@cg 01 ~]$ lfc-ls finput 2. txt [tut 27@cg 01 ~]$

[tut 27@cg 01 ~]$ glite-wms-job-output --dir my. Dir -i my. Ids Homework: Modify the

[tut 27@cg 01 ~]$ glite-wms-job-output --dir my. Dir -i my. Ids Homework: Modify the script to get the output through the catalogue