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

VML Mathematical Functions

cr362
Beginner
493 Views
Dear all,

First, I'm sorry for the trivial question, but I don't have a clue about using MKL and the documention I've found on google just confuses me!

I have a piece of code that runs fine, but I now want to add in VML functions e.g. exp, cos, sine etc. I'm using a HPC facility that has MKL installed. I've included 'mkl_vml.f77', but if I then call a VML function e.g. CALL vsexp(n,a,y) I get an error saying that the function call is not recognized. What else do I need to do to get VML to work? Do I need to link libraries when I compile my code? And if so, which libraries do I need?

Also, if I include 'mkl_vml.f77', my code compiles fine. But, if instead I include 'mkl_vml.fi', then at compile I get the error:



/usr/local/Cluster-Apps/intel/mkl/10.1.1.019/include/mkl_vml.fi(103): error #5082: Syntax error, found IDENTIFIER 'IOR' when expecting one of:
& IOR(VML_ERRMODE_CALLBACK,VML_ERRMODE_EXCEPT)))
-----------------^
/usr/local/Cluster-Apps/intel/mkl/10.1.1.019/include/mkl_vml.fi(102): error #6200: A colon (:) is not valid in this context.
PARAMETER (VML_ERRMODE_DEFAULT = IOR(VML_ERRMODE_ERRNO, &
^
/usr/local/Cluster-Apps/intel/mkl/10.1.1.019/include/mkl_vml.fi(102): error #6363: The intrinsic data types of the arguments must be the same. [IOR]
PARAMETER (VML_ERRMODE_DEFAULT = IOR(VML_ERRMODE_ERRNO, &
----------------------------------------^
: catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.



Does anyone know why this error occurs?

Thanks for your help!
0 Kudos
3 Replies
TimP
Honored Contributor III
493 Views
Compilers specifically mentioned in the vml examples directory as intended to work with VML .fi files include ifort, pgf90, gfortran. The .fi files mention specifically the requirement for an f90 compiler, and you will see further non-portable assumptions there (at least in the non-portable KIND usage). g77 is specifically mentioned as not working with MKL, in view of its inability to accept source line formats such as you mention, besides its different defaults for linker names of functions. So, I wonder if you may be using some past compiler such as g77 or f2c, where only the .f77 include files could work.
The only Fortran compiler which comes with awareness of MKL library link paths is ifort, and even there you must specify a group of libraries, such as mentioned in the link advisor in the right hand column at the top of the forum, in the notes which come with MKL, and in the vml examples makefiles.
0 Kudos
ArturGuzik
Valued Contributor I
493 Views
Hi,

message text suggests it is Intel compiler, doesn't it? Internal error means a bug in compiler. I believe you should file bug report.

A.
0 Kudos
Gennady_F_Intel
Moderator
493 Views
Quoting - cr362
Dear all,

First, I'm sorry for the trivial question, but I don't have a clue about using MKL and the documention I've found on google just confuses me!

I have a piece of code that runs fine, but I now want to add in VML functions e.g. exp, cos, sine etc. I'm using a HPC facility that has MKL installed. I've included 'mkl_vml.f77', but if I then call a VML function e.g. CALL vsexp(n,a,y) I get an error saying that the function call is not recognized. What else do I need to do to get VML to work? Do I need to link libraries when I compile my code? And if so, which libraries do I need?

Also, if I include 'mkl_vml.f77', my code compiles fine. But, if instead I include 'mkl_vml.fi', then at compile I get the error:



/usr/local/Cluster-Apps/intel/mkl/10.1.1.019/include/mkl_vml.fi(103): error #5082: Syntax error, found IDENTIFIER 'IOR' when expecting one of:
& IOR(VML_ERRMODE_CALLBACK,VML_ERRMODE_EXCEPT)))
-----------------^
/usr/local/Cluster-Apps/intel/mkl/10.1.1.019/include/mkl_vml.fi(102): error #6200: A colon (:) is not valid in this context.
PARAMETER (VML_ERRMODE_DEFAULT = IOR(VML_ERRMODE_ERRNO, &
^
/usr/local/Cluster-Apps/intel/mkl/10.1.1.019/include/mkl_vml.fi(102): error #6363: The intrinsic data types of the arguments must be the same. [IOR]
PARAMETER (VML_ERRMODE_DEFAULT = IOR(VML_ERRMODE_ERRNO, &
----------------------------------------^
: catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.



Does anyone know why this error occurs?

Thanks for your help!

Cr362,
Compiler's problem? You know, MKL package contains the VML examples ( for Fortran and C compilers).
See examplesvmlfvsexp.f
One of this example is vsexp.f contains

include "mkl_vml.fi"
.....................
.....................

call VSEXP(VEC_LEN,sA,sB1)

So, I used Intel Visual Fortran Compiler version 10.1. ( Intel Visual Fortran Compiler for applications running on IA-32, Version 10.1Build 20080801 Package ID: w_fc_p_10.1.025 )

So, I was able to built these example.
--Gennady

0 Kudos
Reply