raxml stopped working after BS and ML search without printing a tree + problems compiling AVX Pthread

382 views
Skip to first unread message

Jonathan Brassac

unread,
Oct 16, 2015, 12:35:46 PM10/16/15
to raxml
Dear Alexis, dear users,

I am working on a new computer with Windows. I downloaded the latest version (8.2.4) from git but the Pthread exe out of the box didn't work and I would like to use the full power of this computer (12 cores).
I thought I can try to compile it myself. I never did this before under Win but after researching a bit around I've decided to go for it and I installed MinGW. It took me some time but I eventually managed to compile the sequential versions (including AVX) and the Pthreads versions (except the AVX one!), though I did notice an error (or a warning?)

D:\Applications\standard-RAxML-master>make -f Makefile.PTHREADS.gcc rm -f *.o raxmlHPC-PTHREADS
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o axml.o axml.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o optimizeModel.o optimizeModel.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o multiple.o multiple.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o searchAlgo.o searchAlgo.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o topologies.o topologies.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o parsePartitions.o parsePartitions.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o treeIO.o treeIO.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o models.o models.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o bipartitionList.o bipartitionList.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o rapidBootstrap.o rapidBootstrap.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o evaluatePartialGenericSpecial.o evaluatePartialGenericSpecial.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o evaluateGenericSpecial.o evaluateGenericSpecial.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o newviewGenericSpecial.o newviewGenericSpecial.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o makenewzGenericSpecial.o makenewzGenericSpecial.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o classify.o classify.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o fastDNAparsimony.o fastDNAparsimony.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o fastSearch.o fastSearch.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o leaveDropping.o leaveDropping.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o rmqs.o rmqs.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o rogueEPA.o rogueEPA.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o ancestralStates.o ancestralStates.c
gcc  -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops -O2  -D_USE_PTHREADS -msse    -c -o mem_alloc.o mem_alloc.c
mem_alloc.c: In function 'rax_malloc':
mem_alloc.c:95:3: warning: return makes pointer from integer without a cast [enabled by default]
   return _aligned_malloc(size, BYTE_ALIGNMENT);
   ^
mem_alloc.c: In function 'rax_realloc':
mem_alloc.c:119:11: warning: assignment makes pointer from integer without a cast [enabled by default]
       ptr = _aligned_realloc(p, size, BYTE_ALIGNMENT);
           ^
gcc  -c -o eigen.o eigen.c
gcc  -o  raxmlHPC-PTHREADS axml.o  optimizeModel.o multiple.o searchAlgo.o topologies.o parsePartitions.o treeIO.o models.o bipartitionList.o rapidBootstrap.o evaluatePartialGenericSpecial.o evaluateGenericSpecial.o newviewGenericSpecial.o makenewzGenericSpecial.o   classify.o  fastDNAparsimony.o fastSearch.o leaveDropping.o rmqs.o rogueEPA.o ancestralStates.o  mem_alloc.o eigen.o   -lm -pthread

When running an analysis as such

D:\Applications\standard-RAxML-master\raxmlHPC-PTHREADS.exe -f a -s D:\Lars\MR_V1_c88d6m75p95.phy -m GTRCAT -n MR_V4 -x 3514 -# 10 -p 345654 -T 10 -j

RAxML would run without any trouble until the end of the ML search and then a window would pop up telling me that it has stopped and I would have only the info and the bootstrap file, no best tree (nor checkpoint...)

Could it be the error above causing the problem? Any idea what is wrong?

An other thing while trying to compile the avx pthread (SSE3 and standard compiled fine besides error above), I would get such an error

D:\Applications\standard-RAxML-master>make -f Makefile.AVX.PTHREADS.gcc rm -f *.o raxmlHPC-PTHREADS-AVX
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer  -funroll-loops  -D__AVX    -c -o axml.o axml.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o optimizeModel.o optimizeModel.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o multiple.o multiple.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o searchAlgo.o searchAlgo.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o topologies.o topologies.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o parsePartitions.o parsePartitions.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o treeIO.o treeIO.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o models.o models.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o bipartitionList.o bipartitionList.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o rapidBootstrap.o rapidBootstrap.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o evaluatePartialGenericSpecial.o evaluatePartialGenericSpecial.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o evaluateGenericSpecial.o evaluateGenericSpecial.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o newviewGenericSpecial.o newviewGenericSpecial.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o makenewzGenericSpecial.o makenewzGenericSpecial.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o classify.o classify.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX  -mavx -c -o fastDNAparsimony.o fastDNAparsimony.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o fastSearch.o fastSearch.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o leaveDropping.o leaveDropping.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o rmqs.o rmqs.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o rogueEPA.o rogueEPA.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o ancestralStates.o ancestralStates.c
gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX  -mavx -c -o avxLikelihood.o avxLikelihood.c
In file included from axml.h:48:0,
                 from avxLikelihood.c:11:
c:\mingw\include\pthread.h:320:8: error: redefinition of 'struct timespec'
 struct timespec {
        ^
In file included from c:\mingw\include\unistd.h:95:0,
                 from avxLikelihood.c:1:
c:\mingw\include\parts\time.h:65:8: note: originally defined here
 struct timespec
        ^
make: *** [avxLikelihood.o] Error 1

Any input or idea would be greatly appreciated.

Thanks,
Jonathan Brassac

Alexey Kozlov

unread,
Oct 17, 2015, 9:23:26 PM10/17/15
to ra...@googlegroups.com
Dear Jonathan,

> RAxML would run without any trouble until the end of the ML search and then a window would pop up telling me that it has
> stopped and I would have only the info and the bootstrap file, no best tree (nor checkpoint...)
>
> Could it be the error above causing the problem? Any idea what is wrong?

It looks like an out-of-memory error to me, how much RAM does your machine have and how large is your alignment?

You can also use the following online caclulator to estimate RAxML memory requirements for your dataset:

http://exelixis-lab.org/web/software/raxml/index.html#memcalc



> gcc -D_USE_PTHREADS -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops -D__AVX -mavx -c -o
> avxLikelihood.o avxLikelihood.c
> In file included from axml.h:48:0,
> from avxLikelihood.c:11:
> c:\mingw\include\pthread.h:320:8: error: redefinition of 'struct timespec'
> struct timespec {
> ^
> In file included from c:\mingw\include\unistd.h:95:0,
> from avxLikelihood.c:1:
> c:\mingw\include\parts\time.h:65:8: note: originally defined here
> struct timespec
> ^
> make: *** [avxLikelihood.o] Error 1

Could you please try commenting out the very first line of avxLikelihood.c:

//#include <unistd.h>

and recompile?

I guess it should be actually changed to something like

#ifndef WIN32
#include <unistd.h>
#endif

since that's what we have in all other source files, which do compile successfully on your system.

Hope this helps,
Alexey

Alexandros Stamatakis

unread,
Oct 19, 2015, 10:43:59 AM10/19/15
to ra...@googlegroups.com
I also think it might rather be an out of memory issue,

alexis
--
Alexandros (Alexis) Stamatakis

Research Group Leader, Heidelberg Institute for Theoretical Studies
Full Professor, Dept. of Informatics, Karlsruhe Institute of Technology
Adjunct Professor, Dept. of Ecology and Evolutionary Biology, University
of Arizona at Tucson

www.exelixis-lab.org

Jonathan Brassac

unread,
Oct 19, 2015, 12:18:52 PM10/19/15
to raxml
Dear Alexey and Alexis,

thank you for your messages.

The trick for the AVX version worked well though it gave me the same warning

gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX    -c -o mem_alloc.o mem_alloc.c

mem_alloc.c: In function 'rax_malloc':
mem_alloc.c:95:3: warning: return makes pointer from integer without a cast [enabled by default]
   return _aligned_malloc(size, BYTE_ALIGNMENT);
   ^
mem_alloc.c: In function 'rax_realloc':
mem_alloc.c:119:11: warning: assignment makes pointer from integer without a cast [enabled by default]
       ptr = _aligned_realloc(p, size, BYTE_ALIGNMENT);
           ^
gcc  -c -o eigen.o eigen.c
...

Concerning the "RAxML has stopped working" problem, I know that my alignment is large (175980 distinct alignment patterns) in 95 individuals and according to the online tool it should actually not take that much memory (500Mb) and indeed I do not see the RAM usage profile changing a lot. My computer should be powerful enough (?): it's a workstation with 12 cores and 64g RAM.

I also tried with the -U option without success.
Though, a test on a much smaller dataset worked fine.

How to make use of more RAM?

Thanks,
Nath
RAxML_info.MR_V7

Alexandros Stamatakis

unread,
Oct 20, 2015, 6:02:02 AM10/20/15
to ra...@googlegroups.com
Dear Jonathan,

I looked at the source code and one of the warning you get is indeed
most probably responsible for the error:

#ifndef WIN32
ptr = realloc(p, size);
#else
ptr = _aligned_realloc(p, size, BYTE_ALIGNMENT);
#endif

so the line:

ptr = realloc(p, size);

needs to be replaced by something else, a byte-aligned realloc for
Windows. Since I never program under windows, does anybody on the list
know how to fix this?

Alexis
> www.exelixis-lab.org <http://www.exelixis-lab.org>
>
> --
> You received this message because you are subscribed to the Google
> Groups "raxml" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to raxml+un...@googlegroups.com
> <mailto:raxml+un...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Alexandros Stamatakis

unread,
Oct 20, 2015, 7:34:21 AM10/20/15
to ra...@googlegroups.com
Alexey, thanks for spotting this, I was trying to do too many things at
the same time, Jonathan, can you just apply the change Alexey suggests
below and let us know if it works like this?

alexis

On 20.10.2015 12:24, Alexey Kozlov wrote:
> Hi Alexis,
>
>
>> #ifndef WIN32
>> ptr = realloc(p, size);
>> #else
>> ptr = _aligned_realloc(p, size, BYTE_ALIGNMENT);
>> #endif
>>
>> so the line:
>>
>> ptr = realloc(p, size);
>>
>> needs to be replaced by something else, a byte-aligned realloc for
>> Windows. Since I never program under windows, does
>> anybody on the list know how to fix this?
>
>
> or perhaps we should rather change "_aligned_realloc" to simple
> "realloc" on Windows, since that's what we do on Unix?
>
> Please note it's
>
> #if*n*def WIN32
>
> in the code above - that's also consistent with the compiler output
> which complains about _aligned_realloc.
>
> Although I still can't see why it complains in the first place, since
> _aligned_malloc/_aligned_realloc are supposed to return a pointer:
>
> https://msdn.microsoft.com/en-us/library/y69db7sx.aspx

Jonathan Brassac

unread,
Oct 20, 2015, 1:17:40 PM10/20/15
to raxml
Dear Alexis and Alexey,

Unfortunately it didn't work...

I changed the code in mem_alloc.c as suggested by Alexey from


#ifndef WIN32     
      ptr = realloc(p, size);
#else
      ptr = _aligned_realloc(p, size, BYTE_ALIGNMENT);
#endif

to

#ifndef WIN32     
      ptr = realloc(p, size);
#else
      ptr = realloc(p, size, BYTE_ALIGNMENT);
#endif

But I obtained a new error which prevented the compiler to finish:


gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer
 -funroll-loops  -D__AVX    -c -o mem_alloc.o mem_alloc.c
mem_alloc.c: In function 'rax_malloc':
mem_alloc.c:95:3: warning: return makes pointer from integer without a cast [ena
bled by default]
   return _aligned_malloc(size, BYTE_ALIGNMENT);
   ^
mem_alloc.c: In function 'rax_realloc':
mem_alloc.c:119:7: error: too many arguments to function 'realloc'
       ptr = realloc(p, size, BYTE_ALIGNMENT);
       ^
make: *** [mem_alloc.o] Error 1

Some more suggestions?

Jonathan 

Alexey Kozlov

unread,
Oct 20, 2015, 1:21:55 PM10/20/15
to ra...@googlegroups.com
Hi Jonathan,

just remove the 3rd argument, i.e. use

ptr = realloc(p, size);

(you can actually remove/comment out the #ifndef part since it'll be the same now).

Alexey
> > https://msdn.microsoft.com/en-us/library/y69db7sx.aspx <https://msdn.microsoft.com/en-us/library/y69db7sx.aspx>
> >
> > Alexey
>
> --
> Alexandros (Alexis) Stamatakis
>
> Research Group Leader, Heidelberg Institute for Theoretical Studies
> Full Professor, Dept. of Informatics, Karlsruhe Institute of Technology
> Adjunct Professor, Dept. of Ecology and Evolutionary Biology, University
> of Arizona at Tucson
>

Jonathan Brassac

unread,
Oct 20, 2015, 4:59:25 PM10/20/15
to raxml
Hi Alexey,

It seems (to me) that we manage to get rid of one error but I got a new error/warning.
The compiler finished but the run failed after the fast ML search.


gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer
 -funroll-loops  -D__AVX    -c -o mem_alloc.o mem_alloc.c
mem_alloc.c: In function 'rax_malloc':
mem_alloc.c:95:3: warning: return makes pointer from integer without a cast [ena
bled by default]
   return _aligned_malloc(size, BYTE_ALIGNMENT);
   ^
gcc  -c -o eigen.o eigen.c

Thank you for your support and sorry for being such a newbie!

Nath

Alexey Kozlov

unread,
Oct 20, 2015, 5:54:37 PM10/20/15
to ra...@googlegroups.com
Hi Jonathan,

do you have gdb (debugger) available in your minGW installation?

If so, could you please do the following:

1) recompile RAxML with debug info

- change first command to "CC = gcc -g" in your makefile
- run make -f <makefile>

2) run raxml in debugger

$gdb --args <your raxml command line>

(gdb) run

(wait until raxml exits with error)

(gdb) bt

3) this should show you the problematic line and the backtrace -> please send this info to us

Thanks!

Alexey
> <https://msdn.microsoft.com/en-us/library/y69db7sx.aspx> <https://msdn.microsoft.com/en-us/library/y69db7sx.aspx
> <https://msdn.microsoft.com/en-us/library/y69db7sx.aspx>>
> > >
> > > Alexey
> >
> > --
> > Alexandros (Alexis) Stamatakis
> >
> > Research Group Leader, Heidelberg Institute for Theoretical Studies
> > Full Professor, Dept. of Informatics, Karlsruhe Institute of Technology
> > Adjunct Professor, Dept. of Ecology and Evolutionary Biology, University
> > of Arizona at Tucson
> >
> > www.exelixis-lab.org <http://www.exelixis-lab.org> <http://www.exelixis-lab.org>
> >
> > --
> > You received this message because you are subscribed to the Google Groups "raxml" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to raxml+un...@googlegroups.com
> <javascript:>
> > <mailto:raxml+un...@googlegroups.com <javascript:>>.
> > For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.

Alexandros Stamatakis

unread,
Oct 21, 2015, 5:15:43 AM10/21/15
to ra...@googlegroups.com
Hi Jonathan,

That's not really a newbie issue, but more advanced.

could you maybe add the following line in file mem_alloc.c

#undef WIN32

right above:

void *rax_malloc( size_t size )
{
#ifndef WIN32
....

and tell us what happens?

Alexis


On 20.10.2015 22:59, Jonathan Brassac wrote:
> send an email to raxml+un...@googlegroups.com <javascript:>
> > <mailto:raxml+un...@googlegroups.com <javascript:>>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "raxml" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to raxml+un...@googlegroups.com
> <mailto:raxml+un...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Jonathan Brassac

unread,
Oct 21, 2015, 5:46:31 AM10/21/15
to raxml
Hi Alexis,

I tried what you suggested but I got a new error:


gcc  -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer
 -funroll-loops  -D__AVX    -c -o mem_alloc.o mem_alloc.c
gcc  -c -o eigen.o eigen.c
gcc  -o raxmlHPC-PTHREADS-AVX axml.o  optimizeModel.o multiple.o searchAlgo.o to
pologies.o parsePartitions.o treeIO.o models.o bipartitionList.o rapidBootstrap.
o evaluatePartialGenericSpecial.o evaluateGenericSpecial.o newviewGenericSpecial
.o makenewzGenericSpecial.o   classify.o fastDNAparsimony.o fastSearch.o leaveDr
opping.o rmqs.o rogueEPA.o ancestralStates.o avxLikelihood.o  mem_alloc.o eigen.
o   -lm -pthread
mem_alloc.o:mem_alloc.c:(.text+0x23): undefined reference to `posix_memalign'
collect2.exe: error: ld returned 1 exit status
make: *** [raxmlHPC-PTHREADS-AVX] Error 1

Something else?

Nath

Jonathan Brassac

unread,
Oct 21, 2015, 8:07:57 AM10/21/15
to raxml
Hi Alexey,

here is the result of the gdb (sorry it took that long, I'm running other analyses in parallel):

D:\Applications\standard-RAxML-master/raxmlHPC-PTHREADS-AVX2.exe -f a -s D:\Lars
\MR_V1_c88d6m75p95.phy -m GTRCAT -n MR_V10 -w D:\Lars\ -x 3514 -# 1 -p 345654 -T
 2 -U



Time for BS model parameter optimization -3232.000000
Bootstrap[0]: Time -1837.000000 seconds, bootstrap likelihood -1360731.490895, b
est rearrangement setting 8


Overall Time for 1 Rapid Bootstraps -1808.000000 seconds
Average Time per Rapid Bootstrap -1808.000000 seconds

Starting ML Search ...

Fast ML optimization finished

Fast ML search Time: 886.000000 seconds


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 10212.0x12c8]
newviewGTRGAMMA_AVX_GAPPED_SAVE (tipCase=tipCase@entry=2,
    x1_start=x1_start@entry=0x5bd30040, x2_start=x2_start@entry=0x7d830040,
    x3_start=<optimized out>, x3_start@entry=0x0, extEV=<optimized out>,
    tipVector=0x307f20, ex3=0x0, tipX1=tipX1@entry=0x0,
    tipX2=tipX2@entry=0x0, n=n@entry=87990, left=<optimized out>,
    left@entry=0x6742580, right=right@entry=0x6744000,
    wgt=wgt@entry=0x464ee40, scalerIncrement=scalerIncrement@entry=0x2ccec24,
    useFastScaling=1, x1_gap=x1_gap@entry=0x300f988,
    x2_gap=x2_gap@entry=0x3068380, x3_gap=0x2fd7330,
    x1_gapColumn=x1_gapColumn@entry=0x464ca00,
    x2_gapColumn=x2_gapColumn@entry=0x464da80,
    x3_gapColumn=x3_gapColumn@entry=0x464bf80,
    x1_presenceMap=x1_presenceMap@entry=0, x2_presenceMap=0)
    at avxLikelihood.c:839
839                     _mm256_store_pd(&x3[0],      xv[0]);
(gdb) bt
#0  newviewGTRGAMMA_AVX_GAPPED_SAVE (tipCase=tipCase@entry=2,
    x1_start=x1_start@entry=0x5bd30040, x2_start=x2_start@entry=0x7d830040,
    x3_start=<optimized out>, x3_start@entry=0x0, extEV=<optimized out>,
    tipVector=0x307f20, ex3=0x0, tipX1=tipX1@entry=0x0,
    tipX2=tipX2@entry=0x0, n=n@entry=87990, left=<optimized out>,
    left@entry=0x6742580, right=right@entry=0x6744000,
    wgt=wgt@entry=0x464ee40, scalerIncrement=scalerIncrement@entry=0x2ccec24,
    useFastScaling=1, x1_gap=x1_gap@entry=0x300f988,
    x2_gap=x2_gap@entry=0x3068380, x3_gap=0x2fd7330,
    x1_gapColumn=x1_gapColumn@entry=0x464ca00,
    x2_gapColumn=x2_gapColumn@entry=0x464da80,
    x3_gapColumn=x3_gapColumn@entry=0x464bf80,
    x1_presenceMap=x1_presenceMap@entry=0, x2_presenceMap=0)
    at avxLikelihood.c:839
#1  0x004881f5 in newviewIterative (tr=0x673bfe0)
    at newviewGenericSpecial.c:8299
#2  0x00475f8f in evaluateIterative (tr=tr@entry=0x673bfe0,
    writeVector=writeVector@entry=0) at evaluateGenericSpecial.c:2959
#3  0x00408a1a in execFunction (tr=tr@entry=0x303a80,
    localTree=localTree@entry=0x673bfe0, tid=tid@entry=1, n=n@entry=2)
    at axml.c:8794
#4  0x00409f17 in likelihoodThread (tData=0x30a508) at axml.c:9871
#5  0x62485bd3 in ptw32_threadStart@4 () from C:\MinGW\bin\pthreadGC2.dll
#6  0x760d1287 in msvcrt!_itow_s () from C:\Windows\syswow64\msvcrt.dll
#7  0x760d1328 in msvcrt!_endthreadex () from C:\Windows\syswow64\msvcrt.dll
#8  0x773e337a in KERNEL32!BaseThreadInitThunk ()
   from C:\Windows\syswow64\kernel32.dll
#9  0x77ab92e2 in ntdll!RtlInitializeExceptionChain ()
   from C:\Windows\system32\ntdll.dll
#10 0x77ab92b5 in ntdll!RtlInitializeExceptionChain ()
   from C:\Windows\system32\ntdll.dll
#11 0x00000000 in ?? ()

Alexandros Stamatakis

unread,
Oct 21, 2015, 8:36:52 AM10/21/15
to ra...@googlegroups.com
Hi Jonathan,

Thnaks, could you confirm that this only happens for the AVX Pthreads
version or does it happen for other versions as well.

Alexis

Alexey Kozlov

unread,
Oct 21, 2015, 8:46:20 AM10/21/15
to ra...@googlegroups.com
Hi Jonathan,

thanks!

Now it seems that _aligned_malloc fails to allocate memory for some reason:

> newviewGTRGAMMA_AVX_GAPPED_SAVE (tipCase=tipCase@entry=2,
> x1_start=x1_start@entry=0x5bd30040, x2_start=x2_start@entry=0x7d830040,
> x3_start=<optimized out>, x3_start@entry=0x0, extEV=<optimized out>,

It happens after RAxML switched from GTRCAT to GTRGAMMA model for the thorough optimization, and thus has to reallocate
the condition likelihood vectors.

Here's what I'd suggest to evaluate next:

- try using GTRGAMMA model, also please don't use memory saving (no -U) to make things simpler

- in order to confirm that memory allocation is the problem, you may modify rax_malloc function as follows:

void *rax_malloc( size_t size )
{
#ifndef WIN32
void
*ptr = (void *)NULL;

int
res = posix_memalign(&ptr, BYTE_ALIGNMENT, size);

if(res != 0)
{
outOfMemory();
assert(0);
}

return ptr;
#else

void *ptr = (void *) _aligned_malloc(size, BYTE_ALIGNMENT);

if(ptr == (void*)NULL)
{
outOfMemory();
assert(0);
}

return ptr;

#endif
}

- could you please send your alignment so that I can make sure this issue is really specific to minGW and/or your
configuration?

Alexey

Jonathan Brassac

unread,
Oct 21, 2015, 10:10:19 AM10/21/15
to raxml
Hi,

@Alexis no it happens to all versions (I only tested a few ones). But as Alexey pointed it it's the GAMMA search that crashes

@Alexey I modified the code, recompiled (without #undef WIN32) and changed the command.
 

D:\Applications\standard-RAxML-master>gdb --args raxmlHPC-PTHREADS-AVX2.exe -f a
 -s D:\Lars\MR_V1_c88d6m75p95.phy -m GTRGAMMA -n MR_V11 -w D:\Lars\ -x 3514 -# 1
 -p 345654 -T 12
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from D:\Applications\standard-RAxML-master\raxmlHPC-PTHREADS-AVX
2.exe...done.
(gdb) run
Starting program: D:\Applications\standard-RAxML-master/raxmlHPC-PTHREADS-AVX2.e
xe -f a -s D:\Lars\MR_V1_c88d6m75p95.phy -m GTRGAMMA -n MR_V11 -w D:\Lars\ -x 35
14 -# 1 -p 345654 -T 12
[New Thread 8384.0xf78]
WARNING, you have specified a random number seed via -x or -b for some sort of b
ootstrapping,
but you have specified a number of replicates via -N or -# euqal to one
Are you really sure that this is what you want to do?
Warning, you specified a working directory via "-w"
Keep in mind that RAxML only accepts absolute path names, not relative ones!


Using BFGS method to optimize GTR rate parameters, to disable this specify "--no
-bfgs"


This is the RAxML Master Pthread
[New Thread 8384.0x930]

[New Thread 8384.0x1b8c]
Th[New Thread 8384.0x11d0]
is[New Thread 8384.0xa84]

Th[New Thread 8384.0x1cb8]
is i[New Thread 8384.0x210c]
s[New Thread 8384.0x2168]
 [New Thread 8384.0x1650]
RAxML [New Thread 8384.0x1fc0]
Wo
T[New Thread 8384.0x2098]
his
Thi[New Thread 8384.0x126c]
s is RAxML Worker Pthread Number:
This is RAxML Worker Pthread Number: 6
10

This is RAxML Work is RAxML Worker Pthread Number: 9

This is RAxML Worker Pthread Number: 11

This is RAxML Worker Pthread Number: 8

This is RAxML
This is RAxML Worker Pthread Number: 4
 Worker Pthread Number: 5

This is RAxML Worker Pthread Number: 7
rker Pthread Number: 3
 is RAxML Worker Pthread Number: 1
er Pthread Number: 2


This is RAxML version 8.2.4 released by Alexandros Stamatakis on October 02 2015
.

With greatly appreciated code contributions by:
Andre Aberer      (HITS)
Simon Berger      (HITS)
Alexey Kozlov     (HITS)
Kassian Kobert    (HITS)
David Dao         (KIT and HITS)
Nick Pattengale   (Sandia)
Wayne Pfeiffer    (SDSC)
Akifumi S. Tanabe (NRIFS)

Alignment has 175980 distinct alignment patterns

Proportion of gaps and completely undetermined characters in this alignment: 19.
05%

RAxML rapid bootstrapping and subsequent ML search

Using 1 distinct models/data partitions with joint branch length optimization



Executing 1 rapid bootstrap inferences and thereafter a thorough ML search

All free model parameters will be estimated by RAxML
GAMMA model of rate heteorgeneity, ML estimate of alpha-parameter

GAMMA Model parameters will be estimated up to an accuracy of 0.1000000000 Log L
ikelihood units

Partition: 0
Alignment Patterns: 175980
Name: No Name Provided
DataType: DNA
Substitution Matrix: GTR




RAxML was called as follows:


D:\Applications\standard-RAxML-master/raxmlHPC-PTHREADS-AVX2.exe -f a -s D:\Lars
\MR_V1_c88d6m75p95.phy -m GTRGAMMA -n MR_V11 -w D:\Lars\ -x 3514 -# 1 -p 345654
-T 12


RAxMRAxML was not able to allocaRAxML was not able to allocate enough memory.
PRAxML was not able to allocate enough memory.
L was notRAxML was not able to allocate enough memory.
lease check the approximate memory consumption of your dataset using
te enough memory.
RAxML was not able to allocate enough memory.
Please check the approximate memory consumption of your dataset using
RAxML was not able to allocate enough memory.
RAxML was not able to allocate enough memory.
 able to allocate enough memory.
Please check the approximate memory consumption of your dataset using
RAxML was not able to allocate enough memory.
RAxML was not able to allocate enough memory.
RAxML was not able to allocate enough memory.
RAxML was not able to allocate enough memory.
Please check the approximate memory consumption of your dataset using
the memory calculator at http://www.exelixis-lab.org/web/software/raxml/index.ht
ml.
Please check the approximate memory consumptiRAxML will exit now
Pl[Inferior 1 (process 8384) exited with code 037777777777]
(gdb) quit

Jonathan

Alexey Kozlov

unread,
Oct 21, 2015, 10:42:57 AM10/21/15
to ra...@googlegroups.com
Hi Jonathan,

could it be that you're using a 32-bit version of minGW? Then you hit a 2GB per-process memory limit, since RAxML needs
a bit more with GTRGAMMA on your dataset (~2.5GB, just checked it on my side).

I have zero experience with minGW, but I guess you would need something like this:

http://mingw-w64.org/doku.php

Alexey

Jonathan Brassac

unread,
Oct 22, 2015, 8:17:35 AM10/22/15
to raxml
Hi Alexey,

when I read your message yesterday I thought yes of course that's probably the problem.

However after getting a 64 bit version of mingw, below is the version of the gcc I used

$ /usr/bin/i686-w64-mingw32-gcc.exe -v
Using built-in specs.
COLLECT_GCC=/usr/bin/i686-w64-mingw32-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/4.9.2/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: /cygdrive/i/szsz/tmpp/cygwin64/mingw64-i686/mingw64-i686-gcc-4.9.2-2.x86_64/src/gcc-4.9.2/configure --srcdir=/cygdrive/i/szsz/tmpp/cygwin64/mingw64-i686/mingw64-i686-gcc-4.9.2-2.x86_64/src/gcc-4.9.2 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/mingw64-i686-gcc --htmldir=/usr/share/doc/mingw64-i686-gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=i686-w64-mingw32 --without-libiconv-prefix --without-libintl-prefix --with-sysroot=/usr/i686-w64-mingw32/sys-root --with-build-sysroot=/usr/i686-w64-mingw32/sys-root --disable-multilib --disable-win32-registry --enable-languages=c,ada,c++,fortran,lto,objc,obj-c++ --enable-fully-dynamic-string --enable-graphite --enable-libgomp --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-version-specific-runtime-libs --with-dwarf2 --with-gnu-ld --with-gnu-as --with-tune=generic --with-cloog-include=/usr/include/cloog-isl --with-system-zlib --libexecdir=/usr/lib
Thread model: win32
gcc version 4.9.2 (GCC)

and recompiling I get no error during compiling but I get the same error when running RAxML (ML search with GAMMA fails).

Anymore suggestions?

Jonathan

Alexandros Stamatakis

unread,
Nov 6, 2015, 3:55:07 AM11/6/15
to ra...@googlegroups.com
Hi Jonathan,

Does the problem still persist?

Alexis
> <http://gnu.org/licenses/gpl.html <http://gnu.org/licenses/gpl.html>>
> send an email to raxml+un...@googlegroups.com <javascript:>
> > <mailto:raxml+un...@googlegroups.com <javascript:>>.
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "raxml" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to raxml+un...@googlegroups.com
> <mailto:raxml+un...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Jonathan Brassac

unread,
Nov 7, 2015, 3:46:51 PM11/7/15
to ra...@googlegroups.com
Hi Alexis,

Well I kind of gave up on trying to compile on windows and got Linux installed instead... works perfectly!

Best,
Jonathan
You received this message because you are subscribed to a topic in the Google Groups "raxml" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/raxml/YYlJ5r7pXWU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to raxml+un...@googlegroups.com.

Alexandros Stamatakis

unread,
Nov 8, 2015, 7:39:28 AM11/8/15
to ra...@googlegroups.com
that's the perfect solution :-)

alexis
Reply all
Reply to author
Forward
0 new messages