[petsc-dev] make -j not supported? Why???

Karl Rupp rupp at mcs.anl.gov
Sat Mar 2 15:49:17 CST 2013


Hi,

>     It is possible, but you cannot specify nvcc as CMAKE_CXX_COMPILER,
>     but instead the script is doing some magic hackery replacing the
>     C++-compiler with nvcc if the file extension is .cu.
>
>     (I consider this to be a hack rather than a clean solution, but
>     that's the status quo)
>
>
> Yeah, we've discussed this a few times before. FindCUDA.cmake is a total
> hack and it always looked to me like trying to use it would cause other
> conflicts, but perhaps not.

We can give it a try. Since we use the .cu-extension, it should work 
fine. I've once tried to integrate nvcc with CMake to compile CUDA-code 
in .cpp-files, and this is where things get really bad.


> CMake's stupid design does not let you add proper languages from
> cmake-script, and since very few community members write C++ for CMake,
> it's not surprising that it was hacked up in cmake-script. Now that the
> hack exists, Kitware is using it as an excuse to not bother doing it right.

Agree. I think I should finally file a bug report at Kitware about nvcc 
failing to be recognized as a C++ compiler. Not that I expect any 
reaction, but I want to make sure they are aware of the issue.

Best regards,
Karli




More information about the petsc-dev mailing list