I'm also seeing this error in `SPLICECOUNTS_COUNTS...
# drop
n
I'm also seeing this error in `SPLICECOUNTS_COUNTSPLITREADS`:
Copy code
Error in reducer$value.cache[[as.character(idx)]] <- values :
    wrong args for environment subassignment
  Calls: countSplitReads ... .bploop_impl -> .collect_result -> .reducer_add -> .reducer_add
  In addition: Warning message:
  In parallel::mccollect(wait = FALSE, timeout = 1) :
    1 parallel job did not deliver a result
  Execution halted
Anyone any ideas?
a
This is usually a memory issue.
n
aha thanks! I'll try bumping the memory
👍🏼 1
That doesn't seem to work 😕
a
How much did you increase the memory? Could you really overkill it just to be sure? especially if most samples run successfully and there is a couple samples failing, it is a memory issue.
n
I've tried 64 GB now but I can try more 🙂
128 GB also doesn't work, that seems quite excessive already 😅
a
That's odd. Is there any way to see the resources used to make sure it is not memory issue?
Otherwise, what we used to do in snakemake is to run the failing job interactively. i.e., go to the work directory of this job, load in the required input, and run it interactively which usually ends up giving you better idea of what the error is.
n
I would normally do that too but this is sadly not possible on Google Cloud 😕
🥲 1
I'll do some debugging and report back to you
🙌🏼 1
Okay I found the metrics, the difficult process used around 70 GB of memory mind blown but passed, it was another process that failed with the same error and I didn't notice that
☠️ 1
I'll bump the requirements there too 🙂 Thanks for the help
Is it normal for that process to use that much memory?
a
how many cores does it use? I think if the number of cores is a lot, it will use a lot of memory.
n
It uses 1.5 cores in total
It gets 3 cores by default, which I haven't changed
a
That doesnt seem too many. Are these normal samples or cancer? Maybe this sample has lots of junction 🤷🏼‍♂️ You can check this later if you are curious😄
n
I will need to check with the lab technicians on the specifics 😛
But that could be a reasonable explanation!
j
Hi @Nicolas Vannieuwkerke @Ata Jadid Ahari , Jumping into this thread as I am facing a very similar error. My
GENECOUNTS_COUNTREADS
&
SPLICECOUNTS_COUNTSPLITREADS
tasks keep failing (exit code 140) on our HPC despite allocating what I thought was a generous amount of resources. For context, I am working with BAM files that have ~100M paired-end reads per sample and have total 370 samples. I’ve bumped the base memory to 128GB and set up dynamic retries in my
hpc.config
, but the jobs are still getting killed:
Copy code
withName: '.*GENECOUNTS_COUNTREADS' { 
    memory = { 128.GB * task.attempt } 
    time   = { 24.h * task.attempt } 
    errorStrategy = { task.exitStatus in [1, 104, 134, 137, 139, 140, 143, 255] ? 'retry' : 'finish' }
}
To troubleshoot, I also tried changing the number of cores/workers. When setting it to n-cpu=2 I ran into a Nextflow resource mismatch for the splicing step:
Copy code
ERROR ~ Error executing process > 'DROP:ABERRANTSPLICING:SPLICECOUNTS_COUNTSPLITREADS (F216P003-100m_524015526)'
Caused by:
Process requirement exceeds available CPUs -- req: 3; avail: 2
When setting it to n-cpus=4, it throws this
BiocParallel
error (which I suspect is an underlying Out-Of-Memory kill being masked by R):
Copy code
Error in reducer$value.cache[[as.character(idx)]] <- values :
wrong args for environment subassignment
Calls: countSplitReads ... .bploop_impl -> .collect_result -> .reducer_add -> .reducer_add
In addition: Warning message:
In parallel::mccollect(wait = FALSE, timeout = 1) :
What would be the best way forward here? Should I just keep throwing more memory/time at it, or is there a way to configure the underlying
BiocParallel
workers to chunk the BAM processing more efficiently? On a related note regarding the handling of large datasets: has there been any discussion within the community about rebuilding the core counting logic or the FRASER/OUTRIDER packages in Rust instead of R? Given the memory overhead of `GenomicAlignments`/`BiocParallel`, I imagine a Rust-based implementation could drastically improve both memory efficiency and speed. With cohorts getting larger, the current BiocParallel + R memory model seems difficult to scale reliably on HPC environments. Would love to hear if this has been considered!
n
Hi thank you for the thorough breakdown, my only working solution so far is to increase the memory available to the process. Have you tried lowering the amount of cpus using the
cpus
directive for the process?
I fully support a Rust rewrite if done properly, but I'm not an author of the packages so I'll leave that up to those guys to decide 🙂
a
Hi, we also support a faster rewrite too :)))
We started it on our side a year ago but unfortunately it doesn't seem to be finished anytime soon/ever.
🥲 1
n
Maybe the rewrites website can help with that? https://rewrites.bio/
👀 1
j
Hi @Nicolas Vannieuwkerke I did actually try lowering the CPUs to 2 in an attempt to constrain the workers, but unfortunately, the process seems to strictly require at least 3. When I tried dropping it down, Nextflow immediately threw this resource mismatch error:
Copy code
ERROR ~ Error executing process > 'DROP:ABERRANTSPLICING:SPLICECOUNTS_COUNTSPLITREADS (F216P003-100m_524015526)'
Caused by:
Process requirement exceeds available CPUs -- req: 3; avail: 2
n
Hmmm that's weird... what Nextflow version are you using?
j
I am using v25.10.4
n
Hmmm then I'm not sure what's going wrong...