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

gcc backend does not install anymore on newer platforms #10

Open
ksakmann opened this issue Oct 25, 2023 · 2 comments
Open

gcc backend does not install anymore on newer platforms #10

ksakmann opened this issue Oct 25, 2023 · 2 comments
Labels
question Further information is requested

Comments

@ksakmann
Copy link

Hi @Trinkle23897. Awesome work. I came across the following environment issue.
On an older platform the installation proceeds to install gcc backend

$ fpie --check-backend
[Taichi] version 1.6.0, llvm 15.0.4, commit f1c6fbbd, linux, python 3.9.7
['numpy', 'numba', 'taichi-cpu', 'taichi-gpu', 'gcc', 'openmp']
$ gcc --version
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-18)

However, on a newer platform the gcc backend does not install.

$ fpie --check-backend
[Taichi] version 1.6.0, llvm 15.0.4, commit f1c6fbbd, linux, python 3.10.12
['numpy', 'numba', 'taichi-cpu', 'taichi-gpu']
$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Do you have any ideas what the issue could be?

@Trinkle23897
Copy link
Owner

Could you try to inspect which error it raises in this line via python setup.py install or pip install -e .?

print(f"{type(e)}: {e}")

@Trinkle23897 Trinkle23897 added the question Further information is requested label Oct 25, 2023
@ksakmann
Copy link
Author

ksakmann commented Oct 27, 2023

Hi @Trinkle23897 The solution is to comment out cmake in setup.py. I don't get how that affects the build, but it solves my problem. For reference, I just checked what you suggested, run pip install -e .. I use the code on master, but just to be sure to not deal with CUDA issues I commented out the CUDA section in CMakeLists.txt. pip install -e . then spits out the following exception. It looks like some path is wrong

...
    [ 83%] Linking CXX shared module /home/XXXX/Fast-Poisson-Image-Editing/build/lib.linux-x86_64-cpython-310/fpie/core_mpi.cpython-310-x86_64-linux-gnu.so
    lto-wrapper: warning: using serial compilation of 3 LTRANS jobs
    [ 91%] Linking CXX shared module /home/XXXX/Fast-Poisson-Image-Editing/build/lib.linux-x86_64-cpython-310/fpie/core_gcc.cpython-310-x86_64-linux-gnu.so
    [100%] Linking CXX shared module /home/XXXX/Fast-Poisson-Image-Editing/build/lib.linux-x86_64-cpython-310/fpie/core_openmp.cpython-310-x86_64-linux-gnu.so
    lto-wrapper: warning: using serial compilation of 3 LTRANS jobs
    lto-wrapper: warning: using serial compilation of 3 LTRANS jobs
    [100%] Built target core_mpi
    [100%] Built target core_gcc
    [100%] Built target core_openmp
    error: can't copy 'build/lib.linux-x86_64-cpython-310/fpie.cpython-310-x86_64-linux-gnu.so': doesn't exist or not a regular file
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

Running pip install -e . after commenting out "cmake>=3.4", in setup.py still returns the exact same exception. However, when I run pip install . I finally get what I want:

XXX@XXXX:~/Fast-Poisson-Image-Editing$ fpie --check-backend
[Taichi] version 1.6.0, llvm 15.0.4, commit f1c6fbbd, linux, python 3.10.12
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
['numpy', 'numba', 'taichi-cpu', 'taichi-gpu', 'gcc', 'openmp', 'mpi']

I can't say I understand what happend, but I'm happy now. For reference:

XXX@XXXX:~/Fast-Poisson-Image-Editing$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

XXX@XXXX:~/Fast-Poisson-Image-Editing$ cmake --version
cmake version 3.27.7

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants