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

Particle benchmarks #2381

Merged
merged 14 commits into from
Jan 4, 2019
Merged

Particle benchmarks #2381

merged 14 commits into from
Jan 4, 2019

Conversation

jngrad
Copy link
Member

@jngrad jngrad commented Nov 22, 2018

LJ and P3M benchmarks discussed in #2239 and extracted from #2296.

Benchmarking suite to measure the integrator execution time under
various conditions: build features, struct Particle implementation,
number of cores, number of particles, interaction types.
@codecov
Copy link

codecov bot commented Nov 22, 2018

Codecov Report

Merging #2381 into python will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           python   #2381   +/-   ##
======================================
  Coverage      72%     72%           
======================================
  Files         393     393           
  Lines       18483   18483           
======================================
  Hits        13434   13434           
  Misses       5049    5049

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3cf300...6db935b. Read the comment docs.

@RudolfWeeber
Copy link
Contributor

In the lj script, you're setting a force cap (20) and never remove it.
You don't need a force cap for steepest descent-based warmups.
Please remove the capping.

Please switch the command line handling to argparse in both test scripts.
I think the simplest solution would be to have
--volume_fraction and --particles_per_core
and for p3m --bjerrum_length

Please also simplify the p3m script:

  • please make use of reduced units
    q=+1 and q=-1 on half of the particles each
    kT=gamma=1
    p3m accuracy=1E-4
    prefactor to give a Bjerrum length provided by the cmd line

Typical Bjerrum lengths would be on the order of ~4 sigma

The runner script should be written to time the currently checked out version.
Comparisson should than be handled by a separate script which uses the timing script twice.

runner.sh runs benchmarks on the currently checked out version
suite.sh runs runner.sh on different commits
Benchmarks are now created in CMake using add_test(). Failing benchmarks
no longer break the runner.sh and suite.sh scripts. Error messages are
still visible.
@jngrad
Copy link
Member Author

jngrad commented Nov 30, 2018

Good idea. suite.sh is now responsible for checking out older git revisions and calling runner.sh, which runs the benchmarks on the currently checked out version. I've also rewritten the benchmarking CMake file with CTest to avoid breaking the workflow when a benchmark fails. The LJ and P3M scripts were simplified.

Could you please have a look at the output of the LJ script? For volume fractions below 0.5 without force cap, the script sometimes crashes with this error message:

ERROR: particle coordinate out of range, pos = 2.22303e+13, image box = -2147483648
ERROR: particle coordinate out of range, pos = -2.19555e+13, image box = -2147483646
Traceback (most recent call last):
  File "lj.py", line 138, in <module>
    system.integrator.run(min(30 * measurement_steps, 60000))
  File "integrate.pyx", line 91, in espressomd.integrate.Integrator.run
  File "utils.pyx", line 269, in espressomd.utils.handle_errors
Exception: Encoutered errors during integrate: ERROR: particle coordinate out of range, pos = 2.22303e+13, image box = -2147483648

You may have to test different seed values at line 88 in lj.py until the error appears (cmd: pypresso lj.py --particles_per_core 10000 --volume_fraction 0.02). This also happens with your original script.

@RudolfWeeber
Copy link
Contributor

Please add calls to tune_skin before and after p3m setup. The optimal skin is density dependent.
Also, please use particle type 0 for both positively and negatively charged particles, since having more particle types has a performance impact.

@fweik
Copy link
Contributor

fweik commented Dec 4, 2018

@RudolfWeeber

@RudolfWeeber
Copy link
Contributor

Can be merged.
Can we somehow schedule a CI job for this once a week at night?
It would have to occupy an entire build machine to be consistent.

@jngrad
Copy link
Member Author

jngrad commented Dec 4, 2018

Are you sure? The LJ benchmark still fails on my machine depending on the parameters.

@KaiSzuttor
Copy link
Member

i think we planned to buy CI machines. we need a dedicated one for such benchmarks.

@mkuron
Copy link
Member

mkuron commented Dec 5, 2018

Can we somehow schedule a CI job for this once a week at night?

Sure.

It would have to occupy an entire build machine to be consistent.

That's difficult. Our runners are configured for multiple concurrent jobs. We would need to do something hacky that reconfigures the runner for a single job, via a cron job or something.

I think we planned to buy CI machines.

That depends on whether the university administration gives us the money for it.

we need a dedicated one for such benchmarks.

Not necessarily, we just need one that doesn't do other stuff at the same time.

@RudolfWeeber
Copy link
Contributor

RudolfWeeber commented Dec 5, 2018 via email

@jngrad
Copy link
Member Author

jngrad commented Dec 5, 2018

Try mpiexec -n 8 pypresso maintainer/benchmarks/lj.py --particles_per_core=10000 --volume_fraction=0.02

@RudolfWeeber
Copy link
Contributor

I can't reproduce this. Can you please post the error msg?

@jngrad
Copy link
Member Author

jngrad commented Dec 6, 2018

ERROR: particle coordinate out of range, pos = 2.22303e+13, image box = -2147483648
ERROR: particle coordinate out of range, pos = -2.19555e+13, image box = -2147483646
Traceback (most recent call last):
  File "lj.py", line 138, in <module>
    system.integrator.run(min(30 * measurement_steps, 60000))
  File "integrate.pyx", line 91, in espressomd.integrate.Integrator.run
  File "utils.pyx", line 269, in espressomd.utils.handle_errors
Exception: Encoutered errors during integrate: ERROR: particle coordinate out of range, pos = 2.22303e+13, image box = -2147483648

@RudolfWeeber
Copy link
Contributor

I think I fixed the remaining issues. I'll merge this for now, so we can make use of it.

@RudolfWeeber RudolfWeeber merged commit 71481b1 into espressomd:python Jan 4, 2019
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.

5 participants