MPI-Checker - Static Analyzer

Hi everyone,

I've written a Static Analyzer Checker for MPI code
which is published on GitHub https://github.com/0ax1/MPI-Checker.
Aside from those wanting to analyze their MPI code maybe this could also be useful for people starting to write their own checker.

Best regards,
Alex

Hi Alex,

Thanks for posting this! If you're willing to go through the code review process (which might include breaking it into pieces), and Ted, et al., agree, I'd love to see this functionality upstream. Not only may it be great example code (I'll let Ted and Anna make that determination), but MPI is *the* critical interface for almost all large-scale parallel scientific programming, and the potential audience for this checker is sizable. I'm certainly willing to help with the code review as well.

I'll mention for those unfamiliar, that MPI is an active committee-developed specification (http://mpi-forum.org/docs/docs.html) for high-performance message passing with numerous implementations (both open source and from many vendors). The first version of the specification was published in 1994, and the latest version published in 2012.

-Hal

+1!

I think it should go in with the other checkers. MPI is really
critical to science, defence, climate models, etc. It would be good to
have some tools to go with.

Would this be in clang-tools-extra? Or clang-tools itself?

cheers,
--renato

It would be a great addition to the static analyzer.

Regarding the checks, Clang already can check buffer type and type tag
mismatches:

http://clang.llvm.org/docs/AttributeReference.html#type-safety-checking

See also the clang/test/Sema/warn-type-safety* tests.

Dmitri

Hi Hal,

thanks a lot for your motivating response!
I'm not very experienced in code reviews but I'd be excited to take the chance and of course I'd love to see this upstream too :D.

Best regards,
Alex

Hi Dmitri,

Hi everyone,

I've written a Static Analyzer Checker for MPI code
which is published on GitHub https://github.com/0ax1/MPI-Checker.
Aside from those wanting to analyze their MPI code maybe this could also be
useful for people starting to write their own checker.

It would be a great addition to the static analyzer.

Regarding the checks, Clang already can check buffer type and type tag
mismatches:

http://clang.llvm.org/docs/AttributeReference.html#type-safety-checking

I didn't know about that. Thanks for pointing out!

See also the clang/test/Sema/warn-type-safety* tests.

Dmitri

Best regards,
Alex

Hi everyone,

because of the code being part of my bachelor thesis,
I have to delay sending the patch and doing a review
until my thesis is submitted.
Thanks again for all the encouraging response.

Best regards,
Alex

Hi Alex,

Thanks for posting this! If you're willing to go through the code review
process (which might include breaking it into pieces), and Ted, et al.,
agree, I'd love to see this functionality upstream. Not only may it be
great example code (I'll let Ted and Anna make that determination), but MPI
is *the* critical interface for almost all large-scale parallel scientific
programming, and the potential audience for this checker is sizable. I'm
certainly willing to help with the code review as well.

I'll mention for those unfamiliar, that MPI is an active
committee-developed specification (http://mpi-forum.org/docs/docs.html)
for high-performance message passing with numerous implementations (both
open source and from many vendors). The first version of the specification
was published in 1994, and the latest version published in 2012.

Is MPI related to OpenMP in any way? Are they complementary? competing?

Sorry, but a quick googling didn't turn up a clear answer. It seems like
OpenMP is within a single machine and MPI is across machines or something
like that?

-- Sean Silva

From: "Sean Silva" <chisophugis@gmail.com>
To: "Hal Finkel" <hfinkel@anl.gov>
Cc: "Alexander Droste" <alexander.ra.droste@googlemail.com>, "Clang" <cfe-dev@cs.uiuc.edu>
Sent: Tuesday, June 2, 2015 3:37:04 PM
Subject: Re: [cfe-dev] MPI-Checker - Static Analyzer

Hi Alex,

Thanks for posting this! If you're willing to go through the code
review process (which might include breaking it into pieces), and
Ted, et al., agree, I'd love to see this functionality upstream. Not
only may it be great example code (I'll let Ted and Anna make that
determination), but MPI is *the* critical interface for almost all
large-scale parallel scientific programming, and the potential
audience for this checker is sizable. I'm certainly willing to help
with the code review as well.

I'll mention for those unfamiliar, that MPI is an active
committee-developed specification (
http://mpi-forum.org/docs/docs.html ) for high-performance message
passing with numerous implementations (both open source and from
many vendors). The first version of the specification was published
in 1994, and the latest version published in 2012.

Is MPI related to OpenMP in any way? Are they complementary?
competing?

Complementary. MPI+OpenMP is a very popular programming model now.

Sorry, but a quick googling didn't turn up a clear answer. It seems
like OpenMP is within a single machine and MPI is across machines or
something like that?

Correct.

-Hal

Hi Sean,

I would say they work complementary.
In general OpenMP works with shared memory (within a computing node)
while MPI works with distributed memory (communication between nodes).

Best Regards,
Alex