From 76357b0517f41b14a036e9a95036419e3e23fa39 Mon Sep 17 00:00:00 2001 From: Elif Ecem BAS Date: Tue, 31 Jul 2018 13:13:09 -0700 Subject: [PATCH] PI.c initial import --- Code/Parallel/mpi/PI.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Code/Parallel/mpi/PI.c diff --git a/Code/Parallel/mpi/PI.c b/Code/Parallel/mpi/PI.c new file mode 100644 index 0000000..c4f3eaa --- /dev/null +++ b/Code/Parallel/mpi/PI.c @@ -0,0 +1,14 @@ +#include + +static int long numSteps=100000; + +void main() { + int i; double step,x,sum=0.0,pi; + step=1.0/numSteps; + for (i=0; i