Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] force certain type of jobs to run on an specific startd
- Date: Mon, 11 May 2020 08:53:56 -0500 (CDT)
- From: Todd L Miller <tlmiller@xxxxxxxxxxx>
- Subject: Re: [HTCondor-users] force certain type of jobs to run on an specific startd
Basically, if I can have multiple blocks [ ] [ ] inside a JOB_TRANSFORM?
It's not very well documented, but it would appear not.
My main problem is that they need to processed in order, and once a job
have been successfully handled by one block, it should not be analyzed
by the others. Makes sense?
The JOB_TRANSFORM_NAMES list is the order in which job
transformations are applied, so you have control over the order. I'll
talk about a possible hack below, but it seems like even if you have
overlapping requirements for different blocks, given that you have an
preferred ordering for those blocks, that you can adjust the requirements
to match.
For example, if block A requires that a job use fewer then 4 CPUs,
and block B requires that the job use fewer than 8 GB of RAM, than the
logic
if( CPUs < 4 ) { A(); }
else if( Memory < 8096 ) { B(); }
is the same as
if( CPUs < 4 ) { A(); }
if( (!(CPUs < 4)) && Memory < 8096 ) { B(); }
and that you could write the requirements expressions to match -- syntax
completed untested:
requirementsA = CPUs < 4
requirementsB = Memory < 8096
JOB_TRANSFORM_NAMES = A, B
JOB_TRANSFORM_A @= transformA
requirements = $(requirementsA)
...
@transformA
JOB_TRANSFORM_B @= transformB
requirements = (!($(requirementsA))) && $requirementsB
...
@transformB
If that approach doesn't work, you could also try setting an
attribute in the transform that's just a flag telling other transforms
not to match (syntax completely untested):
JOB_TRANSFORM_NAMES = A, B, CLEANUP
JOB_TRANSFORM_A @= transformA
[
requirements = ...
set_transformed = True
...
]
@transformA
JOB_TRANSFORM_B @= transformB
[
requirements = (!transformed) && ...
...
]
@transformB
JOB_TRANSFORM_CLEANUP @= transformCleanup
[
Delete_transformed = True
]
@transformCleanup
This configuration of course assumes the "transformed" is never used for
anything else by anyone else, so you'll probably want to pick something
considerably more unique.
- ToddM