On some systems, starting Matlab may result in an error similar to the messages below:

  • Warning: failed to create preference directory
  • MATLAB Shutdown : Failed To Create Preference Directory.
In the event that Matlab fails to properly setup preference directories, you can redirect Matlab to use an alternative path using the MATLAB_PREFDIR environment variable.  For DPB/DGE Linux systems, one of the following paths is recommended:
  • /Carnegie/DPB/Homes/Users/your_user_name/.matlab/matlab_version_you_are_using
  • /Carnegie/DGE/Homes/Users/your_user_name/.matlab/matlab_version_you_are_using

For example:

[ghuntress@memex ~]$ export MATLAB_PREFDIR=/Carnegie/DPB/Homes/Users/ghuntress/.matlab/R2016b

[ghuntress@memex ~]$ matlab -nodesktop -nojvm -nodisplay