# doc-cache created by Octave 8.4.0
# name: cache
# type: cell
# rows: 3
# columns: 4
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
batch


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 778
 Convenience wrapper to create and submit a job and returns a handle to it.

 FORMAT j = batch(pool,func,nOut,argIn)

 INPUT
 See also jobClass/addTask
   pool  - pool object
   func  - function string or handle
   nOout - number of outputs
   argIn - cell of input arguments. '$thisworker' can be used to pass task.worker (for logging).

 FORMAT j = batch(...,Name,Value)
   'name'               - name of the job as it appears on the scheduler (default = '')
   'autoAddClientPath'  - automatically add current Ocatave path to the job (default = false)
   'additionalPaths'    - cell of paths to be added to the job (default = {})
   'additionalPackages' - cell of package names to be loaded before running the job, they MUST be installed (default = {})


 SEE ALSO
 jobClass



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 75
 Convenience wrapper to create and submit a job and returns a handle to it.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
jobClass


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1342
 Class to represent a job submitted to the pool. It is usually not created by directly calling its constructor but rather via poolClass/addJob and batch.

 PROPERTIES
   id                 - read-only, job number in the pool to determine job name.
   name               - read-only, job name in the pool to deternmine the job storage folder in pool.jobStorageLocation.
   additionalPaths    - cell of paths to be added to the job (default = {})
   additionalPackages - cell of package names to be loaded before running the job, they MUST be installed (default = {})
   tasks              - list of tasks (usually 1)
   state              - job state as return by the scheduler

 METHODS
   FORMAT addTask(name,func,nOut,args)
   Create a task (with folder and files) and add it to the job
   INPUT
     name - name of the job as it appears on the scheduler
     func - function string or handle
     nOut - number of outputs
     args - cell of input arguments. '$thisworker' can be used to pass task.worker (for logging).

   FORMAT submit() - Submits the job

   FORMAT cance()  - Cancel the job

   FORMAT delete() - Cancel the job and delete the job storage folder

   FORMAT val = getOutput()
   Retrieve the output (if any)
   OUTPUT
     val - 1xN cell array, where N corresponds to the number of outputs


 SEE ALSO
 poolClass, batch



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
 Class to represent a job submitted to the pool.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
poolClass


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2036
 Class to represent a computation pool, which CAN be a single PC and a cluster. It REQUIRES a basic definition containing properties and methods specified in
 a JSON file as stored in <package folder>/+pooldef/+<pool name>. Definitions CAN also be stored externally in a folder '+'<pool name>.

 POOL DEFINITION
 Take a look at the bundled 'local_PS' and 'Slurm' pool definitions for inspiration and guidance.

 PROPERTIES
   name                 - pool name,
   type                 - scheduler ('local', 'Slurm', 'Torque', 'LSF', 'Generic')
   shell                - shell for the scheduler commands ('powershell', 'bash'), used in taskClass/taskClass
   numWorkers           - maximum number of active workers
   jobStorageLocation   - folder to store submission files (shell and Octave scripts, input, output, log files)
   resourceTemplate     - submission parameters describing resource requirements
   submitArguments      - additional submission parameters
   initialConfiguration - command(s) to excute right before Octave
   octaveExecutable     - Octave executable ('octave-cli', 'octave')

 METHODS
 One-liner functions CAN be stored in the JSON under 'functions/<method name>Fcn'. More complex functions MUST be placed in the pool definition folder (along
 with the JSON file) as <method name>.m.
   submitString    - compiles the command string to submit
   schedulerID     - retrieves ID assigned by the scheduler to the worker
   jobState        - retrieves status (as string) of the worker
   jobDeleteString - compiles the submission command


 POOL CLASS

 PROPERTIES (additional)
   reqMemory   - required memory (in GB)
   reqWalltime - required execution time (in hour)
   jobs        - read-only, list of jobs

 METHODS
   FORMAT j = pool.addJob()
   Creates a new job class for the pool a returns a handle to it.

   FORMAT val = getJobState()
   Generates a summary of jobs according to their states.

   FORMAT val = getJobState(state)
   Retrieves the number of jobs at the given state.


 SEE ALSO
 jobClass



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 79
 Class to represent a computation pool, which CAN be a single PC and a cluster.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
taskClass


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 141
 Class to represent a task as part of a job. It is usually not created by directly calling its constructor but rather via jobClass/addTask.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
 Class to represent a task as part of a job.





