并行计算算法示例(C语言源码)
#include
#include
#include"mpi.h"
doublef(doublex){
return(4.0/(1.0+x*x));
}
intmain(intargc,char*argv[]){
intnumprocs,myid;
intnamelen;
charprocessor_name[MPI_MAX_PROCESSOR_NAME];
intn=0,i;
doublestartwtime,endwtime;
doubleh,sum,x,my
下载地址
用户评论
不错不错,挺有价值