Swarm:Stable release

From Swarm
Jump to: navigation, search

Stable release: Swarm 2.2

The following text is partially obsolete: The last stable release of Swarm is 2.4.1, but it was not packaged for Windows using Cygwin. The current Windows package uses MinGW instead of Cygwin.

As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).

Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.

Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.

The documentation set has been updated for Swarm 2.2; it is available from the Swarm documentation page.

NEWS (user-visible changes)

* See the list of known bugs, below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added 
   to the Random library.


  • If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
  • The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).

Packaged (binary) distributions (2.2)

The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.

Windows binaries

The following text describes the Cygwin distribution of Swarm for Windows. We now strongly recommend instead the MinGW release. See Swarm_and_MinGW.

Windows users should see the MinGW package for Swarm here: Swarm_and_MinGW instead of using the following obsolete information, unless they really want to...

Windows binaries are different from previous versions! In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the Windows binary notes.

The Windows binaries are installed via a setup program at:

This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in Windows binary notes.)

Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. Notes for installing Java Swarm are in the Swarm documentation set. Java binaries for Windows are at:

For the latest information you should check out Paul Johnson's online FAQ or consult the Swarm: Mailing lists archives.

GNU/Linux binaries

Paul Johnson is maintaining RPMs and other packages of Swarm for several Linux distributions.

Charlie Sharpsteen built a Swarm site on Launchpad which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via:

sudo apt-add-repository ppa:sdg-team/stable
sudo apt-get update
sudo apt-get install libswarm2-dev gobjc-4.5

You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.

MacOS X binaries

Bill Northcott has produced binaries for MacOS X; see details at Swarm: MacOS X binaries These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.

Other platforms

Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.

Binaries of previous versions

Legacy binaries (unmaintained) are available here:

Swarm source (2.4)

The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:

The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.4 is:

  • Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
  • BLT 2.4z, not 3.0
  • libpng 1.2.5
  • zlib 1.2.2
  • xpm-4.2 (or the xpm-nox package for Cygwin)
  • X11R6 on Linux and MacOS X (with SDK)
  • Optionally, HDF5 1.6.2
  • Optionally, Java SDK 1.4.2
  • GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
  • GNU Make

These packages and information on installing them for Swarm are at: Swarm_and_MinGW

Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the README and INSTALL file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using make as usual, after this step.

You also need an explicit make install step, after the initial make build to cleanly install Swarm to an appropriate location (for example /usr/local). This is explained futher in the README and INSTALL files contained in the distribution.

After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.

Known bugs and fixes

This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.

Error in <tt>Averager</tt> minimum, maximum values

Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The <tt>getMin</tt> and <tt>getMax</tt> methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the <tt>getMax</tt> method but it does exist.) Bug reported here 21 April 2005.


Windows users can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):


These would overwrite the equivalent files in the Java/Swarm binary distribution. The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.

RPMs for Redhat Linux are available from Paul Johnson; see the link above on this page.

Builds from source code can check out the most recent source code at Swarm's Savannah site (see CVS), or simply fix the offending line of code:

In <tt>Averager.m</tt>, change line 106 from

 if (totalCount == 0) 


if (totalCount == 0 || count == 0)