Hi Jordan,
Indeed, condor_submit does a remarkable amount of heavy lifting! When implementing Schedd.submit, I made a conscience effort to balance ease-of-use and burden-of-maintenance. I tried to make things developer friendly, but perhaps less user friendly than the "condor_submit" language.
What's wrong with the user interface for setting:
ad["foo"] = strcat("bar ", ProcessId)
? When returning things to the end-user, you can always do:
return ad.eval("foo")
to evaluate things to the actual string. Alternately, maybe it would be useful to ask the HTCondor team to add an evalMacro function? This way, you could do:
ad["foo"] = evalMacro("bar $(ProcessId)")
I save a lot of lifting by using the ClassAd language, so I'd prefer to keep to things within ClassAds.
Brian So it seems that you never realize how much condor_submit does for you until you don't use it anymore.
Having switched to almost exclusively using the python condor bindings, I'm trying to figure out a way to emulate using submit file macros (like "$(Process)") in the classads. When I was using the SOAP API, I created the jobs using a for loop, which allowed me to simply do a string replace for "$(Process)" and the process number from the loop. But now that I'm using the python bindings, I don't need to use a loop, which cuts the submit time down but also means I don't know the process ID for each process (and thus I can't use those macros).
I have figured out that I can get this same functionality manually by using the strcat function (e.g., ClassAd = strcat("I am process ",ProcessId)), but this solution is not acceptable considering the user interface we have. Worse case scenario, I could try doing some regex magic, but that seems inflexible at best.
Is a regex my only solution, or have I been missing something?
Thanks, Jordan
_______________________________________________ HTCondor-users mailing list To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a subject: Unsubscribe You can also unsubscribe by visiting https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
The archives can be found at: https://lists.cs.wisc.edu/archive/htcondor-users/ |