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

MKL in Xcode

Raph
Beginner
893 Views
I'm in the process of transitioning from a PPC Mac and xlf to an Intel Mac and ifort. I have managed to transfer over an XCode project, fix the compiler and options and get one program to compile. So I'm pretty sure I have the basics down.

However, another executable in the same project, which unlike the first program links against MKL's LAPACK, does not compile. I can compile and run the same execuatable using Make on the command line, so I'm pretty sure the problem is in configuring the build in XCode.

I'm using Xcode 3.1, MKL 10.0.4.022 and ifort 10.1.017.

Here's what I've done.
1) Added Intel_MKL.framework to the "Link Binary with Libraries".

2) Under build in the Get Info box, I set

LIBRARY_SEARCH_PATHS = /Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t/

USER_HEADER_SEARCH_PATHS = /Library/Frameworks/Intel_MKL.framework/Headers/**

OTHER_LDFLAGS = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_sequential -lmkl_core -lguide

I get the following error

ipo: warning #11023: file format not recognized for /Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t/libmkl_intel_lp64.dylib
ipo: warning #11023: file format not recognized for /Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t/libmkl_sequential.dylib
ipo: warning #11023: file format not recognized for /Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t/libmkl_core.dylib
ipo: warning #11023: file format not recognized for /Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t/libmkl_sequential.dylib
ipo: warning #11023: file format not recognized for /Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t/libmkl_core.dylib
ipo: warning #11023: file format not recognized for /Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t/libguide.dylib
IPO link: can not find -framework Intel_MKL
ifort: error #10014: problem during multi-file optimization compilation (code 1)
Build failed (2 errors, 6 warnings)

Any ideas what I've forgotten to do?

Raph
0 Kudos
5 Replies
AndrewC
New Contributor III
893 Views
Sounds like you are building a 32-bit XCode target, but linking against the 64-bit MKL.
0 Kudos
Raph
Beginner
893 Views
Quoting - vasci_intel
Sounds like you are building a 32-bit XCode target, but linking against the 64-bit MKL.

I finally got back to this problem.

How to I build a 64 bit XCode target? The "Architectures" setting is set to "Native Architecture of Build Machine" on this MacBook. The code compiles, links and runs fine with Make on this machine (see below), so I'm pretty sure 64 bit is the right libraries to use.

Raph

% make xnet

ifort -pg -ipo -O3 -xT -mdynamic-no-pic -no-prec-div -autodouble -c data.f

ifort -pg -ipo -O3 -xT -mdynamic-no-pic -no-prec-div -autodouble -c ffn.f

ifort -pg -ipo -O3 -xT -mdynamic-no-pic -no-prec-div -autodouble -c full_net.f

ifort -pg -ipo -O3 -xT -mdynamic-no-pic -no-prec-div -autodouble -c match.f

ifort -pg -ipo -O3 -xT -mdynamic-no-pic -no-prec-div -autodouble -c flux.f

ifort -pg -ipo -O3 -xT -mdynamic-no-pic -no-prec-div -autodouble -c net.f

ifort -pg -ipo -O3 -xT -mdynamic-no-pic -no-prec-div -autodouble -c eosnom90.f

ifort -pg -ipo -O3 -xT -mdynamic-no-pic -no-prec-div -autodouble -c jacobian_dense.f

ifort -pg -ipo -O3 -xT -mdynamic-no-pic -no-prec-div -autodouble -g -o xnet data.o ffn.o full_net.o match.o net.o flux.o eosnom90.o jacobian_dense.o -I/Library/Frameworks/Intel_MKL.framework/Versions/Current/include -L/Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_sequential -lmkl_core -lguide

ipo: remark #11000: performing multi-file optimizations

ipo: remark #11005: generating object file /var/folders/EH/EHnPHq7RHA4K3TDOT18kbI2wqow/-Tmp-/ipo_ifortgVCULX.o


0 Kudos
Andrey_Bespalov
New Contributor I
893 Views
Could you add -V to ifort's options to see exactly which version of compiler is used?

0 Kudos
Raph
Beginner
893 Views
Could you add -V to ifort's options to see exactly which version of compiler is used?

Adding -V to the loader in the Makefile adds

Intel Fortran Compiler for applications running on Intel 64, Version 10.1 Build 20080801 Package ID: m_fc_p_10.1.017

Copyright (C) 1985-2008 Intel Corporation. All rights reserved.

and

@(#)PROGRAM:ld PROJECT:ld64-85

Library search paths:

/Library/Frameworks/Intel_MKL.framework/Versions/Current/lib/em64t

/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t

/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t

/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t

/opt/intel/fce/10.1.017/lib

/usr/lib/i686-apple-darwin9/4.0.1/

/usr/lib/

/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t/

/usr/lib/gcc/i686-apple-darwin9/4.0.1/x86_64

/usr/lib/gcc/i686-apple-darwin9/4.0.1/

/usr/lib/i686-apple-darwin9/4.0.1

/usr/lib

/usr/lib

/usr/local/lib

Framework search paths:

/Library/Frameworks/

/System/Library/Frameworks/

I'm not sure how to do this in XCode.

Raph
0 Kudos
Quoc-An_L_Intel
Moderator
893 Views

You canadd -V in Xcode by ->

get info -> build tab -> Intel Fortran Compiler 11.1 -> Additonal options

post the build log.
0 Kudos
Reply