Hello, I tried to launch the pipeline on my full d...
# metatdenovo
n
Hello, I tried to launch the pipeline on my full dataset of samples (46 eukaryotic metaT samples) and it stopped at the step of MEGAHIT_INTERLEAVED. From what I understand, the error come is "Cannot allocate memory" but I am not sure if the problem comes from the pipeline and how I launched it or if it comes from hardware requirements. I am launching the job on my institute calculation cluster, and I checked I still have a lot of storage remaining on my scratch space, and I was planning larger on my cluster allocation. I admit that I am not extremely knowledgeable on how the cluster works precisely. Please find attached the error message outputted by the pipeline. I will also attached in comment my launcher.sh and config.custom files, along with the memory left on my scratch space. Thank you for the time you'll give to my question!
Copy code
ERROR ~ Error executing process > 'NFCORE_METATDENOVO:METATDENOVO:MEGAHIT_INTERLEAVED (megahit_assembly)'

Caused by:
  Process `NFCORE_METATDENOVO:METATDENOVO:MEGAHIT_INTERLEAVED (megahit_assembly)` terminated with an error exit status (1)


Command executed:

  megahit \
      --12 SAMEA112488779.processed.fastq.gz,SAMEA112488781.processed.fastq.gz,SAMEA112488783.processed.fastq.gz,SAMEA112488785.processed.fastq.gz,SAMEA112488787.processed.fastq.gz,SAMEA112488789.processed.fastq.gz,SAMEA112533980.processed.fastq.gz,SAMEA112533978.processed.fastq.gz,SAMEA112533982.processed.fastq.gz,SAMEA112533984.processed.fastq.gz,SAMEA112534048.processed.fastq.gz,SAMEA112534054.processed.fastq.gz,SAMEA112534052.processed.fastq.gz,SAMEA112534084.processed.fastq.gz,SAMEA112534082.processed.fastq.gz,SAMEA112534088.processed.fastq.gz,SAMEA112534086.processed.fastq.gz,SAMEA112534090.processed.fastq.gz,SAMEA112534120.processed.fastq.gz,SAMEA112534158.processed.fastq.gz,SAMEA112534156.processed.fastq.gz,SAMEA112534160.processed.fastq.gz,SAMEA112534162.processed.fastq.gz,SAMEA112534164.processed.fastq.gz,SAMEA112534216.processed.fastq.gz,SAMEA112534214.processed.fastq.gz,SAMEA112534218.processed.fastq.gz,SAMEA112534220.processed.fastq.gz,SAMEA112534224.processed.fastq.gz,SAMEA112534222.processed.fastq.gz,SAMEA112534050_1.processed.fastq.gz,SAMEA112534046_1.processed.fastq.gz,SAMEA112534056_1.processed.fastq.gz,SAMEA112534083_1.processed.fastq.gz,SAMEA112534087_1.processed.fastq.gz,SAMEA112534085_1.processed.fastq.gz \
       \
      -t 24 \
      -m 154618822656 \
       \
      --out-prefix megahit_assembly

  pigz \
      --no-name \
      -p 24 \
       \
      megahit_out/*.fa \
      megahit_out/intermediate_contigs/*.fa

  cat <<-END_VERSIONS > versions.yml
  "NFCORE_METATDENOVO:METATDENOVO:MEGAHIT_INTERLEAVED":
      megahit_interleaved: $(echo $(megahit -v 2>&1) | sed 's/MEGAHIT v//')
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  INFO:    Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred
  2026-06-24 17:43:30 - MEGAHIT v1.2.9
  2026-06-24 17:43:30 - Using megahit_core with POPCNT and BMI2 support
  2026-06-24 17:43:30 - Convert reads to binary library
  2026-06-24 17:56:27 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 0 (SAMEA112488779.processed.fastq.gz): interleaved, 330969846 reads, 151 max length'
  2026-06-24 18:12:47 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 1 (SAMEA112488781.processed.fastq.gz): interleaved, 418061500 reads, 151 max length'
  2026-06-24 18:23:55 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 2 (SAMEA112488783.processed.fastq.gz): interleaved, 281697330 reads, 151 max length'
  2026-06-24 18:42:26 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 3 (SAMEA112488785.processed.fastq.gz): interleaved, 443171510 reads, 151 max length'
  2026-06-24 18:56:50 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 4 (SAMEA112488787.processed.fastq.gz): interleaved, 366504792 reads, 151 max length'
  2026-06-24 19:10:44 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 5 (SAMEA112488789.processed.fastq.gz): interleaved, 353437134 reads, 151 max length'
  2026-06-24 19:20:14 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 6 (SAMEA112533980.processed.fastq.gz): interleaved, 242509428 reads, 151 max length'
  2026-06-24 19:29:52 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 7 (SAMEA112533978.processed.fastq.gz): interleaved, 247484254 reads, 151 max length'
  2026-06-24 19:37:18 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 8 (SAMEA112533982.processed.fastq.gz): interleaved, 194677678 reads, 151 max length'
  2026-06-24 19:45:24 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 9 (SAMEA112533984.processed.fastq.gz): interleaved, 210388086 reads, 151 max length'
  2026-06-24 19:53:38 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 10 (SAMEA112534048.processed.fastq.gz): interleaved, 216787134 reads, 151 max length'
  2026-06-24 20:02:11 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 11 (SAMEA112534054.processed.fastq.gz): interleaved, 219249356 reads, 151 max length'
  2026-06-24 20:10:30 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 12 (SAMEA112534052.processed.fastq.gz): interleaved, 210772632 reads, 151 max length'
  2026-06-24 20:21:57 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 13 (SAMEA112534084.processed.fastq.gz): interleaved, 293333894 reads, 151 max length'
  2026-06-24 20:31:21 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 14 (SAMEA112534082.processed.fastq.gz): interleaved, 241679850 reads, 151 max length'
  2026-06-24 20:45:54 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 15 (SAMEA112534088.processed.fastq.gz): interleaved, 346717592 reads, 151 max length'
  2026-06-24 20:56:44 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 16 (SAMEA112534086.processed.fastq.gz): interleaved, 274343836 reads, 151 max length'
  2026-06-24 21:09:33 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 17 (SAMEA112534090.processed.fastq.gz): interleaved, 311296626 reads, 151 max length'
  2026-06-24 21:22:05 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 18 (SAMEA112534120.processed.fastq.gz): interleaved, 306036610 reads, 151 max length'
  2026-06-24 21:33:48 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 19 (SAMEA112534158rk/8f/897094b394572f98a3d80b7b58600a/SAMEA112534158.processed.fastq.gz): interleaved, 285230734 reads, 151 max length'
  2026-06-24 21:45:27 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 20 (SAMEA112534156.processed.fastq.gz): interleaved, 279968728 reads, 151 max length'
  2026-06-24 22:11:02 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 21 (SAMEA112534160.processed.fastq.gz): interleaved, 660008944 reads, 151 max length'
  2026-06-24 22:19:48 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 22 (SAMEA112534162.processed.fastq.gz): interleaved, 226245252 reads, 151 max length'
  2026-06-24 22:34:35 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 23 (SAMEA112534164.processed.fastq.gz): interleaved, 346805916 reads, 151 max length'
  2026-06-24 22:44:40 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 24 (SAMEA112534216.processed.fastq.gz): interleaved, 260460298 reads, 151 max length'
  2026-06-24 22:55:34 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 25 (SAMEA112534214.processed.fastq.gz): interleaved, 285244160 reads, 151 max length'
  2026-06-24 23:07:38 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 26 (SAMEA112534218.processed.fastq.gz): interleaved, 286147632 reads, 151 max length'
  2026-06-24 23:17:04 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 27 (SAMEA112534220.processed.fastq.gz): interleaved, 221833914 reads, 151 max length'
  2026-06-24 23:27:11 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 28 (SAMEA112534224.processed.fastq.gz): interleaved, 252437182 reads, 151 max length'
  2026-06-24 23:38:35 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 29 (SAMEA112534222.processed.fastq.gz): interleaved, 276737726 reads, 151 max length'
  2026-06-24 23:55:50 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 30 (SAMEA112534050_1.processed.fastq.gz): interleaved, 450255760 reads, 151 max length'
  2026-06-25 00:11:27 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 31 (SAMEA112534046_1.processed.fastq.gz): interleaved, 406221836 reads, 151 max length'
  2026-06-25 00:24:06 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 32 (SAMEA112534056_1.processed.fastq.gz): interleaved, 299051760 reads, 151 max length'
  2026-06-25 00:42:21 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 33 (SAMEA112534083_1.processed.fastq.gz): interleaved, 458899136 reads, 151 max length'
  2026-06-25 01:00:28 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 34 (SAMEA112534087_1.processed.fastq.gz): interleaved, 441589610 reads, 151 max length'
  2026-06-25 01:18:29 - b'INFO  sequence/io/sequence_lib.cpp  :   75 - Lib 35 (SAMEA112534085_1.processed.fastq.gz): interleaved, 478353932 reads, 151 max length'
  2026-06-25 01:18:29 - b'INFO  utils/utils.h                 :  152 - Real: 27299.1916\tuser: 9465.8391\tsys: 1201.8240\tmaxrss: 250132'
  2026-06-25 01:18:29 - k-max reset to: 141
  2026-06-25 01:18:29 - Start assembly. Number of CPU threads 24
  2026-06-25 01:18:29 - k list: 21,29,39,59,79,99,119,141
  2026-06-25 01:18:29 - Memory used: 154618822656
  2026-06-25 01:18:29 - Extract solid (k+1)-mers for k = 21
  .command.run: fork: Cannot allocate memory
  2026-06-25 01:46:04 - Error occurs, please refer to megahit_out/megahit_assembly.log for detail
  2026-06-25 01:46:04 - Command: /usr/local/bin/megahit_core count -k 21 -m 2 --host_mem 154618822656 --mem_flag 1 --output_prefix megahit_out/tmp/k21/21 --num_cpu_threads 24 --read_lib_file megahit_out/tmp/reads.lib; Exit code -9
  .command.run: line 180: kill: (37) - No such process

Work dir:
  /scratch/guerin/metaT_vigo/190626_euk/work/8f/897094b394572f98a3d80b7b58600a

Container:
  /scratch/guerin/metaT_vigo/190626_euk/work/singularity/depot.galaxyproject.org-singularity-mulled-v2-0f92c152b180c7cd39d9b0e6822f8c89ccb59c99-8ec213d21e5d03f9db54898a2baeaf8ec729b447-0.img

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

 -- Check '.nextflow.log' file for details
d
The problem is, as you suspect, hardware requirements. Memory (RAM) to be precise. By default, the pipeline asks for only 72 GiB, so you should try to ask for more (I usually ask for at least 256, with 46 samples I'd go for 512 right away). Write a config file with this content:
Copy code
process {
  withName: MEGAHIT_INTERLEAVED {
    memory = 512.GB
    time = 32.h
    cpus = 24
  }
}
The key part is the memory. Assign as many cpus as you can. The time should be something long, but not so long so you end up way down in a submit queue if that's relevant for you.
If you don't have access to a machine with sufficient memory we can discuss other strategies later.
Here's more documentation on how to configure nf-core pipelines: https://nf-co.re/docs/running/configuration/configuration-options
n
Amazing ! Thank you for your quick answer ! I'll implement that and let you know how it goes, thank you very much for your help