SPPARKS WWW Site

Latest Features and Bug Fixes in SPPARKS

This page is a continuous listing of new features and bug fixes for the SPPARKS simulator.

To stay up-to-date with the current SPPARKS, you can download the current tarball from the download page at any time, which will include all the features/fixes listed below, and re-build SPPARKS from scratch.


What version of SPPARKS do you have?

A SPPARKS "version" is the date when it was released, such as 1 Sept 2010. SPPARKS is updated continuously. Every time we fix a bug or add a feature, we release it immediately, as listed below. Each dated copy of SPPARKS contains all the features and bug-fixes up to and including that version date. The version date is printed to the screen and logfile every time you run SPPARKS. It is also in the file src/version.h and in the SPPARKS directory name created when you unpack a tarball.



6 Sep 2023

This release has these new features and updates:

This is the list of changed files from the 16 Jan 2023 version.


16 Jan 2023

This release has these new features and updates:

This is the list of changed files from the 19 Sep 2022 version.


19 Sep 2022

This release has 2 main improvements:

This is the list of changed files from the 7 Jun 2022 version.


7 Jun 2022

This release enhances the diffusion/multiphase app to allow pinning of multiple phases. New examples were added to examples/multiphase. The stitch library included with SPPARKS was updated. The new functionality and API allows a user to query a stitch database for global domain bounds associated with a field.

This is the list of changed files from the 24 Jun 2021 version.


24 Jun 2021

This release adds a new multiphase diffusion app, associated documentation, and examples.

This is the list of changed files from the 19 Jan 2021 version.


19 Jan 2021

This release adds some performance improvements to the Stitch library and its use within SPPARKS.

This is the list of changed files from the 23 Oct 2020 version.


23 Oct 2020

The following enhancements have been made for additive manufacturing laser path generation in conjunction with the new Stitch library added to SPPARKS:

This is the list of changed files from the 24 Jul 2020 version.


24 Jul 2020

The Stitch library was inadvertantly left out of the 23Jul20 tarball. It is in the lib/stitch directory of the distro.

This is the list of changed files from the 23 Jul 2020 version.


23 Jul 2020

This new SPPARKS release has many additions useful for modeling additive manufacturing (AM) microstructures. John Mitchell (Sandia) did the majority of the heavy lifting for this release.

The following commands have been added or modified; scripts using AM commands prior to this release will need to be updated.

The am_pattern and am_transverse_pass commands were removed, but their functionality was replaced and enhanced with these 5 commands.

A new AM application was added, and the potts/additive app was enhanced:

A new I/O system oriented towards additive manufacturing, called the Stitch library, is included in this release. The Stitch library reads and writes snapshot files for large AM geometries and allow for each lattice site in the large geoemtry to have multiple values, each with a time stamp. Thus the Stitch file can archive the state of a large AM part at many points in time as it is manufactured. A python module for reading/writing Stitch files is also included which can be used for visualization and analysis of simulated microstructures outside of SPPARKS. Stitch has been developed by John Mitchell and Jay Loftstead (Sandia).

To use Stitch with SPPARKS you must build the Stitch library and include the STITCH package before building SPPARKS. The library itself can be found in lib/stitch. These files give information about building and using Stitch with SPPARKS:

Three SPPARKS commands now have options for using the Stitch library and accessing Stitch files:

This is the list of changed files from the 18 May 2017 version.


18 May 2017

John Mitchell (Sandia) added a new weld_shape_teardrop command for use by the app_style potts/weld application. It allows the shape of the laser weld spot to be defined very generally. Also see the weld_shape_ellipse command for comparison.

Examples of using both are in the examples/potts_weld directory.

This is the list of changed files from the 17 May 2017 version.


17 May 2017

This patch contains a new app_style potts/strain/pin command written by John Mitchell (Sandia).

Also a new app_style potts/additive command written by by Theron Rodgers and John Mitchell (Sandia). It can perform some sophisticated simulations of an additive manufacturing (AM) process where a laser beam (heat source) is rastered across a surface to induce grain growth. The new application uses several new commands:

to specify the AM process.

See the examples/potts_additive directory for example scripts.

This is the list of changed files from the 23 Nov 2016 version.


23 Nov 2016

Added some more input/output options to make it easier to use SPPARKS in different workflows.

The new dump modify options can be useful when running large problems on a large number P of processors, to allow other choices besides 1 (huge) output file or P files.

The new dump sites style and read_sites options mean that SPPARKS dump output can be used directly by the read_sites command to continue or restart a previous simulation.

The new dump vtk style makes it easier to directly visualize some kinds of SPPARKS output directly in VTK-compatible visulizers, like ParaView.

This is the list of changed files from the 22 Nov 2016 version.


22 Nov 2016

Added a dump_modify sort command to enable sorting of dump output within each snapshot by site IDs or a chosen column of per-site information. For parallel runs, the sorting is done across all processors, which is not enabled by default, since it requires extra memory and communication.

This is the list of changed files from the 5 Oct 2016 version.


5 Oct 2016

Theron Rogers (Sandia) and collaborators have written a new app_style potts/weld/jom command, which is similar to the recently released app_style potts/weld command, but handles the geometry of the weld pool in a different manner.

This is the list of changed files from the 20 Sep 2016 version.


20 Sep 2016

John Mitchell (Sandia) and collaborators have written a new app_style potts/weld command which can be used to simulate the welding process to join two pieces of metal. See the examples/potts_weld directory for an example script.

This is the list of changed files from the 1 Sep 2016 version.


1 Sep 2016

Removed some "long double" definitions someone added which aren't needed and which broke the serial compile against the MPI stub library.

This is the list of changed files from the 4 Aug 2016 version.


3 Aug 2016

Missed one file in last patch.

This is the list of changed files from the 2 Aug 2016 version.


2 Aug 2016

Some of the Potts applications were no longer parsing their app_style command arguments correctly due to the recent addition of several new derived Potts application variants.

This is the list of changed files from the 19 Jul 2016 version.


19 Jul 2016

Fixed a bug with processing args for the app_style potts/grad command.

This is the list of changed files from the 26 Feb 2016 version.


26 Feb 2016

Left some debug print statements in the code for the previous version.

This is the list of changed files from the 24 Feb 2016 version.


24 Feb 2016

Added cwrap and dwrap keywords to the dump_modify command to allow very large per-site color or diameter values to be wrapped into a smaller set of color or size values when rendered by the dump image command. This allows, for example, 2 billion possible spin values to be drawn as one of 10000 colors, instead of requiring memory allocation for 2 billion colors.

Also fixed a bug to allow the dump command to printing a 64-bit site count (> 2B) correctly without integer overflow.

This is the list of changed files from the 1 Feb 2016 version.


1 Feb 2016

Changes to enable 64-bit site IDs and thus to run problems with over 2^31 ~ 2 billion lattice sites. There is now a -DSPPARKS_BIGBIG compiler flag to enable building SPPARKS with support for the 64-bit IDs. See the Section_start.html doc page for details. SPPARKS now prints out its per-processor memory footprint to assist in estimating how many MPI tasks you need to run a large problem.

This is the list of changed files from the 11 Dec 2015 version.


11 Dec 2015

Eric Homer (BYU) and Veena Tikare (Sandia) have written and added a new hybrid Cahn-Hilliard phase-field plus Potts model as a new app_style potts/pfm command for SPPARKS. It can be used to efficiently simulate grain growth in a two-phase system controlled by diffusion.

See the doc page for more details on how to use it in SPPARKS, and for a citation to their paper which gives a fuller explanation.

There is also an examples/potts_pfm dir with an example script and the the Pictures web page now has images of simulations performed with this command.

This is the list of changed files from the 21 Oct 2015 version.


21 Oct 2015

Updates to the new app_style potts/grad command. There is now a examples/potts_grad dir with 3 examples of how to use the application. Some pictures and movies are on the Pictures page of the web site.

This is the list of changed files from the 8 Jul 2015 version.


8 Jul 2015

Added a new on-lattice application, called app_style potts/grad. It is a Potts model which allows specification of linear gradients of temperature or mobility along a given direction, which affects grain growth.

This is the list of changed files from the 18 Mar 2015 version.


18 Mar 2015

Aidan Thompson (SNL) upated the diag_style cluster comand to also compute and output the centroid of each cluster.

This is the list of changed files from the 19 Nov 2013 version.


19 Nov 2013

Added a couple missing header files, due to the 5 Nov 13 change.

This is the list of changed files from the 18 Nov 2013 version.


18 Nov 2013

Have now allowed SPPARKS to be released (only in certain cases, by request) under the LPGL (GNU Lesser General Public License). Some doc pages and README and LICENSE files were amended to state this.

This is the list of changed files from the 5 Nov 2013 version.


5 Nov 2013

Made the initial random number seed used by each of the solve styles depend on processor ID, so that each solver generates a different random stream. For many models this isn't needed, but if you start a simulation with a homogeneous lattice on every proc, you need more randomness to avoid correlations between processors.

This is the list of changed files from the 7 Mar 2013 version.


7 Mar 2013

Added a Python wrapper to SPPARKS, along with documentation for how to build SPPARKS as a shared library, how to use the library interface, and how to couple SPPARKS to other codes. See new additions to the manual in these sections:

Also see these new directories in the distro:

The python dir has examples of Python scripts that invoke SPPARKS. The COUPLE dir has an example of a coupled SPPARKS/LAMMPS application using kinetic Monte Carlo and molecular dynamics. It also includes a small library that does communication of data back-and-forth between the 2 codes.

This is the list of changed files from the 4 Jun 2012 version.


4 Jun 2012

Eric Homer (BYU) fixed a memory bug with the undump command.

This is the list of changed files from the 19 May 2012 version.


19 May 2012

Xiaowang Zhou (Sandia) ran into a bug with the create_sites command when it was calculating lattice connectivity with periodic lattices defined for simulation boxes that were specified at arbitrary positions (not at the origin). Due to a round-off issue, site-to-site connectitivy was sometimes mixed up. This patch should fix the problem.

This is the list of changed files from the 18 May 2012 version.


18 May 2012

Greg Ho (Lockheed Martin) identified a bug when lattice sites (positions and neighbors) are read in thru a read_sites command, as opposed to being intialized thru a create_sites command and just having their values setup via a read_sites file. I believe this bug was introduced by some of the changes to SPPARKS last fall.

This is the list of changed files from the 17 May 2012 version.


17 May 2012

Seyed Mehdi Vaez Allaei and Morteza Jalalvand (U Tehran) found and fixed a indexing bug when using off-lattice applications and reading in per-site values from a file via the read_sites command.

This is the list of changed files from the 16 May 2012 version.


16 May 2012

Craig Jolley flagged a bug with the solve_style linear command, that can occasionally occur due to round-off when adding up a long list of probabilities. This patch should fix it.

This is the list of changed files from the 20 Jan 2012 version.


20 Jan 2012

Changed the Makefile to use a Make.sh script for finding style files instead of a Make.csh script. Csh is no longer included in some Linux distribution, but "sh" always is.

This is the list of changed files from the 10 Jan 2012 version.


10 Jan 2012

Eric Homer (BYU) suggested a change in the dump image command so that it will be consistent with other views when viewed from theta = 0 of 180, which is nominally a degenerate view angle. This patch attempts to remedy that.

This is the list of changed files from the 6 Jan 2012 version.


6 Jan 2012

Fixed a glitch in the 4Jan12 patch and added a missing file that didn't make it into the SVN repository.

This is the list of changed files from the 4 Jan 2012 version.


4 Jan 2012

Eric Homer (BYU) found and fixed a bug in the set site range command where the range of integer values was off by 2 when using a lower bound.

This is the list of changed files from the 3 Jan 2012 version.


3 Jan 2012

Changed the format of error messages generated by SPPARKS to include the source file and line #, which can be useful in debugging. Also included the explanation of the error messages in the header files of each class, to make the code more self-documenting.

This is the list of changed files from the 23 Dec 2011 version.


23 Dec 2011

Made some upgrades to the dump image command to make it more compatible with other versions of the code base for this class.

This is the list of changed files from the 27 Oct 2011 version.


27 Oct 2011

Made the length of the output string for statistics to be an easily-changed setting in the src/output.cpp. The default length is now 4096 characters, which ought to be long enough for most simulations.

This is the list of changed files from the 24 Oct 2011 version.


24 Oct 2011

Fixed a bug in the new boundary command which had to do with hou neighbor sites were identified for on-lattice applications when using lattices with multi-site basis sets.

This is the list of changed files from the 23 Sep 2011 version.

Thanks to Antonio Gomez for finding and fixing the issue.


23 Sep 2011

Added a "boundary" option to the dump image command. This allows boundaries to be drawn between adjacent sites if their specified values are different. It is useful for visualizing the boundaries between aggregated groups of sites when the colors of sites in the adjacent groups are the same.

This is the list of changed files from the 22 Sep 2011 version.

22 Sep 2011

There were still some glitches in the 20Sep11 patch with respect to non-periodic systems. Hopefully this patch fixes the remaining issues.

This is the list of changed files from the 20 Sep 2011 version.


20 Sep 2011

Added a boundary command to allow specification of non-periodic boundaries in an on-lattice application. This affects the way sites are created and eliminates site neighbors across non-periodic boundaries. See the create_sites and read_sites commands for more details. Using create_sites region is now supported to only create sites within a geometric region.

This is the list of changed files from the 2 Sep 2011 version.


2 Sep 2011

Fixed an indexing bug in the create_sites command.

Updated the input scripts in the examples to reflect the new syntax for the dump command.

This is the list of changed files from the 29 Jul 2011 version.


29 Jul 2011

Upgraded the dummy MPI library (used with make serial) to be compatible with the 64-bit options now available in SPPARKS.

This is the list of changed files from the 25 Jul 2011 version.


25 Jul 2011

Added a sweep counter back to the output stats for sectored KMC solves. Somehow this got lost from an earlier version.

This is the list of changed files from the 18 Jul 2011 version.


18 Jul 2011

Enhanced SPPARKS to be able to run arbitraryily large models with more than 2 billions sites, limited only by the physical memory on your machine. This requires use of 64-bit integers to store site IDs and various system tallies, like the number of accepted and rejected events.

The data types for this are now defined in the file src/spktype.h, which by default is set to allow for large problems. To reduce memory usage or for machines or MPI implementations that do not support 64-bit integers, you can revert to 32-bit integers by editing that file. See this section of the manual for more details.

There is still a limit of around 2 billions sites per processor, which should not be a restriction since that would have a huge memory footprint to store neibhbor lists.

This is the list of changed files from the 16 Jul 2011 version.


16 Jul 2011

More upgrades to the dump_image command, including an option to generate a list of random colors via the dump_modify scolor command.

This is the list of changed files from the 15 Jul 2011 version.


15 Jul 2011

Fixed a glitch in the color table map for the dump image command.

This is the list of changed files from the 14 Jul 2011 version.


14 Jul 2011

With considerable help from graphics whiz Nathan Fabian (Sandia), we added a dump image command with accompanying options settable via the dump_modify command.

This enables you to write out a series of high-quality, ray-traced JPG or PPM images of the collection of sites from lattice-based applications. Of course, this does not replace the need for a full-featured, interactive post-processing visulization capability, but it does provide a simple, easy way to quickly see how your simulation is working, since there are numerous tools that can display individual image files or animate a series of them. It is also convenient for very large models, as a replacement for large dump snapshots.

The dump image doc page includes a couple sample images you can view.

As part of this command, the previous dump command now requires a "style" argument, which can be either "text" or "image". The previous dump command is now the "text" style.

This is the list of changed files from the 7 Jul 2011 version.


7 Jul 2011

Fixed some problems with the group-style solver. This includes one accuracy bug with the way changed propensities were assigned to new groups, and some bookkeeping changes for how zero-valued propensities were handled. The specified lo and hi bounds can now be exact matches to event propensities of your model. A warning message is printed if generated propensities violate the specified bounds.

This is the list of changed files from the 5 Jul 2011 version.


5 Jul 2011

Fix a logic error with communication when performing multiple runs with changing sector rules.

This is the list of changed files from the 24 Jun 2011 version.


24 Jun 2011

Made some lo-level changes within the lattice app base class to support a new phase field app we'll release later.

This is the list of changed files from the 15 Jun 2011 version.


15 Jun 2011

Eric Homer (Sandia) added a diag_style array command to print stats on various lattice site values.

This is the list of changed files from the 30 May 2011 version.


14 Jun 2011

Fixed a typo bug in the create_sites command and clarified the documentaion about the use of regions with 1d and 2d simulations.

This is the list of changed files from the 30 May 2011 version.


30 May 2011

Update the PDF manual.

This is the list of changed files from the 27 May 2011 version.


27 May 2011

Fixed a bug with deposition in the app_style diffusion application, that would prevent deposition if the site at the origin ever became unoccupied.

This is the list of changed files from the 30 Mar 2011 version.


30 Mar 2011

Added some additional hooks in the AppLattice class that a user application can use to add custom functionality.

This is the list of changed files from the 21 Mar 2011 version.


21 Mar 2011

Enabled the region option on the create_sites command, so that sites can be created within a geometric region.

Also converted some counters to 64-bit integers to avoid overflow.

This is the list of changed files from the 16 Sept 2010 version.


16 Sept 2010

Added an app_style potts/strain application to model grain growth in the presence of a strain value at each lattice site. If SPPARKS is used as a library, then the strain values can be updated dynamically by another application, such as LAMMPS, via a driver code. The LAMMPS distribution includes an example coupling program that does this, in its "couple" directory.

This is the list of changed files from the 26 Aug 2010 version.


26 Aug 2010

Updated the library interface to SPPARKS for use by external codes that call SPPARKS as a library.

This is the list of changed files from the 6 Aug 2010 version.


6 Aug 2010

Made some bug fixes to the read_sites command for reading in full lattices and neighbor definitions as opposed to just values on lattices.

This is the list of changed files from the 5 Jun 2010 version.


5 Jun 2010

Fixed a small bug in the library interface routine spparks_energy() which returns the energy from a current configuration.

This is the list of changed files from the 30 Apr 2010 version.


30 Apr 2010

Update the PDF version of the manual, since it has become out-of-date.

This is the list of changed files from the 29 Apr 2010 version.


29 Apr 2010

Added error checks to prevent the deposition option in app_style diffusion when running in parallel or with multiple sectors.

This is the list of changed files from the 28 Apr 2010 version.


28 Apr 2010

Added support to the MPI STUBS lib to support the 6Apr10 patch.

This is the list of changed files from the 27 Apr 2010 version.


27 Apr 2010

Fixed a bug with dumping per-site double values. Also added a new routine so that child-class applications can reset how many integers and doubles are stored per site.

This is the list of changed files from the 6 Apr 2010 version.


6 Apr 2010

Changed some output accumulators to 64-bit integers, to avoid overflows.

This is the list of changed files from the 27 Mar 2010 version.


27 Mar 2010

Added an option to the set command to set each site to a unique value based on the site ID.

This is the list of changed files from the 23 Mar 2010 version.


23 Mar 2010

Bug fixes in the way lattices of sites with unit cells of non-unit size are generated.

This is the list of changed files from the 4 Mar 2010 version.


4 Mar 2010

Changed the way solvers and random number generators are preserved from run to run, so that consecutive runs should give identical answers as one long continuous run.

This is the list of changed files from the 2 Mar 2010 version.


2 Mar 2010

Corbett Battaile (Sandia) found a typo bug with the set x command.

This is the list of changed files from the 17 Feb 2010 version.


17 Feb 2010

Greg Wagner (Sandia) found a memory bug with the way event lists are cleared between runs, that affected a few of the applications that maintain these lists. This update fixes it.

This is the list of changed files from the 16 Feb 2010 version.


16 Feb 2010

Fixed a one-line bug with the app_style sos command that reset the bond energy to 1.0 even after the user set it.

This is the list of changed files from the 21 Jan 2010 version.


21 Jan 2010

In collaboration with Corbett Battaile (Sandia), added commands for app_style erbium, diag_style erbium, and event, to enable on-lattice modeling of reaction/diffusion events for hydrogen and helium in a fcc erbium lattice. A further description of the model is given on the Pictures & Movie page.

This is the list of changed files from the 20 Jan 2010 version.


20 Jan 2010

Fixed a bug with the create_sites command when building a lattice with an application that stores 2 or more integers or doubles per site.

This is the list of changed files from the 19 Jan 2010 version.


19 Jan 2010

Greg Wagner (Sandia) identified two bugs with the set region and create_sites commands, the latter when using a region whose lower left corner was not at the origin. This upgrade fixes the problems.

This is the list of changed files from the 18 Dec 2009 version.


18 Dec 2009

Greg Wagner (Sandia) added a solid-on-solid (SOS) model via a new app_style sos command.

This is the list of changed files from the 17 Dec 2009 version.


17 Dec 2009

Fixed a bug with using sweep color with sectoring in parallel. The problem was that the inter-sector communication was not complete.

This is the list of changed files from the 14 Dec 2009 version.


14 Dec 2009

Fixed a bug in the Schwoebel hop logic in the app_style diffusion command. Needed to update propensities one site further away in neighbor list of each site then we were. This is 3rd neighbors instead of 2nd neighbors for linear energies. And 4th neighbors instead of 3rd neighbors for non-linear energies. This should make only a small difference in propensities of these far-away site, but is important to bookkeep correctly.

This is the list of changed files from the 10 Dec 2009 version.


10 Dec 2009

Fixed a memory bug in the app_style diffusion command.

This is the list of changed files from the 14 Nov 2009 version.


14 Nov 2009

Fixed an additional issue with the 13Nov09 patch.

This is the list of changed files from the 13 Nov 2009 version.


13 Nov 2009

Allow a "none" option with the solve_style and sweep commands so that KMC and rejection-KMC solvers can be turned off in between successive runs.

This is the list of changed files from the 12 Nov 2009 version.


12 Nov 2009

The PDF version of the manual was out-of-date in yesterday's release. This patch updates it.

This is the list of changed files from the 11 Nov 2009 version.


11 Nov 2009

New release of SPPARKS. 22,790 lines of code in src dir.

These are the most significant features added or enhanced since the 13 Apr 2009 version. People who contributed to the features are listed in parentheses:

Descriptions of all these enhancements and other bug fixes can be viewed on this page.


13 April 2009

Initial public release of SPPARKS. 17,341 lines of code in src dir. This version supercedes earlier distributed beta versions.