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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
24867f22
Commit
24867f22
authored
Jan 27, 2023
by
Matthieu Schaller
Browse files
Options
Downloads
Plain Diff
Merge branch 'fftw-openmp' into 'master'
Add checks for OpenMP FFTW when pthread version is not found Closes
#831
See merge request
!1672
parents
705c38cb
0b2326a5
No related branches found
No related tags found
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
Show 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 @
24867f22
...
@@ -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@:>@]
...
@@ -936,9 +937,33 @@ if test "x$with_fftw" != "xno"; then
...
@@ -936,9 +937,33 @@ 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
if test "x$enable_mpi" = "xyes" -a "x$with_mpi_mesh_gravity" != "xno"; then
if test "x$enable_mpi" = "xyes" -a "x$with_mpi_mesh_gravity" != "xno"; then
# Was FFTW's location specifically given?
# Was FFTW's location specifically given?
...
@@ -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
sign in
to comment