Product Documentation
Virtuoso ADE SKILL Reference
Product Version IC23.1, November 2023

axlJobIntfcStartJobArrayMethod

axlJobIntfcStartJobArrayMethod(
g_inst
x_startIndex
x_endIndex
)
=> t / nil

Description

Job interface member function to start a job array where the job IDs are set between the range of the specified start and end indexes for the array. For example, if the start and end indexes are set to 4 and 10 respectively, the jobs with IDs 4, 5, 6, 7, 8, 9, and 10 would be launched.

For each index in the specified range, a new instance of the selected interface class is created. This interface class can be registered using the function axlRegisterJobIntfc. Basic properties are set to each of the created instances, such as job ID, job policy, session name, ADE service, standard output file, and error output file. This lets the tool keep control of each individual instance and be able to query the health of each of the jobs started with the job array.

The set properties can be retrieved using the command inst-><property_name>. The last instance of the created interface class is passed to the function axlJobIntfcStartJobArrayMethod.

Arguments

g_inst

Specifies a subclass of axlJobIntfc.

x_startIndex

Specifies the start index of the job array.

This index value represents the ID of the first job in the array.

x_endIndex

Specifies the end index of the job array.

This index value represents the ID of the last job in the array.

Value Returned

t

The job array is started successfully.

nil

Indicates an error.

Examples

Starts a job array where the job IDs are determined by the specified start and end indexes.

;; example setup
(defclass groupSubmitJobIntfc (axlJobIntfc)
)
;; set jobArray to t to enable the job array method, otherwise axlJobIntfcStartMethod is used
(defClass groupSubmitJobIntfcGUICust (axlJPGUICust)
    (jobArray @initform t)
)
defmethod( axlJobIntfcStartJobArrayMethod ((inst groupSubmitJobIntfc) startIndex endIndex)
    (let (commandFile fport)
        commandFile = (makeTempFileName "/tmp/jobScript_XXXXX")
        fport = (outfile commandFile "w")
        (fprintf fport "#!/bin/sh\n")
        (fprintf fport "bsub -J \"%s-%s" inst->davinciService inst->sessionName)
        (fprintf fport "[%s]\"\n" sprintf(nil "%d-%d" startIndex endIndex))
        (drain fport)
        (close fport)
        (system sprintf (nil "chmod +x %s" commandFile))
        (ipcBeginProcess commandFile)
    )
)

Return to top
 ⠀
X