# conditionally built, so we cannot use a GLOB_RECURSE here.
file(GLOB GMXLIB_SOURCES *.c selection/*.c trajana/*.c statistics/*.c)
-
if(NOT GMX_USE_PLUGINS)
list(REMOVE_ITEM GMXLIB_SOURCES vmdio.c vmddlopen.c)
endif()
PROPERTIES GENERATED true)
endif()
-# The log file output queries Cuda if GPU support is enabled
-if(GMX_GPU)
- if(WIN32)
- include_directories(${CUDA_TOOLKIT_INCLUDE})
- else()
- set_source_files_properties(copyrite.c PROPERTIES COMPILE_FLAGS "-I${CUDA_TOOLKIT_INCLUDE}")
- endif()
-endif()
-
if(NOT GMX_EXTERNAL_BLAS)
file(GLOB BLAS_SOURCES gmx_blas/*.c)
endif(NOT GMX_EXTERNAL_BLAS)
#ifdef HAVE_LIBMKL
#include <mkl.h>
#endif
-#ifdef GMX_GPU
-#include <cuda.h>
-#include <cuda_runtime_api.h>
-#endif
#ifdef GMX_FFT_FFTW3
#include <fftw3.h>
#endif
return _gmx_ver_string;
}
+void gmx_print_version_info_gpu(FILE *fp);
+
void gmx_print_version_info(FILE *fp)
{
-#ifdef GMX_GPU
- int cuda_driver,cuda_runtime;
-#endif
-
fprintf(fp, "Gromacs version: %s\n", _gmx_ver_string);
#ifdef USE_VERSION_H
fprintf(fp, "GIT SHA1 hash: %s\n", _gmx_full_git_hash);
__INTEL_MKL__,__INTEL_MKL_MINOR__,__INTEL_MKL_UPDATE__);
#endif
#ifdef GMX_GPU
- fprintf(fp, "CUDA compiler: %s\n",CUDA_NVCC_COMPILER_INFO);
- cuda_driver = 0;
- cudaDriverGetVersion(&cuda_driver);
- cuda_runtime = 0;
- cudaRuntimeGetVersion(&cuda_runtime);
- fprintf(fp, "CUDA driver: %d.%d\n",cuda_driver/1000, cuda_driver%100);
- fprintf(fp, "CUDA runtime: %d.%d\n",cuda_runtime/1000, cuda_runtime%100);
+ gmx_print_version_info_gpu(fp);
#endif
}
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
+ * Copyright (c) 2001-2004, The GROMACS development team,
+ * check out http://www.gromacs.org for more information.
+ * Copyright (c) 2012, by the GROMACS development team, led by
+ * David van der Spoel, Berk Hess, Erik Lindahl, and including many
+ * others, as listed in the AUTHORS file in the top-level source
+ * directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <cuda.h>
+#include <cuda_runtime_api.h>
+
+#include "buildinfo.h"
+
+extern "C" void gmx_print_version_info_gpu(FILE *fp)
+{
+ int cuda_driver,cuda_runtime;
+ fprintf(fp, "CUDA compiler: %s\n",CUDA_NVCC_COMPILER_INFO);
+ cuda_driver = 0;
+ cudaDriverGetVersion(&cuda_driver);
+ cuda_runtime = 0;
+ cudaRuntimeGetVersion(&cuda_runtime);
+ fprintf(fp, "CUDA driver: %d.%d\n",cuda_driver/1000, cuda_driver%100);
+ fprintf(fp, "CUDA runtime: %d.%d\n",cuda_runtime/1000, cuda_runtime%100);
+}