diff --git a/OpenMP/mppi.c b/OpenMP/mppi.c index 3b5151c56b3fd63b397c3553192de454ef9fb288..53e2c26af657f0c82a5424cef6d2c78ac2ac7c13 100644 --- a/OpenMP/mppi.c +++ b/OpenMP/mppi.c @@ -8,11 +8,12 @@ #include <stdio.h> #include <time.h> #include <omp.h> +#include <stdint.h> -#define NPTS 1000000000 +#define NPTS 100000000000 void main() { - int i; + uint64_t i; double a,b,c,pi,dt,mflops; struct timespec tstart,tend; clock_gettime(CLOCK_REALTIME,&tstart); @@ -27,6 +28,6 @@ void main() { clock_gettime(CLOCK_REALTIME,&tend); dt = (tend.tv_sec+tend.tv_nsec/1e9)-(tstart.tv_sec+tstart.tv_nsec/1e9); mflops = NPTS*5.0/(dt*1e6); - printf("NPTS = %d, pi = %f, threads = %d\n",NPTS,pi,omp_get_max_threads()); + printf("NPTS = %ld, pi = %f, threads = %d\n",NPTS,pi,omp_get_max_threads()); printf("time = %f, estimated MFlops = %f\n",dt,mflops); }