[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] classad and slots



On 12/30/2010 02:56 PM, Michael Di Domenico wrote:
I'm not sure i understand how a classad mechanism works, hopefully
someone can straighten it out for me

I've defined a classad in the config file

GPU_DEVICE=999

I then have a condor cron script that adds in

SLOT1_GPU_DEVICE=0
SLOT2_GPU_DEVICE=1
SLOT3_GPU_DEVICE=2

What i'd like to do is reference the slot level config variable from
my submit script

Arguments = $([Target.GPU_DEVICE])

When i submit a test program, i seem to be getting the 999 value
instead of the Slot level value

Are Slot level classads referential as non-slot level (ie GPU_DEVICE
instead of SLOT1_GPU_DEVICE) from a submit file?

How can I check these using condor_status?  I tried the constraint
option, but i'm not sure i have the syntax right

Simpler than using a cron script, you can just use STARTD_ATTRS. Have a look in your condor_config file and search for STARTD_EXPRS.

To see the attributes, you can use condor_status -long and grep, or something with condor_status -format.

Also, you probably want $$([target.GPU_DEVICE])), with two $s.

Here's a little example...

$ condor_config_val -dump | grep GPU
SLOT1_GPU_DEVICE = 0
SLOT2_GPU_DEVICE = 1
SLOT3_GPU_DEVICE = 2
STARTD_ATTRS = GPU_DEVICE

$ condor_status -format "%s\t" Name -format "%d\n" GPU_DEVICE
slot1@xxxxxxxxxxxx	0

$ echo "cmd=/bin/echo\narguments=\$\$([target.GPU_DEVICE])\n+GPU_DEVICE=999\noutput=echo.out\nqueue" | condor_submit

$ cat echo.out
0

Best,


matt