Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
33 Views

linking MKL in Xcode

hey there;

I'm trying to convert my fortran code from windows into MAC. However, I have some problems with linking mkl with xcode.
I've done everything according to the this article. Anyway I still get this error:
Command /Developer/usr/local/bin/ifort-11.1-base/bin/intel64/ifort failed with exit code 1

According to the error, I'm guessing the problem is about 32/64 architecture, isn't it? I'm trying to compile the code in 32 and I'm using static libraries.
It's driving me crazy!! please help me out.
0 Kudos
7 Replies
Highlighted
Moderator
33 Views

quote:"Command /Developer/usr/local/bin/ifort-11.1-base/bin/intel64/ifort failed with exit code 1.
According to the error, I'm guessing the problem is about 32/64 architecture, isn't it? I'm trying to compile the code in 32"

I quess you are trying to build 32 bit application by 64bit compiler.
You can either add the compiler option-m32 or use 32-bit compiler (( ../bin/ifort-11.1-base/bin/ia32/ifort))
--Gennady
0 Kudos
Highlighted
New Contributor I
33 Views

Gennady;
How can I add the compiler option in xcode environment?
0 Kudos
Highlighted
Moderator
33 Views

please look at this article, may be it will help.
--Gennady
0 Kudos
Highlighted
New Contributor I
33 Views

as I noted in the Topic post I have followed the instruction of this article for linking mkl. Regarding to your previous post, I tried to find out which version of ifort the terminal uses, so I typed "ifort -V" in the command line.
The result was confusing, everytime I try this command, it says:
Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100203 Package ID: m_cprof_p_11.1.084
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.

then I try to convert it into 32 bit by this command:
source /opt/intel/Compiler/11.1/084/bin/ifortvars.sh ia32
then I try to build my project in xcode, after building (which results into the same error), the version of ifort changes back to 64 bit!!

Please tell me whats going on!
0 Kudos
Highlighted
Employee
33 Views

Hello,
I'll try to describe briefly the steps for adding Intel Compilers inside XCode building environmet.
  1. Double click on your target in the 'Targets' list. Now 'Target "" Info' dialog should appear.
  2. Select 'Rules' tab in this dialog.
  3. Find rule for Fortran source files and select 'Intel Fortran Compiler' in the 'using:' drop list.
Let's take a look on how to build executables for the specific architecture.
  1. Open 'Project>Edit Project Settings' menu item. 'Project "" Info' dialog should appear.
  2. Ensure that 'i386' exist in Architectures>Valid architectures list.
  3. Select 'i386' in 'Project>Select Active Architecture'.
  4. Build your project.
Launch the 'file ' command in Terminal.
It should return something like that:
mkl_test: Mach-O executable i386
Best regards,
Artem
0 Kudos
Highlighted
New Contributor I
33 Views

Dear Artem;
Thanks for the reply, I double checked the procedure. It's exacltly the same as you specified. I believe there should be something wrong with the MKL linking part.
0 Kudos
Highlighted
Moderator
33 Views

if you have concerns regarding the MKL linking part, then:
1- How are you linking this application? and may be
2- the link advisor at the top of the forum will give the suggestion appropriate the platform combination.
0 Kudos