Skip to content

Document running Planemo workflows on Slurm clusters (rebase + fixes) - #1683

Open
jmchilton wants to merge 5 commits into
galaxyproject:masterfrom
jmchilton:doc-run-as-cwl-rebased
Open

Document running Planemo workflows on Slurm clusters (rebase + fixes)#1683
jmchilton wants to merge 5 commits into
galaxyproject:masterfrom
jmchilton:doc-run-as-cwl-rebased

Conversation

@jmchilton

@jmchilton jmchilton commented Aug 21, 2026

Copy link
Copy Markdown
Member

Rebase of #1512 by @Smeds, with both original commits and authorship preserved, plus fixes from review.

The implementation prerequisites discovered during review were fixed in #1685, which has merged. This PR now contains only the Slurm guide in docs/_running_slurm.rst and its inclusion from docs/running.rst.

Review feedback from #1512 addressed:

  • replaces hand-maintained Galaxy job YAML with Planemo job_config_init for Slurm and TPV
  • removes the manual shared TMPDIR workaround and documents the default tmp_dir: true behavior

Review feedback from this PR addressed:

  • uses Apptainer throughout the prose; the option and generated configuration keys remain spelled singularity, which the guide explains
  • recommends a profile immediately after the first single-server run and generates the job configuration with profile_job_config_init
  • drops --galaxy_version 25.0 from both examples
  • drops the SQLite-locking rationale, PostgreSQL run example, and the "Database is locked" and "Galaxy exits during tool installation" troubleshooting sections
  • narrows the persistence claim to Tool Shed tools after tracing profile and bare-run paths

Two comments exposed code defects that were fixed and tested in #1685:

  • Omitting --galaxy_version selected the legacy 24.2 layout because the Click default pinned 24.2 while gxjobconfinit defaults to the modern layout. For --tpv, the legacy output used a dynamic runner, required an external tpv.yml, and left tpvdb_slurm as a commented template.
  • profile_job_config_init recorded the profile's own options JSON as job_config_file, so the generated Slurm configuration was never applied. It now records the generated job_conf.yml.

Additional cleanup:

  • removes the conflicting biocontainers example from the Apptainer path
  • fixes stale links, spelling, RST structure, and command examples
  • removes the nonspecific Tool Shed startup troubleshooting and retains the actionable port-collision guidance

Validation:

  • generated both documented job configurations and confirmed the runners, TPV database, tpvdb_slurm destination, drmaa_library_path, native_specification, and tmp_dir values described by the guide
  • confirmed Planemo refuses to generate into a profile that already holds a job configuration, as the TPV section warns
  • Sphinx renders the updated running guide without warnings from the modified documents
  • CI passed on the previous documentation head
  • git diff --check passes after rebasing onto current master

Supersedes #1512.

🤖 Description updated with Codex

Comment thread docs/_running_slurm.rst Outdated
Galaxy can resolve tool dependencies with Conda or run tools in Docker or
Singularity/Apptainer containers. Containers are generally more reproducible,
but the available runtime and mount configuration depend on the cluster. The
examples below use Singularity because it is commonly available on HPC systems.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably replace singularity throughout with apptainer.

Comment thread docs/_running_slurm.rst Outdated
Database
~~~~~~~~

Planemo uses SQLite by default. SQLite is sufficient for small runs, but a

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been fixed, all of the workflow tests also pass on sqlite.

Comment thread docs/_running_slurm.rst Outdated
$ planemo job_config_init \
--runner slurm \
--singularity \
--galaxy_version 25.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awkward, can we assume modern galaxy without the version flag, so that this ages better ?

Comment thread docs/_running_slurm.rst
--output_json output.json

Planemo launches a temporary Galaxy instance, runs the workflow, downloads its
outputs, and records their paths in ``output.json``.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this i would strongly recommend setting up a profile

Comment thread docs/_running_slurm.rst Outdated
Comment on lines +181 to +187
Database is locked
~~~~~~~~~~~~~~~~~~

Errors containing ``sqlite3.OperationalError: database is locked`` usually
mean the workflow has more concurrent database activity than SQLite can
comfortably handle. Re-run with PostgreSQL, using either an existing database
or ``--database_type postgres_singularity``.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Database is locked
~~~~~~~~~~~~~~~~~~
Errors containing ``sqlite3.OperationalError: database is locked`` usually
mean the workflow has more concurrent database activity than SQLite can
comfortably handle. Re-run with PostgreSQL, using either an existing database
or ``--database_type postgres_singularity``.

I don't know how i feel about this, it shouldn't happen anymore. Considering we bootstrap a single galaxy and interact with it i don't really see a need for postgres but that's just my preference for keeping it simple.

Comment thread docs/_running_slurm.rst Outdated
comfortably handle. Re-run with PostgreSQL, using either an existing database
or ``--database_type postgres_singularity``.

Galaxy exits during tool installation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC @Smeds worked against a cluster with completely broken network. The instructions aren't specific, I would drop that too

Comment thread docs/_running_slurm.rst Outdated
---------------------------------

Every bare ``planemo run`` bootstraps Galaxy from scratch: a fresh database, and
a fresh installation of each tool the workflow needs. On a cluster that is slow,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually keep tools by default ? ... i trust whatever your agent says 😆

@jmchilton

Copy link
Copy Markdown
Member Author

Blocking on #1685 now - I think that is the right place to address some of these comments independent of this piece of documentation.

Smeds and others added 5 commits August 28, 2026 12:56
- Apptainer throughout the prose; the option and the generated keys are still
  spelled singularity, so say that once rather than silently mixing names.
- Recommend a profile right after the first single-server run, and generate the
  job config into it with profile_job_config_init instead of a loose file.
- Drop --galaxy_version 25.0 from both examples; the generator's own default is
  the modern layout now.
- Drop the sqlite-locking rationale, the postgres run example, and the two
  troubleshooting sections that no longer describe anything reachable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C5F4LLXH1Rpt2MCLQCgwgU
@jmchilton
jmchilton force-pushed the doc-run-as-cwl-rebased branch from 36359f3 to c902f16 Compare August 28, 2026 16:57
@jmchilton
jmchilton marked this pull request as ready for review August 29, 2026 14:32
@jmchilton

Copy link
Copy Markdown
Member Author

I could have the agent respond point by point - but I am taking your approve as it is okay that I don't have too 😅. Thanks for the review - I think it really hardened the the final product.

@jmchilton
jmchilton enabled auto-merge August 29, 2026 14:33
@jmchilton
jmchilton disabled auto-merge September 4, 2026 18:06
@jmchilton
jmchilton enabled auto-merge September 4, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants