Main Page | Recent changes | View source | Page history

Printable version | All content dual-licensed under the GNU FDL and the Creative Commons Share-alike Attribution license. | Privacy policy | Latest revision

Not logged in
Log in | Help
 

Talk:Swarm: stable release

Revision as of 11:49, 26 July 2011 by SFRailsback (Talk | contribs)

Wiki main page
Swarm main page
Software main page
Stable release
Development snapshot
License
Platforms
Prior releases
Documentation main page
Doc set & reference guide
User guide
FAQ
User support email list
Applications & contrib code
Applications
User-contributed code
Release Management
Checklist
Swarm-logo.jpg

Contents

Stable release: Swarm 2.2

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.

Starting with 2.2, Cygwin is not needed to run Java Swarm in Windows.

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.

Notes

  • 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 on the ftp site, under the subdirectory relevant for that distribution (list below).
  • If you want to use Objective-C Swarm on a Linux machine that has version 4.0.0 or higher of the gcc compiler, see the notes on the gcc compiler, 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 for Objective-C Swarm

As of July 2011, there are two options for using Objective-C Swarm in Windows: via Cygwin (the way Swarm has been distributed for Windows since about 1999) and via MinGW, a new option. Both provide a Unix-like terminal window in which Swarm codes are compiled, and both (currently) produce 32-bit executables. (The MinGW compiler can also be installed in Linux, so you can develop in Linux and produce executables that run in Windows.)

We are now encouraging use of the MinGW version.

Disadvantages of MinGW compared to Cygwin:

  • Installation of MinGW and Swarm are two separate (but easy) steps.
  • There is one slightly tricky step in using and distributing an executable of your model: MinGW puts a "fake" executable in your code directory and puts the real one in a .lib subdirectory. If you forget this, you will get frustrated if you try to move the executable around. (This is thoroughly explained in the installation and use directions.)

Advantages of MinGW:

  • It works reliably in Windows 7 (Cygwin often does not).
  • It produces Windows executables that you just click on to run, whereas Cygwin executables can only be run from within the Cygwin terminal window.
  • MinGW executables run somewhat faster: 7-25% faster than Cygwin in 3 tests.
  • You can distribute a model as a zip file containing everything needed to run it, whereas Cygwin executables can only run on machines with Cygwin installed.
  • The executable Swarm libraries we distribute for MinGW are easy for us to update, and updates are easy for you to install. The MinGW libraries we distribute are for version 2.4 of Swarm, which includes some bug fixes but is functionally no different from v. 2.2.
  • There is a 64-bit version of MinGW, though so far we have not been able to compile Swarm in it.

The following subsections provide instructions for MinGW and Cygwin versions.

MinGW Windows binaries

The MinGW version of Swarm is installed by installing MinGW, then copying a directory of Swarm library executables onto your computer. The downloads and complete instructions, prepared by Charlie Sharpsteen, are at: Using Swarm on Windows with MinGW. In particular, see the section on compiling models with MinGW.

Cygwin Windows binaries

Objective-C Swarm 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.

Please see #Known_bugs_and_fixes below for a bug fix you should address after installing these binaries.

The Windows binaries for Objective-C Swarm 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.) When this setup program asks you which site to download from, select "ftp.swarm.org".

Windows binaries for Java Swarm

Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ). 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 of Swarm for many releases of Fedora Core Linux, and some recent releases of Red Hat and SUSE. These include the unofficial version 2.2.3 of Swarm that is compatible with the gcc compiler versions shipped in new Linux releases. Go to Paul's page: http://pj.freefaculty.org/Swarm/ , look to the bottom of the page, find your Linux version, and follow the links and notes. Thanks Paul!

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. These binaries can be used for Objective-C Swarm code on an Intel Mac under Rosetta. Java will not work under Rosetta.

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.2)

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.2 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

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.

Compiling Swarm for Windows from source using MinGW

Starting in July 2011 it is possible to install Swarm and all its dependent libraries from source on Windows machines, using the MinGW compiler. See the complete instructions and code archives here.

Compiling Swarm from source on Ubuntu and Debian Linux

Jakson Alves de Aquino has a guide to installing Swarm 2.2 on the Ubuntu and Debian distributions of Linux here: http://br.geocities.com/alves_aq/swarm.en.html

Important Note For Linux/Unix Users on the gcc Compiler

Swarm itself and your Objective-C Swarm models are compiled using the gcc (gnu compiler collection) Objective-C compiler. This compiler has been revised extensively in the past several years and no longer allows some things that were allowed when Swarm was developed. In general, gcc now allows less flexibility/sloppiness in how variables---especially objects---are declared (typed), but this is not the only change.

Hence, users of gcc versions 4.0.0 and higher ("gcc 4+") are likely to find that (a) they cannot compile the Swarm 2.2 libraries, and (b) they cannot compile Swarm models that did compile using previous versions of gcc. gcc 4+ also produces many more warning statements than previous versions did.

New releases of Linux and MacIntosh operating systems ship with gcc 4+ as the default compiler. (To find out which version you have, type the command "gcc -v".)

What can you do if you want to run Swarm on a machine with version 4.0.0 or higher of gcc? Luckily, dedicated Swarm volunteers have produced the unofficial version 2.2.3 of Swarm, which compiles and runs fine with gcc 4+. Use one of these options:

  • If you have a Linux version for which Paul Johnson has produced binary RPMs of Swarm, you can simply install those RPMs; see Swarm:_stable_release#Linux_binaries. Paul used Swarm 2.2.3 for Linux versions that ship with gcc 4+.

If you are trying to compile Swarm code that compiled on earlier versions of gcc (e.g., on your Windows Cygwin installation of Swarm, which uses gcc 3.3.3) but now fails with compiler errors, you are a victim of the compiler changes and must simply debug the code to make it compatible with gcc 4+'s tighter rules. See the FAQ section on Objective-C programming.

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 Averager minimum, maximum values

Swarm's Averager class (in the Analysis library) calculates statistics over values selected from a collection of objects. The getMin and getMax 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 getMax method but it does exist.) Bug reported here 21 April 2005.

Fixes:

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

 http://www.santafe.edu/~mgd/javaswarm.dll
 http://www.santafe.edu/~mgd/cygswarm-0.dll

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

This bug is fixed in the MinGW version of Swarm, in all the current releases of source code, and in the newest RPMs for Linux from Paul Johnson; see #GNU.2FLinux_binaries 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 Averager.m, change line 106 from

 if (totalCount == 0) 

to

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

[Main Page]
Main page
About SwarmWiki
News
Recent changes
Random page
Help

View source
New section
View content page
Page history
What links here
Related changes

Special pages