To verify that xsub, xstat, xdel are working properly, test the following items.
-
run
xsub -t
$ xsub -t
- Verify output JSON has "parameters" keys like the following (keys other than "parameteres" are optional):
{ "parameters": { "mpi_procs": { "description": "MPI process", "default": 1, "format": "^[1-9]\\d*$" }, "omp_threads": { "description": "OMP threads", "default": 1, "format": "^[1-9]\\d*$" } } }
- Verify output JSON has "parameters" keys like the following (keys other than "parameteres" are optional):
-
run xsub command as follows. (change the parameters properly for each host.)
$ xsub sleep10.sh -d work_dir -l log_dir -p '{"mpi_procs":2,"omp_threads":4}'
- Verify that JSON is printed to stdout. It should contain "job_id" key like the following:
{ "job_id": "41988", "raw_output": [ "41988" ], "parent_script": "/path/to/xsub_py/work_dir/sleep10_xsub1.sh" }
- Verify that the job is submitted to the scheduler.
- Verify that
work_dir/sleep10_xsub.sh
is created with the specified parameters. - Verify that
log_dir/xsub.log
is created and the log is appended to this file. - Verify that
work_dir/pwd.txt
contains the path to work_dir after the job has finished. - Clean up the temporary directories as follows:
$ rm -rf work_dir log_dir
- Verify that JSON is printed to stdout. It should contain "job_id" key like the following:
-
First, run
xsub
as follows.$ xsub sleep10.sh -d work_dir -l log_dir
- JSON like the following will be printed.
{ "job_id": "12345", ... }
- JSON like the following will be printed.
-
Run
xstat -m <JOB_ID>
with the job ID shown byxsub
. You must do it while the job is running, namely, within 10 seconds. If you couldn't make it, runxsub
again.$ xstat -m 12345
- You will see the output like the following. Make sure that the status is
running
:{ "12345": { "status": "running", ... } }
- Verify that JSON with the status "queued" or "running" is printed.
- You will see the output like the following. Make sure that the status is
-
After the job finished, run
xstat
command again and verify that the status changed to "finished".$ xstat -m 12345
- Output will be like the following. Make sure that the status became
finished
:{ "12345": { "status": "finished", ... } }
- Output will be like the following. Make sure that the status became
-
Clean up the temporary directories after you completed the tests.
$ rm -rf work_dir log_dir
-
Run
xstat
without argument and verify that the status of the job scheduler is displayed in plain text format.$ xstat
- Output will be like the following. An output of the scheudler will be shown:
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND foobar 74357 19.3 0.6 6602472 201140 ?? S 土02PM 4:29.57 /Applications/... ...
- Output will be like the following. An output of the scheudler will be shown:
- Run the following command. (Replace the
job id
with yours.)$ xsub sleep10.sh -d work_dir -l log_dir
- While your job is running, run
xdel
to cancel the job like the following:$ xdel 12345
- Verify that the job is properly terminated by running
xstat
command.$ xstat 12345
- The status of the job should be 'finished'.
- Clean up the temporary directories by the following command:
$ rm -rf work_dir log_dir