Skip to content
Snippets Groups Projects
Commit 6c8d4731 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Get FFTW version

parent 1e9c6b06
No related branches found
No related tags found
2 merge requests!212Gravity infrastructure,!172[WIP] Self gravity (Barnes-Hut version)
......@@ -314,6 +314,9 @@ void writeCodeDescription(hid_t h_file) {
writeAttribute_s(h_grpcode, "Git Branch", git_branch());
writeAttribute_s(h_grpcode, "Git Revision", git_revision());
writeAttribute_s(h_grpcode, "HDF5 library version", hdf5_version());
#ifdef HAVE_FFTW
writeAttribute_s(h_grpcode, "FFTW library version", fftw3_version());
#endif
#ifdef WITH_MPI
writeAttribute_s(h_grpcode, "MPI library", mpi_version());
#ifdef HAVE_METIS
......
......@@ -33,6 +33,10 @@
#include <hdf5.h>
#endif
#ifdef HAVE_FFTW
#include <fftw.h>
#endif
/* Some standard headers. */
#include <stdio.h>
#include <string.h>
......@@ -238,6 +242,22 @@ const char *metis_version(void) {
return version;
}
/**
* @brief return the FFTW version used when SWIFT was built.
*
* @result description of the FFTW version.
*/
const char *fftw3_version(void) {
static char version[256] = {0};
#if defined(HAVE_FFTW)
sprintf(version, "%s", "3.x (details not available)");
#else
sprintf(version, "Unknown version");
#endif
return version;
}
/**
* @brief Prints a greeting message to the standard output containing code
* version and revision number
......@@ -259,6 +279,9 @@ void greetings(void) {
#ifdef HAVE_HDF5
printf(" HDF5 library version: %s\n", hdf5_version());
#endif
#ifdef HAVE_FFTW
printf(" FFTW library version: %s\n", fftw3_version());
#endif
#ifdef WITH_MPI
printf(" MPI library: %s\n", mpi_version());
#ifdef HAVE_METIS
......
......@@ -27,8 +27,9 @@ const char* git_branch(void);
const char* compiler_name(void);
const char* compiler_version(void);
const char* mpi_version(void);
const char* hdf5_version(void);
const char* metis_version(void);
const char* hdf5_version(void);
const char* fftw3_version(void);
void greetings(void);
#endif /* SWIFT_VERSION_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment