Installation

Installing CONN (standard release, Matlab, Mac/Windows/Linux)

Step 1. Download the latest conn##.zip file from www.nitrc.org/projects/conn and unzip this file (e.g. if the original file was downloaded to /software CONN will be unzipped to /software/conn)

Step 2. Download the latest spm##.zip file from www.fil.ion.ucl.ac.uk/spm and unzip this file (e.g. if the original file was downloaded to /software SPM will be unzipped to /software/spm12). This step may be simply skipped if SPM is already installed on your system

Step 3. Start Matlab, click on the 'Set path' button (or type pathtool), and then click on 'Add folder', and select CONN installation folder (e.g. /software/conn), and then click again on 'Add folder' and now select the SPM installation folder (e.g. /software/spm12). Click on 'Save' and 'Close' to save these changes for future Matlab sessions

After this steps, to start CONN simply type conn in the Matlab command-window

note: installation errors may arise as a result of other toolboxes shadowing/overloading basic SPM functionality. To avoid these issues simply make sure that both CONN and SPM are the folders placed at the top of Matlab's path list

Installing CONN (pre-compiled standalone release, Linux)

note: the standalone release is meant for those who do not have or do not have access to Matlab or Matlab licenses on their target machine. One common scenario is cluster environments without Total-Academic-Headcount or equivalent Matlab licensing agreements, where users taking advantage of CONN parallelization options may quickly deplete the pool of available Matlab licenses. The standalone release provides access to all of the functionality of the standard release. The main differences with the standard release are: a) the standalone release uses only freely-available software (no purchase/licenses required); b) the standalone release is updated less often than the standard release; c) the standalone release is currently only available on Linux machines; and c) the standalone release uses a single computational thread (no multi-threading; this is meant to offer a better match with cluster environments where schedulers may expect or require submitted jobs to utilize a single computational thread)


Step 1. Download the file conn##_glnxa64.zip from www.nitrc.org/projects/conn, and save it to the folder /foo (in all of the following instructions change /foo to an appropriate directory in your system where you wish this software to be installed). Then simply unzip this file:

unzip /foo/conn17f_glnxa64.zip -d /foo


Step 2. Download the MCR installer file MCR_R2017a_glnxa64_installer.zip (Matlab Compiler Runtime R2017a (9.2) Linux release) from https://www.mathworks.com/products/compiler/mcr.html. Save this file to the temporary folder /foo/temp. Then unzip this file, and run the MCR installer:

unzip /foo/temp/MCR_R2017a_glnxa64_installer.zip -d /foo/temp/MCR
sh /foo/temp/MCR/install -mode silent -destinationFolder /foo/MCR -agreeToLicense yes 

This step may be simply skipped if the appropriate version of MCR (9.2) is already installed on your target machine.


Step 3. Modify the PATH, MCRROOT, XAPPLSDIR, and LD_LIBRARY_PATH environment variables. You may do so, for example, by following one of these two methods:

Method 1: editing ~/.bashrc

Add the following lines to your ~/.bashrc file:

export PATH=/foo/conn_standalone/R2017a:$PATH
export MCRROOT=/foo/MCR/v92
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/runtime/glnxa64 ;
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/bin/glnxa64 ;
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/sys/os/glnxa64;
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/sys/opengl/lib/glnxa64
export XAPPLRESDIR=${MCRROOT}/X11/app-defaults ;
export LD_LIBRARY_PATH;

If you prefer to use your own system OpenGL drivers (e.g. VirtualGL) simply delete any line above referencing "/sys/opengl/lib/glnxa64". Similarly, if the appropriate version of MCR (9.2) was already installed on your machine, delete any line above referencing "LD_LIBRARY_PATH" or "XAPPLRESDIR" (in other words, keep only the first two lines above)

Method 2: using Environment Modules (recommended for system administrators)

If your (user- or system- level) Environment Modules root path is /modules, link or copy the template modulefile.txt file in the CONN installation folder to your Environment Modules path:

ln -s /foo/conn_standalone/R2017a/modulefile.txt /modules/conn_standalone/R2017a 

Then edit your modulefile.txt file (in /modules/conn_standalone/R2017a) and change in this file the reference to /foo/conn_standalone/R2017a and /foo/MCR/v92 to point to the appropriate CONN and MCR installation folders in your system.

After that, users may use the CONN package using the syntax:

module load conn_standalone/R2017a
conn

note: if using user-installed modules (e.g. modules listed in ~/mymodules) instead of administrator-installed modules (e.g. modules listed in /share/pkg/modules), simply use the syntax module use ~/mymodules in order to have your own modules visible to the module command.


After these steps, to start CONN simply type conn in any graphic-enabled terminal (or use the syntax conn batch filename.m to run batch scripts in any graphic- or text-only terminal). See the file installation.txt for additional details.

Remote access using VirtualGL + TurboVNC

When installing Matlab- or standalone- CONN releases on a Unix/Linux machine, it is often convenient to be able to access that machine remotely using VNC or equivalent software that supports graphical applications. While not necessary, installing VirtualGL and TurboVNC is recommended, as it allows improved performance of CONN's graphical interface by supporting hardware-accelerated OpenGL rendering.

When using VirtualGL with a Matlab-based CONN release and accessing this machine remotely, please start Matlab using the syntax:

vglrun matlab -nosoftwareopengl

When using VirtualGL with a standalone CONN release and accessing this machine remotely, please start CONN using the syntax:

vglrun conn

www.conn-toolbox.org

Visit the conn toolbox public forum for any questions about CONN