Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29234 Discussions

illegal instruction with ifort and mkl 10.1.012 under openmp

braver
Beginner
1,350 Views
Greetings -- I'm compiling the same Fortran code with or without OpenMP on my Mac OSX Core Duo MacBook with 32-bit prescott CPU. Works fine without -openmp. When I try to exploit OpenMP, which the application allows, here's what happens:

zsh: illegal hardware instruction ./example.DARWIN_ICC_IA32.x < netflix-double-rra.in

-- now I make sure I use ifort as

IFORT=/opt/intel/fc/10.1.012/bin/ifort

and other options are

# Compiler flags
OPENMP = -openmp
OPTIMIZE = -O3 -ipo $(CPUOPT)
FFLAGS = -w95 -cm -assume buffered_io -vec_report0 $(OPTIMIZE) $(OPENMP)

-- where CPUOPT is not specified for ifort, I use -march-prescott for gfortran. (Which architecture could I use for the 32-bit Core Duo with ifort?)

My MKL is used as follows:

BLAS = -L/Library/Frameworks/Intel_MKL.framework/Libraries/32 -lmkl_intel -lmkl_intel_thread -lmkl_lapack -lmkl_core

-- as you can see, I get 32-bit throughout. What's up with the illegal instruction?
0 Kudos
3 Replies
braver
Beginner
1,350 Views
Same result occurs if I link with Veclib or Goto BLAS -- when OpenMP is enabled. Without OpenMP, ifort_mkl works fine. I process a very large matrix which takes up 1.1 GB. Same code compiled with OpenMP works fine with a small matrix. I increase ulimit -x unlimited for all x's reported by ulimit -a.
0 Kudos
TimP
Honored Contributor III
1,350 Views
I don't have any experience with 32-bit Core Duo, but it doesn't have a reputation for effective OpenMP support. I can't find -march=prescott in the documentation (-xP would be the usual equivalent). -march=pentium4 should be OK.
0 Kudos
Steven_L_Intel1
Employee
1,350 Views
You most certainly do NOT have any kind of "Prescott" in a Mac. That was the first 90nm Pentium 4 desktop processor. Core Duo in a MacBook would be Dothan. But for the purpose of generated code selection, Prescott is compatible. 32-bit ifort will default to that so there's nothing to specify.

It would be helpful to know where in the application this illegal instruction fault is happening.
0 Kudos
Reply