X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/62ab7fd2280a35af7c36f602852bc53fc0a56093..0992a06d7845b577ac03500bbc555b21e92d6c1a:/examples/smpi/NAS/nas_common.c?ds=sidebyside diff --git a/examples/smpi/NAS/nas_common.c b/examples/smpi/NAS/nas_common.c index 51ac28f479..debb98a0b6 100644 --- a/examples/smpi/NAS/nas_common.c +++ b/examples/smpi/NAS/nas_common.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2016. The SimGrid Team. +/* Copyright (c) 2016-2019. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -78,22 +78,6 @@ void check_info(int type, int nprocs, char class) } } -void time_clear(double *onetimer) { - *onetimer = 0.0; -} - -void time_start(double *onetimer) { - *onetimer = MPI_Wtime(); -} - -void time_stop(int n,double *elapsed,double *start) { - elapsed[n] = MPI_Wtime()- start[n]; -} - -double time_read(int n, double *elapsed) { /* ok, useless, but jsut to keep function call */ - return(elapsed[n]); -} - void timer_clear(int n) { elapsed[n] = 0.0; @@ -117,8 +101,8 @@ double timer_read(int n) double vranlc(int n, double x, double a, double *y) { int i; - long i246m1=0x00003FFFFFFFFFFF; - long LLx, Lx, La; + uint64_t i246m1=0x00003FFFFFFFFFFF; + uint64_t LLx, Lx, La; double d2m46; // This doesn't work, because the compiler does the calculation in 32 bits and overflows. No standard way (without @@ -127,8 +111,8 @@ double vranlc(int n, double x, double a, double *y) d2m46=pow(0.5,46); - Lx = (long)x; - La = (long)a; + Lx = (uint64_t)x; + La = (uint64_t)a; //fprintf(stdout,("================== Vranlc ================"); //fprintf(stdout,("Before Loop: Lx = " + Lx + ", La = " + La); LLx = Lx;