GithubHelp home page GithubHelp logo

mpi-pi's Introduction

MPI-PI

MPICH2 并行计算π

一、 实验目的 1、 学习并行计算的初步方法。 二、 实验内容 用多种方法完成π的并行计算。 三、 实验环境 Windows7,VS2017,C,MPSMPI 四、 实验结果

  1. 面积积分:

  2. 幂级数:

  3. 改进的幂级数

  4. 蒙特卡洛方式

  5. 随机积分方式

五、 附录 1) 五种方式的比较 精度标准:3.141592653589793238462643 方法名称 进程数 总任务数 是否达到目标精度 耗时/s 最高精度 面积积分法 4 1000000000 否 24.08897 12位 幂级数 4 1000000000 否 18.9288 7位 改进幂级数 4 100 是 0.0049 3000位 蒙特卡洛法 4 1000000000 否 18.0062 6位 随机积分法 4 100000000 否 49.9666 4位 从上表可以看出改进幂级数方式的效率远超其他方法,只用了0.0049s,就能达到目标的25位精度,而且最高至少能达到3000位精度。

2) 不同进程数和总任务数的比较(以改进幂级数方式为例) 进程数 总任务数 是否达到目标精度 耗时/s 最高精度 4 100 是 0.528791 3000位 4 1000 是 6.720964 4000位 4 10000 是 86.92118 5000位 2 1000 是 8.695204 4000位 8 1000 是 6.062414 4000位

mpi-pi's People

Contributors

lang22 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

xcatf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.