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

Make serial build without CUDA support #154

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mattwthompson
Copy link
Member

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@mattwthompson
Copy link
Member Author

@conda-forge-admin, please rerender

@conda-forge-admin
Copy link
Contributor

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 (recipe/meta.yaml) and found it was in an excellent condition.

@mattwthompson
Copy link
Member Author

Here is a sample error:

-- Performing Test HAVE_THREAD_LOCAL_STORAGE
-- Performing Test HAVE_THREAD_LOCAL_STORAGE - Success
-- Performing Test HAVE_THREAD_LOCAL_STORAGE
-- Performing Test HAVE_THREAD_LOCAL_STORAGE - Failed
-- Looking for __cplusplus
CMake Error at AmberTools/src/nlopt/CMakeLists.txt:173 (message):
  The compiler doesn't support CXX.


-- Looking for __cplusplus - not found
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
  File "/Users/runner/miniforge3/lib/python3.12/site-packages/conda_build/build.py", line 2555, in build
    utils.check_call_env(
  File "/Users/runner/miniforge3/lib/python3.12/site-packages/conda_build/utils.py", line 404, in check_call_env
    return _func_defaulting_env_to_os_environ("call", *popenargs, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/miniforge3/lib/python3.12/site-packages/conda_build/utils.py", line 380, in _func_defaulting_env_to_os_environ
    raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/bin/bash', '-o', 'errexit', '/Users/runner/miniforge3/conda-bld/ambertools_1730226088584/work/conda_build.sh']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/runner/miniforge3/bin/conda-build", line 11, in <module>
    sys.exit(execute())
             ^^^^^^^^^
  File "/Users/runner/miniforge3/lib/python3.12/site-packages/conda_build/cli/main_build.py", line 589, in execute
    api.build(
  File "/Users/runner/miniforge3/lib/python3.12/site-packages/conda_build/api.py", line 209, in build
    return build_tree(
           ^^^^^^^^^^^
  File "/Users/runner/miniforge3/lib/python3.12/site-packages/conda_build/build.py", line 3655, in build_tree
    packages_from_this = build(
                         ^^^^^^
  File "/Users/runner/miniforge3/lib/python3.12/site-packages/conda_build/build.py", line 2563, in build
    raise BuildScriptException(str(exc), caused_by=exc) from exc
conda_build.exceptions.BuildScriptException: Command '['/bin/bash', '-o', 'errexit', '/Users/runner/miniforge3/conda-bld/ambertools_1730226088584/work/conda_build.sh']' returned non-zero exit status 1.

##[error]Bash exited with code '1'.
Finishing: Run OSX build

Link: https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=1066793&view=logs&j=1e5dc756-6df8-5bcc-2493-e24b3c6ab45e&t=8cf20f7c-171c-5287-029c-02b9362a26e0

Or, click through to Azure logs, click to build osx osx_arm64_numpy1.23python3.11.____cpython, and look to around line 2380

@mattwthompson
Copy link
Member Author

This is the same as conda-forge/conda-forge.github.io#2329

@dacase
Copy link

dacase commented Oct 29, 2024

Just a few (random) comments:

  1. This seems to be AmberTools23 (at least as far as I see in the build logs). One potential "minus" to this choice is in getting Amber developers involved -- there already is a conda-forge build of AmberTools23 (serial). The "plus" is that, since version 23 has compiled on OSX before, it might be easier to figure out what has changed.

  2. The logs indicate that the compiler for osx_64 is clang++ version 15. I also use this, and have no problems building nlopt on my Mac-intel laptop. This just means that the conda-forge build is doing something different that what I see when I build "by hand".

  3. The error quoted above comes from a CMakeLists.txt file provided by the nlopt folks. It seems(?) to be that the system cannot find __cplusplus.

  4. Since resolution of this is probably beyond me, I'll post a request on amber-developers mailing list to see if OSX person can volunteer.

@dacase
Copy link

dacase commented Oct 31, 2024

There is a conda-forge package for nlopt: https://anaconda.org/conda-forge/nlopt

Is it worth a try to add -DFORCE_EXTERNAL_LIBS="nlopt" to the AmberTools cmake invocation and to add nlopt to the yaml file?

Update: This might be a long-shot: I've not yet been able (on Linux) to get AmberTools to locate a system-installed libnopt.so. Things might be better if nlopt is installed via conda. But @mattwthompson (and other reading this) might want to wait for more testing on other platforms.

@dacase
Copy link

dacase commented Nov 5, 2024

Update: Tim Giese has prepared a patch that updates nlopt to version 2.8, and reworks the Cmake files to make use of an installed nlopt (e.g.from a package manager or from a conda install command) if one is found. I am currently testing this out on Linux and OSX.

Limitation: this is an update to AmberTools24, not (yet?) to AmberTools23. If this update seems to work at my end, a next step might be to see if a serial conda-forge package could be built for AmberTools24.

I'll add a new update when I know more from my end.

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.

3 participants