Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
Creating Batches
Once you are logged in to a Cluster Manager, you can use grbcluster to create a batch. This will submit a non-interactive job. The typical process involves the following three steps:
- Create the batch and submit the non-interactive job. In this
step, we indicate what model file we want to solve, and what result
file we need. With this information, grbcluster will
declare the batch, upload the input model file, and submit the solve
request as a batch job. At this point, you can disconnect your
client machine from the network (i.e., close your laptop). The
request will be processed automatically.
> grbcluster batch solve glass4.mps ResultFile=solution.sol info : Batch ada0a345-aa9e-4d6b-a7f0-05caf345d4e2 created info : Uploading glass4.mps... info : Batch ada0a345-aa9e-4d6b-a7f0-05caf345d4e2 submitted with job 66d4783b...
- Monitoring. While the batch job is being executed, you can
monitor the status if you wish. You can reference the batch you
submitted using its batch ID.
> grbcluster batch status 2e05810c-911f-47ee-b695-27e1244fefd0 --wait info : Batch 2e05810c-911f-47ee-b695-27e1244fefd0 status is SUBMITTED info : Batch 2e05810c-911f-47ee-b695-27e1244fefd0 status is SUBMITTED info : Batch 2e05810c-911f-47ee-b695-27e1244fefd0 status is SUBMITTED info : Batch 2e05810c-911f-47ee-b695-27e1244fefd0 status is SUBMITTED info : Batch 2e05810c-911f-47ee-b695-27e1244fefd0 status is COMPLETED
- Download the results. Once a batch is complete, you can
download the log file and any optimization result. By default,
results are stores in a directory having the same name as the batch
ID. You should also delete the batch so that the Cluster Manager
can delete the associated data from the database.
grbcluster batch download 2e05810c-911f-47ee-b695-27e1244fefd0 info : Results will be stored in directory 2e05810c-911f-47ee-b695-27e1244fefd0 info : Downloading solution.sol... info : Downloading gurobi.log... info : Discarding batch data
You can actually use grbcluster
to perform all three steps in a
single command:
> grbcluster batch solve ResultFile=solution.sol misc07.mps --download info : Batch 5d0ea600-5068-4a0b-bee0-efa26c18f35b created info : Uploading misc07.mps... info : Batch 5d0ea600-5068-4a0b-bee0-efa26c18f35b submitted with job a9700b72... info : Batch 5d0ea600-5068-4a0b-bee0-efa26c18f35b status is COMPLETED info : Results will be stored in directory 5d0ea600-5068-4a0b-bee0-efa26c18f35b info : Downloading solution.sol... info : Downloading gurobi.log... info : Discarding batch data