@@ -159,15 +159,13 @@ version as MCR upon script invocation with :program:`run_project.sh`.
1.8339 0.3188 0.3426
-2.2588 -1.3077 3.5784
[krause@master ~]
.. note::
You only have to compile your project once and can then use it any number
of times. Matlab extracts your package to a shared hidden folder called
`.mcrCache<Version-Number>`. Those folders sometimes get corrupted by
Matlab, especially when multiple jobs start at exactly the same time. The
only workaround so far is to add a sleep 1s between qsub calls and hope
only workaround so far is to add a sleep 1s between qsub/sbatch calls and hope
there is no collision. Also, it makes sense to regularly remove those
directories. But make sure all your jobs have finished before removing
them with :file:`rm -rf .mcrCache*`.
...
...
@@ -176,10 +174,10 @@ SPM
---
SPM already comes as a pre-compiled version and can, identical to the examples
above, be started with :program:`run_spm8.sh` or :program:`run_spm12.sh`. Usually users are
exporting a number of batch files with the spm gui on their local machine,
change the paths to reflect the names on the tardis and then call
:program:`run_spm12.sh` with the **run** parameter for each batch file.
above, be started with :program:`run_spm12.sh`.
Usually users are exporting a number of batch files with the spm gui on their
local machine, change the paths to reflect the names on the tardis and then
call :program:`run_spm12.sh` with the **run** parameter for each batch file.
Example: segmentation for a number of nifti images. The file batch.template contains the string :`%%IMAGE%%` as a placeholder so we can easily replace it with the current image path and create a number of new batches from a single template:
...
...
@@ -192,7 +190,7 @@ Example: segmentation for a number of nifti images. The file batch.template cont
for image in tp2/Old/*.nii ; do
fullpath=$PWD/$image
sed "s#%%IMAGE%%#$fullpath#" batch.template > batch_${i}.m
echo "run_spm12.sh /opt/matlab/interactive run $PWD/batch_${i}.m" | qsub -d.
sbatch --wrap "run_spm12.sh /opt/matlab/interactive run $PWD/batch_${i}.m"
i=$((i+1))
done
...
...
@@ -203,7 +201,7 @@ toolboxes to SPM (e.g. cat12).
.. code-block:: matlab
[krause@master ~] matlab
matlab
Warning: No display specified. You will not be able to display graphics on the screen.