Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark dodgr with contracted graph #14

Closed
Robinlovelace opened this issue Aug 9, 2024 · 6 comments · Fixed by #15
Closed

Benchmark dodgr with contracted graph #14

Robinlovelace opened this issue Aug 9, 2024 · 6 comments · Fixed by #15

Comments

@Robinlovelace
Copy link
Member

No description provided.

@Robinlovelace Robinlovelace linked a pull request Aug 9, 2024 that will close this issue
@Robinlovelace
Copy link
Member Author

See #15 that seems to be failing, with the following:

8/20 [unnamed-chunk-6]


 *** caught segfault ***
address (nil), cause 'unknown'


Traceback:
 1: rcpp_get_paths_pairwise(graph, vert_map, from_index$index, to_index$index,     heap)
 2: dodgr_paths(graphc, o, d, pairwise = TRUE)
 3: system.time({    paths <- dodgr_paths(graphc, o, d, pairwise = TRUE)})
 4: eval(expr, envir, enclos)
 5: eval(expr, envir, enclos)
 6: eval_with_user_handlers(expr, envir, enclos, user_handlers)
 7: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers))
 8: withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler)
 9: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler))
10: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler)))
11: 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,     log_echo = log_echo, log_warning = log_warning, output_handler = output_handler,     include_timing = include_timing)
12: evaluate::evaluate(...)
13: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options))
14: in_dir(input_dir(), expr)
15: in_input_dir(evaluate(code, envir = env, new_device = FALSE,     keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options)))
16: eng_r(options)
17: block_exec(params)
18: call_block(x)
19: process_group(group)
20: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e))
21: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)),     function(loc) {        setwd(wd)        write_utf8(res, output %n% stdout())        paste0("\nQuitting from lines ", loc)    }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
22: process_file(text, output)
23: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
24: rmarkdown::render("/home/robin/github/itsleeds/routingday/dodgr.Rmd")
25: eval(parse(text = .vsc.knit_command))
26: eval(parse(text = .vsc.knit_command))
27: cat(.vsc.knit_lim, eval(parse(text = .vsc.knit_command)), .vsc.knit_lim,     sep = "", file = stdout())
An irrecoverable exception occurred. R is aborting now ...

@Robinlovelace
Copy link
Member Author

Any ideas the cause @mpadge, can you reproduce the error in the dodgr.Rmd file on the branch in #15 ? I will try installing the dev version of dodgr in the meantime.

@Robinlovelace
Copy link
Member Author

Hit an error again, on the dev version:

18/20 [unnamed-chunk-6]


 *** caught segfault ***
address (nil), cause 'unknown'


Traceback:
 1: rcpp_get_paths_pairwise(graph, vert_map, from_index$index, to_index$index,     heap)
 2: dodgr_paths(graphc, o, d, pairwise = TRUE)
 3: system.time({    paths <- dodgr_paths(graphc, o, d, pairwise = TRUE)})
 4: eval(expr, envir, enclos)
 5: eval(expr, envir, enclos)
 6: eval_with_user_handlers(expr, envir, enclos, user_handlers)
 7: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers))
 8: withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler)
 9: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler))
10: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler)))
11: 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,     log_echo = log_echo, log_warning = log_warning, output_handler = output_handler,     include_timing = include_timing)
12: evaluate::evaluate(...)
13: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options))
14: in_dir(input_dir(), expr)
15: in_input_dir(evaluate(code, envir = env, new_device = FALSE,     keep_warning = if (is.numeric(options$warning)) TRUE else options$warning,     keep_message = if (is.numeric(options$message)) TRUE else options$message,     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }, output_handler = knit_handlers(options$render, options)))
16: eng_r(options)
17: block_exec(params)
18: call_block(x)
19: process_group(group)
20: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e))
21: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e) if (xfun::pkg_available("rlang", "1.0.0")) rlang::entrace(e)),     function(loc) {        setwd(wd)        write_utf8(res, output %n% stdout())        paste0("\nQuitting from lines ", loc)    }, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
22: process_file(text, output)
23: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
24: rmarkdown::render("/home/robin/github/itsleeds/routingday/dodgr.Rmd")
25: eval(parse(text = .vsc.knit_command))
26: eval(parse(text = .vsc.knit_command))
27: cat(.vsc.knit_lim, eval(parse(text = .vsc.knit_command)), .vsc.knit_lim,     sep = "", file = stdout())
An irrecoverable exception occurred. R is aborting now ...

[VSC-R] dodgr.Rmd process exited from signal 'SIGSEGV'

Reproducible example in #15

@mpadge
Copy link
Contributor

mpadge commented Aug 9, 2024

Yep, I can reproduce that, which should mean I can fix it. I'll get back to you

@Robinlovelace
Copy link
Member Author

🙏

@mpadge
Copy link
Contributor

mpadge commented Aug 9, 2024

That's all fixed now, and should work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants