igraph / rigraph

igraph R package
https://r.igraph.org
543 stars 200 forks source link

evcent crashing kernel on jupyter hub? #513

Closed cartercompbio closed 1 year ago

cartercompbio commented 2 years ago

Hello, I use Jupyter notebooks with igraph code to teach a segment on biological network analysis in a graduate course. This year, when I run evcent(g) the Jupyter notebook kernel dies (no error message, just dies). The only thing that has changed is that I am running Jupyter from a datahub setup with 4 CPU and 32G RAM.

The following code worked fine last year:

test.graph <-barabasi.game(100,power=0.5,m=2)
evcent(test.graph, scale=T)

or

g <- graph.formula(A-B,B-C,C-D,C-E,C-F,D-F,E-F)
evcent(g, scale=T)

Is it possible that there is some minimal requirement for the notebook environment for evcent to run? 4CPUY and 32G seems like plenty for these small examples though. Any ideas what might have changed, or how I can update the evcent call to fix the problem?

Thank you, -H

vtraag commented 2 years ago

You are running this on a Jupyter notebook with an R kernel, correct? Do you also hit the same problem when running directly from R? How did you install igraph and what version do you have installed?

cartercompbio commented 2 years ago

Hi Vincent,

Here's the igraph and base R version on the datahub:

r-igraph 1.2.6 r36h084b37e_1 conda-forge r-base 3.6.3 hd272fe0_4 conda-forge

Here's also the conda environment file that we're using for the R kernel: https://github.com/ucsd-ets/cmm262-notebook/blob/2022.1-stable/r-bio.yaml

I had no issues running the evcent command directly in R (base R version 4.0.3 and probably an older version of igraph). I think it's something strange with the datahub setup.

Thanks!

szhorvat commented 2 years ago

If this helps, this problem is likely related to linking to BLAS/LAPACK. eigen_centrality() (note: evcent() is the old, deprecated name) uses ARPACK, which in turn uses BLAS/LAPACK. You can test this by trying to run other functions that use ARPACK as well, such as page_rank() with the arpack method.

vtraag commented 2 years ago

@cartercompbio, I have tried to create an environment based on the r-bio.yaml file that you supplied, but unfortunately that is taking too long. Could you please supply a minimal environment in which you can reproduce this problem? It is now rather difficult to reproduce.

cartercompbio commented 2 years ago

Thank you, Vincent. If you think it's worth pursuing, I can look into that, however it sounds as if the problem is somewhat niche and unlikely to affect a lot of users. The Jupyter notebooks all work outside of the datahub environment that the course used so it may not be worth additional effort to track down the issue.

Best, -Hannah


From: Vincent Traag @.> Sent: Friday, February 25, 2022 8:10 AM To: igraph/igraph @.> Cc: Carter, Hannah @.>; Mention @.> Subject: Re: [igraph/igraph] evcent crashing kernel on jupyter hub? (Issue igraph/rigraph#513)

@cartercompbiohttps://urldefense.com/v3/__https://github.com/cartercompbio__;!!LLK065n_VXAQ!2iBbkHrmKpKefjj0YBxGkxW-eZNnLMrHxyO9VjLjnHi4jX3ziZkKoK5R26bKiX31JQ$, I have tried to create an environment based on the r-bio.yaml file that you supplied, but unfortunately that is taking too long. Could you please supply a minimal environment in which you can reproduce this problem? It is now rather difficult to reproduce.

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__igraph/rigraph#513*issuecomment-1050987501__;Iw!!LLK065n_VXAQ!2iBbkHrmKpKefjj0YBxGkxW-eZNnLMrHxyO9VjLjnHi4jX3ziZkKoK5R26bCfjz1Ew$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AQIY6CV5A34AYUZUKAMADBDU46SV5ANCNFSM5OTR2DTQ__;!!LLK065n_VXAQ!2iBbkHrmKpKefjj0YBxGkxW-eZNnLMrHxyO9VjLjnHi4jX3ziZkKoK5R26aKrWHKTg$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!LLK065n_VXAQ!2iBbkHrmKpKefjj0YBxGkxW-eZNnLMrHxyO9VjLjnHi4jX3ziZkKoK5R26aownkk9w$ or Androidhttps://urldefense.com/v3/__https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!LLK065n_VXAQ!2iBbkHrmKpKefjj0YBxGkxW-eZNnLMrHxyO9VjLjnHi4jX3ziZkKoK5R26bmHLsYMQ$. You are receiving this because you were mentioned.Message ID: @.***>

vtraag commented 2 years ago

I'll leave it up to you, it's difficult to assess whether it points to an actual bug somewhere or whether it's just some misconfiguration in databug. If you have time, it might be nice to try to replicate the problem, but it's no problem if you don't have the time for it. I'll leave the issue open for now.

szhorvat commented 1 year ago

I'll close this now since one year later we have no way to reproduce it. Feel free to reopen if you can provide a reasonably small reproducible example with a recent igraph version.

Things that might be worth trying:

This may be the result of accidental linking against a BLAS/LAPACK which is in some way incompatible, or different from the BLAS/LAPACK igraph was originally compiled with. This is only a guess though.