# Ordered Project Bundles Use an {term}`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 {func}`solve `: ```python 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 {class}`BundledSolveResult `. Select one project result with its index. Index `0` selects the first project: ```python 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 {class}`SolveResult ` values. Select a project before inspecting or exporting result data. ## Run Batched Project Keys Over A Bundle Pass {term}`batched project keys` to repeat the full {term}`ordered project bundle` for each set of project keys: ```python bundle_batch = jcmsuite.solve( ["1D/project.jcmp", "project.jcmp"], keys=[ {"radius": 0.3}, {"radius": 0.5}, ], ) ``` The call returns a {class}`BundledBatchSolveResult `. Its first index selects a project across the whole batch: ```python mode_batch = bundle_batch[0] first_mode_entry = mode_batch[0] ``` `mode_batch` is a {class}`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: ```python 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 {func}`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 {term}`Submission `. Use `dispatch="submit"` to return a {class}`BundledSolveSubmission `: ```python 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, {class}`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 {meth}`bundle wait reference ` for timeout and failure behavior. ## Next Steps Use [Bundled Results](../../results/bundled.md) for project selection and result access. See these complete runnable tutorials: - [Run an ordered project bundle](../../tutorials/core/solve/03_bundled_solve/01_default.md). - [Run a batched ordered project bundle](../../tutorials/core/solve/03_bundled_solve/02_batched.md). - [Set a bundle working directory](../../tutorials/core/solve/03_bundled_solve/03_working_dir.md).