slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Condor Submissions: Gotchas PowerPoint Presentation
Download Presentation
Condor Submissions: Gotchas

play fullscreen
1 / 12
Download Presentation

Condor Submissions: Gotchas - PowerPoint PPT Presentation

tyra
104 Views
Download Presentation

Condor Submissions: Gotchas

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Condor Submissions: Gotchas

  2. 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. Outline • How do I declare my own attributes so my jobs can distinguish between Red Hat 9 and other Linuxes? • How do I pass environment variables to Windows? For instance, I wantROOT=C:\ • How about passing more than one environment variable? • What about using newlines for better formatting when passing lots of envirnment variables? • A tip for formatting with condor_status

  4. 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? • On Red Hat 9 machines add the following to its configuration: OPSYS_FLAVOUR = RH9 STARTD_EXPRS = OPSYS_FLAVOUR • It can then be matched with a REQUIREMENTSstatement: REQUIREMENTS = (OpSys == "LINUX") && \ (OPSYS_FLAVOUR =?= "RH9") " " √

  5. How to match an attribute (2) • Declare the attribute, deciding whether “numerics” should be quoted or not. Always quote non-numerics • “Export” the attribute

  6. Environment Confusion (1) How do I pass environment variables to Windows? For instance, I wantROOT=C:\ ENVIRONMENT = ROOT=C:\ ARGUMENTS = first_param ENVIRONMENT = ROOT=C:\\ ARGUMENTS = first_param ROOT=C:ARGUMENTS = … ROOT=C:\ARGUMENTS = … ENVIRONMENT = ROOT=C:\\\ ARGUMENTS = first_param ENVIRONMENT = ROOT=C:\□ ARGUMENTS = first_param ROOT=C:\\ARGUMENTS = … ROOT=C:ARGUMENTS = … √ ENVIRONMENT = ROOT=C:\\ ARGUMENTS = first_param ENVIRONMENT = ROOT=C:\|DUMMY="" ARGUMENTS = first_param √ ENVIRONMENT = ROOT="C:\" ARGUMENTS = first_param ?

  7. Environment Confusion (2) How about passing more than one environment variable? E1=AB E1=AB □E2=DE □E2=DE E1=AB E1=AB E2=DE E2=DE ENVIRONMENT = E1=AB|□E2=DE ENVIRONMENT = E1=AB□;□E2=DE ENVIRONMENT = E1=AB□|E2=DE ENVIRONMENT = E1=AB;E2=DE √ √

  8. 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. Environment Confusion (3) • 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. • 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. 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. 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. 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.