Job Commands
The Camber CLI provides comprehensive commands to manage your computational jobs throughout their lifecycle. Whether you’re running MPI simulations, MESA stellar evolution models, or Athena fluid dynamics, these commands help you create, monitor, and retrieve results from your jobs.
Creating Jobs
Jobs in Camber execute your code on scalable compute resources. When creating a job, you specify the computational engine, resource requirements, and the command to run.
Basic Job Creation
Create a simple MPI job with the default settings:
camber job create --cmd "mpirun -np 4 hello_world" --path stash://your-username/my-project/
This creates an MPI job using the smallest available resources (xxsmall
) with a single compute engine.
Advanced Job Configuration
For more demanding computational workloads, specify additional resources and specialized engines:
# Create a MESA stellar evolution job with more resources
camber job create \
--engine mesa \
--size medium \
--cmd "./mk && ./rn" \
--path stash://your-username/stellar-evolution/
Job Creation Flags
Flags:
--cmd string command for the job (required)
--engine string Type for the job (required): mpi, spark, mesa, athena, nextflow, gromacs, lammps, openfoam (default "mpi")
--gpu Whether to use GPU (default: false)
-h, --help help for create
--num-engines int Number of engines to use (default: 1) (default 1)
--params string Configurations for the Nextflow pipeline
--path string Input stash path for the job (e.g., stash://project/) (required)
--pipeline string A remote pipeline or a local nf config file in private stash (required for Nextflow)
--size string Engine for the job (required): xxsmall, xsmall, small, medium, large, xlarge, xxlarge (default "xxsmall")
When you create a job, you’ll receive confirmation with the job ID:
Create 'mesa' job with size='medium', num-engines='1', cmd='./mk && ./rn', gpu='false', path='stash://your-username/stellar-evolution/'
Job created successfully.
Status: Submitted
Job ID: 2080
Monitoring Job Status
Track your job’s progress and view detailed information using the job ID returned during creation.
Check Individual Job Status
camber job get 2080
This displays comprehensive job information including execution time, resource usage, and current status:
======================Job Information======================
Job ID: 2080
Status: COMPLETED
Job Type: MESA
Engine Size: MEDIUM
Command: ./mk && ./rn
With GPU: false
Number of Engines: 1
Start Time: 2025-05-05T15:45:02Z
Duration: 16s
Finish Time: 2025-05-05T15:45:18Z
===========================================================
JSON Output for Automation
For programmatic access or integration with other tools, use JSON output:
camber job get 2080 --output json
Flags:
--output string Output format: json
Viewing Job History
List your recent jobs to track progress across multiple workloads or find specific job IDs.
Recent Jobs Overview
camber job list
This shows your 10 most recent jobs with key information.
Paginated Job Listing
For accounts with many jobs, use pagination to navigate through your job history:
# View jobs 11-20
camber job list --page 2 --size 10
# View just the 3 most recent jobs
camber job list --size 3
Flags:
--page int Page number for pagination (default: 1)
--size int Number of jobs per page (default: 10)
--output string Output format: json
Example output showing multiple jobs:
======================Job Information======================
No: 1
Job ID: 1216
Status: COMPLETED
Job Type: MPI
Engine Size: XXSMALL
Command: make
Duration: 14s
------------------------------------------------------------
No: 2
Job ID: 1217
Status: COMPLETED
Job Type: MPI
Engine Size: LARGE
Command: athena -i orszag_tang.athinput
Duration: 45s
------------------------------------------------------------
Total: 621 job(s); Page 1; Size: 2
Retrieving Job Logs
After job completion, download logs to debug issues, verify results, or save output for analysis.
Download Job Logs
camber job log 2080 ~/Downloads/
This downloads the complete job log to your specified local directory:
Downloaded ~/Downloads/job_00002080.log: 100.00% (312B/312B)
Log for job 2080 downloaded to ~/Downloads/
The log file contains:
- Standard output and error from your command
- System messages about resource allocation
- Timing information and performance metrics
- Any error messages if the job failed
Organizing Job Logs
Create organized directories for job logs by project:
# Create project-specific log directory
mkdir -p ~/camber-logs/stellar-evolution/
camber job log 2080 ~/camber-logs/stellar-evolution/