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

[Bug]: Install from source for M-Series hardware #2897

Closed
BradyPlanden opened this issue Apr 26, 2023 · 5 comments · Fixed by #2925
Closed

[Bug]: Install from source for M-Series hardware #2897

BradyPlanden opened this issue Apr 26, 2023 · 5 comments · Fixed by #2925
Assignees
Labels
bug Something isn't working difficulty: medium Will take a few days priority: high To be resolved as soon as possible

Comments

@BradyPlanden
Copy link
Member

PyBaMM Version

Source

Python Version

3.10 & 3.11

Describe the bug

Installing from source results in the following sundials header error via the brew install sundials method for M-series hardware. Using, python3 -m tox -e pybamm-requires fixes the issue. It appears to be a linking issue, as the brew install sundials doesn't appear to install libraries in ~/.local. Seems close to #1296

Steps to Reproduce

Follow MacOS installation via https://pybamm.readthedocs.io/en/stable/source/user_guide/installation/install-from-source.html#install-from-source-developer-install

Relevant log output

PyBaMM git:(self-hosted-workflow) python3 -m tox -e dev
dev create: /Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev
dev installdeps: cmake, black, scikits.odes
ERROR: invocation failed (exit code 1), logfile: /Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/log/dev-1.log
========================================================= log start ==========================================================
Collecting cmake
  Using cached cmake-3.26.3-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (45.6 MB)
Collecting black
  Using cached black-23.3.0-cp311-cp311-macosx_10_16_universal2.whl (2.6 MB)
Collecting scikits.odes
  Using cached scikits.odes-2.7.0.tar.gz (931 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting click>=8.0.0 (from black)
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting mypy-extensions>=0.4.3 (from black)
  Using cached mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Collecting packaging>=22.0 (from black)
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting pathspec>=0.9.0 (from black)
  Using cached pathspec-0.11.1-py3-none-any.whl (29 kB)
Collecting platformdirs>=2 (from black)
  Using cached platformdirs-3.3.0-py3-none-any.whl (15 kB)
Collecting scipy (from scikits.odes)
  Using cached scipy-1.10.1-cp311-cp311-macosx_12_0_arm64.whl (28.7 MB)
Collecting numpy<1.27.0,>=1.19.5 (from scipy->scikits.odes)
  Using cached numpy-1.24.3-cp311-cp311-macosx_11_0_arm64.whl (13.8 MB)
Building wheels for collected packages: scikits.odes
  Building wheel for scikits.odes (pyproject.toml): started
  Building wheel for scikits.odes (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Building wheel for scikits.odes (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [2345 lines of output]
      <string>:25: DeprecationWarning:

        `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
        of the deprecation of `distutils` itself. It will be removed for
        Python >= 3.12. For older Python versions it will remain present.
        It is recommended to use `setuptools < 60.0` for those Python versions.
        For more details, see:
          https://numpy.org/devdocs/reference/distutils_status_migration.html


      /private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/setuptools/dist.py:286: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
        warnings.warn(msg, SetuptoolsDeprecationWarning)
      /private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      /private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      running bdist_wheel
      running build
      running config_cc
      INFO: unifing config_cc, config, build_clib, build_ext, build commands --compiler options
      running config_fc
      INFO: unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
      running build_src
      INFO: build_src
      INFO: building extension "scikits.odes.ddaspk" sources
      creating build
      creating build/src.macosx-13-arm64-3.11
      creating build/src.macosx-13-arm64-3.11/scikits
      creating build/src.macosx-13-arm64-3.11/scikits/odes
      INFO: f2py options: []
      INFO: f2py: scikits/odes/ddaspk.pyf
      append_needs: unknown need 'int'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'int'
      append_needs: unknown need 'double'
      append_needs: unknown need 'int'
      append_needs: unknown need 'int'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'int'
      Reading fortran codes...
          Reading file 'scikits/odes/ddaspk.pyf' (format:free)
      Post-processing...
          Block: ddaspk__user__routines
                  Block: ddaspk_user_interface
                          Block: res
                          Block: jac
          Block: ddaspk
                          Block: ddaspk
      In: scikits/odes/ddaspk.pyf:ddaspk:unknown_interface:ddaspk
      get_useparameters: no module ddaspk__user__routines info used by ddaspk
      Applying post-processing hooks...
        character_backward_compatibility_hook
      Post-processing (stage 2)...
      Building modules...
          Constructing call-back function "cb_res_in_ddaspk__user__routines"
            def res(x,y,yprime): return delta,ires
          Constructing call-back function "cb_jac_in_ddaspk__user__routines"
            def jac(x,y,yprime,cj): return wm
          Building module "ddaspk"...
          Generating possibly empty wrappers"
          Maybe empty "ddaspk-f2pywrappers.f"
              Constructing wrapper function "ddaspk"...
      warning: callstatement is defined without callprotoargument
      getarrdims:warning: assumed shape array, using 0 instead of '*'
      getarrdims:warning: assumed shape array, using 0 instead of '*'
                y,yprime,t,idid = ddaspk(res,jac,y,yprime,t,tout,info,rtol,atol,rwork,iwork,[res_extra_args,jac_extra_args,overwrite_y,overwrite_yprime])
          Wrote C/API module "ddaspk" to file "build/src.macosx-13-arm64-3.11/scikits/odes/ddaspkmodule.c"
      INFO:   adding 'build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes/fortranobject.c' to sources.
      INFO:   adding 'build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes' to include_dirs.
      creating build/src.macosx-13-arm64-3.11/build
      creating build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11
      creating build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits
      creating build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes
      copying /private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/f2py/src/fortranobject.c -> build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes
      copying /private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/f2py/src/fortranobject.h -> build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes
      INFO:   adding 'build/src.macosx-13-arm64-3.11/scikits/odes/ddaspk-f2pywrappers.f' to sources.
      INFO: building extension "scikits.odes.lsodi" sources
      INFO: f2py options: []
      INFO: f2py: scikits/odes/lsodi.pyf
      append_needs: unknown need 'int'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'int'
      append_needs: unknown need 'int'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'int'
      append_needs: unknown need 'int'
      append_needs: unknown need 'double'
      append_needs: unknown need 'int'
      append_needs: unknown need 'int'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'double'
      append_needs: unknown need 'int'
      append_needs: unknown need 'int'
      append_needs: unknown need 'double'
      append_needs: unknown need 'int'
      Reading fortran codes...
          Reading file 'scikits/odes/lsodi.pyf' (format:free)
      Post-processing...
          Block: lsodi__user__routines
                  Block: lsodi_user_interface
                          Block: res
                          Block: adda
                          Block: jac
          Block: lsodi
                          Block: lsodi
      In: scikits/odes/lsodi.pyf:lsodi:unknown_interface:lsodi
      get_useparameters: no module lsodi__user__routines info used by lsodi
                          Block: intdy
      Applying post-processing hooks...
        character_backward_compatibility_hook
      Post-processing (stage 2)...
      Building modules...
          Constructing call-back function "cb_res_in_lsodi__user__routines"
            def res(tn,y,s,ires): return r
          Constructing call-back function "cb_adda_in_lsodi__user__routines"
            def adda(t,y,ml,mu,p,[nrowp]): return p
          Constructing call-back function "cb_jac_in_lsodi__user__routines"
            def jac(t,y,s,ml,mu,[nrowp]): return p
          Building module "lsodi"...
          Generating possibly empty wrappers"
          Maybe empty "lsodi-f2pywrappers.f"
              Constructing wrapper function "lsodi"...
      getarrdims:warning: assumed shape array, using 0 instead of '*'
                y,ydoti,t,istate = lsodi(res,adda,jac,y,ydoti,t,tout,itol,rtol,atol,itask,istate,iopt,rwork,iwork,mf,[res_extra_args,adda_extra_args,jac_extra_args,overwrite_y,overwrite_ydoti])
          Generating possibly empty wrappers"
          Maybe empty "lsodi-f2pywrappers.f"
              Constructing wrapper function "intdy"...
      getarrdims:warning: assumed shape array, using 0 instead of '*'
                dky,iflag = intdy(t,k,yh,nyh)
          Wrote C/API module "lsodi" to file "build/src.macosx-13-arm64-3.11/scikits/odes/lsodimodule.c"
      INFO:   adding 'build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes/fortranobject.c' to sources.
      INFO:   adding 'build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes' to include_dirs.
      INFO:   adding 'build/src.macosx-13-arm64-3.11/scikits/odes/lsodi-f2pywrappers.f' to sources.
      INFO: build_src: building npy-pkg config files
      running build_py
      creating build/lib.macosx-13-arm64-cpython-311
      creating build/lib.macosx-13-arm64-cpython-311/scikits
      copying scikits/__init__.py -> build/lib.macosx-13-arm64-cpython-311/scikits
      creating build/lib.macosx-13-arm64-cpython-311/scikits/odes
      copying scikits/odes/ddaspkint.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes
      copying scikits/odes/odeint.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes
      copying scikits/odes/__init__.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes
      copying scikits/odes/dae.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes
      copying scikits/odes/ode.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes
      copying scikits/odes/dopri5.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes
      copying scikits/odes/info.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes
      copying scikits/odes/lsodiint.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes
      creating build/lib.macosx-13-arm64-cpython-311/scikits/odes/tests
      copying scikits/odes/tests/test_get_info.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/tests
      copying scikits/odes/tests/test_user_return_vals_ida.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/tests
      copying scikits/odes/tests/test_on_funcs_ida.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/tests
      copying scikits/odes/tests/test_user_return_vals_cvode.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/tests
      copying scikits/odes/tests/__init__.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/tests
      copying scikits/odes/tests/test_dop.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/tests
      copying scikits/odes/tests/test_odeint.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/tests
      copying scikits/odes/tests/test_on_funcs.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/tests
      copying scikits/odes/tests/test_dae.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/tests
      creating build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/__init__.py -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/ida.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/common_defs.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/c_cvode.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/c_ida.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/c_sundials.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/c_nvector_serial.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/idas.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/cvode.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/c_sunmatrix.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/cvodes.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/c_sunlinsol.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/c_cvodes.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/c_sunnonlinsol.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      copying scikits/odes/sundials/c_idas.pxd -> build/lib.macosx-13-arm64-cpython-311/scikits/odes/sundials
      running build_ext
      SUNDIALS installation path set to `/Users/bradyplanden/.local` via $SUNDIALS_INST.
      INFO: get_default_fcompiler: matching types: '['gnu95', 'nag', 'nagfor', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg']'
      INFO: customize Gnu95FCompiler
      INFO: Found executable /opt/homebrew/bin/gfortran
      INFO: customize Gnu95FCompiler
      INFO: customize Gnu95FCompiler using config
      compiling '_configtest.c':
      #include <sundials/sundials_config.h>


      int main(void)
      {
      #if SUNDIALS_DOUBLE_PRECISION
      #else
      #error false or undefined macro
      #endif
          ;
          return 0;
      }

      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk

      INFO: compile options: '-I/Users/bradyplanden/.local/include -I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      INFO: clang: _configtest.c
      _configtest.c:1:10: fatal error: 'sundials/sundials_config.h' file not found
      #include <sundials/sundials_config.h>
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      failure.
      removing: _configtest.c _configtest.o
      compiling '_configtest.c':
      #include <sundials/sundials_config.h>


      int main(void)
      {
      #if SUNDIALS_SINGLE_PRECISION
      #else
      #error false or undefined macro
      #endif
          ;
          return 0;
      }

      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk

      INFO: compile options: '-I/Users/bradyplanden/.local/include -I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      INFO: clang: _configtest.c
      _configtest.c:1:10: fatal error: 'sundials/sundials_config.h' file not found
      #include <sundials/sundials_config.h>
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      failure.
      removing: _configtest.c _configtest.o
      compiling '_configtest.c':
      #include <sundials/sundials_config.h>


      int main(void)
      {
      #if SUNDIALS_EXTENDED_PRECISION
      #else
      #error false or undefined macro
      #endif
          ;
          return 0;
      }

      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk

      INFO: compile options: '-I/Users/bradyplanden/.local/include -I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      INFO: clang: _configtest.c
      _configtest.c:1:10: fatal error: 'sundials/sundials_config.h' file not found
      #include <sundials/sundials_config.h>
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      failure.
      removing: _configtest.c _configtest.o
      Failed to find sundials precision, falling back to double...
      compiling '_configtest.c':
      #include <sundials/sundials_config.h>


      int main(void)
      {
      #if SUNDIALS_INT32_T
      #else
      #error false or undefined macro
      #endif
          ;
          return 0;
      }

      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk

      INFO: compile options: '-I/Users/bradyplanden/.local/include -I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      INFO: clang: _configtest.c
      _configtest.c:1:10: fatal error: 'sundials/sundials_config.h' file not found
      #include <sundials/sundials_config.h>
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      failure.
      removing: _configtest.c _configtest.o
      compiling '_configtest.c':
      #include <sundials/sundials_config.h>


      int main(void)
      {
      #if SUNDIALS_INT64_T
      #else
      #error false or undefined macro
      #endif
          ;
          return 0;
      }

      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk

      INFO: compile options: '-I/Users/bradyplanden/.local/include -I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      INFO: clang: _configtest.c
      _configtest.c:1:10: fatal error: 'sundials/sundials_config.h' file not found
      #include <sundials/sundials_config.h>
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      failure.
      removing: _configtest.c _configtest.o
      Failed to find sundials index type, falling back to int64...
      compiling '_configtest.c':
      #include <sundials/sundials_config.h>


      int main(void)
      {
      #ifdef SUNDIALS_BLAS_LAPACK
      #else
      #error undefined macro
      #endif
          ;
          return 0;
      }

      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk

      INFO: compile options: '-I/Users/bradyplanden/.local/include -I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      INFO: clang: _configtest.c
      _configtest.c:1:10: fatal error: 'sundials/sundials_config.h' file not found
      #include <sundials/sundials_config.h>
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      failure.
      removing: _configtest.c _configtest.o
      Compiling scikits/odes/sundials/common_defs.pyx because it changed.
      Compiling scikits/odes/sundials/cvode.pyx because it changed.
      Compiling scikits/odes/sundials/ida.pyx because it changed.
      Compiling scikits/odes/sundials/cvodes.pyx because it changed.
      Compiling scikits/odes/sundials/idas.pyx because it changed.
      [1/5] Cythonizing scikits/odes/sundials/common_defs.pyx
      [2/5] Cythonizing scikits/odes/sundials/cvode.pyx
      [3/5] Cythonizing scikits/odes/sundials/cvodes.pyx
      [4/5] Cythonizing scikits/odes/sundials/ida.pyx
      [5/5] Cythonizing scikits/odes/sundials/idas.pyx
      INFO: customize UnixCCompiler
      INFO: customize UnixCCompiler using build_ext
      INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (-march=native)
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders/46
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/distutils
      creating /var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/tmp00361gjv/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/distutils/checks
      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-march=native'
      INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (-O3)
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-O3'
      INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (-Werror=switch)
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-Werror=switch'
      INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (-Werror)
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-Werror'
      INFO: CCompilerOpt.__init__[1786] : check requested baseline
      INFO: CCompilerOpt.feature_test[1551] : testing feature 'ASIMD' with flags ()
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-Werror=switch -Werror'
      INFO: CCompilerOpt.feature_test[1551] : testing feature 'NEON_FP16' with flags ()
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-Werror=switch -Werror'
      INFO: CCompilerOpt.feature_test[1551] : testing feature 'NEON_VFPV4' with flags ()
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-Werror=switch -Werror'
      INFO: CCompilerOpt.feature_test[1551] : testing feature 'NEON' with flags ()
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-Werror=switch -Werror'
      INFO: CCompilerOpt.__init__[1795] : check requested dispatch-able features
      INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (-march=armv8.2-a+fp16)
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-march=armv8.2-a+fp16'
      INFO: CCompilerOpt.feature_test[1551] : testing feature 'ASIMDHP' with flags (-march=armv8.2-a+fp16)
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-march=armv8.2-a+fp16 -Werror=switch -Werror'
      INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (-march=armv8.2-a+dotprod)
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-march=armv8.2-a+dotprod'
      INFO: CCompilerOpt.feature_test[1551] : testing feature 'ASIMDDP' with flags (-march=armv8.2-a+dotprod)
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-march=armv8.2-a+dotprod -Werror=switch -Werror'
      INFO: CCompilerOpt.cc_test_flags[1077] : testing flags (-march=armv8.2-a+fp16fml)
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-march=armv8.2-a+fp16fml'
      INFO: CCompilerOpt.feature_test[1551] : testing feature 'ASIMDFHM' with flags (-march=armv8.2-a+fp16+fp16fml)
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      INFO: compile options: '-I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      extra options: '-march=armv8.2-a+fp16+fp16fml -Werror=switch -Werror'
      INFO: CCompilerOpt.__init__[1807] : skip features (NEON NEON_FP16 NEON_VFPV4 ASIMD) since its part of baseline
      INFO: CCompilerOpt.__init__[1811] : initialize targets groups
      INFO: CCompilerOpt.__init__[1813] : parse target group simd_test
      INFO: CCompilerOpt._parse_target_tokens[2024] : skip targets (VXE2 XOP VX FMA4 VSX2 VSX3 VXE AVX512_SKX SSE42 VSX AVX512F SSE2 VSX4 (AVX2 FMA3)) not part of baseline or dispatch-able features
      INFO: CCompilerOpt._parse_policy_not_keepbase[2136] : skip baseline features (ASIMD)
      INFO: CCompilerOpt.generate_dispatch_header[2357] : generate CPU dispatch header: (build/src.macosx-13-arm64-3.11/numpy/distutils/include/npy_cpu_dispatch_config.h)
      WARN: CCompilerOpt.generate_dispatch_header[2366] : dispatch header dir build/src.macosx-13-arm64-3.11/numpy/distutils/include does not exist, creating it
      INFO: get_default_fcompiler: matching types: '['gnu95', 'nag', 'nagfor', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg']'
      INFO: customize Gnu95FCompiler
      INFO: customize Gnu95FCompiler
      INFO: customize Gnu95FCompiler using build_ext
      INFO: building 'scikits.odes.ddaspk' extension
      INFO: compiling C sources
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      creating build/temp.macosx-13-arm64-cpython-311/build
      creating build/temp.macosx-13-arm64-cpython-311/build/src.macosx-13-arm64-3.11
      creating build/temp.macosx-13-arm64-cpython-311/build/src.macosx-13-arm64-3.11/scikits
      creating build/temp.macosx-13-arm64-cpython-311/build/src.macosx-13-arm64-3.11/scikits/odes
      creating build/temp.macosx-13-arm64-cpython-311/build/src.macosx-13-arm64-3.11/build
      creating build/temp.macosx-13-arm64-cpython-311/build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11
      creating build/temp.macosx-13-arm64-cpython-311/build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits
      creating build/temp.macosx-13-arm64-cpython-311/build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes
      INFO: compile options: '-Ibuild/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes -I/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/core/include -Ibuild/src.macosx-13-arm64-3.11/numpy/distutils/include -I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      INFO: clang: build/src.macosx-13-arm64-3.11/scikits/odes/ddaspkmodule.c
      INFO: clang: build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes/fortranobject.c
      build/src.macosx-13-arm64-3.11/scikits/odes/ddaspkmodule.c:452:12: warning: unused variable 'cj' [-Wunused-variable]
          double cj=(*cj_cb_capi);
                 ^
      build/src.macosx-13-arm64-3.11/scikits/odes/ddaspkmodule.c:453:9: warning: unused variable 'ires' [-Wunused-variable]
          int ires=(*ires_cb_capi);
              ^
      build/src.macosx-13-arm64-3.11/scikits/odes/ddaspkmodule.c:454:12: warning: unused variable 'rpar' [-Wunused-variable]
          double rpar=(*rpar_cb_capi);
                 ^
      build/src.macosx-13-arm64-3.11/scikits/odes/ddaspkmodule.c:455:9: warning: unused variable 'ipar' [-Wunused-variable]
          int ipar=(*ipar_cb_capi);
              ^
      build/src.macosx-13-arm64-3.11/scikits/odes/ddaspkmodule.c:671:14: warning: unused variable 'rpar_Dims' [-Wunused-variable]
          npy_intp rpar_Dims[1] = {-1};
                   ^
      build/src.macosx-13-arm64-3.11/scikits/odes/ddaspkmodule.c:672:14: warning: unused variable 'ipar_Dims' [-Wunused-variable]
          npy_intp ipar_Dims[1] = {-1};
                   ^
      build/src.macosx-13-arm64-3.11/scikits/odes/ddaspkmodule.c:1117:29: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
                      (*f2py_func)(cb_res_in_ddaspk__user__routines,&neq,&t,y,yprime,&tout,info,rtol,atol,&idid,rwork,&lrw,iwork,&liw,&rpar,&ipar,cb_jac_in_ddaspk__user__routines,psol) ;
                                  ^
      build/src.macosx-13-arm64-3.11/scikits/odes/ddaspkmodule.c:893:46: warning: variable 'res_cptr' set but not used [-Wunused-but-set-variable]
          cb_res_in_ddaspk__user__routines_typedef res_cptr;
                                                   ^
      build/src.macosx-13-arm64-3.11/scikits/odes/ddaspkmodule.c:897:46: warning: variable 'jac_cptr' set but not used [-Wunused-but-set-variable]
          cb_jac_in_ddaspk__user__routines_typedef jac_cptr;
                                                   ^
      9 warnings generated.
      INFO: compiling Fortran sources
      INFO: Fortran f77 compiler: /opt/homebrew/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops
      Fortran f90 compiler: /opt/homebrew/bin/gfortran -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
      Fortran fix compiler: /opt/homebrew/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
      creating build/temp.macosx-13-arm64-cpython-311/scikits
      creating build/temp.macosx-13-arm64-cpython-311/scikits/odes
      creating build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack
      INFO: compile options: '-Ibuild/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes -I/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/core/include -Ibuild/src.macosx-13-arm64-3.11/numpy/distutils/include -I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      INFO: gfortran:f77: scikits/odes/daepack/ddaspk.f
      INFO: gfortran:f77: scikits/odes/daepack/solsy.f
      INFO: gfortran:f77: scikits/odes/daepack/stodi.f
      INFO: gfortran:f77: scikits/odes/daepack/xerrwv.f
      INFO: gfortran:f77: scikits/odes/daepack/cfode.f
      INFO: gfortran:f77: scikits/odes/daepack/prepji.f
      INFO: gfortran:f77: scikits/odes/daepack/lsodi.f
      INFO: gfortran:f77: scikits/odes/daepack/ainvg.f
      f951: Warning: Nonexistent include directory '/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include' [-Wmissing-include-dirs]
      f951: Warning: Nonexistent include directory '/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include' [-Wmissing-include-dirs]
      scikits/odes/daepack/solsy.f:55:72:

         55 |  320    wm(i+2) = 1.0d0/di
            |                                                                        1
      Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 320 at (1)
      f951: Warning: Nonexistent include directory '/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include' [-Wmissing-include-dirs]
      scikits/odes/daepack/solsy.f:57:72:

         57 |  340    x(i) = wm(i+2)*x(i)
            |                                                                        1
      Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 340 at (1)
      scikits/odes/daepack/solsy.f:1:39:

       1572 |       INDEX = 1
            |           ^
      note: 'index' was declared here
      INFO: /opt/homebrew/bin/gfortran -Wall -g -Wall -g -undefined dynamic_lookup -bundle build/temp.macosx-13-arm64-cpython-311/build/src.macosx-13-arm64-3.11/scikits/odes/lsodimodule.o build/temp.macosx-13-arm64-cpython-311/build/src.macosx-13-arm64-3.11/build/src.macosx-13-arm64-3.11/scikits/odes/fortranobject.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/ddaspk.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/solsy.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/stodi.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/cfode.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/xerrwv.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/prepji.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/lsodi.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/ainvg.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/ewset.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/daux.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/dlinpk.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/intdy.o build/temp.macosx-13-arm64-cpython-311/scikits/odes/daepack/vnorm.o build/temp.macosx-13-arm64-cpython-311/build/src.macosx-13-arm64-3.11/scikits/odes/lsodi-f2pywrappers.o -L/opt/homebrew/Cellar/gcc/12.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/12 -L/opt/homebrew/Cellar/gcc/12.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/12/../../.. -L/opt/homebrew/Cellar/gcc/12.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin22/12/../../.. -lgfortran -o build/lib.macosx-13-arm64-cpython-311/scikits/odes/lsodi.cpython-311-darwin.so
      INFO: building 'scikits.odes.sundials.common_defs' extension
      INFO: compiling C sources
      INFO: C compiler: clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math

      creating build/temp.macosx-13-arm64-cpython-311/scikits/odes/sundials
      INFO: compile options: '-I/Users/bradyplanden/.local/include -I/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/core/include -Ibuild/src.macosx-13-arm64-3.11/numpy/distutils/include -I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c'
      INFO: clang: scikits/odes/sundials/common_defs.c
      In file included from scikits/odes/sundials/common_defs.c:778:
      In file included from /private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h:5:
      In file included from /private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
      In file included from /private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940:
      /private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
      #warning "Using deprecated NumPy API, disable it with " \
       ^
      scikits/odes/sundials/common_defs.c:786:10: fatal error: 'sundials/sundials_types.h' file not found
      #include "sundials/sundials_types.h"
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning and 1 error generated.
      error: Command "clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -ftrapping-math -I/Users/bradyplanden/.local/include -I/private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-build-env-zee0hxd8/overlay/lib/python3.11/site-packages/numpy/core/include -Ibuild/src.macosx-13-arm64-3.11/numpy/distutils/include -I/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/include -I/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c scikits/odes/sundials/common_defs.c -o build/temp.macosx-13-arm64-cpython-311/scikits/odes/sundials/common_defs.o -MMD -MF build/temp.macosx-13-arm64-cpython-311/scikits/odes/sundials/common_defs.o.d" failed with exit status 1
      INFO:
      ########### EXT COMPILER OPTIMIZATION ###########
      INFO: Platform      :
        Architecture: aarch64
        Compiler    : clang

      CPU baseline  :
        Requested   : 'min'
        Enabled     : NEON NEON_FP16 NEON_VFPV4 ASIMD
        Flags       : none
        Extra checks: none

      CPU dispatch  :
        Requested   : 'max -xop -fma4'
        Enabled     : ASIMDHP ASIMDDP ASIMDFHM
        Generated   : none
      INFO: CCompilerOpt.cache_flush[857] : write cache to path -> /private/var/folders/46/vvrt_nq91kj6lc8nv1_p7p6r0000gn/T/pip-install-o25_jc9c/scikits-odes_e5f5f73cf9184453b0bc799385f15735/build/temp.macosx-13-arm64-cpython-311/ccompiler_opt_cache_ext.py
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for scikits.odes
Failed to build scikits.odes
ERROR: Could not build wheels for scikits.odes, which is required to install pyproject.toml-based projects

========================================================== log end ===========================================================
ERROR: could not install deps [cmake, black, scikits.odes]; v = InvocationError('/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/bin/python -m pip install cmake black scikits.odes', 1)
__________________________________________________________ summary ___________________________________________________________
ERROR:   dev: could not install deps [cmake, black, scikits.odes]; v = InvocationError('/Users/bradyplanden/Documents/Git/PyBaMM/.tox/dev/bin/python -m pip install cmake black scikits.odes', 1)
@BradyPlanden BradyPlanden added the bug Something isn't working label Apr 26, 2023
@Saransh-cpp
Copy link
Member

I think the error is originating from the fact that the dev environment tries to install scikits.odes but never installs SUNDIALS (in the tox env). tox -e pybamm-requires on the other hand does install SUNDIALS in the tox env -

commands =
         python {toxinidir}/scripts/install_KLU_Sundials.py
      - git clone https://github.com/pybind/pybind11.git {toxinidir}/pybind11

The tox file is a bit messy. For instance, look how jax and jaxlib are never installed during unit and integration tests -

commands =
     tests-!windows-!mac: sh -c "pybamm_install_jax"  # install jax, jaxlib for ubuntu
     tests: python run-tests.py --all
     unit: python run-tests.py --unit
     integration: python run-tests.py --integration

allowing the testing suite to skip the test for JaxSolver. But, JaxSolver is tested when the coverage report is generated on Python 3.9 -

[testenv:coverage]
deps =
     coverage
     scikits.odes
commands =
     !windows-!mac: sh -c "pybamm_install_jax"
     coverage run run-tests.py --nosub
     # Some tests make use of multiple processes through
     # multiprocessing. Coverage data is then generated for each
     # process separately and data must then be combined into one
     # single coverage data file.
     coverage combine
     coverage xml

I am hoping these discrepancies will be solved under GSoC this year :)

@Saransh-cpp
Copy link
Member

I think executing tox -e dev should give a similar error on Ubuntu. I might be wrong though.

@jsbrittain
Copy link
Contributor

To confirm, this is reproducible on both mac and linux when installing via the brew method. At the moment a quick fix is to specify the following environment variables prior to running tox -e dev:

export CMAKE_PREFIX_PATH="$(brew --prefix)"
export SUNDIALS_INST="$(brew --prefix sundials)"

I'm just looking into a cleaner solution...

@agriyakhetarpal
Copy link
Member

Based on #1296 perhaps a way to solve this would be to update the documentation for installing from source, so that the instructions say that:

  1. Do not use brew install sundials in developer installations since it does not link the cmake args that @jsbrittain mentions — on the other hand, this is something that scripts/install_klu_sundials.py does, so recommend that users use it instead

and

  1. Or to direct them to the use of tox, since most developers and contributors are using tox to run the tests. The pybamm-requires env, i.e., the tox -e pybamm-requires command, installs SUNDIALS with the above script correctly (with install_klu_sundials) and not with brew

@jsbrittain
Copy link
Contributor

Yes, I think directing them to pybamm-requires seems the most straightforward and provides a clear recommended developer procedure, and has already been noted to solve the original Issue as raised by @BradyPlanden .

Just note that the Mac install does still rely on brew for openblas, etc., and when testing this approach (admittedly in a linux container, i.e. not the recommended approach), pybamm-requires then had problems finding blas until directed towards the brew install. Testing on Mac with brew installed to the default location seemed to work fine though.

I'll update and simplify the install docs in accordance with @agriyakhetarpal suggestion above, specifically point 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working difficulty: medium Will take a few days priority: high To be resolved as soon as possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants