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

Re: [HTCondor-users] Compute personal variables in sub file



Hi,

at least on 8.4, it is valid to directly use
	request_cpus = 10
	request_memory = $(request_cpus) * 2048
which gets translated to
	RequestMemory = 10 * 2048
in the job classad.

Cheers,
Max

> Am 31.01.2017 um 14:51 schrieb Brian Bockelman <bbockelm@xxxxxxxxxxx>:
> 
> Hi Mathieu,
> 
> I believe you want:
> 
> request_cpus = 10
> +RequestMemory = RequestCpus * 2048
> 
> The "+" syntax causes RequestMemory to be inserted directly into the ad, instead of being handled by the macro expansion.  That means you can use the full ClassAd language to write the expression.
> 
> I did a quick test of this using the current master; I think it should work the same way for 8.2.2.
> 
> Brian
> 
>> On Jan 31, 2017, at 6:27 AM, Mathieu Bahin <mathieu.bahin@xxxxxxxxxxxxxxx> wrote:
>> 
>> Hi all,
>> 
>> For now we are running a Condor 8.2.2 with partitionable slots configuration.
>> 
>> Is there a way to say that, for a job, we want to request twice as much memory as the CPU number (in G)?
>> For example, if I request 5 CPUs, I would also like to request 10G of memory.
>> 
>> From the documentation, I understood that we can only use directly a variable that we set. Example:
>> ncpus = 10
>> request_cpus = $(ncpus)
>> 
>> Or compute a variable from a ClassAd one. Example:
>> arguments = --memory $$([TARGET.Memory * 0.9])
>> 
>> Is there a way to do something like that?
>> ncpus = 10
>> request_memory = $$[$(ncpus) * 2048])
>> 
>> Cheers,
>> Mathieu
>> -- 
>> ---------------------------------------------------------------------------------------
>> | Mathieu Bahin
>> | IE CNRS
>> |
>> | Institut de Biologie de l'Ecole Normale SupÃrieure (IBENS)
>> | Biocomp team
>> | 46 rue d'Ulm
>> | 75230 PARIS CEDEX 05
>> | 01.44.32.23.56
>> ---------------------------------------------------------------------------------------
>> 
>> _______________________________________________
>> 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/
> 
> _______________________________________________
> 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/

Attachment: smime.p7s
Description: S/MIME cryptographic signature