The -version flag now prints more information.
authorSander Pronk <pronk@cbr.su.se>
Mon, 21 Mar 2011 15:02:23 +0000 (16:02 +0100)
committerSander Pronk <pronk@cbr.su.se>
Mon, 21 Mar 2011 15:02:23 +0000 (16:02 +0100)
mdrun -version now prints whether the binary is single/double
precision, the parallellization library used, and the FFT library.

src/gmxlib/copyrite.c

index dd9c490ca3b6c992bc01545b20c78938a692d851..6c1ccd9806387b6d2907fbde59ce4237ae86a3c8 100644 (file)
@@ -578,16 +578,42 @@ const char *GromacsVersion()
 
 void gmx_print_version_info(FILE *fp)
 {
-    fprintf(fp, "Version:        %s\n", _gmx_ver_string);
+    fprintf(fp, "Version:          %s\n", _gmx_ver_string);
 #ifdef USE_VERSION_H
-    fprintf(fp, "GIT SHA1 hash:  %s\n", _gmx_full_git_hash);
+    fprintf(fp, "GIT SHA1 hash:    %s\n", _gmx_full_git_hash);
     /* Only print out the branch information if present.
      * The generating script checks whether the branch point actually
      * coincides with the hash reported above, and produces an empty string
      * in such cases. */
     if (_gmx_central_base_hash[0] != 0)
     {
-        fprintf(fp, "Branched from:  %s\n", _gmx_central_base_hash);
+        fprintf(fp, "Branched from:    %s\n", _gmx_central_base_hash);
     }
 #endif
+
+#ifdef GMX_DOUBLE
+    fprintf(fp, "Precision:        double\n");
+#else
+    fprintf(fp, "Precision:        single\n");
+#endif
+
+#ifdef GMX_THREADS
+    fprintf(fp, "Parallellization: thread_mpi\n");
+#elif defined(GMX_MPI)
+    fprintf(fp, "Parallellization: MPI\n");
+#else
+    fprintf(fp, "Parallellization: none\n");
+#endif
+
+#ifdef GMX_FFT_FFTPACK
+    fprintf(fp, "FFT Library:      fftpack\n");
+#elif defined(GMX_FFT_FFTW2)
+    fprintf(fp, "FFT Library:      fftw2\n");
+#elif defined(GMX_FFT_FFTW3)
+    fprintf(fp, "FFT Library:      fftw3\n");
+#elif defined(GMX_FFT_MKL)
+    fprintf(fp, "FFT Library:      MKL\n");
+#else
+    fprintf(fp, "FFT Library:      unknown\n");
+#endif
 }