tag:blogger.com,1999:blog-61716011316496602252024-03-05T01:08:11.288-05:00cusack lab computingRhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.comBlogger34125tag:blogger.com,1999:blog-6171601131649660225.post-24412961243565816292017-11-18T12:27:00.001-05:002017-11-18T12:27:42.335-05:00Installing VNC on Ubuntu 16.04I wanted to use VNC to allow multiple desktops on a server.<br />
In Ubuntu 16.04 (or 14.04, 17.10 or Linux Mint Cinnamon) I found that neither the GNOME desktop nor the XFCE desktop would work with VNC - I tried vnc4server, realvnc, and tigervnc. They all crashed in slightly different ways, but each was unuseable.<br />
<br />
The solution, which so far I've tested in Mint and 16.04 with tigervnc, is just to make sure you uninstall the default vino desktop sharing tool before installing tigervnc. Simple!RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-89782512639694851382016-08-18T20:40:00.001-04:002016-08-18T20:40:56.922-04:00Weird matlab behaviour for empty matrices.I've noticed that (at least in Matlab 2015b) a weird behaviour with Matlab matrices.<br />
<br />
Here are two ways of making different empty matrices:<br />
>> a=[]<br />
>> size(a)<br />
ans=<br />
0 0<br />
>> isempty(a)<br />
ans=<br />
1<br />
<br />
<br />
>> b=find(1==[0 0])<br />
>> size(b)<br />
ans=<br />
1 0<br />
>> isempty(b)<br />
ans=<br />
1<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
They both look empty, but have different sizes. But critically for some code, they behave very differently in a for loop</div>
<div>
>> for ind=a</div>
<div>
>> ...this never gets executed!</div>
<div>
>> end;</div>
<div>
<br /></div>
<div>
>> for ind=b</div>
<div>
>> ...this gets executed once, with ind=[];</div>
<div>
>> end;</div>
<div>
<br /></div>
This is a pernicious problem. Is there any reason for it to be like this?<br />
<br />RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com1tag:blogger.com,1999:blog-6171601131649660225.post-12472192978834551062014-04-21T20:07:00.001-04:002014-04-21T20:07:21.218-04:00Illustrator revalationI often use Adobe Illustrator to draw illustrations or finesse graphics. While I'd prefer a cheaper package, there doesn't currently seem to be anything that comes close to the sophistication of this tool. Like Photoshop (or Flash) it isn't the most intuitive thing, though. You really need expertise. But first, you need to know what the feature is that you <b><i>need</i></b>. As soon as you know this, Google is your friend.<br />
<br />
So, today, I thought "Wouldn't it be cool if there were a way to align multiple objects not just to each other, but to the fixed position of a single object?"<br />
<br />
It turns out this is dead simple - you shift-click to select all the objects you wish to align, and then do an extra click on one of these selected items. This becomes the reference to which everything else is aligned.<br />
<br />
I was so excited I had to share.RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-53449475202470856662014-04-03T10:05:00.002-04:002014-04-03T10:06:02.960-04:00Disabling Chrome Viewer for PDFs......because Preview on a Mac does a much nicer job of rendering....<br />
<a href="http://www.cnet.com/how-to/how-to-disable-chromes-pdf-viewer/">http://www.cnet.com/how-to/how-to-disable-chromes-pdf-viewer/</a>RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-58450186080139937752013-10-27T15:23:00.001-04:002013-10-27T15:23:54.514-04:00meldBoth for maintaining github repositories, and assorted code merging, I've been enjoying using the tool "meld". For adhoc merging, if you have two different versions of a file, do<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">meld [filename1] [filename2]</span><br />
<br />
You'll then see the two files in parallel, with MELD highlighting new, changed or deleted code in each file. You can then click the arrows to transfer the change in one direction or the other.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh5QQh84ro90xhiW7QcG5bAAqtzwojGBj5eQX8c289QOusmthdgJ3LyXof_fSQHCJ14F2CsK1ZaJPF680C6zJ6xfAHFCcc3TKC22-07aOpiZTXXdFgwiJS03r1uPR5Ood-sR502cYOEj8r/s1600/meld-ss.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh5QQh84ro90xhiW7QcG5bAAqtzwojGBj5eQX8c289QOusmthdgJ3LyXof_fSQHCJ14F2CsK1ZaJPF680C6zJ6xfAHFCcc3TKC22-07aOpiZTXXdFgwiJS03r1uPR5Ood-sR502cYOEj8r/s320/meld-ss.png" width="320" /></a></div>
<br />
You may also merge more than two versions.<br />
<br />
If you use git, you may set this to use meld by default:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">git config --global merge.tool meld</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
Then type<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">git mergetool</span><br />
<br />
will resolve all of the conflicts that have arisen with an update.<br />
<br />
<div>
<br /></div>
RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-51316184550665804752013-10-05T19:31:00.001-04:002013-10-07T18:12:21.419-04:00Benchmarking ZFS against LVMZFS is a filing system that offers deduplication (i.e., two copies of the same file in different parts of the file system are only stored once) and compression with two algorithms (lzjb or gzip). A trial dataset of typical neuroimaging data from our system (59GB ) gave a 1.5 deduplication ratio and compression of 1.25 with lzjb and 1.32 with gzip. These are tests of ZFS backed by EBS on an Amazon EC2 cc2.8xlarge server.<br />
<br />
Following a clear of the memory cache with:<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sync; echo 3 > /proc/sys/vm/drop_caches</span><br />
<br />
I then benchmarked a directory listing (~1000 nifti files) and read/write (10 random EPI files per subject). Access times (ms) with statistics over 10 subjects of 4 sessions:<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">dir</span><span class="Apple-tab-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small; white-space: pre;"> </span><span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">zfs-nocompress 58.8 +/- 42.0</span><span class="Apple-tab-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small; white-space: pre;"> </span><span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">zfs-lzjb 38.5 +/- 16.2</span><span class="Apple-tab-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small; white-space: pre;"> </span><span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">zfs-gzip 53.9 +/- 47.6</span><span class="Apple-tab-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small; white-space: pre;"> </span><span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">lvm 146.8 +/- 480.6</span><span class="Apple-tab-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small; white-space: pre;"> </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">read<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 576.3 +/- 277.0<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 629.7 +/- 301.7<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 523.5 +/- 82.1<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 499.8 +/- 377.1<span class="Apple-tab-span" style="white-space: pre;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">write<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 207.1 +/- 13.1<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 207.0 +/- 12.6<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 205.5 +/- 6.5<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 188.3 +/- 1.3</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
On a second run immediately succeeding the one above (to maximize caching)<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">dir<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 6.0 +/- 0.3<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 5.8 +/- 0.4<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 5.9 +/- 0.3<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 4.8 +/- 0.2<span class="Apple-tab-span" style="white-space: pre;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">read<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 549.8 +/- 150.6<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 601.4 +/- 292.7<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 544.2 +/- 210.8<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 461.2 +/- 200.0<span class="Apple-tab-span" style="white-space: pre;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">write<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 207.8 +/- 17.3<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 206.9 +/- 16.4<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 203.7 +/- 1.9<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 189.8 +/- 3.1<span class="Apple-tab-span" style="white-space: pre;"> </span></span><br />
<br />
Directory listing has got faster, and reads a bit faster.<br />
<br />
ZFS seems slower for reading (1-2.5 times, depending on conditions), partly due to decompression latencies. It also uses more CPU, but from watching the system monitor, this was barely noticeable here as the disk access to EBS is still the bottleneck.<br />
<br />
ZFS has other benefits - it supports caching (on SSD drives for cc2.8xlarge ephemerals); and snapshots for backup, which don't use memory except to store changes in files.<br />
<br />
In summary, for our data deduplication and compression look valuable, but it does come with a performance cost. But, this can be made up for by more parallelisation of jobs. gzip looks the better option for our data.<br />
<br />
<br />
<i>Update:</i> After copying in ~3TB of data, in lots of small files, ZFS appears to be slowing down for both directory listing and reading. The files had probably fallen out of the cache (unless ZFS had kept them in because of their frequency of access).<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">dir<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 35.8 +/- 33.6<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 86.2 +/- 51.6<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 127.7 +/- 179.2<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 5.1 +/- 0.2<span class="Apple-tab-span" style="white-space: pre;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">read<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 792.1 +/- 415.7<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 822.9 +/- 372.7<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 887.2 +/- 475.5<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 390.0 +/- 36.3<span class="Apple-tab-span" style="white-space: pre;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">write<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 209.5 +/- 2.6<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 208.5 +/- 2.1<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 208.1 +/- 3.7<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 192.5 +/- 1.4</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
And a repeat, where the files will have been in the cache:<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">dir<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 19.2 +/- 8.2<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 23.3 +/- 14.2<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 22.0 +/- 19.5<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 5.0 +/- 0.2<span class="Apple-tab-span" style="white-space: pre;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">read<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 781.9 +/- 429.4<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 698.2 +/- 179.7<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 788.0 +/- 320.0<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 409.9 +/- 135.7<span class="Apple-tab-span" style="white-space: pre;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">write<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 207.8 +/- 3.3<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 206.4 +/- 2.2<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 207.5 +/- 5.0<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 193.3 +/- 2.5</span><br />
ZFS is doing even worse. This seems worrying... does anyone have a solution?<br />
<br />
<i>Update:</i> Under reasonable load (here 5 simultaneous copies from lvm to zfs) things really seem to fall apart with ZFS:<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">dir<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 4438.2 +/- 20030.3<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 453.5 +/- 554.9<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 732.9 +/- 530.3<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 14.3 +/- 10.5<span class="Apple-tab-span" style="white-space: pre;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">read<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 8622.1 +/- 5483.3<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 5494.3 +/- 4014.2<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 1485.2 +/- 824.7<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 445.9 +/- 198.3<span class="Apple-tab-span" style="white-space: pre;"> </span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">write<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-nocompress 4400.4 +/- 4677.5<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-lzjb 1946.9 +/- 3082.8<span class="Apple-tab-span" style="white-space: pre;"> </span>zfs-gzip 2445.3 +/- 2301.6<span class="Apple-tab-span" style="white-space: pre;"> </span>lvm 201.5 +/- 13.5</span><br />
I've checked the L2ARC cache and it is nowhere near full - 8 GB out of 32 GB max. What's the bottleneck, and why does it degrade so dramatically?<br />
<br />
<i>Update:</i> Part of the bottleneck is de-duplication, as described in this post:<br />
http://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSDedupMemoryProblem?showcomments#comments<br />
Switching this off speeds things up, but not enough under reasonable load - ZFS is still unacceptably slow.<br />
<br />
<i>Conclusion: </i>Abandoned as a solution for now, until I can identify the cause of the slowing.<br />
<br />
<br />RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-18272211070179504942013-08-05T17:43:00.001-04:002013-08-05T17:43:16.640-04:00For UWO employees... accessing journal or book subscriptions from outside the officeIf you've gone through pubmed or Scholar and arrived at a paper you'd like to obtain, but you've been rejected because the site doesn't recognize your subscription, then just put "proxy2.lib.uwo.ca" onto the end of the site name, between the URL and its parameters. For example...<br />
<a href="http://www.sciencedirect.com/science/article/pii/S1053811910010062">http://www.sciencedirect.com/science/article/pii/S1053811910010062</a><br />
becomes...<br />
<a href="http://www.sciencedirect.com.proxy2.lib.uwo.ca/science/article/pii/S1053811910010062">http://www.sciencedirect.com.proxy2.lib.uwo.ca/science/article/pii/S1053811910010062</a><br />
<br />
You'll then need your Western ID and password, of course.<br />
<br />
Magic, huh?RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com1tag:blogger.com,1999:blog-6171601131649660225.post-87796040233326338672013-07-30T16:39:00.002-04:002013-07-30T16:39:57.340-04:00Setting up your .bashrc for Mturk on cercimageAdd these two lines on the end:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">export PATH=/home/rcusack/software/aws-mturk-clt-1.3.0/bin:$PATH</span><br />
<span style="font-family: Courier New, Courier, monospace;">export MTURK_CMD_HOME=/home/rcusack/software/aws-mturk-clt-1.3.0</span>RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-761538285984294292013-07-28T17:52:00.000-04:002013-07-28T17:52:09.802-04:00Demystifying SPM variable namesA <a href="http://www.its.caltech.edu/~nsulliva/spmdatastructure.htm" target="_blank">very useful post</a> for SPM users... thanks Nikki!<br />
<br />RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-46450336989502112282013-07-25T18:13:00.000-04:002013-07-28T09:35:53.180-04:00Poisson disc in MatlabPoisson disc sampling is a nice way of getting random yet even coverage.<br />
<br />
Following the helpful page from <a href="http://devmag.org.za/2009/05/03/poisson-disk-sampling/" target="_blank">devmag</a> here are <a href="http://cusacklab.org/downloads/generate_poisson_2d.m" target="_blank">2d</a> and <a href="http://cusacklab.org/downloads/generate_poisson_3d.m" target="_blank">3d</a> implementations of Poisson disc (sphere?) sampling in Matlab. Also an <a href="http://cusacklab.org/downloads/sample_grey.zip" target="_blank">implementation</a> using SPM's grey mask to parcellate grey matter to an arbitrary degree.<br />
<br />RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com1tag:blogger.com,1999:blog-6171601131649660225.post-65041044923597305102013-02-20T15:01:00.003-05:002013-02-20T15:01:58.498-05:00Get rid of Unity under RealVNCGo to the directory .vnc in your home directory.<br />
Backup the file xstartup, make a new file, and replace it with:<br />
<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#!/bin/sh</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"># Uncomment the following two lines for normal desktop:</span><br />
<span style="font-family: Courier New, Courier, monospace;"># unset SESSION_MANAGER</span><br />
<span style="font-family: Courier New, Courier, monospace;"># exec /etc/X11/xinit/xinitrc</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup</span><br />
<span style="font-family: Courier New, Courier, monospace;">[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources</span><br />
<span style="font-family: Courier New, Courier, monospace;">xsetroot -solid grey</span><br />
<span style="font-family: Courier New, Courier, monospace;">vncconfig -iconic &</span><br />
<span style="font-family: Courier New, Courier, monospace;">#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &</span><br />
<span style="font-family: Courier New, Courier, monospace;">touch /home/rhodri/.vnc/haverunxstarup</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">gnome-session --session=gnome-classic &</span><br />
<div>
<br /></div>
<div>
On restarting your vncserver, you should get an old style desktop.</div>
RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-59180396841594658622013-01-03T13:06:00.002-05:002013-01-03T13:08:04.282-05:00Ubuntu reanimates netbookI had an essentially dead Acer Aspire One D257 netbook. With Windows 7 Starter, which it arrived with out of the box (along with lots of bloatware) it had become unbearably slow. There were two options: dustbin, or reanimation with Linux. After a failed diversion with Joli OS (which is very pretty but the Wifi resolutely refused to work), I installed Ubuntu 12.10. This works very immediately, and has made the machine a pleasure to use. I also found the preview version of <a href="http://www.spotify.com/us/download/previews/" target="_blank">Spotify for Linux</a>, which seems to work well too.RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com1tag:blogger.com,1999:blog-6171601131649660225.post-27106485135814248372012-10-23T09:32:00.003-04:002012-10-23T09:32:34.793-04:00Matlab/FSL + Ubuntu 12.04 library problemSince upgrading to Ubuntu Precise 12.04, we've been getting an error on starting matlab of <div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">/usr/local/MATLAB/R2011b/bin/util/oscheck.sh: /lib64/libc.so.6: not found</span></div>
<div>
<br /></div>
<div>
This same problem also seemed to break bet from FSL.</div>
<div>
<br /></div>
<div>
Now in your matlab path, for us</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">/usr/local/MATLAB/R2011b/sys/os/glnxa64</span></div>
<div>
<span style="font-family: inherit;">you'll find</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">libstdc++.so.6</span></div>
<div>
<span style="font-family: inherit;">symbolically linked to</span></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">libstdc++.so.6.0.1.13</span></div>
</div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;">Ubuntu ships with a newer version of this library in</span></div>
<div>
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16</div>
<div>
<br /></div>
<div>
So, I symbolically linked the Matlab version through to the one shipped with Ubuntu</div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">$ cd /usr/local/MATLAB/R2011b/sys/os/glnxa64</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">$ mv libstdc++.so.6.0.1.13 libstdc++.so.6.0.1.13.old</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">$ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16 libstdc++.so.6.0.1.13</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;">This seems to fix it.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-58474190928698052892012-10-05T10:22:00.001-04:002012-10-05T10:22:30.737-04:00Ubuntu Precise 12.04 & VNCWhen we upgraded to 12.04, the RealVNC desktop would come up blank. I found the solution <a href="http://kb.realvnc.com/questions/196/VNC+Server+in+Virtual+Mode+does+not+start+correctly+on+Ubuntu+12.04" target="_blank">here</a>.<br />
<br />RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-61835424405070534152012-08-21T18:06:00.001-04:002012-08-21T18:07:24.125-04:00Installed iBeatI've installed the <a href="http://www.med.unc.edu/bric/ideagroup/free-softwares/libra-longitudinal-infant-brain-processing-package" target="_blank">iBeat</a> infant brain image processing software on ssc-cercimage.<br />
<br />
To use it, add to your .bashrc:<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<span style="font-family: Courier New, Courier, monospace;"> export IBEAT_HOME=/home/rcusack/software/ibeat</span><br />
<span style="font-family: Courier New, Courier, monospace;"> source /home/rcusack/software/ibeat/ibeatEnv.bash</span><br />
<div>
<br /></div>
RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-26638604579730206642012-08-05T17:59:00.001-04:002012-08-05T18:16:06.478-04:00Using Ubuntu 12.04 by VNCI find the Unity desktop that ships with Ubuntu is clumsy to use over VNC. When changing workspaces, for example, it shows a full screen overview of what is on each desktop, which takes a long time to load over a slower connection. I'm sure it is very beautiful when sitting in front of the machine, but it is grating when used over a remote connection.<br />
<br />
Also, there seem to be some exotic keystrokes (e.g., ctrl+alt+arrow to switch workspaces), or lots of middle and right button work on the taskbar, which often don't translate properly down a VNC.<br />
<br />
To switch desktops, first install gnome with<br />
<span style="font-family: Courier New, Courier, monospace;">apt-get install gnome-session-fallback</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
Then, to configure VNC to launch into this, change the file .vnc/xstartup so that it has the line:<br />
<span style="font-family: Courier New, Courier, monospace;">exec gnome-session --session=gnome-classic</span><br />
<br />
<br />RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-77454426707316623122012-07-10T19:50:00.002-04:002012-07-10T19:51:00.078-04:00ec2 & fstabIf you're setting up an ec2 instance in the Amazon cloud and are setting devices (EBS volumes) to mount on reboot by adding them to /etc/fstab, make sure you put "nobootwait" in the options, like this:<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">/dev/xvdh /export/home ext3 auto,rw,nobootwait 0 0</span><br />
<br />
If you don't, then if the drive isn't present, the boot process will hang, either with a blank console output, or with:<br />
<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">The disk drive for xxx is not ready yet or not present</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">Continue to wait; or Press S to skip mounting or M for manual recovery</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
and as the keyboard is miles away, you can't press that key.RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-91347114994262670162012-03-27T17:00:00.001-04:002012-03-27T17:02:03.373-04:00aa moves to githubAutomatic analysis now has a <a href="https://github.com/rhodricusack/automaticanalysis" target="_blank">new home on github</a>, and the <a href="https://github.com/rhodricusack/automaticanalysis/wiki" target="_blank">wiki is currently moving there too</a>.<br />
<br />RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com1tag:blogger.com,1999:blog-6171601131649660225.post-68722590495700380572012-03-26T18:06:00.000-04:002012-03-26T18:11:46.773-04:00Configure remote access to git without erasing your existing keysThis is a solution if you'd like to connect to github using ssh (typical for read-write access to a repository) but you don't want to delete an existing ssh key (e.g., id_rsa) as requested in the git instructions. On ubuntu, I did it like this:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;">
$ cd .ssh</div>
<div style="font-family: "Courier New",Courier,monospace;">
$ ssh-keygen -t rsa -C "myemail@place.com"</div>
<div style="font-family: "Courier New",Courier,monospace;">
<i>Enter file in which to save the key (/home/username/.ssh/id_rsa):</i> <b>github_rsa</b><br />
<i>Enter a passphrase: </i><b>your secret phrase</b> </div>
<br />
Copy the public key file ~/.ssh/github_rsa.pub to your github.com <a href="https://github.com/settings/ssh" target="_blank">ssh settings</a>.<br />
<br />
Edit the file .ssh/config, and add the following entry (or create a new file if it doesn't currently exist)<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">Host github</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> Hostname github.com</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> User git</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> IdentityFile ~/.ssh/github_rsa</span><br />
<br />
Then, I had to do<br />
<div style="font-family: "Courier New",Courier,monospace;">
$ ssh-add ~/.ssh/github_rsa</div>
to get rid of an "Agent can't sign error"<br />
<br />
Then, if you do<br />
<div style="font-family: "Courier New",Courier,monospace;">
$ ssh -T github </div>
<br />
you should see<br />
<span style="font-family: "Courier New",Courier,monospace;">Hi rhodricusack! You've successfully authenticated, but GitHub does not provide shell access.</span><br />
<br />
Then you can do<br />
<span style="font-family: "Courier New",Courier,monospace;">git clone github:/rhodricusack/automaticanalysis</span>RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com13tag:blogger.com,1999:blog-6171601131649660225.post-60414223886396420252012-03-18T21:54:00.001-04:002012-03-22T19:18:04.901-04:00Using Univa grid engine for FSLGridEngine is installed on cercimage at the BMI. Elsewhere, you'll need to install the Univa GridEngine. Then, add the following line to the end of the .bashrc file in your home directory<br />
<span style="font-family: 'Courier New', Courier, monospace;">. /gridware/univa/default/common/settings.sh</span><br />
A number of FSL functions (including POSSUM & MELODIC) will then execute in parallel. You may type qstat or "watch qstat" to see the jobs being queued up. <br />
<span style="font-family: 'Courier New', Courier, monospace;"></span>RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-45862567855696064732012-03-16T08:47:00.001-04:002012-03-16T08:49:24.651-04:00Quicker ssh: config files and automatic authentication<b>Configuration file</b><br />
If you use ssh to connect between machines, you can do lots of handy configuration by creating a text file called "config" in your ~/.ssh directory. You set nicknames for servers you access regularly, identity files for automatic authentication, and port forwarding.<br />
<br />
An example entry:<br />
<blockquote class="tr_bq">
<span style="font-family: 'Courier New', Courier, monospace;">Host cl-exp</span><span style="font-family: 'Courier New', Courier, monospace;"> Hostname 12.11.10.9</span><span style="font-family: 'Courier New', Courier, monospace;"> User ec2-user</span><span style="font-family: 'Courier New', Courier, monospace;"> IdentityFile ~/.ec2-keys/mykeyfile.pem</span><span style="font-family: 'Courier New', Courier, monospace;">Host dept</span><span style="font-family: 'Courier New', Courier, monospace;"> Hostname gate01.dept.cam.ac.uk</span><span style="font-family: 'Courier New', Courier, monospace;"> User rc01</span><span style="font-family: 'Courier New', Courier, monospace;"> LocalForward localhost:5950 l49:49</span><span style="font-family: 'Courier New', Courier, monospace;"> IdentityFile ~/.ssh/dept_dsa</span></blockquote>
<div>
<br />
<b>Automatic authentication</b></div>
<div>
It is possible to set up automatic authentication, so that you don't need to enter a password. To do this:</div>
<div>
(1) Create the key</div>
<div>
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"> </span><span style="font-family: 'Courier New', Courier, monospace;">ssh-keygen -t rsa</span></div>
<div>
or</div>
<div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;"> ssh-keygen -t dsa</span></div>
</div>
<div>
<div>
You can use the default name (id_rsa or id_dsa) or create your own. You have the option to set a passphrase, or leave in blank. You should be aware of the security risks of leaving it blank - someone who has, or gains access to one machine can then access the other. However, it can be useful for automatic scripts or quick access.</div>
<div>
<br /></div>
<div>
(2) This will make two files - a public one ending in .pub (e.g., id_rsa.pub) and a private one (e.g., id_rsa). The private key should have tight permissions, so that only you can read it - for example, with</div>
<blockquote class="tr_bq">
<span style="font-family: 'Courier New', Courier, monospace;">chmod 600 .ssh/id_rsa</span></blockquote>
(3) The public key should be copied into a new line on the end of the file ~/.ssh/authorized_keys on the destination machine. </div>
<div>
<br /></div>
<div>
(4) If you used the default key name, you should be able to then connect with</div>
<blockquote class="tr_bq">
<span style="font-family: 'Courier New', Courier, monospace;">ssh [the host name]</span></blockquote>
If you used your own name, use<br />
<blockquote class="tr_bq">
<span style="font-family: 'Courier New', Courier, monospace;">ssh -i [private key file name] [the host name]</span> </blockquote>
<blockquote class="tr_bq">
<span style="font-family: 'Courier New', Courier, monospace;">e.g., ssh -i .ssh/dept_dsa gate01.dept.cam.ac.uk</span></blockquote>
If it doesn't work, try changing the type (rsa/dsa, see step 1)<br />
(5) You might then want to set up a config file that contains the name of the key file (IdentityFile parameter)<br />
<br />
<div>
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<div>
</div>
</div>RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-55337291267188375032012-03-09T09:07:00.001-05:002012-03-26T18:13:04.787-04:00Pymvpa 0.4.7 and 2.0.0Installed with<br />
$ sudo aptitude install python-mvpa<br />
$ sudo aptitude install python-mvpa2<br />
<br />
Also installed nibabel<br />
<br />
$ easy_install nibabel<br />
<br />
But pymvpa doesn't work - first line in tutorial of either package gives mdp error about "convolution_nodes". I've tried reinstalling mdp. Out of time for now...<br />
[now resolved, see comments below from the proactive pymvpa support, who contacted me after reading this post!] <br />
<br />RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com2tag:blogger.com,1999:blog-6171601131649660225.post-25943399922736829122012-01-22T08:57:00.001-05:002012-01-22T08:57:34.270-05:00Installed sqlite3A light database used for Django.RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-26929866355614923162012-01-19T16:53:00.000-05:002012-03-09T09:26:22.647-05:00Testing Condor and Univa Grid Engine at BMICondor is a system for queuing jobs across clusters or farms of computers developed by the University of Wisconsin-Madison. Univa Grid Engine is a similar system, descended from the popular Sun Grid Engine, which is unfortunately no longer supported by Oracle, the new owners of Sun. I've installed both of these on ssc-cercimage for testing. aa now supports queuing on Condor (see the aa wiki).<br />
<br />
<br />
<br />
<br />RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0tag:blogger.com,1999:blog-6171601131649660225.post-41770693422584196992012-01-19T16:03:00.000-05:002013-02-01T16:56:38.837-05:00Automatically add SPM & aa to your Matlab paths at BMIAdd this to the end of your startup.m<br />
<br />
<pre>% SPM and aa
addpath /home/rcusack/software/spm_cbu_svn/releases/spm8_fil_r4290</pre>
<pre>addpath /home/rcusack/software/automaticanalysis</pre>
<pre></pre>
<pre>Then type</pre>
<pre>>> spm</pre>
<pre>when you want to launch spm and then</pre>
<pre>>> aa_ver4</pre>
<pre>when you want to use aa</pre>
<pre>
</pre>
<pre>
</pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre>% OLD VERSION, BECAME OBSOLETE AS OF May 2012</pre>
<pre>% addpath /home/rcusack/software/aa/versions/release-4.0-beta/
</pre>
RhodriCusackhttp://www.blogger.com/profile/07602242092066277136noreply@blogger.com0