caleblareau / mgatk

mgatk: mitochondrial genome analysis toolkit
http://caleblareau.github.io/mgatk
MIT License
98 stars 25 forks source link

How to limit the virtual memory use of mgatk #36

Closed jimlin1668478052 closed 2 years ago

jimlin1668478052 commented 3 years ago

I tried to run the mgatk package in an assigned node (memory 192GB), and the session was killed because the occupied virtual memory exceeded the limit of the server:

Job XXX Aborted Exit Status = 137 Signal = KILL User = XXX Queue = XXX Host = XXX Start Time = 05/21/2021 09:58:48.949 End Time = 05/21/2021 17:06:26.175 CPU = 3:12:13:14 Max vmem = 749.543G Max rss = NA failed execd enforced h_vmem limit because: job 7921630.1 died through signal KILL (9).

I tried to limit the general use of virtual memory of the node with the unix command ulimit. But the session was still aborted. I added the cluster limit to be 12. It was of no use.

I would appreciate it very much if you could find the solution to the issue.

P.S.: The code I ran:

#!/bin/bash
#$ -cwd
# error = Merged with joblog
#$ -o joblog.$JOB_ID
#$ -j y
#$ -l h_rt=12:00:00,h_data=192G,rh7
# Email address to notify
#$ -M $USER@mail
# Notify when
#$ -m bea

# load the job environment:
. /u/local/Modules/default/init/modules.sh
module use /u/project/CCN/apps/modulefiles

# Load the FSL module
module load gcc
module load java
module load R
module load python/3.7.3

python3 -m venv venv3
source venv3/bin/activate
pip3 install mgatk
cd /u/project/XXX/XXX
ulimit -v 67108864
mgatk tenx -i /u/project/XXX/XXX/XXX/XXX/atac_possorted_bam.bam -n XXX -o XXX -bt CB -b /u/project/XXX/XXX/XXX/XXX/XXX_atac_barcode.tsv -g hg38 -c 12
caleblareau commented 3 years ago

hm-- this is surprising... how many barcodes do you have that you are calling? how many mtDNA reads (in millions) are in the bam file?

If you aren't limited by the number of files that you can have open at once, I'd suggest also trying mgatk bcall mode

caleblareau commented 2 years ago

Closing because the thread is now silent but please let me know if this issue persists.