Skip to content

flair_transcriptome thread usage exceeds expected allocation on HPC systems #640

Description

@maxgmarin

How did you install Flair?

  1. bioconda (e.g. conda create -n flair -c conda-forge -c bioconda flair)

What happened?

I've been encountering resource exhaustion issues when running flair_transcriptome on SLURM HPC job submission systems. After investigating the code, I think I identified the root cause:

The --threads argument (default: 4) controls the multiprocessing pool size, but each worker process independently launches minimap2 with the same thread count. This results in 4 processes × 4 minimap2 threads = 16 total threads, far exceeding the expected allocation specified by the user.

This will result in the jobs being killed for exceeding the expected resource consumption.

Example

flair_transcriptome -b reads.bam -g genome.fa  # User expects ~4 threads by default
# Actually spawns: 4 worker processes + (4 × 4 minimap2 threads) = 16 threads

Potential Fixes:

  • Reduce minimap2 threads per worker to 1
  • Add separate --minimap_threads argument, or
  • Default --threads to 1 to prevent surprise resource consumption.

Thank you,
Max

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions