-
Notifications
You must be signed in to change notification settings - Fork 60
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
numpy isn't linked to any libraries as default. #696
Comments
Hmnn. So you'd like NumPy to use the LAPACK libraries in the same way that SciPy does on Linux? This seems reasonable to me. @certik? |
I think something along these lines. The current numpy yaml is clearly broken:
As there is no dependency on openblas in numpy (and even if there was, that's not the way to go). We need to allow numpy to use the lapack implementation that is specified in the profile. |
Agreed. |
Yes, that’d be great. If I understand the SciPy yaml correctly, it also uses the blas / lapack from within hashstack, ensuring that the end build is self-contained and with few external dependencies. Terje Kvernes |
Shouldn't numpy/scipy use system optimized blas/lapack whenever possible? Seems to me that scipy.yaml expects LAPACK_DIR to be set externally: build_stages:
- when: platform == 'linux'
name: set-lapack-paths
after: libflags
before: install
handler: bash
bash: |
export LDFLAGS="$LDFLAGS -shared"
export ATLAS=$LAPACK_DIR
export BLAS=$LAPACK_DIR
export LAPACK=$LAPACK_DIR and the lapack.yaml only sets LAPACK_LDFLAGS and BLAS_LDFLAGS when_build_dependency: when_build_dependency:
- {set: 'LAPACK_LDFLAGS', value: '-Wl,-rpath,${ARTIFACT}/lib -L${ARTIFACT}/lib -llapack'}
- {set: 'BLAS_LDFLAGS', value: '-Wl,-rpath,${ARTIFACT}/lib -L${ARTIFACT}/lib -lblas'} Looks like somebody needs to clean up:-) |
Configuring NumPy/SciPy is surprisingly challenging. Our normal approach of setting environment variables completely collapses when configuring these libraries: #562 so I've been avoiding tinkering with them too much. That said, if we can figure out how to robustly link in system and hashdist-built lapack/blas libraries, it would be a huge win. |
I know @ahmadia. I just finished installing numpy/scipy on Shaheen, something I probably couldn't have done without this: https://gist.github.com/sanromd/9483946. Thanks:-) |
@mikaem, the |
To be honest, using LAPACK_DIR sounds like a step in the right direction to me. It’s not ideal but it’s less broken than the current state. :-) Terje Kvernes |
Hi there. I'm trying to install numpy via hashstack. I want it to use hashstack's lapack and our optimized system blas. I read the discussion but it's unclear to me how to proceed. |
After installing numpy via hashstack, the end result is somewhat disappointing:
This is solvable by editing the yaml file to include the following:
But I'm not sure if that's a pretty solution.
The text was updated successfully, but these errors were encountered: