Skip to content

Commit

Permalink
Enable OpenMP by default in CMake call
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Nov 25, 2024
1 parent 8f2666f commit 0e69aa0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,15 @@ def run(self):
build_type = os.getenv("PYBAMM_CPP_BUILD_TYPE", "RELEASE")
idaklu_expr_casadi = os.getenv("PYBAMM_IDAKLU_EXPR_CASADI", "ON")
idaklu_expr_iree = os.getenv("PYBAMM_IDAKLU_EXPR_IREE", "OFF")
# OpenMP is enabled by default, we'll disable it for WASM builds
pybamm_openmp = (
"OFF" if os.getenv("PYODIDE") else os.getenv("PYBAMM_OPENMP", "ON")
)
cmake_args = [
f"-DCMAKE_BUILD_TYPE={build_type}",
f"-DPYTHON_EXECUTABLE={sys.executable}",
"-DUSE_PYTHON_CASADI={}".format("TRUE" if use_python_casadi else "FALSE"),
f"-DPYBAMM_OPENMP={pybamm_openmp}",
f"-DPYBAMM_IDAKLU_EXPR_CASADI={idaklu_expr_casadi}",
f"-DPYBAMM_IDAKLU_EXPR_IREE={idaklu_expr_iree}",
]
Expand Down

0 comments on commit 0e69aa0

Please sign in to comment.