hmorlon / PANDA

Phylogenetic ANalyses of DiversificAtion
24 stars 15 forks source link

[WARNING] daspk-- warning.. At T(=R1) and stepsize H (=R2) the nonlinear solver failed to converge repeatedly of with abs (H) = HMIN &g, 0 #48

Closed madzafv closed 1 year ago

madzafv commented 1 year ago

Hi, I'm running

library(Rcpp)
library(ape)
library(terra)
library(raster)
library(RPANDA)

phy <- read.tree('.../treeDim.tre')

# fit ClaDS with a proportion of 153/350 as sampling fraction (153 spp. in the tree vs ~350 total species)
setwd('...')
sample_fraction <- 153/350

### Option 1: run for the full 300k iterations at once
sampler <- fit_ClaDS(phy,sample_fraction,iterations=300000,thin=250,file_name='sampler300k',model_id="ClaDS2",nCPU = 3)

and getting this warning at two points in the process

Done. in progress 1000 of 1000 please wait!
Done. in progress 2000 of 2000 please wait!
Done. in progress 2000 of 2000 please wait!
Done. in progress 3000 of 3000 please wait!
Done. in progress 3000 of 3000 please wait!
Done. in progress 4000 of 4000 please wait!
Done. in progress 4000 of 4000 please wait!
daspk--  warning.. At T(=R1) and stepsize H (=R2) the
      nonlinear solver failed to converge
      repeatedly of with abs (H) = HMIN &g, 0
Done. in progress 5000 of 5000 please wait!
daspk--  warning.. At T(=R1) and stepsize H (=R2) the
      nonlinear solver failed to converge
      repeatedly of with abs (H) = HMIN &g, 0
Done. in progress 5000 of 5000 please wait!
Done. in progress 6000 of 6000 please wait!
Done. in progress 6000 of 6000 please wait!
Done. in progress 7000 of 7000 please wait!
Done. in progress 7000 of 7000 please wait!
Done. in progress 8000 of 8000 please wait!
Done. in progress 8000 of 8000 please wait!
Done. in progress 9000 of 9000 please wait!
Done. in progress 9000 of 9000 please wait!
Done. in progress 10000 of 10000 please wait!
Done. in progress 10000 of 10000 please wait!
Done. in progress 11000 of 11000 please wait!
Done. in progress 11000 of 11000 please wait!
Done. in progress 12000 of 12000 please wait!
Done. in progress 12000 of 12000 please wait!
Done. in progress 13000 of 13000 please wait!
Done. in progress 13000 of 13000 please wait!
Done. in progress 14000 of 14000 please wait!
Done. in progress 14000 of 14000 please wait!
 MCMC in progress 14500 of 15000 please wait!

 MCMC in progress 18250 of 19000 please wait!

Done. in progress 25000 of 25000 please wait!
Done. in progress 26000 of 26000 please wait!
Done. in progress 27000 of 27000 please wait!
Done. in progress 28000 of 28000 please wait!
Done. in progress 29000 of 29000 please wait!
Done. in progress 30000 of 30000 please wait!
Done. in progress 31000 of 31000 please wait!
Done. in progress 32000 of 32000 please wait!
Done.

Is this warning something I should worry about? Thank you, -madza

hmorlon commented 1 year ago

Hello Madza, I think you can ignore as long as the MCMC ends up converging properly. During the MCMC some parameters are picked that lead to some convergence issues in the ODE solver, but the MCMC then just jumps to other parameter values. Best Hélène

madzafv commented 1 year ago

Got it! It did converge. thank you!