[petsc-users] [petsc-maint #107932] run a simple example ex19 in src/snes/examples/tutorials

Xiangze Zeng zengshixiangze at 163.com
Tue Mar 13 03:37:59 CDT 2012


Hi, Matt. 


After I  configure PETSc using --with-precision=single, I can run both ex19 and my own code. Good news! But it seems lots of time is using for copping the data from CPU to GPU. 


In all, thank you for your generously help!


Zeng

在 2012-03-06 13:31:06,"Matthew Knepley" <petsc-maint at mcs.anl.gov> 写道:
2012/3/5 Xiangze Zeng <zengshixiangze at 163.com>

Hi, Matt. 


We know that when we compile the CUDA-C code, we use nvcc. But if we run the PETSc-CUDA code in GPU, what we do is just to change the type of Mat and Vec. In the PETSc-CUDA code compilings progress ,does it use nvcc? 


Yes.
 
And when implement the PETSc for using GPU, do you ever consider the comupute capibility of the GPU. And in which place, the parameter of the comupute capibility of the GPU has been set? 


You configure using --with-cuda-arch=sm_13 for instance, or compute_12.


And you have given me an idea what your problem is. The GeForce 310 has no double precision floating point units.
Therefore, you must configure PETSc using --with-precision=single.


    Matt
 
Thank you.
Zeng
 

在 2012-03-05 22:28:20,"Matthew Knepley" <petsc-maint at mcs.anl.gov> 写道:
On Mon, Mar 5, 2012 at 8:18 AM, Xiangze Zeng <zengshixiangze at 163.com> wrote:

Hi, Matt.
I have tried the method you told me( I closed all the X systems),but the same error still occurs. Is there something wrong with the installation of the  thrust?


And I find the same problem in several web pages, like this http://code.google.com/p/thrust/wiki/Debugging, they all say the error is related to the compute capability . Is that the case?  My GPU is GeForce 310, which supports compute capability 1.2 .



One of the downsides of CUDA, at least from our perspective, is that these errors are very
hard to debug. If thrust compiles and the cudaInit() succeeds, there is not much else we
can do to debug on this machine. Maybe you can try running thrust examples?


   Matt
 
Thank you.

在 2012-03-02 23:55:13,"Matthew Knepley" <petsc-maint at mcs.anl.gov> 写道:
On Fri, Mar 2, 2012 at 9:40 AM, Xiangze Zeng <zengshixiangze at 163.com> wrote:

Thank both of you, Satish and Jed.


This warning message has disappeared. But another problem occurs, it terminates with the same message as I run my own code:"
terminate called after throwing an instance of 'thrust::system::system_error'
what():  invalid device function
Aborted."
(Several days ago, I thought I run the ex19 successfully, but today I found I was totally wrong when I find the warning message in the PETSc Performance Summary. So sorry about that!)



Most likely, this a problem with another program locking your GPU (I assume you are running on your laptop/desktop). Start
closing apps one at a time (especially graphical ones like a PDF reader) and try running each time.


  Matt

May this new problem be related to the installation of the cuda( I can run cuda-C code successfully in my PC)?


Thank you again!
Zeng Xiangze

At 2012-03-02 23:18:19,"Satish Balay" <petsc-maint at mcs.anl.gov> wrote:
>On Fri, 2 Mar 2012, Xiangze Zeng wrote:
>

>> Dear all,
>>
>> After I have installed the PETSc to use the NVidia GPUS, I run the ex19. When I make ex19, it stopped with the message:
>>
>>
>> "makefile:24: /conf/variables: No such file or directory
>> makefile:25: /conf/rules: No such file or directory
>> makefile:1023: /conf/test: No such file or directory
>> make: *** No rule to make target `/conf/test'.  Stop."
>>
>>
>> Then I add the PETSC_DIR to the makefile. After that, I made ex19 successfully. But when I run it using the command :
>

>Yes - you need PETSC_DIR/PETSC_ARCH values to be specified to
>make. You can set these as env variables - or specify to make on the
>command line - or add to makefile. [we recommended not modifying the
>makefile - to keep it portable..]
>
>>
>>

>> "./ex19 -da_vec_type mpicusp -da_mat_type mpiaijcusp -pc_type none -dmmg_nlevels 1 -da_grid_x 100 -da_grid_y 100 -log_summary -mat_no_inode -preload off  -cusp_synchronize".
>>
>>
>> In the  PETSc Performance Summary, it says:"
>> WARNING! There are options you set that were not used!
>> WARNING! could be spelling mistake, etc!
>> Option left: name:-da_mat_type value: mpiaijcusp
>> Option left: name:-da_vec_type value: mpicusp"
>

>Looks like the options are now changed to -dm_mat_type and -dm_vec_type.
>
>Satish
>
>>
>>

>> Is there any problem with it?
>> Any response will be appreciated! Thank you so much!
>>
>>
>> Zeng Xiangze
>>
>>
>>
>>
>>
>>
>>
>







--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener







--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener









--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120313/4ff44b88/attachment.htm>


More information about the petsc-users mailing list