Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I wish to try the trial version of the latest Intel C++ Compiler for Windows with Mathematica. I have downloaded the current version of Intel® C++ Composer XE 2011 for Windows and installed only the "Intel C++ Compiler" component from this package. But Mathematica does not recognize it:

In[1]:= Needs["CCompilerDriver`"]
CCompilers[]

Out[2]= {}

How to configure Mathematica to use the Intel C++ Compiler?

share|improve this question
    
Make sure you have installed the 64 bit tools for Visual studio (if you are on a 64 bit system). You did install visual studio right? –  Ajasja May 23 '12 at 15:02
    
@Ajasja At least when using the Microsoft compiler, it's not strictly necessary to install Visual Studio. The Windows SDK with the command line compiler will suffice. But the Intel compiler I have never used on Windows. –  Szabolcs May 23 '12 at 15:03
2  
Yes, for the Intel compiler it is strictly necessary. It works with the Express edition as well, at least I think so. –  Ajasja May 23 '12 at 15:08
3  
This Intel version 12 is not supported, and that's why CCompilerDriver is not automatically detecting your Intel compiler. Until I have a chance to look into this, you could go into AddOns/Applications/CCompilerDriver/IntelCompilerWindows.m and replace ICPP_COMPILER11 with ICPP_COMPILER12. This may work only superficially, but it would be the fastest thing for you to try. –  Joel Klein May 24 '12 at 2:24
1  
CCompilers[] only lists compilers that are seen to be valid installations. CCompilers[Full] will list all compilers supported on that $SystemID. –  Joel Klein May 24 '12 at 18:01

1 Answer 1

up vote 11 down vote accepted

Mathematica 8 automatically detects Intel version 11, but not Intel version 12 which was released later.

In order to use the Intel 12 compiler, you'll need to set $CCompiler to point CCompilerDriver to where you've installed the Intel compiler:

Needs["CCompilerDriver`"]
$CCompiler = {"Compiler" -> 
    CCompilerDriver`IntelCompiler`IntelCompiler, 
   "CompilerInstallation" -> "E:\\IntelCompiler"};

You can put this in a kernel initialization file, such as $UserBaseDirectory/Kernel/init.m so you don't need to evaluate it every time you start Mathematica.

share|improve this answer
1  
This should now Just Work in Mathematica 9. –  Joel Klein Nov 30 '12 at 3:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.