[petsc-users] Unable to configure PETSc with CUDA: Problem with thrust directory

Christophe Ortiz christophe.ortiz at ciemat.es
Mon Sep 1 06:15:01 CDT 2014


On Mon, Sep 1, 2014 at 12:56 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Mon, Sep 1, 2014 at 3:56 AM, Christophe Ortiz <
> christophe.ortiz at ciemat.es> wrote:
>
>> Hi all,
>>
>> Thanks a lot for your answers.
>>
>> I followed Satish's advice and downloaded pets-dev. Then I tried to
>> configure it with CUDA 6.0. It complained because I did not have flex
>> installed, no big deal. Then it complained because it prefers GNU compilers
>> than Intel ones, no big deal.
>>
>> This being fixed, I was able to configure and compile pets-dev with CUDA
>> 6.0. There was no problem due to deprecated arch or thrust directory.
>>
>> I configured it with the following options:
>>
>> --with-x=1 --with-mpi=0 --with-cc=gcc --with-cxx=g++ --with-clanguage=cxx
>> --with-fc=gfortran --with-cuda=1 --with-cuda-dir=/usr/local/cuda-6.0
>> --with-cuda-arch=sm_35 --with-thrust=1
>> --with-thrust-dir=/usr/local/cuda-6.0/include/thrust --with-cusp=1
>> --with-cusp-dir=/usr/local/cuda-6.0/include/cusp --with-debugging=1
>> --with-scalar-type=real --with-precision=double --download-fblaslapack
>>
>>
>> Now this is done, how should I port my code to use it with CUDA ? Should
>> I change something and include some CUDA directives in the code ? Is there
>> some examples of makefile with nvcc that I could use ?
>>
>
> You just change the types of objects to those that use the GPU.
> See here: http://www.mcs.anl.gov/petsc/features/gpus.html
>
>
Thanks.

I will have a look at it. I also found the examples in the /src/. Will try
to inspire from what is done.

Christophe


>   Thanks,
>
>    Matt
>
>
>> Thanks in advance.
>> Christophe
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140901/44f48e15/attachment.html>


More information about the petsc-users mailing list