staged-recipes icon indicating copy to clipboard operation
staged-recipes copied to clipboard

Add RELION recipe

Open alisterburt opened this issue 2 years ago • 3 comments

Hi there, I am attempting to add a recipe for an image processing software package called RELION.

I have been running into some trouble testing the build locally, this PR is so that I can test with the conda-forge build infrastructure.

todo (probably in later builds)

  • mac compatibility
CMake Error at /Users/aburt/mambaforge/envs/staged-recipes/conda-bld/relion_1660578673776/_build_env/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
  • vectorised codepath compilation (mutually exclusive from gpu...)

Checklist

  • [x] Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • [x] License file is packaged (see here for an example).
  • [x] Source is from official source.
  • [x] Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • [x] If static libraries are linked in, the license of the static library is packaged.
  • [ ] Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • [x] Build number is 0.
  • [x] A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • [x] GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • [x] When in trouble, please check our knowledge base documentation before pinging a team.

alisterburt avatar Aug 15 '22 16:08 alisterburt

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/relion) and found it was in an excellent condition.

conda-forge-linter avatar Aug 15 '22 16:08 conda-forge-linter

@biochem-fan I'm sitting here with @kimanius, we're trying to build conda-forge packages for RELION (3.1.3 here, other versions will follow once we've figured things out)

Would you mind taking a look at some of the failed builds? Specifically, linux with cuda and osx

  • for linux, it looks like the when nvcc is trying to build object files it's failing to reference the standard library correctly
  • for mac it looks like the mac build is struggling to find openmp libraries, I am considering skipping these to avoid this problem since I don't expect many people to use mpi on mac...

edit: please find here some useful info for using conda-build to build packages with CUDA deps https://conda-forge.org/docs/maintainer/knowledge_base.html#cuda-builds

and here for how to use cmake within conda-build https://conda-forge.org/docs/maintainer/knowledge_base.html#using-cmake

alisterburt avatar Aug 16 '22 17:08 alisterburt

@alisterburt

I don't know much about conda and Docker so I don't know how to fix your problems (and I don't have time to investigate this at the moment).

for linux, it looks like the when nvcc is trying to build object files it's failing to reference the standard library correctly

NVCC internally uses G++. Does it uses the same version of G++ and headers as those CMake is using?

Dockerfile in NVIDIA's RELION images https://catalog.ngc.nvidia.com/orgs/hpc/containers/relion/tags might be informative.

for mac it looks like the mac build is struggling to find openmp libraries, I am considering skipping these to avoid this problem since I don't expect many people to use mpi on mac...

(probably this is a typo but just in case) are you aware that OpenMP and OpenMPI are different things? Does https://github.com/conda-forge/compilers-feedstock/issues/15 help in supporting OpenMP in Mac OS?

Note that RELION does not officially support Mac OS. One might be able to run GUI and simple commands such as relion_image_handler but I don't think one can perform real processing in practice under Mac OS. I am not sure if it is a right thing to give a false sense of support to users.

biochem-fan avatar Aug 17 '22 02:08 biochem-fan

@biochem-fan thank you for the time taken already!

NVCC internally uses G++. Does it uses the same version of G++ and headers as those CMake is using?

This is a good hint and feels like the right path, I will be more explicit with CMAKE_ARGS to specify the G++ version seen by nvcc

(probably this is a typo but just in case) are you aware that OpenMP and OpenMPI are different things? Does https://github.com/conda-forge/compilers-feedstock/issues/15 help in supporting OpenMP in Mac OS?

I was vaguely aware but definitely not at ease with how everything is related here, thanks for the patience. This issue looks like it has useful tips too, I will try with llvm-openmp and see how this goes

alisterburt avatar Aug 17 '22 08:08 alisterburt

NVCC internally uses G++. Does it uses the same version of G++ and headers as those CMake is using?

Yes, they are set via the nvcc wrapper, and also in the activation script.

jaimergp avatar Aug 17 '22 11:08 jaimergp

Big thank you @jaimergp 🙂 this is a fun puzzle!

As it stands I have 3 issues left to tackle

  1. osx build now works but the simple existence test is failing
  2. dependency resolution is failing in the linux64 build (without cuda)
    • it can't find an nvcc package for this build env, how do I tell it "this one doesn't need cuda"? I couldn't see an appropriate selector
  3. nvcc is failing to build host code correctly
    • I will reproduce these fails locally so that I can debug more quickly

alisterburt avatar Aug 17 '22 11:08 alisterburt

deferring to experience @jaimergp - ta!

alisterburt avatar Aug 19 '22 17:08 alisterburt

building shared libs actually seems to work okay when CUDA is unavailable - this is consistent with what I see locally which is a fail during the compilation of some autogenerated kernels

The problem we have for now is the same stl version errors as before https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=554521&view=logs&j=251aaabc-0e07-5144-b266-6bec7c06d403&t=4fe67fbf-3741-526d-9898-07821d0893c0&l=1479

alisterburt avatar Aug 22 '22 09:08 alisterburt

Awesome @alisterburt! If you want, we can disable CUDA for now and merge just the CPU variants?

jaimergp avatar Aug 25 '22 08:08 jaimergp

@jaimergp that seems like the best path forwards for now, thanks!

alisterburt avatar Aug 25 '22 13:08 alisterburt

FYI: discussion about compiling RELION on Mac OS.

https://www.jiscmail.ac.uk/cgi-bin/wa-jisc.exe?A2=ind2209&L=CCPEM&O=D&P=16699

biochem-fan avatar Sep 08 '22 01:09 biochem-fan

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/relion) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipes/relion:

  • Recipe with the same name exists in bioconda: please discuss with @conda-forge/bioconda-recipes.

Hi friend!

We really, really, really appreciate that you have taken the time to make a PR on conda-forge/staged-recipes! conda-forge only exists because people like you donate their time to build and maintain conda recipes for use by the community.

In an effort to maintain this repository and increase the signal-to-noise for open PRs, the maintainers of staged-recipes close excessively old PRs after six months. This PR will remain open for another month, and then will be closed.

If you'd like to keep it open, please comment/push and we will be happy to oblige! Note that very old PRs will likely need to be rebased on main so that they can be rebuilt with the most recent CI scripts. If you have any trouble, or we missed reviewing this PR in the first place (sorry!), feel free to ping the team using a special command in a comment on the PR to get the attention of the staged-recipes team.

Cheers and thank you for contributing to this community effort!

stale[bot] avatar Aug 03 '23 17:08 stale[bot]

Hi again! About a month ago, we commented on this PR saying it would be closed in another month if it was still inactive. It has been a month and so now it is being closed. Thank you so much for making it in the first place and contributing to the community project that is conda-forge. If you'd like to reopen this PR, please feel free to do so at any time!

Cheers and have a great day!

stale[bot] avatar Jan 01 '24 03:01 stale[bot]