Laura Seidel
07/29/2025, 9:06 AMNFCORE_METATDENOVO:METATDENOVO:MEGAHIT_INTERLEAVED (megahit_assembly) terminated for an unknown reason -- Likely it has been terminated by the external system" I was thinking maybe it has something to do with the amount of resources used? So i tried first without a config file, and then afterwards with a config file using those parameters: params {
max_memory = 50.GB
max_cpus = 20
max_time = 7.d
} I am not familiar with dardel that much (already had struggle with 16S analysis before) and was wondering if someone might have an idea how I can fix this? Could it be that I need to adjust the parameters for resource use? Or am I completely wrong and the error is something else? Or should I better ask my question in the helpdesk-hpc-sweden channel? Thanks for your help!Daniel Lundin
08/01/2025, 9:50 AMprocess {
withName: MEGAHIT_INTERLEAVED {
cpus = { 64 }
memory = { 128.GB }
time = { 3.d }
}
}
(I'm also attaching a config I recently used. For this I had to ask for even more memory.)
Note that you can't have params in configs any more (see warning note under https://nf-co.re/metatdenovo/1.2.0/#usage-1) and that the max_* params have disappeared.Laura Seidel
08/04/2025, 6:38 AMLaura Seidel
08/05/2025, 8:01 AMDaniel Lundin
08/05/2025, 9:48 AM(AssocGrpCPURunMinutesLimit) is not a showstopper unless you're way above your allocated resources, i.e. your job might start tonight, during a weekend or so. Which queue jobs end up in -- memory or long -- is difficult to predict as are the consequences.
If nothing works, you can try --bbnorm which will downsample your raw data before assembly so that less memory is required. (The full sized libraries are used for quantification.)
A more longterm solution is to apply for a larger compute project. "Small" projects are now up to 20,000 core hours. Recently we got that after my arguing for the need to have access to a lot of memory. Get back to me if you want help with that.Laura Seidel
08/05/2025, 10:25 AMDaniel Lundin
08/05/2025, 2:40 PM--bbnorm is a parameter to the pipeline that uses BBNorm (https://archive.jgi.doe.gov/data-and-tools/software-tools/bbtools/bb-tools-user-guide/bbnorm-guide/) to downsample raw sequence reads to reduce sequencing depth of very abundant sequences. You just add that to the pipeline run and it will start by doing this for all samples before continuing with assembly. Theoretically, this could improve assembly quality not just help you to get it through. In practice, we have seen that you get fewer ORFs and smaller proportions mapping back to the assembly. I believe this is mostly quite rare transcripts though.Daniel Lundin
08/05/2025, 2:41 PMDaniel Lundin
08/05/2025, 2:42 PMLaura Seidel
08/12/2025, 6:39 AMNFCORE_METATDENOVO:METATDENOVO:BBMAP_BBNORM (all_samples) terminated for an unknown reason -- Likely it has been terminated by the external systemLaura Seidel
08/12/2025, 6:39 AMDaniel Lundin
08/12/2025, 7:44 AMLaura Seidel
08/12/2025, 7:55 AMDaniel Lundin
08/12/2025, 7:57 AMDaniel Lundin
08/12/2025, 9:58 AMnextflow run erikrikarddaniel/metatdenovo -r lower-bbnorm-memory .... Try that without crazy amounts of memory, e.g. 64 or 128 GiB. According to the documentation, bbnorm should not require so much memory.Laura Seidel
08/12/2025, 10:08 AMDaniel Lundin
08/12/2025, 10:09 AMLaura Seidel
08/12/2025, 10:22 AMDaniel Lundin
08/12/2025, 10:29 AMmkdir ~/bin
cd ~/bin
curl -s <https://get.nextflow.io> | bash
The above might complain about your Java version. I think a module load java/OpenJDK_17+35 might help in that case. If not, get back to me.
Also, make sure ~/bin is in your PATH environment variable (check with: env | grep PATH and inspect).Daniel Lundin
08/12/2025, 10:30 AMnextflow self-update.Laura Seidel
08/12/2025, 10:30 AMLaura Seidel
08/12/2025, 10:45 AMDaniel Lundin
08/12/2025, 10:50 AMmodule spider java/OpenJDK_17+35. This time it tells you that you need to load bioinfo-tools first.Laura Seidel
08/12/2025, 10:52 AMLaura Seidel
08/12/2025, 11:05 AMDaniel Lundin
08/12/2025, 11:07 AMwhich nextflow. If that says which: no nextflow in ... (assuming you have installed it) then you need to add it: export PATH=~/bin:$PATH. Add this line also to your ~/.bash_profile (or .profile if the former doesn't exist).Daniel Lundin
08/12/2025, 11:11 AMLaura Seidel
08/12/2025, 11:13 AMDaniel Lundin
08/12/2025, 11:14 AMLaura Seidel
08/12/2025, 11:21 AMDaniel Lundin
08/12/2025, 11:24 AMPATH variable. If you've updated .bash_profile and don't mind starting a new session, "source" .bash_profile (source .bash_profile or, old-fashioned, . .bash_profile) and start a new screen session.Laura Seidel
08/12/2025, 11:41 AMDaniel Lundin
08/12/2025, 11:41 AMDaniel Lundin
08/12/2025, 4:52 PMLaura Seidel
08/13/2025, 7:13 AMDaniel Lundin
08/13/2025, 7:17 AMLaura Seidel
08/13/2025, 7:29 AMDaniel Lundin
08/13/2025, 7:42 AMLaura Seidel
08/13/2025, 7:43 AMDaniel Lundin
08/13/2025, 7:50 AMLaura Seidel
08/13/2025, 7:52 AMLaura Seidel
08/13/2025, 11:24 AMDaniel Lundin
08/13/2025, 11:58 AMLaura Seidel
08/13/2025, 12:29 PMLaura Seidel
08/14/2025, 7:19 AMDaniel Lundin
08/14/2025, 7:21 AMLaura Seidel
08/14/2025, 7:29 AMLaura Seidel
08/18/2025, 12:38 PMDaniel Lundin
08/18/2025, 1:25 PMprojinfo -u your_userLaura Seidel
08/19/2025, 7:13 AMDaniel Lundin
08/19/2025, 9:18 AMLaura Seidel
08/19/2025, 9:40 AMNFCORE_METATDENOVO:METATDENOVO:BBMAP_BBNORM (all_samples) terminated for an unknown reason -- Likely it has been terminated by the external system
Aug-18 211429.078 [TaskFinalizer-6] ERROR nextflow.processor.TaskProcessor - Error executing process > 'NFCORE_METATDENOVOMETATDENOVOBBMAP_BBNORM (all_samples)'
Caused by:
Process NFCORE_METATDENOVO:METATDENOVO:BBMAP_BBNORM (all_samples) terminated for an unknown reason -- Likely it has been terminated by the external system
Command executed:
bbnorm.sh \
in=YC-4250-BIO74water_S53_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO78water_S54_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO89water_S63_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO120water_S66_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO116water_S64_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO85water_S60_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO88water_S62_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO73blank_S52_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO80water_S56_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO82water_S57_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO83water_S58_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO84water_S59_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO79water_S55_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO86water_S61_L003_R1_001.fastq.gz.processed.fastq.gz,YC-4250-BIO117water_S65_L003_R1_001.fastq.gz.processed.fastq.gz \
out=all_samples.fastq.gz \
target=100 min=5 \
threads=64 \
-Xmx96g \
&> all_samples.bbnorm.log
cat <<-END_VERSIONS > versions.yml
"NFCORE_METATDENOVOMETATDENOVOBBMAP_BBNORM":
bbmap: $(bbversion.sh | grep -v "Duplicate cpuset")
END_VERSIONS
Command exit status:
-
Command output:
(empty)
Command error:
INFO: Mounting image with FUSE.
fuse: unknown option(s): `-o uid=3223195,gid=3223195'
WARNING: squashfuse mount failed, falling back to extraction: encountered error while trying to mount image "/cfs/klemming/scratch/l/lause/community-cr-prod.seqera.io-docker-registry-v2-blobs-sha256-5a-5aae5977ff9de3e01ff962dc495bfa23f4304c676446b5fdf2de5c7edfa2dc4e-data.img" with FUSE at /tmp/rootfs-1806610916/root: exit status 1
INFO: Converting SIF file to temporary sandbox...
WARNING: underlay of /etc/localtime required more than 50 (74) bind mountsDaniel Lundin
08/19/2025, 9:50 AMterminated for an unknown reason -- Likely it has been terminated by the external system. I just responded to a question @Ben Pontiller has with BBNORM (unfortunately in a DM -- would be more useful here 😉 ):
I think the bgzip part is a distraction. Instead, I think the key is in this part:
For better accuracy, use the 'prefilter' flag; run on a node with more memory; quality-trim or error-correct reads; or increase the values of the minprob flag to reduce spurious kmers. In practice you should still get good normalization results even with loads over 90%, but the histogram and statistics will be off.
Can you ask for more memory? If so, try to double. If not, add the below to your nextflow.config (or whatever name you use):
process {
withName: BBNORM {
ext.args = { [
"target=${params.bbnorm_target}",
"min=${params.bbnorm_min}",
"prefilter"
].join(' ').trim() }
... whatever options you already have
}
}
If you, @Laura Seidel, are running the erikrikarddaniel/metatdenovo -r lower-bbnorm-memory version, try the above or -- again! -- more memory.
As I think I mentioned, I got a number of very large BBNorm processes through the #CE9MS66BS pipeline with the below config on Dardel:
withName: BBMAP_BBNORM {
memory = 120.GB
cpus = 48
time = 3.d
}Laura Seidel
08/19/2025, 10:38 AMDaniel Lundin
08/19/2025, 10:39 AMDaniel Lundin
08/19/2025, 10:41 AM$SNIC_TMP with the -w flag to Nextflow. E.g.: nextflow run ... -w $SNIC_TMP/my_project/work.Daniel Lundin
08/19/2025, 10:42 AMLaura Seidel
08/19/2025, 10:43 AMLaura Seidel
08/22/2025, 7:36 AMNFCORE_METATDENOVO:METATDENOVO:BBMAP_BBNORM (all_samples) terminated for an unknown reason -- Likely it has been terminated by the external system
error [nextflow.exception.ProcessFailedException]: Process NFCORE_METATDENOVO:METATDENOVO:BBMAP_BBNORM (all_samples) terminated for an unknown reason -- Likely it has been terminated by the external system
Aug-22 091546.423 [TaskFinalizer-1] ERROR nextflow.processor.TaskProcessor - Error executing process > 'NFCORE_METATDENOVOMETATDENOVOBBMAP_BBNORM (all_samples)'
Not sure why BBNORM doesnt want to start but fails instead. I am also in contact with the support.Daniel Lundin
08/22/2025, 7:42 AMBBNORM is now in the dev branch of the official pipeline, i.e. nextflow run nf-core/metadenovo -r dev -latest. What does the .command.log in the work directory say? (The last lines usually contain a message like "oom [something]" or at least a return code (143 indicating out of memory).) Also check .exitcode.Daniel Lundin
08/22/2025, 7:46 AM.command.run is also interesting since it contains all the Slurm parameters used.Laura Seidel
08/22/2025, 8:03 AMDaniel Lundin
08/22/2025, 8:08 AMgrep .nextflow.log to find it. An example from one of my recent runs:
$ grep "EUKULELE_SEARCH.*workDir" .nextflow.log
aug.-22 07:43:24.557 [Task monitor] DEBUG n.processor.TaskPollingMonitor - Task completed > TaskHandler[id: 26; name: NFCORE_METATDENOVO:METATDENOVO:SUB_EUKULELE:EUKULELE_SEARCH (megahit.prodigal); status: COMPLETED; exit: 0; error: -; workDir: /data/eukulele-test/work/48/2669cccbd7969bce5d2ff982b14eb5]
The path after workDir is what you're looking for. cd into that and you'll find the files I mentioned.Laura Seidel
08/22/2025, 9:24 AMDaniel Lundin
08/22/2025, 9:32 AMDetected 1 oom_kill event ... Some of the step tasks have been OOM Killed. where "oom" stands for "out of memory". You need to ask for more memory. From the .command.run it looks like you asked for ~56 GiB, so go for 110 or so. In .command.sh you should be able to see how much was asked for by Java, in a block looking like this:
bbnorm.sh \\
$input \\
$output \\
$args \\
threads=64 \\
-Xmx48g \\
&> ${prefix}.bbnorm.log
(Everything starting with a $ also being replaced.) The key is the -Xmx48g string. The actual number there should be ~80% of the memory you asked for.
And, yes, the .exitcode file should be in the same directory. Not needed in this case.Daniel Lundin
08/22/2025, 9:48 AMLaura Seidel
08/22/2025, 10:30 AMDaniel Lundin
08/22/2025, 10:32 AMLaura Seidel
08/22/2025, 10:35 AMDaniel Lundin
08/22/2025, 10:40 AM.command.run. Maybe an error in the config file?
withName: BBMAP_BBNORM {
memory = 110.GB
cpus = 12
time = '3d'
}
Or something...Laura Seidel
08/22/2025, 10:42 AMLaura Seidel
08/22/2025, 10:43 AMDaniel Lundin
08/22/2025, 10:44 AM.command.run you pasted is correct. That says 55 GiB and 64 cpus.
You need to have withName: BBMAP_BBNORM.Laura Seidel
08/22/2025, 10:45 AMLaura Seidel
08/25/2025, 7:43 AMDaniel Lundin
08/25/2025, 9:02 AM.command.sh and `.command.log`:
ls -l .command.sh .command.log
The former is created when the job starts, the second is written to during execution.)Daniel Lundin
08/25/2025, 9:05 AMLaura Seidel
08/25/2025, 9:59 AMDaniel Lundin
08/25/2025, 10:10 AMLaura Seidel
08/25/2025, 10:11 AMDaniel Lundin
08/25/2025, 10:13 AMLaura Seidel
08/25/2025, 10:15 AMDaniel Lundin
08/25/2025, 10:18 AMLaura Seidel
08/25/2025, 10:20 AMDaniel Lundin
08/25/2025, 10:22 AMLaura Seidel
08/25/2025, 10:22 AMLaura Seidel
08/26/2025, 1:33 PMDaniel Lundin
08/26/2025, 2:31 PMDaniel Lundin
08/26/2025, 2:34 PMDaniel Lundin
08/26/2025, 2:35 PM--bbnorm with more and more memory. These jobs fail quicker, I believe, and therefore eat less cpu cores. Still, I think I'd go for not doing this.Laura Seidel
08/27/2025, 6:01 AMDaniel Lundin
08/27/2025, 6:04 AMDaniel Lundin
08/28/2025, 7:00 AMLaura Seidel
08/28/2025, 7:18 AM