Friday, February 13, 2015

Matlab installation on Linux

The Matlab R2014 installer on Linux by default proposes to install in /usr/local/.
If you want to follow the default, you then have to run the installer as root.
The problem is, that then your pathdef.m file is also locked.
The workaround I found is to change its permissions to 666 (cf. screenshot below).
If somebody knows a better solution, please let me know

Friday, October 23, 2009

Split my local SVN archive

Among the years spent at IMT, my SVN repository has become bloated with many things, some of which are not directly related to the work done at Parlab. Before the group closes, I plan to release the software I wrote as open-source, and hopefully with the full SVN history of this software. This requires to split up my bloated repository into smaller units.

I tried to go the 'svnadmin dump' 'svndumpfilter' way, but this did not work due to my abuse usage of cheap copies (thank to the TortoiseSVN copy option). The 'svndumpfilter2' and 'svndumpfilter3' replacements did not work either.

svndumpfilter failed on the first revision with a copy from a non-included path

svndumpfilter2 produced a dumpfile, but displayed various errors from svnlook while running.
The dumpfile could not be exported to a repository.

svndumpilter3 seemd to process everything, but produced many strange beeps during exectution, probably caused by invalid UTF-8 interpretations of binary data (png images and so on). And I failed to find the output dumpfile :-/ Maybe clearer usage explenations from the author would have helped.

Right now, I'm trying to follow the instructions by Cott Lang at Internet Stall, who seems to have encountered the same issues I had with 'svndumpfilter*'

The target repository for sync is created by :

jamesMBpro:tempSVN james$ svnadmin create --fs-type fsfs /tempSVN/FSFS/docREP/

First, change the pre-revprop-change script (done in step 3 in Cott Lang's howto):
jamesMBpro:tempSVN james$ smultron ./FSFS/docREP/hooks/pre-revprop-change

#!/bin/sh   USER="$3"  if [ "$USER" = "syncuser" ]; then exit 0; fi  echo "Only the syncuser user may change revision properties" >&2 exit 1

and then, change the start-commit script:
jamesMBpro:tempSVN james$ smultron ./FSFS/docREP/hooks/start-commit

#!/bin/sh   USER="$2"  if [ "$USER" = "syncuser" ]; then exit 0; fi  echo "Only the syncuser user may commit new revisions" >&2 exit 1

svnsync initialization:

jamesMBpro:tempSVN james$ svnsync initialize file:///tempSVN/FSFS/docREP file:///tempSVN/svnIMTtemp/trunk/doc --sync-username syncuser --sync-password syncpwd
Copied properties for revision 0.
jamesMBpro:tempSVN james$

then, the copying in itself:

jamesMBpro:tempSVN james$ svnsync synchronize file:///tempSVN/FSFS/docREP --sync-username syncuser --sync-password syncpwd
Committed revision 1.
Copied properties for revision 1.
Committed revision 2.
Copied properties for revision 2.
Committed revision 3.
Copied properties for revision 3.
Transmitting file data ...........
Committed revision 2597.
Copied properties for revision 2597.
Transmitting file data .
Committed revision 2598.
Copied properties for revision 2598.
Transmitting file data ...
Committed revision 2599.
Copied properties for revision 2599.
jamesMBpro:tempSVN james$

Now, check the copied repository.

jamesMBpro:~ james$ cd /tempSVN/coTest/
jamesMBpro:coTest james$ mkdir docTest
jamesMBpro:coTest james$ cd docTest/
jamesMBpro:docTest james$ svn checkout file:///tempSVN/FSFS/docREP
A docREP/trunk
A docREP/trunk/doc
A docREP/trunk/doc/JMuWebsite/WebContent/default.php
A docREP/trunk/doc/JMuWebsite/WebContent/video_occlusion.php
Checked out revision 2599.
jamesMBpro:docREP james$

One potential hickup here. The synced repository has the same directory structure as the original repository had (in this case, trailing /trunk/doc/). Nevertheless, the checkout seemed to work, let's see what the log has to say.

jamesMBpro:docTest james$ cd docREP/
jamesMBpro:docREP james$ svn log
r2599 | james | 2009-10-19 19:07:33 +0200 (Mon, 19 Oct 2009) | 2 lines

+ changed website links to include thesis draft, presentations
+ fixed some of www-imt dead links
r2598 | muredubo | 2009-10-16 16:00:25 +0200 (Fri, 16 Oct 2009) | 1 line

done ?
r2597 | muredubo | 2009-10-16 15:36:45 +0200 (Fri, 16 Oct 2009) | 1 line

almost done
r4 | mtzamofing | 2004-11-26 08:39:13 +0100 (Fri, 26 Nov 2004) | 2 lines

*** empty log message ***

r3 | mtzamofing | 2004-11-25 14:59:38 +0100 (Thu, 25 Nov 2004) | 2 lines

*** empty log message ***

r2 | mtzamofing | 2004-11-25 14:38:34 +0100 (Thu, 25 Nov 2004) | 2 lines

*** empty log message ***

r1 | (no author) | 2004-11-25 14:38:34 +0100 (Thu, 25 Nov 2004) | 1 line

Standard project directories initialized by cvs2svn.
jamesMBpro:docREP james$

Building of one of the most important LaTeX document in this repository (my PhD thesis) worked flawlessly on the first try. Of course, more validation of the robustness of this copy is required, but this is encouraging.

Tuesday, October 13, 2009

Updates, Quicktime, Nvidia Quadro and BSODs

I regularly update the software on the Quad Core machine I use for development in our lab: a Dell Precision 390 with a Nvidia Quadro FX 3450 graphics card. Recently, I began experiencing problems which seemed related to the graphics card. The display would freeze indefinitely, or change to the infamous BSOD.

Sometimes upon starting or restarting the machine, the display would be garbled, as if the VGA connector wasn't properly connected (it was). On various occasions, Windows detected a corrupt disk upon restart, but the automated chkdsk seemed to always be able to fix the problem (in 30 minutes).

Remembering that the latest Windows update included an update to the Nvidia driver, I thought I had found the culprit. I foolishly tried to roll back to Dell's driver, from Dell's website.
Note that apparently Dell also provides a vintage Quadro FX3450 BIOS (v5. from 01.12.2006) ! The old driver (v84.26 from 01.11.2007) seemed to install correctly, until it asked permission to restart the machine. Upon login after the restart, the driver installation program resumed, and managed to garble the display in ways that appear quite artistic in retrospective.

One hard reboot later, I decided to let Dell's abandon-driver to rest, and proceeded to download and install NVidia newest driver.
Alas, the bluescreen problem reappeared after only a few hours. Seriously bedazzled, I did waht I should have done first, I fired MS computer management utility, to look at error logs.
And there it was, numerous warnings about paging errors, followed by critical errors attributed either to my system drive, or to iaStor.sys This got me worried about a possible failure of the hard disk drive.

I remembered that while I was updating the system through Windows update, I had selected to install the optional Intel Matrix Storage software. But had finally not activated it since the system contains only 2 hard drives, on used for WinXP, and the other one for CentOS.

To my relief, hardware failure became less likely after a quick google search turned out many disturbing links, suggesting that Dell and iaStor are a risky combination :
see in particular:
Shortly after, I stumbled on the following link :

And then, bing (no pun intented), it hit me. I had also been asked by Apple update if I wanted a new version of iTunes and Quicktime. I decided to pass on iTunes, but said Ok to Quicktime.
Note that the post linked above concerns Vista, and I'm running XP. But the message I got is that Quicktime can induce trouble with iaStor on Dell Precision 390 systems.

Since I did not need the RAID software, I first uninstalled Intel Matrix Storage. However, this did not prevent the BSODs from returning. Which suggests that this software is not responsible for the crashes I experienced.

So, I uninstalled Quicktime, and tada, the crashes stopped. For now, I'm a happy camper (without Quicktime), and I can go back to my spherical Fourier transforms for DynamicVA.
But I really hope Apple fixes wahtever is wrong with QuickTime.

Sunday, September 27, 2009

FFTW issues in Matlab on Mac

For the project I'm currently working on (dVA on sphere), I'm using the Yawtb toolbox, with the S2Kit interface (see previous post) . This interface is faster when it uses FFTW3.
I followed the build instructions for S2Kit, using Macports's FFTW. S2Kit built and tested ok from command line. Testing the integration in Yawtb, I encountered a linker error:

>> yademo s2fst
% Sample(s) of code for S2FST
>> [phi,theta] = sphgrid(46,46); %%
>> mat = exp(-tan(theta/2).^2) .* ( phi == phi(1,10)); %%
>> fmat = s2fst(mat); %%
??? Invalid MEX-file '/IM2sandbox/yawtb/interfaces/s2kit/s2fst.mexmaci':
dlopen(/IM2sandbox/yawtb/interfaces/s2kit/s2fst.mexmaci, 1): Library not loaded: /opt/local/lib/libfftw3.3.dylib
Referenced from: /IM2sandbox/yawtb/interfaces/s2kit/s2fst.mexmaci
Reason: Incompatible library version: s2fst.mexmaci requires version 6.0.0 or later, but libfftw3.dylib provides version

Error in ==> yademo at 77

Some googling after (see comments here), I learned that this comes from a version mismatch between Matlab's FFTW and the newer Macports version.

Contrary to Geoffrey, I decided to update the lib in Matlab (quite similarly to the suggestion here). Note: a backup is recommended. In my case, the fix implied copying libfftw3.dylib and libfftw3.dylib from /opt/local/lib to /Applications/ .

And now, the yademo s2fst example works great :-)
Note that I did not check whether this fix breaks other FFTW related code. YMMV.

Spherical wavelets toolbox - run on windows

I recently began to work on a project concerning dynamic visual attention (VA) on the sphere, and the current code base uses Yawtb and SpharmonicKit.
Since the camera used in the project has only MS Windows drivers, I wanted to run the algorithms in the same OS. A quick google search turned only to posts with similar questions (see questions on Chris Rodgers software blog).
So, I took the plunge and tried to compile on my WinXP SP3 box, with MS Visual Studio 2005. I used premake to create the target projects, based on a quick look at the Makefiles. Note that I replaced the SpharmonicKit27 interface with the more recent S2Kit, which uses fftw for faster Fourier transforms.
Apparently, MS compilers have gained in compliance to ANSI standards over the years. The only issues I had were:
  • undefined M_PI for both Yawtb and S2Kit
fixed with '#define _USE_MATH_DEFINES' in files including math.h
  • srand48() and drand48() could not be found (for S2Kit test files)
here, the fix is less obvious. For now I just used rand() and (double) rand() / (double) RAND_MAX , but this is probably far from optimal (please don't flame for not using your favorite RNG ;-).

A copy of the modified S2Kit is available at
while the modified Yawtb is at:

Beware, those quick patches run on my XP machine, but have not been thoroughly tested. Your mileage may vary.

Thursday, August 20, 2009

Windows explorer crashes when external HDD is connected

I'm running XP SP3, and trying to finish my PhD thesis defense presentation. I had to connect my USB external HDD to find some videos I had archived, because I wanted to include them in the presentation.
As I took a break , the screensaver kicked in. When I came back, Windows Explorer had crashed. My machine is currently almost unresponsive.
I googled my problem, and quickly found links suggesting that this crash could be related to windows creating thumbs for the videos on the external drive.
A fix is proposed by Wile E at

regsvr32 /u shmedia.dll

The indexing service popped a mesage box to indicate it stopped, but I'm still unable to restart explorer. So, my next step will be to pull the plug on my external HDD, and reboot. Right now, I cross my fingers hoping that the partitions will still be readable when I plug teh disk back in.

Wednesday, August 19, 2009

Latex - Beamer warnings after update

While preparing my PhD defense presentation, in ran into the warning:

Package hyperref Warning: Option `pdfpagelabels' is turned off
(hyperref) because \thepage is undefined.
Hyperref stopped early

Google was my friensd this day since the first search result provided the appropriate workaround:

Cheers to localghost, whose answer allowed me to skip reading the change logs of the hyperref package at such a stressful time.

In fact, all the new warnings I got were related to the update of beamer and hyperref.
This blog entry : presents a step by step workaround. Thanks Stefan.