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

linking problem with mkl on Snow Leopard

irhooper2
Beginner
631 Views
I am trying to link a program using mkl with ifort on snow leopard to enable use of LAPACK routines in my code. I am using the following link flags:

-L$(MKLPATH) -I$(MKLINCLUDE) -I$(MKLINCLUDE)/em64t/lp64 -lmkl_lapack95_lp64 $(MKLPATH)/libmkl_intel_lp64.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a -liomp5 -lpthread

with the following:

MKLPATH = /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/em64t
MKLINCLUDE = /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/include/em64t/ilp64

a suggested from the MKL user manual (but removing the - wl,--start-group and -wl,--end group commands as they don't seem to work).

When compiling I get the following error:

ld: in /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/em64t/libmkl_core.a(dlamch.o), ObjectFileAddressSpace::mappedAddress(0xFFFFFFFFFFFFFFFC) not in any section

Can anybody help? I have seen on the sticky at the top of the forum page that there is an update of mkl for snow leopard but when I try to obtain this by clicking on my mkl license in registration centre I get the following message:

he product updates/upgrades below are available based on your support subscription status.

We are unable to find registrations/downloads matching this request


Thanks in advance,

Ian
0 Kudos
4 Replies
Ron_Green
Moderator
631 Views
Quoting - irhooper2
I am trying to link a program using mkl with ifort on snow leopard to enable use of LAPACK routines in my code. I am using the following link flags:

-L$(MKLPATH) -I$(MKLINCLUDE) -I$(MKLINCLUDE)/em64t/lp64 -lmkl_lapack95_lp64 $(MKLPATH)/libmkl_intel_lp64.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a -liomp5 -lpthread

with the following:

MKLPATH = /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/em64t
MKLINCLUDE = /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/include/em64t/ilp64

a suggested from the MKL user manual (but removing the - wl,--start-group and -wl,--end group commands as they don't seem to work).

When compiling I get the following error:

ld: in /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/em64t/libmkl_core.a(dlamch.o), ObjectFileAddressSpace::mappedAddress(0xFFFFFFFFFFFFFFFC) not in any section

Can anybody help? I have seen on the sticky at the top of the forum page that there is an update of mkl for snow leopard but when I try to obtain this by clicking on my mkl license in registration centre I get the following message:

he product updates/upgrades below are available based on your support subscription status.

We are unable to find registrations/downloads matching this request


Thanks in advance,

Ian

Ian,

I am transferring your issue over to the MKL User Forum.

ron
0 Kudos
Gennady_F_Intel
Moderator
631 Views
Quoting - irhooper2
I am trying to link a program using mkl with ifort on snow leopard to enable use of LAPACK routines in my code. I am using the following link flags:

-L$(MKLPATH) -I$(MKLINCLUDE) -I$(MKLINCLUDE)/em64t/lp64 -lmkl_lapack95_lp64 $(MKLPATH)/libmkl_intel_lp64.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a $(MKLPATH)/libmkl_intel_thread.a $(MKLPATH)/libmkl_core.a -liomp5 -lpthread

with the following:

MKLPATH = /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/em64t
MKLINCLUDE = /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/include/em64t/ilp64

a suggested from the MKL user manual (but removing the - wl,--start-group and -wl,--end group commands as they don't seem to work).

When compiling I get the following error:

ld: in /Developer/opt/intel/Compiler/11.1/067/Frameworks/mkl/lib/em64t/libmkl_core.a(dlamch.o), ObjectFileAddressSpace::mappedAddress(0xFFFFFFFFFFFFFFFC) not in any section

Can anybody help? I have seen on the sticky at the top of the forum page that there is an update of mkl for snow leopard but when I try to obtain this by clicking on my mkl license in registration centre I get the following message:

he product updates/upgrades below are available based on your support subscription status.

We are unable to find registrations/downloads matching this request


Thanks in advance,

Ian

Ian, this is well-known problem with static linking on SnowLeo.
Please refer to the link : http://software.intel.com/en-us/articles/linking-error-on-macosx-106-with-xcode-32/
--Gennady
0 Kudos
irhooper2
Beginner
631 Views

Ian, this is well-known problem with static linking on SnoLeo.
Please refer to the link : http://software.intel.com/en-us/articles/linking-error-on-macosx-106-with-xcode-32/
--Gennady

Gennady, thanks for your quick reply. I have a couple of problems with the information on the suggested page:

1) I'm not using xcode at all, I'm compiling from command line with my own Makefile so should I still be experiencing this problem?

2) Using 10.5 isn't an option

3) Using dynamic linking causes all sorts of other problems. After setting the DYLD_LIBRARY_PATH environment variables and writing my Makefile to use the dynamic libraries I get a dyld library not loaded error. Clearly I'm doing something wrong but I'll be damned if I can figure it out.

I guess my only other option at the moment is to learn how to use xcode and use dynamic libraries unless you have any other suggestions?

Ian


0 Kudos
Artem_V_Intel
Employee
631 Views
Quoting - irhooper2

Ian, this is well-known problem with static linking on SnoLeo.
Please refer to the link : http://software.intel.com/en-us/articles/linking-error-on-macosx-106-with-xcode-32/
--Gennady

Gennady, thanks for your quick reply. I have a couple of problems with the information on the suggested page:

1) I'm not using xcode at all, I'm compiling from command line with my own Makefile so should I still be experiencing this problem?

2) Using 10.5 isn't an option

3) Using dynamic linking causes all sorts of other problems. After setting the DYLD_LIBRARY_PATH environment variables and writing my Makefile to use the dynamic libraries I get a dyld library not loaded error. Clearly I'm doing something wrong but I'll be damned if I can figure it out.

I guess my only other option at the moment is to learn how to use xcode and use dynamic libraries unless you have any other suggestions?

Ian



Hello Ian,

Please take a look at the attached simple example of dynamic linking against MKL.

This is an example of using LAPACK dgetrf function from the MKL examples. To unpack this archive please invoke the next command

tar xjvf dynamic-linkage.tar.bz2

After that do the following:
cd ./dynamic-linkage
make
cat dgetrfx.d | ./test

The output should be like this:
DGETRF Example Program Results

Details of factorization
1 2 3 4
1 5.2500 -2.9500 -0.9500 -3.8000
2 0.3429 3.8914 2.3757 0.4129
3 0.3010 -0.4631 -1.5139 0.2948
4 -0.2114 -0.3299 0.0047 0.1314

IPIV
2 2 3 4

Also Link Line Advisor tool may be very hepful for you.

Thanks,
Art

0 Kudos
Reply