Paper Critique 1

Mohammad Ali Farazdaghi

ELEC873

A Large-Scale Study of MPI Usage in Open-Source HPC Applications

Ignacio Laguna, Ryan Marshall, Kathryn Mohror, Martin Ruefenacht, Anthony Skjellum, Nawrin Sultana

‌Before We Start

Will not discuss:

  1. Most charts
  2. Time-Based Analysis (6)
  3. Complexity Analysis (7)
  4. Programming Model Analysis (8)

What they've done:

  1. Taken 100+ opensource projects using MPI
  2. Figured out MPI call usage statistics
  3. Labeled each program

There are 13 labels:

  • Uses P2P Comms
  • Uses Collective Comms
  • Uses FileIO
  • ...

How They've done it:

  1. Run mpiusage.py on each project
    • Performs static source code analysis
    • Figures which MPI symbols are used
    • All done using regexs
  2. Label projects accordingly

$ ./mpiusage.py /path/to/project/src/
{"MPI_COMM_SIZE": 3, "MPI_REDUCE": 3, "MPI_WAITALL": 2,
 "MPI_WAIT": 116, "MPI_COMM_RANK": 15, "MPI_ALLREDUCE": 3,
"MPI_INIT": 3, "MPI_FINALIZE": 3, "MPI_ABORT": 12, "MPI_WTIME":
3, "MPI_IRECV": 26, "MPI_ISEND": 52, "MPI_BARRIER": 3,
"OPENMP": 0, "OPENACC": 0, "CUDA": 168, "OPENCL": 0,
"C_LINES": 0, "CPP_LINES": 297, "C_CPP_H_LINES": 365,
"FORTRAN_LINES": 0, "LINES_OF_CODE": 14574}
            
How did they figure out MPI Usage statistics?

Static Source Code Analysis!

Static Analysis?

Types of Program Analysis

  1. Static Analysis
    Static Source Code Analysis
  2. Dynamic Analysis

Strengths

A Large Sample Size (100+)

→ Interesting Results
  • C++ is the most popular
  • 90% of all projects use P2P comms
  • Most use MPI 1

Weaknesses

  • Static sourcecode analysis may be too simplistic
    • Behaviors that depend on runtime env
    • Deadcode
    • Compile time switches
  • C++'s grammar is Turing Complete
  • What's in mpiusage.py?

Runtime Dependent behavior

in OpenFOAM

OpenFoam labels:

  • P2P
  • Collective
  • Comm Group

void Foam::reduce(..., ...., ...., ...., ....) {
#ifdef MPIX_COMM_TYPE_SHARED
  MPIX_Ireduce(...);
#else
  reduce(..., ...., ...., ....); // -> allReduce(...)
#endif
}
            
OpenFOAM-dev/src/Pstream/mpi/UPstream.C

void Foam::allReduce(...) {
  if (small_enough()) {
    // use p2p: MPI_Recv, MPI_Send
  } else {
    MPI_Allreduce(...); }
}
            
OpenFOAM-dev/src/Pstream/mpi/UPstream.C

if (almost_always_returns_false()) {
  MPI_Rare_API(...);
}
            

for (size_t i = 0; i < very_large_runtime_val; i++) {
   MPI_Rare_API(...);
}
            

#ifdef USE_EXOTIC_HW_FEATURE_X
   MPI_Rare_API(...);
#endif
            

Couldn't Find mpiusage.py anywhere

Cannot reproduce results

Not sure how they parsed C++

with regexes!

Q/A

Refs are hyperlinked