如何使用 mpi 检查并行和非并行编程之间的区别

How to check difference between parallel and non parallel programming using mpi

如何确认我用MPI写的并行程序比用非并行方法写的程序快

您可以使用MPI_Wtime() to time you program. Here is an example. Profiling tools may provide you with a more detailed result. Take a loop at this question : Good profiler for Fortran and MPI