Magma on Windows and Visual Studio

Open discussion for MAGMA

Magma on Windows and Visual Studio

Postby philip_warrick » Thu Aug 04, 2011 10:42 am

Hi Magma people,

I'm wondering what I need to do to compile 64-bit in a Windows/Visual Studio environment. There was a post a long time ago about this but I see in the RC5 release notes that there is mention of better support for Windows compilation now. Any help would be appreciated.

Thanks,

Philip
philip_warrick
 
Posts: 4
Joined: Thu Aug 04, 2011 10:32 am

Re: Magma on Windows and Visual Studio

Postby Stan Tomov » Fri Aug 12, 2011 2:29 pm

Hello,
In general we have prepared the software to compile under Windows. Similar to Linux, you have to only specify where is CPU BLAS, LAPACK, and CUDA, e.g., using cmake. We would be happy if you update us on success or challenges in doing this. If it will help we will look into putting a cmake example.
Stan
Stan Tomov
 
Posts: 253
Joined: Fri Aug 21, 2009 10:39 pm

Re: Magma on Windows and Visual Studio

Postby ffox80 » Mon Aug 15, 2011 1:02 pm

Hi,
I can confirm that Magma builds on Windows. I did build magmablas as a .dll using VS2008. Magma itself was build using Mingw-w64 (32bit sezero).
I will try to build both as a .dll within the next days.
Would it be possible to decorate all functions considered as API with a macro like MAGMA_DLL_API which exports to __declspec(dllexport) or (dllimport) on Windows?

Best,
Frank
ffox80
 
Posts: 7
Joined: Thu Jul 21, 2011 4:26 am

Re: Magma on Windows and Visual Studio

Postby philip_warrick » Mon Aug 15, 2011 4:33 pm

I was able to compile everything with mingw and magmablas via cl.exe (i.e. Visual Studio) since nvcc doesn't support gcc on windows. But no test file would link with the magmablas library. Perhaps the Frank's dll approach will resolve this. I would like to help out as I can since Window is one of my constraints.

Thanks,

Philip
philip_warrick
 
Posts: 4
Joined: Thu Aug 04, 2011 10:32 am

Re: Magma on Windows and Visual Studio

Postby philip_warrick » Mon Aug 15, 2011 4:55 pm

Also I tried to avoid the need for cl.exe by first generating c files from nvcc (with the -cuda option), but that preprocessing phase, too, is dependent on the presence of cl.exe :(
philip_warrick
 
Posts: 4
Joined: Thu Aug 04, 2011 10:32 am

Re: Magma on Windows and Visual Studio

Postby ffox80 » Tue Aug 16, 2011 12:16 am

Hi Philip,
I found the same that linking magmablas (the nvcc compiled portion) statically does not work with the MinGW gcc compiler due to mvscrt dependencies which are introduced during the compilation with the cl.exe based nvcc. I think we can't do anything about this dependency gcc just ain't supported as a compiler for nvcc on Windows (most devs don't seem to care http://forums.nvidia.com/index.php?s=2ee3266d979dac6cc2f0cb0d48c0b684&showtopic=207555). Although my approach - mixing static and dynamic linkage - seems to work, I would prefer to build a magmablas and magma .dll. The reason for this is that I'd like to be able to fall back to a generic BLAS/LAPACK if no Cuda card or too old drivers are being found.
The problem for building the magma library is its dependency on LAPACK routines. It's just easier to satisfy them using Mingw.

Now, what can we do to get magma windows ready, such that it compiles right out of the box?

Frank
ffox80
 
Posts: 7
Joined: Thu Jul 21, 2011 4:26 am

Re: Magma on Windows and Visual Studio

Postby philip_warrick » Fri Aug 19, 2011 9:05 am

Hi Frank,

Are you able to successfully run a test program with the dll?

What do you need to do at the moment to create and dll and could we work together to make it run out of the box?

Best regards,

Philip
philip_warrick
 
Posts: 4
Joined: Thu Aug 04, 2011 10:32 am

Re: Magma on Windows and Visual Studio

Postby ffox80 » Sat Aug 20, 2011 3:26 am

Hi Philip,
yes I did run test programs (although not all of the bundled tests) successfully with the dll.
At the moment I require just a visual studio and CLAPACK + CBLAS.
I'm still looking into compiling magma as a .dll as well (remember I just compiled magmablas).

Sadly, I have very little time to spend on this but feel free to PM me for some collaboration to get this up and running.

Frank
ffox80
 
Posts: 7
Joined: Thu Jul 21, 2011 4:26 am

Re: Magma on Windows and Visual Studio

Postby yariveis » Tue Jan 10, 2012 7:00 am

Hi,

I need to run magma on Visual Studio on Windows 7 64 bit. I already have all the Cuda drivers and environment working and I am able to run Cublas functions succesfully.
1. What else do I have to install exactly? LAPACK and BLAS?
2. Does anyone have a working Visual Studio solution for magma 1.1.0?

Any help will be appriciated,
Thanks.
Yariv
yariveis
 
Posts: 5
Joined: Tue Jan 10, 2012 6:34 am

Re: Magma on Windows and Visual Studio

Postby yariveis » Tue Jan 17, 2012 5:43 am

Hi again,

I managed to compile and link the magma project for Visual Studio 2008 on Windows 7 64 bit, after recieving great help from the forum members.
It's possible :)

Yariv
yariveis
 
Posts: 5
Joined: Tue Jan 10, 2012 6:34 am

Next

Return to User discussion

Who is online

Users browsing this forum: No registered users and 1 guest