Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
6c8d4731
Commit
6c8d4731
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Get FFTW version
parent
1e9c6b06
No related branches found
No related tags found
2 merge requests
!212
Gravity infrastructure
,
!172
[WIP] Self gravity (Barnes-Hut version)
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/common_io.c
+3
-0
3 additions, 0 deletions
src/common_io.c
src/version.c
+23
-0
23 additions, 0 deletions
src/version.c
src/version.h
+2
-1
2 additions, 1 deletion
src/version.h
with
28 additions
and
1 deletion
src/common_io.c
+
3
−
0
View file @
6c8d4731
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/version.c
+
23
−
0
View file @
6c8d4731
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/version.h
+
2
−
1
View file @
6c8d4731
...
...
@@ -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 */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment