Monday, June 15, 2009

Rocks cluster 5.2 (beta) & Matlab R2008b on Linux x86_64

Introduction


You will face 3 problems when you install and run Matlab R2008b on Rocks cluster 5.2 (beta). Actually, these issues are not necessary caused by Rocks 5.2 cluster, but, it happened on Rocks on Linux x86_64. So, let's fix them!

1. Installation

It happens when you type 'install' after inserting Matlab DVD into your head node.

bash: /media/MATHWORKS_R2008B/install: /bin/sh: bad interpreter: Permission denied

Solution

The reason is that 'noexec' option is applied internally when it is mounted automatically. Simple fix is that just unmount DVD and mount it again "manually". Then, 'noexec' won't be used by default.

$unmount /cdrom
$mount -t iso9660 /dev/cdrom /cdrom

Reference

http://www.mathworks.com/support/solutions/en/data/1-184PH/

2. Running demo

After installing, you might want to test run demos provided with Matlab. And you would click 'Help/Demo' menu and eventually, will click 'Run this demo' link. But, what you get is not a fancy demo window, but a just frustrating error like this.

Solution

Matlab is not really smart enough to know that you are using Firefox. So we need to let Matlab know that we are using Firefox. How?

Edit this file;

MATLAB_INSTALL_DIR/toolbox/local/docopt.m

In line 52, change this line

doccmd = '';

to

doccmd = 'mozilla';

Reference

http://www.mathworks.com/support/solutions/en/data/1-25NUXQ/

3. Printing

When you click print within Matlab, you would get this error on Linux;

Caused by: java.lang.NullPointerException: null attribute
at sun.print.IPPPrintService.isAttributeValueSupported(IPPPrintService.java:1147)
at sun.print.ServiceDialog$OrientationPanel.updateInfo(ServiceDialog.java:2121)
at sun.print.ServiceDialog$PageSetupPanel.updateInfo(ServiceDialog.java:1263)
at sun.print.ServiceDialog.updatePanels(ServiceDialog.java:437)
at sun.print.ServiceDialog.initPrintDialog(ServiceDialog.java:195)
at sun.print.ServiceDialog.(ServiceDialog.java:124)
at javax.print.ServiceUI.printDialog(ServiceUI.java:188)
at sun.print.RasterPrinterJob.printDialog(RasterPrinterJob.java:855)
at sun.print.PSPrinterJob.printDialog(PSPrinterJob.java:421)

Solution

It is caused by the bugs in Java printing function, which is used by Matlab to print output. There are several workarounds are suggested, but, in my opinion, the easiest and simples way is adding this line;

Option orientation-requested 3

to CUPS's configuration file;

/etc/cups/printers.conf

Reference

http://www.mathworks.com/support/solutions/en/data/1-747TRF/

5 comments:

  1. thanks for sharing with all of us on LinkedIn High Performance and Super Computing!

    -robert

    ReplyDelete
  2. what should i do for matlab r2001b on rocks centos 6.2

    ReplyDelete
    Replies
    1. Need more information about your situation to find out how to resolve it.

      Delete
    2. i have matlab r2011b on iso and im trying 2 install it on rocks cluster centos 6.2
      my admin want me 2 try on vm first
      i didnt understand math work document will
      if i start installing would face this problem

      Delete
  3. This comment has been removed by the author.

    ReplyDelete