[cig-commits] [commit] devel: fixed the timing routine of SCOTCH that did not compile on MacOS (0479069)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Sat Oct 18 10:23:36 PDT 2014


Repository : https://github.com/geodynamics/specfem3d

On branch  : devel
Link       : https://github.com/geodynamics/specfem3d/compare/fdc626e9da99e7f24f070e328aecaf9aad758f8d...0479069f470e39347345ab3d4aff453320ac453e

>---------------------------------------------------------------

commit 0479069f470e39347345ab3d4aff453320ac453e
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Sat Oct 18 19:10:09 2014 +0200

    fixed the timing routine of SCOTCH that did not compile on MacOS


>---------------------------------------------------------------

0479069f470e39347345ab3d4aff453320ac453e
 doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex           | 4 ----
 src/decompose_mesh/scotch_5.1.12b/src/libscotch/common.c | 8 +++++---
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex b/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex
index ba59c45..9cbd048 100644
--- a/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex
+++ b/doc/USER_MANUAL/manual_SPECFEM3D_Cartesian.tex
@@ -397,10 +397,6 @@ are:
 \item [{\texttt{IBM compiler}}] See if you need to add \texttt{-qsave}
 or \texttt{-qnosave} for your machine.
 \item [{\texttt{Mac OS}}] You will probably need to install \texttt{XCODE}.
-In addition, the \texttt{clock\_gettime} routine, which is used by
-the \texttt{SCOTCH} library that we use, does not exist in Mac OS.
-You may need to replace it with \texttt{clock\_get\_time} if you
-want to use \texttt{SCOTCH}.
 \end{description}
 When compiling on an IBM machine with the \texttt{xlf} and \texttt{xlc}
 compilers, we suggest running the \texttt{configure} script with the
diff --git a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common.c b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common.c
index faa1449..13b783e 100644
--- a/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common.c
+++ b/src/decompose_mesh/scotch_5.1.12b/src/libscotch/common.c
@@ -105,11 +105,13 @@ clockGet (void)
           ((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;
+// DK DK removed lines that do not compile on MAC OS  struct timespec     tp;
 
-  clock_gettime (CLOCK_REALTIME, &tp);            /* Elapsed time */
+// DK DK removed lines that do not compile on MAC OS  clock_gettime (CLOCK_REALTIME, &tp);            /* Elapsed time */
 
-  return ((double) tp.tv_sec + (double) tp.tv_nsec * 1.0e-9L);
+// DK DK removed lines that do not compile on MAC OS  return ((double) tp.tv_sec + (double) tp.tv_nsec * 1.0e-9L);
+// DK DK return a dummy value, since we do not care about timings
+  return (1.0e-6L);
 #else /* defined (_POSIX_TIMERS) && (_POSIX_TIMERS >= 200112L) */
   struct timeval      tv;
 



More information about the CIG-COMMITS mailing list