Repository navigation
SPECFEM++ 0.6.0
π TL;DR
New Features
- Distributed-memory (MPI) parallelism β mesh decomposition, halo-exchange
communication buffers, and an MPI-aware solver. Forward simulations now run across
multiple ranks, validated against the homogeneous-elastic nightly benchmark. - Viscoelastic attenuation (2D/3D) β a standard-linear-solid (SLS) attenuation model
with on-the-fly computation of relaxation times, plus a cookbook comparing attenuation
on/off and the effect of the reference frequency. - 3D acoustic & acousticβelastic coupling - conforming
fluidβsolid coupling, Stacey and acoustic-free-surface boundary conditions, SIMD
execution. - 3D kernels - both acoustic and elastic kernels can be computed with and
without attenuation. - New source formats + UTM mesh support β read SPECFEM3D-style
FORCEand
CMTSOLUTIONfiles, optional source date-times, and UTM coordinate projection
(including topography). - SAC seismogram output β alongside a reorganized
io_backendslayer and parallel
HDF5 writing for VTK wavefields.
Usability & robustness
- Simulation stability / CFL checks and mesh-resolution checks that warn before a
run goes unstable or under-resolved. - Version header printed to the log so every run records the exact build.
- Error handling improved with more informative error messages and a centralized error reporting system.
Under the hood
- Completed the
include/βcore/migration: all library code now lives under
core/specfem/. - New
tag_dispatch/ typed-storage machinery replacing the olderFOR_EACHmacros. - CLI11 replaces
Boost::program_options; Kokkos updated to 5.1.1 and the
in-house Kokkos abstraction wrappers were removed. - Performance: SIMD over DOF chunks, a software memory prefetcher, compile-time grid
extents for chunked iterators, and assorted build-time reductions.
π What's New
Distributed-memory parallelism (MPI)
SPECFEM++ now runs forward simulations across multiple MPI ranks. The mesh is split with
a new in-repo xdecompose_mesh tool (METIS-backed), each rank reads its own partition of
the database, and ranks exchange shared-degree-of-freedom contributions through dedicated
communication buffers built from the mesh adjacency graph. The assembly, mass-matrix
computation, source/receiver location, and seismogram writing are all MPI-aware, and the
nightly homogeneous-elastic benchmark now exercises the MPI path end-to-end.
Below, on the left, is the MPI partitioning for the Mount St. Helens 3D
benchmark; on the right is a simulation of the same benchmark running across 4
MPI ranks.
mt_st_helens_mpi.mp4
Viscoelastic attenuation
We added a standard-linear-solid (SLS) attenuation model for 2D and 3D media. Relaxation times
(tau_sigma, tau_epsilon) are fit on the fly β tau_epsilon via a NelderβMead
optimization against the target quality factor over the simulation frequency band β and
the attenuation contribution is folded into the stiffness computation through a Taylor
expansion stored in the assembly. Runtime configuration (number of standard linear solids,
reference frequency, frequency band) is read from the parameter file, and the code can emit
the realized Q(f) curve for inspection.
Two cookbooks demonstrate the feature: one comparing a simulation with attenuation on vs.
off, and one illustrating the effect of the reference frequency.
3D capabilities
3D continues to mature toward feature parity with 2D:
- Acoustic media & fluidβsolid coupling β conforming acousticβelastic
coupling, with displacement integration tests. - Boundary conditions β Stacey absorbing and acoustic-free-surface boundaries in 3D.
- SIMD β vectorized execution enabled for 3D simulations.
- Adjoint / sensitivity kernels β We now support 3D adjoint source computation and Frechet derivatives for both acoustic and elastic media, with and without attenuation.
Below we show the 3D elastic Kernel benchmark against Fortran. The top row shows
specfem++ kernels, the center row shows the reference Fortran kernels and the
bottom row shows the difference between the two. As expected the difference is
localized to the source and receiver regions.
Sources, receivers & I/O
FORCEandCMTSOLUTIONreaders β source definitions in the SPECFEM3D file formats,
withread_sourcesrefactored so new formats are easy to add.- UTM projection & date-times β sources and receivers can be specified in UTM
coordinates (with topography), and sources can carry absolute date-times. - SAC seismograms β seismogram output in SAC format, on top of a reorganized
io_backendslayer (ASCII / HDF5 / ADIOS2 / NPY / NPZ / SAC). - Parallel HDF5 for the VTKHDF wavefield writer.
Robustness & developer experience
- Stability and mesh-resolution checks warn when a simulation is likely to go unstable
(CFL) or is under-resolved for the source frequency content. - The executable now prints a version header, so logs are self-documenting.
- A large code-organization pass: the
include/tree was fully migrated into
core/specfem/, the olderFOR_EACHmacros were replaced bytag_dispatchand typed
storage, anonymous namespaces were removed (unity-build safe),Boost::program_options
was replaced by CLI11, and Kokkos was bumped to 5.1.1.
π§ͺ Performance Benchmarks
We benchmarked performance for both the 2D and the 3D part of the code. 2D is
now 2x faster than the original Fortran code, and 3D in its first iteration of
performance optimizations reached 0.6 times the performance of the original
Fortran code. The full benchmark results are shown in the figure below.
π Statistics
- 249 pull requests merged since
v0.5.0(Jan 16 β Aug 17, 2026) - 1546 commits since
v0.5.0 - 5 contributors
New Contributors
No new contributors this cycle β all returning.
What's Changed
π¨βπ¬ New physics
- Issue 1592 - Implements computation of tau_sigma for attenuation by @lsawade in #1608
- Issue 1578 [Part 1] - Adds CR for acoustic media by @Rohit-Kakodkar in #1607
- Issue 1591 - Maxwell Solid, Nelder-Mead-Algorithm, tau_epsilon computation by @lsawade in #1615
- Issue 1595 - Implement Modulus and scale_factor computation by @lsawade in #1636
- Issue 1581 - Enable 3D compute coupling kernel by @Rohit-Kakodkar in #1726
- Issue 1594 part 3 - Implements Assembly::Attenuation and Assembly::FieldDerivativeStorage by @lsawade in #1765
- Issue 1123 - 3D acoustic kernel by @icui in #1927
- Issue-1903 Adds boundary conditions for 3D by @icui in #1914
π Performance enhancement
- Fixes OpenMP slow down on by @lsawade in #1666
- Updated the get mask utility for ~10% performance gain on apple silicon by @lsawade in #1668
- Makes many kernels SIMD | chunking in DOFs by @Rohit-Kakodkar in #1910
- Adds a light-weight continuous range index view by @Rohit-Kakodkar in #1907
- Add a memory prefetcher to specfem by @Rohit-Kakodkar in #1904
- Adds element index range to properties/kernels by @Rohit-Kakodkar in #1932
- Adds element index range to fields by @Rohit-Kakodkar in #1934
β Enhancement
- Flux Scheme Macros by @int-ptr-ptr in #1610
- Issue 1593 Part 1 - Read Attenuation values by @Rohit-Kakodkar in #1619
- Issue-1593 - 2 - Updates macros and containers by @Rohit-Kakodkar in #1622
- Issue 1580 - Implementing ChunkedFaceIterator & assembly::face_types by @lsawade in #1614
- Issue 1601 - Implement check mesh resolution by @lsawade in #1630
- Issue 1593 part 3 - Reads attenuation database by @Rohit-Kakodkar in #1628
- Issue 1643 - Implements Attenuation frequency dependence output curve. by @lsawade in #1645
- Issue 1579 - Add conforming interface for dim3 by @icui in #1685
- Implemented 3D chunked intersection iterator by @Rohit-Kakodkar in #1718
- Issue 1597 - Implement attenutation point types by @lsawade in #1680
- 1674 prepare cosserat solver by @maxlchien in #1741
- template element_intersection_types by fluxscheme by @int-ptr-ptr in #1721
- 1707 - Update IO for 2D / 3D mesh with MPI by @icui in #1722
- Issue 1711 - Support multi-partition adjacency graphs in 2D mesh I/O by @Rohit-Kakodkar in #1733
- Simplified flux scheme yaml node by @int-ptr-ptr in #1738
- Added
flux_scheme_tagtemplate param to NCIs + deps by @int-ptr-ptr in #1747 - Issue 1714 - Field and GradientPack and FieldDerivativesPack implementation by @lsawade in #1742
- Issue 1594 - Part 1 - Implement extra utility functions/structs by @lsawade in #1720
- Issue 1711 - Implement adjacency map computation for MPI mesher by @Rohit-Kakodkar in #1756
- Issue 1712 - update IO routines by @icui in #1754
- Issue 1711 - MPI database for Homogeneous elastic by @Rohit-Kakodkar in #1759
- Issue 1711 - Update the MPI adjancies / MPI reader by @Rohit-Kakodkar in #1760
- Issue 1719 - Base branch for
tag_dispatchby @icui in #1783 - Issue 1713 - Support for Edge and Corner MPIs by @Rohit-Kakodkar in #1817
- Issue 1702 - Locate sources / stations with MPI by @icui in #1757
- Issue 1699 - Communication Buffers by @Rohit-Kakodkar in #1828
- Locate point on face by @int-ptr-ptr in #1847
- Issue 1802 - Adds
xdecompose_meshto SF++ repo by @Rohit-Kakodkar in #1848 - Added claude folder for consistency across devs by @lsawade in #1880
- Issue 1362 - Adds optional datetimes for sources by @lsawade in #1861
- Issue 1704 - Write for seismograms accounting for MPI by @icui in #1875
- Enable SIMD execution for 3D simulations by @Rohit-Kakodkar in #1887
- Interpolation-based NCI Coupling by @int-ptr-ptr in #1879
- Issue 1837 - Adds reading and writing of the UTM flags & updates databases/traces by @lsawade in #1892
- NCI3D Prep: Pointwise algo + nci accessor by @int-ptr-ptr in #1909
medium_physics::compute_coupling+ test for 3d, interpolation-type by @int-ptr-ptr in #1889- Issue 1701 - Implements MPI enabled mass matrix computation and tests and updates benchmark to enable specfem mpi by @lsawade in #1893
- Issue 85 - Adds stability checks on simulation by @Rohit-Kakodkar in #1926
gmshlayerbuilder3D support by @int-ptr-ptr in #1930- Issue 1871 - Adds UTM coordinate resolution; including topography. by @lsawade in #1937
- Issue 1700 - Updates the solver to perform MPI communication and the assembly to hold buffers by @lsawade in #1895
- nonconforming adjacency passthrough in
xdecompose_meshby @int-ptr-ptr in #1951 - Issue 1945 - Elastic kernels by @icui in #1973
- Link SPECFEM++ against trilinos by @Rohit-Kakodkar in #1990
- Issue 1946 - undo-attenuation for kernels (main PR) by @icui in #2005
- Issue 1820 - Enforce free surface boundary by @icui in #2010
- 1946 - Reduced memory usage option by @icui in #2006
- Issue 1810 - Attenuation IO / Alternative 3 by @lsawade in #1996
π Documentation
- Issue 1661 - Updates Enumeration documentation for new structure by @Rohit-Kakodkar in #1687
- Made naming of the cookbooks consistent and fixed some headers by @lsawade in #1688
- Issue 1869 - Adds a GMSH mesh cookbook by @Rohit-Kakodkar in #1915
- Issue 1920 - Adds missing doxygen links to RST by @Rohit-Kakodkar in #1935
- Issue 1919 - Adds Known Limitations section by @Rohit-Kakodkar in #1936
- Issue 1925 - Add more 3D examples / benchmarks by @icui in #1960
- Issue 1921 - Fills missing
@briefdocstrings. by @icui in #1988
Refactor
- 1554 - Move algorithms to core/ by @icui in #1562
- 1554 - Move boundary to core by @icui in #1566
- 1554 - Move datatype to core (small refactor) by @icui in #1567
- 1554 - Move execution to core by @icui in #1568
- 1554 - Move parallel configuration to core by @icui in #1569
- 1554 - Move quadrature to core/ by @icui in #1570
- 1554 - Move utilities to core/ by @icui in #1571
- 1554 - Move parameter_parser to core (small refactor) by @icui in #1572
- 1554 - Move kokkos_kernels to core/ by @icui in #1575
- Issue 1554 - Move most code from include/ to core/ (excluding io, medium and enumerations) by @icui in #1584
- Issue 1330 - Removes Kokkos wrappers from core - Part 1 by @Rohit-Kakodkar in #1590
- Issue 1563 - Remove anonymous namespaces, Part 1 by @lsawade in #1605
- 1554 - Rename structs in kokkos_kernels by @icui in #1588
- 1554 - Move medium to core Part II: refactor medium_container by @icui in #1612
- 1554 - Move io to core by @icui in #1617
- 1554 - Move enumerations to core Part I by @icui in #1631
- Promote RegisterArray to datatype namespace by @Rohit-Kakodkar with @Copilot in #1625
- Issue 1330 - Deprecate Kokkos abstractions by @Rohit-Kakodkar in #1632
- 1554 - Move enumerations to core Part II by @icui in #1635
- 1064 - Update specfem/compute with new tags syntax by @icui in #1647
- CLI11 replacing Boost::program_options. by @lsawade in #1644
- Fix tpp imports. by @icui in #1648
- Issue 1064 - Update tags for time_marching. by @icui in #1649
- Issue 1626 - Moves setup and constants to core, deprecates globals, default_file by @lsawade in #1650
- Refactor sources to disentangle some things by @lsawade in #1683
- Moves
DomainViewto datatype namespace by @Rohit-Kakodkar in #1679 - Reduced compiled time by 15% by just not doing a superheader for asse⦠by @lsawade in #1684
- Merge Edge and Face types within assembly by @Rohit-Kakodkar in #1691
- 1064 tags - Template point and compute with
specfem::tags::Tagsby @icui in #1717 - 759 - Move io libraries from
iotoio_backendsby @icui in #1814 - Issue 1581 - Updates database processor names by @Rohit-Kakodkar in #1818
- 1719 - Introduce
specfem::tags::expandto simplify creation by @icui in #1807 - Issue 1362 - Refactor read_sources for simpler addition of new formats. by @lsawade in #1858
...ChunkFaceViewTypetypes created +...ChunkElementViewTyperefactor by @int-ptr-ptr in #1876- Added LayoutType to chunk_ndim_view by @int-ptr-ptr in #1886
- Issue 1813 - Refactor compute stiffness kernel by @Rohit-Kakodkar in #1878
- Issue 1867 - Refactor coordinates to allow for better conversion by @lsawade in #1873
- Minor organization to
scripts, +pytesttesting for scripts by @int-ptr-ptr in #1912 - 1945 - Template
specfem::point::kernelswithTagsby @icui in #1968 - Issue 1954 - Disentangling unit-tests and integration-tests by @lsawade in #1974
- Restructure the undo-attenuation adjoint solver for readability by @Rohit-Kakodkar in #2015
π Bug Fixes
- Fix Info Bug by @lsawade in #1728
- Fix suppress warnings bug on GCC by @Rohit-Kakodkar in #1732
- [Critical] Tests not running by @Rohit-Kakodkar in #1790
- Fix Tromp 2005 workflow by @Rohit-Kakodkar in #1821
- [FIX] Index mapping bug by @lsawade in #1831
- Jenkins fix - Add post clean step by @Rohit-Kakodkar in #1846
- Issue 1662 - VTKHDF has correct timing by @lsawade in #1855
- Fix : Fix mesh reader timing by @Rohit-Kakodkar in #1870
- Fix non-hdf5 compilation by @icui in #1929
- 1123 - Fix workflow with data_containers by @icui in #1933
- Fixes
xdecomposeruntime path with MPI by @Rohit-Kakodkar in #1955 - Fixes Nightly benchmarks by @Rohit-Kakodkar in #1961
- Fix for GMSH benchmark by @Rohit-Kakodkar in #1965
- Fixes nighlty benchmark specfem command by @Rohit-Kakodkar in #1967
- Issue 1989 - Updated expected band codes in the snakefiles by @lsawade in #2007
- Issue 1977 - Fix L2 norm computation in tests by @icui in #2004
- Fix benchmark path in cmake in debug-cuda by @icui in #2014
- Issue 1997 - Fixed docker installation by @lsawade in #2029
Configuration/CMake
- Bumped Zlib version by @lsawade in #1624
- Flux-scheme parameter in
specfem_config.yaml+assembly-constructor pass by @int-ptr-ptr in #1682 - Issue 1495 cmake config message by @Rohit-Kakodkar in #1763
- Issue 1600 - Implements reading of attenuation runtime configuration. by @lsawade in #1762
- Flux Scheme Configuration: Interfacial Quadrature by @int-ptr-ptr in #1775
- Issue 1767 - Implements version header for executable and log print. by @lsawade in #1779
- NCI Config: Interface meshing type by @int-ptr-ptr in #1827
- 3d assembly to accept
flux_scheme_configuration(element_intersectionsupdated accordingly) by @int-ptr-ptr in #1830
π§ Maintenance
- Fix: Clang Memory Limit by splitting updated wavefields and instantiation by @lsawade in #1745
- 1702 - Add SPECFEM_MPI_SAFE_CALL by @icui in #1761
- 1819 - Avoid unnecessary print() calls when not printed. by @icui in #1834
- 1819 - Update collective output by @icui in #1843
- Issue 1771 - Fix units to use macros for redundant code bits. by @lsawade in #1856
- Issue 1330 - Update Kokkos to 5.1.1 by @Rohit-Kakodkar in #1860
- Remove unused
point::stress_integrandby @icui in #1969 - Cleans up log output of Receivers/Sources/Source Time functions and adds LocationResult debug printing by @lsawade in #1964
- Updates to Kokkos release 5.2.0 by @Rohit-Kakodkar in #2018
- Issue 1997 - Includes VTK & optional SIMD build in the Dockerfile by @lsawade in #2030
- Update project version to 0.6.0 by @lsawade in #2032
- Release Candidate v0.6.0 by @Rohit-Kakodkar in #2033
π§Ύ New tests
impl::compute_couplingtests by @int-ptr-ptr in #1537- Issue - 1578 - Acoustic 3D CR tests by @Rohit-Kakodkar in #1640
- Second Coupling Integral (times d tilde/dn) by @int-ptr-ptr in #1589
- "Coupling Integral 1" test by @int-ptr-ptr in #1671
- Issue 1711 - Tests for communication groups by @Rohit-Kakodkar in #1801
- Issue 1713 - Communication Pattern Tests by @Rohit-Kakodkar in #1808
- Issue 1581 - Adds Acoustic 3D test by @Rohit-Kakodkar in #1824
- 1702 - Update jenkins for MPI / OpenMP tests by @icui in #1832
- 759 - Add seismogram write tests by @icui in #1833
- Issue 1581 - Acoustic-Elastic interface displacement test. by @lsawade in #1849
- Issue 1841 - Add moment tensor displacement test by @lsawade in #1854
- Update benchmarks to include Stacey by @icui in #1939
- Codecoverage by @lsawade in #1942
- Issue 1931 - Adds GMSH benchmark w/wo MPI by @Rohit-Kakodkar in #1956
- Issue 1803 - Adds 3 displacement tests with MPI by @lsawade in #1958
- Issue 545 - Adds Freceht derivative tests. by @lsawade in #1970
- Fix Code coverage by @lsawade in #1972
Full Changelog: v0.5.0...v0.6.0



