I have a f90 code where dgemm, dgemv and dgesvd functions are used. I don't have these function currently loaded and when I compile I get errors since these functions are not found by the compiler.
My question is: how do I can import these functions?
Thanks for the support
All the BLAS and Lapack routines (and many more that are not in BLAS or Lapack) are included in the MKL library, which you can choose to install at the time that you installed the Intel compiler, or later (by modifying the Parallel Studio installation).
For simple cases of using MKL, simply use the /Qmkl compiler switch to the compilation command line, or specify in your VS project properties that the MKL libraries are to be used by the linker.
Dear all, thanks for the quick replies.
I modified the VS project properties (Fortran/Libraries/Use MKL) and now the code compiles.
Unfortunately it doesn't run yet. I believe there is still something related to the use of MKL routines. I checked the installation of Intel that I did some time ago and it seems that MKL were installed. Are there any way to check that?
Di Marco, Nicola wrote:
Unfortunately it doesn't run yet. I believe there is still something related to the use of MKL routines.
What do you mean by "it doesn't run yet"? Describe how you attempted to run the program, report any error messages and other pertinent observations.
After setting the VS properties enabling the use of MKL routines I ran the code in Debug mode.
The Debug started correctly but during the allocation of the array "U" it stopped, given the following alert: undefined pointer/array.
Then if try to move on anyway I got this: wntdll.pdb not loaded
The code is the following:
real, allocatable, dimension(:,:) :: U
call dgemm('n','t', nrobs, nrobs, nrens, 1.0, S, nrobs,S, nrobs,float(nrens), R, nrobs)
So, the array "U" is declared before its allocation. I've checked the value of nrobs and it is correct.
The strange thing is that if I put the allocation of U before calling dgemm it works.
So that's why I believe it is happening something when I call dgemm.
Thanks for the support,
That description is incomplete and far from coherent. There is not enough information there to enable me provide you with much help.
If the call to DGEMM was not made with correct arguments (allocated, of the proper shapes, and defined), it is not worthwhile to try to investigate subsequent errors. The call to DGEMM, and the code shown that comes before that call, does not involve U. Examine the contents of R after the call to DGEMM has been completed and control has returned to your code.
If the values of nrobs and nrens are large, first run with much smaller values so that it becomes possible to check (by hand calculations, if feasible) that the call to DGEMM was made correctly and the returned R is correct.
The "missing PDB" messages are of no concern except for experts who are debugging Windows itself.
Everything is fine if I comment DGEMM, I think I'm missing something in the arguments of the function from a mathematical point of view.
I will go through it.