Closed dgzara closed 1 year ago
Thanks @dgzara for reporting. Please provide a reproducible example that includes the offending call of ergm()
together with (perhaps artificial) data that we can use to trace the problem. Otherwise it is difficult to investigate.
Thanks, @mbojan. Here is the code I'm running. I can send you the dataset if needed.
I believe the error comes from the solver. I ran the same R script in a cluster from my university and the MCMC works. It runs and I get this message instead:
Warning: ‘glpk’ selected as the solver, but package ‘Rglpk’ is not available; falling back to ‘lpSolveAPI’. This should be fine unless the sample size and/or the number of parameters is very big.
I created the ERGM, saved the Rdata, and used those objects to continue the script in my computer.
Still, I'm getting the error coming from summary.ergm_state(state)
` caught segfault address 0x7f8cac2a6ae8, cause 'memory not mapped'
Traceback: 1: summary.ergm_state(state) 2: summary(state) 3: summary.ergm_model(m, nw, term.options = control$term.options) 4: summary(m, nw, term.options = control$term.options) 5: simulate.ergm_model(m, nsim = nsim, seed = seed, coef = coef, constraints = proposal, monitor = mon.m, basis = nw, esteq = esteq, output = output, simplify = simplify, sequential = sequential, control = control, verbose = verbose, return.args = return.args, ...) 6: simulate(m, nsim = nsim, seed = seed, coef = coef, constraints = proposal, monitor = mon.m, basis = nw, esteq = esteq, output = output, simplify = simplify, sequential = sequential, control = control, verbose = verbose, return.args = return.args, ...) 7: simulate_formula.network(object, nsim = nsim, seed = seed, ..., basis = attr(object, ".Basis")) 8: simulate_formula(object, nsim = nsim, seed = seed, ..., basis = attr(object, ".Basis")) 9: simulate.formula_lhs_network(object = g ~ edges + gwidegree(decay, fixed = T) + gwodegree(decay, fixed = T) + edgecov(network.work.no.enjoy) + edgecov(network.enjoy.work) + edgecov(network.ranking, "ranking"), nsim = nsim, seed = seed, coef = coef, response = response, reference = reference, esteq = esteq, sequential = sequential, constraints = constraints, observational = observational, monitor = monitor, output = output, simplify = simplify, control = control, verbose = verbose) 10: stats::simulate(object = g ~ edges + gwidegree(decay, fixed = T) + gwodegree(decay, fixed = T) + edgecov(network.work.no.enjoy) + edgecov(network.enjoy.work) + edgecov(network.ranking, "ranking"), nsim = nsim, seed = seed, coef = coef, response = response, reference = reference, esteq = esteq, sequential = sequential, constraints = constraints, observational = observational, monitor = monitor, output = output, simplify = simplify, control = control, verbose = verbose) 11: eval(cl, parent.frame()) 12: eval(cl, parent.frame()) 13: simulate.formula(object$formula, nsim = nsim, coef = coef, response = response, reference = reference, esteq = esteq, sequential = sequential, constraints = constraints, observational = observational, monitor = monitor, basis = basis, output = output, simplify = simplify, control = control, verbose = verbose, seed = seed, ...) 14: simulate(object$formula, nsim = nsim, coef = coef, response = response, reference = reference, esteq = esteq, sequential = sequential, constraints = constraints, observational = observational, monitor = monitor, basis = basis, output = output, simplify = simplify, control = control, verbose = verbose, seed = seed, ...) 15: simulate.ergm(mod.1, nsim = 100, verbose = T) 16: simulate(mod.1, nsim = 100, verbose = T)
Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace `
Thanks @dgzara .
The message about Rglpk is benign, but you may want to install it because it is preferred in general to the fallback lpSolveAPI.
So to summarize: your estimation code failed with segafult on your personal computer but completed succesfully on a different compuer (cluster)? Then you wanted to simulate from the estimated model on your personal computer and this, again, resulted with a segfault. Is that correct?
Can you please provide an RData so that I can try to reproduce the problem just by running simulate()
?
My hypotheses so far:
network_stats_wrapper()
mismanages memory on some OSes or architecturesCC @krivit
Without a working example, I can't really speculate.
Maybe a clean install of R and packages would be a good idea?
On Tue, Mar 14, 2023 at 2:04 AM Pavel N. Krivitsky @.***> wrote:
Without a working example, I can't really speculate.
— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/statnet/ergm/issues/510*issuecomment-1467678784__;Iw!!K-Hz7m0Vt54!myZfWf_hgQLeD-i9VmaLAcYaKcttOm3b056VQtShPSA9dB5Lf9PA9yf97iPGSJrfLg4OlxkqFWvcIz8wu96hTsk$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AB6QTYXYMJL6TRE5WTPHW3LW4AYARANCNFSM6AAAAAAVBFI5XM__;!!K-Hz7m0Vt54!myZfWf_hgQLeD-i9VmaLAcYaKcttOm3b056VQtShPSA9dB5Lf9PA9yf97iPGSJrfLg4OlxkqFWvcIz8wGMtJIdY$ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Since there hasn't been any word from the reporter, I assume this was resolved. If not, please reopen.
Hi all,
I tried to run an ergm with structural and edgecov terms. I didn't have trouble with prior versions of R (<4.2.2) and ergm (< 4.4). Now, I'm getting the following error.
I'm not sure why I'm getting
caught segfault
errors now. I'd appreciate any help. Thanks!Here is my session info