MAGMA for Windows / Visual Studio - How-To

Open discussion for MAGMA

MAGMA for Windows / Visual Studio - How-To

Postby JCUDA » Wed Jul 04, 2012 11:50 am

Here's the basic situation:
- Windows 7 installed
- CUDA v4.2 installed
- examples compiled with Visual Studio 2010 -> everything's fine

So we have proven that CUDA works.

Now we want to try MAGMA
- MAGMA 1.2.1 downloaded and unzipped

And here the questions start as there's unfortunately not much documentation to the installation of MAGMA at all:
1) I assume that the package has to be compiled for the given platform. Which compiler shall I use? Settings? Makefile?
2) Are all necessary sub-packages included or will I need additional files (BLAS, LAPACK)?
3) Could anyone please create a step-by-step installation instruction for a common Windows-based C-environment!?

Thanks,
Jan
JCUDA
 
Posts: 2
Joined: Wed Jul 04, 2012 11:39 am

Re: MAGMA for Windows / Visual Studio - How-To

Postby cgmelt » Mon Aug 06, 2012 2:10 am

After a lot of trial and errors I finally compiled MAGMA using MinGW-w64 and used it in Visual Studio (for x64 bit)

In order for it to compile I had to change some declarations and implementations of auxiliary functions:
For instance, I've changed magma_malloc_cpu to use _aligned_malloc, and had to also update the magma_free_cpu to use _aligned_free because in windows just calling free is not possible for allocations created by _aligned_malloc.

I've created a patch file with all the fixes that can be easily applied on the magma-1.2.1 source.
After applying this patch it is possible to compile the mamga and magmablas libs and use them from Visual Studio.

(It is not possible to compile and successfully run the testing directory due to incompatability of CUDA with mingw, but it is possible to compile all the testing examples with Visual Studio)

The patch file and a detailed step-by-step explanation (including how to use it from VS) can be found here
http://goo.gl/KRZrJ

I've run a few benchmarks on my Tesla for magma_zhegvx and it outperformed Matlab's eigs by a factor of 5 :)

Enjoy.

Enjoy.
cgmelt
 
Posts: 1
Joined: Mon Aug 06, 2012 1:55 am

Re: MAGMA for Windows / Visual Studio - How-To

Postby mgates3 » Wed Aug 08, 2012 5:55 pm

Thanks for posting this. We're also working toward supporting CMake, which should help with Windows support.
-mark
mgates3
 
Posts: 388
Joined: Fri Jan 06, 2012 2:13 pm

Re: MAGMA for Windows / Visual Studio - How-To

Postby adensmore » Tue Oct 16, 2012 6:32 pm

Thanks for posting the How-To for CUDA. But does anyone have any experience to share building clMAGMA 0.3 for AMD GPUs on XP32-bit Windows / Visual Studio. That's what I need to do.
adensmore
 
Posts: 4
Joined: Tue Oct 16, 2012 6:05 pm


Return to User discussion

Who is online

Users browsing this forum: No registered users and 2 guests