MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: nVidia Optumus prevents using CUDA?

  • To: mathgroup at
  • Subject: [mg122629] Re: nVidia Optumus prevents using CUDA?
  • From: "Oleksandr Rasputinov" <oleksandr_rasputinov at>
  • Date: Fri, 4 Nov 2011 05:58:47 -0500 (EST)
  • Delivered-to:
  • References: <j8nuj1$ee5$> <j8r9hu$3jk$>

On Thu, 03 Nov 2011 08:48:48 -0000, DmitryG <einschlag at> wrote:

> On Nov 2, 4:29 am, "Oleksandr Rasputinov"
> <oleksandr_rasputi... at> wrote:
>> On Tue, 01 Nov 2011 05:03:29 -0000, DmitryG <einsch... at> wrote:
>> > Hi All,
>> > Being interested in GPU computations, I have bought a new powerful
>> > laptop Lenovo Y570 ($1080) that has, according to my test today, a
>> > 1.05 Mathematica 8.0.4 benchmark, under Windows 7 64 bit.
>> > The main reason to buy this laptop was that it has nVidia Geforce 555M
>> > graphic card that is one of the best in the consumer range and has 96
>> > CUDA cores.
>> > I have got the new Mathematica 8.0.4 activated today and the first
>> > thing was to try out CUDA. To my disappointment, it appears that
>> > Mathematica does not see the nVidia GPU at all, and all that it sees
>> > is the integrated Intel HD graphics. Thus CUDAInformation[] command
>> > outputs "CUDAInformation::invdevnm: "CUDA is not supported on device  
>> \!
>> > \(\"Intel(R) HD Graphics Family\"\)."
>> > I know that there is nVidia Optimus manager that tries to redistribute
>> > the load between the integrated HD graphics and the nVidia GPU. Also
>> > there is a hardware switch in my laptop to activate or deactivate the
>> > GPU. Thus I have GPU activated per this switch and also in the "Manage
>> > 3D settings -> Global settings" of the nVidia control panel I have
>> > checked nVidia as the preferred graphic processor (other options are
>> > Automatic and integrated HD graphics). However, this did not bring
>> > anything to the way Mathematica works with CUDA.
>> > I do not know if the above is related to another disappointment. I
>> > have installed Microsoft Visual C++ 2010 express, as on my previous
>> > Win 7 64 bit laptop (that has a too old nVidia card, though) and it
>> > turned out that it does not work with Mathematica. Even the command
>> > CCompilers[Full] does not say that Microsoft Visual can be installed
>> > on my system, there are only Intel Compiler and a generic C compiler
>> > in the list. I don't know why there is such a difference with my
>> > previous laptop. I have checked Windows SDK and it is installed. What
>> > else?
>> > It seems that there is some relation between CUDa and C compiler,
>> > maybe a C compiler is a prerequisite for CUDA?
>> > It appears I have serious problems with Mathematica on my new laptop,
>> > and any advice will be appreciated.
>> > Dmitry
>> I won't comment on the CUDA issue as it's not something that I'm  
>> familiar
>> with. However, I have had Visual C++ 2010 working with Mathematica  
>> (8.0.1;
>> I haven't got 8.0.4 yet) without difficulty. The installation is  
>> slightly
>> convoluted; here are my notes on the matter:
>> Minimal installation of Microsoft Visual C++ 10.0 (2010) SP1
>> Note that this installation does not include the Visual Studio IDE,  
>> help,
>> tools, etc. Only the build system, compilers, headers, and libraries  
>> will
>> be installed.
>> 1. Get the Microsoft Windows SDK 7.1 for Windows 7 and .NET Framework 4:
>> 2. From the SDK, install at least the headers and libraries, but do not
>> install the compilers. The headers and libraries will be installed for  
>> the
>> x86, x64, and IA64 platforms. To keep the installation self-contained,  
>> and
>> for for consistency with Visual Studio, one may install to
>> %ProgramFiles(x86)%\Microsoft Visual Studio 10.0\SDK rather than the
>> default location.
>> 3. Get the Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for
>> the Windows SDK 7.1:
>> 4. Install the Compiler Update. This will install x86, x64, and IA64
>> compilers.
>> 5. If support for the IA64 platform is not required, one can remove the
>> IA64 compiler via Add/Remove Programs (if present there) and then simply
>> delete all of the directories installed by either the SDK or the  
>> Compiler
>> Update that contain IA64-specific files. (Note that the Compiler Update
>> will install the x86-hosted IA64 cross-compiler along with the x86
>> compiler even if the IA64 compiler itself is not installed.) The
>> directories to delete can easily be identified since they all have  
>> "IA64"
>> as part of the name. This saves about 200MB of space. Note that apart  
>> from
>> the main installation directory, some (small) files are also installed
>> into %ProgramFiles(x86)%\MSBuild, including some for IA64 in
>> MSBuild\Microsoft.Cpp\v4.0\Platforms\IA64.
>> 5. After installing, it is recommended to run Microsoft Update in case  
>> any
>> patches are required.
>> As you see, this does not involve Visual Studio Express, which I
>> deliberately avoided since it does not include the 64-bit compilers
>> necessary for operation with Mathematica. Personally, I use MinGW-w64  
>> GCC
>> 4.6.1 rather than Visual C++; this works perfectly well also but does
>> require modifications to Mathematica which I will not discuss here other
>> than to say that it would be nice if this compiler could be supported
>> without need of modifications in a future release.
> It is unfortunately Mathematica 8.0.4 that does not accept any
> compilers except of the Intel C Compiler, according to
> CCompilers[Full]. Checked on Windows 7 and Mac Snow Leopard.
> Dmitry

Don't be too discouraged by CCompilers[Full]. On 8.0.1 I get:

In[2]:= CCompilers[Full]

Out[2]= {{"Name" -> "MinGW",
   "Compiler" -> CCompilerDriver`MinGWCompiler`MinGWCompiler,
   "CompilerInstallation" ->
   "CompilerName" -> Automatic}, {"Name" -> "Intel Compiler",
   "Compiler" -> CCompilerDriver`IntelCompiler`IntelCompiler,
   "CompilerInstallation" -> None,
   "CompilerName" -> Automatic}, {"Name" -> "Generic C Compiler",
   "Compiler" -> CCompilerDriver`GenericCCompiler`GenericCCompiler,
   "CompilerInstallation" -> None, "CompilerName" -> Automatic}}

(where MinGW reflects my own modifications to work with MinGW-w64; this is  
not standard). As you can see, Visual C++ is missing. But, when I  
installed Visual C++ per the directions above, it did show up in  
CCompilers[] and it did work correctly. Not sure why CCompilers[Full]  
omits it (but you can look at the package source code to find out if  
you're curious).

O. R.

  • Prev by Date: Re: Problems with DistributionFitTest
  • Next by Date: Re: Exit a loop
  • Previous by thread: Re: nVidia Optumus prevents using CUDA?
  • Next by thread: Re: nVidia Optumus prevents using CUDA?