From 8c49ebb91cfc0a4b89eb8083c0a0124a9955b5b7 Mon Sep 17 00:00:00 2001 From: Dane Kennedy Date: Wed, 23 Sep 2026 10:51:40 +0200 Subject: [PATCH 1/6] Fix nextflow module rendering: read java_module from the include vars The task shadowed java_module with item.java_module, but no entry in the version list carries that key, so templating nextflow.lua failed. The include in main.yml already supplies java_module for every version; let it flow through. java_location was never used by this task. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01FLJRERiNvARR3e8ftXi5TG --- ansible/roles/compiled/tasks/common/nextflow.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/ansible/roles/compiled/tasks/common/nextflow.yaml b/ansible/roles/compiled/tasks/common/nextflow.yaml index ce3a3b5b..fb4328be 100644 --- a/ansible/roles/compiled/tasks/common/nextflow.yaml +++ b/ansible/roles/compiled/tasks/common/nextflow.yaml @@ -5,8 +5,6 @@ nextflow_module_dir: "{{ bio_modules }}/nextflow" checksum: "{{ item.checksum }}" install_dir: "{{ nextflow_dir }}/{{ item.version_number }}" - java_module: "{{ item.java_module }}" - java_location: "{{ item.java_location }}" version_number: "{{ item.version_number }}" tags: - never From 4a80189d3eff1149284415711dc2525d0acc2d7f Mon Sep 17 00:00:00 2001 From: Dane Kennedy Date: Wed, 23 Sep 2026 10:52:43 +0200 Subject: [PATCH 2/6] Ship a shared cluster nextflow.config and nf-ilifu wrapper Deploy a cluster-wide Nextflow configuration next to each installed version, with SLURM profiles for the Main, HighMem and GPU queues and Singularity enabled, plus an nf-ilifu wrapper that runs nextflow with that config so users need only pick a -profile. Ported from PR #168. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01FLJRERiNvARR3e8ftXi5TG --- ansible/roles/compiled/files/nextflow.config | 65 +++++++++++++++++++ .../roles/compiled/tasks/common/nextflow.yaml | 13 ++++ ansible/roles/compiled/templates/nf-ilifu.sh | 5 ++ 3 files changed, 83 insertions(+) create mode 100644 ansible/roles/compiled/files/nextflow.config create mode 100644 ansible/roles/compiled/templates/nf-ilifu.sh diff --git a/ansible/roles/compiled/files/nextflow.config b/ansible/roles/compiled/files/nextflow.config new file mode 100644 index 00000000..47de7af1 --- /dev/null +++ b/ansible/roles/compiled/files/nextflow.config @@ -0,0 +1,65 @@ +// Nextflow configuration file + +profiles { + standard { + process.executor = 'local' + } + + main_small { + process.executor = 'slurm' + process.queue = 'Main' + singularity.enabled = true + process.cpus = 1 + process.memory = 4.GB + } + + main_medium { + process.executor = 'slurm' + process.queue = 'Main' + singularity.enabled = true + process.cpus = 8 + process.memory = 64.GB + } + + main_large { + process.executor = 'slurm' + process.queue = 'Main' + singularity.enabled = true + process.cpus = 32 + process.memory = 232.GB + } + + highmem { + process.executor = 'slurm' + process.queue = 'HighMem' + singularity.enabled = true + process.cpus = 32 + process.memory = 500.GB + } + + veryhighmem { + process.executor = 'slurm' + process.queue = 'HighMem' + singularity.enabled = true + process.cpus = 96 + process.memory = 1500.GB + } + + gpu_1gpu { + process.executor = 'slurm' + process.queue = 'GPU' + singularity.enabled = true + process.cpus = 1 + process.memory = 4.GB + process.clusterOptions = '--gres=gpu:1' + } + + gpu_2gpu { + process.executor = 'slurm' + process.queue = 'GPU' + singularity.enabled = true + process.cpus = 1 + process.memory = 4.GB + process.clusterOptions = '--gres=gpu:2' + } +} diff --git a/ansible/roles/compiled/tasks/common/nextflow.yaml b/ansible/roles/compiled/tasks/common/nextflow.yaml index fb4328be..faae9b5b 100644 --- a/ansible/roles/compiled/tasks/common/nextflow.yaml +++ b/ansible/roles/compiled/tasks/common/nextflow.yaml @@ -24,6 +24,19 @@ checksum: "{{ checksum }}" mode: u=rwx,g=rx,o=rx + - name: Deploy NextFlow cluster configuration and wrapper {{ version_number }} + block: + - name: Copy NextFlow cluster configuration + ansible.builtin.copy: + src: nextflow.config + dest: "{{ install_dir }}/nextflow.config" + mode: u=rw,g=r,o=r + - name: Install nf-ilifu wrapper script + ansible.builtin.template: + src: nf-ilifu.sh + dest: "{{ install_dir }}/nf-ilifu" + mode: u=rwx,g=rx,o=rx + - name: Install NextFlow module {{ version_number }} block: - name: Check module dir diff --git a/ansible/roles/compiled/templates/nf-ilifu.sh b/ansible/roles/compiled/templates/nf-ilifu.sh new file mode 100644 index 00000000..12acf50c --- /dev/null +++ b/ansible/roles/compiled/templates/nf-ilifu.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# Nextflow wrapper for ilifu: runs this version's nextflow with the shared +# cluster configuration (SLURM profiles for the Main, HighMem and GPU queues, +# Singularity enabled). Pass -profile ; see nextflow.config alongside. +exec {{ install_dir }}/nextflow -c {{ install_dir }}/nextflow.config "$@" From bfcbe0d8f4665441dacee540e3db2628182ddd78 Mon Sep 17 00:00:00 2001 From: Dane Kennedy Date: Wed, 23 Sep 2026 10:53:57 +0200 Subject: [PATCH 3/6] Add Nextflow 25.10.7 and 26.04.6; load OpenJDK 22 for nextflow Both are installed from the self-contained -dist asset rather than the launcher script, so the runtime lives in /software instead of being fetched into each user's ~/.nextflow on first run. Checksums computed from the GitHub release assets. Nextflow 25.04+ needs Java 17 to 26; OpenJDK 22.0.1 is the newest installed JDK in that range. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01FLJRERiNvARR3e8ftXi5TG --- ansible/roles/compiled/tasks/common/main.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ansible/roles/compiled/tasks/common/main.yml b/ansible/roles/compiled/tasks/common/main.yml index 55d8e9b7..6cf0626e 100644 --- a/ansible/roles/compiled/tasks/common/main.yml +++ b/ansible/roles/compiled/tasks/common/main.yml @@ -971,7 +971,7 @@ - name: Install NextFlow vars: - java_module: "java/openjdk-18.0.2" + java_module: "java/openjdk-22.0.1" versions: - version_number: "22.10.7" url: "https://github.com/nextflow-io/nextflow/releases/download/v22.10.7/nextflow-22.10.7-all" @@ -985,6 +985,14 @@ - version_number: "25.04.6" url: "https://github.com/nextflow-io/nextflow/releases/download/v25.04.6/nextflow" checksum: "sha256:a94f8bd1db9c0271ad58ec40b9c71f812d081a66f782396928b9b1f740f0be5f" + # The -dist asset is the self-contained build; the bare `nextflow` asset is a + # launcher that fetches the runtime into each user's ~/.nextflow on first run. + - version_number: "25.10.7" + url: "https://github.com/nextflow-io/nextflow/releases/download/v25.10.7/nextflow-25.10.7-dist" + checksum: "sha256:00c0fa276c87e4f6cec6d4c256fc556abbc9340aa84c31230d594c07658d0a52" + - version_number: "26.04.6" + url: "https://github.com/nextflow-io/nextflow/releases/download/v26.04.6/nextflow-26.04.6-dist" + checksum: "sha256:182a63c74074e2dc7956ffa3c8cd59de952ed2c44394e21faf5e1736b945444c" ansible.builtin.include_tasks: file: "nextflow.yaml" loop: "{{ versions }}" From a6a8ad0f892e111c8e9d7dabd1651691bf88c0a9 Mon Sep 17 00:00:00 2001 From: Dane Kennedy Date: Wed, 23 Sep 2026 11:00:23 +0200 Subject: [PATCH 4/6] Load the singularity module from the nextflow module Every SLURM profile in the shared nextflow.config enables Singularity, but the module only loaded Java, so a clean `module load nextflow/...` could not run those profiles. Load the unversioned singularity module, as cromwell.lua and the container modules do. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01FLJRERiNvARR3e8ftXi5TG --- ansible/roles/compiled/templates/nextflow.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/roles/compiled/templates/nextflow.lua b/ansible/roles/compiled/templates/nextflow.lua index da541a11..f8c77f12 100644 --- a/ansible/roles/compiled/templates/nextflow.lua +++ b/ansible/roles/compiled/templates/nextflow.lua @@ -7,5 +7,8 @@ whatis("Keywords: nextflow") whatis("Description: NextFlow {{ version_number }}") load("{{ java_module }}") +-- The shared nextflow.config enables Singularity in every SLURM profile; +-- the unversioned module is deliberate so nextflow follows the cluster default. +load("singularity") prepend_path('PATH', '{{ install_dir }}') From cdbe6bd76457ba5f96c681b0f2589f3c8ebd5cf4 Mon Sep 17 00:00:00 2001 From: Dane Kennedy Date: Wed, 23 Sep 2026 11:09:36 +0200 Subject: [PATCH 5/6] Choose the Java module per Nextflow version Each Nextflow release supports a bounded Java range: 22.10 tops out at Java 18, 23.04 at 20, while 25.04 and later need 17 to 26. A single include-level java_module cannot satisfy all six entries, and bumping it to 22.0.1 would have broken the 22.10.7 and 23.04.4 modules. Restore the per-version item.java_module the task originally expected and give every entry the key: 18.0.2 for the three older releases, as they had, and 22.0.1 for 25.04.6 and newer. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01FLJRERiNvARR3e8ftXi5TG --- ansible/roles/compiled/tasks/common/main.yml | 9 ++++++++- ansible/roles/compiled/tasks/common/nextflow.yaml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ansible/roles/compiled/tasks/common/main.yml b/ansible/roles/compiled/tasks/common/main.yml index 6cf0626e..7d8cab62 100644 --- a/ansible/roles/compiled/tasks/common/main.yml +++ b/ansible/roles/compiled/tasks/common/main.yml @@ -971,26 +971,33 @@ - name: Install NextFlow vars: - java_module: "java/openjdk-22.0.1" + # Each release supports a bounded Java range (22.10 tops out at 18, 25.04+ + # needs 17 to 26), so the JDK module is chosen per version. versions: - version_number: "22.10.7" + java_module: "java/openjdk-18.0.2" url: "https://github.com/nextflow-io/nextflow/releases/download/v22.10.7/nextflow-22.10.7-all" checksum: "sha512:478f215e233de41bb68b22c4dab58eaa7c574f8ec26f6b74b82e583928bbf0d3679972c1f4bc09fadc64deeac9e00615178581dd8c698d062d43e69dc56971c3" - version_number: "23.04.4" + java_module: "java/openjdk-18.0.2" url: "https://github.com/nextflow-io/nextflow/releases/download/v23.04.4/nextflow-23.04.4-all" checksum: "sha512:90712d34ddedc9fae5fe75bc78bb333b6b3da864a089489df380ee313fbf312dd28d3094bc2ac67472f9fafb854d2bba2ff8f8dbafc01b6ef176ad8ea469b4f3" - version_number: "24.04.4" + java_module: "java/openjdk-18.0.2" url: "https://github.com/nextflow-io/nextflow/releases/download/v24.04.4/nextflow-24.04.4-all" checksum: "sha512:2ce7cb79516a0342e2d1499d9aacf3e4516f760aa49411e58145e1ddef7f2f0a76314207999a39658a1edd1360eace17a4d42393ae1c5b841ba34b1c65431ff9" - version_number: "25.04.6" + java_module: "java/openjdk-22.0.1" url: "https://github.com/nextflow-io/nextflow/releases/download/v25.04.6/nextflow" checksum: "sha256:a94f8bd1db9c0271ad58ec40b9c71f812d081a66f782396928b9b1f740f0be5f" # The -dist asset is the self-contained build; the bare `nextflow` asset is a # launcher that fetches the runtime into each user's ~/.nextflow on first run. - version_number: "25.10.7" + java_module: "java/openjdk-22.0.1" url: "https://github.com/nextflow-io/nextflow/releases/download/v25.10.7/nextflow-25.10.7-dist" checksum: "sha256:00c0fa276c87e4f6cec6d4c256fc556abbc9340aa84c31230d594c07658d0a52" - version_number: "26.04.6" + java_module: "java/openjdk-22.0.1" url: "https://github.com/nextflow-io/nextflow/releases/download/v26.04.6/nextflow-26.04.6-dist" checksum: "sha256:182a63c74074e2dc7956ffa3c8cd59de952ed2c44394e21faf5e1736b945444c" ansible.builtin.include_tasks: diff --git a/ansible/roles/compiled/tasks/common/nextflow.yaml b/ansible/roles/compiled/tasks/common/nextflow.yaml index faae9b5b..95485d89 100644 --- a/ansible/roles/compiled/tasks/common/nextflow.yaml +++ b/ansible/roles/compiled/tasks/common/nextflow.yaml @@ -5,6 +5,7 @@ nextflow_module_dir: "{{ bio_modules }}/nextflow" checksum: "{{ item.checksum }}" install_dir: "{{ nextflow_dir }}/{{ item.version_number }}" + java_module: "{{ item.java_module }}" version_number: "{{ item.version_number }}" tags: - never From c5048c9e760183169eeb766b52282f7d73abd5d8 Mon Sep 17 00:00:00 2001 From: Dane Kennedy Date: Wed, 23 Sep 2026 11:09:36 +0200 Subject: [PATCH 6/6] Pass --nv to Singularity in the GPU profiles The cluster apptainer.conf keeps `always use nv = no`, so a task on a GPU allocation sees no NVIDIA devices unless the container is started with --nv. Set singularity.runOptions on both GPU profiles, matching the --nv the GPU container wrappers in this repo already use. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01FLJRERiNvARR3e8ftXi5TG --- ansible/roles/compiled/files/nextflow.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/roles/compiled/files/nextflow.config b/ansible/roles/compiled/files/nextflow.config index 47de7af1..f47cdb17 100644 --- a/ansible/roles/compiled/files/nextflow.config +++ b/ansible/roles/compiled/files/nextflow.config @@ -49,6 +49,7 @@ profiles { process.executor = 'slurm' process.queue = 'GPU' singularity.enabled = true + singularity.runOptions = '--nv' process.cpus = 1 process.memory = 4.GB process.clusterOptions = '--gres=gpu:1' @@ -58,6 +59,7 @@ profiles { process.executor = 'slurm' process.queue = 'GPU' singularity.enabled = true + singularity.runOptions = '--nv' process.cpus = 1 process.memory = 4.GB process.clusterOptions = '--gres=gpu:2'