diff --git a/pybamm/install_odes.py b/pybamm/install_odes.py index d1c38a61af..caf36f226e 100644 --- a/pybamm/install_odes.py +++ b/pybamm/install_odes.py @@ -20,6 +20,7 @@ # Build in parallel wherever possible os.environ["CMAKE_BUILD_PARALLEL_LEVEL"] = str(cpu_count()) + def download_extract_library(url, directory): # Download and extract archive at url if NO_WGET: diff --git a/scripts/install_KLU_Sundials.py b/scripts/install_KLU_Sundials.py index 0bfa02cefa..2aa8394ac4 100755 --- a/scripts/install_KLU_Sundials.py +++ b/scripts/install_KLU_Sundials.py @@ -95,11 +95,13 @@ def download_extract_library(url, download_dir): if libdir == "SuiteSparse_config": env["CMAKE_OPTIONS"] = f"-DCMAKE_INSTALL_PREFIX={install_dir}" else: - # For AMD, COLAMD, BTF and KLU; do not set a BUILD RPATH but use an - # INSTALL RPATH in order to ensure that the dynamic libraries are found - # at runtime just once. Otherwise, delocate complains about multiple - # references to the SuiteSparse_config dynamic library (auditwheel does not). - env["CMAKE_OPTIONS"] = f"-DCMAKE_INSTALL_PREFIX={install_dir} -DCMAKE_INSTALL_RPATH={install_dir}/lib -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE" + # For AMD, COLAMD, BTF and KLU; do not set a BUILD RPATH but use an + # INSTALL RPATH in order to ensure that the dynamic libraries are found + # at runtime just once. Otherwise, delocate complains about multiple + # references to the SuiteSparse_config dynamic library (auditwheel does not). + env[ + "CMAKE_OPTIONS" + ] = f"-DCMAKE_INSTALL_PREFIX={install_dir} -DCMAKE_INSTALL_RPATH={install_dir}/lib -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE" subprocess.run(make_cmd, cwd=build_dir, env=env, shell=True, check=True) subprocess.run(install_cmd, cwd=build_dir, check=True)