From 83003fc315e8041cec3248e6d5ec153560e43f97 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 26 Jan 2024 09:48:41 +0100 Subject: [PATCH] Add error message to template with link to docs on 'resource available memory' error message --- CHANGELOG.md | 3 ++- nf_core/pipeline-template/workflows/pipeline.nf | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ea7986b93..ac354d0586 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ - switch to new image syntax in readme ([#2645](https://github.com/nf-core/tools/pull/2645)) - Add conda channel order to nextflow.config ([#2094](https://github.com/nf-core/tools/pull/2094)) - Fix tyop in pipeline nextflow.config ([#2664](https://github.com/nf-core/tools/pull/2664)) -- add function to check `-profile` is well formatted ([#2678](https://github.com/nf-core/tools/pull/2678)) +- Add function to check `-profile` is well formatted ([#2678](https://github.com/nf-core/tools/pull/2678)) +- Add new error message pointing to docs when 'requirement exceeds available memory' error message ([#2680](https://github.com/nf-core/tools/pull/2680)) ### Download diff --git a/nf_core/pipeline-template/workflows/pipeline.nf b/nf_core/pipeline-template/workflows/pipeline.nf index 558e9a1f9f..7cfbb39ef7 100644 --- a/nf_core/pipeline-template/workflows/pipeline.nf +++ b/nf_core/pipeline-template/workflows/pipeline.nf @@ -127,6 +127,13 @@ workflow.onComplete { } } +workflow.onError { + if (workflow.errorReport.contains("Process requirement exceeds available memory")) { + println("🛑 Default resources exceed availability 🛑 ") + println "💡 See here on how to configure pipeline: https://nf-co.re/docs/usage/configuration#tuning-workflow-resources 💡" + } +} + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ THE END