Skip to main content »

Trinity College Dublin

FSL

Introduction

For reference FSL's homepage is located at http://www.fmrib.ox.ac.uk/fsl/ FSL is a comprehensive library of analysis tools for FMRI, MRI and DTI brain imaging data.

FSL at TCHPC

Before running FSL on our TCHPC clusters, please become familiar with the methods for connecting to our systems, and for transferring files.

FSL for TBSS techniques

If using FSL for TBSS techniques, you may need to run on the TCIN mini-cluster. If unsure, please contact us for details.

Loading the FSL Environment

A module file has been created to set up your environment for FSL

module load tcin fsl/5.0.9

There are a number of older versions of FSL also installed:

fsl/4.1.4
fsl/4.1.6
fsl/4.1.6-jt
fsl/4.1.9
fsl/5.0.4
fsl/5.0.9

Requirements and notes

The FSL install at TCHPC has a customised 'fsl_sub' command for the TBSS tools in FSL. The TBSS steps currently only work correctly on the TCIN minicluster (8nodes). The customised script 'fsl_sub' will parallelise various parts of the workflow for TBSS work. Please visit http://www.fmrib.ox.ac.uk/fsl/fsl/sgesub.html for more information on which components can be parallelised.

To do analysis users will need to login into 'tcin-n01' from 'lonsdale.tchpc.tcd.ie'

Patch for fsl_sub to work with Slurm

For those interested in the patch, it may need to be formatted correctly before it will apply cleanly. This patch is simple and naive, and should probably be re-written to do multi-config submissions to the resource manager.
--- fsl_sub.orig        2016-04-07 12:45:12.037319620 +0100
+++ fsl_sub     2016-12-14 12:41:38.645438618 +0000
@@ -80,7 +80,7 @@
 # "NONE". Note that a user can unset SGE_ROOT if they don't want the
 # cluster to be used.
 ###########################################################################
-METHOD=SGE
+METHOD=SLURM
 unset module
 if [ "x$SGE_ROOT" = "x" ] ; then
        METHOD=NONE
@@ -92,6 +92,10 @@
        fi
 fi
 
+if [ "x$SLURM_JOB_ID" != "x" ] ; then
+       METHOD=SLURM
+fi
+
 # stop submitted scripts from submitting jobs themselves
 if [ "X$FSLSUBALREADYRUN" = "Xtrue" ] ; then
     METHOD=NONE
@@ -127,6 +131,11 @@
     fi
     queueCmd=" -q $queue " 
 
+    # if slurm environment is detected use the compute partition, change this to suit
+    if [ $METHOD = SLURM ] ; then
+           queue=compute
+    fi
+
     #echo "Estimated time was $1 mins: queue name is $queue"
 }
 
@@ -222,10 +231,10 @@
 # change. It also sets up the basic emailing control.
 ###########################################################################
 
-queue=long.q
+queue=compute
 queueCmd=" -q long.q "
 mailto=`whoami`@fmrib.ox.ac.uk
-MailOpts="a"
+MailOpts="n"
 
 
 ###########################################################################
@@ -475,6 +484,63 @@
        ;;
 
 ###########################################################################
+# SLURM method
+# this is a very naive way of doing things, its just to simply fire off all
+# the tasks individually to the resource manager if there's a taskfile;
+# or just run the command if there's a single command specified
+###########################################################################
+
+    SLURM)
+        # single command or a taskfile with multiple commands? if $tasks is empty, then it's a single command
+        if [ "x$tasks" = "x" ] ; then
+            # single command
+
+            if [ $verbose -eq 1 ] ; then
+                echo executing: $@ >&2
+            fi
+
+           # now run it (don't submit a new job, run it in this job)
+           /bin/sh < ${LogDir}${JobName}.o$$ 2> ${LogDir}${JobName}.e$$
+$@
+EOF1
+           ERR=$?
+           if [ $ERR -ne 0 ] ; then
+               cat ${LogDir}${JobName}.e$$ >&2
+               exit $ERR
+           fi
+
+        else
+            # multiple tasks are listed in the $taskfile
+            if [ $verbose -eq 1 ] ; then
+                    echo "Starting Slurm submissions..." >&2
+            fi
+            _SRMRAND=$RANDOM
+            _SRMNAME=$JobName$SRMRAND
+            echo "========================" >> sbatch.log
+            echo "= Starting submissions =" >> sbatch.log
+            echo "========================" >> sbatch.log
+            date >> sbatch.log
+while read line
+do
+    if [ "x$line" != "x" ] ; then
+sbatch -J $_SRMNAME -o "slurm-log-$_SRMNAME-%j-%N.out" -t 24:00:00 -p $queue -n 1 <> sbatch.log 2>&1
+        fi
+        ;;
+
+
+###########################################################################
 # Don't change the following - this runs the commands directly if a
 # cluster is not being used.
 ###########################################################################

Last updated 14 Dec 2016Contact Research IT.