guanchangge / mosaik-aligner

Automatically exported from code.google.com/p/mosaik-aligner
0 stars 0 forks source link

MosaikBuild: malloc error when importing human reference on Mac OS X #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. I made a fasta file of human genome sequnences containing chr1-chr22,
chrX, chrY, and chrM.
2. I gzipped it.
3. Then, I ran the command: MosaikBuild -fr hg19.fa.gz -ga HG19 -oa
hg19_mosaik.dat.

It gave the following error message and aborted.

MosaikBuild 1.0.1307                                           2009-10-14
Michael Stromberg              Marth Lab, Boston College Biology Department
--------------------------------------------------------------------------
- setting genome assembly ID to "HG19"
- converting hg19.fa.gz to a reference sequence archive.
- parsing reference sequences:
ref seqs: 22 |MosaikBuild(2853,0xa027b720) malloc: *** mmap(size=268435456)
failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
ref seqs: 22 /MosaikBuild(2853,0xa027b720) malloc: *** mmap(size=134221824)
failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
terminate called after throwing an instance of 'std::bad_alloc'
  what():  St9bad_alloc

It looks like a memory allocation error, but I am running on MacPro with
32G of memory.
Do I need to break up the fasta file into individual chromosomes?
Thank you.

Original issue reported on code.google.com by fyz...@gmail.com on 15 Jan 2010 at 12:43

GoogleCodeExporter commented 8 years ago
Strange.

It's interesting to note that it died right after you processed the normal
chromosomes (e.g. died when ref seqs: 22).

Other than that, we routinely process some references that are much larger than 
the
ones used in the human genome. So it's normally not a problem.

Could you try using the latest version of MOSAIK (1.0.1370) to see if the 
problem
still exists?

Alternatively, I'll probably need to download the hg19.fa.gz that you created 
and run
it our Mac to see if I can reproduce the error.

Cheers,

// Michael

Original comment by snowneb...@gmail.com on 16 Jan 2010 at 2:58

GoogleCodeExporter commented 8 years ago
Mosaik uses upto about 3.5Gb of memory and then it gives the error.
My friend tells me that it's probably because I am using the 32-bit version of
Mosaik, which can access upto 4Gb.
(I am running it in Mac OS X Server Leopard 10.5.8)
I tried compiling using 64-bit from source but it failed probably because I am 
not
very familiar with Mac OSX and I didn't do it properly.
Do you have a 64-bit version of Mosaik for Mac or directions on how to compile?
Thank you.

Original comment by fyz...@gmail.com on 17 Jan 2010 at 4:38

GoogleCodeExporter commented 8 years ago
I got it to work!
I had to include "-arch x86_64" in macosx.inc and compiled again to make a 
64-bit
version of Mosaik for MacOSX.
I just ran MosaikBuild with entire human genome without any problems.

My macosx.inc looks like this:

# define our processor specific flags
export PLATFORM_FLAGS = -arch x86_64 -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE64_SOURCE
export LDFLAGS = -Wl -arch x86_64

Original comment by fyz...@gmail.com on 17 Jan 2010 at 6:40

GoogleCodeExporter commented 8 years ago
Sweet! 

I'll include this into the include file today. I have already added the 64-bit 
binary
download thanks to your help.

Cheers,

// Michael

Original comment by snowneb...@gmail.com on 17 Jan 2010 at 3:13