- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a section of Fortran code that calls dsygv to solve a symmetric generalized eigenvalue problem. My code works fine under gfortran, and I have compiled it under the 32-bit version of the Intel Fortran compiler. When I compile it with the 64-bit libraries, I get an error. Here is my linker line:
ifort -openmp -parallel -o energy Energy.o -lmkl_intel_thread -lmkl_lapack -lmkl_core -lmkl_intel_ilp64 -lmkl_sequential -L/opt/intel/mkl/10.2.0.013/lib/em64t
The call to dsygv is
call dsygv(1, 'N', 'L', NumUsed+1, PhiHPhi8, NumTerms, PhiPhi8, NumTerms, Energies, Workspace, 3*NumTerms, Info)
And the error that it gives me is
MKL ERROR: Parameter 1 was incorrect on entry to DSYGV
According to all of the documentation that I have found, including the Intel MKL reference manual, the first parameter, itype, is 1, 2 or 3, based on the system being solved. Since this has worked fine until now, I'm really not sure what the problem is.
Thanks in advance for any help.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi physics314,
Try to use lp64 version:-lmkl_intel_lp64 instead of -lmkl_intel_ilp64.
Or add -i8 compiler option.
Thanks,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
adding to Vladimir's post. The reason you receive error is that you selected ilp64 interface (see your linking line). ILP64 libraries use the 64-bit integer type (necessary for indexing huge arrays). The default for your compiler is probably 32-bit integers, so that's why they conflict. The LP64 libraries index arrays with the 32-bit integer type, and that's why Vladimir's suggestion probably will solve the problem (of linking).
You have couple of scenarios to use:
(1) follow Vladimir's suggestion to replace lib interface
(2) follow Vladimir's suggestion to change your default for compiler (for x64 architecture)
(3) make local integer*8 variable and pass it. This however, will make the code not "architecture blind". To resolve this you can also try compiler directives, though.
A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page