

Slot_type_2_start = (Owner = "$(BOINC_owner)") & ($(Backfill_Resources_Exhausted) = False) Num_slots_type_2 = $INT(NumBackfillSlots) Slot_type_2 = cpus=$(BackfillCpusPerSlot) memory=$(BackfillMemoryPerSlot), gpus=0 # (set _CONDOR_BOINC_SLOT so that BOINC config variables canĮval `awk '/^SlotID/ )īackfill_Cpus_Exhausted = (slot1_Cpus / $(BackfillCpusPerSlot) < (SlotID - 1))īackfill_Memory_Exhausted = (slot1_Memory / $(BackfillMemoryPerSlot) < (SlotID- 1))īackfill_Resources_Exhausted = ( $(Backfill_Cpus_Exhausted) || $(Backfill_Memory_Exhausted) ) # read the machine ClassAd and extract what we need The fetch_work_boinc script can just be a shell script such as the following: The slotX directories should be owned by the backfill user (or whatever user you have configured the slot to run as). It assumes BOINC has been installed in /opt/boinc/BOINC and directories for each instance of BOINC have been created in /opt/boinc/var/slot1, slot2, etc. The BOINC jobs will run as the backfill user. The note says that the job requirements were not met whenever the above requirements expression is not true.) (You will see an entry in the startd logs each time the startd calls out to the fetch-work script. The above example starts up BOINC after 20 minutes of the slot being unclaimed. # configure the startd to run BOINC backfill jobsīOINC_HOOK_FETCH_WORK = $(BOINC_HOME)/fetch_work_boinc (State = "Unclaimed" & $(StateTimer) > 1200) # the following BOINC settings are used by the boinc fetch work hookīOINC_Executable = $(BOINC_HOME)/BOINC/boincīOINC_InitialDir = $(BOINC_HOME)/var/slot$(BOINC_SLOT)īOINC_User = -no_gui_rpc -allow_multiple_clients -attach_project īOINC_Output = $(BOINC_InitialDir)/boinc.outīOINC_Error = $(BOINC_InitialDir)/boinc.err It uses the startd's fetch-work hook to run one instance of the backfill task per idle HTCondor slot. To get around that problem, there is a different way to configure HTCondor to run BOINC backfill (or any other type of backfill task). (If you set it up, HTCondor may show multiple slots in the backfill state, but in fact only a single instance of BOINC will be running and it will be running a statically configured number of work units in parallel-typically just one.) Therefore, the built-in support for BOINC is only really capable of backfilling a single slot. At this time (BOINC 6.4), there is no such capability in BOINC. However, the built-in support assumes that BOINC can decide for itself how many tasks to run in order to fill the idle cpus on a multi-cpu/core machine. HTCondor provides special support for backfilling with BOINC. When HTCondor is not busy running jobs from users, you may want it to run some other backfill task. Machine RANK doesn't work with partitionable slots as of HTCondor 8.0.

We use machine RANK to preempt the BOINC jobs when more important jobs are available. The BOINC client will happily run forever.

NOTE: This recipe doesn't work with partitionable slots.
#CUSTOM BOINC CONFIG FILE HOW TO#
How to configure backfill tasks such as BOINC using work fetch
