nvcc "command line is too long" on windows

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
eduardotsimoes
Posts: 6
Joined: Wed Aug 28, 2019 3:28 am

nvcc "command line is too long" on windows

Post by eduardotsimoes » Wed Aug 28, 2019 3:38 am

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.

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

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

Post by mgates3 » Wed Aug 28, 2019 10:19 am

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

eduardotsimoes
Posts: 6
Joined: Wed Aug 28, 2019 3:28 am

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

Post by eduardotsimoes » Mon Sep 02, 2019 8:36 am

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?

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

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

Post by mgates3 » Mon Sep 02, 2019 1:17 pm

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

eduardotsimoes
Posts: 6
Joined: Wed Aug 28, 2019 3:28 am

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

Post by eduardotsimoes » Fri Sep 20, 2019 9:58 am

Thanks a lot,

Now everything is working.

Post Reply