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

Add progress output for get_farfields_array #856

Merged
merged 3 commits into from
May 8, 2019
Merged

Add progress output for get_farfields_array #856

merged 3 commits into from
May 8, 2019

Conversation

ChristopherHogan
Copy link
Contributor

src/meep.hpp Outdated
@@ -42,6 +42,8 @@ typedef float realnum;
typedef double realnum;
#endif

#define MIN_OUTPUT_TIME 4.0 // output no more often than this many seconds
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be renamed to MEEP_MIN_OUTPUT_TIME if it is in the global header.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@ChristopherHogan
Copy link
Contributor Author

I can't use the time_sink infrastructure to time farfield_lowlevel because am_now_working_on and finished_working are methods of the fields class, while farfield_lowlevel is a dft_near2far method.

@oskooi oskooi mentioned this pull request May 8, 2019
2 tasks
@ChristopherHogan
Copy link
Contributor Author

Added get_farfields_array timing by making am_now_working_on and finished_working public methods and calling them from python.

@stevengj stevengj merged commit 4051db5 into NanoComp:master May 8, 2019
@oskooi
Copy link
Collaborator

oskooi commented May 8, 2019

The output from running this PR on a test case involving python/examples/binary_grating_n2f.py is:

...
get_farfields_array working on point 470 of 500 (94% done)
get_farfields_array working on point 477 of 500 (95% done)
get_farfields_array working on point 484 of 500 (96% done)
get_farfields_array working on point 491 of 500 (98% done)
get_farfields_array working on point 498 of 500 (99% done)

Elapsed run time = 476.4813 s

Field time usage:
        connecting chunks: 0.113281 s
            time stepping: 120.414 s
            communicating: 4.5503 s
     Fourier transforming: 25.4002 s
        getting farfields: 322.603 s
          everything else: 1.09053 s

It would be useful to include the metric s/point (meaningful for assessing performance) as part of the get_farfields_array working on point ... output similar to s/step for time stepping: on time step 21406 (time=428.12), 0.00672292 s/step. Also, note that the sum of all the sub entries under Field time usage is 474.171311 s. This means that 2.30998 s is still unaccounted for; should this difference just be included in everything else: so that the sum is consistent?

@oskooi
Copy link
Collaborator

oskooi commented May 8, 2019

There is no interval progress output for get_farfields (i.e., get_farfields_array working on point 434 of 500 (86% done)) when using MPI; the only output is the total time at the end of the run:

...
field decay(t = 800.32): 3.1235531072986875e-11 / 0.09814324428153094 = 3.182647089124699e-10
run 0 finished at t = 800.32 (40016 timesteps)

Field time usage:
        connecting chunks: 0.00317784 s
            time stepping: 1.66425 s
            communicating: 0.361284 s
     Fourier transforming: 0.00176502 s
        getting farfields: 323.816 s
          everything else: 1.31586 s

@ChristopherHogan ChristopherHogan deleted the chogan/n2f_progress branch May 24, 2019 14:08
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
* Add progress output for get_farfields_array

* Rename MIN_OUTPUT_TIME to MEEP_MIN_OUTPUT_TIME

* Add get_farfields_array to time_sink
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.

displaying the progress status and total time of near2far calculations in output
3 participants