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

0.17.1 install fails #2103

Closed
Mjvolk3 opened this issue May 22, 2023 · 2 comments
Closed

0.17.1 install fails #2103

Mjvolk3 opened this issue May 22, 2023 · 2 comments
Assignees

Comments

@Mjvolk3
Copy link

Mjvolk3 commented May 22, 2023

What did you expect to happen?

I am using a conda environment on a linux machine to install amici. Amici install fails with the #include error (First Q in the FAQ)

What has happened instead?

I expected a proper installation of Amici. The reproduction code below works with v0.16.1.

To Reproduce

conda create --yes -n env pip python=3.10
conda activate env
conda install --yes -c conda-forge swig hdf5 openblas
export BLAS_LIBS=-lopenblas
pip install --no-cache-dir amici==0.17.1 # also fails with 0.17.0

Note: This works with v0.16.1

AMICI version and system environment

  • OS and version: [e.g. Ubuntu, iOS, Windows]
%lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: RedHatEnterprise
Description:    Red Hat Enterprise Linux release 8.6 (Ootpa)
Release:        8.6
Codename:       Ootpa
  • AMICI interface: [e.g. Python, Matlab, C++]
    python

  • AMICI version:
    0.17.1

  • Additional information: Compiler name and version used, Python/Matlab version, ...

GCC 11.2.0 compiler + OpenMPI
More information about the machine can be found here NCSA Delta.

How to fix
Do you know how to resolve the problem?

No. I reverted to the previous version that works

Can you submit a pull request?

No. I don't know the solution.

@Mjvolk3 Mjvolk3 added the new Newly created label May 22, 2023
@dweindl dweindl self-assigned this May 23, 2023
@dweindl
Copy link
Member

dweindl commented May 23, 2023

Hi @Mjvolk3, in v0.17.0 we reorganized how the AMICI extension is built. This involved changing/removing some of the dependency handling. Before, we had some hard-coded paths to look for BLAS headers, but this is not very sustainable, and potentially incompatible with conda environments.

That means, you will now have to set BLAS_CFLAGS=-I/absolute/path/of/cblas.h/containing/directory (in addition to BLAS_LIBS). You can get that path either from searching cblas.h inside your conda environment, or if you have a running amici<0.17.0 installation, from python -c "from amici.setuptools import get_blas_config; print(get_blas_config()['include_dirs'])" .

I will consider using CMake to try to find some BLAS automatically, but last time I tried, this had other issues...

@dweindl dweindl removed the new Newly created label May 23, 2023
dweindl added a commit that referenced this issue May 23, 2023
Let CMake's FindBLAS try to find BLAS libraries in case the user didn't provide any other information via environment variables.

Relates to #2103
@dweindl
Copy link
Member

dweindl commented May 23, 2023

P.S.: Does pip3 install -ve git+https://github.com/AMICI-dev/amici.git@develop#egg=amici\&subdirectory=python/sdist work for you, after unsetting both BLAS_LIBS and BLAS_CFLAGS? (#2104)

dweindl added a commit that referenced this issue May 23, 2023
Let CMake's FindBLAS try to find BLAS libraries in case the user didn't provide any other information via environment variables.

Relates to #2103
@dweindl dweindl closed this as completed Jun 24, 2023
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

No branches or pull requests

2 participants