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

Modules have cyclic dependencies #86

Closed
miklos1 opened this issue Aug 2, 2016 · 1 comment
Closed

Modules have cyclic dependencies #86

miklos1 opened this issue Aug 2, 2016 · 1 comment
Assignees

Comments

@miklos1
Copy link
Contributor

miklos1 commented Aug 2, 2016

Consider the py3-compat branch that removes relative imports. This change seems to expose dependency cycles between COFFEE modules. For example, firedrake-clean fails:

Traceback (most recent call last):
  File "/home/mh1714/firedrake/bin/firedrake-clean", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/mh1714/firedrake/src/firedrake/scripts/firedrake-clean", line 3, in <module>
    from firedrake.tsfc_interface import clear_cache, TSFCKernel
  File "/home/mh1714/firedrake/src/firedrake/firedrake/__init__.py", line 26, in <module>
    from pyop2 import op2                                           # noqa
  File "/home/mh1714/firedrake/src/PyOP2/pyop2/__init__.py", line 9, in <module>
    from op2 import *  # noqa
  File "/home/mh1714/firedrake/src/PyOP2/pyop2/op2.py", line 48, in <module>
    from coffee.system import coffee_init, O0
  File "/home/mh1714/firedrake/src/COFFEE/coffee/system.py", line 41, in <module>
    from .vectorizer import VectStrategy
  File "/home/mh1714/firedrake/src/COFFEE/coffee/vectorizer.py", line 42, in <module>
    from . import system
ImportError: cannot import name system
@miklos1
Copy link
Contributor Author

miklos1 commented Oct 14, 2016

Digging into this, it seems that reference cycles can be simply broken by splitting coffee.system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant