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

Re: [HTCondor-users] Idiom for job transforms with late-materialization factories



You might find the

DEFAULT

transform statement useful in this case,  but you can detect when a transform is being applied to a job factory or to a late materialization job

You can use 

    if $(IsClusterAd)
        # statements to apply only to late materialization factory
    endif

In a transform in the Schedd to around statements that should only be applied to to the factory ad.   there is also $(LateMaterialization) which will be true for the factory and for jobs created by a factory.

so 

if $(IsClusterAd)
    # statements to apply only to late materialization factory
elif $(LateMaterialization)
    # statements to apply only to factory jobs
else
    # statements to apply only to non-factory jobs
endif


From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Jeff Templon <templon@xxxxxxxxx>
Sent: Tuesday, February 4, 2025 1:37 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] Idiom for job transforms with late-materialization factories
 
Hi,

If the user uses a late-materialization factory, then job transforms are applied twice - once when making the factory Ad, and then again for each instantiation of a job.

Is there some mechanism or idiom in the job transform language to help deal with this?  I have a case where a user might have specified a value for a ClassAd at job submission, and the transform is putting information into the same (multi valued) classAd, either creating it if it did not exist (the user specified nothing) or appending if the user did.  Since I don’t know how to detect “first pass” or “second pass”, I get stuff like

Ad = user_value, system_value, system_value

The system value is repeated since the transform is repeated.  One solution is to forbid users to give their own values, I’d like to avoid that though, there are good reasons why a user might do that.

JT


_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe

The archives can be found at: https://www-auth.cs.wisc.edu/lists/htcondor-users/