Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error implementing openblas.LAPACKE #1148

Closed
hewitta opened this issue Feb 15, 2022 · 8 comments
Closed

Error implementing openblas.LAPACKE #1148

hewitta opened this issue Feb 15, 2022 · 8 comments

Comments

@hewitta
Copy link

hewitta commented Feb 15, 2022

I am receiving an error:
java.lang.UnsatisfiedLinkError: No implementation found for int org.bytedeco.openblas.global.openblas.LAPACKE_dpotrf(int, byte, int, java.nio.DoubleBuffer, int) (tried Java_org_bytedeco_openblas_global_openblas_LAPACKE_1dpotrf and Java_org_bytedeco_openblas_global_openblas_LAPACKE_1dpotrf__IBILjava_nio_DoubleBuffer_2I)
at org.bytedeco.openblas.global.openblas.LAPACKE_dpotrf(Native Method)
at smile.math.blas.openblas.OpenBLAS.potrf(OpenBLAS.java:849)

but in openblas.class from v. 0.3.10-1.5.4, line 17447 I have:
public static native int LAPACKE_dpotrf(int var0, @cast({"char"}) byte var1, int var2, DoubleBuffer var3, int var4);

This should be the method called, correct? Any recommendations on why this error is occurring and how I might fix it?

@saudet
Copy link
Member

saudet commented Feb 15, 2022

Please try again with version 0.3.19-1.5.7

@hewitta
Copy link
Author

hewitta commented Feb 15, 2022

Resulted in same error:
java.lang.UnsatisfiedLinkError: No implementation found for int org.bytedeco.openblas.global.openblas.LAPACKE_dpotrf(int, byte, int, java.nio.DoubleBuffer, int)

In this case I think the method that should have been called is on line 17448:
public static native int LAPACKE_dpotrf(int var0, @cast({"char"}) byte var1, int var2, DoubleBuffer var3, int var4);

@saudet
Copy link
Member

saudet commented Feb 15, 2022

Please set the "org.bytedeco.javacpp.logger.debug" system property to "true" to get more messages on the console.

@hewitta
Copy link
Author

hewitta commented Feb 15, 2022

The log prior to the error reads:

2022-02-15 11:24:06.783 W/System.err: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2022-02-15 11:24:06.783 W/System.err: SLF4J: Defaulting to no-operation (NOP) logger implementation
2022-02-15 11:24:06.783 W/System.err: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2022-02-15 11:24:07.274 W/System.err: Debug: Loading class org.bytedeco.javacpp.presets.javacpp
2022-02-15 11:24:07.274 W/System.err: Debug: Loading class org.bytedeco.javacpp.Loader
2022-02-15 11:24:07.279 W/System.err: Debug: Loading library jnijavacpp
2022-02-15 11:24:07.282 E/linker: normalize_path - invalid input: "lib/", the input path should be absolute
2022-02-15 11:24:07.282 W/linker: Warning: unable to normalize "lib/" (ignoring)
2022-02-15 11:24:07.282 E/linker: normalize_path - invalid input: "lib/", the input path should be absolute
2022-02-15 11:24:07.283 W/linker: Warning: unable to normalize "lib/" (ignoring)
2022-02-15 11:24:07.290 W/System.err: Debug: Loading class org.bytedeco.javacpp.presets.javacpp
2022-02-15 11:24:07.291 W/System.err: Debug: Loading class org.bytedeco.javacpp.Pointer
2022-02-15 11:24:07.294 W/System.err: Warning: Version of org.bytedeco:openblas could not be found.
2022-02-15 11:24:07.304 W/System.err: Debug: Loading class org.bytedeco.javacpp.presets.javacpp
2022-02-15 11:24:07.304 W/System.err: Debug: Loading class org.bytedeco.openblas.global.openblas_nolapack
2022-02-15 11:24:07.317 W/System.err: Debug: Loading class org.bytedeco.javacpp.presets.javacpp
2022-02-15 11:24:07.317 W/System.err: Debug: Loading class org.bytedeco.openblas.global.openblas_nolapack
2022-02-15 11:24:07.324 W/System.err: Debug: Loading library
2022-02-15 11:24:07.325 W/System.err: Debug: Failed to load for : java.lang.UnsatisfiedLinkError: dlopen failed: library "lib.so" not found
2022-02-15 11:24:07.338 W/System.err: Debug: Loading library openblas
2022-02-15 11:24:07.365 W/System.err: Debug: Loading library jniopenblas_nolapack
2022-02-15 11:24:07.384 E/linker: normalize_path - invalid input: "lib/", the input path should be absolute
2022-02-15 11:24:07.384 W/linker: Warning: unable to normalize "lib/" (ignoring)
2022-02-15 11:24:07.384 E/linker: normalize_path - invalid input: "lib/", the input path should be absolute
2022-02-15 11:24:07.384 W/linker: Warning: unable to normalize "lib/" (ignoring)
2022-02-15 11:24:07.421 W/System.err: Debug: Loading class org.bytedeco.openblas.global.openblas
2022-02-15 11:24:07.427 W/System.err: Debug: Loading library jniopenblas
2022-02-15 11:24:07.431 E/linker: normalize_path - invalid input: "lib/", the input path should be absolute
2022-02-15 11:24:07.431 W/linker: Warning: unable to normalize "lib/" (ignoring)
2022-02-15 11:24:07.431 E/linker: normalize_path - invalid input: "lib/", the input path should be absolute
2022-02-15 11:24:07.431 W/linker: Warning: unable to normalize "lib/" (ignoring)

@saudet
Copy link
Member

saudet commented Feb 15, 2022

You're on Android, that doesn't have a Fortran compiler, see pull #405.

@saudet
Copy link
Member

saudet commented Apr 22, 2022

It looks like OpenBLAS no longer needs a Fortran compiler to build LAPACK, see pull OpenMathLib/OpenBLAS#3539.
Could you give that a try and open a pull request with the required changes?

@hewitta
Copy link
Author

hewitta commented Apr 28, 2022

Thank you for notifying, but I've already began working towards another solution for the code

@saudet
Copy link
Member

saudet commented Aug 11, 2022

FYI, I've upgraded the presets for OpenBLAS 0.3.21 (see commit 7d9084f), which no longer requires a Fortran compiler to build LAPACK, so it's now available for all platforms, including Android, iOS, and Mac on ARM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants