I recently installed Matlab v7.0 (R14) on my new computer and ran into some troubles. After starting Matlab, the program window would open as normal, but then it would shutdown almost immediately, usually after about a second or so delay, allowing me to tantalizingly see that it almost working. I did a search and found this helpful article on how to fix the problem.
The issue (Matlab closing right after start-up) stems from Matlab (at least this version, the newer versions might not be affected) not “recognizing” the processor string for newer AMD Athlon 64-based processors; in my case, I had an Athlon 64 X2 3800+. Matlab relies on different Basic Linear Algebra Subprograms (or BLAS) routines for different types of CPUs, and these are stored in different DLL files.
The BLAS file responsible for telling Matlab which DLL file to use for what type of CPU is located at:
%MATLAB7%\bin\win32\blas.spec
(where %MATLAB7% is the path to your Matlab installation)
To fix the problem, open up the file in a text-editor, and add the following two lines to the bottom:
AuthenticAMD Family 15 Model 12 atlas_Athlon.dll # Athlon 64 (Newcastle)
AuthenticAMD Family 15 Model * atlas_Athlon.dll # AMD64
This will tell Matlab to use the proper DLL file with your newer AMD-64-based CPU, instead of apparently defaulting to using a Pentium DLL file when an unrecognized CPU is detected.
More on the problem
As mentioned, the problem stems from the CPU being unrecognized by Matlab’s configuration file. All CPUs have some sort of identifier string, and Matlab uses this to determine what DLL file to use. When an unrecognized CPU string is detected, it apparently defaults to using a Pentium DLL file; this results in Matlab crashing when it’s run on an AMD-64-based CPU, and results in the crash-on-start behaviour.
Why the different DLL files for different CPUs? My guess is that the BLAS, upon which Matlab is based, are optimized or made to work better with select CPUs. It should be noted that these problems may not be experienced if you’re running a more current version of Matlab.
I did a little more searching and found this forum thread over at the Matlab website, where a different fix for the same problem is presented. It involves setting a Windows environment variable instead of editing the blas.spec file, but should do the same thing; I haven’t tried it. This other forum thread also details a similar procedure.
Hope this helps in fixing any Matlab ailments you might have had, because running into a problem like this can be frustrating as heck when you need to have an assignment done for tomorrow!
Update
I’d just like to say that a dual-core setup totally rocks. It’s awesome to be able to still play CS:S while running a Matlab simulation.
Thank you so much! I was about to give up!
Thanks a LOT! I need to have this coding finished before class starts in a few hours ;p Props to Google for the quick fix, haha.
Hail, mighty and powerful Peter! Thank thee thousand times!
Thank you and google which indicates this your site! I lost a saturday trying to solve this problem.
Great fix! thnks
Feels kind of stupid to just have to add a star in the config to make it work. True lol-moment there…
Thank you. It works flawlessly.
I was going to give up already and then I found your site.
I do have a question though, I am using a Turion based laptop. From what I understand, I should just add the lines you have posted and since, I am using a Turion processor, I should modify the first line to Turion 64 (Lancaster)?
—
AuthenticAMD Family 15 Model 12 atlas_Athlon.dll # Turion 64 (Lancaster)
AuthenticAMD Family 15 Model * atlas_Athlon.dll # AMD64
—
Thanks a million!
-a121
I believe the part after the pound sign (’#') is just a comment, for reference’s sake. So, it probably doesn’t matter whether it’s changed or not, so as long as the fix works for you.
After so many posts from satisfied bloggers, I was optimistic that the above mentioned solution would also work for me, but it hasn’t!
I’m trying to run Matlab 7 on an Athlon 64 (3000+) CPU with a Gigabyte GA-K8NSC-939 motheboard, but on starting Matlab I get an immediate crash with the following message:
” Microsoft Visual C++ Runtime Library
Runtime Error!
Program: D:\MATLAB7\bin\win32\Matlab.exe
This application has requested the Runtime to terminate it in an unusual way. Please contact the application’s support team for more information.
”
I have already attempted appending the two lines…
AuthenticAMD Family 15 Model 12 atlas_Athlon.dll # Athlon 64 (Newcastle)
AuthenticAMD Family 15 Model * atlas_Athlon.dll # AMD64
… at the end of the blas.spec file, however this seems to have no effect.
Furthermore, I’ve alsoadded the variable “BLAS_VERSION’ with a value of “atlas_Athlon.dll” in the environmental variables as suggested by other forums, but with no success.
Any help would be much appreciated.
Thanks…
You made our day!
Regards
Tanvir, Sunil and Pankaj
Hi JCat,
It sounds like your problem isn’t due to the incorrect BLAS file specification - it may be due to an incompatible version of Java being used, but I’m not entirely sure.
Hi Mr. JCat,
I run Matlab on a hp pavilion dv9000 series laptop with Turion 64X2 - TL60 processor
I too get the same error as u ve posted - †Microsoft Visual C++ Runtime Library
Runtime Error!
Program: D:\MATLAB7\bin\win32\Matlab.exe
This application has requested the Runtime to terminate it in an unusual way. Please contact the application’s support team for more information.
â€
and matlab crashes… i don’t know what to do… can u or anyone please help me out in this??
thank you very much
Thank you I owe you a beer for this solution!
Best regards.
Thank you very much to help me fix this problem
Hello what about the turion64 processors . Do you know how to fix the problem . Please
THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!
Thank you very much!
SOLUTION!!!!
Hi i got a dv6000, and this machine comes with a processor AMD Turion64 X2.
I recently installed Matlab v7.0 (R14) on my new computer and ran into some troubles. After starting Matlab, the program window would open as normal, but then it would shutdown almost immediately.
And i dit what that men said at the begining of the post:
The BLAS file responsible for telling Matlab which DLL file to use for what type of CPU is located at:
%MATLAB7%\bin\win32\blas.spec
(where %MATLAB7% is the path to your Matlab installation)
To fix the problem, open up the file in a text-editor, and add the following two lines to the bottom:
AuthenticAMD Family 15 Model 12 atlas_Athlon.dll # Athlon 64 (Newcastle)
AuthenticAMD Family 15 Model * atlas_Athlon.dll # AMD64
!!!!!!!!!!AND SAVE THE FILE!!!!!!!!!!
WAS ALL I DID AND WORKS FINE!!!
THANKS JESUS CHRIST FIRST THEN TO U GUYS!!!
I HOPE THIS CAN HELP SOME ONE ELSE!!!!
Thank you very much. I lost a saturday and a sunday trying to fix this problem.
I had to use my girlfriend´s computer to finish my work..lol, but now it´s working well on my athlon 64…
thank u very much…u just save amd from curse
as this installation was perfect at my home pc i infer that its all problem with amd
instead i got no support from matlab site
i still can’t get it to work on my turion X2 64 bit laptop. i’ve tried many steps still my matlab hangs at ***initializing*** if i press Ctrl+C i get some error message but after that i can’t open any saved matlab files or open a new M-file
please help
thanks in advance
Hi Rajeev,
I’m not sure why it’s still not working for you. According to this page (http://www.asadasif.com/index.php?itemid=2) the two additional lines should have worked for you.
Your problem may be related to the version of Java you’re using. Try upgrading it or changing to another version. If all else fails, you might want to try upgrading to a newer version of Matlab. I wrote this article for Matlab 7.0 (R14), but since then Matlab r2006 and r2007 have been released, and both work with AMD dual-cores without any changes.
I installed matlab7.1 on my pc, hp pavilion dv 2401, with windows vista.
But when I try to run it, it displays the matlab icon, then rings once and stacks.It does not give error message, neither does it close.
Could anyone help me work out this problem. I am really exhausted.
You just add two lines as above then it will fix the problem as well.
Hi Fisseha,
You just add two lines as recommended above then it will fix the problem as well.
Hi all,
Sorry for the lack of feedback. Fisseha, as Blue indicated, adding the two lines to your blas.spec file should fix the problem.
If that’s not the case, then what you’re experiencing isn’t related to this problem - sorry that I can’t provide assistance.
Additionally, this post/article is a bit outdated… MATLAB is now in R2007b, but many people are still using v7.0 R14 so hopefully this will help them.
The solution offered for the blast.spec file worked well for my Turion 64 laptop without editing anything.
Thanks a lot!
Thak you very much! I was about to loose my head.
thankuuuuuuuuuuuuuuuuuuuuuuuuu…………….
i was abt to give up……thanks
Thank you. it works.
I have the exact same problem as Fisseha .
I have AMD Turion based laptop, with vista on it.
I tried adding two lines to the blas.spec, and even adding system variables as suggested.. but it still doesn’t solve the problem.
It “tings” once and then just stops, doesn’t give any message, doesn’t open the command window
Help!
Hi Ajit and Fisseha,
I am not entirely sure, but there may be other problems associated with Matlab 7 R14 and Windows Vista that are preventing it from running properly.
See here:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/159717
However, this post merely links to an article that suggests the same solution as was posted here.
It may be time to try a newer version of Matlab, if possible. (I know that may always not be an option if on a student’s budget)
Peter
A lot of solution of “Matlab on AMD” in the blog:
http://jhproject.wordpress.com/2007/09/30/solucion-de-matlab-7-en-amd-y-xp/
See the solutions (spanish).
Regards!
http://jhproject.wordpress.com
Thanks a lot .. solved my probs..
thanks a lot for this usefull thread. you are the best!!!
Thanks a lot
hey thanks very much yaar..
r u really rock.. i too have same prob let me try it.. if i can fix it ..
thanks man.
Thanks for help!
you rock man. it works on AMD 3600+. i was having sleepless nights over it. thanks for the solution
thnx a lot 4 the soln…… it really worked much 2 ma relief……
thank u very much !
i really needed matlab while i was confused with the problem…
thanx again!
Really…Really thanks for you help!!
I was giving up… I’ve tried to install and reinstall for almost four hours…And now I got it using your help!
Really Thanks!
If you have a the version R2007b of matlab, it should support most AMD64 processors.
The problem is that sometimes Matlab tries to grab too much memory and apparently Windows kills matlab. (symptom: it looks like your pc is trying to load but it gets interrupted and it does not goes on…).
Create this environment variable on your system:
MATLAB_RESERVE_LO and give it a value of 0 (zero).
This should solve the problem.
That was a neat fix! Thanks a ton pal.
Cheers!