richfitz / wood

How much of the world is woody?
http://richfitz.github.io/wood
Other
20 stars 9 forks source link

Check that build works on new machine #1

Closed richfitz closed 10 years ago

richfitz commented 10 years ago

@mwpennell -- can you try this

mwpennell commented 10 years ago

Rich, so i tried this. All the data files built perfectly but I encountered a few problems.

  1. make exited out because I did not have sowsear and pandoc installed. not a problem -- I just installed these but I think it would be useful if in the README file you stated that these need to be installed and wear to find them. Pandoc, I think people can figure out but people won't know where to find sowsear.
  2. I got the following error in creating the pdf: pandoc: Error producing PDF from TeX source. ! Package pdftex.def Error: File `figure/fraction_phy_binomial1.png' not found.

See the pdftex.def package documentation for explanation. Type H for immediate help. ...

l.543 ...aphics{figure/fraction_phy_binomial1.png}

make: *\ [wood.pdf] Error 43

Not sure what this is. any suggestions?

richfitz commented 10 years ago

For (1) - yes: I'll add that to the README file. Not sure which other packages we need, but I'll look into that too. There's a dependence on diversitree that might be only for drop.tip, and if so I'll try and drop that too.

For (2) - Hmm, no idea. That worked fine here. This is in processing the md -> html, I presume? That worked fine here, but it looks like you're missing files that you should have. Could you try it on a fresh clone perhaps?

mwpennell commented 10 years ago

ok this was on a fresh clone. it could have to do with some files i don't have on my computer. linux is weird. will try and figure this out to see if it specific to my machine or not.

richfitz commented 10 years ago

Weird. I don't get a figure with a 1.png ending. could you email me the md and rmd files so I can see where that would have come from?

richfitz commented 10 years ago

That's so weird. This section here:

``` {r fraction_phy_binomial,fig.cap="Woodiness percentage by order"}
fig.fraction.on.phylogeny(phy.o, res.b)
fig.fraction.on.phylogeny(phy.o, res.h)

Is getting converted into this:
fig.fraction.on.phylogeny(phy.o, res.b)

Woodiness percentage by order Woodiness percentage by order

fig.fraction.on.phylogeny(phy.o, res.h)

Woodiness percentage by order Woodiness percentage by order


Which makes no sense.  There are two options I see for this: (1) knitr, (2) linux/mac disagreement about devices.

What version of knitr do you have?  I am using 1.5 (2013-09-28).  That appears to be the most current version, so you probably have that.

Can you try deleting the line that says

on.exit(par(op))



The line is [here](https://github.com/richfitz/wood/blob/17d9c7a39ec06122859441e99587c9216b750f40/wood-functions.R#L389), and see if that fixes it.
mwpennell commented 10 years ago

yes that is very strange.

i commented out this line but same error. I have the same version of knitr installed. Maybe get @wcornwell to try this on his mac to see if it is perhaps a system-specific thing (or perhaps just something weird in how i have my devices setup??).

wcornwell commented 10 years ago

I get this error:

Rscript R/make-output-dat.g.rds.R Error in rbind(deparse.level, ...) : numbers of columns of arguments do not match Calls: load.woodiness.data.genus -> rbind -> rbind Execution halted make: *\ [output/dat.g.rds] Error 1

richfitz commented 10 years ago

@wcornwell - is that also on a clean clone? I don't get that error and @mwpennell presumably didn't either.

Reproducibility is hard, let's go shopping.

mwpennell commented 10 years ago

http://4.bp.blogspot.com/-QivrQ-0L0i0/UEUQ6V3HstI/AAAAAAAACwU/csEY-40WuNc/s1600/ZoolanderFrappachinos.gif

wcornwell commented 10 years ago

That was a dirty clone, trying again

richfitz commented 10 years ago

OK, cool. I think I saw that error when I had dirty files in output hanging about as I changed which columns were retained.

wcornwell commented 10 years ago

* caught segfault * address 0xa0, cause 'memory not mapped'

Traceback: 1: .Call(symbol) 2: Module(module, mustStart = TRUE, where = env) 3: doTryCatch(return(expr), name, parentenv, handler) 4: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5: tryCatchList(expr, classes, parentenv, handlers) 6: tryCatch(Module(module, mustStart = TRUE, where = env), error = function(e) e) 7: loadModule(module = "diversitree", what = TRUE, env = ns, loadNow = TRUE) 8: (function (ns) loadModule(module = "diversitree", what = TRUE, env = ns, loadNow = TRUE))() 9: doTryCatch(return(expr), name, parentenv, handler) 10: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 11: tryCatchList(expr, classes, parentenv, handlers) 12: tryCatch((function (ns) loadModule(module = "diversitree", what = TRUE, env = ns, loadNow = TRUE))(), error = function(e) e) 13: eval(expr, envir, enclos) 14: eval(substitute(tryCatch(FUN(WHERE), error = function(e) e), list(FUN = f, WHERE = where)), where) 15: .doLoadActions(where, attach) 16: methods:::cacheMetaData(ns, TRUE, ns) 17: loadNamespace(name) 18: doTryCatch(return(expr), name, parentenv, handler) 19: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 20: tryCatchList(expr, classes, parentenv, handlers) 21: tryCatch(loadNamespace(name), error = function(e) stop(e)) 22: getNamespace(ns) 23: asNamespace(pkg) 24: get(name, envir = asNamespace(pkg), inherits = FALSE) 25: diversitree:::mrca.tipset 26: build.order.tree(dat.g) 27: eval(expr, envir, enclos) 28: eval(call, envir, enclos) 29: withVisible(eval(call, envir, enclos)) 30: withCallingHandlers(withVisible(eval(call, envir, enclos)), warning = wHandler, error = eHandler, message = mHandler) 31: doTryCatch(return(expr), name, parentenv, handler) 32: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 33: tryCatchList(expr, classes, parentenv, handlers) 34: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 35: try(f, silent = TRUE) 36: handle(ev <- withCallingHandlers(withVisible(eval(call, envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)) 37: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, debug = debug, last = i == length(out), use_try = stop_on_error != 2L, keep_warning = keep_warning, keep_message = keep_message, output_handler = output_handler) 38: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (options$error && options$include) 0L else 2L) 39: in_dir(opts_knit$get("root.dir") %n% input_dir(), evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), stop_on_error = if (options$error && options$include) 0L else 2L)) 40: block_exec(params) 41: call_block(x) 42: process_group.block(group) 43: process_group(group) 44: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { cat(res, sep = "\n", file = output %n% "") message("Quitting from lines ", paste(current_lines(i), collapse = "-"), " (", knit_concord$get("infile"), ") ") }) 45: process_file(text, output) 46: knit("wood.Rmd") aborting ... make: *\ [wood.md] Segmentation fault: 11

richfitz commented 10 years ago

Probably a Rcpp vs R vs gcc vs apple vs clang issue. My suggestion is to reinstall Rcpp and diversitree, but that's a PITA at the moment. If you have a working compiler toolchain, do

install.packages(c("Rcpp", "diversitree"), type="source")

I'm going to work out if dropping diversitree makes sense at this point (see #5). I need to do a new CRAN release soon, but things are a gong show with the Mavericks changing compilers.

richfitz commented 10 years ago

OK, given that this works on two of my machines and on travis (#4) I figure this is at least somewhat reproducible.