Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Intel MKL 11.1 java example build issue

Wilson_F_
Beginner
947 Views

Hello,

I am trying to build Intel MKL 11.1 java example as discripted here (https://software.intel.com/en-us/articles/performance-tools-for-software-developers-how-do-i-use-intel-mkl-with-java).  I got the following error while running nmake.  I already have MKLROOT dir in PATH, not sure why I am getting this error, and which dependent libraries it's looking for.  Thanks in advance for your help!

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\......\JIntelMKL\bin\dll32_intel\mkl_java_stubs.dll: Can't find dependent libraries
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary1(Unknown Source)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at com.intel.mkl.CBLAS.<clinit>(CBLAS.java:77)
        at sgemm.main(sgemm.java:65)
NMAKE : fatal error U1077: 'java' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.EXE"' : return code '0x2'
Stop.

 

0 Kudos
4 Replies
mecej4
Honored Contributor III
947 Views

I tried to build the example with Intel C 14.0.2.176 by downloading the file dgemm-java-example.zip . The zip file does not contain a makefile, so I do not know what you used as input to Nmake. Here are the steps that I used to build and run the example:

javac CBLAS.java
javah CBLAS
icl /LD /Qmkl /Femkl_java_stubs.dll /I%JDKDIR%\include  CBLAS.c
javac dgemm.java
java dgemm

The output was the same as that given on the link that you posted.

0 Kudos
Wilson_F_
Beginner
947 Views

The Java examples I referring to is in intel-mkl-java-examples.zip.

These java examples used to be in default MKL package as in version 10.0, but now it's dropped from it (https://software.intel.com/en-us/articles/intel-mkl-111-release-notes).  I can't get it to build with version 11.1, maybe makefile needs update.  Your help is much appreciated.

 

0 Kudos
Gennady_F_Intel
Moderator
947 Views

ok,  we will check

0 Kudos
Wilson_F_
Beginner
947 Views

Hi,

Checking to see if you have any luck building java examples with makefile.  Please let me know.

Thanks,

Wilson

0 Kudos
Reply