Page 1 of 1

nvcc "command line is too long" on windows

Posted: Wed Aug 28, 2019 3:38 am
by eduardotsimoes
Hello,

I am trying to compile MAGMA on windows. I am having a problem related to the maximum number of characters. When doing the device linking of the object magma_intermediate_link.obj, NVCC sends an error "command line is too long". I saw this is a problem with cmake deals with CUDA long commands. I created this issue for cmake : https://gitlab.kitware.com/cmake/cmake/issues/19647.

I searched on this forum the same problem, but I found nothing. Does anyone had the same issue?

Best Regards,
Eduardo.

Re: nvcc "command line is too long" on windows

Posted: Wed Aug 28, 2019 10:19 am
by mgates3
I haven't seen this, but usually use the Makefile, not CMake. When I use CMake on Windows, I use MS Visual Studio (the free version works fine). I gather you run CMake to configure MAGMA. What build system do you use after configuring with CMake: Makefile, MS Visual Studio, ...?
-mark

Re: nvcc "command line is too long" on windows

Posted: Mon Sep 02, 2019 8:36 am
by eduardotsimoes
Hello,

I used the Visual Studio and NMake as the generator. In both the same error.

With NMake, I could break the object maga_intermediate_link.onj in two. This worked fine.

But, when I tried to compile the magma_sparse, I realized there were no symbols being exported. Looking at the code, I realize that there weren't any __declspec and no DEF files. Is there anything I am missing?

Re: nvcc "command line is too long" on windows

Posted: Mon Sep 02, 2019 1:17 pm
by mgates3
From a magma/build directory, try:

Code: Select all

cmake -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE -DBUILD_SHARED_LIBS=TRUE ..
This assumes CMake >= 3.4.
See https://blog.kitware.com/create-dlls-on ... l-feature/

-mark

Re: nvcc "command line is too long" on windows

Posted: Fri Sep 20, 2019 9:58 am
by eduardotsimoes
Thanks a lot,

Now everything is working.