kokkos / kokkos-kernels

Kokkos C++ Performance Portability Programming Ecosystem: Math Kernels - Provides BLAS, Sparse BLAS and Graph Kernels
Other
303 stars 96 forks source link

Windows-LLVM build problem: Sparse_spgemm_symbolic_eti_FLOAT_ORDINAL_INT_OFFSET_SIZE_T_LAYOUTLEFT_EXECSPACE_OPENMP_MEMSPACE_HOSTSPACE_MEMSPACE_HOSTSPACE.cpp.obj not found #979

Open jrobcary opened 3 years ago

jrobcary commented 3 years ago

With the fixes, kokkos PRs 4014 and 4029, kokkos-kernels PR #958, and and trilinos PR 9123, and adding the changes from the file, graph.txt, added to kokkos-kernels issue #978, this is the last remaining issue for building the new trilinos stack on Windows-LLVM without CUDA. The error is

LINK : fatal error LNK1181: cannot open input file 'CMakeFiles\kokkoskernels.dir\impl\generated_specializations_cpp\spgemm_symbolic\Sparse_spgemm_symbolic_eti_FLOAT_ORDINAL_INT_OFFSET_SIZE_T_LAYOUTLEFT_EXECSPACE_OPENMP_MEMSPACE_HOSTSPACE_MEMSPACE_HOSTSPACE.cpp.obj'

The file is clearly there. Could be something with filename length limits on Windows?

jrobcary commented 3 years ago

We believe we have found the problem.

'CMakeFiles\kokkoskernels.dir\impl\generated_specializations_cpp\spgemm_symbolic\Sparse_spgemm_symbolic_eti_FLOAT_ORDINAL_INT_OFFSET_SIZE_T_LAYOUTLEFT_EXECSPACE_OPENMP_MEMSPACE_HOSTSPACE_MEMSPACE_HOSTSPACE.cpp.obj'

occurs because the file name is too long, it seems. If after configuring we move the above file to Sparse_spgemm_symbolic_eti_FLOAT_INT_SIZE_T_LAYOUTLEFT_OPENMP_HOSTSPACE_HOSTSPACE.cpp.obj, it gets past this error and hits the next long file name.

So this provides a proposed fix, which is to modify kokkoskernels_eti.cmake so that only types, not names of types, are appended to make the filename. I.e., remove ORDINAL, OFFSET, EXECSPACE, MEMSPACE.