Building SuiteSparse without Fortran? #603
Replies: 20 comments 63 replies
-
Yes. I have a flag NFORTRAN that allows this (but I plan on renaming that to SUITESPARSE_FORTRAN). The only reason I need Fortran is to figure out how to call the BLAS and LAPACK, but that setting can be done with setting variables. |
Beta Was this translation helpful? Give feedback.
-
Yes, you still need a BLAS library and an LAPACK library. You just don't need a Fortran compiler to call them. You can configure SuiteSparse to call Ideally, you would want to use an optimized BLAS library, not the standard reference BLAS. It's possible to compile UMFPACK without the BLAS using -DNBLAS (but this option is not exposed in the CMakeLists.txt script. The BLAS and LAPACK libraries are found by SuiteSparseBLAS.cmake, in the SuiteSparse_config/cmake_modules folder. They assume that |
Beta Was this translation helpful? Give feedback.
-
Can you use these? https://developer.arm.com/documentation/101004/2310/BLAS-Basic-Linear-Algebra-Subprograms |
Beta Was this translation helpful? Give feedback.
-
The libblas.so that you've generated from clapack is probably very slow. It would likely be a translation from Fortran to C of the Fortran Reference BLAS. A better solution would be to look for an ARM-optimized BLAS and LAPACK. |
Beta Was this translation helpful? Give feedback.
-
Another option might be OpenBLAS which can build accelerated BLAS and all LAPACK functions without Fortran compiler. But make sure to use a compatible threading model everywhere. I.e., if you'd like to use OpenMP for the SuiteSparse libraries (and you probably should), also build OpenBLAS with OpenMP. |
Beta Was this translation helpful? Give feedback.
-
I tried the 9.4.0beta5 code. It gives me difficulties with cross-compiling as it produces an exec format error in GraphBLAS for a grb_jitpackage binary. I assume it expects this to be of x64 host format but it is aarch64 format. Is this needed on host or target and can I make it build for host despite cross-compiling? [ 14%] Generating compressed sources for JIT compiler... |
Beta Was this translation helpful? Give feedback.
-
@DrTimothyAldenDavis I will try once it's up, thank you. In the meantime: I replaced clapack with openblas with NOFORTRAN flag. When building suitesparse with NFORTRAN it still complains about LAPACK_LIBRARIES missing. Can this be avoided? Regards |
Beta Was this translation helpful? Give feedback.
-
SuiteSparse needs both the BLAS and LAPACK libraries. clapack can be used for the latter. SuiteSparse doesn't need Fortran to find those two packages -- that's separate issue. |
Beta Was this translation helpful? Give feedback.
-
Are these issues all resolved now? |
Beta Was this translation helpful? Give feedback.
-
Resolved in SuiteSparse 7.5.0. |
Beta Was this translation helpful? Give feedback.
-
Greetings, I tried 7.5.1 today. That lapack flag seems to work at the moment but a new problem has arised: find_package ( OpenMP now fails for GraphBLAS. Any ideas? |
Beta Was this translation helpful? Give feedback.
-
I'm cross-compiling for Aarch64 again. gcc-9.3.0-2.31-edfe925f87-aarch64-linux-gnu
It does find the FindOpenMP.cmake file provided by the cmake installation but that is not enough. I tried adding -fopenmp flag to the compiler parameters but then it complains that
Does find_package ( openml need -fopenmp to work? |
Beta Was this translation helpful? Give feedback.
-
Btw in the meantime I found out that the compiler removed libgomp. But I did not have problems with openmp before so I'm puzzled what's different. |
Beta Was this translation helpful? Give feedback.
-
It now proceeds further. But the native toolchain not set error has returned unless I set the -DGRAPHBLAS_CROSS_TOOLCHAIN_FLAGS_NATIVE variable. :( |
Beta Was this translation helpful? Give feedback.
-
Can this be posted as a new issue or new discussion? It's hard to find otherwise, and the openmp issue has nothing to do with Fortran. |
Beta Was this translation helpful? Give feedback.
-
Another error:
|
Beta Was this translation helpful? Give feedback.
-
I've started a new issue regarding the cmake *USE_OPENMP flags, for that part of the discussion. I'll reopen this discussion for the Fortran / LAPACK / BLAS questions. |
Beta Was this translation helpful? Give feedback.
-
Ok, next problem: I try to build Ceres solver 1.9.0 agains suitesparse 7.5.0:
Does this version of SuitesparseQR still exist in the code? |
Beta Was this translation helpful? Give feedback.
-
Greetings,
I want to build suitesparse for an Arm64 target using a linaro based toolchain which as far as I know has no complete Fortran compiler, only gcc, g++ etc.. Is building SuiteSparse possible in such an environment?
Regards
Beta Was this translation helpful? Give feedback.
All reactions