pgprof : Message and bytes counts

Hi,

I try to use the MPI profiling statistics with pgprof and I’m having no results. I remember that with the cdk 5.2 (received CD), it was ok. Since 6.0, we don’t receive CDK CDs so I try the mpich_kit available on the web site.

My simple MPI_Send-Recv profiled test don’t count bytes and messages.

I’m using -Mprof=mpi,func, it gives a different exec from -Mprof=func (in size)

If the mpich_kit supports mpi profiling, could you give me a example that works?

Thanks a lot,

L-A

Hi L-A,

You do need a CDK license to use the MPI features of PGPROF with or without the MPICH Kit. I wondering if when your upgraded to 6.0 is you kept your CDK license? If you don’t know which license you have, please email trs@pgroup.com with your PGI PIN number and they can help.

I did verify that the Messages and Byte counts are available when compiling with “-Mprof=mpi,func”. However, you do need to select PGPROF’s “View” menu’s options “Message” and “Bytes” to make them visible.

Hope this helps,
Mat

Hi,

I finally found my problem… but it was a luck.

That’s how I compile with mpi:

pgcc -Mmpi send.c ( or mpicc)

and if I want it profiled, i will add the -Mprof arguments…

pgcc -Mmpi -Mprof=func,mpi


But it seems that -Mmpi is implicit. And if I write it, it don’t profile the mpi calls!!! This is a strange conflicts. It’s not natural to remove argument to add the profiling… and when I use mpicc, it don’t work either.

Me, I’ll never foget it !! but I think you should correct the situation in future version.

Thank you,

L-A

Hi L-A,


For clarification, do you mean that when using “-Mprof=mpi” that “-Mmpi” should be implicit, or do you mean when using “-Mmpi -Mprof” that the “-Mprof” suboption “mpi” should be implicit?

Thanks,
Mat

Hi Mat,

If my situation is ‘normal’… I think that someone who wants to profile the mpi calls should only have to add the the “-Mprof=mpi,func” to the compilation line who already looks like “pgf77 -Mmpi”.

The confusion came from the fact that I forgot to remove -Mmpi.

If we want to compile a profiled MPI program, it’s not trivial that we have to remove de -Mmpi flags…

L-A

Hi L-A,

You might have been confused by original response. I mentioned only “-Mprof=mpi,func” since it works with or without “-Mmpi”. I didn’t intend for you to think that “-Mmpi” needed to be removed. The two flags are not dependent upon each other. All “-Mmpi” does is add the default MPICH libraries at link time which could also be achived by using “mpicc” or adding the MPICH libraries directly on the link line.

  • Mat

Hi Mat,

I think that the 2 similar systems where I do my testing could have a config problem. But that’s what i got.

pgcc -Mmpi :
MPI only, no profile (ok!)

pgcc -Mmpi -Mprof-mpi,func :
MPI, I can look at the function profile for each process but i don’t see the messages and byte count

pgcc -Mprof-mpi,func
MPI, i can look at the function profile for each process and I see the messages and byte count
(ok)


All I try to explain is, if that behavior is common someone should change it. The command ‘pgcc -Mmpi -Mprof-mpi,func’ and ‘pgcc -Mprof-mpi,func’ should give the same binary.



L-A



this is the different dryrun output (only the diffs):

(-Mmpi and -Mprof=mpi,func)

-lpgnod_prof -lmpich -lpgnod_prof_mpi -lmpich -lpgftnrtl -lpgft nrtl -lc -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4//crtend.o /usr/lib64/crtn.o


(only -Mprof=mpi,func)
-lpgnod_prof -l pgnod_prof_mpi -lmpich -lpgftnrtl -lc -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/lib/gcc/x86_64-pc-linux- gnu/3.4.4//crtend.o /usr/lib64/crtn.o