Using SPM in the institute

Permanent Link: topicbacklinks

SPM is a set of Matlab scripts which was originally made to be used interactively with a graphical interface. IT pre-installed SPM centrally for everyone to use easily.

FAQ

Expand all Collapse all

Starting an institute provided SPM release


SPM is a Matlab toolbox that is not included in Matlab's search path by default. You have to tell Matlab in advance, if you want to use it and which version. Do not add these paths manually as this will cause strange problems later. To just start the latest available release of Matlab with the latest SPM:

user@host > spm

The institute provides a way to safely choose an arbitrary combination of Matlab and SPM. You'll have to select your favorite SPM version first. Find available versions via

user@host > SPM --versions

and select it e.g. via

user@host > SPM --version 12.4711

The prompt will inform about the latest software version selection:

spm=12.4711_user@host >

Now look for available Matlab releases:

user@host > MATLAB --version

Select the Matlab release like this:

spm=12.4711_user@host > MATLAB --version 9.8

And run the Matlab GUI after that:

matlab=9.8_user@host > matlab

Hints:
  • IT already made several SPM toolboxes automatically available and compiled the necessary MEX files.
  • Be aware that things like 2020a aren't Matlab versions numbers but marketing labels. The correct version number is 9.8 in this case.
  • Non-interactive scripting can be done easily like this:
    user@host > SPM --version 12.4711 MATLAB --version 9.8 matlab -r 'my_matlab_command'


Back to FAQ start


How to use SPM in Slurm?


Permanent Link: topicbacklinks

Use this way to run your Matlab/Spm-Script:

/a/envwrap SPM MATLAB matlab -nodesktop -sd '/data/pt_12345/matlab/scripts -r 'my_script'

Make sure to have this command in your script to suppress graphical output:

spm_get_defaults("cmdline",true)

Back to FAQ start


Using a private SPM copy for easy modification


Permanent Link: topicbacklinks

If you want to modify SPM or add custom extensions, you might want to use a private SPM copy for that. Creating one is supported by IT:
  • Open a terminal window
  • Start the helper script:
    user@host > make-spm-private

Follow the instructions. The default path of the private SPM folder is your custom software folder. If you do not have one, make one in self-service https://userportal.cbs.mpg.de/storageunified/request/user. The script will tell you the commands necessary to run Matlab accessing the private SPM folder. The SPM installation is going to create a collection of links pointing to files in a central location.
  • To remove files or folders: just do it.
  • To edit files, you'll have to jump through loops once:
    1. Copy the file, you're interested
    2. Delete the original
    3. Rename the copy to the original

Hint: Private SPM installations can not be maintained by IT. If you need a certain SPM extension or some other changes which might be useful for several researchers, please write a ticket and request a change on the central SPM installation.

Back to FAQ start


How to get an extension added to the central SPM installation?


If you just need an extension for personal computations, you might want to use Make-spm-private. If you think, the extension would benefit other users, feel free to write IT and request the extension to be added centrally. Unfortunately, IT is unable to estimate an extension's impact on SPM. Therefore, we will only add extensions listed in https://www.fil.ion.ucl.ac.uk/spm/ext/ .

Back to FAQ start


This topic: EDV/FuerUser > WebHome > SoftwareLinux > SoftwareSpm
Topic revision: 05 Aug 2024, wherbst
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback