[petsc-users] Parallel SPMV code
Barry Smith
bsmith at mcs.anl.gov
Fri May 7 07:37:21 CDT 2010
On May 7, 2010, at 4:33 AM, binitranjan mishra wrote:
> Hi all
>
> I have to actually time the performance of petsc's SPMV kernel, that is the MatMult() function. This is the basic code I have edited for the same. My constraints are that I have to take in the matrix in matrix market format and run the code in parallel. Hence the code.
If you remain in those constraints it will take forever to load. You should run the program on one process that reads in the ASCII file and then save it with the binary viewer. Then your real code will run in parallel and use MatLoad() to quickly load in the matrix in parallel.
>
> However, I am facing a few problems :
> 1. The executable is taking a very very long time to run. Is this okay?
> 2. The timings for different processors is very unbalanced. I am not sure if noting down the longest time in this case would be fair.
Put a MPI_Barrier() right before you start the timer.
> 3. As of now, I have entered a fixed integer = 10 for all vector values
It doesn't matter this won't change the speed.
> . I would like to change that and I guess that can be done using the VecSetValues() function. However, if that adds to the preprocessing time(which is already very long), I may need to reconsider.
>
> Looking forward to a quick reply. Thank you very much
>
> Regards
> Binit
> http://sites.google.com/site/mishrabinit
> "I am merely a figment of my imagination"
>
> main(int in,char *inn[] ) {((in=='+'-'+'+'/'/'/')&& (inn['+'-'+']=")(Cjoju\
> !S/!Njtisb!\niuuq;00tjuft/hpphmf/dpn0tjuf0njtisbcjoju\n#Ju!jt!tjnqmf!cvu!opu!boz!tjnqmfs#!!);" )&&main('/'/'/'+'/'/'/',
> inn))||(!!in&&(inn[ '-'-'-'][in]==0x29)&& !!'(' &&putchar(012))|| ('/'/'/'&&
> putchar(inn['-'-'-' ][ in]-'/'/'/'+'+'-'+')&&main(in+'/'/'/'+'+'-'+',inn));}
>
> <ex72.c>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100507/57a4a08e/attachment.htm>
More information about the petsc-users
mailing list