[Main Page] 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
 

Swarm: stable release

(Difference between revisions)

(Compiling Swarm from source on Ubuntu and Debian Linux)
(Compiling Swarm from source for Windows using MinGW)
Line 119: Line 119:
 
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.
 
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 from source for Windows 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 [[Swarm_and_MinGW#Building_Swarm_Using_MinGW|the complete instructions and code archives here]].
+
  
 
===Compiling Swarm from source on Ubuntu and Debian Linux===
 
===Compiling Swarm from source on Ubuntu and Debian Linux===

Revision as of 11:48, 26 July 2011

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

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

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 different in two ways:

  1. Java Swarm no longer requires Cygwin, and
  2. 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".

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.

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!

Linux binaries for Ubuntu and Debian

Paul Johnson produced binaries for version 10.10 of Ubuntu/Debian. Information on them and installing from binary packages are in these support emails: http://www.swarm.org/pipermail/support/2011-March/015939.html http://www.swarm.org/pipermail/support/2011-March/015940.html

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 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://jalvesaq.googlepages.com/swarm.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://ftp.swarm.org/pub/swarm/binaries/w32/cygswarm-0.dll
 http://ftp.swarm.org/pub/swarm/binaries/w32/javaswarm.dll

These would overwrite the equivalent files in the Java/Swarm binary distribution. (In a typical installation, Objective-C users would put cygswarm-0.dll in C:\cygwin\bin.)

This bug is fixed 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)