abacus-gene / paml

PAML is a program package for model fitting and phylogenetic tree reconstruction using DNA and protein sequence data. Please report only **technical issues** on this repository (e.g., compiling, programs abort or do not run at all, etc.). Problems with input data and general questions should be posted at https://groups.google.com/g/pamlsoftware?pli
GNU General Public License v3.0
95 stars 18 forks source link

Dating soft bound broken #47

Open mariodosreis opened 2 months ago

mariodosreis commented 2 months ago

The examples in examples/TipDate.HIV2/ and examples/TipDate.FluH1/ do not work. When trying any of the five mcmctree control files in those directories, the following error is printed on the screen:

Trace/BPT trap: 5

and the MCMC run is aborted before starting. This was tested on a MacBook air M2.

$ uname -a
Darwin roraima.home 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:51:37 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T8112 arm64

Some of the control files were tested with mcmctree 4.9j and they appear to be running correctly.

sabifo4 commented 2 weeks ago

Hi Mario,

Have you tried to download the source code from the dev branch and use it to compile MCMCtree?

It seems that there are some invalid memory access problems (conditional jumps depending on uninitialized values). It is possible those values are automatically initialised by Linux/Windows binaries to 0 and so there is no segfault, but arm64 initialises them differently (or is stricter) because it is a risc processor. Ziheng fixed the source code in the dev branch but has not yet been merged with the main branch. The bug that affects only newer Macs was related to the use of strcpy(t,s);, which copes source string s to target string t, when s and t are the same string at the same address.

Let me know if using the compiled version using the source code in the dev branch fixes the issue!

All the best, Sandy

mariodosreis commented 2 weeks ago

I run a quick test using the dev version on both the HIV and Flu data and the error does not occur, so it appears fixed! M.