2012/3/16 Xiangze Zeng <zengshixiangze at 163.com> > After I changed the Mat type for using GPU, can I still > use MatMPIAIJSetPreallocation to set preallocation? >
Yes, the code looks okay to me. > > 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. > You are running in serial so you should also call MatSeqAIJSetPreallocation(). The MPI allocation information is skipped because it's not an MPI matrix. It is safe to call all the preallocation routines, whichever matches will be used. Alternatively, you could call this function which will do all the variants for you: http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatXAIJSetPreallocation.html -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120316/b186adc9/attachment.htm>
