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

[PYTHON][RABIT] calling rabit.init multiple times exits the process #2796

Closed
TomAugspurger opened this issue Oct 17, 2017 · 3 comments
Closed

Comments

@TomAugspurger
Copy link

TomAugspurger commented Oct 17, 2017

Environment info

Operating System: macOS 10.12.6

Compiler: gcc

Package used (python/R/jvm/C++): python

xgboost version used: 0.6

If installing from source, please provide

  1. The commit hash (git rev-parse HEAD) 78c4188

  2. Logs will be helpful (If logs are large, please upload as attachment).

If you are using python package, please provide

  1. The python version and distribution: 0.6, source

Steps to reproduce

In [1]: import xgboost as xgb
In [2]: xgb.rabit.init()

In [3]: xgb.rabit.init()
rabit::Init is already called in this thread

(and the process exits)


Would it be possible to avoid this, say by storing a global or threadlocal variable? It seems like https://github.com/dmlc/rabit/blob/a764d45cfb438cc9f15cf47ce586c02ff2c65d0f/python/rabit.py#L46-L52 intends to do something like that, but even then, the init will still continue to run, since it doesn't check the result and continues unconditionally.

I'm happy to submit a patch for this, but I'm not sure whether to make it in the rabit repo or here. My local copy picks up the version of rabit in xgboost/python-package/xgboost/rabit.py, so I've made the issue here.

@TomAugspurger
Copy link
Author

Was this fixed in rabit?

@hcho3 hcho3 reopened this Jul 5, 2018
@hcho3
Copy link
Collaborator

hcho3 commented Jul 5, 2018

This issue was closed due to the current triaging. We try to aggressive close issues from now on so opened issues can get attended to. I went ahead and re-opened it.

@tqchen
Copy link
Member

tqchen commented Jul 5, 2018

please send a PR to the rabit repo

@tqchen tqchen closed this as completed Jul 5, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants