On 9/1/2014 11:07 AM, Bing X wrote:
I'm working on condor-8.0.6,
I noticed that ATTR_IMAGE_SIZE, is defined in
condor_includes/condor_attributes; assigned value at
condor_submit/submit.cpp; and print at condor_q/queue.cpp
Now I want to add a new attribute, similar to image_size, assign value at
condor_submit/, and print to condor_q. But seems I missed some magic part
on handling ATTR_IMAGE_SIZE. so these 3 steps don't work for my
self-defined attribute.
does anyone know the whole process on handling ATTR_IMAGE_SIZE? any other
part involved in the process from defining attribute, assigning value to
printing to condor_q ?
No need to change the source code, HTCondor already supports adding
custom job (and machine) attributes. These custom attributes can then
be viewed with tools like condor_q and even used in scheduling
expressions (like START, PREEMPT, etc).
Lets says you want to add a custom job attribute "department". In your
submit file, insert a new custom attribute via pre-pending a "+"
character, i.e.
exectuable = foo
universe = vanilla
+department = "Sales"
queue
Then you can view the "department" attribute via condor_q. You will
want to use either the "-l" (to view all job attributes), or "-format"
or "-autoformat" (to view a list of specific attributes) command-line
arguments arguments to condor_q. Take a look at this URL for ideas:
https://htcondor-wiki.cs.wisc.edu/index.cgi/wiki?p=HowToWriteaCondorqWrapper
Hope the above helps,
Todd
_______________________________________________
HTCondor-devel mailing list
HTCondor-devel@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-devel
--
Todd Tannenbaum <tannenba@xxxxxxxxxxx> University of Wisconsin-Madison
Center for High Throughput Computing Department of Computer Sciences
HTCondor Technical Lead 1210 W. Dayton St. Rm #4257
Phone: (608) 263-7132 Madison, WI 53706-1685
|