Ordered Project Bundles
Use an ordered project bundle when one project must run before another project. A later project can use files produced by an earlier project.
Run An Ordered Project Bundle
Pass an ordered sequence of project files to solve:
import jcmsuite
bundle = jcmsuite.solve(
["1D/project.jcmp", "project.jcmp"],
keys={"radius": 0.5},
)
The projects run strictly in the specified order. The call returns a
BundledSolveResult.
Select one project result with its index. Index 0 selects the first project:
mode_result = bundle[0]
scatter_result = bundle[1]
print(bundle.project_files)
print(scatter_result.postprocesses.titles())
The bundle helps you select a project result. mode_result and scatter_result
are SolveResult values. Select a project
before inspecting or exporting result data.
Run Batched Project Keys Over A Bundle
Pass batched project keys to repeat the full ordered project bundle for each set of project keys:
bundle_batch = jcmsuite.solve(
["1D/project.jcmp", "project.jcmp"],
keys=[
{"radius": 0.3},
{"radius": 0.5},
],
)
The call returns a BundledBatchSolveResult. Its first index selects a project
across the whole batch:
mode_batch = bundle_batch[0]
first_mode_entry = mode_batch[0]
mode_batch is a BatchSolveResult. Use it as you would use the result of a
single-project batch solve.
Select The Working Directory
Pass one scalar working_dir for an ordered project bundle. The directory is the bundle
root. jcmsuite preserves the relative project layout below that root:
bundle = jcmsuite.solve(
["1D/project.jcmp", "project.jcmp"],
working_dir="build/bundle",
)
For batched project keys over a bundle, pass one working directory per set of
project keys or use temporary=True.
For a daemon-backed bundle batch, omitting working_dir creates a separate
temporary directory for each uncached entry. See the
solve reference for working-directory requirements.
Submit A Complete Bundle To The Daemon
With a connected daemon handler, backend="daemon" submits the complete
ordered project bundle as one Submission.
Use dispatch="submit" to return a
BundledSolveSubmission:
submission = jcmsuite.solve(
["1D/project.jcmp", "project.jcmp"],
backend="daemon",
dispatch="submit",
)
bundle = submission.wait()
scatter_result = bundle[1]
Wait for the complete bundle before selecting a project result.
For batched project keys,
BundledBatchSolveSubmission
supports integer selection and slicing.
submissions[index].wait() waits for one bundle. submissions[start:stop].wait()
waits for that subset of bundles. See the
bundle wait reference
for timeout and failure behavior.
Next Steps
Use Bundled Results for project selection and result access.
See these complete runnable tutorials: