Error in checkForRemoteErrors(val) - in BAYAREA

387 views
Skip to first unread message

Ken Sytsma

unread,
Mar 19, 2014, 8:21:10 PM3/19/14
to bioge...@googlegroups.com
I have a 100 taxa data set with 5 geographical areas. I can do DEC, DECJ, DIVA, DIVAJ, and BAYAREAJ without any problem. However, the regular BAYAREA run aborts half way through and gives the following "error" (as well as these three warnings that I get in all analyses related to Optimx but do not hinder the runs). I have shown the rerun with debug for the fatal error. The BAYAREA commands are exactly the same (pasted in) as the BAYAREAJ commands but with the "J" model commands not run. Any idea why this is happening with BAYAREA but not with any of the other five analyses? I can send my R file and various source files if those are helpful.

Warning messages:
1: In optimx.setup(par, fn, gr, hess, lower, upper, method, itnmax,  :
  optimx: No match to available methods
2: In optimx.setup(par, fn, gr, hess, lower, upper, method, itnmax,  :
  Default method when bounds specified is L-BFGS-B to match optim()
3: In optim(par = par, fn = ufn, gr = ugr, lower = lower, upper = upper,  :
  method L-BFGS-B uses 'factr' (and 'pgtol') instead of 'reltol' and 'abstol'

 Error in checkForRemoteErrors(val) :

  198 nodes produced errors; first error: NA/NaN/Inf in foreign function call (arg 4)

7 stop(count, " nodes produced errors; first error: ", firstmsg,
    domain = NA)
6 checkForRemoteErrors(val)
5 staticClusterApply(cl, fun, length(x), argfun)
4 clusterApply(cl = cluster_already_open, x = phy2$edge.length,
    fun = expokit_dgpadm_Qmat2, Qmat = Qmat, transpose_needed = TRUE)
3 calc_loglike_sp(tip_condlikes_of_data_on_each_state = tip_condlikes_of_data_on_each_state,
    phy = phy, Qmat = Qmat, spPmat = NULL, return_what = "all",
    sparse = force_sparse, use_cpp = TRUE, input_is_COO = force_sparse,
    spPmat_inputs = spPmat_inputs, printlevel = 0, cluster_already_open = cluster_already_open,
    calc_ancprobs = TRUE, fixnode = fixnode, fixlikes = fixlikes) at BioGeoBEARS_univ_model_v1.R#272
2 calc_loglike_for_optim(params = params, BioGeoBEARS_run_object = BioGeoBEARS_run_object,
    phy = phy, tip_condlikes_of_data_on_each_state = tip_condlikes_of_data_on_each_state,
    print_optim = TRUE, areas_list = areas_list, states_list = states_list,
    force_sparse = force_sparse, cluster_already_open = cluster_already_open,
    return_what = "all", calc_ancprobs = calc_ancprobs) at BioGeoBEARS_univ_model_v1.R#893

Nick Matzke

unread,
Mar 19, 2014, 8:30:28 PM3/19/14
to bioge...@googlegroups.com
Hi, thanks for the question.

This is a new one, but my best guess is optimx is trying
some parameter value that results in a probability number so
small there is an underflow error.

Try upping the minimum values of d and e by a bit and
re-running the BAYAREALIKE model (I say BAYAREALIKE because
it's a likelihood interpretation of the BayArea program, not
identical to the Bayesian sampling model used in BayArea).

E.g.:

BioGeoBEARS_run_object$BioGeoBEARS_model_object@params_table["d","min"]
= 0.00000001
BioGeoBEARS_run_object$BioGeoBEARS_model_object@params_table["e","min"]
= 0.00000001

...you might also move "max" down a bit.

Cheers,
Nick
> --
> You received this message because you are subscribed to the
> Google Groups "BioGeoBEARS" group.
> To unsubscribe from this group and stop receiving emails
> from it, send an email to
> biogeobears...@googlegroups.com
> <mailto:biogeobears...@googlegroups.com>.
> To post to this group, send email to
> bioge...@googlegroups.com
> <mailto:bioge...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/biogeobears.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/biogeobears/fa7d61f4-c692-438b-a3b2-851a739e4a02%40googlegroups.com
> <https://groups.google.com/d/msgid/biogeobears/fa7d61f4-c692-438b-a3b2-851a739e4a02%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

--
====================================================
Nicholas J. Matzke, Ph.D.
NIMBioS Postdoctoral Fellow in Mathematical Biology
National Institute for Mathematical and Biological Synthesis
(NIMBioS, www.nimbios.org)
Cell: 510-301-0179
Email: mat...@nimbios.org
Links to CV, R packages, etc.:
http://phylo.wikidot.com/nicholas-j-matzke

Also: Brian O'Meara Lab
Postdoc office: 425a Hesler
Department of Ecology and Evolutionary Biology
University of Tennessee, Knoxville
http://www.brianomeara.info/

NIMBioS Office:
Claxton Bldg. #110B
Office phone: 865-974-4873

NIMBioS:
1122 Volunteer Blvd., Suite 106
University of Tennessee
Knoxville, TN 37996-3410
Phone: (865) 974-9334
Fax: (865) 974-9300

-----------------------------------------------------
"[W]hen people thought the earth was flat, they were wrong.
When people thought the earth was spherical, they were
wrong. But if you think that thinking the earth is spherical
is just as wrong as thinking the earth is flat, then your
view is wronger than both of them put together."

Isaac Asimov (1989). "The Relativity of Wrong." The
Skeptical Inquirer, 14(1), 35-44. Fall 1989.
http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm
====================================================

Ken Sytsma

unread,
Mar 19, 2014, 11:14:34 PM3/19/14
to bioge...@googlegroups.com, Nick Matzke
Thanks, that worked. Actually it required both the min and max of "d" and "e" to be tweaked - as you suggested - to get it to run to completion. Nice to see your program package and its options after having used Lagrange and RASP to their limits.

Ken
Reply all
Reply to author
Forward
0 new messages