Skip to content

Commit

Permalink
updated readme man page ...
Browse files Browse the repository at this point in the history
  • Loading branch information
justanhduc committed Nov 4, 2021
1 parent e6f461f commit 0d08156
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ See below or `man ts` for more details.
```
usage: ts [action] [-ngfmdE] [-L <lab>] [-D <id>] [cmd...]
Env vars:
TS_VISIBLE_DEVICES the path to the unix socket used by the ts command.
TS_SOCKET the path to the unix socket used by the ts command.
TS_MAILTO where to mail the result (on -m). Local user by default.
TS_MAXFINISHED maximum finished jobs in the queue.
Expand All @@ -152,6 +153,8 @@ Env vars:
TS_SLOTS amount of jobs which can run at once, read on server start.
TMPDIR directory where to place the output files and the default socket.
Long option actions:
--getenv <var> get the value of the specified environment variable.
--setenv <var> set the specified flag to environment.
--set_gpu_wait <sec> set time to wait before running the next GPU job (30 seconds by default).
--get_gpu_wait get time to wait before running the next GPU job.
--get_label || -a [id] show the job label. Of the last added, if not specified.
Expand Down
30 changes: 18 additions & 12 deletions ts.1
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Actions:
.BI "[\-i ["id ]]
.BI "[\-U <"id - id >]
.BI "[\-S ["num ]]
.BI "[\--get_gpu_wait]
.BI "[\--set_gpu_wait ["sec ]]
.BI "[\-a/--get_label ["id ]]
.BI "[\-F/--full_cmd ["id ]]
.BI "[\--getenv ["var ]]
.BI "[\--setenv ["var=val ]]

.sp
Options:
Expand Down Expand Up @@ -127,6 +127,16 @@ Run the job with the specified GPU IDs. GPU IDs should be separated by commas.
.SH ACTIONS
Instead of giving a new command, we can use the parameters for other purposes:
.TP
.B "\--getenv [var]"
Get the specified environment variable value from the
.B ts
server.
.TP
.B "\--setenv [var]"
Set the specified environment variable to the
.B ts
server.
.TP
.B "\-K"
Kill the
.B ts
Expand Down Expand Up @@ -158,16 +168,6 @@ Show the job ID of the last added.
.B "\-R/--count_running"
Return the number of running jobs
.TP
.B "\--get_gpu_wait"
Get the time to wait before running the next GPU job. This time delay is to ensure
two closely consecutive jobs do not share GPUs as GPUs' memory is not filled up
immediately after a job claims.
.TP
.B "\--set_gpu_wait <sec>"
Set time to wait before running the next GPU job (30 seconds by default).
This time delay is to ensure two closely consecutive jobs do not share GPUs
as GPUs' memory is not filled up immediately after a job claims.
.TP
.B "\-a/--get_label <id>"
Show the job label. Of the last added, if not specified.
.TP
Expand Down Expand Up @@ -248,8 +248,14 @@ job running, and \fB\-d\fR will try to set the dependency with the last job adde
Set the maximum amount of running jobs at once. If you don't specify
.B num
it will return the maximum amount of running jobs set.


.SH ENVIRONMENT
.TP
.B "TS_VISIBLE_DEVICES"
Similar to CUDA_VISIBLE_DEVICES, if a comma-separated string of GPU IDs is provided,
ts will run jobs on only these devices.
.TP
.B "TS_MAXFINISHED"
Limit the number of job results (finished tasks) you want in the queue. Use this
option if you are tired of
Expand Down

0 comments on commit 0d08156

Please sign in to comment.