Runtime And Execution

Use this section to choose where and when jcmsuite runs solve work. See the runtime API reference for generated signatures.

Choose A Runtime Path

Start with the first row that matches your workflow. Use the default local path unless another row provides a required setting.

Use scenario

Read first

Main requirement

One local solve

Contexts

A valid JCMsuite installation and JCMROOT

Several operations with one configuration

Contexts

A SolverContext with the required settings

Explicit resource control

Daemon execution

A DaemonHandler and at least one resource declaration

A running event loop

Async execution

asynchronous=True and an await expression

A remote host or scheduler

Resources and queues

Network access, authentication, shared or transferred project files, and result collection

Do not configure a daemon, scheduler, or asynchronous call for a simple local solve. Add one of these options only when the local default does not meet the workflow requirement.

Key terms

The following terms describe the runtime choices:

  • A context selects a JCMsuite installation and runtime settings. Use a SolverContext to represent it.

  • A daemon manages resource-backed solve execution.

  • A handler controls the daemon lifecycle and resource declarations. The public handler type is a DaemonHandler.

  • A resource describes where and how the daemon can run solve work.

  • A scheduler assigns work to compute resources. SLURM is the supported scheduler queue type.

  • An event loop runs asynchronous operations and resumes them when they are ready.

  • A submission is a solve handle sent to a daemon. See Submit and Wait to collect its result.

Use Contexts to select runtime configuration. Use Daemon Execution for resource-backed execution. Use Async Execution when an event loop is already running.

Failure behavior

If JCMROOT is missing or the required JCMsuite binaries are unavailable, context startup or a solve can raise RuntimeContextError. If daemon startup or resource registration fails, inspect the exception and the daemon status before submitting more work. If an asynchronous call fails, await the coroutine inside the existing event loop and handle the raised exception there.

For your next step, select the matching page in the table above. Each page states its required setup and collection behavior before advanced options.

Runtime pages