Skip to content

Conversation

@bastonero
Copy link
Contributor

Currently, the libraries for linear algebra are hard coded and
constrained. This makes the installation to fail in several
environments, even when available BLAS/LAPACK libraries
are present. This happens frequently with MKL. Since the
interface of these routines is always the same, it is worth it
to have a dynamical detection of the library, which is done
through numpy directly.

Currently, the libraries for linear algebra are hard coded and
constrained. This makes the installation to fail in several
environments, even when available BLAS/LAPACK libraries
are present. This happens frequently with MKL. Since the
interface of these routines is always the same, it is worth it
to have a dynamical detection of the library, which is done
through numpy directly.
@diegomartinez2
Copy link
Collaborator

Hasn't numpy.distutils been deprecated since NumPy 1.23.0? How this will work in the future?

@bastonero
Copy link
Contributor Author

bastonero commented Jul 17, 2025

I honestly don't know from which version, but isn't the entire compilation still using numpy.disutils anyway?

Edit: of course this is more of a patch than a long-time solution (that can also support newer versions of numpy/python).

@diegomartinez2
Copy link
Collaborator

Yes I remember discussing the fact that the code was getting problems with the new numpy libraries. I quick-fixed some of those problems so it will work for now, but unless we check all those things the code is going to get too "old" for the new numpy libraries and eventually not get the improvements that comes from new numpy versions.

Just my grain of salt. For now this is OK.

@bastonero
Copy link
Contributor Author

I totally agree. Again, this is just a little patch for the time being. Probably it will be good to have e.g. a cmake compilation or some of these more refined workflows for compilation.

@diegomartinez2
Copy link
Collaborator

Due to the fact that we use FORTRAN, using Meson will fix this. Some scientific computational projects are migrating to Meson, but I don't know Meson enough for this.

@mesonepigreco
Copy link
Collaborator

Hi @bastonero , is this also needed for cellconstructor? I see it passes the testsuite, so I guess we can merge.

@bastonero
Copy link
Contributor Author

Hi @mesonepigreco, yes, I also opened a PR over there.

@mesonepigreco mesonepigreco self-requested a review July 19, 2025 08:35
@mesonepigreco mesonepigreco self-assigned this Jul 19, 2025
@mesonepigreco mesonepigreco added this to the 1.5 milestone Jul 19, 2025
Copy link
Collaborator

@mesonepigreco mesonepigreco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The edit seems very good as it generalizes the lapack detection

@mesonepigreco mesonepigreco merged commit c654b94 into SSCHAcode:master Jul 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants