[petsc-users] Newbie Question - Really slow - PetscMemCpy

Parker, Andrew (UK Filton) Andrew.Parker2 at baesystems.com
Thu Apr 22 07:33:42 CDT 2010


Hi,
 
I'm new to these postings.  On very large cases, regardless of where I
stop the debugger it is always copying data.  I've put it into a
debugger because on smaller cases it runs fine, on larger it takes a
while (very long time) to get going.  The stack trace always gives
something like:
 
memcpy
PetscMemCpy
MatSetValues_SeqAIJ
MatSetValues
my own wrapper to add values to a location within the matrix.
 
I'm using Seq_BAIJ.  My bets are that I've got the sparsity wrong, or
the preallocation wrong, but I'm not sure why.  I know this could be
anything, but has anybody got any thoughts, remember stopping the
debugger at random, regardless of the frequency always gives the
above....
 
I set up the matrix like this
 
  MatCreate(PETSC_COMM_SELF,&_storage);
 
MatSetSizes(_storage,PETSC_DECIDE,PETSC_DECIDE,numVars*numLocs,numVars*n
umLocs);
  MatSetFromOptions(_storage);
  MatSeqBAIJSetPreallocation(_storage,numVars,PETSC_NULL,sparsityStart);
 
However, using this makes zero difference to the speed
 
   MatCreateSeqBAIJ(PETSC_COMM_SELF,
      numVars,
      numVars*numLocs,
      numVars*numLocs,
      0,  
       sparsityStart,
      &_storage);
 
It is so slow that it has not even completed one cycle of the solver....
 
Cheers again,
Andy

********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100422/7d6572c7/attachment.htm>


More information about the petsc-users mailing list