LadaF/PoisFFT

parallelization related problems

baliangLt opened this issue · 1 comments

I try to use this solver with openmp for parallelization. I start with the example given in testpoisson.cc.
However, no mater what the value I set for np (as below), the computational time is the same.
PoisFFT::Solver<3, double> S(ns, Ls, BCs, POISFFT_SPECTRAL, NULL, NULL, NULL, np);

LadaF commented

I am sorry that I missed your issue. For a serious diagnosis I would need many more details.

However, the np argument is not really used for OpenMP. One uses environment variables to set the number of threads for the entire program. At least that is how this is implemented in PoisFFT. One could imagine using only a subset of the available threads, but this option is not implemented. PoisFFT uses all threads available for OpenMP for the program and follws the system settings, such as the OMP_NUM_THREADS environment variable.