Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Pramod_V_
Beginner
43 Views

compiler doesn't recongnize mkl_set_exit_handler.

Hi, I installed the Intel MKL v11.1 update 4 and I am trying to use mkl_set_exit_handler to capture the system errors (#136) we have been seeing lately on our Fortran applications. The compiler doesn't seem to recognize this subroutine as I keep getting the unresolved external symbol error. Do I need any use statements for to call this mkl subroutine? I attached my test project for your reference. It is the same as the one in the manual. Thanks, Pramod
0 Kudos
3 Replies
mecej4
Black Belt
43 Views

When you use external subprograms without providing interfaces, you are probably operating in "separate compilation" mode unless you tell the compiler to do cross-routine checking. Likewise, the MKL (or any such external library) is not going to be searched for missing routines unless you so order the compiler. 

The mere fact of having installing MKL does not cause the MKL libraries to be added by default to a new project. You have to select one of the options in the IDE to make the search happen.

For your toy example, ifort /Qmkl Console1.f90 MyExit.f90 will produce an executable file at the command line. Note the /Qmkl option (on Linux, it is -mkl).

Pramod_V_
Beginner
43 Views

I realize that I need to turn on the MKL compiler switch, but it still doesn't recognize this function. I also added the interface for the myexit, but doesn't help.

It seems mkl_set_exit_handler is one of the recently released with 11.1 update 4. 

mecej4
Black Belt
43 Views

In your project properties pop-up window, set Configuration Properties->Fortran->Libraries->Use Intel Math Kernel Library to one of the options provided (e.g., Sequential). In your present configuration, that line is blank, so MKL libraries are not searched.

Reply