Magne Sjaastad 94da54c4f5 Remove AsyncPdmObjectVectorDeleter and delete PDM objects synchronously
Deleting PDM objects on a worker thread is not safe. PdmObjectHandle::prepareForDelete()
mutates state owned by other objects, it nulls the guarded pointers held by other objects
and clears m_pointersReferencingMe, an unsynchronised std::set that every PdmPointer
construction and destruction touches. Destroying an object off the main thread therefore
races with the main thread on the shared object graph. See issue 14491.

Profiling a summary ensemble teardown shows the mechanism does not pay for itself. Releasing
397 Drogon realizations takes 0.24 s sequentially and 0.24 s in parallel, and for a heavy
case the parallel release is slower than the sequential one, because free() is serialised
inside the allocator. The PDM bookkeeping itself is 0.4 to 2.8 percent of the teardown.

Remove the class and deleteChildrenAsync(), and delete synchronously instead. The call sites
that used clearWithoutDelete() and a manual delete loop to work around the race can now call
deleteChildren() directly. Add caf::PdmObjectHandleTools::deleteObjects() for the case where
the objects are no longer owned by a child array field.

The observer disconnection from issue 12262 does not depend on clearWithoutDelete(). ~Signal()
unregisters itself from every observer, so a deleted child detaches itself. That fix addressed
the async race, where ~Signal() mutated the observer list from a worker thread. The unit test
is updated to assert the observed signal count directly instead of relying on a crash.
2026-08-10 09:40:33 +02:00
2024-10-04 13:25:20 +02:00
2024-10-31 15:39:52 +01:00
2013-04-19 08:58:57 +02:00

ResInsight

ResInsight is an open source, cross-platform 3D visualization and post-processing tool for reservoir models and simulations.

Key Features

  • Specialized Visualizations: Tailored for efficient interpretation of reservoir simulation data with visualizations of properties, faults, and wells
  • Performance-Oriented: Exploits multi-core CPUs and GPUs for highly responsive operation
  • Statistical Analysis: Handles large numbers of realizations with built-in statistical calculations
  • Python Integration: Enables powerful result manipulation and computations with two-way data exchange
  • GNU Octave Integration: Enables powerful result manipulation and computations with two-way data exchange
  • Extensible Framework: Supports additional data sources and visualization methods (solvers, seismic data, CSEM, geomechanics)
  • Eclipse Integration: Supports export to Eclipse input formats for simulation cycles and parameter studies

Supported Input Formats

  • Eclipse binary output (*.GRID, *.EGRID files with corresponding *.INIT, *.XNNN, and *.UNRST files)
  • Selected Eclipse input file sections
  • Grid information with cell property data sets

Technology Stack

ResInsight utilizes:

  • Equinor/resdata and OPM/opm-common libraries for Eclipse result file access
  • Qt for the application framework
  • Qwt for plotting functionality
  • vcpkg for dependency management

Platform Support

ResInsight is cross-platform with automated testing on:

  • Red Hat Enterprise Linux (RHEL)
  • Ubuntu
  • Windows 11

Documentation

Development

Source Code

git clone git://github.com/OPM/ResInsight.git

Minimum Requirements

  • gcc 13
  • clang 19
  • CMake 3.15
  • MSVC 2022 17.4

These requirements are defined by used features in c++23 like std::stacktrace and std::expected.

Dependencies

Most dependencies are managed using vcpkg as defined in vcpkg.json

Contributing

Contributions are welcome! Please:

  • Use the dev branch for contributions and pull requests
  • Note that the master branch is kept stable and updated only for releases
  • See Spell Checking Guide for information on automated spell checking

Building

See the Build Instructions for detailed setup information.

License

ResInsight is co-developed by Equinor ASA, Ceetron Solutions AS, and Ceetron AS. The software is copyrighted by Ceetron and Equinor and licensed under GPL 3+. See the COPYING file for details.

S
Languages
C++ 88.7%
ECL 4.9%
TypeScript 3%
Python 1.5%
CMake 0.6%
Other 1.1%