| 48 | Configuration |
| 49 | ============= |
| 50 | |
| 51 | During DRMAA session initialization (``drmaa_init``) library tries to read |
| 52 | its configuration parameters from locations: |
| 53 | ``/etc/pbs_drmaa.conf``, ``~/.pbs_drmaa.conf`` and from file given in |
| 54 | ``PBS_DRMAA_CONF`` environment variable (if set to non-empty string). |
| 55 | If multiple configuration sources are present then all configurations |
| 56 | are merged with values from user-defined files taking precedence |
| 57 | (in following order: ``$PBS_DRMAA_CONF``, ``~/.pbs_drmaa.conf``, |
| 58 | ``/etc/pbs_drmaa.conf``). |
| 59 | |
| 60 | Currently recognized configuration parameters are: |
| 61 | |
| 62 | pool_delay |
| 63 | Amount of time (in seconds) between successive checks of unfinished job(s). |
| 64 | |
| 65 | Type: integer, Default: 5 |
| 66 | |
| 67 | wait_thread |
| 68 | Value 1 enables single "wait thread" for updating jobs status. |
| 69 | With ``pbs_home`` set enables wait_thread which reads PBS log files (instead of polling PBS daemons). |
| 70 | |
| 71 | Type: integer, Default: 0 |
| 72 | |
| 73 | pbs_home |
| 74 | Path to Torque/PBS Pro spool directory that contains server logs (e.g.: /var/spool/pbs). |
| 75 | |
| 76 | Type: string, Default: not set |
| 77 | |
| 78 | job_categories |
| 79 | Dictionary of job categories. It's keys are job categories names |
| 80 | mapped to `native specification`_ strings. Attributes set by |
| 81 | job category can be overridden by corresponding DRMAA attributes |
| 82 | or native specification. Special category name ``default`` |
| 83 | is used when ``drmaa_job_category`` job attribute was not set. |
| 84 | |
| 85 | cache_job_state |
| 86 | According to the DRMAA specification every `drmaa_job_ps()` call should |
| 87 | query DRM system for job state. With this option one may optimize |
| 88 | communication with DRM. If set to positive integer `drmaa_job_ps()` |
| 89 | returns remembered job state without communicating with DRM for |
| 90 | `cache_job_state` seconds since last update. By default library |
| 91 | conforms to specification (no caching will be performed). |
| 92 | |
| 93 | Type: integer, default: 0 |
| 94 | |
| 95 | |
| 96 | .. table:: |
| 97 | Different modes of operation |
| 98 | |
| 99 | =========== ========= =========== ======================= =================================== |
| 100 | wait_thread pbs_home mode keep_completed needed comments |
| 101 | =========== ========= =========== ======================= =================================== |
| 102 | 0 not set polling yes default configuration |
| 103 | 1 not set polling yes more effective than above |
| 104 | 1 set triggered no read access to server logs needed |
| 105 | =========== ========= =========== ======================= =================================== |
| 106 | |
| 107 | |
| 108 | Configuration file syntax |
| 109 | ------------------------- |
| 110 | |
| 111 | Configuration file is in form a dictionary. |
| 112 | Dictionary is set of zero or more key-value pairs. |
| 113 | Key is a string while value could be a string, an integer |
| 114 | or another dictionary. |
| 115 | :: |
| 116 | |
| 117 | configuration: dictionary | dictionary_body |
| 118 | dictionary: '{' dictionary_body '}' |
| 119 | dictionary_body: (string ':' value ',')* |
| 120 | value: integer | string | dictionary |
| 121 | string: unquoted-string | single-quoted-string | double-quoted-string |
| 122 | unquoted-string: [^ \t\n\r:,0-9][^ \t\n\r:,]* |
| 123 | single-quoted-string: '[^']*' |
| 124 | double-quoted-string: "[^"]*" |
| 125 | integer: [0-9]+ |
| 126 | |
| 127 | Configuration file example |
| 128 | -------------------------- |