Set default job properties

Hi,
I’d like to set default “on task timeOut” on requeue and notify so I don’t have to change it manually every time I send a render to the farm but I don’t have any clue how to do it.
Can some one please give me a tip…

Thanks!

M.

There are two major ways to approach this:

  • You can modify the submitters you use most often to expose, or hard-code the relevant values when writing the JobInfo file of the submission.
  • You could write an Event Plugin to modify any new job, no matter where it was submitted from.

The first approach is easier to implement for one submitter, but harder to do for every type of job.
The latter covers any job, but is slightly more difficult to implement.

The relevant keys and values you need in your JobInfo file are:

MinRenderTimeSeconds=6
OnTaskTimeout=RequeueAndNotify

Most submitters currently only write the TaskTimeoutMinutes= and EnableAutoTimeout= keys. You could locate where this happens in the relevant submitter, and just add some more lines.

For example, for Houdini, you can modify the SubmitHoudiniToDeadlineFunctions.py file like this:

            # Create submission info file
            jobInfoFile = os.path.join(homeDir, "temp", "houdini_submit_info%d.job") % ( wedgeNum * regionJobCount + regionjobNum )
            with open( jobInfoFile, "w" ) as fileHandle:
                fileHandle.write( "Plugin=Houdini\n" )
                fileHandle.write( "Name=%s\n" % jobName )
                fileHandle.write( "Comment=%s\n" % jobProperties.get( "comment", "" ) )
                fileHandle.write( "Department=%s\n" % jobProperties.get( "department", "" ) )
                fileHandle.write( "Pool=%s\n" % jobProperties.get( "pool", "None" ) )
                fileHandle.write( "SecondaryPool=%s\n" % jobProperties.get( "secondarypool", "" ) )
                fileHandle.write( "Group=%s\n" % jobProperties.get( "group", "None" ) )
                fileHandle.write( "Priority=%s\n" % jobProperties.get( "priority", 50 ) )
                fileHandle.write( "TaskTimeoutMinutes=%s\n" % jobProperties.get( "tasktimeout", 0 ) )
                fileHandle.write( "EnableAutoTimeout=%s\n" % jobProperties.get( "autotimeout", False ) )
                fileHandle.write( "ConcurrentTasks=%s\n" % jobProperties.get( "concurrent", 1 ) )
                fileHandle.write( "MachineLimit=%s\n" % jobProperties.get( "machinelimit", 0 ) )
                fileHandle.write( "LimitConcurrentTasksToNumberOfCpus=%s\n" % jobProperties.get( "slavelimit", False ) )
                fileHandle.write( "LimitGroups=%s\n" % jobProperties.get( "limits", 0 ) )
                fileHandle.write( "JobDependencies=%s\n" % dependencies )
                fileHandle.write( "OnJobComplete=%s\n" % jobProperties.get( "onjobcomplete", "Nothing" ) )
                #NEW CODE:
                fileHandle.write( "MinRenderTimeSeconds=6\n" )
                fileHandle.write( "OnTaskTimeout=RequeueAndNotify\n" )

Similarly, to modify the Maya Integrated Submitter, you would modify the function WriteJobFilesAndSubmit() in the SubmitMayaToDeadline.mel script:

fprint $fileId ( "Comment=" + `textFieldGrp -q -text frw_JobComment` + "\n" );
fprint $fileId ( "Pool=" + `optionMenuGrp -q -value frw_deadlinePool` + "\n" );
fprint $fileId ( "SecondaryPool=" + `optionMenuGrp -q -value frw_deadlineSecondaryPool` + "\n" );
fprint $fileId ( "MachineLimit=" + `intSliderGrp -q -v frw_LimitCount` + "\n" );
fprint $fileId ( "Priority=" + $jobPriority + "\n" );
fprint $fileId ( "OnJobComplete=" + `optionMenuGrp -q -value frw_onComplete` + "\n" );
fprint $fileId ( "TaskTimeoutMinutes=" + `intSliderGrp -q -v frw_SlaveTimeout` + "\n" );
fprint $fileId ( "MinRenderTimeMinutes=" + `intSliderGrp -q -v frw_MinSlaveTimeout` + "\n" );
fprint $fileId ( "EnableAutoTimeout=" + `checkBox -q -v frw_AutoTaskTimeout` + "\n" );
fprint $fileId ( "ConcurrentTasks=" + `intSliderGrp -q -v frw_ConcurrentTasks` + "\n" );
fprint $fileId ( "Department=" + `textFieldGrp -q -text frw_Department` + "\n" );
fprint $fileId ( "Group=" + `optionMenuGrp -q -value frw_Group` + "\n" );
fprint $fileId ( "LimitGroups=" + `textFieldGrp -q -text frw_limitGroups` + "\n" );
fprint $fileId ( "JobDependencies=" + $jobDependencies + "\n" );
// NEW CODE
fprint $fileId ( "MinRenderTimeSeconds=6\n" );
fprint $fileId ( "OnTaskTimeout=RequeueAndNotify\n"  );

If this does not work for you, we can discuss how to write an Event Plugin to enforce these values on all submitted jobs.

Sorry @Bobo I totally missed your reply because Gmail thought was spam :roll_eyes:
Thank you I’ll give it a try and let you know how it goes.

M.

Privacy | Site terms | Cookie preferences