Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28996 Discussions

Problem concerning the conversion of Fortran code from CVF to IVF

nima2010
Beginner
1,028 Views
Hi,
Actually, I am having a problem converting the Fortran code, which I've written using CVF 6.6, to the IVF v11.1. After converting the program using Project->Extract Compaq visual Fortran Project Items, I had to modify some of the library functions to make the program compatible to run in IVF. But, still having an error. I can guess that the error is concerned with the library function "dgesv", which is used to find the solution of linear Algebraic equations. The error message is like this:

Error 1 error LNK2019: unresolved external symbol _?MKL@LAPACK?_dgesv referenced in function _DGESV mkl_s.lib(_dgesv.obj)
Error 2 fatal error LNK1120: 1 unresolved externals Debug/AMAIN1.exe

But, I couldn't find from anywhere else the alternative function for "dgesv" to use in IVF.
In this context, I would like to say that I am using MVS 2008 to run IVF.

I would be very much grateful if anybody of you would provide me the solution.

Thanking you in advance,
nima2010.
0 Kudos
8 Replies
Jugoslav_Dujic
Valued Contributor II
1,028 Views
DGESV is part of LAPACK, which is distributed as part of Intel Math Kernel Library along with IVF 11. Indeed, if you hit F1 you will get its documentation.

While reading at least the basic documentation of MKL is highly recommended, note that its layered model is tricky to get the list of librries right; Math Kernel Library Link Line Advisor can help you with that; (do not forget the notes therein!).

Note that "Extract Compaq visual Fortran Project Items" gives you the CVF (STDCALL) calling convention by default. While MKL supports that (see Note 1), I recommend switching to IVF standard convention (Project settings/Fortran/External Procedures/Calling Convention->Default).
0 Kudos
nima2010
Beginner
1,028 Views
DGESV is part of LAPACK, which is distributed as part of Intel Math Kernel Library along with IVF 11. Indeed, if you hit F1 you will get its documentation.

While reading at least the basic documentation of MKL is highly recommended, note that its layered model is tricky to get the list of librries right; Math Kernel Library Link Line Advisor can help you with that; (do not forget the notes therein!).

Note that "Extract Compaq visual Fortran Project Items" gives you the CVF (STDCALL) calling convention by default. While MKL supports that (see Note 1), I recommend switching to IVF standard convention (Project settings/Fortran/External Procedures/Calling Convention->Default).

Thank you very much, Mr. Dujic, for you suggestions. Following your advice enabled me to solve the compiling problem. but now I am facing another problem. Now, when I am running the program, I am receiving the following system error:
"The program can't start because mkl_lapack64.dll is missing from your computer. Try reinstalling the program to fix this problem."
I have already uninstalled and reinstalled the IVF, but the same error message is getting prompted when I am running the program. Would you please suggest anything on this matter? I am using Windows 7(64 bit) OS.
Sorry to bother you again.

Thanking you,
nima2010
0 Kudos
Steven_L_Intel1
Employee
1,028 Views
Right click on Computer, select Properties. Click Advanced System Settings, then Environment Variables. Under System Variables, scroll down until you find Path. Select it and click Edit.

Insert at the beginning of the line:

%IFORT_COMPILER11%\mkl\em64t\lib;

don't forget the semicolon. Click OK, OK.

I suggest logging out and then in again, and then running the program.
0 Kudos
nima2010
Beginner
1,028 Views
Right click on Computer, select Properties. Click Advanced System Settings, then Environment Variables. Under System Variables, scroll down until you find Path. Select it and click Edit.

Insert at the beginning of the line:

%IFORT_COMPILER11%\mkl\em64t\lib;

don't forget the semicolon. Click OK, OK.

I suggest logging out and then in again, and then running the program.

Thanks Mr. Lionel for your reply and good suggestions. Actually, I am still having the problem. I checked the /mkl/em64t/lib file, where there is no dynamic library file named mkl_lapack64.dll. So, is it the problem with my IVF? It would be very much helpful if you kindly make any suggestions in this respect.

Thanking you,

nima2010

0 Kudos
TimP
Honored Contributor III
1,028 Views
You got excellent advice 14 hours ago to use the link advisor. You haven't explained why you didn't heed that advice. The reasonable assumption was made that you are using the MKL which comes with the 11.1 compilers. Simply guessing at library names without making any decision about which options you are interested in wastes everyone's time.
0 Kudos
nima2010
Beginner
1,028 Views
Quoting tim18
You got excellent advice 14 hours ago to use the link advisor. You haven't explained why you didn't heed that advice. The reasonable assumption was made that you are using the MKL which comes with the 11.1 compilers. Simply guessing at library names without making any decision about which options you are interested in wastes everyone's time.

Thank you for your comments Mr. tim. In my 1st reply, I said that my compiling error was solved by implementing the suggestions made by Mr.Dujic. That means, I had followed all the instructions step by step. But in the 2nd reply, I mentioned about the problem that I was still facing even after the implementation of Mr. Dujic's suggestions. There came Mr.Lionel, who suggested to modify the Advanced system settings of 'my computer'. But even after doing so, I am still having the error message -
"The program can't start because mkl_lapack64.dll is missing from your computer. Try reinstalling the program to fix this problem."
That's why, I posed the question about "mkl_lapack64.dll" in my last email.
I know that you all are taking a good bit of time to provide me any solution. I do appreciate that. And that is why, I was quite convinced to ask you questions without hesitations or so.
Anyway, I would be very much pleased if anyone of you guys can help me in this respect.

Thanking you,
nima2010
0 Kudos
mecej4
Honored Contributor III
1,028 Views
The directory where the Intel compiler is located should be the value of the environment variable IFORT_COMPILER11. It is possible that this value is not properly set. If so, the value of the variable may be NULL, in which case

%IFORT_COMPILER11%\mkl\em64t\lib

evaluates to \mkl\em64t\lib, which is a non-existent directory on your system, as you have reported.

Make sure that IFORT_COMPILER11 is set to the path of your compiler installation in your environment. This is something that is simple to fix, but you may need the assistance of your system administrator, if you are unfamiliar with setting environment variables. Reinstalling Intel Fortran is a somewhat extreme and possibly ineffective cure for an incompletely diagnosed problem.
0 Kudos
Steven_L_Intel1
Employee
1,028 Views
Sorry - the DLLs are in the \bin folder, not \lib.
0 Kudos
Reply