Commit 50ed58e8 authored by Neil Gershenfeld's avatar Neil Gershenfeld

wip

parent 08739f7e
Pipeline #3945 passed with stage
in 1 second
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <mpi.h> #include <mpi.h>
#include <sys/time.h> #include <sys/time.h>
#define NPTS 1000000000 #define NPTS 10000000000
void main(int argc, char** argv) { void main(int argc, char** argv) {
int rank,nproc,i,istart,iend; int rank,nproc,i,istart,iend;
...@@ -31,7 +31,7 @@ void main(int argc, char** argv) { ...@@ -31,7 +31,7 @@ void main(int argc, char** argv) {
start_time = start.tv_sec * 1e6 + start.tv_usec; start_time = start.tv_sec * 1e6 + start.tv_usec;
end_time = end.tv_sec * 1e6 + end.tv_usec; end_time = end.tv_sec * 1e6 + end.tv_usec;
mflops = NPTS*(5.0/(end_time-start_time)); mflops = NPTS*(5.0/(end_time-start_time));
printf("processes = %d, NPTS = %d, pi = %f\n",nproc,NPTS,pi); printf("processes = %d, NPTS = %ld, pi = %f\n",nproc,NPTS,pi);
printf("time = %f, estimated MFlops = %f\n",(end_time-start_time)/1.0e6,mflops); printf("time = %f, estimated MFlops = %f\n",(end_time-start_time)/1.0e6,mflops);
} }
else { else {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <sys/time.h> #include <sys/time.h>
#include <stdint.h> #include <stdint.h>
#define NPTS 100000000 #define NPTS 10000000000
#define NLOOP 10 #define NLOOP 10
void main(int argc, char** argv) { void main(int argc, char** argv) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment