Failed subcommand run in 2016.09u9 (NetworkComputer)

AlanB_22262
AlanB_22262 New Altair Community Member
edited February 2023 in Altair HPCWorks

In the Runtime 2016.09u9 release, job submitters may receive a message like:

equiv 08/22/2017 12:09:29: USER ERROR: Failed subcommand run: can't read "some-variable-name: no such variable

This happens if your NetworkComputer setup uses a vnc_policy.tcl file that depends on variables declared in the file to be global, and which are referred to by procedures within the file, for example:

set CRDATA(RAM,default)  1024
proc VncPolicyValidateResources {res} {
    global VOV_JOB_DESC CRDATA
    ...
}

The value of some-variable-name is specific to your vnc_policy, CRDATA in the above. This problem arises, because there is a change in the way the vnc_policy.tcl file is sourced between 2016.09u8-1 and 2016.09u9.

The vnc_policy.tcl file is sourced at level 0 of the Tcl interpreter running the vnc run command in u8-1 and all previous versions. It is sourced at level 1 of the interpreter in 2016.09u9, because of a change to optimize the libraries loaded depending on the nc subcommand.

A quick fix is to explicitly declare global variables as such. For example:

global CRDATA  ; # insert this
set CRDATA(RAM,default)  1024
proc VncPolicyValidateResources {res} {
    global VOV_JOB_DESC CRDATA
    ...
}

We will also make available a patch to correct this issue so that unmodified vnc_policy.tcl files will behave as in previous versions.