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

Xiangze Zeng zengshixiangze at 163.com
Fri Mar 16 09:35:22 CDT 2012


After I changed the Mat type for using GPU, can I still use MatMPIAIJSetPreallocation to set preallocation?


I have add Petsc events in the code.The attachments are the outputs of log_summary (I'll configure --with-debugging=no later).
The fileinterface.c is my code in which set preallocation and insert matrices values.


Thank you.


Zeng


在 2012-03-16 19:43:38,"Jed Brown" <jedbrown at mcs.anl.gov> 写道:

2012/3/15 Xiangze Zeng <zengshixiangze at 163.com>

I can see log_summary output when I use -log_summary [filename].


But the time of inserting the matrices values is almost the same when I use PCJACOBI  to run the code on GPU instead of PCSOR.They are all much longer than that when I run the code in CPU(I still use a small system to test it). The attachments are outputs of log_summary, c_jacobi_sum is the output of using CPU, PCJACOBI;g_sor_sum using GPU, PCSOR;g_jac_sum using GPU, PCJACOBI. 


      ##########################################################
      #                                                        #
      #                          WARNING!!!                    #
      #                                                        #
      #   This code was compiled with a debugging option,      #
      #   To get timing results run ./configure                #
      #   using --with-debugging=no, the performance will      #
      #   be generally two or three times faster.              #
      #                                                        #
      ##########################################################


It's a waste of time to look at performance of a debug build, especially when it only takes half a second.


You have probably lost preallocation information. I don't see an assembly event, so I can't tell if that is really where the time is. (SNES makes one automatically, you can PetscLogEventRegister(), PetscLogEventBegin/End().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120316/00018d7e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c_jac_sum
Type: application/octet-stream
Size: 9639 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120316/00018d7e/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c_sor_sum
Type: application/octet-stream
Size: 9644 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120316/00018d7e/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: g_jac_sum
Type: application/octet-stream
Size: 9992 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120316/00018d7e/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: g_sor_sum
Type: application/octet-stream
Size: 10007 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120316/00018d7e/attachment-0007.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fileinterface.c
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120316/00018d7e/attachment-0001.diff>


More information about the petsc-users mailing list