Using Different Resources and Jobclasses
When specifying DP jobs, you can stack jobclasses so that the primary and component jobs have different resources and job classes.
This is done by setting VOV_JOB_DESC(dp,resources) and VOV_JOB_DESC(dp,jobclasses) to specify the resources and jobclass labels for the master and subcomponent DP jobs.
For example, two jobclass definitions
mycalibre_a.tcl
and
mycalibre_b.tcl
are defined as follows:
::::::::::::::
mycalibre_a.tcl
::::::::::::::
# Copyright (c) 1995-2021, Altair Engineering
# All Rights Reserved.
# $Id: //vov/trunk/src/scripts/jobclass/short.tcl#3 $
set classDescription "My Calibre job resources"
puts "This is mycalibre jobclass"
if { [ info exists VOV_JOB_DESC(dp,resources) ] } {
set VOV_JOB_DESC(dp,resources) [ string cat $VOV_JOB_DESC(dp,resources) ",RAM/200 CORES/2" ]
set VOV_JOB_DESC(dp,jobclasses) [ string cat $VOV_JOB_DESC(dp,jobclasses) ",mycalibre_a" ]
} else {
set VOV_JOB_DESC(dp,resources) "RAM/200 CORES/2"
set VOV_JOB_DESC(dp,jobclasses) "mycalibre_a"
}
proc initJobClass {} {
}
::::::::::::::
mycalibre_b.tcl
::::::::::::::
# Copyright (c) 1995-2021, Altair Engineering
# All Rights Reserved.
# $Id: //vov/trunk/src/scripts/jobclass/short.tcl#3 $
set classDescription "My Calibre job resources"
puts "This is mycalibre2.tcl"
if { [info exists VOV_JOB_DESC(dp,res,*)] } {
puts "VOV_JOB_DESC(dp,res,*) already exists. This is good!"
} else {
puts "VOV_JOB_DESC(dp,res,*) does not appear to exist. This is bad."
}
if { [ info exists VOV_JOB_DESC(dp,resources) ] } {
set VOV_JOB_DESC(dp,resources) [ string cat $VOV_JOB_DESC(dp,resources) ",RAM/400 CORES/4" ]
set VOV_JOB_DESC(dp,jobclasses) [ string cat $VOV_JOB_DESC(dp,jobclasses) ",mycalibre_b" ]
} else {
set VOV_JOB_DESC(dp,resources) "RAM/400 CORES/4"
set VOV_JOB_DESC(dp,jobclasses) "mycalibre_b"
}
proc initJobClass {} {
}
You then call nc run as:
nc run -v 5 -C mycalibre -C mycalibre2 -e BASE -J jeffjob -dp 4 vovparallel clone sleep 1
This results in the primary job having the jobclass "mycalibre_a
"
and the resources "RAM/200 CORES/2" while the secondary jobs have a jobclass of
"mycalibre_b
" and the resources "RAM/400 CORES/4".