Fix tune_pme detection of GPU support
authorAke Sandgren <ake.sandgren@hpc2n.umu.se>
Thu, 9 Mar 2017 13:57:07 +0000 (14:57 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 13 Mar 2017 09:55:55 +0000 (10:55 +0100)
Change-Id: I60540cefe912f9ae3f602f90fa962bcf62bc61b4

src/gromacs/gmxana/gmx_tune_pme.cpp

index f8089d20413df85efcb424f9bd6401a97c56d604..02cdca3fce04624de4085d98899454e49be20eee 100644 (file)
@@ -659,10 +659,10 @@ static void check_mdrun_works(gmx_bool    bThreads,
      * gmx_print_version_info() in the GMX_MPI section */
     const char match_mpi[]     = "MPI library:        MPI";
     const char match_mdrun[]   = "Executable: ";
-    const char match_gpu[]     = "GPU support:        enabled";
+    const char match_nogpu[]   = "GPU support:        disabled";
     gmx_bool   bMdrun          = FALSE;
     gmx_bool   bMPI            = FALSE;
-    gmx_bool   bHaveGpuSupport = FALSE;
+    gmx_bool   bHaveGpuSupport = TRUE;
 
     /* Run a small test to see whether mpirun + mdrun work  */
     fprintf(stdout, "Making sure that mdrun can be executed. ");
@@ -702,9 +702,9 @@ static void check_mdrun_works(gmx_bool    bThreads,
             {
                 bMPI = TRUE;
             }
-            if (str_starts(line, match_gpu) )
+            if (str_starts(line, match_nogpu) )
             {
-                bHaveGpuSupport = TRUE;
+                bHaveGpuSupport = FALSE;
             }
         }
     }