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

getting started with VML

jpuig
Beginner
527 Views
Hi,

I just downloaded mkl 8.0.019 and I tried to create a simple program that would calculate tanh of a random matrix:

PROGRAM main
REAL, ALLOCATABLE, DIMENSION(:) :: a, b
INTEGER :: s

s=10000

ALLOCATE(a(s))
ALLOCATE(b(s))

a = 0
b = 0

CALL RANDOM_NUMBER(a)
CALL VDATANH( s, a, b)
END PROGRAM

/opt/intel/fc/9.0/bin/ifort -w90 -w95 -o nn -Vaxlib -static-libcxa -L/opt/intel/mkl/8.0/lib/32 -lmkl_blas95 -lmkl_lapack -lvml -lmkl_ia32 -lguide -lpthread -I/opt/intel/mkl/8.0/include/ tantest.f90

I get all sorts of fatal errors depending on what tweaks I make to the code. The particular one for the code shown is:

*** glibc detected *** free(): invalid next size (normal): 0x080ab350 ***
forrtl: error (76): IOT trap signal


Does anybody know what I am doing wrong?

Thanks
Joan
0 Kudos
2 Replies
Andrey_G_Intel2
Employee
527 Views
1) You forgot to include mkl_vml.fi header file into your program
2) For vd (double precision accuracy) functions REAL type should have lenght 8 (REAL*8)

If you correct these two mistakes your code will work fine! :-)
0 Kudos
jpuig
Beginner
527 Views
Thanks for the answer. It was the double precision thing that was getting me.


Joan
0 Kudos
Reply