-
Notifications
You must be signed in to change notification settings - Fork 104
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
Scipy via ginstall fails due to fortran compiler errors #265
Comments
After installing openblas and lapack, a different error emerges.
|
Which version did you try to install? We don't yet support newer versions of numpy and I think that extends to scipy as well. Please use To answer your first question - packages implemented in C typically have some system dependencies to build from source, they are usually described in the project's readme (something like "Building from source"). Many projects often also provide prebuilt binary wheels for few most common combinations of CPU + OS + libc + Python interpreter. So you probably didn't have to build from source on CPython because there is a prebuilt binary compatible with you system and CPython version. But nobody is yet building binary wheels for GraalPython, so we always end up building from source. |
All of the output I included in this ticket is the result of graalpython -m ginstall install scipy |
I cannot build it either, although with a different error. @cosminbasca is working on fixing the build, we'll let you know when it's merged. But don't expect much, we still won't be able to run the fortran parts even if they build because there is no fortran-to-LLVM-bitcode compiler yet. |
What can I do to move this forward? I have experience with Intel HPC Fortran, have been working with the JVM since it was made available by Sun, and really need a solution to scipy on graal - if not now, then over the long term. What we're doing now is not going to scale over upcoming years. Is there something you can use me for? |
The main issue for running scipy is that we cannot run the fortran code. GraalPython runs "native" languages like C using Sulong, an LLVM runtime on GraalVM. They get compiled to LLVM bitcode and Sulong then executes them. The problem with fortran is that last time we cehcked, there was still no working open-source compiler that could produce LLVM bitcode. So if you want to help, you could research the current state of fortran compilers targetting LLVM. There are many work-in-progress attempts at making a fortran LLVM compiler, maybe one of them progressed over the last few months to the point they can generate LLVM bitcode. If not, maybe you could contribute to one of the projects so that they can. Note it is necessary to generate LLVM bitcode, not just native executables (like |
So, maybe I'm missing something here, but the LLVM intermediate language can be generated using the frontend flang: And the resulting IR (I would assume?) can be converted to bitcode. Unless someone has already tried this and failed, I will go ahead and build flang and use it to try and build scipy from source. |
Greetings. I ran into similar issues on ARCH Linux with GCC-13. are@ryzen ~> source graalpy20/bin/activate.fish
(graalpy20) are@ryzen ~> CC="gcc-9" CF="gfortran-9" CFLAGS='-march=native' CXXFLAGS='-march=native' pip install --no-clean --no-binary :all: scipy Runs for hours now, eating all my RAM but seem to do something. |
The most recent version of graalpy doesn't use LLVM for C extension execution anymore by default, it would use your system toolchain, so the problem reported here shouldn't exist in graalpy 23.0. |
After running graalpython -m ginstall install scipy an error about LAPACK is produced (included below).
Perhaps this is just a documentation issue. Is there a prerequisite for install scipy?
The text was updated successfully, but these errors were encountered: