-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Calculation of eigenvalues and eigenvectors for a double complex number Hermitian matrix.
Code shown below fails to compile using gcc15, because "fgsl_matrix_complex_init() has no intrinsic type".
Excerpt from code
integer(fgsl_size_t), parameter :: n = 3_fgsl_size_t integer(fgsl_int) :: status, i type(fgsl_matrix_complex) :: a, evec type(fgsl_vector) :: eval complex(fgsl_double_complex), target :: af(n, n), evecf(n, n) real(fgsl_double), target :: evalf(n) type(fgsl_eigen_hermv_workspace) :: w a = fgsl_matrix_complex_init(af) evec = fgsl_matrix_complex_init(evecf) eval = fgsl_vector_init(evalf) af = H ! copy input Hermitian matrix ( need to transpose first? ) w = fgsl_eigen_hermv_alloc(n) ! allocate workspace status = fgsl_eigen_hermv(a, eval, evec, w) status = fgsl_eigen_hermv_sort (eval, evec, FGSL_EIGEN_SORT_ABS_ASC)
When declaring fgsl_matrix_complex_init() as type(fgsl_matrix_complex), EXTERNAL as a temporary fix, the code compiles ok, but then the references to fgsl_matrix_complex_init and fgsl_matrix_complex_free are not resolved when linking (clang++, arm64, macOS 26.0.1).
Also, related question, does type(fgsl_matrix_complex) have type(fgsl_double_complex) components?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels