[petsc-dev] CMake-assisted CUDA builds ready

Karl Rupp rupp at mcs.anl.gov
Tue Mar 26 09:50:40 CDT 2013


Hi Jose,

No need to send the logs, I can see the problem: Something is going 
wrong when dealing with double-quotes.
The flag string

  --compiler-options 
,\"-fPIC\",\"-Wall\",\"-Wwrite-strings\",\"-Wno-strict-aliasing\",\"-Wno-unknown-pragmas\",\"-O\"

gets passed through BuildSystem, which tries to put double quotes around 
it. This leads to

  " --compiler-options 
,"-fPIC\",\"-Wall\",\"-Wwrite-strings\",\"-Wno-strict-aliasing\",\"-Wno-unknown-pragmas\",\"-O\" 
\"

instead of

  " --compiler-options 
,\"-fPIC\",\"-Wall\",\"-Wwrite-strings\",\"-Wno-strict-aliasing\",\"-Wno-unknown-pragmas\",\"-O\" 
"

and thus the compiler complains. For some reasons the issue does not 
show up on my machine, even though I have the same versions of CMake and 
CUDA. I'll try to track it down.

Best regards,
Karli


On 03/26/2013 09:40 AM, Jose E. Roman wrote:
> I get errors in the cmake build (in 'next'):
>
> /usr/local/cuda/bin/nvcc /home/jroman/soft/petsc/src/mat/impls/aij/mpi/mpicusparse/mpiaijcusparse.cu " -O -arch=sm_13 " "--compiler-options ," -fPIC\",\"-Wall\",\"-Wwrite-strings\",\"-Wno-strict-aliasing\",\"-Wno-unknown-pragmas\",\"-O\" \" -m64 -D__INSDIR__= -Dpetsc_EXPORTS -Xcompiler ,\"-fPIC\" -DNVCC -M -o /home/jroman/soft/petsc/arch-linux-gnu-c-opt-cuda/CMakeFiles/petsc_generated_mpiaijcusparse.cu.o.NVCC-depend -I/usr/local/cuda/include -I/home/jroman/soft/petsc/include -I/home/jroman/soft/petsc/arch-linux-gnu-c-opt-cuda/include -I/usr/local/cuda/include -I/home/jroman/soft/petsc/arch-linux-gnu-c-opt-cuda/include/txpetscgpu/include -I/home/jroman/soft/cusplibrary -I/home/jroman/soft/cusplibrary/include -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi
> nvcc fatal   : Unknown option '-compiler-options ,'
> CMake Error at CMakeFiles/petsc_generated_aijcusparse.cu.o.cmake:173 (message):
>    Error generating
>    /home/jroman/soft/petsc/arch-linux-gnu-c-opt-cuda/./petsc_generated_aijcusparse.cu.o
>
>
> I have cmake-2.8 and cuda-4.2.
>
> Configure options: --download-txpetscgpu --with-cuda=1 --with-cusp-dir=/home/jroman/soft/cusplibrary --with-cusp=1 --with-debugging=0 --with-thrust=1
>
> I can send the logs to petsc-maint if you want.
>
> Jose
>




More information about the petsc-dev mailing list