Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6129 > unrolled thread

Re: nVidia Optumus prevents using CUDA?

Started byOliver Ruebenkoenig <ruebenko@wolfram.com>
First post2011-11-03 08:44 +0000
Last post2011-11-04 11:09 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: nVidia Optumus prevents using CUDA? Oliver Ruebenkoenig <ruebenko@wolfram.com> - 2011-11-03 08:44 +0000
    Re: nVidia Optumus prevents using CUDA? "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-11-04 11:09 +0000

#6129 — Re: nVidia Optumus prevents using CUDA?

FromOliver Ruebenkoenig <ruebenko@wolfram.com>
Date2011-11-03 08:44 +0000
SubjectRe: nVidia Optumus prevents using CUDA?
Message-ID<j8tk9l$epl$1@smc.vnet.net>


[...]

>
> 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.
>
>

I filed this as a suggestion for a future version.

Oliver

[toc] | [next] | [standalone]


#6180

From"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Date2011-11-04 11:09 +0000
Message-ID<j90h56$smk$1@smc.vnet.net>
In reply to#6129
On Thu, 03 Nov 2011 08:44:37 -0000, Oliver Ruebenkoenig  
<ruebenko@wolfram.com> wrote:

>> 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.
>>
>>
>
> I filed this as a suggestion for a future version.
>
> Oliver
>

Many thanks. For reference, this support is not very difficult to  
implement: apart from some (trivial) changes to  
CCompilerDriver/MinGWCompiler.m and  
CCompilerDriver/CCompilerDriverRegistry.m, the only other prerequisite is  
to have the necessary libraries (ml32i3m.lib/ml64i3m.lib etc.) provided in  
GNU COFF format in addition to the ones in MS COFF format. Import  
libraries can be generated automatically from the associated DLLs (using  
MinGW gendef followed by dlltool), and static link libraries can be  
converted automatically as well (using MinGW ranlib). One thing to note is  
that MinGW-w64 is a multilib build--i.e. it can produce both 32- and  
64-bit binaries--so you need to provide GNU COFF versions of both sets of  
libraries.

The only problem I ran into in implementing the support myself was that  
ml32i3s.lib and ml64i3s.lib are linked against the static version of the  
MS C runtime (libcmt.lib), which means they cannot successfully be  
converted automatically due to certain dependencies. Fixing this is  
possible but would be a lot easier if they were instead linked against the  
dynamic C runtime (msvcrt.dll/msvcr80.dll etc.) instead--however, I didn't  
actually try as I couldn't think of any reason why one would want to build  
a statically-linked MathLink program in the first place, so for me these  
libraries are superfluous anyway.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web