我想根据是否有人在机器上工作来更改 CPU 计数。不想抢占手册中定义的工作。只需执行以下操作:
// condor_config file
if (KeyboardIdle < 10)
NUM_CPUS = 2
else
NUM_CPUS = 8
endif
上述命令失败:(KeyboardIdle < 10) is not a valid if condition because complex conditionals are not supported
。
任何方式我可以实现这个还是NUM_CPUS
一个固定变量?
根据 Greg 的回答,我的 condor_config 的最底部如下
NUM_CPUS = 16
START = (SlotID < 8) || (KeyboardIdle > 10)
理论上只允许启动 8 个作业,但运行时condor_status myMachine
我得到:
C:\>condor_status myMachine
Name OpSys Arch State Activity LoadAv Mem ActvtyTime
slot1@myMachine.cluster WINDOWS X86_64 Claimed Busy 1.210 8186 0+00:00:02
slot2@myMachine.cluster WINDOWS X86_64 Claimed Busy 0.500 8186 0+00:00:03
slot3@myMachine.cluster WINDOWS X86_64 Claimed Busy 2.220 8186 0+00:00:01
slot4@myMachine.cluster WINDOWS X86_64 Claimed Busy 1.500 8186 0+00:00:02
slot5@myMachine.cluster WINDOWS X86_64 Claimed Busy 0.600 8186 0+00:00:02
slot6@myMachine.cluster WINDOWS X86_64 Claimed Busy 0.380 8186 0+00:00:02
slot7@myMachine.cluster WINDOWS X86_64 Claimed Busy 1.940 8186 0+00:00:03
slot8@myMachine.cluster WINDOWS X86_64 Claimed Busy 0.880 8186 0+00:00:02
slot9@myMachine.cluster WINDOWS X86_64 Claimed Busy 1.560 8186 0+00:00:02
slot10@myMachine.cluster WINDOWS X86_64 Claimed Busy 0.310 8186 0+00:00:02
slot11@myMachine.cluster WINDOWS X86_64 Claimed Busy 2.180 8186 0+00:00:02
slot12@myMachine.cluster WINDOWS X86_64 Claimed Busy 1.580 8186 0+00:00:02
slot13@myMachine.cluster WINDOWS X86_64 Claimed Busy 0.950 8186 0+00:00:02
slot14@myMachine.cluster WINDOWS X86_64 Claimed Busy 1.890 8186 0+00:00:02
slot15@myMachine.cluster WINDOWS X86_64 Claimed Busy 0.490 8186 0+00:00:02
slot16@myMachine.cluster WINDOWS X86_64 Claimed Busy 1.600 8186 0+00:00:01
Total Owner Claimed Unclaimed Matched Preempting Backfill Drain
X86_64/WINDOWS 16 0 16 0 0 0 0 0
Total 16 0 16 0 0 0 0 0
有什么想法吗?