Page 1 of 1

Building MAGMA on Windows

Posted: Thu Mar 05, 2020 2:08 pm
by berktaftali
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

Re: Building MAGMA on Windows

Posted: Thu Mar 05, 2020 11:49 pm
by mgates3
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

Re: Building MAGMA on Windows

Posted: Thu May 21, 2020 4:27 pm
by Julian
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?

Re: Building MAGMA on Windows

Posted: Thu May 21, 2020 6:05 pm
by Julian
Confirming that even with adding the directive to use response files, it still doesn't compile on Windows.

Re: Building MAGMA on Windows

Posted: Sun May 31, 2020 12:20 pm
by kerry87
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

Re: Building MAGMA on Windows

Posted: Tue Jun 09, 2020 5:19 am
by leonakappa
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?

Re: Building MAGMA on Windows

Posted: Fri Jun 19, 2020 7:53 am
by kerry87
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

Re: Building MAGMA on Windows

Posted: Fri Aug 28, 2020 4:35 am
by lacrymose
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?

Re: Building MAGMA on Windows

Posted: Fri Aug 28, 2020 10:04 am
by mgates3
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