You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Though finding this file was a bit tricky. Then ninja build-givaro build-fflas-ffpack detected MKL fine as well, and this was reported by cmake:
## Library information
Linear Algebra = /opt/local/oneapi/2024.1/mkl/2024.1/lib/libmkl_intel_lp64.so;/opt/local/oneapi/2024.1/mkl/2024.1/lib/libmkl_intel_thread.so;/opt/local/oneapi/2024.1/mkl/2024.1/lib/libmkl_core.so;/opt/local/oneapi/2024.1/compiler/2024.1/lib/libiomp5.so;-lm;-ldl;-lm;-ldl
Conflicting declaration of C functions from lapack.hpp, e.g.:
/usr/people/sayrafi/M2/M2/Macaulay2/e/lapack.hpp:18:5: error: conflicting declaration of C function ‘intdgesv_(int*, int*, double*, int*, int*, double*, int*, int*)’
18 | int dgesv_(int *n, // number of rows in A
| ^~~~~~
compilation terminated due to -Wfatal-errors.
I got around this by adding #ifndef _MKL_LAPACK_H_ around the extern "C" section of our lapack.hpp. It seems to me like we should be including this section from somewhere, why is it here?
Incompatible complex types:
/usr/people/sayrafi/M2/M2/Macaulay2/e/dmat-lu-inplace.hpp: In member function ‘void DMatLUinPlace<RT>::computeLU() [with RT = M2::ARingCC]’:
/usr/people/sayrafi/M2/M2/Macaulay2/e/dmat-lu-inplace.hpp:372:25: error: cannot convert ‘double*’ to ‘MKL_Complex16*’
372 | zgetrf_(&rows, &cols, copyA, &rows, perm, &info);
| ^~~~~
| |
| double*
compilation terminated due to -Wfatal-errors.
For reference, this is the declaration of zgetrf_ in lapack.hpp vs mkl_lapack.hpp:
intzgetrf_(int *rows, // rowsint *cols, // columnsdouble *M, // input matrix, on exit L & U from A=PLU.int *ld, // rowsint *ipiv, // becomes permutation indices of Pint *info); // error infovoidzgetrf_( const MKL_INT* m, const MKL_INT* n, MKL_Complex16* a,
const MKL_INT* lda, MKL_INT* ipiv, MKL_INT* info ) NOTHROW;
and this is the type MKL_Complex16 in mkl_types.hpp:
Here are the problems I ran into:
Though finding this file was a bit tricky. Then
ninja build-givaro build-fflas-ffpack
detected MKL fine as well, and this was reported by cmake:I got around this by adding
#ifndef _MKL_LAPACK_H_
around theextern "C"
section of ourlapack.hpp
. It seems to me like we should be including this section from somewhere, why is it here?For reference, this is the declaration of
zgetrf_
in lapack.hpp vs mkl_lapack.hpp:and this is the type
MKL_Complex16
in mkl_types.hpp:This feels very sketchy, but I got around this by pre-declaring the type in
engine-includes.hpp
:Putting this in
lapack.hpp
didn't work, and I'm not sure where makes more sense.The text was updated successfully, but these errors were encountered: