Building MAGMA on Windows

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
berktaftali
Posts: 2
Joined: Wed Feb 26, 2020 4:50 am

Building MAGMA on Windows

Post by berktaftali » Thu Mar 05, 2020 2:08 pm

Hi!

I am trying to build MAGMA for Windows with the following development environment:
- Windows 10
- Magma 2.5.2
- CUDA 10.2
- Intel Fortran & MKL 2019 (Parallel Studio XE 2019.5.281)
- Visual Studio 2017 (15.9.20)
- CMake 3.16.4

I've been using prebuilt libraries for Pytorch so far, but they lack OpenMP support so I cannot use some of the preconditioners I'd like to test with the sparse iterative solvers, hence the need to build MAGMA locally.

I followed the instructions in README-Windows and used CMake to create Visual Studio 2017 projects. When I tried to build magma & magma_sparse projects, I got the following errors:

[/code]
magma:

Code: Select all

Building NVCC intermediate link file CMakeFiles/magma.dir/Release/magma_intermediate_link.obj
  The system cannot execute the specified program.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" exited with code 9020.
magma_sparse:

Code: Select all

The command line is too long.
I've seen posts in the forum recommending creating NMake projects instead of Visual Studio projects using CMake to get around similar errors, but I didn't have much luck getting it to work.

Any help compiling Magma for Windows with MKL & OpenMP support is deeply appreciated.

Berk

mgates3
Posts: 918
Joined: Fri Jan 06, 2012 2:13 pm

Re: Building MAGMA on Windows

Post by mgates3 » Thu Mar 05, 2020 11:49 pm

This is a known issue with CMake on Windows (see issue below). We have not yet found a feasible work around.
https://gitlab.kitware.com/cmake/cmake/ ... ote_642545

Mark

Julian
Posts: 2
Joined: Thu May 21, 2020 4:05 pm

Re: Building MAGMA on Windows

Post by Julian » Thu May 21, 2020 4:27 pm

Same issue using vcpkg for dependencies, VS2019, cmake->solution, cmake->nmake.

I've done some Googling around and came across this: https://stackoverflow.com/questions/431 ... ng-windows.

So have added

Code: Select all

SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)

SET(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@")
SET(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@")

to the top of `CMakeLists.txt` to try and force the use of response files. I'm doing this blindly, with not a lot of understanding.
Am trying to build this as one of the pre-reqs for an optional feature of the AliceVision framework.

As the build takes a long time to get to the point where it fails, I'll write back if this works. If I don't write back, this didn't work.

@mgates3 - Could a note be added to the windows readme re it not building for windows ATM?

Julian
Posts: 2
Joined: Thu May 21, 2020 4:05 pm

Re: Building MAGMA on Windows

Post by Julian » Thu May 21, 2020 6:05 pm

Confirming that even with adding the directive to use response files, it still doesn't compile on Windows.

kerry87
Posts: 8
Joined: Wed May 20, 2020 11:34 am
Contact:

Re: Building MAGMA on Windows

Post by kerry87 » Sun May 31, 2020 12:20 pm

Did you try another version of Windows? As far as I know, Windows 10 tend to have installed its own libraries of .NET and maybe that is creating some conflicts with CPP

leonakappa
Posts: 1
Joined: Tue Jun 09, 2020 5:11 am
Contact:

Re: Building MAGMA on Windows

Post by leonakappa » Tue Jun 09, 2020 5:19 am

Hello
I am also trying to build magma in windows, without success so far.

I wonder,were there particular problems that you encountered in building MAGMA, using the directions in README-Windows?

kerry87
Posts: 8
Joined: Wed May 20, 2020 11:34 am
Contact:

Re: Building MAGMA on Windows

Post by kerry87 » Fri Jun 19, 2020 7:53 am

leonakappa wrote:
Tue Jun 09, 2020 5:19 am
Hello
I am also trying to build magma in windows, without success so far.

I wonder,were there particular problems that you encountered in building MAGMA, using the directions in README-Windows?
Can you share the error message? or give us a bit more context? It will be easier to receive a potential solution from some of us

lacrymose
Posts: 1
Joined: Fri Aug 28, 2020 4:26 am

Re: Building MAGMA on Windows

Post by lacrymose » Fri Aug 28, 2020 4:35 am

Hello
I am also trying to build magma in windows, without success so far either. same erros as that of berktaftali occur. Will these problems be solved in the near future?

mgates3
Posts: 918
Joined: Fri Jan 06, 2012 2:13 pm

Re: Building MAGMA on Windows

Post by mgates3 » Fri Aug 28, 2020 10:04 am

As noted above, it's an issue in CMake. They don't seem to be making any progress on it.
https://gitlab.kitware.com/cmake/cmake/ ... ote_642545

Mark

Post Reply