Merged
Conversation
* Impl new Sim interface and added proper support for model adaptivity state storage * fix format... * add change log * fix config * fix cpp version * use correct name * fix one more test * apply requested changes * Add typing * fix format and this is a dummy commit... smth is broken with PR
* Impl new Sim interface and added proper support for model adaptivity state storage # Conflicts: # micro_manager/adaptivity/model_adaptivity.py # micro_manager/micro_simulation.py * fix format... * fix format and this is a dummy commit... smth is broken with PR * Impl tasking # Conflicts: # micro_manager/micro_simulation.py * add change log # Conflicts: # CHANGELOG.md # Conflicts: # CHANGELOG.md * fix pinning * make pinning more robust * fix ppn option (only for intel-mpi) * pin to correct host... * fix CI issues * fix mpi conn * apply suggested changes * fix format * add tasking unit test * fix format * try and make mpi work on github * use openmpi for github actions
* model instancing impl *squashed* * add missing doc and clean up * fix import * fix format * Update micro_manager/config.py Co-authored-by: Ishaan Desai <ishaandesai@gmail.com> * Update micro_manager/config.py Co-authored-by: Ishaan Desai <ishaandesai@gmail.com> * Update micro_manager/model_manager.py Co-authored-by: Ishaan Desai <ishaandesai@gmail.com> * add doc --------- Co-authored-by: Ishaan Desai <ishaandesai@gmail.com>
…er subclassing #65 (#224) * feat: expose MicroSimulationInterface as public abstract base class for user subclassing * fix: use deprecation warning instead of hard error for missing interface inheritance * fix: address review comments on MicroSimulationInterface * fix: safer class-level check for requires_initialize and requires_output * fix: wrap non-interface classes in load_backend_class for uniform interface * fix: propagate requires_initialize and requires_output through wrapper chain * fix: propagate requires_initialize and requires_output through remote wrapper * fix: apply docstring suggestions and rename compatibility wrapper * Fixed Failing Test * Add changelog entry --------- Co-authored-by: Alex Hocks <alex.hocks@tum.de> Co-authored-by: Ishaan Desai <ishaandesai@gmail.com>
…230) * Update domain_decomposition.py * Update test_domain_decomposition.py * Fix boundary point duplication in domain decomposition * fix: deduplicate vertex coordinates returned by preCICE across MPI ranks * fix: address review comments on duplicate coord filtering * Formatting * fix: extract dedup logic into filter_duplicate_coords and test real impl * fix: add CHANGELOG entry for duplicate coord fix * fix: move filter_duplicate_coords into DomainDecomposer class * fix: black formatting for filter_duplicate_coords call * fix: reformat with black 22.12.0 to match CI --------- Co-authored-by: Ishaan Desai <ishaandesai@gmail.com>
…ptivity (#234) * Fix #73: avoid division-by-zero warning in L1rel/L2rel adaptivity - Add epsilon to denominator in _l1rel and _l2rel to prevent invalid value warning when data contains zeros - Add regression test test_adaptivity_norms_with_zeros_no_warning * Fix #73: avoid division-by-zero warning in L1rel/L2rel adaptivity - Add epsilon to denominator in _l1rel and _l2rel to prevent invalid value warning when data contains zeros - Add regression test test_adaptivity_norms_with_zeros_no_warning * Fix changelog * Update tests/unit/test_adaptivity_serial.py Co-authored-by: Ishaan Desai <ishaan.desai@ipvs.uni-stuttgart.de> * Update tests/unit/test_adaptivity_serial.py Co-authored-by: Ishaan Desai <ishaan.desai@ipvs.uni-stuttgart.de> * Update tests/unit/test_adaptivity_serial.py Co-authored-by: Ishaan Desai <ishaan.desai@ipvs.uni-stuttgart.de> --------- Co-authored-by: Ishaan Desai <ishaandesai@gmail.com> Co-authored-by: Ishaan Desai <ishaan.desai@ipvs.uni-stuttgart.de>
Implemented time based load balancing. Refactored old balancing into new interface to support both.
… (#221) * Add dependency checks with clear error messages on missing packages * fix: move dependency check to CLI entrypoint instead of module load * fix: add version checks, move dependency check to --test-dependencies CLI flag, replace unit tests with pip install workflow * fix: use precice:nightly container and test missing dependency path in CI * fix: delay heavy imports when running --test-dependencies to avoid import crash * fix: remove duplicate MicroManagerCoupling import in main() * Formatting * fix: read deps from pyproject.toml, fix workflow branches and checkout version, remove duplicate snapshot import * fix: use importlib.metadata.requires instead of reading pyproject.toml directly * fix: skip optional extras when checking dependencies * fix: move Version import to top of function, add changelog entry --------- Co-authored-by: Ishaan Desai <ishaandesai@gmail.com>
* feat: add test coverage check workflow and script * fix: run coverage from repo root to ensure .coverage file is found correctly * fix: run tests explicitly to avoid hanging parallel tests * fix: lower coverage threshold to reflect current coverage * revert: restore threshold to 70% * fix: pipe coverage output to script to fix 0% coverage reading * fix: use --data-file to track coverage from repo root while running tests from tests/unit * fix: use --source=micro_manager with --data-file to correctly track coverage * fix: add parallel tests to coverage run and extra interpolation tests * fix: use --parallel-mode for mpirun coverage to avoid SQLite conflicts * fix: use --parallel-mode for all coverage runs then combine * test: add micro_simulation unit tests to boost coverage * fix: black formatting for test_micro_simulation.py * fix: set coverage threshold to 60% reflecting actual test coverage * fix: correct checkout action version and improve test quality * fix: use raw docstring in interpolation.py to suppress SyntaxWarning, add PYTHONPATH to CI workflow * fix: add PYTHONPATH for precice stub in CI, fix SyntaxWarning in interpolation.py * chore: ignore coverage data files * fix: pass PYTHONPATH into mpirun child processes with -x flag * fix: replace missing test_global_adaptivity_lb with test_load_balancing in workflow * Update micro_manager/interpolation.py Co-authored-by: Alex Hocks <73783301+Snapex2409@users.noreply.github.com> * fix: add TestMicroSimulationRemote tests and tasking coverage with OpenMPI 5 * fix: black formatting for test_micro_simulation.py * refactor: move TestMicroSimulationRemote after TestMicroSimulationLocal for logical grouping * style: apply black formatting to test_micro_simulation.py * fix: use raw docstring in interpolation.py to suppress SyntaxWarning * add changelog --------- Co-authored-by: Alex Hocks <73783301+Snapex2409@users.noreply.github.com> Co-authored-by: Alex Hocks <alex.hocks@tum.de>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Make type extensions compatible with Python 3.8.11 because that is what SuperMUC has * Remove tuple type hint * Fix simulation output collection when doing lazy initialization with micro data in adaptivity * Add temporary logging for diagnostic * Fix lazy initialization when ranks do not have an active simulation * Remove debug logging * Fix check for when a rank has no micro sims to init * Fix micro sims init for case without adaptivity * Remove some of the unnecessary fixes from the supermuc branch * Remove a boolean that is no longer required * Add changelog entry * Remove duplicate check for output functionality of MicroSimulation
…ation (#241) * Optimize relative norm calculation by not calculating intermediate arrays * Do not copy adaptivity data if it is already a NumPy array * Handle lazy initialization when there are no active sims on a rank * Replace empty dict check with empty list check * Fix lazy init conditional check * Add explicit boolean to check if there are micro sims to initialize * Fix lazy init boolean check for active simulations * Add changelog entry * Change mechanism of lazy init checks * Write correct comment on handling of initial micro data for lazy init * Further optimize norm calculation Co-authored-by: Alex Hocks <73783301+Snapex2409@users.noreply.github.com> * Dix syntax error * Apply optimization to L2 relative norm function --------- Co-authored-by: Alex Hocks <73783301+Snapex2409@users.noreply.github.com>
…on deactivation (#244) * Fix comparison of zero values of type float32 and float64 in deactivation * Add changelog entry
* Fix load balancing configuration * Add changelog entry
…e the macro-scale coordinates (#243) * Add a non-uniform domain decomposition variant based on geometric progession * Add config option for nonuniform domain decomposition * Use correct keyword: nonuniform * Remove unnecessary bracket * Change the zero sims on rank case from Exception to a warning * Add the decomposition type that was incorrectly removed * Add minimum_access_region_size as a configurable parameter to control the non-uniform decomposition * Refactor DomainDecomposer class * Fix tests * Fix tests of micro_manager userside functions * Fix geometric-type progression decomposition * First working prototype of geometric sequence for domain decomposition * Fix summation of dx in calculating the mesh bounds * Fix tests * Add Exception when a rank does not have any simulations but lazy initialization is done * Add changelog entry * Add new configuration parameters to docs * Simplify calculation of uniform bounds in domain decomposition
Snapex2409
approved these changes
Apr 15, 2026
| .def("solve", &MicroSimulation::solve) | ||
| .def("get_state", &MicroSimulation::get_state) | ||
| .def("set_state", &MicroSimulation::set_state) | ||
| .def("get_global_id", &MicroSimulation::get_global_id) |
Collaborator
There was a problem hiding this comment.
For completeness sake, might need to add set_global_id
| void set_state(py::list state); | ||
| py::list get_state() const; | ||
| int get_global_id() const; | ||
|
|
|
|
||
| def set_state(self, state): | ||
| self._state = copy.deepcopy(state) | ||
|
|
Member
Author
|
The suggestions do not directly affect any of the new features being released, so I will do them later. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contents of this release:
DomainDecomposerclass and added a new variant of non-uniform decomposition #243 breaking changepartitioningparameter setting #245--test-dependenciesCLI flag to check if all required dependencies are correctly installed, with clear error messages listing missing packages and how to fix them #221MicroSimulationInterfaceas a public abstract base class for user subclassing #224