Presentation is loading. Please wait.

Presentation is loading. Please wait.

John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June2006 2 nd European Condor Week Milano Condor Submissions: Gotchas.

Similar presentations


Presentation on theme: "John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June2006 2 nd European Condor Week Milano Condor Submissions: Gotchas."— Presentation transcript:

1 John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano Condor Submissions: Gotchas

2 Presenter Name Facility Name John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano What is a "Gotcha" This presentation was really called "Hints and Tips", but I think the term "Gotcha" or pitfalls is more appropriate. From Wikipedia: "A 'Gotcha' is a feature of a system, a program or a programming language that works in the way it is documented but is counter-intuitive and almost invites mistakes because it is both enticingly easy to invoke and completely unexpected and/or unreasonable in its outcome."

3 Presenter Name Facility Name John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano Outline 1.How do I declare my own attributes so my jobs can distinguish between Red Hat 9 and other Linuxes? 2.How do I pass environment variables to Windows? For instance, I want ROOT=C:\ 3.How about passing more than one environment variable? 4.What about using newlines for better formatting when passing lots of envirnment variables? 5.A tip for formatting with condor_status

4 Presenter Name Facility Name John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano How to match an attribute (1) How do I declare my own attributes so my jobs can distinguish between Red Hat 9 and other Linuxes? 1.On Red Hat 9 machines add the following to its configuration: OPSYS_FLAVOUR = RH9 STARTD_EXPRS = OPSYS_FLAVOUR 2.It can then be matched with a REQUIREMENTS statement: REQUIREMENTS = (OpSys == "LINUX") && \ (OPSYS_FLAVOUR =?= "RH9") " √

5 Presenter Name Facility Name John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano How to match an attribute (2) 1.Declare the attribute, deciding whether “numerics” should be quoted or not. Always quote non-numerics 2.“Export” the attribute

6 Presenter Name Facility Name John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano Environment Confusion (1) How do I pass environment variables to Windows? For instance, I want ROOT=C:\ ENVIRONMENT = ROOT=C:\ ARGUMENTS = first_param ENVIRONMENT = ROOT=C:\\\ ARGUMENTS = first_param ENVIRONMENT = ROOT=C:\\ ARGUMENTS = first_param ENVIRONMENT = ROOT=C:\ □ ARGUMENTS = first_param ENVIRONMENT = ROOT=C:\\ ARGUMENTS = first_param ENVIRONMENT = ROOT=C:\|DUMMY="" ARGUMENTS = first_param ROOT=C:ARGUMENTS = …ROOT=C:\ARGUMENTS = … ROOT=C:\\ARGUMENTS = … ROOT=C:ARGUMENTS = … √ √ ENVIRONMENT = ROOT="C:\" ARGUMENTS = first_param ?

7 Presenter Name Facility Name John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano Environment Confusion (2) How about passing more than one environment variable? E1=AB □E2=DE E1=AB E2=DE ENVIRONMENT = E1=AB|□E2=DEENVIRONMENT = E1=AB□;□E2=DE ENVIRONMENT = E1=AB□|E2=DEENVIRONMENT = E1=AB;E2=DE √ √

8 Presenter Name Facility Name John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano Environment Confusion (3) What about using newlines for better formatting when passing lots of envirnment variables? E1=AB □E2=DE E1=AB E2=DE ENVIRONMENT = E1=AB;□\ E2=DE ENVIRONMENT = E1=AB□|\ E2=DE ENVIRONMENT = E1=AB\ |E2=DE ENVIRONMENT = E1=AB;\ E2=DE √ √ √

9 Presenter Name Facility Name John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano Environment Confusion (3) 1.Remember a trailing backslash will escape the newline, even if you add a trailing space or escape it with another backslash, or both. You must escape it and have a blank line afterwards. 2.Be careful about blanks and tabs in the middle of the environment line, they may render your declarations impotent. Probably better to avoid whitespace.

10 Presenter Name Facility Name John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano Tip for condor_status $ condor_status -f "%-6s" Arch -f "%-7s" OpSys \ -f " %-12s\n" OPSYS_FLAVOUR | sort | uniq -c 1 1 INTEL LINUX Gentoo 1 INTEL LINUX Mandrake10 2 INTEL LINUX RH80 3 INTEL LINUX RH9 2 INTEL LINUX SUSE80 6 INTEL LINUX SUSE90 5 INTEL LINUX WBL 1 INTEL WINNT40INTEL WINNT50INTEL WINNT51

11 Presenter Name Facility Name John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano Tip for condor_status $ condor_status -f "%-6s" Arch -f "%-7s" OpSys \ -f " %-12s" OPSYS_FLAVOUR \ -f "\n" OpSys | sort | uniq -c 1 1 INTEL LINUX Gentoo 1 INTEL LINUX Mandrake10 2 INTEL LINUX RH80 3 INTEL LINUX RH9 2 INTEL LINUX SUSE80 6 INTEL LINUX SUSE90 5 INTEL LINUX WBL 1 INTEL WINNT40 1 INTEL WINNT50 1 INTEL WINNT51

12 Presenter Name Facility Name John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June nd European Condor Week Milano And Finally Good writing is all about spelling, grammar and punctuation. The same is true with condor submission files. Todd warned you yesterday about your spelling; condor_submit will worry about the grammar; you must be careful with your whitespace and punctuation.


Download ppt "John Kewley e-Science Centre CCLRC Daresbury Laboratory 28 th June2006 2 nd European Condor Week Milano Condor Submissions: Gotchas."

Similar presentations


Ads by Google