Job Management Commands:job
Query:list
Command Entry:
bohr job list
Summary:
Usage:
bohr job list [flags]
Aliases:
list, -ls
Flags:
--csv output with CSV format
-f, --fail only show failed job
-i, --finish only show finished job
-h, --help help for list
-j, --job_group_id int job group id
--json output with JSON format
--noheader does not print header information
-n, --number int number of results to be displayed(default 10)
-p, --pending only show pending job
-q, --quiet only show job id
-r, --running only show running job
-s, --scheduling only show scheduling job
-d, --stopped only show stopped job
-t, --stopping only show stopping job
--yaml output in YAML format
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_group_id | -j | Show tasks under job group id | N o |
--fail | -f | Only show failed tasks | No |
--pending | -p | Only show pending tasks | No |
--running | -r | Only show running tasks | No |
--finish | -i | Only show finished tasks | No |
--scheduling | -s | Only show scheduling tasks | No |
--stopping | -t | Only show stopping tasks | No |
--stopped | -d | Only show stopped tasks | No |
--quiet | -q | Only show Job ID | No |
--number | -n | Number of jobs to display | No |
Example:
bohr job list -n 20 --yaml
# Display the most recent 20 job details in YAML format
bohr job list -j 1022 -f
# View all failed jobs under Job Group ID 1022
Submit:submit
Command Entry:
bohr job submit
Summary:
Usage:
bohr job submit [flags]
Examples:
$ bohr job submit
Flags:
-c, --command string command
-i, --config_file string config file
-h, --help help for submit
-m, --image_address string image name
-p, --input_directory string input directory path (default "./")
-g, --job_group_id int job group id
-n, --job_name string job name
-l, --log_file string log file
-t, --machine_type string machine type
--max_reschedule_times int max reschedule times
--max_run_time int max run time(measured in minutes)
--nnode int nnode (default 1)
--project_id int project id
-r, --result_path string result path
Parameter description:
Parameter | Abbreviation | Required | Description |
---|---|---|---|
--command | -c | Yes | Task execution command |
--config_file | -i | No | Predefined configuration file; fields declared in the command line will replace those in the file |
--image_address | -m | Yes | Image address; select different image addresses based on task type |
--input_directory | -p | No | Input files, e.g., -p ./ means current directory (default is ./) |
--job_group_id | -g | No | Job group id (obtained from bohr job_group create) |
--job_name | -n | No | Job name |
--log_file | -l | No | Log file |
--machine_type | -t | Yes | Machine configuration |
--max_reschedule_times | No | Maximum reschedule times | |
--max_run_time | No | Maximum runtime (in minutes)) | |
--nnode | No | Number of compute nodes to run in parallel | |
--project_id | Yes | Project ID, which you can view in project management | |
--result_path | -r | No | Automatically download result files to specified directory; data can be downloaded to personal or share disk, with parameter -r followed by a path starting with /share or /personal |
The job_group_id
used here is different from the JobGroupId
obtained after creating a task. The job_group_id
needs to be created through bohr job_group create to meet the requirement of submitting multiple tasks into the same job group.
Example:
bohr job submit -i job.json -p ./input
# Use the files in job.json and treat the files in the input directory as input.
--config_file -i JSON file example
{
"job_name": "DeePMD-kit test",
"command": "cd se_e2_a && dp train input.json > tmp_log 2>&1 && dp freeze -o graph.pb",
"log_file": "se_e2_a/tmp_log",
"backward_files": ["se_e2_a/lcurve.out","se_e2_a/graph.pb"],
"project_id": 0000,
"machine_type": "c32_m64_cpu",
"image_address": "registry.dp.tech/dptech/lammps:29Sep2021",
"input_directory": "./Bohrium_LAMMPS_example",
"job_group_id": 0000,
"result_path": "/personal",
"dataset_path": ["/bohr/test-rihu/v1"],
"max_reschedule_times": 2,
"max_run_time": 12,
"nnode": 1
}
Delete:delete
Command Entry:
bohr job delete
Summary:
Usage:
bohr job delete <job_id>... [flags]
Flags:
-h, --help help for delete
--job_id ints Job ID(s) (can be used multiple times)
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | Deleted job ID | Yes |
Example:
bohr job delete 1234 2345
# Delete the task with IDs 1234 and 2345
Terminate early:terminate
Command Entry:
bohr job terminate
Summary:
Usage:
bohr job terminate <job_id>... [flags]
Flags:
-h, --help help for terminate
--job_id ints Job ID(s) (can be used multiple times)
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | - | Job ID for early termination | Yes |
Example:
bohr job terminate 1234 2345
# Terminate the task with IDs 1234 and 2345 early
Kill:kill
Command Entry:
bohr job kill
Summary:
Usage:
bohr job kill <job_id>... [flags]
Flags:
-h, --help help for kill
--job_id ints Job ID(s) (can be used multiple times)
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | kill job ID | Yes |
Example:
bohr job kill 1234 2345
# Kill the task with IDs 1234 and 2345
Download log:log
Command Entry:
bohr job log
Summary:
Usage:
bohr job log [flags]
Flags:
-h, --help help for log
-j, --job_id ints Job ID(s) (can be used multiple times)
-o, --out string specify the directory to save downloaded files (default "./")
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | -j | jobs id | Yes |
--out | -o | Save the logs to a local path for example: -o ./ indicates the current directory (default is ./) | No |
案例:
bohr job log -j 1234 -j 2345 -o /opt
# Download the log files for Job IDs 1234 and 2345 and save them to the local /opt directory
Download:download
Command Entry:
bohr job download
Summary:
Usage:
bohr job download [flags]
Aliases:
download, -d
Flags:
-h, --help help for download
-j, --job_id ints Job ID(s) (can be used multiple times)
-o, --out string specify the directory to save downloaded files (default "./")
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | -j | Downloaded job ID | Yes |
--out | -o | Save the outs to a local path for example: -o ./ indicates the current directory (default is ./) | No |
Example:
bohr job download -j 1234 -j 2345 -o /opt
# Download the out files for Job IDs 1234 and 2345 and save them to the local /opt directory
Describe:describe
Command Entry:
bohr job describe
Summary:
Usage:
bohr job describe [flags]
Flags:
--csv output with csv format
-h, --help help for describe
-j, --job_id ints Job ID(s) (can be used multiple times)
--json output with json format
-l, --long Long listing format
--noheader does not print header information
--yaml output with yaml format
Parameter description:
Parameter | Abbreviation | Description | Required |
---|---|---|---|
--job_id | -j | Jobs ID | Yes |
--long | -l | Whether to display all the task information in detail | No |
Example:
bohr job describe -j 1234 -j 2345 --json
# Display the task details of Job IDs 1234 and 2345 in JSON format
bohr job describe -j 1234 -l
# View the task with Job ID 1234 and display all its information in detail