[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

Add NAMD benchmark functionality #29

Merged
merged 7 commits into from
Feb 27, 2018
Merged

Add NAMD benchmark functionality #29

merged 7 commits into from
Feb 27, 2018

Conversation

MSiggel
Copy link
Contributor
@MSiggel MSiggel commented Feb 1, 2018

Changes made in this Pull Request:

Work in Progress

  • added automated md engine detection to untils
  • analysis and generate both use the respective engine file in mdengines to generate and analyze data for the respective engine
  • mdengine file added for namd
  • updated draco/hydra templates for namd
  • added separate plot function in plot.py (devlopment stage)
  • preliminary changes for analyze.py (development stage)

@MSiggel
Copy link
Contributor Author
MSiggel commented Feb 1, 2018

work in progress:

  • test files have to be adapted for the new changes
  • analyze and plot are not finished and need to be debugged afterwards
  • discussed API structure of plotting functions not yet implemented
  • mdengine files can be consolidated and shortened significantly

Copy link
Contributor
@kain88-de kain88-de left a comment

Choose a reason for hiding this comment

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

looks like a good start.

@@ -0,0 +1,273 @@
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
Copy link
Contributor

Choose a reason for hiding this comment

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

could you please move this into a separate branch.

lines = f.readlines()
else:
lines = fh.readlines()
fh.seek(0)
Copy link
Contributor

Choose a reason for hiding this comment

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

we simplified this now to

lines = fh.readlines()

in master an just always assume that fh is a filehandle.

if output_files:
with open(output_files[0]) as fh:
ns_day = parse_ns_day_namd(fh)
ncores = parse_ncores_namd(fh)
Copy link
Contributor

Choose a reason for hiding this comment

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

this means here you need to reset the filehandle with fh.seek(0) between calls.

with open(sim['bench.job'].relpath, 'w') as fh:
fh.write(script)

def formatted_md_engine_name(modulename):
Copy link
Contributor

Choose a reason for hiding this comment

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

duplicate

# Add some time buffer to the requested time. Otherwise the queuing system
# kills the jobs before GROMACS can finish
formatted_time = '{:02d}:{:02d}:00'.format(*divmod(time + 5, 60))
formatted_module = "gromacs"
Copy link
Contributor

Choose a reason for hiding this comment

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

a better name is mdengine

@@ -140,7 +116,7 @@ def generate(name, gpu, module, host, max_nodes, min_nodes, time, list_hosts):
gromacs_module, gpu_string))
Copy link
Contributor

Choose a reason for hiding this comment

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

gromacs module seems to be wrong.

@MSiggel
Copy link
Contributor Author
MSiggel commented Feb 19, 2018

This version works with some toy files which are included in the sample files. One can generate gromacs and namd benchmarks with generate once if the names of all the required files are named the same. Analyze can read out namd or gromacs file in one directory.
Testing on cluster still pending..

Copy link
Contributor
@mimischi mimischi left a comment

Choose a reason for hiding this comment

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

Basically just a few changes. Maybe @kain88-de can comment on my proposal here.

@@ -19,4 +19,8 @@ module purge
module load {{ module }}

# run {{ module }} for {{ time }} minutes
{%- if formatted_module is gromacs %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this work with jinja2? In the draco example you used == for comparison.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, this works too.. I tried it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yes.. nevermind, I forgot to change that

Copy link
Contributor

Choose a reason for hiding this comment

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

Lets maybe stick to one, just in case users get confused when comparing different templates :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, this was faulty syntax anyway

Any newly implemeted mdengines must be added here.
"""
if 'gromacs' in modulename:
print(modulename)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can probably get rid of the print statement here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah this is an old test..

elif 'namd' in modulename:
return mdengines.namd
else:
raise RuntimeError("No Module Detected! did you specify the module?")
Copy link
Contributor

Choose a reason for hiding this comment

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

This would generate an ugly stack trace for the CLI user. In regards to #38 we should use click.echo and throw some error at the user and then exit via sys.exit(1).

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add our own warning and critical wrappers.

def warning(msg):
    click.echo("WARNING: " + msg, ...)

def critical(msg):
    click.echo("CRITICAL ERROR: " msg, ...)
    sys.exit(1)

That would make consistent formatting easier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kain88-de, @mimischi: I think this would be a good way to stay consistent!

Copy link
Contributor

Choose a reason for hiding this comment

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

@MSiggel Should we create a new PR for this and merge it into master, so you can adapt it in here?

elif 'namd' in modulename:
return "namd"
else:
raise RuntimeError("No Module Detected! did you specify the module?")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we could also combine detect_md_engine and formatted_md_engine_name into one function, as the code is pretty much duplicated.

We could do something along the lines of:

def get_md_engine(modulename, return_module=True):
    obj = None
    mdengines = ['gromacs', 'namd']

    # Loop over all known mdengines
    for engine in mdengines:
        # The name is inside the given module name
        if engine in modulename:
            # Prepare to return the module as string
            obj = engine

            # We want to return the actual module
            if return_module == 'module':
                obj = eval('mdengine.{}'.format(engine))
            break

   # If we have not found the modulename after the for-loop, we exit
    if not obj:
        click.echo('ERROR We were not able to detect any module name. Did you specify that?')
        sys.exit(1)

    # Return the object, because we found it
    return obj

Copy link
Contributor

Choose a reason for hiding this comment

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

To complicated.

In gromacs.py / namd.py

import ...

NAME = "GROMACS"

def ...

Any function that later wants to name can do.

get_md_engine(module).NAME

The idea is that every module carries a formatted name. This means we don't need to distinguish between the case where we want a name or a module.

Copy link
Contributor Author
@MSiggel MSiggel Feb 20, 2018

Choose a reason for hiding this comment

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

formatted_md_engine_name(modulename)

this is not called anymore so it can be removed. as soon as the module was detected the respective engine files "know" their formatted and they can be hard coded.

@mimischi mimischi changed the title Namd Add NAMD benchmark functionality Feb 20, 2018
@mimischi
Copy link
Contributor

@MSiggel Tell me when you are ready, then I can perform a rebase onto master for you.

@MSiggel
Copy link
Contributor Author
MSiggel commented Feb 20, 2018

this should be all @mimischi. I haven't introduced any changes to the errors yet until we introduce our own wrappers for these.

help='MD program files to analyze in directory',
default='',
show_default=True,
multiple=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think allowing multiple=True makes sense here. Bu default we analyze all module anyway for the csv output, and plotting will currently fail.

multiple=True)
@click.option(
'-o',
'-output_name',
Copy link
Contributor

Choose a reason for hiding this comment

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

long option names have two leading dashes --

@@ -131,15 +132,38 @@ def plot_analysis(df, ncores):
help='Number of cores per node. If not given it will be parsed from the '
'benchmarks log file.',
show_default=True)
def analyze(directory, plot, ncores):
@click.option(
'-e',
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be removed again. But in general, don't add too many short options. Only for options that are set often and that can be set to have the same letter as the start of the long version.

click.echo("""This is an experimental NAMD support!
All files must be in this directory.
Parameter paths must be abslute in NAMD files!
""")
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe rather add this into the generate function of the NAMD module.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if one moves it to the namd generate function it will be shown x times for each folder which is generated..maybe a new util fxn? we'll probably need such a warning for other engines too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Will we keep this message when merging? We should not merge anything that is not fully functional? If we are sure that it is working, which the unit/integration test should pledge for, then we can get rid of that message entirely. Also trying it out on the clusters would help reassure that everything is working 🔥

import numpy as np
from jinja2.exceptions import TemplateNotFound
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you specifically catch this exception somewhere? If not I would remove the import.




def detect_md_engine(modulename):
Copy link
Contributor

Choose a reason for hiding this comment

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

I talked with @mimischi today. This would be better suited in the mdengine/init.py file.

elif 'namd' in modulename:
return namd
else:
raise RuntimeError("No Module Detected! did you specify the module?")
Copy link
Contributor

Choose a reason for hiding this comment

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

Please write in the error message that the mdengine couldn't be detected from the module and what mdengines are known to mdbenchmark.

Copy link
Contributor
@mimischi mimischi left a comment

Choose a reason for hiding this comment

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

Looks good so far. A few minor comments on left over strings (GROMACS instead of NAMD) and unnecessary backwards compatibility to older versions of mdbenchmark.

ns_day = np.nan
ncores = np.nan

# search all output files and ignore GROMACS backup files
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment still says GROMACS.

fh.seek(0)
ncores = parse_ncores(fh)

# Backward compatibility to previously created mdbenchmark systems
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably do not need this here. We added it to the GROMACS module, because we added more categories to your Sim objects at some point. All new Sim objects for NAMD will include that category time.

if 'time' not in sim.categories:
sim.categories['time'] = 0

# backward compatibility
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing here. I do not think we will need this check. Just using sim.categories['module'] for NAMD should be fine. What are your thoughts @kain88-de?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah this is only needed for gromacs

def write_bench(top, tmpl, nodes, gpu, module, tpr, name, host, time):
""" Writes a single namd benchmark file and the respective sim object
"""
# TODO: do this centrally somewhere not here! needed in any file
Copy link
Contributor

Choose a reason for hiding this comment

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

What about this TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for now i would leave this. Once namd is merged we can think about how we manage this for all engines i guess?

copyfile(pdb, sim[pdb].relpath)

# Add some time buffer to the requested time. Otherwise the queuing system
# kills the jobs before GROMACS can finish
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment says GROMACS.

'-o',
'--output_name',
help="Name of the output .csv file.",
default="runtime.csv",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to keep it this way? I initially thought we will use the host, module and gpu values for the output file name? This way we could prepare for #24, where we would specify different columns to group by. These be used for the filenames..? Or am I overthinking this?

Copy link
Contributor

Choose a reason for hiding this comment

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

you are overthinking this.


with open(sim['bench.job'].relpath, 'w') as fh:
fh.write(script)
#import mdengines
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably obsolete

'-n',
'--name',
help='Name of input files. All files must have the same base name.',
default='',
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need default='' here? We can probably get rid of it

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, this shouldn't have a default.

@@ -123,6 +102,7 @@ def generate(name, gpu, module, host, min_nodes, max_nodes, time, list_hosts):
raise click.BadParameter(
'You did not specify which gromacs module to use for scaling.',
param_hint='"-m" / "--module"')
#detect the engine and use accordingly
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment throws an pep8 error

click.echo("""This is an experimental NAMD support!
All files must be in this directory.
Parameter paths must be abslute in NAMD files!
""")
Copy link
Contributor

Choose a reason for hiding this comment

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

Will we keep this message when merging? We should not merge anything that is not fully functional? If we are sure that it is working, which the unit/integration test should pledge for, then we can get rid of that message entirely. Also trying it out on the clusters would help reassure that everything is working 🔥

@codecov
Copy link
codecov bot commented Feb 23, 2018

Codecov Report

Merging #29 into master will increase coverage by 3.64%.
The diff coverage is 98.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #29      +/-   ##
==========================================
+ Coverage   83.63%   87.27%   +3.64%     
==========================================
  Files           9       11       +2     
  Lines         336      448     +112     
==========================================
+ Hits          281      391     +110     
- Misses         55       57       +2
Impacted Files Coverage Δ
mdbenchmark/mdengines/__init__.py 100% <100%> (ø)
mdbenchmark/mdengines/gromacs.py 100% <100%> (ø) ⬆️
mdbenchmark/mdengines/namd.py 100% <100%> (ø)
mdbenchmark/utils.py 98.33% <100%> (-0.18%) ⬇️
mdbenchmark/generate.py 95.83% <100%> (-0.66%) ⬇️
mdbenchmark/submit.py 95.12% <100%> (-0.12%) ⬇️
mdbenchmark/analyze.py 43.02% <82.35%> (+3.27%) ⬆️

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 e1229fe...293d951. Read the comment docs.

@kain88-de
Copy link
Contributor

Will we keep this message when merging? We should not merge anything that is not fully functional? If we are sure that it is working, which the unit/integration test should pledge for, then we can get rid of that message entirely. Also trying it out on the clusters would help reassure that everything is working

Yes, we will keep it. NAMD isn't as foolproof to use in MDBenchmark as GROMACS is. NAMD is reading a lot of files when it's started and we make the assumption that all file paths are specified as absolute paths. Making this work for all NAMD inputs might take a little bit. Therefore the warnings.

@MSiggel
Copy link
Contributor Author
MSiggel commented Feb 23, 2018

I moved the tpr check to a new function in the gromacs file as this is gromacs specific. I think this improves modularity. Additionally, for namd we need to check for other files anyway. Moreover, the order of checks changed because the check function needs the engine.
While doing so I also realized that the generate function still uses a tpr argument which should be dropped or renamed as this is no longer valid for namd use.

@MSiggel
Copy link
Contributor Author
MSiggel commented Feb 24, 2018

@mimischi: I added the requested unique file name (based on date and time) generator to analyze.
Additionally, I added a crude NAMD file check which looks at parameter and input file paths and infers whether an absolute path was given...This is probably the minimum we should do for the user.

Copy link
Contributor
@mimischi mimischi left a comment

Choose a reason for hiding this comment

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

Two minor things. When these are resolved we can rebase, squash and merge.

@kain88-de any comments?

module load namd

# Run namd for 15 minutes
namd2 apoa1
Copy link
Contributor

Choose a reason for hiding this comment

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

This is very minor, but the syntax for the namd2 apoa1 call is not the one that we put into templates/draco. Maybe we should put them to the same state :)

@kain88-de
Copy link
Contributor

I did some cleanup and rebased against master. The function to clean up a previous simulation is not module dependent, to work for NAMD as well. I also based the function on a whitelist of allowed files instead of a blacklist.

# when copying the files, we currently only allow the use of absolute
# paths.
if engine == namd:
console.warn('ATTENTION NAMD USERS!'
Copy link
Contributor
@mimischi mimischi Feb 24, 2018

Choose a reason for hiding this comment

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

We probably can skip the first line (ATTENTION is not needed when the message is prefixed with a bold and colored WARNING). Use something like this instead: console.warn('NAMD support is experimental. All input files must be in the current directory. Parameter paths must be absolute. Only crude file checks are performed!')

@kain88-de
Copy link
Contributor

The example in the readme needs to be updated! Maybe link to the hydra template directly that might be possible in RST and would allow that any change in the template is immediately rendered in the readme.

Also, an interesting question would this update break existing user templates?

@mimischi
Copy link
Contributor

I just added some more commits. So far I'm pretty happy with this and I think we can start squashing commits, I could also do that.

There is one thing left that I do not like. If one supplies a file name that does not exist (in this case md), then our script first tells the user it will create benchmarks and then fail, because it cannot find files. I would rather like the program to first check if all files are present and fail immediately if this is not the case.

$ mdbenchmark generate --host draco --module namd --min-nodes 4 --max-nodes 6 -n md
WARNING NAMD support is experimental. All input files must be in the current directory. Parameter paths must be absolute. Only crude file checks are performed!
Creating benchmark system for namd.
Creating a total of 3 benchmarks, with a run time of 15 minutes each.
ERROR File 'md.namd' for benchmark does not exists.

@mimischi
Copy link
Contributor

Just found some more bugs. Working on it.

@mimischi
Copy link
Contributor

Tests should be fine now. Regarding my above comment #29 (comment), I changed two things:

  1. Check that the required files are present before we print anything else to the user. This will only work when using the same engine. Using intermixed engines (namd and gromacs), we will check files for the first engine and print things to the console. Then we will check files for the next engine and could fail at this point, if these files are not present.
  2. Move the NAMD experimental warning outside of the for m in module loop. This way, we only print that warning once at the beginning.


for line in lines:
# Continue if we do not need to do anything with the current line
if ('parameters' not in line) and ('coordinates' not in line) and (
Copy link
Contributor

Choose a reason for hiding this comment

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

@MSiggel I could not find your comment anymore. I just simplified your previous code, which repeated the console.error lines for all three cases.

If you are saying that we need to change the structure in general, then we should do this. Your previous code did not do it either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mimischi: no it's fine! I misunderstood your code at first, but it's much better the way it is now! I also agree with your other changes concerning the order of error message etc. I just quickly threw it together and didn't think about it too much..

@mimischi
Copy link
Contributor

I left two TODO entries with the cleanup functions in both mdengines. Somehow I cannot get the white_list to keep bench.log. I excluded these from the tests, as they were never inside of them before.

@@ -86,7 +86,7 @@ def test_cleanup_before_restart(tmpdir):
"""Test that the cleanup of each directory works as intended."""
FILES_TO_DELETE = [
'job_thing.err.123job', 'job_thing.out.123job', 'md.log', 'md.xtc',
'md.cpt', 'md.edr', 'job.po12345', 'job.o12345', 'md.out'
'md.cpt', 'md.edr', 'job.po12345', 'job.o12345', 'md.out', 'bench.job'
Copy link
Contributor

Choose a reason for hiding this comment

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

Sure you want to be OK with bench.log being deleted?

Copy link
Contributor

Choose a reason for hiding this comment

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

We would only call the cleanup when restarting, so it would be best to get rid of the log for the previous run.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh sorry I meant bench.job the submit script.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I only put it there so the test would pass. Could have used @pytest.mark.skip for that.

@@ -159,6 +159,7 @@ def check_file_extension(name):


def cleanup_before_restart(sim):
# TODO: Checking for `bench.job` does not work!
white_list = ['bench.job', '.*.tpr', '.*.mdp']
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't work because mdsynthesis prints the whole path of a leaf. I thought it would only give the filename. This means you need to update the regex of bench.job to allow for an arbitrary beginning of the string.

@@ -71,6 +71,11 @@ def generate(name, gpu, module, host, min_nodes, max_nodes, time, list_hosts):
print_possible_hosts()
return

if not name:
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't there a click option to print this automatically?

Copy link
Contributor

Choose a reason for hiding this comment

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

Only if we define it as an argument, then we could use click.File inside of that definition.

@mimischi
Copy link
Contributor

I squashed all 88 commits into only two: one doing all the heavy lifting on the main code and the other for the tests.

Marc Siggel and others added 3 commits February 26, 2018 14:34
* Refactor previous code to allow for separate MD engines.
* Update `draco` and `hydra` job templates.
* Add `-o` option to analyze, to define a custom csv filename.

Resolves #23.
@mimischi
Copy link
Contributor

@kain88-de This should be finished now. Should we update the README/AUTHORS here or in a separate PR after merging?

Copy link
Contributor
@kain88-de kain88-de left a comment

Choose a reason for hiding this comment

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

Should we update the README/AUTHORS here or in a separate PR after merging?

They should be updated in this PR as well.

df = pd.DataFrame(columns=[
'gromacs', 'nodes', 'ns/day', 'run time [min]', 'gpu', 'host', 'ncores'
'module', 'nodes', 'ns/day', 'run time [min]', 'gpu', 'host', 'ncores'
Copy link
Contributor

Choose a reason for hiding this comment

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

If we want to stay backward compatible we should keep the gromacs column. Any other module then gromacs would be stored with a '?' in this columns. The module column should still be added. This would ensure that plotting scripts in the wild based on the old files continue to work.



def cleanup_before_restart(sim):
white_list = ['((?:[^/]*/)*)(bench\.job)', '.*.tpr', '.*.mdp']
Copy link
Contributor

Choose a reason for hiding this comment

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

simpler regex is better.

@mimischi
Copy link
Contributor

@MSiggel Could you update the README.rst explaining how to use the NAMD feature? This would help users get started quickly. If this is done, we can merge! 🔥

@MSiggel
Copy link
Contributor Author
MSiggel commented Feb 27, 2018

I just realized there is a remaining issue: NAMD has different builds for with or without GPU (usually _cuda). One would assume that the user knows this and uses the right module on the cluster but theoretically this might be a cause of problems for inexperienced users.. Do we need to catch this? NAMD will still run but the benchmark times will be wrong.

@mimischi
Copy link
Contributor

That's an excellent point. It looks like there is only the normal NAMD version on draco, while there is also namd/version-gpu on hydra.

I would suggest the following: put a notice into the README making the users aware of this. We can implement this restriction into #49, after this gets merged.

@kain88-de
Copy link
Contributor

Since we already have the NAMD warning message. I would suggest as a first step to add an info/warning box here that the user should ensure the module is GPU compatible when he has selected the --gpu switch.

README.rst Outdated

.. code::

$ mdbenchmark start --directory draco_gromacs/5.1.4-plumed2.3
Copy link
Contributor

Choose a reason for hiding this comment

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

use submit. start gives a deprecation warning.

README.rst Outdated
the NAMD configuration file is called ``protein.namd``, you will need the
corresponding ``protein.pdb`` and ``protein.psf`` files to generate benchmarks.
**Please be aware that all paths given in the ``protein.namd`` file must be
absolute paths**. This makes sure that MDBenchmark does not destroy paths when
Copy link
Contributor

Choose a reason for hiding this comment

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

this ensures that

@mimischi
Copy link
Contributor
mimischi commented Feb 27, 2018

This looks great. Thanks for the effort @MSiggel!

@mimischi mimischi merged commit 93f6961 into master Feb 27, 2018
@mimischi mimischi deleted the namd branch February 27, 2018 17:34
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

3 participants