I'm compiling the Dec 2013 version of cosmomc (+Multinest) and am encountering memory issues when I run the code:
*** glibc detected *** ./cosmomclens: free(): invalid pointer: 0x00002b3c83e82640 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3875e76166]
./cosmomclens(for_deallocate+0xb9)[0x928f89]
./cosmomclens[0x6d16bb]
/usr/local/shared/intel//composer_xe_2013.5.192/compiler/lib/intel64/libiomp5.so(__kmp_invoke_microtask+0x93)[0x2b3c4a8ca293]
======= Memory map: ========
00400000-00a8c000 r-xp 00000000 00:1e 2151666999 /mnt/usersVol2/renee/CosmoMC/test/cosmomclens
00c8c000-01ad6000 rw-p 0068c000 00:1e 2151666999 /mnt/usersVol2/renee/CosmoMC/test/cosmomclens
01ad6000-049d3000 rw-p 00000000 00:00 0
0655c000-066e1000 rw-p 00000000 00:00 0 [heap]
3875a00000-3875a20000 r-xp 00000000 09:01 4194306 /lib64/ld-2.12.so
3875c1f000-3875c20000 r--p 0001f000 09:01 4194306 /lib64/ld-2.12.so
3875
My compiler flags are:
LAPACKL = -L. -L$/usr/local/lib -L/usr/local/shared/intel/composer_xe_2013.5.192/mkl/lib/intel64/ -lmkl_gnu_thread -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_scalapack_lp64 -lmkl_blacs_ilp64 -lmkl_core -lpthread -lm -L$(CFITSIO)\
/lib -lcfitsio -L$(GSLPATH)/lib -lgsl -L$(LAPACKPATH)/lib -lgslcblas -L$(LIB_NS) -lnest3
When running it in mcmc mode (and also when using nested sampling) the code crashes as soon as it calls camb. It appears to be happening early on in CAMB_GetTransfers, and in fact the code does not get past the typing stage - and it seems that it is trying to free up memory that isn't correctly assigned.
Has anyone seen similar issues to this?
Cosmomc memory issue
-
- Posts: 5
- Joined: February 28 2007
- Affiliation: Princeton University
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Cosmomc memory issue
Compile with the DEBUGFLAGS to get a more helpful traceback, and possibly earlier detection of memory access issues. Or compare with the unmodified public version, or try the latest version.