On Tue, Nov 8, 2011 at 1:49 PM, PEREZ CERQUERA MANUEL RICARDO <span dir="ltr"><<a href="mailto:manuel.perezcerquera@polito.it">manuel.perezcerquera@polito.it</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<br>
<br>
I'm having problems with the efficiency of my code, I mean, it's taken so much time when I'm running in 2 processors than in 1 Processor. My guess is that the communications at low level inside PETSC Directives, because I'm generating the elements on wrong processes and this is killing me, moreover I'm over estimated my memory occupancy, so my questions are:<br>
</blockquote><div><br></div><div>Please send the output of -log_summary with all performance questions.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
1. For The Memory Occupancy , I Know the NonZero Pattern of my Matrix, so I'm calling<br>
CALL MatCreateMPIAIJ(PETSC_COMM_<u></u>WORLD,LocalNOfBEMFunctions,<u></u>LocalTotalRank,<u></u>NOfTotalBEMFunctions,<u></u>GlobalTotalRank,&<br>
PETSC_NULL_INTEGER,NNZ_<u></u>diagonal(:),&<br>
PETSC_NULL_INTEGER,NNZ_<u></u>outofdiagonal(:),UFar,ierr)<br>
So I have a doubt if when I'm doing this Should I specify just one NNZ_diagonal(:) or NNZ_outofdiagonal(:) ?, not both of them as I'm doing.<br></blockquote><div><br></div><div>Use MatSetOption(<span class="Apple-style-span" style="font-family: Times; background-color: rgb(255, 255, 255); font-size: medium; ">MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_TRUE</span>) to make sure you are not causing mallocs.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2. For the time efficiency, When I'm calling, MatSetValues() The Global Index is out of the range set in MatCreateMPIAIJ, I mean for example if the range is between 1 and 10 in a Matrix of 100 The Global index are let's say 1 20 25 2 5 60 85 90 100 3 so there are some elements out of the range, moreover I ran with -info option and I got this:<br>
[0] MatAssemblyBegin_MPIAIJ(): Stash has 84088 entries, uses 3 mallocs. And in the manual is written this actually means I'm generating entries in the wrong process,not because of the mollocs but because of the entries, Do I'm right ?<br>
</blockquote><div><br></div><div>You are sending a lot of values. I would reorganize my code to compute the values on the owner.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
So is this indeed not efficient?. If not, Can you suggest me a possible way to improve it? , Or there are some special way for indexing the elements in order to put them in order to solve the system?<br>
<br>
Thanks!<br>
<br>
Manuel.<br>
<br>
<br>
<br>
I realized with -info option in run time<br>
<br>
<br>
<br>
<br>
<br>
Eng. Manuel Ricardo Perez Cerquera. MSc. Ph.D student<br>
Antenna and EMC Lab (LACE)<br>
Istituto Superiore Mario Boella (ISMB)<br>
Politecnico di Torino<br>
Via Pier Carlo Boggio 61, Torino 10138, Italy<br>
Email: <a href="mailto:manuel.perezcerquera@polito.it" target="_blank">manuel.perezcerquera@polito.it</a><br>
Phone: <a href="tel:%2B39%200112276704" value="+390112276704" target="_blank">+39 0112276704</a><br>
Fax: <a href="tel:%2B39%20011%202276%20299" value="+390112276299" target="_blank">+39 011 2276 299</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>