Mathematica 7 high cpu usage on linux kernels 2.6.28+

aboSamoor | July 22, 2009 | 11:52 am

According to the email from then wolfram support, there is a patched shared libraries for the new linux kernels. Apparently, Mathematica having problems running on 2.6.28+. I followed the email of the technical support and it worked for me ;) and the cpu usage dropped from 80%+ on average to less than 5% !!!

The solution as mention in ubuntu forums [1]

  1. Download the file here:

    http://download.wolfram.com/?key=61JJHE

  2. Place the shared library in
    /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Libraries/Linux
  3. Download these files:

    http://download.wolfram.com/?key=MK4ZR8
    http://download.wolfram.com/?key=YHDAH4

  4. Place them in
    /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Libraries/Linux-x86-64

Good Luck :)

Mathematica 7 java interface problems

aboSamoor | | 11:40 am

Java interfaces usually brings problems as cpu high usage and rendering difficulties. You can notice that for matlab, Netbeans and Mathematica. I think they have to consider QT4 for cross platform UI library.

Java used mainly in Mathematica in the documentation center, and this usage allocated about 15% of the CPU to Java all the time, to reduce the usage you have to replace JLink folder with patched one.

  1. wget http://download.wolfram.com/download/GM5YM4/JLink.zip
  2. extract the zip file
  3. Replace the /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Links/Jlink with the new folder

If you don’t want Java anymore your can use this trick, notice that you will block the documentation center. However, you can use http://reference.wolfram.com instead.

  1. Renaming the folder
    mv /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Links/JLink /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Links/JLink_old
  2. OR Making it not executable
    chmod a-x chmod a-x /usr/local/Wolfram/Mathematica/7.0/SystemFiles/Links/JLink

Sources:

  1. The patched folder
  2. Renaming option [1][2]

Mathematica rendering 3D plots problems

aboSamoor | | 11:18 am

Rendering Graphics3D using Mathematica on linux generally and specifically on Ubuntu 9.04+ is not fun. The output is not displayed till you rotate the object, and once you rotate the 3D object the cpu usage jump to 100% which gives bad experience using Mathematica for Ubuntu users. This is a driver issue which it is expected to be addressed with the newer Intel graphics drivers which introduces UXA option instead of EXA as an acceleration method. As 9.04 was released this new technology was not stable enough to be enabled by default.

Now, to solve the problem for Mathematica you have two options:

  1. Run Mathematica with mesa option
    mathematica -mesa

    • Modify /etc/X11/xorg.conf to add the UXA option
      Section "Device"
      Identifier "Configured Video Device"
      Option "AccelMethod" "uxa"
      EndSection

    • Logout to restart the X server
    • Notice: Don’t forget to backup your xorg.conf before editing ;)

Sources:

  1. UXA option
  2. Mesa option