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

Importing gelato.expr seems to import gelato.utils which in turn imports matplotlib #11

Open
davschneller opened this issue May 5, 2021 · 3 comments

Comments

@davschneller
Copy link

Running psydac on the CoolMUC2 cluster with 112 processes (on two nodes, basically each thread -> MPI process...), the matplotlib import from the gelato.utils file caused some errors, since apparently matplotlib somehow caused all processes on one processor to serialize, and subsequently to timeout and throw a Python error.
Removing the only GeLaTo reference, a gelato.expr import from psydac (see https://github.com/pyccel/psydac/blob/a87c616b6d72066275207e26efc440457e5c7266/psydac/api/ast/glt.py#L39 ) removed this problem. Thing is, gelato.utils is neither explicitly imported nor needed in the code, but somehow seems to be imported anyways when importing gelato.expr.

The solution might be to change the gelato.__init__.py to not import all subfiles, or alternatively to move the matplotlib import inside the function where it is used.

@yguclu
Copy link
Member

yguclu commented Nov 5, 2021

@saidctb @ratnania What do you think of this?

@saidctb
Copy link
Member

saidctb commented Nov 5, 2021

ahh this needs to be fixed.

@ratnania
Copy link
Collaborator

ratnania commented Nov 5, 2021

you can remove the import of matplotlib from utils

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

No branches or pull requests

4 participants