Skip to content

Conversation

@pan3793
Copy link

@pan3793 pan3793 commented Dec 15, 2025

This PR proposes to add the following 3 Java system properties as a switch so that the user can control whether ARPACK.getInstance(), BLAS.getInstance(), and LAPACK.getInstance() prefer to return the native implementation.

dev.ludovic.netlib.arpack.allowNative (default true)
dev.ludovic.netlib.blas.allowNative   (default true)
dev.ludovic.netlib.lapack.allowNative (default true)

Sometimes the shared cluster(e.g., Apache Hadoop YARN) host installs very old or bugly OpenBLAS/MKL libs, for Apache Spark jobs, it does not have a switch to disable using that for a single job. With this patch, it's able to pass those system properties so that the user can prefer using the Java implementation without touching the OS libs.


final class InstanceBuilder {

public static final String ALLOW_NATIVE_ARPACK = "dev.ludovic.netlib.arpack.allowNative";
Copy link
Author

Choose a reason for hiding this comment

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

after second thought, maybe it's better to define it at interface LAPACK instead of here, since it is kind of a public API, @luhenry what do you think?

@pan3793 pan3793 requested a review from luhenry December 17, 2025 07:05
@pan3793
Copy link
Author

pan3793 commented Dec 18, 2025

kindly ping @luhenry, could you please take another look?

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.

2 participants