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

Illegal Instruction when calling dgemv on Mac Pro

jpritchardcfa_harvar
519 Views
I'm trying to compile and run code with ifort linking MKL on a Mac Pro running Leopard. The code compiles fine, but when run it terminates with an "Illegal instruction" message when it calls dgemv. The same code compiles and runs without problem on my Macbook Pro running Tiger. I'm stumped.

Has anyone run into the same problem or know how to resolve it?

Cheers,
Jonathan
0 Kudos
3 Replies
Gennady_F_Intel
Moderator
519 Views

Jonathan,
what mkl version you are using? And what is your linking line?
--Gennady?

0 Kudos
jpritchardcfa_harvar
519 Views

Jonathan,
what mkl version you are using? And what is your linking line?
--Gennady?


I'm using MKL version 10.0.5 with ifort 10.1 (I tried with ifort 11.0 with the same results)

The relevant lines in my Makefile for the linking are below:

MKLLIB=/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t
MKLINC=/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/include

LAPACK = -L$(MKLLIB) -lmkl_lapack -lmkl_intel_lp64 -lmkl_core -lguide -lpthread
F90 = ifort
FFLAGS = -O2
INCS = -I. -I$(CFITSIO)/include -I$(MKLINC)
LIBS = -L. -L$(CFITSIO)/lib -lcfitsio $(LAPACK)

test: $(OBJS) test.o
$(F90) $(FFLAGS) $(INCS) -o $@ test.o $(OBJS) $(LIBS)

Thanks!
Jonathan


0 Kudos
TimP
Honored Contributor III
519 Views
LAPACK = -L$(MKLLIB) -lmkl_lapack -lmkl_intel_lp64 -lmkl_core -lguide -lpthread
F90 = ifort
FFLAGS = -O2
INCS = -I. -I$(CFITSIO)/include -I$(MKLINC)
LIBS = -L. -L$(CFITSIO)/lib -lcfitsio $(LAPACK)


I'd worry about this combination of libraries. Since you gave lp64, you must be using 64-bit OS and 64-bit integer data in your MKL calls, and there ought to be a recommendation for that combination in the docs.
I would be more comfortable with
LAPACK= -lmkl_intel_lp64 -lmkl_core -lmkl_thread
FFLAGS = -O2 -openmp
as you said you were using an ifort which should have its own MKL installation.
The most worrisome part is your attempt to link both 32-bit and 64-bit integer data support. You can't have it both ways.
0 Kudos
Reply