SPM96 Distribution

SPM96 is very old now. Consider using SPM2.

The content of this page is not updated.

SPM96 availability

Although SPM99 is now shipping (as a public beta release), some users may wish to continue to use the established SPM'96 version until a definitive version of SPM'99 is released. Therefore SPM96 will continue to be available, and we will continue to do what we can to support it.

This page describes platform requirements and installation details for SPM96. Those looking for SPM99 should see the SPM99 distribution page.

Requirements for SPM96

  1. A UNIX workstation
    • Whilst the majority of the code is implemented as MatLab M-files & functions containing standard MatLab commands, a number of features specific to the UNIX version have been used. SPM also uses external C programs, linked to MatLab as C-mex files, to perform some of the more computationally intensive operations. Some of these latter C programs use UNIX system calls to implement SPMs "memory mapping", mapping disk resident image volumes into memory. (Specifically, the calls are mmap (mman.h) in spm_map_vol.c; munmap (mman.h) in spm_unmap_vol.c; & readdir (dirent.h) in spm_list_files.c. Not all UNIX flavours support mman.h.)
    • SPM has been successfully installed on Sun (SunOS_4.1.x & Solaris2.x), DEC-Alpha, HP 9000/700, SGI (Irix 5.3), and Linux.
  2. An ANSII C compiler. Compiled c-mex files are provided for Solaris only.
  3. MatLab 4.2c
    • MatLab is a high level numerical mathematics environment optimised for operations on untyped matricies. It's syntax is close to that of matrix algebra, making the code an effective pseudo-code for the algorithms, and leading to fast development times. SPM96 is written for MatLab 4.2c
    • Only the core MatLab package is required, none of the specialist toolboxes are used by SPM.
    • For further information, see http://www.mathworks.com/.
  4. A program to convert images from your tomograph/scanner into Analyze format.
    • SPM uses only the Analyze image format. (See "Image format" below.)
  5. Access to the internet
    • To download the software, review the SPM web site, download the SPM short course notes, and contribute to the SPM discussion list.
  6. Plenty of time!

The current version of SPM was written on Sun HyperSPARC20-HS21 workstations (64Mb RAM, 200Mb swap) under Solaris2.4 and OpenWindows3.4. For larger fMRI analyses we recommend at least 128Mb RAM and 300Mb swap. SPM has not been tested on any other platform.

Obtaining the SPM96 software

The SPM software is available as a compress-ed tar archive file, by anonymous FTP. The base URL for the distribution is ftp://ftp.fil.ion.ucl.ac.uk/spm.

Step by step instructions

Launch FTP and connect to the FIL FTP server. If your host can't resolve the name, use the IP address instead. % ftp ftp.fil.ion.ucl.ac.uk
Login to the FIL FTP server as user "anonymous". Enter your email address as password Connected to cream.fil.ion.ucl.ac.uk.
220 cream FTP server (UNIX(r) System V Release 4.0) ready.
Name (ftp.fil.ion.ucl.ac.uk:andrew): anonymous
331 Guest login ok, send ident as password.
230 Guest login ok, access restrictions apply.
You are now connected to the FILnet server,
the Sun SPARCstation10-41 on which SPM'94 was written!
Change directory to the spm area. ftp> cd spm
250 CWD command successful.
Change to binary transfer mode (the distribution isn't a text file) ftp> bin
200 Type set to I.
Turn on progress marking
ftp> hash
Hash mark printing on (8192 bytes/hash mark).
Initiate the transfer ftp> get spm96.tar.gz
Wait! spm96.tar.gz is 4.59Mb 200 PORT command successful.
150 Binary data connection for spm96.tar.gz (,60656) (1599595 bytes).
226 Binary Transfer complete.
local: spm96.tar.gz remote: spm96.tar.gz
6437109 bytes received in 18.2 seconds (4.9e+02 Kbytes/s)
Quit FTP ftp> quit
221 Goodbye.
The zipped tar file containing the distribution will be in the current directory % ls -l

Installing SPM96 software

Make a directory for the SPM package. SPM'96 needs about 18Mb of free space. % mkdir spm96
% cd spm96
Unbundle the software % gzip -dc ../spm96.tar.gz | tar xvf -
x ., 0 bytes, ...
x ./spm_Pn.m, 1377 bytes,...
x ./spm_spm.m, 13507 bytes,...
x ./spm_get.m, 43535 bytes,...
x ./spm_load.m, 460 bytes,...
x ./spm_pF.m, 1689 bytes,...
You may now delete the distribution archive % rm ../spm96.tar.gz
Compile the external C routines if necessary. Compiled routines are supplied for Solaris2. Non Solaris users should edit the Makefile for compatability with their compiler. % spm_MAKE
Add the SPM source directory to the MatLab path. Do this by prepending it to the environment variable MATLABPATH. This is best done permanently in your shall startup script (~/.cshrc for csh users), so the setting is default for all future shells. (csh users)
% setenv MATLABPATH /local/spm/spm96b:<other toolboxes>

Updating SPM'96b to SPM'96

Find your SPM'96b directory, and change it's name. % mv spm96b spm96
% cd spm96
Unbundle the update.

This will overwrite previous versions of the updated files.
% gzip -dc ../spm96b_update.tar.gz | tar xvf -
x ./README, 5440 bytes,,...
x ./Contents.m, 9682 bytes,...
x ./spm_motd.man, 2088 bytes,...
x ./spm_type.m, 1681 bytes,...
x ./spm.m, 28102 bytes,...
You may now delete the update archive % rm ../spm96b_update.tar.gz
Alter the MatLab path for the new location. Do this by prepending it to the environment variable MATLABPATH. This is best done permanently in your shall startup script (~/.cshrc for csh users), so the setting is default for all future shells. (csh users)
% setenv MATLABPATH /local/spm/spm96:<other toolboxes>

Compiling for non Solaris platforms

SPM has been successfully compiled for the following platforms:

SGI From Randy Frank
Date: Wed, 3 Jan 1996 11:24:32 -0600 (CST)
I can't tell you if it runs "perfectly" without a validation suite, but SPM95 seems to work fine out-of-the-box on an SGI machine. The only changes I made were to spm_MAKE to eliminate the -O2 compiler option which seems to be either optimizing out some stuff which should have been declared volatile or is changing the promotion of some types, I never spent the time to figure out which. Make sure you are running Irix 5.3 and have the 5.3 compilers.
SGI From Martin J. Stumpf
Date: Wed, 3 Jan 1996 11:24:32 -0600 (CST)
We have been running SPM95 on an SGI for 8 months and have never had a problem. The only thing required for a clean build was to edit the spm_MAKE file and delete the -O2 switch. We are using IRIX 5.3. We also compared results to the SUN platform and got identical results as expected.
HP 9000/700 From Ming Xiong Huang
Date: Thu, 25 Jul 1996 10:34:34 -0600 (MDT)
Add '+Z' option in several lines of the 'spm_MAKE' file.
$CC -c -o utils_uchar.o spm_vol_utils.c -DUNSIGNED_CHAR -O +Z

The reason of the modification is that, on the HP 9000/700 mex files are object modules that are dynamically loaded by MATLAB. There is no libmex.a to link against. Libraries other than the default FORTRAN, math and C libraries must be specified on command line and be sharable or contain position independent code. Evoking '+Z' will produce the object files that contain the position independent code. And these objective files will be used later in 'spm_MAKE' by command 'cmex'.
If somebody want to run SPM on IBM RS/6000, I bet the above strategy will also work.
spm*.mexhp7 files available from ftp://biophysics.lanl.gov/pub/spm96b_HPmex/
Linux From Andrew J. Saykin
Date: Mon, 30 Sep 1996 13:39:06 -0400
It may be of interest to some users that spm96b does compile and run under Linux (Red Hat Software, 3.03 version) on a Pentium with 64MB RAM. This is very preliminary as I have only just begun testing the spm96 features. In compiling, several modifications were necessary: (1) specify CC='gcc' (under the linx86 section) in a copy of the matlab ".mexrc.sh" file in the user's home directory. (2) Modify the spm_MAKE file removing the -O2 options from the top paragraph. I'm not certain that this last step is essential. There was one warning message after the spm_box.c compile, and I do not yet know if there is a problem with the operation of that program component.
DEC From Matthew Brett
Date: Tue, 4 Nov 1997 12:37:03 GMT
SPM96 compiles without hitch. Then errors out when reslicing files after realignment. This turned out to be because the maptype declared in volume.h is a different size on DECs (addr_t, size_t are 8 bytes not 4). In several places spm declares arrays of memory mapping vectors of size 12, but the DEC needs 13 doubles to contain the maptype. I found everywhere (I think) that the vectors are predeclared in size and declared them to 13.
For the updated files, see the SPM96 for DEC section of the SPM96 contributed files area. I have tested it on a DEC AlphaStation 200, running DEC UNix 4.0 (rev 386), and 4.0A (464).
DEC From Edward Kovalik
Date: Thu, 3 Sep 1998 14:35:52 -0700
I've found a fix to the memory mapping issues with SPM on DECs, rendering SPM operable. The following entries in the kernel tuning configurator, under the VM entry, need to be changed by an order of magnitude off their defaults: Kentry_zone_size, mapentries. The following needs to be doubled: page_free_target. If this doesn't work, there are yet other values that can be boosted. Feel free to contact for more info.
Linux From Aaron J Newman
Date: Wed, 29 Jul 1998 12:31:37 -0700
I have successfully compiled SPM96 on a linux box (redhat linux... I forget which version). The compiled binaries, along with some notes and rudimentary instructions, are available from our lab's web site: http://bdl.uoregon.edu/mri/linux The usual disclaimers apply - I take no responsibility for whether these work or not, or what they do to your system, etc, and also note that i did this for a friend in Seattle, and do not work on linux myself. If you have any problems, however, I may be able to direct you to someone who can help.

Last modified $Date: 2017/01/27 16:56:47 $ by $Author: spm $

Valid XHTML 1.0! home | sitemap | search:

Copyright © 1991,1994-2017 FIL
The FIL Methods group <fil.spm@ucl.ac.uk>