Merge "Merge branch release-4-6 into release-5-0" into release-5-0
authorRoland Schulz <roland@rschulz.eu>
Fri, 9 May 2014 19:04:43 +0000 (21:04 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Fri, 9 May 2014 19:04:44 +0000 (21:04 +0200)
src/gromacs/gmxlib/nonbonded/nb_free_energy.c
src/gromacs/mdlib/pme.c
src/gromacs/options/basicoptions.cpp
src/gromacs/utility/cstringutil.c

index 4ed5663833054212993d9d897eb59ac7bb0614d9..a2e145153bdff7eeb9640187324f9670af855c36 100644 (file)
@@ -795,6 +795,7 @@ gmx_nb_free_energy_kernel(const t_nblist * gmx_restrict    nlist,
      * 12  flops per outer iteration
      * 150 flops per inner iteration
      */
+#pragma omp atomic
     inc_nrnb(nrnb, eNR_NBKERNEL_FREE_ENERGY, nlist->nri*12 + nlist->jindex[n]*150);
 }
 
index 17eb6482d157f672699247b292b494a0eaf78cd6..5d0893b23a9d7c79ae5763b4bdbd1c252b685841 100644 (file)
@@ -5151,10 +5151,10 @@ int gmx_pme_do(gmx_pme_t pme,
             }
             if (flags & GMX_PME_SOLVE)
             {
-                int loop_count;
                 /* solve in k-space for our local cells */
 #pragma omp parallel num_threads(pme->nthread) private(thread)
                 {
+                    int loop_count;
                     thread = gmx_omp_get_thread_num();
                     if (thread == 0)
                     {
index 1d1a5f1a74d034b8c3e27d050f4103870bca5a7f..f1af57aa32bed7ea3c075503fbfb457b610b6b42 100644 (file)
@@ -376,7 +376,7 @@ void FloatOptionStorage::convertValue(const std::string &value)
     double      dval = std::strtod(ptr, &endptr);
     if (errno == ERANGE
         || dval * factor_ < -std::numeric_limits<float>::max()
-        || dval * factor_ > -std::numeric_limits<float>::max())
+        || dval * factor_ >  std::numeric_limits<float>::max())
     {
         GMX_THROW(InvalidInputError("Invalid value: '" + value
                                     + "'; it causes an overflow/underflow"));
index 71c22d38387a854a419ff5f019a4f60f09821ac2..29266fd276ba0dedabac479bd3a5e0c5d55ecd99 100644 (file)
@@ -103,7 +103,7 @@ char *fgets2(char *line, int n, FILE *stream)
          * or because of n being too small.
          * Since both cases occur very infrequently, we can check for EOF.
          */
-        if (!gmx_eof(stream))
+        if (!feof(stream))
         {
             gmx_fatal(FARGS, "An input file contains a line longer than %d characters, while the buffer passed to fgets2 has size %d. The line starts with: '%20.20s'", n, n, line);
         }