Page 1 of 1

MAGMA 2.5.1 compilation problem on windows

Posted: Wed Sep 25, 2019 6:48 am
by guradaong
Hi,

I am attracted to the outstanding performance of MAGMA library and wanna use it for my high order CFD code. But I'm struggling to build the library on my system, even though I have followed 'README-Windows' very carefully. The details are as follows:

OS: Windows 10
CUDA version: 10.1
CMake: CMake gui 3.15.0
Generator: Visual Studio 15 2017 x64
USE_FORTRAN: off
LAPACK: Intel MKL (Parallel Studio 2018.5.274)
BUILD_SHARED_LIBS: on
Also added 'CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS' option in 'CMakeLists.txt' and set to on.


After several hours building the solution, I got the message like this:

Building NVCC intermediate link file CMakeFiles/magma.dir/Release/magma_intermediate_link.obj
.
.
.
cu obj files
.
.
.
Command line is too long
.
.
.
cu obj files
.
.
.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: "cmd.exe" exited with code 9020.


I have spent several weeks trying everything I could to solve this issue. I would appreciate any help.
Thank you.

Re: MAGMA 2.5.1 compilation problem on windows

Posted: Wed Sep 25, 2019 11:43 am
by mgates3
We'll look into it, though it might take a little while as we don't have any Windows machines readily setup for testing. All our development is on Linux and macOS.
-mark

Re: MAGMA 2.5.1 compilation problem on windows

Posted: Thu Sep 26, 2019 1:39 am
by sejabs
Maybe we faced the same problem.
"Magma 2.5.1 build with cuda 10.1.243 & intel MKL 2019 on Windows 10 1903".
In my situation, the error is:
Building NVCC intermediate link file CMakeFiles/magma.dir/Release/magma_intermediate_link.obj
System can't execute specified program.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(220,5): error MSB6006: “cmd.exe” quit, code 9020.

Re: MAGMA 2.5.1 compilation problem on windows

Posted: Thu Sep 26, 2019 9:32 am
by eduardotsimoes
Hello,

I compiled with NMake. I broke the command to compile magma_intermediate_link.obj in two new objects magma_intermediate_link1.obj and magma_intermediate_link2.obj and them added both the the compilation of the magma.lib. With this 2 objects compiled, the rest is easy. It can be automated, but manually didn't take me a long time. This is not a great help, but it worked for me.

I hope this can help.

Re: MAGMA 2.5.1 compilation problem on windows

Posted: Thu Sep 26, 2019 9:44 pm
by guradaong
I'm not familiar with NMake but I'll try it. Thanks for your advice, eduardotsimoes. I guess this problem is quite common for windows users.

Re: MAGMA 2.5.1 compilation problem on windows

Posted: Tue Oct 01, 2019 12:13 pm
by yff
Hi, I'm facing the same problem when compiling magma on Windows and just found it convenient to use prebuilt binaries from PyTorch CI mirrors, if static linked libraries (.lib files) are acceptable. See the following gist, which would automatically download the binaries and compile the source (with openblas):

https://gist.github.com/oxyflour/b98a26 ... a63954360e

But I'm still looking for a way to obtain .dll files for windows, which could be used together with scikit-cuda. Please tell me if you have any ideas :-)

Thank you!