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

Condor Submissions: Gotchas

  • Upload
    tyra

  • View
    37

  • Download
    0

Embed Size (px)

DESCRIPTION

Condor Submissions: Gotchas. 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: - PowerPoint PPT Presentation

Citation preview

Page 1: Condor Submissions: Gotchas

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

Condor Submissions:Gotchas

Page 2: Condor Submissions: Gotchas

Presenter NameFacility Name

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

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."

Page 3: Condor Submissions: Gotchas

Presenter NameFacility Name

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

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

Page 4: Condor Submissions: Gotchas

Presenter NameFacility Name

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

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 = RH9STARTD_EXPRS = OPSYS_FLAVOUR

2. It can then be matched with a REQUIREMENTS statement:

REQUIREMENTS = (OpSys == "LINUX") && \(OPSYS_FLAVOUR =?= "RH9")

" "

Page 5: Condor Submissions: Gotchas

Presenter NameFacility Name

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

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

Page 6: Condor Submissions: Gotchas

Presenter NameFacility Name

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

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 ?

Page 7: Condor Submissions: Gotchas

Presenter NameFacility Name

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

Environment Confusion (2)How about passing more than one

environment variable?

E1=AB E1=AB□E2=DE □E2=DE

E1=AB E1=ABE2=DE E2=DE

ENVIRONMENT = E1=AB|□E2=DE ENVIRONMENT = E1=AB□;□E2=DE

ENVIRONMENT = E1=AB□|E2=DE ENVIRONMENT = E1=AB;E2=DE

√ √

Page 8: Condor Submissions: Gotchas

Presenter NameFacility Name

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

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

√√√

Page 9: Condor Submissions: Gotchas

Presenter NameFacility Name

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

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.

Page 10: Condor Submissions: Gotchas

Presenter NameFacility Name

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

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

Page 11: Condor Submissions: Gotchas

Presenter NameFacility Name

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

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

Page 12: Condor Submissions: Gotchas

Presenter NameFacility Name

John Kewleye-Science Centre

CCLRC Daresbury Laboratory

28th June20062nd European Condor WeekMilano

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.