40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  SUS Lab eLog  Not logged in ELOG logo
Message ID: 368     Entry time: Mon Oct 24 16:18:45 2011
Author: Giordon Stark 
Type: HowTo 
Category: COMSOL+Matlab 
Subject: How to set up COMSOL to communicate with Matlab (Mac OSX Lion) 

  Mac OSX Lion came out pretty recently and COMSOL 4.2 [at the time of the writing] does not successfully install on these OSes. There's two issues in general - the first issue is that Lion changed the way some of the paths work (that COMSOL depends on) and COMSOL will throw seemingly unrelated errors in trying to start up.

install COMSOL 4.2 Update 3 (or better): http://www.comsol.com/support/updates/comsol42p3/

After installing, we need to update the MATLAB paths. Matlab normally installs in a directory under /Applications called 'MATLAB_R2010b'. Rename it by changing the underscore to a dash [COMSOL interprets the underscore as a 'space' which means it will never find it]. The new name should be 'MATLAB-R2010b'. Next, navigate to the COMSOL42/bin folder in /Applications. Depending on which mac build you're running (32-bit or 64-bit) - select the appropriate 'maci##' folder.

Inside are 4 initialization files to change:

  • comsolserver.ini
  • comsol.ini
  • comsolbatch.ini
  • comsolcompile.ini

On the very last line of each file - it should read:



Once you've made the changes - you should be able to launch COMSOL+Matlab without (m)any issues.
ELOG V3.1.3-