Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
05155a3
New version.
agarny Jun 23, 2026
a472291
nanobind: upgraded to version 2.13.0.
agarny Jul 1, 2026
e3947fd
Updated our .gitignore file.
agarny Jul 1, 2026
10e6258
Some minor cleaning up.
agarny Jun 29, 2026
d692f5e
Removed unneeded headers.
agarny Jun 30, 2026
8a1c9f3
Make sure that our lambda functions don't capture more than they need…
agarny Jun 30, 2026
15fc00b
GHA: don't make the WebAssembly artifact so specific.
agarny Jun 29, 2026
7805965
Updated our API's documentation.
agarny Jun 29, 2026
9c7e66d
Simulation: have simulation tasks run in their own thread.
agarny Jun 29, 2026
3ae67c8
CMake: enable link-time optimisation for release builds.
agarny Jul 2, 2026
4b72d1b
Solvers: make their classes final.
agarny Jul 2, 2026
c03ebf8
Use std::unordered_map rather than std::map.
agarny Jul 2, 2026
2c92b03
KINSOL: reuse its context.
agarny Jul 3, 2026
f29765a
CVODE: reinitialise ourselves if possible.
agarny Jul 3, 2026
c8683f9
JavaScript: made our conversion to Float64Array safer.
agarny Jul 3, 2026
aa8f6cb
SedInstanceTask: only run our simulation from the initial time to the…
agarny Jul 3, 2026
dfd2f2b
Python: keep SedInstanceTask alive for NumPy arrays.
agarny Jul 3, 2026
94b097d
Made our logger thread-safe.
agarny Jul 3, 2026
b929f26
Made our file manager thread-safe.
agarny Jul 3, 2026
b48d7d5
Issue: refactored contextual issue description formatting.
agarny Jul 4, 2026
8cabeda
CMake: enable auto-vectorization for x86-64 release builds.
agarny Jul 4, 2026
cf423d0
SedInstanceTask: fill the simulation results with NANs only if really…
agarny Jul 5, 2026
0d79a30
C++: added noexcept to accessor methods.
agarny Jul 5, 2026
5bce7df
JavaScript: enable COOP/COEP for our playground.
agarny Jul 5, 2026
37b07d6
Improved Python binding iterators.
agarny Jul 6, 2026
d8e49b9
C++: replaced raw pointers with std::unique_ptr for pimpl.
agarny Jul 6, 2026
4cca4eb
Python: added type stubs.
agarny Jul 6, 2026
f34a21f
SedInstanceTask: store simulation results in flat buffers.
agarny Jul 6, 2026
5056d1e
Some minor cleaning up.
agarny Jul 6, 2026
326c68d
Tests: added concurrent simulation tests.
agarny Jul 6, 2026
4ffad7c
Tests: added a test to confirm that an interrupted simulation ends wi…
agarny Jul 6, 2026
74b020c
Addressed various code analysis issues.
agarny Jul 6, 2026
dced432
Addressed various code coverage issues.
agarny Jul 6, 2026
f146ac9
CMake: enable non-MSVC release math optimisations.
agarny Jul 7, 2026
12bfc25
JavaScript: cache runtime callbacks on Module.
agarny Jul 7, 2026
d0c753e
KINSOL: use static buffers instead of allocating on the heap.
agarny Jul 7, 2026
2d74cb0
JavaScript: optimised vector iteration and index access.
agarny Jul 7, 2026
f5985d2
libcurl: upgraded to version 8.21.0.
agarny Jul 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/buildThirdPartyLibrary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ jobs:
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Install (latest) GCC
if: ${{ runner.os == 'Linux' }}
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
GCC_LATEST=$(apt-cache search ^gcc-[0-9]+$ | sort -V | tail -1 | awk '{print $1}')
GXX_LATEST=$(echo "$GCC_LATEST" | sed 's/gcc/g++/')
sudo apt-get install -y "$GCC_LATEST" "$GXX_LATEST"
sudo ln -sf "/usr/bin/$GCC_LATEST" /usr/local/bin/cc
sudo ln -sf "/usr/bin/$GXX_LATEST" /usr/local/bin/c++
- name: Configure libOpenCOR (for LLVM+Clang)
if: ${{ inputs.third_party_library_name == 'LLVMClang' }}
shell: bash
Expand Down Expand Up @@ -129,4 +139,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: WebAssembly
path: ./build/*.wasm.tar.gz
path: ./build/*.tar.gz
10 changes: 10 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ jobs:
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Install (latest) GCC
if: ${{ runner.os == 'Linux' }}
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
GCC_LATEST=$(apt-cache search ^gcc-[0-9]+$ | sort -V | tail -1 | awk '{print $1}')
GXX_LATEST=$(echo "$GCC_LATEST" | sed 's/gcc/g++/')
sudo apt-get install -y "$GCC_LATEST" "$GXX_LATEST"
sudo ln -sf "/usr/bin/$GCC_LATEST" /usr/local/bin/cc
sudo ln -sf "/usr/bin/$GXX_LATEST" /usr/local/bin/c++
- name: Configure libOpenCOR
run: cmake -G Ninja -S . -B build -DBUILD_TYPE=${{ matrix.build_type }} -DCODE_ANALYSIS=OFF -DCODE_COVERAGE=OFF -DDOCUMENTATION=OFF -DJAVASCRIPT_BINDINGS=OFF -DMEMORY_CHECKS=OFF -DPYTHON_BINDINGS=OFF -DPYTHON_UNIT_TESTING=OFF -DSHARED_LIBS=${{ matrix.shared_libs }} -DUNIT_TESTING=OFF
- name: Build libOpenCOR
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -357,25 +357,29 @@ jobs:
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Install (latest) GCC
if: ${{ runner.os == 'Linux' }}
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
GCC_LATEST=$(apt-cache search ^gcc-[0-9]+$ | sort -V | tail -1 | awk '{print $1}')
GXX_LATEST=$(echo "$GCC_LATEST" | sed 's/gcc/g++/')
sudo apt-get install -y "$GCC_LATEST" "$GXX_LATEST"
sudo ln -sf "/usr/bin/$GCC_LATEST" /usr/local/bin/cc
sudo ln -sf "/usr/bin/$GXX_LATEST" /usr/local/bin/c++
- name: Install LLVM
if: ${{ matrix.code_coverage == 'ON' }}
run: brew install llvm
- name: Install Clang
- name: Install LLVM+Clang tools
if: ${{ matrix.code_analysis == 'ON' }}
run: |
wget https://github.com/opencor/gha/releases/download/gha/clang.tar.gz -O - | tar -xz
sudo mv clang /usr/local/bin
sudo cp /usr/local/bin/clang /usr/local/bin/clang++
wget https://github.com/opencor/gha/releases/download/gha/clang-include.tar.gz -O - | tar -xz
sudo mv include/* /usr/local/include
- name: Install ClangFormat
if: ${{ matrix.target == 'check_code_formatting' }}
run: |
wget https://github.com/opencor/gha/releases/download/gha/clang-format.tar.gz -O - | tar -xz
sudo mv clang-format /usr/local/bin
- name: Install Clang-Tidy
if: ${{ matrix.name == 'Code analysis' }}
run: |
wget https://github.com/opencor/gha/releases/download/gha/clang-tidy.tar.gz -O - | tar -xz
sudo mv clang-tidy /usr/local/bin
- name: Install Emscripten
Expand All @@ -399,6 +403,9 @@ jobs:
- name: Install Sphinx and some Sphinx packages
if: ${{ matrix.documentation == 'ON' }}
run: uv pip install --system sphinx~=8.0 sphinx-copybutton sphinx-inline-tabs
- name: Install NumPy
if: ${{ matrix.python_support == 'ON' }}
run: uv pip install --system numpy
- name: Install Doxygen
if: ${{ matrix.documentation == 'ON' }}
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.omo/
.vscode/
build/
_skbuild/
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.20260623.0
1.20260707.0
2 changes: 1 addition & 1 deletion cmake/buildpackage.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ project(@PACKAGE_NAME@)

include(ExternalProject)

ExternalProject_Add(@PACKAGE_NAME@ @ARGN@)
ExternalProject_Add(@PACKAGE_NAME@ @ARGN_QUOTED@)
1 change: 1 addition & 0 deletions cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ function(configure_target TARGET)
-Wno-global-constructors
-Wno-padded
-Wno-switch-enum
-Wno-thread-safety-negative
-Wno-unsafe-buffer-usage
-Wno-weak-vtables
)
Expand Down
43 changes: 36 additions & 7 deletions cmake/packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ function(build_package PACKAGE_NAME)

message(STATUS "Building ${PACKAGE_NAME}")

set(ARGN_QUOTED)

foreach(ARG ${ARGN})
string(REPLACE "\\" "\\\\" ARG_ESCAPED "${ARG}")
string(REPLACE "\"" "\\\"" ARG_ESCAPED "${ARG_ESCAPED}")

if(NOT WIN32)
string(REPLACE " " "\\ " ARG_ESCAPED "${ARG_ESCAPED}")
endif()

list(APPEND ARGN_QUOTED "\"${ARG_ESCAPED}\"")
endforeach()

string(REPLACE ";" " " ARGN_QUOTED "${ARGN_QUOTED}")

configure_file(${CMAKE_SOURCE_DIR}/cmake/buildpackage.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt)

if(EMSCRIPTEN)
Expand Down Expand Up @@ -263,8 +278,15 @@ function(retrieve_package PACKAGE_NAME PACKAGE_VERSION PACKAGE_REPOSITORY RELEAS
add_custom_target(${PACKAGE_NAME})
endfunction()

function(escape_path OLD_PATH NEW_PATH)
# Escape spaces and parentheses in a path.
function(safe_path OLD_PATH NEW_PATH)
# Make a path safe for use in CMake arguments by double quoting it on Windows and by escaping spaces and parentheses
# on Linux and macOS.

if(WIN32)
set(${NEW_PATH} "${OLD_PATH}" PARENT_SCOPE)

return()
endif()

string(REPLACE " " "\\ " NEW_PATH_VALUE "${OLD_PATH}")
string(REPLACE "(" "\\(" NEW_PATH_VALUE "${NEW_PATH_VALUE}")
Expand All @@ -276,7 +298,7 @@ endfunction()
# Determine the platform on which we are and the architecture on which we want to build.

if(EMSCRIPTEN)
set(TARGET_PLATFORM_ARCHITECTURE wasm)
set(TARGET_PLATFORM_ARCHITECTURE wasm-threaded) #---GRY--- This should eventually be renamed to just "wasm" once we are done with running simulations in their own thread.
else()
if(WIN32)
if(RELEASE_MODE)
Expand Down Expand Up @@ -336,8 +358,8 @@ if(APPLE)
endif()

if(CMAKE_C_COMPILER_LAUNCHER AND CMAKE_CXX_COMPILER_LAUNCHER)
escape_path(${CMAKE_C_COMPILER_LAUNCHER} EP_CMAKE_C_COMPILER_LAUNCHER)
escape_path(${CMAKE_CXX_COMPILER_LAUNCHER} EP_CMAKE_CXX_COMPILER_LAUNCHER)
safe_path(${CMAKE_C_COMPILER_LAUNCHER} EP_CMAKE_C_COMPILER_LAUNCHER)
safe_path(${CMAKE_CXX_COMPILER_LAUNCHER} EP_CMAKE_CXX_COMPILER_LAUNCHER)

list(APPEND CMAKE_ARGS
-DCMAKE_C_COMPILER_LAUNCHER=${EP_CMAKE_C_COMPILER_LAUNCHER}
Expand All @@ -346,13 +368,20 @@ if(CMAKE_C_COMPILER_LAUNCHER AND CMAKE_CXX_COMPILER_LAUNCHER)
endif()

if(EMSCRIPTEN)
# Note: we are using the same CMake variables that we used to build libOpenCOR so that we can build our third-party
# libraries in the same way that we built libOpenCOR.

list(APPEND CMAKE_ARGS
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_CROSSCOMPILING_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
)
else()
escape_path(${CMAKE_C_COMPILER} EP_CMAKE_C_COMPILER)
escape_path(${CMAKE_CXX_COMPILER} EP_CMAKE_CXX_COMPILER)
safe_path(${CMAKE_C_COMPILER} EP_CMAKE_C_COMPILER)
safe_path(${CMAKE_CXX_COMPILER} EP_CMAKE_CXX_COMPILER)

list(APPEND CMAKE_ARGS
-DCMAKE_C_COMPILER=${EP_CMAKE_C_COMPILER}
Expand Down
12 changes: 6 additions & 6 deletions cmake/staticarchiveextractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ int main(int pArgC, char *pArgV[])
// Parse the size field (right-justified decimal, 10 characters).

long memberSize {};
auto [_, ec] = std::from_chars(header.size, header.size + 10, memberSize);

if (auto [ptr, ec] = std::from_chars(header.size, header.size + 10, memberSize);
ec != std::errc {}) {
if (ec != std::errc {}) {
break;
}

Expand Down Expand Up @@ -210,9 +210,9 @@ int main(int pArgC, char *pArgV[])
// BSD ar format (#1/N): the first N bytes of the data area contain the member name.

long nameSize {};
auto [_, ec] = std::from_chars(nameBuf + 3, nameBuf + nameEnd, nameSize);

if (auto [ptr, ec] = std::from_chars(nameBuf + 3, nameBuf + nameEnd, nameSize);
ec != std::errc {}) {
if (ec != std::errc {}) {
nameSize = 0;
}

Expand Down Expand Up @@ -274,9 +274,9 @@ int main(int pArgC, char *pArgV[])

if (allDigits) {
long offset {};
auto [_, ec] = std::from_chars(memberName.data() + 1, memberName.data() + memberName.size(), offset);

if (auto [ptr, ec] = std::from_chars(memberName.data() + 1, memberName.data() + memberName.size(), offset);
(ec == std::errc {}) && (offset >= 0) && (static_cast<size_t>(offset) < stringTable.size())) {
if ((ec == std::errc {}) && (offset >= 0) && (static_cast<size_t>(offset) < stringTable.size())) {
auto end {static_cast<size_t>(offset)};

while ((end < stringTable.size()) && (stringTable[end] != '/') && (stringTable[end] != '\n') && (stringTable[end] != '\0')) {
Expand Down
2 changes: 1 addition & 1 deletion extern/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

- [GoogleTest](https://github.com/google/googletest) [1.17.0](https://github.com/google/googletest/releases/tag/v1.17.0)
- [modp_b64](https://chromium.googlesource.com/chromium/src/third_party/modp_b64/) at commit [5068510](https://chromium.googlesource.com/chromium/src/third_party/modp_b64/+/50685101d51ef9aabbd60c94f52d9e026d39c509)
- [nanobind](https://github.com/wjakob/nanobind) [2.12.0](https://github.com/wjakob/nanobind/releases/tag/v2.12.0)
- [nanobind](https://github.com/wjakob/nanobind) [2.13.0](https://github.com/wjakob/nanobind/releases/tag/v2.13.0)
20 changes: 16 additions & 4 deletions extern/nanobind/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,18 @@ jobs:
python3 -m pytest

free-threaded:
name: "Python 3.14-dev / ubuntu.latest [free-threaded]"
name: "Python 3.14t / ubuntu-latest [free-threaded]"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: deadsnakes/action@v3.1.0
- name: Setup Python 3.14t (free-threaded)
uses: actions/setup-python@v5
with:
python-version: 3.14-dev
nogil: true
python-version: '3.14t'

- name: Install the latest CMake
uses: lukka/get-cmake@latest
Expand Down Expand Up @@ -177,6 +177,18 @@ jobs:
mingw-w64-x86_64-python-pip
mingw-w64-x86_64-python-pytest

# The GCC 16.1 compiler that rolled out in MSYS2 in June 2026 produces
# objects with unresolvable references to std::string's move constructor
# (a re-run of a previously green master commit fails identically).
# Downgrade the compiler only: the GCC 16 runtime (gcc-libs) must stay,
# since the other MSYS2 packages were rebuilt against it, and it is
# backward-compatible with GCC 15-compiled code.
- name: Downgrade GCC to 15.2
shell: msys2 {0}
run: |
pacman -U --noconfirm --nodeps --nodeps \
https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-15.2.0-13-any.pkg.tar.zst

- name: Install Python packages
shell: msys2 {0}
run: |
Expand Down
5 changes: 1 addition & 4 deletions extern/nanobind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ endif()
# Installation rules
# ---------------------------------------------------------------------------
if(NB_CREATE_INSTALL_RULES AND NOT CMAKE_SKIP_INSTALL_RULES)
# Silence warning in GNUInstallDirs due to no enabled languages
set(CMAKE_INSTALL_LIBDIR "")
include(GNUInstallDirs)
set(NB_INSTALL_DATADIR "nanobind"
CACHE PATH "Installation path for read-only architecture-independent nanobind data files")

Expand Down Expand Up @@ -136,7 +133,7 @@ endif()
# Find the Python interpreter and development libraries
# ---------------------------------------------------------------------------

if (NOT TARGET Python::Module OR NOT TARGET Python::Interpreter)
if (NOT TARGET Python::Module AND NOT TARGET Python::Interpreter)
set(Python_FIND_FRAMEWORK LAST) # Prefer Brew/Conda to Apple framework python

if (CMAKE_VERSION VERSION_LESS 3.18)
Expand Down
3 changes: 3 additions & 0 deletions extern/nanobind/cmake/darwin-ld-cpython.sym
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
-U _PyDict_Type
-U _PyDict_Update
-U _PyDict_Values
-U _PyFrozenDict_Type
-U _PyEllipsis_Type
-U _PyEnum_Type
-U _PyErr_BadArgument
Expand Down Expand Up @@ -942,6 +943,7 @@
-U __PyTrash_destroy_chain
-U __PyTrash_thread_deposit_object
-U __PyTrash_thread_destroy_chain
-U __PyType_Lookup
-U __PyWeakref_CallableProxyType
-U __PyWeakref_ProxyType
-U __PyWeakref_RefType
Expand Down Expand Up @@ -969,6 +971,7 @@
-U __Py_DecRefSharedDebug
-U __Py_DECREF_DecRefTotal
-U __Py_INCREF_IncRefTotal
-U __Py_NewReference
-U __PyObject_GetDictPtr
-U _PyList_GetItemRef
-U _PyDict_GetItemRef
Expand Down
Loading
Loading