Compiling/linking MAGMA on Windows 7 using MSVS 2012

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

Compiling/linking MAGMA on Windows 7 using MSVS 2012

Postby raffayhamid » Sun Jan 05, 2014 4:13 am

Hello --

First off, big thanks for the MAGMA effort. I would however really appreciate if someone could please enlist a step-by-step procedure of how to make MAGMA work on Windows (or if there is such a list of steps, please point me to it). This would really help a whole bunch of folks who live mostly in the Windows universe.

I'm trying to build MAGMA 1.4.1 and have successfully been able to build/link/use some functions of MAGMA blas. However, I am not able to use any of the LAPACK functions. When I try to call these functions I get linker errors. I suspect this is because during the CMake generation process, I am probably not giving the right path to the lapack library (I tried giving both the library path and the library name, but neither worked). For MAGMA compilation, I am using a lapack/blas version compiled on my machine using the instructions given at: ... k/#running. During the compilation of MAGMA, I get several linker errors related to the lapack.lib that I ask CMake to use.

Any guidance in this matter would be super appreciated!


PS: I really hope that the organizers of MAGMA could give more attention to making the usability of this wonderful library package more easy for the Windows users.
Posts: 3
Joined: Sun Jan 05, 2014 2:32 am

Re: Compiling/linking MAGMA on Windows 7 using MSVS 2012

Postby mgates3 » Tue Jan 07, 2014 12:25 pm

Instructions for MAGMA 1.4.1 are in README-Windows.
From those directions, the path should be to the lib files themselves. There may be multiple libraries required, e.g., for BLAS and LAPACK.

I suggest first compiling and linking a simple application with LAPACK only (not with MAGMA), to determine what the correct library paths are and ensure that it is working. Then try to compile MAGMA.

Posts: 782
Joined: Fri Jan 06, 2012 2:13 pm

Re: Compiling/linking MAGMA on Windows 7 using MSVS 2012

Postby honestman » Wed Jan 29, 2014 12:16 pm

Dear MAGMA developers,

I just find MAGMA from internet. Thanks for your great work.
I got the error when I try to use CMake generate MSVS 2010 on Windows 7 Pro system. I follow the instruction of "readme-windows". I have Intel Fortran Complier XE 2011 SP1, MSVS 2010, CMake, and CUDA v5.5 installed. The error information is copied in the below. Would you tell me why it needs pthread.h ? I don't find the file of "pthread.h" on the computer. How do I solve it? Or where can I find compiled MAGMA lib for FORTRAN?



======> Start ****

Determining if files pthread.h exist failed with the following output:
Change Dir: C:/MAGMA/build/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA~2\MICROS~1.0\Common7\IDE\ CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec26775900

Microsoft (R) Visual Studio Version 10.0.30319.1.

Copyright (C) Microsoft Corp. All rights reserved.

1>------ Build started: Project: cmTryCompileExec26775900, Configuration: Debug Win32 ------

1> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86

1> Copyright (C) Microsoft Corporation. All rights reserved.


1> cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /openmp /Fo"cmTryCompileExec26775900.dir\Debug\\" /Fd"C:/MAGMA/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec26775900.pdb" /Gd /TC /analyze- /errorReport:prompt CheckIncludeFiles.c


1> CheckIncludeFiles.c

1>CheckIncludeFiles.c(2): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

/* */
#include <pthread.h>

int main(){return 0;}

======> End ****
Posts: 1
Joined: Wed Jan 29, 2014 11:09 am

Re: Compiling/linking MAGMA on Windows 7 using MSVS 2012

Postby Hidra2000 » Tue Mar 18, 2014 3:35 am

When i tried using the instructions in README-Windows cmake complained that it can't find a fortran compiler.
any recommendations on which compiler to use?

also, if any one out there has managed to make a working vs project could you upload it and post a link?

Thank you.
Posts: 3
Joined: Tue Mar 18, 2014 3:15 am

Re: Compiling/linking MAGMA on Windows 7 using MSVS 2012

Postby mgates3 » Thu Mar 20, 2014 12:29 pm

For Windows, we had Intel's compiler suite and MKL installed. We have used gcc & gfortran on Linux, but have never tried with those on Windows.
Posts: 782
Joined: Fri Jan 06, 2012 2:13 pm

Return to User discussion

Who is online

Users browsing this forum: Google [Bot] and 6 guests