-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
speeding up near2far #861
Comments
I added a branch
or similar. Then you set the number of threads with the environment variable
|
This seems to be working and giving rise to linear speedup as demonstrated in the figure below. The test involves timing the The only unusual thing was that it worked for the serial version (i.e., |
If you use MPI, you need to set |
Actually, the Fortran Amos routines are just for complex arguments, which we don't need. For real arguments and integer order, Julia is using the POSIX bessel functions, which we should use too. |
Two options:
use
#pragma omp parallel for
infarfield_lowlevel
, maybe by movingfor (int i = 0; i < Nfreq; ++i)
to be the outermost loop. This only works if you have cores to spare and we compile with OpenMP. openmp for near2far calculation #868in 2d, we can switch to a faster Bessel-function calculation. In a quick test,
the Fortran routines by Amoslibcjn
andyn
routines are about 4-5x faster than the ones in GSL. Precompiled binaries of these are available in https://github.com/JuliaMath/openspecfun at https://github.com/JuliaMath/OpenspecfunBuilder/releases, for example, if we don't want to require a Fortran compiler. move away from GSL functions. #869For the first option, would be nice to try it out. Note that you will need to compile with
-fopenmp
The text was updated successfully, but these errors were encountered: