[cig-commits] r22832 - seismo/2D/SPECFEM2D/trunk/src/meshfem2D/scotch_5.1.12b/src/libscotch
dkomati1 at geodynamics.org
dkomati1 at geodynamics.org
Sat Sep 21 03:58:53 PDT 2013
Author: dkomati1
Date: 2013-09-21 03:58:53 -0700 (Sat, 21 Sep 2013)
New Revision: 22832
Modified:
seismo/2D/SPECFEM2D/trunk/src/meshfem2D/scotch_5.1.12b/src/libscotch/common.c
Log:
slightly modified patch for MAC OS sent by Francois Pellegrini
Modified: seismo/2D/SPECFEM2D/trunk/src/meshfem2D/scotch_5.1.12b/src/libscotch/common.c
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/meshfem2D/scotch_5.1.12b/src/libscotch/common.c 2013-09-21 10:56:51 UTC (rev 22831)
+++ seismo/2D/SPECFEM2D/trunk/src/meshfem2D/scotch_5.1.12b/src/libscotch/common.c 2013-09-21 10:58:53 UTC (rev 22832)
@@ -8,13 +8,13 @@
** use, modify and/or redistribute the software under the terms of the
** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
-**
+**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
-**
+**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
@@ -25,7 +25,7 @@
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
-**
+**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-C license and that you accept its terms.
*/
@@ -49,6 +49,8 @@
/** to 27 sep 2004 **/
/** # Version 5.1 : from : 27 jun 2010 **/
/** to 23 nov 2010 **/
+/** # Version 6.0 : from : 21 sep 2013 **/
+/** to 21 sep 2013 **/
/** **/
/************************************************************/
@@ -102,18 +104,19 @@
return (((double) data.ru_utime.tv_sec + (double) data.ru_stime.tv_sec) +
((double) data.ru_utime.tv_usec + (double) data.ru_stime.tv_usec) * 1.0e-6L);
#else /* COMMON_TIMING_OLD */
+#if defined (_POSIX_TIMERS) && (_POSIX_TIMERS >= 200112L)
struct timespec tp;
-#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0
- clock_gettime(CLOCK_REALTIME, &tp);
-#else
- struct timeval tv;
- gettimeofday(&tv, NULL);
- tp.tv_sec = tv.tv_sec;
- tp.tv_nsec = tv.tv_usec * 1000;
-#endif
+ clock_gettime (CLOCK_REALTIME, &tp); /* Elapsed time */
return ((double) tp.tv_sec + (double) tp.tv_nsec * 1.0e-9L);
+#else /* defined (_POSIX_TIMERS) && (_POSIX_TIMERS >= 200112L) */
+ struct timeval tv;
+
+ gettimeofday (&tv, NULL);
+
+ return ((double) tv.tv_sec + (double) tv.tv_usec * 1.0e-6L);
+#endif /* defined (_POSIX_TIMERS) && (_POSIX_TIMERS >= 200112L) */
#endif /* COMMON_TIMING_OLD */
#endif /* MPI_INT */
}
More information about the CIG-COMMITS
mailing list