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

compile failure #583

Open
rhaschke opened this issue Jan 16, 2019 · 1 comment
Open

compile failure #583

rhaschke opened this issue Jan 16, 2019 · 1 comment

Comments

@rhaschke
Copy link

Since Cython has recently changed its language_level default from Py2 to Py3 (cython/cython#2796), I get the following compile error:

file:/vol/famula/nightly/lib/python2.7/site-packages/Cython-3.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py:366: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /media/local/jenkins/jobs/libgpuarray-master-ci-deploy-lsp-famula-nightly/workspace/pygpu/collectives.pxd
  tree = Parsing.p_module(s, pxd, full_module_name)

Error compiling Cython file:
------------------------------------------------------------
...

    try:
        if is_c_cont:
            # Smallest in index dimension has the largest stride
            if src.ga.dimensions[0] % gpucount == 0:
                chosen_dim_size = src.ga.dimensions[0] / gpucount
                                                      ^
------------------------------------------------------------

pygpu/collectives.pyx:394:55: Cannot assign type 'double' to 'size_t'

Error compiling Cython file:
------------------------------------------------------------
...
            else:
                raise TypeError, "Source GpuArray cannot be split in %d c-contiguous arrays" % (gpucount)
        else:
            # Largest in index dimension has the largest stride
            if src.ga.dimensions[nd - 1] % gpucount == 0:
                chosen_dim_size = src.ga.dimensions[nd - 1] / gpucount
                                                           ^
------------------------------------------------------------

pygpu/collectives.pyx:408:60: Cannot assign type 'double' to 'size_t'

Do I need to pass the language_level (Py2) from the command line? Shouldn't that be extracted from the python executable that is running the install procedure?

@nouiz
Copy link
Member

nouiz commented Jan 17, 2019

I do not now and don't have the time to investigate. But as a quick work-around, you could downgrade cython.

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

2 participants