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 recipe for OpenMM #9102

Merged
merged 60 commits into from
Oct 6, 2019
Merged

Add recipe for OpenMM #9102

merged 60 commits into from
Oct 6, 2019

Conversation

jaimergp
Copy link
Member

@jaimergp jaimergp commented Aug 9, 2019

Trying to build OpenMM in conda-forge with GPU support, following examples at #8637, #8638.

Checklist

  • License file is packaged (see here for an example)
  • Source is from official source
  • Package does not vend other packages
  • Build number is 0
  • A tarball (url) rather than a repo (e.g. git_url) is used in your
    recipe (see
    here
    for more details)
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/nvcc, recipes/openmm) and found some lint.

Here's what I've got...

For recipes/openmm:

  • Selectors are suggested to take a <two spaces>#<one space>[<expression>] form. See lines [41]

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/nvcc, recipes/openmm) and found it was in an excellent condition.

@jakirkham
Copy link
Member

Thanks for working on this @jaimergp! I'm trying to sort out how we generally handle variants for GPU package builds in issue ( conda-forge/conda-forge-pinning-feedstock#237 ), which should help us get this and other GPU packages in.

@jaimergp
Copy link
Member Author

@jakirkham

Thanks for the tip! Following the issue now!

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/nvcc, recipes/openmm) and found some lint.

Here's what I've got...

For recipes/openmm:

  • Selectors are suggested to take a <two spaces>#<one space>[<expression>] form. See lines [34, 35, 40, 41, 45, 55]

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/nvcc, recipes/openmm) and found it was in an excellent condition.

@jaimergp jaimergp mentioned this pull request Aug 15, 2019
6 tasks
@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/nvcc, recipes/openmm) and found some lint.

Here's what I've got...

For recipes/openmm:

  • The top level meta keys are in an unexpected order. Expecting ['package', 'source', 'build', 'requirements', 'test', 'about', 'extra'].
  • The recipe could do with some maintainers listed in the extra/recipe-maintainers section.
  • Selectors are suggested to take a <two spaces>#<one space>[<expression>] form. See lines [17, 18]
  • There are too few lines. There should be one empty line at the end of the file.
  • The extra section contained an unexpected subsection name. upload is not a valid subsection name.
  • The extra section contained an unexpected subsection name. force_upload is not a valid subsection name.

@isuruf
Copy link
Member

isuruf commented Oct 2, 2019

Can you remove unnecessary changes like adding Nvidia channel? And also remove disabling error_overlinking

conda-forge.yml Outdated Show resolved Hide resolved
@@ -3,7 +3,7 @@
# NOTE: This script has been adapted from content generated by github.com/conda-forge/conda-smithy

REPO_ROOT=$(cd "$(dirname "$0")/.."; pwd;)
IMAGE_NAME="condaforge/linux-anvil-comp7"
IMAGE_NAME="condaforge/linux-anvil-cuda:10.0"
Copy link
Member

Choose a reason for hiding this comment

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

So this is fine for testing purposes, but we will need to revert this before merging.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

Copy link
Member

Choose a reason for hiding this comment

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

You need to keep this, remove skipping, make tests pass. Once that is reviewed, we can revert this change and merge.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok!

Copy link
Member

Choose a reason for hiding this comment

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

Since you are using 10.0 image, you should skip other versions in staged-recipes and only enable them in the feedstock.

@jaimergp jaimergp changed the title Add recipe for OpenMM [WIP] Add recipe for OpenMM Oct 2, 2019
cuda_compiler:
- nvcc
cuda_compiler_version:
- 10.0
Copy link
Member

Choose a reason for hiding this comment

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

Do you support other CUDA versions? Or only 10.0?

Also do you want to have a CPU only build? Or are you only interested in building with GPU support?

Copy link
Member Author

Choose a reason for hiding this comment

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

We will add more CUDA versions, yes. I think we can do it like the ucx recipe, right?

OpenMM will just ignore CUDA/OpenCL if the platform is not compatible, so we don't need CPU-only packages, I'd say. We might be interested in building variants without the explicit cudatoolkit runtime dependency though, so people can use their own CUDA installation without downloading a several hundreds MB package. How are you handling this scenario right now?

Copy link
Member

@jakirkham jakirkham Oct 2, 2019

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

But we still want to build the CUDA libraries in our package. We just want to ignore cudatoolkit for one of the variants so the user provides their own CUDA install (like in a cluster).

Copy link
Member

Choose a reason for hiding this comment

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

Ah. I'm not sure that we have a good way to solve this ATM. What is gained by using an existing CUDA install vs. using the cudatoolkit package?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd say there are two main reasons:

  1. Avoiding the large cudatoolkit download.
  2. Allowing HPC sysadmins to provide their own CUDA environment.

Maybe @peastman wants to add something else.

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds right.

Copy link
Member

Choose a reason for hiding this comment

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

Please raise an issue on the nvcc issue tracker. We can discuss this further there.

Copy link
Member Author

Choose a reason for hiding this comment

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

cuda_compiler_version:
- 10.0
channel_targets:
- conda-forge testing
Copy link
Member

Choose a reason for hiding this comment

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

What is this for?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't want packages in conda-forge/main without manually testing them with an actual GPU. Given the current OpenMM docs, conda-forge has precedence over omnia (where openmm resides now), and any new users that follow those instructions would obtain an untested (potentially broken) package.

Copy link
Member

Choose a reason for hiding this comment

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

Why does conda-forge have precedence over omnia? Would figure it would be the other way around?

Copy link
Contributor

Choose a reason for hiding this comment

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

A while back (a couple years ago now) when we were planning all this out, we wanted to eventually move every package over from omnia to conda-forge, so us omnia devs could eventually stop having to maintain a separate conda-based build system ourselves. The hard part of that was going to be resolving all the dependencies, which we had to maintain/copy a large number of them over to the omnia channel.

To prepare for this migration, we decided that conda-forge would be the de-facto dependency source, and we only maintained on omnia the minimum set of packages we had to. This basically meant that the packages which were were all OpenMM dependent at some level. The goal was, once OpenMM came to conda-forge, it would be very easy for all the other packages to migrate over as well since all they would have to do (in theory) was create a staged-recipe and the dependencies would basically already be resolved since we were relying on conda-forge as the higher priority channel anyways.

@jakirkham
Copy link
Member

Thanks for continuing to push this forward, @jaimergp. Added a couple comments to guide the next steps here.

recipes/openmm/meta.yaml Outdated Show resolved Hide resolved
number: {{ build }}
skip: True # [py2k or win]
missing_dso_whitelist:
- "*/libcuda.*" # [linux]
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Member

Choose a reason for hiding this comment

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

Because we've enabled error_overlinking on staged-recipes and since /usr/local/lib/libcuda.so is outside of prefix, conda-build errors. Correct way to fix this would be to generate the stub library libcuda.so ourselves and make that a CDT.

Copy link
Member

Choose a reason for hiding this comment

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

Can you please raise an issue about this somewhere so we can follow-up? Maybe the nvcc feedstock or the webpage repo?

Copy link
Member

Choose a reason for hiding this comment

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

This is now being tracked in issue ( conda-forge/nvcc-feedstock#12 ).

- numpy
- cython
# needed for Python wrappers
- doxygen 1.8.14
Copy link
Member

Choose a reason for hiding this comment

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

Why is this version needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

@peastman: Do you recall which Doxygen versions work correctly with the OpenMM Swig system?

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 know if this was in response to a particular problem. In general, every time we change versions of Doxygen or SWIG there's a good chance something will break. So when possible it's best to pin the build tools to particular versions we know work. We also should be pinning SWIG, since we know there's a bug in recent versions that breaks the OpenMM documentation (sphinx-doc/sphinx#6565).

Copy link
Member Author

Choose a reason for hiding this comment

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

Latest doxygen is v1.8.16, which breaks the build. 1.8.14 works correctly, that's why it's pinned. Maybe we can relax the pinning a bit (<=?). Regarding SWIG, we are not building the docs in this recipe, so we are not observing that bug, I'd say.

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to be as permissive as we can, @peastman, since we could cause package conflicts if we pin to a single version.

Copy link
Contributor

Choose a reason for hiding this comment

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

For runtime dependencies we should be permissive. Build time dependencies don't cause problems for users, and we know from past experience that changes to the build tools have a very high probability of breaking things.

recipes/openmm/meta.yaml Outdated Show resolved Hide resolved
recipe-maintainers:
- jchodera
- jaimergp
- peastman
Copy link
Member

Choose a reason for hiding this comment

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

@jchodera @peastman , are you ok being maintainers on openmm?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes!

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

@jakirkham
Copy link
Member

Had a couple questions about the recipe generally, but I think this is largely looking good at this point. Thanks for your efforts and patience @jaimergp as we figure this out together. 🙂

@jaimergp
Copy link
Member Author

jaimergp commented Oct 4, 2019

I think I applied all suggested changes! Thanks a lot to @jakirkham and @isuruf for their valuable feedback!

Tests are passing and once we get the feedstock we will be able to test the packages locally.

@isuruf
Copy link
Member

isuruf commented Oct 6, 2019

@jaimergp
Copy link
Member Author

jaimergp commented Oct 6, 2019

Thank you very much @isuruf! Suggestion applied!

@isuruf isuruf merged commit 963af5f into conda-forge:master Oct 6, 2019
docker_image:
# - condaforge/linux-anvil-cuda:9.2
- condaforge/linux-anvil-cuda:10.0
# - condaforge/linux-anvil-cuda:10.1
Copy link
Member

Choose a reason for hiding this comment

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

You can uncomment this in the feedstock. If you want to add more CUDA packages through staged-recipes, we'd appreciate some help in getting staged-recipes to play nicely with CUDA packages.

Copy link
Member

Choose a reason for hiding this comment

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

Have been meaning to raise an issue about this. Submitted issue ( #9773 ) for discussion and tracking work on this task.

Copy link
Member Author

Choose a reason for hiding this comment

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

Following issue!

@jakirkham
Copy link
Member

@jaimergp, when you have a chance, I'd be interested in hearing about your experience adding a GPU-enabled package to conda-forge. Am planning to write up documentation on GPU builds ( conda-forge/conda-forge.github.io#901 ) and your feedback on what parts were tricky as well as what worked well would help shape this documentation. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants