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

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

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.


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])

| Mathieu Bahin
| Institut de Biologie de l'Ecole Normale SupÃrieure (IBENS)
| Biocomp team
| 46 rue d'Ulm
| 75230 PARIS CEDEX 05
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting

The archives can be found at: