Excluding slaves

I have a custom submission script that is running great. What I’d like to do is exclude 4 slaves from the last submission. So for example, I queue 10 submissions. All 10 are submitted to pool exclusive ‘MAX2016’. But in the last submission, I’d like to exclude 4 slaves from rendering this last submission and they are in the ‘MAX2016’ pool.

How do I list the names of the slaves to be excluded in script, or more specifically, which SMTDsetting relates to this list of slaves?

TIA

Ken

Hi Ken,

Here are the necessary SMTDSettings to populate:

SMTDSettings.SlavesList = #("SomeSlave01","AnotherSlave42","Workstation02")

This is the list of slave names. It can be either a Blacklist, or a Whitelist. When it is used as a Blacklist, the specified slaves will NOT render the job. When specified as a Whitelist, ONLY the specified slaves may render the job.

SMTDSettings.SlavesBlackList = true

This is the boolean value that determines how the above list will be used. If set to true, the list is a Blacklist. If set to false, it is used as a Whitelist.

Using these two values, the SMTDFunctions.CreateSubmitInfoFile() function will write to the info file either

Blacklist=SomeSlave01,AnotherSlave42,Workstation02

or

Whitelist=SomeSlave01,AnotherSlave42,Workstation02

If you are writing the info file yourself instead of calling SMTDFunctions.CreateSubmitInfoFile(), the above is what you are expected to write into the file.

The relevant code in SubmitMaxToDeadline_Functions.ms is

local theBlackWhiteList = SMTDSettings.SlavesList local theKeyword = if SMTDSettings.SlavesBlackList then "Blacklist" else "Whitelist" if SMTDSettings.DBR do --if DBR Offload job, use the DBR settings ( theBlackWhiteList = SMTDSettings.MastersList theKeyword = if SMTDSettings.MastersBlackList then "Blacklist" else "Whitelist" ) local theSlaveListString = SMTDFunctions.getListAsString theBlackWhiteList format "%=%\n" theKeyword theSlaveListString to:submitInfoFile

There is also the SMTDSettings.Slaves property which contains ALL slaves registered with the Repository. It defaults to #(), so you need to populate it by calling

SMTDFunctions.CollectSlaves()

After that, you can peek in the SMTDSettings.Slaves array to get the names of slaves that actually exist on the farm.

Thanks Bobo. Bobo to the rescue again.

My submission script is custom and doesn’t use SMTDFunctions.CreateSubmitInfoFile(). I can just add SMTDSettings.SlavesList = #(“SomeSlave01”,“AnotherSlave42”,“Workstation02”) and SMTDSettings.SlavesBlackList = true to my script and that should do it.

Thanks again

Ken

Nope, if you are NOT calling SMTDFunctions.CreateSubmitInfoFile(), then the properties SMTDSettings.SlavesList and SMTDSettings.SlavesBlackList will NOT be used by SMTD anywhere else, so setting them will do nothing.

Instead, in your script, wherever you are writing the Info file, you will have to write the line

Blacklist=Name1,Name2,Name3

yourself. You can use the function SMTDFunctions.getListAsString() to convert the array of names to a comma-separated string, and use format() to write to the file like in the code snippet I posted.

Here’s a snippet from my code using

if SMTDSettings != undefined then
(
.
.
.
if a != b.count then
(
– SMTDSettings.submitassuspended = false
)
else
(
SMTDSettings.SlavesList = #(“I725”,“I734”,“I738”,“I7BEAST”)
SMTDSettings.SlavesBlackList = true
)
.
.
.
)
and it works

Thanks Bobo

Ken