- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a fortran program using the module mkl95_lapack.
My script for cstatic compilation is according with the information that I found in the intel documentation
-----------------------------------
#!/bin/bash
OPT="-c -O -w -vec-report0"
INC="-I$MKLROOT/include/ia32"
LIB="-L$MKLROOT/lib/ia32"
LIBOPT="-lmkl_lapack95 -Wl,--start-group $LIB/libmkl_intel.a $LIB/libmkl_sequential.a $LIB/libmkl_core.a -Wl,--end-group -lpthread"
ifort -c resolvedor.f90 -I/opt/intel/include/ia32 $INC
ifort -o lcicres resolvedor.o $LIBOPT
------------------------------------------------------
The compilation was ok because I have the object file but the link procedure fails and I have the next messages:
/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/ia32/libmkl_lapack95.a(cgetrf.o): In function `cgetrf_f95_':
../../../../interfaces/lapack95/source/cgetrf.f90:(.text+0x2ac): undefined reference to `cgetrf_'
../../../../interfaces/lapack95/source/cgetrf.f90:(.text+0x47f): undefined reference to `xerbla_'
/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/ia32/libmkl_lapack95.a(cgetrs1.o): In function `cgetrs1_f95_':
../../../../interfaces/lapack95/source/cgetrs1.f90:(.text+0x2a2): undefined reference to `cgetrs_'
../../../../interfaces/lapack95/source/cgetrs1.f90:(.text+0x345): undefined reference to `xerbla_'
/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/ia32/libmkl_lapack95.a(sgetrf.o): In function `sgetrf_f95_':
../../../../interfaces/lapack95/source/sgetrf.f90:(.text+0x29d): undefined reference to `sgetrf_'
../../../../interfaces/lapack95/source/sgetrf.f90:(.text+0x46a): undefined reference to `xerbla_'
/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/ia32/libmkl_lapack95.a(sgetrs1.o): In function `sgetrs1_f95_':
../../../../interfaces/lapack95/source/sgetrs1.f90:(.text+0x2d2): undefined reference to `sgetrs_'
../../../../interfaces/lapack95/source/sgetrs1.f90:(.text+0x404): undefined reference to `xerbla_'
Can anyone help me to resolve this problem?
Javier
My script for cstatic compilation is according with the information that I found in the intel documentation
-----------------------------------
#!/bin/bash
OPT="-c -O -w -vec-report0"
INC="-I$MKLROOT/include/ia32"
LIB="-L$MKLROOT/lib/ia32"
LIBOPT="-lmkl_lapack95 -Wl,--start-group $LIB/libmkl_intel.a $LIB/libmkl_sequential.a $LIB/libmkl_core.a -Wl,--end-group -lpthread"
ifort -c resolvedor.f90 -I/opt/intel/include/ia32 $INC
ifort -o lcicres resolvedor.o $LIBOPT
------------------------------------------------------
The compilation was ok because I have the object file but the link procedure fails and I have the next messages:
/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/ia32/libmkl_lapack95.a(cgetrf.o): In function `cgetrf_f95_':
../../../../interfaces/lapack95/source/cgetrf.f90:(.text+0x2ac): undefined reference to `cgetrf_'
../../../../interfaces/lapack95/source/cgetrf.f90:(.text+0x47f): undefined reference to `xerbla_'
/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/ia32/libmkl_lapack95.a(cgetrs1.o): In function `cgetrs1_f95_':
../../../../interfaces/lapack95/source/cgetrs1.f90:(.text+0x2a2): undefined reference to `cgetrs_'
../../../../interfaces/lapack95/source/cgetrs1.f90:(.text+0x345): undefined reference to `xerbla_'
/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/ia32/libmkl_lapack95.a(sgetrf.o): In function `sgetrf_f95_':
../../../../interfaces/lapack95/source/sgetrf.f90:(.text+0x29d): undefined reference to `sgetrf_'
../../../../interfaces/lapack95/source/sgetrf.f90:(.text+0x46a): undefined reference to `xerbla_'
/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/ia32/libmkl_lapack95.a(sgetrs1.o): In function `sgetrs1_f95_':
../../../../interfaces/lapack95/source/sgetrs1.f90:(.text+0x2d2): undefined reference to `sgetrs_'
../../../../interfaces/lapack95/source/sgetrs1.f90:(.text+0x404): undefined reference to `xerbla_'
Can anyone help me to resolve this problem?
Javier
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, here is the problem:
In the definition line
LIB="-L$MKLROOT/lib/ia32"
the -L is the culprit. What it does is to tell the linker where to look for libraries, rather than specifying which libraries to link, which is what you want to do. The net effect of this error is to give a list of file paths rather than directory paths as places to search, and no extra libraries to be included in the link.
Simply change that line to
LIB="$MKLROOT/lib/ia32"
In the definition line
LIB="-L$MKLROOT/lib/ia32"
the -L is the culprit. What it does is to tell the linker where to look for libraries, rather than specifying which libraries to link, which is what you want to do. The net effect of this error is to give a list of file paths rather than directory paths as places to search, and no extra libraries to be included in the link.
Simply change that line to
LIB="$MKLROOT/lib/ia32"
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The distribution of routines among the various component libraries in MKL has varied from one version to another. Which version of MKL did you use? Did you obtain the Lapack95 library from Intel? Precompiled?
Instead of specifying the MKL libraries explicitly, you could try the -mkl compiler option (you would still need to specify libmkl_lapack95.a explicitly).
Instead of specifying the MKL libraries explicitly, you could try the -mkl compiler option (you would still need to specify libmkl_lapack95.a explicitly).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the last 10.3.
The options are takem from the link intel MKL advisor....
Javier
The options are takem from the link intel MKL advisor....
Javier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does you MKLROOT setting expand so as to match the actual path of your MKL installation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MKLROOT is
/opt/intel/composer_xe_2011_sp1.7.256/mkl
/opt/intel/composer_xe_2011_sp1.7.256/mkl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, here is the problem:
In the definition line
LIB="-L$MKLROOT/lib/ia32"
the -L is the culprit. What it does is to tell the linker where to look for libraries, rather than specifying which libraries to link, which is what you want to do. The net effect of this error is to give a list of file paths rather than directory paths as places to search, and no extra libraries to be included in the link.
Simply change that line to
LIB="$MKLROOT/lib/ia32"
In the definition line
LIB="-L$MKLROOT/lib/ia32"
the -L is the culprit. What it does is to tell the linker where to look for libraries, rather than specifying which libraries to link, which is what you want to do. The net effect of this error is to give a list of file paths rather than directory paths as places to search, and no extra libraries to be included in the link.
Simply change that line to
LIB="$MKLROOT/lib/ia32"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!
Now works fine!
Thanks for all!
Javier
Now works fine!
Thanks for all!
Javier

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