saigegit / SAIGE

Development for SAIGE and SAIGE-GENE(+)
GNU General Public License v3.0
64 stars 27 forks source link

memory allocation failure in step1 #124

Open Lloyd-LiuSiyi opened 10 months ago

Lloyd-LiuSiyi commented 10 months ago

Dear Developers, When fitting the null model in step1 using 400K WES data in UKBB, I encountered the following error:

Warning: spsolve(): memory allocation failure
*** Error in `/public/apps/R-4.3.1/lib64/R/bin/exec/R': free(): invalid pointer: )x00007fa018001418 ***
=========Backtrace=========
/lib64/libc.so.6(+0x81329)[0x7fa2e1a3a329]
....
/var/spool/slurm/d/job****/slurm_script: line 25: 91293 Aborted

I'm fitting the null model using sequencing genotype of just a block in a chromosome (20000 markers) and a phenotype of 400K individuals. The script was submitted to a HPC with 700G memory and 40 cores, which is a bit confusing why there would be a memory allocation problem. Does anyone face the same problem or has any ideas? I would deeply appreciate any help.

embertucci commented 10 months ago

I'm getting a similar error in step1 (see my issue #119) - I unfortunately have not found a solution yet but seems like an issue with sample size (phenotypes with smaller sample sizes run OK w/ all other input the same.)

Lloyd-LiuSiyi commented 10 months ago

Hi @embertucci, I read your issue and the problem seems similar. A worst solution I can think of is to run analyses in smaller samples and meta-analyze the results, but that shouldn't have happened in a tool developed to analyze biobank-level data. I'm looking forward to some updates.

embertucci commented 8 months ago

Hi @Lloyd-LiuSiyi - just wanted to let you know I found another work around for this issue by using the full GRM instead of the sparse GRM in step 1. I only get the memory allocation error when using the sparse GRM on larger sample sizes. Emily

Lloyd-LiuSiyi commented 8 months ago

Hi @embertucci, thanks for mentioning that. I never thought this may be due to using sparse GRM. During the last two months I have successfully conducted WES analyses using Regenie. If you still get stuck with SAIGE, I recommend trying Regenie which is quite fast and memory-friendly. Regards, Siyi