Skip to content

Commit

Permalink
Use fftw_planner_nthreads
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Krimmer committed Aug 19, 2024
1 parent d3828aa commit 406f083
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/finufft/fftw_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@
#define FFTW_INIT FFTWIFY(init_threads)
#define FFTW_PLAN_TH FFTWIFY(plan_with_nthreads)
#define FFTW_CLEANUP_THREADS FFTWIFY(cleanup_threads)
#define FFTW_GET_NTHREADS FFTWIFY(planner_nthreads)
#else
// no OMP (no fftw{f}_threads or _omp), need dummy fftw threads calls...
#define FFTW_INIT()
#define FFTW_PLAN_TH(x)
#define FFTW_CLEANUP_THREADS()
#define FFTW_GET_NTHREADS()
#endif

#endif // FFTW_DEFS_H
2 changes: 2 additions & 0 deletions src/finufft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,10 +760,12 @@ int FINUFFT_MAKEPLAN(int type, int dim, BIGINT *n_modes, int iflag, int ntrans,
// set it just for our one plan and then revert to the user value.
// Unfortunately fftw_planner_nthreads wasn't introduced until fftw 3.3.9, and
// there isn't a convenient mechanism to probe the version
int prev_nthr_fft = FFTW_GET_NTHREADS();

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, Off, Release, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, Off, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, Off, Release, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, Off, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, On, Debug, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, On, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, On, Debug, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, On, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, On, Debug, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, On, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, On, Debug, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, On, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, On, Release, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, On, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, On, Release, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, On, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, Off, Release, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, Off, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, Off, Release, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, Off, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, On, Release, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, On, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, On, Release, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, On, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, Off, Debug, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, Off, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, Off, Debug, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=x86-64, Off, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, On, Release, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, On, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, On, Release, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, On, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, Off, Debug, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, Off, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, Off, Debug, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, -march=native, Off, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, On, Debug, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, On, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, On, Debug, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, On, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, Off, Debug, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, Off, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, Off, Debug, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, Off, Debug, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, Off, Release, clang, clang++, Off)

use of undeclared identifier 'fftwf_planner_nthreads'; did you mean 'fftwf_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, Off, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, Off, Release, clang, clang++, Off)

use of undeclared identifier 'fftw_planner_nthreads'; did you mean 'fftw_cleanup_threads'?

Check failure on line 763 in src/finufft.cpp

View workflow job for this annotation

GitHub Actions / cmake-ci (ubuntu-22.04, llvm, native, Off, Release, clang, clang++, Off)

cannot initialize a variable of type 'int' with an rvalue of type 'void'
FFTW_PLAN_TH(nthr_fft);
p->fftwPlan = FFTW_PLAN_MANY_DFT(dim, ns, p->batchSize, (FFTW_CPX *)p->fwBatch,
NULL, 1, p->nf, (FFTW_CPX *)p->fwBatch, NULL, 1,
p->nf, p->fftSign, p->opts.fftw);
FFTW_PLAN_TH(prev_nthr_fft);
}
if (p->opts.debug)
printf("[%s] FFTW plan (mode %d, nthr=%d):\t%.3g s\n", __func__, p->opts.fftw,
Expand Down

0 comments on commit 406f083

Please sign in to comment.