Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6090 > unrolled thread
| Started by | DmitryG <einschlag@gmail.com> |
|---|---|
| First post | 2011-11-01 05:03 +0000 |
| Last post | 2011-11-12 12:39 +0000 |
| Articles | 11 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
nVidia Optumus prevents using CUDA? DmitryG <einschlag@gmail.com> - 2011-11-01 05:03 +0000
Re: nVidia Optumus prevents using CUDA? DmitryG <einschlag@gmail.com> - 2011-11-02 11:24 +0000
Re: nVidia Optumus prevents using CUDA? "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-11-02 11:29 +0000
Re: nVidia Optumus prevents using CUDA? DmitryG <einschlag@gmail.com> - 2011-11-03 08:48 +0000
Re: nVidia Optumus prevents using CUDA? "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-11-04 11:00 +0000
Re: nVidia Optumus prevents using CUDA? DmitryG <einschlag@gmail.com> - 2011-11-10 12:07 +0000
Re: nVidia Optumus prevents using CUDA? "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-11-07 11:03 +0000
Re: nVidia Optumus prevents using CUDA? Alexander Vorobiev <alexander.vorobiev@removethis.gmail.com> - 2011-11-09 11:34 +0000
Re: nVidia Optumus prevents using CUDA? "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-11-10 11:56 +0000
Re: nVidia Optumus prevents using CUDA? DmitryG <einschlag@gmail.com> - 2011-11-11 09:55 +0000
Re: nVidia Optumus prevents using CUDA? "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-11-12 12:39 +0000
| From | DmitryG <einschlag@gmail.com> |
|---|---|
| Date | 2011-11-01 05:03 +0000 |
| Subject | nVidia Optumus prevents using CUDA? |
| Message-ID | <j8nuj1$ee5$1@smc.vnet.net> |
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
[toc] | [next] | [standalone]
| From | DmitryG <einschlag@gmail.com> |
|---|---|
| Date | 2011-11-02 11:24 +0000 |
| Message-ID | <j8r9a9$3i5$1@smc.vnet.net> |
| In reply to | #6090 |
On Oct 31, 10:03 pm, DmitryG <einsch...@gmail.com> 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 have sorted out the problems and I report on this subject because it may be interesting for many. First, although my laptop is brand-new, the driver version if the graphic card was below the minimal 270 required by Mathematica 8.0.4. So I installed the latest version 285 of the nVidia driver. Second, I have sorted out how to set in nVidia's control panel nVidia as the preferred device for Mathematica. For other programs, I've left the general setting Intel HD graphics as the preferred device. Thus the problem with nVidia Optimus has been solved. After that my new Mathematica 8.0.4 recognizes the nVidia graphic card. A great disappointment, however, is that the results of CUDADot are not better than those of my old laptop with an old nVidia card. So why have I then bought this new laptop? On real matrices CUDADot is slower than the regular Dot and, in addition, CUDADot crashes for the square-matrix size above 2000. Is my 1 GB video memory not enough for this? Boll Rowe suggested in this forum that the reason is that old nVidia cards cannot operate on double-precision floats. He suggested to try matrices of integers and, indeed, CUDADot was faster than Dot. Now I have a modern nVidia card that has it explicitly indicated that it works with double-precision floats and it is useless for my numerical calculations, too. What else am I doing wrong? Are there any ideas to make numerical GPU rewarding? Best regards, Dmitry
[toc] | [prev] | [next] | [standalone]
| From | "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> |
|---|---|
| Date | 2011-11-02 11:29 +0000 |
| Message-ID | <j8r9hu$3jk$1@smc.vnet.net> |
| In reply to | #6090 |
On Tue, 01 Nov 2011 05:03:29 -0000, DmitryG <einschlag@gmail.com> 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:
http://www.microsoft.com/download/en/details.aspx?id=8442
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:
http://www.microsoft.com/download/en/details.aspx?id=4422
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.
[toc] | [prev] | [next] | [standalone]
| From | DmitryG <einschlag@gmail.com> |
|---|---|
| Date | 2011-11-03 08:48 +0000 |
| Message-ID | <j8tkhg$ev7$1@smc.vnet.net> |
| In reply to | #6123 |
On Nov 2, 4:29 am, "Oleksandr Rasputinov" <oleksandr_rasputi...@hmamail.com> wrote: > On Tue, 01 Nov 2011 05:03:29 -0000, DmitryG <einsch...@gmail.com> 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: > > http://www.microsoft.com/download/en/details.aspx?id=8442 > > 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: > > http://www.microsoft.com/download/en/details.aspx?id=4422 > > 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
[toc] | [prev] | [next] | [standalone]
| From | "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> |
|---|---|
| Date | 2011-11-04 11:00 +0000 |
| Message-ID | <j90gjt$sff$1@smc.vnet.net> |
| In reply to | #6123 |
On Thu, 03 Nov 2011 08:48:48 -0000, DmitryG <einschlag@gmail.com> wrote:
> On Nov 2, 4:29 am, "Oleksandr Rasputinov"
> <oleksandr_rasputi...@hmamail.com> wrote:
>> On Tue, 01 Nov 2011 05:03:29 -0000, DmitryG <einsch...@gmail.com> 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:
>>
>> http://www.microsoft.com/download/en/details.aspx?id=8442
>>
>> 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:
>>
>> http://www.microsoft.com/download/en/details.aspx?id=4422
>>
>> 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" ->
"C:\\MinGW-w64\\bin\\x86_64-w64-mingw32-gcc.exe",
"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.
[toc] | [prev] | [next] | [standalone]
| From | DmitryG <einschlag@gmail.com> |
|---|---|
| Date | 2011-11-10 12:07 +0000 |
| Message-ID | <j9geps$p3f$1@smc.vnet.net> |
| In reply to | #6159 |
On Nov 4, 6:00 am, "Oleksandr Rasputinov"
<oleksandr_rasputi...@hmamail.com> wrote:
> On Thu, 03 Nov 2011 08:48:48 -0000, DmitryG <einsch...@gmail.com> wrote:
> > On Nov 2, 4:29 am, "Oleksandr Rasputinov"
> > <oleksandr_rasputi...@hmamail.com> wrote:
> >> On Tue, 01 Nov 2011 05:03:29 -0000, DmitryG <einsch...@gmail.com> 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 nVidiaOptimusmanager 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:
>
> >> http://www.microsoft.com/download/en/details.aspx?id=8442
>
> >> 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:
>
> >> http://www.microsoft.com/download/en/details.aspx?id=4422
>
> >> 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" ->
> "C:\\MinGW-w64\\bin\\x86_64-w64-mingw32-gcc.exe",
> "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.
Hi Oleksandr,
I had a number of Microsoft Visual Redistributable files installed on
my computer. Following you above post, I have uninstalled them,
including Microsoft Visual C++ Express. And installed the update to
SDK 7.1 that I already had. Indeed, there are C compilers in this
update and they are now listed among my installed programs. On the HD
now I have
C:\Program Files (x86)\Microsoft Visual Studio 10.0 (contains
cl.exe in "Bin" - this must be the C++ compiler)
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1 (only
readme_windows_sdk_v71_update.htm inside)
C:\Program Files (x86)\Microsoft.NET
C:\Program Files\Microsoft SDKs\Windows\v7.1
Mathematica 8.0.4 still does not list Microsoft Visual in CCompilers[]
and CCompilers[Full]. I have filed a support ticket today, let's see
what will be the answer.
How can I test independently of Mathematica that the installed C
compilers work on my computer? I see there is no information about
the installed compiler and the SDK in the Windows Path statement.
Another thing: Mathematica 8.0.4 on my Mac Pro now recognizes GCC
compiler. Thus there is a problem only on my new laptop.
Best,
Dmitry
[toc] | [prev] | [next] | [standalone]
| From | "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> |
|---|---|
| Date | 2011-11-07 11:03 +0000 |
| Message-ID | <j98du2$3u0$1@smc.vnet.net> |
| In reply to | #6123 |
On Thu, 03 Nov 2011 11:56:21 -0000, Oleksandr Rasputinov
<oleksandr_rasputinov@hmamail.com> wrote:
> On Thu, 03 Nov 2011 08:48:48 -0000, DmitryG <einschlag@gmail.com> wrote:
>
>>
>> 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.
>>
>
> 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" ->
> "C:\\MinGW-w64\\bin\\x86_64-w64-mingw32-gcc.exe",
> "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).
>
Having now updated to 8.0.4, I can confirm I get the same output from
CCompilers[Full] as listed above, but MinGW-w64 still works correctly
using the same modifications as worked for 8.0.1. Given Oliver
Ruebenkoenig's statement that the other compilers are also still supported
just as before, I presume the same is true for Visual C++ as well.
Therefore, a configuration issue specific to your computer looks
overwhelmingly likely.
[toc] | [prev] | [next] | [standalone]
| From | Alexander Vorobiev <alexander.vorobiev@removethis.gmail.com> |
|---|---|
| Date | 2011-11-09 11:34 +0000 |
| Message-ID | <j9dofm$b3o$1@smc.vnet.net> |
| In reply to | #6123 |
"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> writes:
> Minimal installation of Microsoft Visual C++ 10.0 (2010) SP1
There are two additional steps that I had to take in order to make the
64bit VC compiler work with CUDA:
1. Create the file
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat
containing one line:
CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
2. Modify the file (substitute your home directory instead of C:\Users\alex of course)
C:\Users\alex\AppData\Roaming\Mathematica\Paclets\Repository\CUDAResources-Win64-8.0.4.1\CUDAToolkit\bin\nvcc.profile
so that the INCLUDES line looks like this:
INCLUDES += "-I$(TOP)/include" "-I$(TOP)/include/cudart" "-IC:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include" $(_SPACE_)
Apparently there is a problem with configuration of NVIDIA CUDA tools
shipped with Mathematica.
I am not sure it is relevant in this case but if the directory with
nvcc.profile is not there, in Mathematica try
CUDAResourcesInstall[Update -> True]
With the two additions a lot of examples in Mathematica Help involving
compilation of CUDA functions (e.g. those in documentation for
CUDAFunctionLoad) work.
> 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.
The way to deal with MinGW-w64 is described in the documentaion. Specifically,
either define $CCompiler:
Needs["CCompilerDriver`"]
Needs["CCompilerDriver`GenericCCompiler`"]
$CCompiler = {"Name" -> "MinGW64", "Compiler" -> GenericCCompiler,
"CompilerInstallation" -> "C:/MinGW64",
"CompilerName" -> "x86_64-w64-mingw32-gcc.exe"};
or use the options, e.g.
greeter = CreateExecutable[StringJoin[
"#include <stdio.h>\n",
"int main(){\n",
" printf(\"Hello MinGW-w64 world.\\n\");\n",
"}\n"],
"hiworld", "Compiler" -> GenericCCompiler,
"CompilerInstallation" -> "C:/MinGW64",
"CompilerName" -> "x86_64-w64-mingw32-gcc.exe"]
Unfortunately that makes the compiler work everywhere in Mathematica (I
tested both 8.0.1 and 8.0.4) but not in CUDALink. I suspect the reason
is that the NVCCCompiler should be pointed to MinGW-w64 somehow and the
documentation is unclear on how to do that. There is an option
"XCompilerInstallation" to CUDAFunctionLoad documented as "the directory
where NVCC will find the C compiler is installed" but there is neither
corresponding "XCompilerName" option nor an example on how to use it.
Regards,
Alex
[toc] | [prev] | [next] | [standalone]
| From | "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> |
|---|---|
| Date | 2011-11-10 11:56 +0000 |
| Message-ID | <j9ge5m$oqe$1@smc.vnet.net> |
| In reply to | #6123 |
On Wed, 09 Nov 2011 11:34:14 -0000, Alexander Vorobiev
<alexander.vorobiev@removethis.gmail.com> wrote:
> "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> writes:
>
>> 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.
>
> The way to deal with MinGW-w64 is described in the documentaion.
> Specifically,
> either define $CCompiler:
>
> Needs["CCompilerDriver`"]
>
> Needs["CCompilerDriver`GenericCCompiler`"]
>
> $CCompiler = {"Name" -> "MinGW64", "Compiler" -> GenericCCompiler,
> "CompilerInstallation" -> "C:/MinGW64",
> "CompilerName" -> "x86_64-w64-mingw32-gcc.exe"};
>
> or use the options, e.g.
>
> greeter = CreateExecutable[StringJoin[
> "#include <stdio.h>\n",
> "int main(){\n",
> " printf(\"Hello MinGW-w64 world.\\n\");\n",
> "}\n"],
> "hiworld", "Compiler" -> GenericCCompiler,
> "CompilerInstallation" -> "C:/MinGW64",
> "CompilerName" -> "x86_64-w64-mingw32-gcc.exe"]
>
Treating MinGW-w64 as a generic compiler as described in the documentation
gives one the ability to call it from Mathematica, but does not enable the
same level of functionality available with compilers for which proper
support has been provided. For example, apart from the CUDA issue you
noticed, nothing using MathLink or the Wolfram Library runtime will work
either because libraries have not been provided for this.
CCompilerDriver`GenericCCompiler.m avoids link errors only because it does
not attempt to link with any libraries. In other words, the approach
suggested in the documentation achieves only barely minimal support and is
not enough for proper operation. For example:
In[1]:=
Needs["CCompilerDriver`"];
In[2]:=
(* With proper support *)
$CCompiler=CCompilerDriver`MinGWCompiler`MinGWCompiler;
CreateLibrary[
{"C:\\Program Files\\Wolfram
Research\\Mathematica\\8.0\\SystemFiles\\Links\\LibraryLink\\LibraryResources\\Source\\demo_mathlink.c"},"demo_mathlink"
]
Out[3]=
"C:\\Users\\Oleksandr\\Application
Data\\Mathematica\\SystemFiles\\LibraryResources\\Windows-x86-64\\demo_mathlink.dll"
In[4]:=
(* Using GenericCCompiler` as suggested in the documentation *)
$CCompiler={"Name"->"MinGW64","Compiler"->CCompilerDriver`GenericCCompiler`GenericCCompiler,"CompilerInstallation"->"C:\\MinGW-w64","CompilerName"->"x86_64-w64-mingw32-gcc.exe"};
CreateLibrary[
{"C:\\Program Files\\Wolfram
Research\\Mathematica\\8.0\\SystemFiles\\Links\\LibraryLink\\LibraryResources\\Source\\demo_mathlink.c"},"demo_mathlink",
"ShellOutputFunction"->Print
]
During evaluation of In[5]:=
C:\MinGW-w64\bin\x86_64-w64-mingw32-gcc.exe -shared -o
"C:\Users\Oleksandr\Application
Data\Mathematica\SystemFiles\LibraryResources\Windows-x86-64\Working\demo_mathlink.dll"
-I"C:\Program Files\Wolfram
Research\Mathematica\8.0\SystemFiles\IncludeFiles\C" -I"C:\Program
Files\Wolfram
Research\Mathematica\8.0\SystemFiles\Links\MathLink\DeveloperKit\Windows-x86-64\CompilerAdditions\mldev64\include"
"C:\Program Files\Wolfram
Research\Mathematica\8.0\SystemFiles\Links\LibraryLink\LibraryResources\Source\demo_mathlink.c"
-L"C:\Program Files\Wolfram
Research\Mathematica\8.0\SystemFiles\Links\MathLink\DeveloperKit\Windows-x86-64\CompilerAdditions\mldev64\lib"
-L"C:\Program Files\Wolfram
Research\Mathematica\8.0\SystemFiles\Libraries\Windows-x86-64" 2>&1
C:\Users\Oleksandr\Temp\ccCKP9sc.o:demo_mathlink.c:(.text+0x54): undefined
reference to `MLCheckFunction'
C:\Users\Oleksandr\Temp\ccCKP9sc.o:demo_mathlink.c:(.text+0x70): undefined
reference to `MLGetInteger'
C:\Users\Oleksandr\Temp\ccCKP9sc.o:demo_mathlink.c:(.text+0x84): undefined
reference to `MLGetInteger'
C:\Users\Oleksandr\Temp\ccCKP9sc.o:demo_mathlink.c:(.text+0x94): undefined
reference to `MLNewPacket'
C:\Users\Oleksandr\Temp\ccCKP9sc.o:demo_mathlink.c:(.text+0xb7): undefined
reference to `MLPutInteger'
C:\Users\Oleksandr\Temp\ccCKP9sc.o:demo_mathlink.c:(.text+0x1bc):
undefined reference to `MLCheckFunction'
C:\Users\Oleksandr\Temp\ccCKP9sc.o:demo_mathlink.c:(.text+0x1d8):
undefined reference to `MLGetString'
C:\Users\Oleksandr\Temp\ccCKP9sc.o:demo_mathlink.c:(.text+0x1e8):
undefined reference to `MLNewPacket'
C:\Users\Oleksandr\Temp\ccCKP9sc.o:demo_mathlink.c:(.text+0x20c):
undefined reference to `MLPutString'
C:\Users\Oleksandr\Temp\ccCKP9sc.o:demo_mathlink.c:(.text+0x23f):
undefined reference to `MLReleaseString'
collect2: ld returned 1 exit status
Out[5]= $Failed
[toc] | [prev] | [next] | [standalone]
| From | DmitryG <einschlag@gmail.com> |
|---|---|
| Date | 2011-11-11 09:55 +0000 |
| Message-ID | <j9iree$8a8$1@smc.vnet.net> |
| In reply to | #6123 |
On Nov 10, 7:07 am, DmitryG <einsch...@gmail.com> wrote:
> On Nov 4, 6:00 am, "Oleksandr Rasputinov"
>
>
>
>
>
>
>
>
>
> <oleksandr_rasputi...@hmamail.com> wrote:
> > On Thu, 03 Nov 2011 08:48:48 -0000, DmitryG <einsch...@gmail.com> wrote:
> > > On Nov 2, 4:29 am, "Oleksandr Rasputinov"
> > > <oleksandr_rasputi...@hmamail.com> wrote:
> > >> On Tue, 01 Nov 2011 05:03:29 -0000, DmitryG <einsch...@gmail.com> 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 nVidiaOptimusmanager 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:
>
> > >> http://www.microsoft.com/download/en/details.aspx?id=8442
>
> > >> 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:
>
> > >> http://www.microsoft.com/download/en/details.aspx?id=4422
>
> > >> 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" ->
> > "C:\\MinGW-w64\\bin\\x86_64-w64-mingw32-gcc.exe",
> > "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.
>
> Hi Oleksandr,
>
> I had a number of Microsoft Visual Redistributable files installed on
> my computer. Following you above post, I have uninstalled them,
> including Microsoft Visual C++ Express. And installed the update to
> SDK 7.1 that I already had. Indeed, there are C compilers in this
> update and they are now listed among my installed programs. On the HD
> now I have
>
> C:\Program Files (x86)\Microsoft Visual Studio 10.0 (contains
> cl.exe in "Bin" - this must be the C++ compiler)
> C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1 (only
> readme_windows_sdk_v71_update.htm inside)
> C:\Program Files (x86)\Microsoft.NET
> C:\Program Files\Microsoft SDKs\Windows\v7.1
>
> Mathematica 8.0.4 still does not list Microsoft Visual in CCompilers[]
> and CCompilers[Full]. I have filed a support ticket today, let's see
> what will be the answer.
>
> How can I test independently of Mathematica that the installed C
> compilers work on my computer? I see there is no information about
> the installed compiler and the SDK in the Windows Path statement.
>
> Another thing: Mathematica 8.0.4 on my Mac Pro now recognizes GCC
> compiler. Thus there is a problem only on my new laptop.
>
> Best,
>
> Dmitry
Update: Following Oleksandr's suggestion, I have uninstalled Microsoft
Visual C++ 2010 Express and installed C compilers via the SDK 7.1
update. After that I have Microsoft Visual C++ 2010 on my laptop.
After the installation the system was rebooted but Mathematica still
did not recognized the C compiler.
Yesterday evening I was testing the installed C compiler and I was
able to run "Hello World", although the way how it worked was
confusing to me.
Today I have rebooted the system again and, Oh, miracle, Mathematica
does see the installed C compiler:
In[2]:= CCompilers[]
Out[2]= {{"Name" -> "Visual Studio", "Compiler" ->
CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,
"CompilerInstallation" -> "c:\\Program Files (x86)\\Microsoft Visual
Studio 10.0", "CompilerName" -> Automatic}}
and
In[3]:= CCompilers[Full]
Out[3]= {{"Name" -> "Visual Studio",
"Compiler" ->
CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,
"CompilerInstallation" ->
"c:\\Program Files (x86)\\Microsoft Visual Studio 10.0",
"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}}
Thank you, Oleksandr! A couple of questions now: 1) Is there a way to
check that my compiler creates 64 bit executables? If they are indeed
64 bit, why do you need MinGW64 compiler? Is it faster than Visual
Studio? Does it make sense for me to install other C compilers under
Windows, if the only use will be compiling into C from Mathematica? (I
am going to run and modify C programs given to me by my colleagues but
this will be done under Linux or Mac)
Also I am sorry that the discussion went off-topic and there is no
positive feedback regarding CUDA. This was my big hope but now I am
disappointed. CUDA functions are slower than regular CPU functions and
there is a 2 sec time limit on GPU calculations that is ridiculous and
that I cannot eliminate, although I tried to do it via the Windows
registry keys.
Best,
Dmitry
[toc] | [prev] | [next] | [standalone]
| From | "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> |
|---|---|
| Date | 2011-11-12 12:39 +0000 |
| Message-ID | <j9lpdo$lgn$1@smc.vnet.net> |
| In reply to | #6123 |
On Fri, 11 Nov 2011 09:55:26 -0000, DmitryG <einschlag@gmail.com> wrote:
> On Nov 10, 7:07 am, DmitryG <einsch...@gmail.com> wrote:
>
>>
>> Hi Oleksandr,
>>
>> I had a number of Microsoft Visual Redistributable files installed on
>> my computer. Following you above post, I have uninstalled them,
>> including Microsoft Visual C++ Express. And installed the update to
>> SDK 7.1 that I already had. Indeed, there are C compilers in this
>> update and they are now listed among my installed programs. On the HD
>> now I have
>>
>> C:\Program Files (x86)\Microsoft Visual Studio 10.0 (contains
>> cl.exe in "Bin" - this must be the C++ compiler)
>> C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1 (only
>> readme_windows_sdk_v71_update.htm inside)
>> C:\Program Files (x86)\Microsoft.NET
>> C:\Program Files\Microsoft SDKs\Windows\v7.1
>>
>> Mathematica 8.0.4 still does not list Microsoft Visual in CCompilers[]
>> and CCompilers[Full]. I have filed a support ticket today, let's see
>> what will be the answer.
>>
>> How can I test independently of Mathematica that the installed C
>> compilers work on my computer? I see there is no information about
>> the installed compiler and the SDK in the Windows Path statement.
>>
>> Another thing: Mathematica 8.0.4 on my Mac Pro now recognizes GCC
>> compiler. Thus there is a problem only on my new laptop.
>>
>> Best,
>>
>> Dmitry
>
> Update: Following Oleksandr's suggestion, I have uninstalled Microsoft
> Visual C++ 2010 Express and installed C compilers via the SDK 7.1
> update. After that I have Microsoft Visual C++ 2010 on my laptop.
>
> After the installation the system was rebooted but Mathematica still
> did not recognized the C compiler.
>
> Yesterday evening I was testing the installed C compiler and I was
> able to run "Hello World", although the way how it worked was
> confusing to me.
>
> Today I have rebooted the system again and, Oh, miracle, Mathematica
> does see the installed C compiler:
>
> In[2]:= CCompilers[]
>
> Out[2]= {{"Name" -> "Visual Studio", "Compiler" ->
> CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,
> "CompilerInstallation" -> "c:\\Program Files (x86)\\Microsoft Visual
> Studio 10.0", "CompilerName" -> Automatic}}
>
> and
>
> In[3]:= CCompilers[Full]
>
> Out[3]= {{"Name" -> "Visual Studio",
> "Compiler" ->
> CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,
> "CompilerInstallation" ->
> "c:\\Program Files (x86)\\Microsoft Visual Studio 10.0",
> "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}}
>
> Thank you, Oleksandr! A couple of questions now: 1) Is there a way to
> check that my compiler creates 64 bit executables? If they are indeed
> 64 bit, why do you need MinGW64 compiler? Is it faster than Visual
> Studio? Does it make sense for me to install other C compilers under
> Windows, if the only use will be compiling into C from Mathematica? (I
> am going to run and modify C programs given to me by my colleagues but
> this will be done under Linux or Mac)
>
> Also I am sorry that the discussion went off-topic and there is no
> positive feedback regarding CUDA. This was my big hope but now I am
> disappointed. CUDA functions are slower than regular CPU functions and
> there is a 2 sec time limit on GPU calculations that is ridiculous and
> that I cannot eliminate, although I tried to do it via the Windows
> registry keys.
>
> Best,
>
> Dmitry
>
I'm glad to hear that you have Visual C++ 2010 working correctly.
Unfortunately, although it worked for me straight away with Mathematica
8.0.1, now that I've updated to 8.0.4 I no longer have it installed and so
could not test this immediately (I only installed it to see how it would
be done and whether there would be any advantages to it given that I
already had MinGW-w64 working).
If you're running a 64-bit version of Mathematica ($SystemID ===
"Windows-x86-64") and Compile[..., CompilationTarget -> "C"] works
correctly, then the compiler is producing 64-bit executables, since on
Windows it's not possible to link 32- and 64-bit code in the same process.
As mentioned in my reply to Oliver Ruebenkoenig, the main reason for using
MinGW-w64 is to be more easily able to link Fortran code into Mathematica.
However, GCC C still has some advantages over Visual C++, such as support
for C99/C++0x, as well as the fact that many open source packages are
intended to be compiled with GCC rather than Visual Studio and may not
build correctly with the latter unless modifications are made. The GCC
back-end also has support for all currently available x86 instruction set
extensions and can produce code optimized for a very wide variety of
processors, including by using auto-vectorization (which Visual C++
doesn't support). It's up to you if you want to try other compilers or
not, but it seems to me that since 32-bit versions of Mathematica already
support Cygwin and MinGW, proper support for MinGW-w64 is not an
unreasonable expectation given that the modifications to the existing
MinGW support needed to achieve this are very minimal.
In regard to the 2-second GPU timeout--you may not be aware that the
relevant registry keys changed as of Vista SP1. The keys now used to
control the graphics driver recovery settings are listed at the following
address:
http://msdn.microsoft.com/en-us/library/ff569918.aspx
Best,
O. R.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web