conda-forge / numba-feedstock

A conda-smithy repository for numba.
BSD 3-Clause "New" or "Revised" License
0 stars 27 forks source link

numba v0.40.0 #15

Closed mbargull closed 6 years ago

mbargull commented 6 years ago

Built on top of gh-14, this

conda-forge-linter commented 6 years ago

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

mbargull commented 6 years ago

Oops, didn't look at gh-13 before in which equal/similar changes had been made... Well, let's just wait for the CI and see if the amount of test failures changed from the 0.39.0 PR.

souravsingh commented 6 years ago

@mbargull Thanks for helping! Looks like there are no tests failures so far. I will wait for final CI tests to pass before merging the PR.

mbargull commented 6 years ago

Neat! I didn't expect this to go so smoothly :).

@stuartarchibald: Two questions:

  1. Is the Mandelbrot test that is part of the recipe still supposed to be run or can it be removed? Currently it's just being copied into the test environment but not run (being named mandel.py instead of run_test.py) and not referenced anywhere AFAICT.
  2. Since conda-forge::tbb is available, should we add tbb to the build (meaning host) and run requirements? Any reason not to?

Other than that, no unexpected failures here, but some warnings:

- everywhere: ```python lib/python3.6/runpy.py:125: RuntimeWarning: 'numba.runtests' found in sys.modules after import of package 'numba', but prior to execution of 'numba.runtests'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) ``` This is more or less just a nuisance since `numba.runtests` uses `if __name__ == '__main__'` for the non-declarative part. If you wanted to get rid of those warnings, you could put the declarations into a separate module, e.g., `numba._runtests`, and import them from that module in `numba.runtests` and `numba.__init__` so to remove the `numba.runtests` import in `numba.__init__`. - `build_linux_python2.7` and `build_linux_python3.5`: ``` cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] ``` - `build_linux_python2.7`: ``` Successfully built numba Installing collected packages: numba Compiling /tmp/pip-install-OTYJOa/numba/numba/tests/annotation_usecases.py ... File "/tmp/pip-install-OTYJOa/numba/numba/tests/annotation_usecases.py", line 12 def __init__(self, v: int): ^ SyntaxError: invalid syntax ``` ``` Packaging numba INFO:conda_build.build:Packaging numba Packaging numba-0.40.0-py27hf8a1672_0 INFO:conda_build.build:Packaging numba-0.40.0-py27hf8a1672_0 compiling .pyc files... File "lib/python2.7/site-packages/numba/tests/annotation_usecases.py", line 12 def __init__(self, v: int): ^ SyntaxError: invalid syntax ``` ``` cc1plus: warning: command line option ???-Wstrict-prototypes??? is valid for C/ObjC but not for C++ [enabled by default] ``` ``` Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored ..Exception TypeError: "'NoneType' object is not callable" in > ignored ....Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored ``` - `build_osx_python2.7`: ``` Installing collected packages: numba Compiling /private/tmp/pip-install-DcV3A0/numba/numba/tests/annotation_usecases.py ... File "/private/tmp/pip-install-DcV3A0/numba/numba/tests/annotation_usecases.py", line 12 def __init__(self, v: int): ^ SyntaxError: invalid syntax ``` ``` Packaging numba-0.40.0-py27hf8a1672_0 INFO:conda_build.build:Packaging numba-0.40.0-py27hf8a1672_0 compiling .pyc files... File "lib/python2.7/site-packages/numba/tests/annotation_usecases.py", line 12 def __init__(self, v: int): ^ SyntaxError: invalid syntax ``` ``` python(2859,0x7fffe77423c0) malloc: *** mach_vm_map(size=2305843009213698048) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ``` ``` Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored ..........x........Exception TypeError: "'NoneType' object is not callable" in > ignored ...................Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored Exception TypeError: "'NoneType' object is not callable" in > ignored ``` - `build_osx_python3.5`: ``` python(2835,0x7fffb054b3c0) malloc: *** mach_vm_map(size=2305843009213698048) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ``` - `build_osx_python3.6`: ``` python(2813,0x7fffb74f73c0) malloc: *** mach_vm_map(size=2305843009213698048) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ```
souravsingh commented 6 years ago

I believe mandel.py can be removed, since we run tests from numba.runtests for checking the recipe.

mbargull commented 6 years ago

Right, I'd be surprised if mandel.py adds anything significant not covered by the test suite :laughing:. @souravsingh, do you have any insights in regards to whether there is any argument against building with TBB?

souravsingh commented 6 years ago

If the package is not too big , I would support using TBB. I would reserve final decision upto the numba devs, since they might now if there are any problems.

mbargull commented 6 years ago

Alright, thanks. I just opened gh-16 so we can let the CI take a look at it :wink:

stuartarchibald commented 6 years ago

@mbargull thanks for taking a look at this. To your questions...

  1. Is the Mandelbrot test that is part of the recipe still supposed to be run or can it be removed? Currently it's just being copied into the test environment but not run (being named mandel.py instead of run_test.py) and not referenced anywhere AFAICT.

I don't think it does anything and its existence is an artefact of development. Git grep doesn't show anything enlightening.

Since conda-forge::tbb is available, should we add tbb to the build (meaning host) and run requirements? Any reason not to?

Numba 0.40.0 contains a rewrite of the threading backend (used by all parallel targets on the CPU). As part of that rewrite there are now three implementations of the threadpool library used by the backend, one using TBB, one using OpenMP and one is a simple threaded workqueue. The following describes the build options provided by various packages, the Anaconda distribution builds all the threading libraries by virtue of correctly supplying all the dependencies at build time. The reality is that the Numba build system is pretty tolerant of missing dependencies if e.g. TBB is not present at build time, then that threadpool will simply not be built.

stuartarchibald commented 6 years ago

To the warnings, thanks for raising these... replies are inlined.

Yes, this has been around a while, it's harmless but a nuisance as noted. Issue to fix is now here https://github.com/numba/numba/issues/3360, thanks for the suggestion.

mbargull commented 6 years ago

@stuartarchibald, thanks for the detailed answers!

mbargull commented 6 years ago
stuartarchibald commented 6 years ago

@mbargull no problem.

mbargull commented 6 years ago

Further, this numba/numba#3202 (comment) also bit whilst writing the new backends, which is why Numba has: https://github.com/numba/numba/blob/fbd3d11e4cd1f68a978db1df21a929fb961cf4bb/buildscripts/condarecipe.local/meta.yaml#L45 as that version is fixed.

Thanks for the pointer regarding why that version has been chosen! Plus, before I overlooked that buildscripts/condarecipe.local/meta.yaml already uses run_constrained for it :).

It's OSX that may require the complicated stuff.

Oh, yes, I meant to write "struggle with getting OpenMP to work on OSX", but apparently left out the important part..

I also don't think there should be a reliance on Numba moving the testing code yet! ;-)

For sure -- maybe something for (post) 1.0 ;).


I updated gh-16 to make tbb an optional run requirement and switched to using the git archive to be able to just run remove_unwanted_files.py.

mbargull commented 6 years ago

Not sure that this would actually impact conda-forge though. Ping @anton-malakhov, do you recall if conda-forge TBB builds were safe?

Even if earlier builds on conda-forge are fine, it is always possible that defaults::tbb gets installed for whatever reason. Hence the safest thing is to just copy the lower version boundary, IMO.

anton-malakhov commented 6 years ago

Agree, let's use this version of the tbb package even though I'm sure that that particular issue with GCC 7.3 was Anaconda-specific as it used another approach to compile tbb until they converged to the version derived pretty directly from conda-forge's recipe.

mbargull commented 6 years ago

Great, thanks! I'm going ahead an close this PR in favor of gh-16 then.