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
27dd260b
Commit
27dd260b
authored
7 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Correctly detect the GSL and print its version in the greetings.
parent
4d236c14
No related branches found
No related tags found
1 merge request
!509
Cosmological time integration
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure.ac
+4
-0
4 additions, 0 deletions
configure.ac
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
+1
-0
1 addition, 0 deletions
src/version.h
with
31 additions
and
0 deletions
configure.ac
+
4
−
0
View file @
27dd260b
...
@@ -404,6 +404,10 @@ AC_HEADER_STDC
...
@@ -404,6 +404,10 @@ AC_HEADER_STDC
# Check for the libraries we will need.
# Check for the libraries we will need.
AC_CHECK_LIB(m,sqrt,,AC_MSG_ERROR(something is wrong with the math library!))
AC_CHECK_LIB(m,sqrt,,AC_MSG_ERROR(something is wrong with the math library!))
# Check for GSL
AC_CHECK_LIB([gslcblas],[cblas_dgemm])
AC_CHECK_LIB([gsl],[gsl_blas_dgemm])
# Check for pthreads.
# Check for pthreads.
AX_PTHREAD([LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AX_PTHREAD([LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC" LDFLAGS="$LDFLAGS $PTHREAD_LIBS $LIBS"],
CC="$PTHREAD_CC" LDFLAGS="$LDFLAGS $PTHREAD_LIBS $LIBS"],
...
...
This diff is collapsed.
Click to expand it.
src/common_io.c
+
3
−
0
View file @
27dd260b
...
@@ -395,6 +395,9 @@ void io_write_code_description(hid_t h_file) {
...
@@ -395,6 +395,9 @@ void io_write_code_description(hid_t h_file) {
#ifdef HAVE_FFTW
#ifdef HAVE_FFTW
io_write_attribute_s
(
h_grpcode
,
"FFTW library version"
,
fftw3_version
());
io_write_attribute_s
(
h_grpcode
,
"FFTW library version"
,
fftw3_version
());
#endif
#endif
#ifdef HAVE_LIBGSL
io_write_attribute_s
(
h_grpcode
,
"GSL library version"
,
libgsl_version
());
#endif
#ifdef WITH_MPI
#ifdef WITH_MPI
io_write_attribute_s
(
h_grpcode
,
"MPI library"
,
mpi_version
());
io_write_attribute_s
(
h_grpcode
,
"MPI library"
,
mpi_version
());
#ifdef HAVE_METIS
#ifdef HAVE_METIS
...
...
This diff is collapsed.
Click to expand it.
src/version.c
+
23
−
0
View file @
27dd260b
...
@@ -37,6 +37,10 @@
...
@@ -37,6 +37,10 @@
#include
<fftw3.h>
#include
<fftw3.h>
#endif
#endif
#ifdef HAVE_LIBGSL
#include
<gsl/gsl_version.h>
#endif
/* Some standard headers. */
/* Some standard headers. */
#include
<stdio.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<stdlib.h>
...
@@ -332,6 +336,22 @@ const char *fftw3_version(void) {
...
@@ -332,6 +336,22 @@ const char *fftw3_version(void) {
return
version
;
return
version
;
}
}
/**
* @brief return the GSL version used when SWIFT was built.
*
* @result description of the GSL version.
*/
const
char
*
libgsl_version
(
void
)
{
static
char
version
[
256
]
=
{
0
};
#if defined(HAVE_LIBGSL)
sprintf
(
version
,
"%s"
,
gsl_version
);
#else
sprintf
(
version
,
"Unknown version"
);
#endif
return
version
;
}
/**
/**
* @brief return the thread barrier used in SWIFT.
* @brief return the thread barrier used in SWIFT.
*
*
...
@@ -376,6 +396,9 @@ void greetings(void) {
...
@@ -376,6 +396,9 @@ void greetings(void) {
#ifdef HAVE_FFTW
#ifdef HAVE_FFTW
printf
(
" FFTW library version: %s
\n
"
,
fftw3_version
());
printf
(
" FFTW library version: %s
\n
"
,
fftw3_version
());
#endif
#endif
#ifdef HAVE_LIBGSL
printf
(
" GSL library version: %s
\n
"
,
libgsl_version
());
#endif
#ifdef WITH_MPI
#ifdef WITH_MPI
printf
(
" MPI library: %s
\n
"
,
mpi_version
());
printf
(
" MPI library: %s
\n
"
,
mpi_version
());
#ifdef HAVE_METIS
#ifdef HAVE_METIS
...
...
This diff is collapsed.
Click to expand it.
src/version.h
+
1
−
0
View file @
27dd260b
...
@@ -34,6 +34,7 @@ const char* mpi_version(void);
...
@@ -34,6 +34,7 @@ const char* mpi_version(void);
const
char
*
metis_version
(
void
);
const
char
*
metis_version
(
void
);
const
char
*
hdf5_version
(
void
);
const
char
*
hdf5_version
(
void
);
const
char
*
fftw3_version
(
void
);
const
char
*
fftw3_version
(
void
);
const
char
*
libgsl_version
(
void
);
const
char
*
thread_barrier_version
(
void
);
const
char
*
thread_barrier_version
(
void
);
void
greetings
(
void
);
void
greetings
(
void
);
...
...
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