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

Intel MKL and g77 fortran compiler!

neno505
Beginner
913 Views
Hello!


I have a problem with Intel MKL! I never worked with MKL and am trying to run a fortran program .for in command prompt using Intel MKL, how do I do that! I have installed my MKL 10.3 in C:\\Program Files\\Intel\\ComposerXE-2011\\mkl... and g77 fortran compiler in c:/f. (g77 has all it's programs in folder York, and from tere we compile them in cmd)
Program I need to run is ddot_1.for - Link: http://lavica.fesb.hr/VPR/vektorske_operacije/
I used ddot.for and ddot_1.for to run them in g77 and it worked fine (cmd: g77 ddot_1.for ddot.for), but how do I, in command prompt, link ddot_1.for with MKL to run it. What command do I tipe in cmd?

It should start like g77 ddot_1.for... and then I must somehow enter a library path...
My friend did this in linux but he dosen't know how to do it in XP!


My computer:
- Intel Pentium 4 CPU 3.00GHz
- Microsoft Windows XP Professional 5.1
- 80GB, 512RAM ...


Thank you very much for your help!
0 Kudos
5 Replies
Aubrey_W_
New Contributor I
913 Views
Hello,

I'll move this thread to the Intel Math Kernel Library forum, where one of our Technical Consulting Engineers can answer it.

Best regards.

==
Aubrey W.
Intel Software Network Support
0 Kudos
Gennady_F_Intel
Moderator
913 Views
You have to set all required MKL's environment variables up ( \tools\environment\mklvars32.bat).Then I'd recommend you first to start with building BLAS examples ( see \examples\blas dir).
please read help into makefile how to build these examples by the right way.
If any linking question, please refer to theLinker Adviser.
asan additional info you can read "Using Intel MKL Code Examples" from MKL User's guide.
--Gennady
0 Kudos
mecej4
Honored Contributor III
913 Views
Use the Intel link line advisor and note that in making the choices for your framework, you may use gfortran in place of g77. On my Linux X64 system, the command I used was

[bash]g77 ddot1.f -L/opt/IFC11/mkl/lib/em64t -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread
[/bash]
and running the program gave the result
[bash] ddot_1: vrijeme =   1.21881402, Mflops =   1640.93933
[/bash]

0 Kudos
neno505
Beginner
913 Views
I tried this but I think it dosen't recognize my path which is in C:\Program Files\Intel\ComposerXE-2011\mkl\lib\intel64 .

Does -L/... work in command prompt in XP pro? I know it works in linux.

In the link line advisor I get mkl_intel_ilp64.lib mkl_sequential.lib mkl_core.lib, so the command should be something like:

g77 ddot1.f "PATH" mkl_intel_ilp64.lib mkl_sequential.lib mkl_core.lib

but I don't know how to enter the path to my library.

Thank you very much for your time!
0 Kudos
mecej4
Honored Contributor III
913 Views
Under Windows, g77 is probably set up to run in a Cygwin or Mingw environment. If the former, it is best to run you commands inside a bash shell, in which case the Linux/Unix style commands work without change. If you are using a Windows command window, you have to specify the paths using the WIndows/MSDOS style path strings.

MKL libraries are specific to a target compiler. On Windows, the Fortran compiler most commonly used with MKL is the Intel Fortran compiler. To make another Fortran compiler, such as g77, work with MKL will require substantial work. If this preparation has not been done and the MKL that you have has not been prepared to work with g77, there will be major impediments. If you are running the ddot example for a course assignment, consult your instructor regarding MKL/g77 compatibility issues.
0 Kudos
Reply