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

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Sat Oct 18 10:20:27 PDT 2014


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

On branch  : devel
Link       : https://github.com/geodynamics/specfem2d/compare/16b1f4fb21861a2071a4237486cc57a2c90de460...1bf2f9afb1921add757b42837c8e2517c3df028d

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

commit 1bf2f9afb1921add757b42837c8e2517c3df028d
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Sat Oct 18 19:07:20 2014 +0200

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


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

1bf2f9afb1921add757b42837c8e2517c3df028d
 doc/USER_MANUAL/manual_SPECFEM2D.tex                | 4 +---
 src/meshfem2D/scotch_5.1.12b/src/libscotch/common.c | 8 +++++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/USER_MANUAL/manual_SPECFEM2D.tex b/doc/USER_MANUAL/manual_SPECFEM2D.tex
index f738da4..541b25c 100644
--- a/doc/USER_MANUAL/manual_SPECFEM2D.tex
+++ b/doc/USER_MANUAL/manual_SPECFEM2D.tex
@@ -326,8 +326,6 @@ Before running the \texttt{configure} script, you should probably edit file \tex
 \item [Intel ifort compiler] See if you need to add \texttt{-assume byterecl} for your machine. \textbf{In the case of that compiler, we have noticed that versions dot zero sometimes have bugs or issues that can lead to wrong results when running the code, thus we \emph{strongly} recommend using versions dot one or above (for instance version 13.1 instead of 13.0, version 14.1 instead of 14.0 and so on)}.
 \item [IBM compiler] See if you need to add \texttt{-qsave} or \texttt{-qnosave} for your machine.
 \item [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}.
 \item [IBM Blue Gene machines] Please refer to the manual of SPECFEM3D\_Cartesian, which contains detailed instructions on how to run on Blue Gene.
 \end{description}
 
@@ -444,7 +442,7 @@ If one of your elements has a single point along the absorbing contour rather th
 If you use 9-node elements, list only the first and last points of the edge and not the intermediate point
 located around the middle of the edge; the right 9-node curvature will be restored automatically by the code.
 
-     \item[tangential\_detection\_curve\_file] contains points describing the envelope, that are used for the \texttt{source\_normal\_to\_surface} and \texttt{rec\_normal\_to\_surface}. Should be fine grained, and ordained clockwise. Number of points on the first line, then (x,z) coordinates on each line.
+     \item[tangential\_detection\_curve\_file] contains points describing the envelope, that are used for the \texttt{source\_normal\_to\_surface} and \texttt{rec\_normal\_to\_surface}. Should be fine grained, and ordered clockwise. Number of points on the first line, then (x,z) coordinates on each line.
   \end{description}
 
 \item if you have compiled with MPI, you must specify the number of processes.
diff --git a/src/meshfem2D/scotch_5.1.12b/src/libscotch/common.c b/src/meshfem2D/scotch_5.1.12b/src/libscotch/common.c
index faa1449..13b783e 100644
--- a/src/meshfem2D/scotch_5.1.12b/src/libscotch/common.c
+++ b/src/meshfem2D/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