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
0b2326a5
Commit
0b2326a5
authored
2 years ago
by
Peter W. Draper
Committed by
Matthieu Schaller
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add checks for OpenMP FFTW when pthread version is not found
parent
705c38cb
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!1715
Update planetary strength after planetary plus's master rebase
,
!1693
More threapool plotting tweaks
,
!1672
Add checks for OpenMP FFTW when pthread version is not found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configure.ac
+28
-3
28 additions, 3 deletions
configure.ac
with
28 additions
and
3 deletions
configure.ac
+
28
−
3
View file @
0b2326a5
...
@@ -872,10 +872,11 @@ AH_VERBATIM([__STDC_FORMAT_MACROS],
...
@@ -872,10 +872,11 @@ AH_VERBATIM([__STDC_FORMAT_MACROS],
# Check for FFTW. We test for this in the standard directories by default,
# Check for FFTW. We test for this in the standard directories by default,
# and only disable if using --with-fftw=no or --without-fftw. When a value
# and only disable if using --with-fftw=no or --without-fftw. When a value
# is given FFTW must be found.
# is given FFTW must be found.
# If FFTW is found, we check whether this is the threaded version.
# If FFTW is found, we check whether this is the threaded
or openmp
version.
have_fftw="no"
have_fftw="no"
have_mpi_fftw="no"
have_mpi_fftw="no"
have_threaded_fftw="no"
have_threaded_fftw="no"
have_openmp_fftw="no"
AC_ARG_WITH([fftw],
AC_ARG_WITH([fftw],
[AS_HELP_STRING([--with-fftw=PATH],
[AS_HELP_STRING([--with-fftw=PATH],
[root directory where fftw is installed @<:@yes/no@:>@]
[root directory where fftw is installed @<:@yes/no@:>@]
...
@@ -928,7 +929,7 @@ if test "x$with_fftw" != "xno"; then
...
@@ -928,7 +929,7 @@ if test "x$with_fftw" != "xno"; then
# Verify that the library is threaded
# Verify that the library is threaded
AC_CHECK_LIB([fftw3],[fftw_init_threads],[have_threaded_fftw="yes"],
AC_CHECK_LIB([fftw3],[fftw_init_threads],[have_threaded_fftw="yes"],
[have_threaded_fftw="no"], $FFTW_THREADED_LIBS)
[have_threaded_fftw="no"], $FFTW_THREADED_LIBS)
# If found, update things
# If found, update things
if test "x$have_threaded_fftw" = "xyes"; then
if test "x$have_threaded_fftw" = "xyes"; then
...
@@ -936,7 +937,31 @@ if test "x$with_fftw" != "xno"; then
...
@@ -936,7 +937,31 @@ if test "x$with_fftw" != "xno"; then
FFTW_LIBS=$FFTW_THREADED_LIBS
FFTW_LIBS=$FFTW_THREADED_LIBS
FFTW_INCS=$FFTW_THREADED_INCS
FFTW_INCS=$FFTW_THREADED_INCS
else
# Same checks for OpenMP if preferred threaded failed.
if test "x$with_fftw" != "xyes" -a "x$with_fftw" != "xtest" -a "x$with_fftw" != "x"; then
FFTW_OPENMP_LIBS="-L$with_fftw/lib -lfftw3_omp -lfftw3"
FFTW_OPENMP_INCS="-I$with_fftw/include"
else
FFTW_OPENMP_LIBS="-lfftw3_omp -lfftw3"
FFTW_OPENMP_INCS=""
fi
# Verify that the library works. Note requires AC_OPENMP called above.
AC_CHECK_LIB([fftw3],[fftw_init_threads],[have_openmp_fftw="yes"],
[have_openmp_fftw="no"], $FFTW_OPENMP_LIBS)
# If found, update things
if test "x$have_openmp_fftw" = "xyes"; then
# Note OpenMP and pthreads use mostly the same calls, so define both.
AC_DEFINE([HAVE_THREADED_FFTW],1,[The threaded OpenMP FFTW library appears to be present.])
AC_DEFINE([HAVE_OPENMP_FFTW],1,[The OpenMP FFTW library appears to be present.])
FFTW_LIBS=$FFTW_OPENMP_LIBS
FFTW_INCS=$FFTW_OPENMP_INCS
fi
fi
fi
fi
fi
# If MPI mesh gravity is not disabled, check whether we have the MPI version of FFTW
# If MPI mesh gravity is not disabled, check whether we have the MPI version of FFTW
...
@@ -2946,7 +2971,7 @@ AC_MSG_RESULT([
...
@@ -2946,7 +2971,7 @@ AC_MSG_RESULT([
- parallel : $have_parallel_hdf5
- parallel : $have_parallel_hdf5
METIS/ParMETIS : $have_metis / $have_parmetis
METIS/ParMETIS : $have_metis / $have_parmetis
FFTW3 enabled : $have_fftw
FFTW3 enabled : $have_fftw
- threaded
: $have_threaded_fftw
- threaded
/openmp
: $have_threaded_fftw
/ $have_openmp_fftw
- MPI : $have_mpi_fftw
- MPI : $have_mpi_fftw
- ARM : $have_arm_fftw
- ARM : $have_arm_fftw
GSL enabled : $have_gsl
GSL enabled : $have_gsl
...
...
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