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

Re: [Condor-users] environment = "OMP_NUM_THREADS=$$(CPUS)" don't work with dynamic slot



Hi,

for some reason, we already always have request_cpus in the submit
file. So your solution will work great.

thanks

Frédéric Bastien

On Sat, Jan 22, 2011 at 3:12 PM, David J. Herzfeld
<david.herzfeld@xxxxxxxxxxxxx> wrote:
> Hi Frédéric:
>
> I do not see this behavior in the version of Condor that we are running
> (7.5.4) - OMP_NUM_THREADS=1 whether it matches with a dynamic slot or not.
> It is possible this behavior was changed in the development series, but has
> not yet made it into the stable branch.
>
> As an alternative - provided you are always specifying 'RequestCpus' in your
> submit file, then
>
> RequestCpus = 1
> Environment = "OMP_NUM_THREADS=$(RequestCpus)"
>
> should work regardless of whether you match with a dynamic or static slot.
>
> Alternatively, if you don't want to have to specify RequestCpus in your
> submit file, you should be able to specify 'Environment' like this:
>
> Environment = \
> "OMP_NUM_THREADS=$$([ifThenElse(isUndefined(MY.RequestCpus),1,MY.RequestCpus)])"
>
> This will look through the job classad to see if RequestCpus is defined. If
> it is not, OMP_NUM_THREADS will be set equal to 1 (in the case where the job
> matched with a "static" slot), otherwise it will be set equal to the value
> of RequestCpus (i.e. the job matched with a dynamic slot).
>
> Best of luck,
> David
>
>
> On 01/22/2011 12:35 PM, Frédéric Bastien wrote:
>>
>> Hi,
>>
>> In my cluster I have 1 node in dynamic partionning mode to test it.
>> I'm using condor 7.4.2. In the submit file I set the environment
>> variable OMP_NUM_THREADS to the number of CPU in the slot.
>>
>> environment    = " OMP_NUM_THREADS=$$(CPUS)"
>>
>> When a 1 cpu job go to a non partitionable slot, all work correctly. But
>> when that same jobs go to the partitionable slot, the environment variable
>> OMP_NUM_THREADS got set to the number of available slot in the dynamic
>> partitionning node before that jobs start.
>>
>> Example. the node have 8 cores. So the first 1 cpu jobs that start on
>> it have OMP_NUM_THREADS=8, the second 1 cpu jobs have
>> OMP_NUM_THREADS=7, ... It seam the substitution of "$$(CPUS)" get done
>> on the class
>> ad of the partitionable slot and not on the created slot!
>>
>> Do anybody have any hint on how to solve this? Do you see that behavior?
>>
>> Their is nothing mentioned in the release note of condor 7.4.3 and
>> 7.4.4 that tell they fixed something like that.
>>
>> thanks for your help and for the great product that condor is.
>>
>> Frédéric Bastien
>> _______________________________________________
>> Condor-users mailing list
>> To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
>> subject: Unsubscribe
>> You can also unsubscribe by visiting
>> https://lists.cs.wisc.edu/mailman/listinfo/condor-users
>>
>> The archives can be found at:
>> https://lists.cs.wisc.edu/archive/condor-users/
>