[go: nahoru, domu]

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

Refactor common MD engine functions #57

Merged
merged 12 commits into from
Apr 26, 2018
Merged

Refactor common MD engine functions #57

merged 12 commits into from
Apr 26, 2018

Conversation

mimischi
Copy link
Contributor
@mimischi mimischi commented Apr 8, 2018

Changes made in this pull request:

  • Consolidate write_bench function from mdengines.gromacs.write_bench and mdengines.namd.write_bench into mdengines.utils.write_benchmark.
  • Add unit tests to mdengines.utils.write_benchmark. We now also check wheter all variables in the generated bench.job were replaced correctly.
  • Consolidate cleanup_before_restart for both NAMD and GROMACS.
  • Consolidate parse_ns_day, parse_ncores and analyze_run for both NAMD and GROMACS.

PR Checklist

  • Added changelog fragment in ./changelog/ (more information)?
  • [ ] Issue raised/referenced?

@codecov
Copy link
codecov bot commented Apr 8, 2018

Codecov Report

Merging #57 into master will decrease coverage by 0.22%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
- Coverage   89.35%   89.13%   -0.23%     
==========================================
  Files          11       12       +1     
  Lines         526      506      -20     
==========================================
- Hits          470      451      -19     
+ Misses         56       55       -1
Impacted Files Coverage Δ
mdbenchmark/mdengines/namd.py 97.61% <100%> (+0.08%) ⬆️
mdbenchmark/mdengines/utils.py 100% <100%> (ø)
mdbenchmark/mdengines/__init__.py 100% <100%> (ø) ⬆️
mdbenchmark/mdengines/gromacs.py 100% <100%> (ø) ⬆️
mdbenchmark/analyze.py 43.67% <100%> (+0.65%) ⬆️
mdbenchmark/submit.py 97.67% <100%> (+0.11%) ⬆️
mdbenchmark/generate.py 100% <100%> (ø) ⬆️

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 3133526...44b37dd. Read the comment docs.

@kain88-de kain88-de requested a review from MSiggel April 8, 2018 19:44
@mimischi mimischi changed the title Refactor benchmark generation [WIP] Refactor benchmark generation Apr 9, 2018
@mimischi mimischi changed the title [WIP] Refactor benchmark generation [WIP] Refactor common MD engine functions Apr 9, 2018
@mimischi
Copy link
Contributor Author
mimischi commented Apr 9, 2018

Regarding 0446c91: I consolidated parse_ns_day into mdengines/utils.py, but still test the cases separately inside of tests/mdengines/test_namd.py and tests/mdengines/test_gromacs.py. I somewhat have the feeling we should do that testing inside of tests/mdengines/test_utils.py, but we could compromise here to have the tests engine specific.

@mimischi mimischi changed the title [WIP] Refactor common MD engine functions Refactor common MD engine functions Apr 9, 2018
@mimischi
Copy link
Contributor Author
mimischi commented Apr 9, 2018

We now always pass the actual MD engine via engine (currently: mdengines/gromacs.py or mdengines/namd.py) in the code base. Subsequent functions now call engine.NAME internally, to access the NAME property, like @kain88-de suggested.

We could later think about rewriting parts of the MD engine to use classes, but this should be fine as a first step.

This is ready to be reviewed @MSiggel @kain88-de.

@@ -188,11 +189,12 @@ def generate(name, gpu, module, host, min_nodes, max_nodes, time,
'Creating a total of {} benchmarks, with a run time of {} each.',
number_of_benchmarks, run_time_each)

top = dtr.Tree(directory)
base_directory = dtr.Tree(directory)
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe top_directory?

@mimischi mimischi merged commit 4007b64 into master Apr 26, 2018
@mimischi mimischi deleted the refactor branch April 26, 2018 13:32
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.

None yet

2 participants