上传者: beginer09
|
上传时间: 2021-10-03 16:31:18
|
文件大小: 13KB
|
文件类型: -
#include
#include
#include "mpi.h"
double f(double x) {
return (4.0 / (1.0 + x*x));
}
int main(int argc, char *argv[]) {
int numprocs, myid;
int namelen;
char processor_name[MPI_MAX_PROCESSOR_NAME];
int n=0, i;
double startwtime, endwtime;
double h, sum, x, my