[R] Install Rmpi on Linux on a HPC
Ivan Krylov
kry|ov@r00t @end|ng |rom gm@||@com
Thu Sep 15 10:27:05 CEST 2022
On Thu, 15 Sep 2022 14:39:42 +0900
James Li <jamesli200116 using gmail.com> wrote:
> *** caught segfault ***
> address 0x1, cause 'memory not mapped'
>
> Traceback:
> 1: fun(libname, pkgname)
> 2: doTryCatch(return(expr), name, parentenv, handler)
> 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> 4: tryCatchList(expr, classes, parentenv, handlers)
> 5: tryCatch(fun(libname, pkgname), error = identity)
> 6: runHook(".onLoad", env, package.lib, package)
> 7: loadNamespace(package, lib.loc)
> 8: doTryCatch(return(expr), name, parentenv, handler)
> 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> 10: tryCatchList(expr, classes, parentenv, handlers)
> 11: tryCatch({ attr(package, "LibPath") <- which.lib.loc ns <-
> loadNamespace(package, lib.loc) env <- attachNamespace(ns, pos =
> pos, deps, exclude, include.only)}, error = function(e) { P <- if
> (!is.null(cc <- conditionCall(e))) paste(" in",
> deparse(cc)[1L]) else "" msg <- gettextf("package or namespace
> load failed for %s%s:\n %s", sQuote(package), P,
> conditionMessage(e)) if (logical.return)
> message(paste("Error:", msg), domain = NA) else stop(msg, call. =
> FALSE, domain = NA)})
> 12: library(Rmpi)
This is a bit useful. The crash is happening in Rmpi:::.onLoad() during
the first line of the script, library(Rmpi), and the reason is that
something takes the number 1 and tries to dereference it as a pointer.
Rmpi's .onLoad does a number of different things [*], and the crash is
happening inside some C code anyway, so we need the debugger.
> Reading symbols from
> /home/exp/R/4.0.5-gcc10.2.0-openmpi-debug/lib64/R/bin/exec/R...done.
> (gdb) quit
In order to get useful information from GDB, you need to type "run" in
the GDB prompt (without the " quotes) and reproduce the crash (for
example, by running library(Rmpi)). Once the R process crashes, you
will return back to the GDB prompt, where you'll need to run "bt full"
(again, without the quotes). After that you can quit.
--
Best regards,
Ivan
[*] https://github.com/cran/Rmpi/blob/master/R/zzz.R
More information about the R-help
mailing list