Skip to content
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

move away from GSL functions. #869

Merged
merged 1 commit into from
May 11, 2019
Merged

move away from GSL functions. #869

merged 1 commit into from
May 11, 2019

Conversation

stevengj
Copy link
Collaborator

@stevengj stevengj commented May 9, 2019

Now defaults to Mersenne Twister random-number generation (included under 3-clause BSD license) and defaulting to POSIX Bessel functions rather than the much-slower GSL ones for near2far calculation (for #861).

@stevengj
Copy link
Collaborator Author

stevengj commented May 9, 2019

@oskooi, try the near2far calculation with this PR — it should be much faster (in 2d) with the new Bessel functions.

@oskooi
Copy link
Collaborator

oskooi commented May 10, 2019

The following are the wall-clock Field time usage statistics for examples/binary_grating_n2f.py using resolution=25, nfreq=50, and nperiods=40 with MPI (np=2) comparing master and this PR:

master

unit cell with periodic boundaries

Field time usage:
        connecting chunks: 0.00340685 s
            time stepping: 1.70402 s
            communicating: 0.368193 s
     Fourier transforming: 0.0024059 s
        getting farfields: 1525.26 s
          everything else: 2.16774 s

finite periodic grating with flat surface termination extending into PML

Field time usage:
	connecting chunks: 0.179651 s
            time stepping: 270.982 s
            communicating: 9.90172 s
     Fourier transforming: 125.645 s
	getting farfields: 763.141 s
          everything else: 2.1376 s

this PR

unit cell with periodic boundaries

Field time usage:
	connecting chunks: 0.00318903 s
            time stepping: 1.71046 s
            communicating: 0.369378 s
     Fourier transforming: 0.00197067 s
        getting farfields: 843.431 s
          everything else: 2.1393 s

finite periodic grating with flat surface termination extending into PML

Field time usage:
	connecting chunks: 0.187708 s
            time stepping: 272.32 s
            communicating: 9.89654 s
     Fourier transforming: 126.648 s
	getting farfields: 420.911 s
          everything else: 2.61026 s

The speedup in get_farfields is significant as the runtime is nearly halved for both the unit- and super-cell calculations: 1525.26 s vs. 843.431 s and 763.141 s vs. 420.911 s.

@stevengj stevengj merged commit 7cb507f into master May 11, 2019
@stevengj stevengj deleted the supportlibs branch May 11, 2019 01:04
@stevengj stevengj mentioned this pull request May 11, 2019
2 tasks
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants