Fix misuse of gmx_simd_check_and_reset_overflow
authorMark Abraham <mark.j.abraham@gmail.com>
Tue, 19 May 2015 19:20:09 +0000 (21:20 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sat, 23 May 2015 21:36:16 +0000 (23:36 +0200)
Only x86 has useful definitions of this function. The check will
be entirely removed in master branch.

Fixes #1740

Change-Id: Ida1bc43201f44dffbd64d94bc485d4d6d882167b

src/gromacs/mdlib/tpi.c
src/gromacs/simd/impl_ibm_qpx/impl_ibm_qpx.h

index 5a584281e0a050e5c23b084c1dc2b68eab2b9f95..f6d7c3a804963ff6b3bf4ae6d5ae8a8a23cd9649 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015 by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -467,7 +467,7 @@ double do_tpi(FILE *fplog, t_commrec *cr,
             gmx_fatal(FARGS, "Unknown integrator %s", ei_names[inputrec->eI]);
     }
 
-#ifdef GMX_SIMD
+#if defined GMX_SIMD_X86_SSE2_OR_HIGHER || defined __MIC__
     /* Make sure we don't detect SIMD overflow generated before this point */
     gmx_simd_check_and_reset_overflow();
 #endif
@@ -671,7 +671,7 @@ double do_tpi(FILE *fplog, t_commrec *cr,
 
             epot               = enerd->term[F_EPOT];
             bEnergyOutOfBounds = FALSE;
-#ifdef GMX_SIMD_X86_SSE2_OR_HIGHER
+#if defined GMX_SIMD_X86_SSE2_OR_HIGHER || defined __MIC__
             /* With SSE the energy can overflow, check for this */
             if (gmx_simd_check_and_reset_overflow())
             {
index 63bce3c895f676d31b270d7ff96d2de699911ee7..8855b24ce9663f98b0348d2140b5e6050574b5be 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -466,13 +466,4 @@ gmx_simd4_dotproduct3_f_ibm_qpx(vector4double a, vector4double b)
     return (float)gmx_simd4_dotproduct3_d_ibm_qpx(a, b);
 }
 
-/* Function to check whether SIMD operations have resulted in overflow.
- * For now, this is unfortunately a dummy for this architecture.
- */
-static int
-gmx_simd_check_and_reset_overflow(void)
-{
-    return 0;
-}
-
 #endif /* GMX_SIMD_IMPLEMENTATION_IBM_QPX_H */