"Unhandled exception"

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
Paatrick
Posts: 6
Joined: Thu Jun 27, 2013 6:08 pm

"Unhandled exception"

Post by Paatrick »

Dear all:

I'm using Stata 12, Mlwin 2.28, and the current version of -runmlwin-. I'm trying to run a multivariate logit model with 2 binary outcomes, two/three levels (individuals nested in 28 countries plus the outcome level), and about 450,000 individuals. When I run my syntax, Mlwin gives me the error messages "Unhandled exception", "Error detected by MLN: error while obeying batch file [cryptic path] at line number 37: STAR [two blank lines] Üê[box]."

Do you have any idea what the problem could be? I don't (and I am rather sure that this very model used to run a couple of weeks ago and I haven't changed the do-file in the meantime).

What I did try was to reduce the number of cases. I don't get the error message when I try to run the model with about 200,000 individuals.

Also, I tried looking at line number 37 to find out what was wrong there via the viewmacro option, but that one looks alright to me:

Code: Select all

ECHO 0
NOTE   ***********************************************************************
NOTE   MLwiN macro created by runmlwin Stata command: 13 Sep 2013, 11:53:16
NOTE   See: www.bristol.ac.uk/cmm/runmlwin for help
NOTE   ***********************************************************************

NOTE   Initialise MLwiN storage
INIT 5 900000 1500 300 30

OPTS 0
MONI 0
NOTE   Import the Stata data set into MLwiN
RSTA   'C:\DOCUME~1\P256477\LOCALS~1\Temp\ST_01000002.tmp'

NOTE   Specify the response variable(s)
RESP   'posstend'

NOTE   Response distribution, link function and denominator
RDIS 1 0
LFUN 0
DOFF 1 'cons'

NOTE   Specify the level identifier(s)
IDEN 2 'cntry'
IDEN 1 'id'

NOTE   Specify covariate(s) used anywhere in the model
ADDT   'cons'

NOTE   Specify level 2 random part covariate(s)
SETV 2 'cons'

NOTE   Set estimation method to be IGLS
METH 1

NOTE   Fit the model
STAR
BATC 1
NEXT
MONI 1
ITNU 0 b21
CONV b22

NOTE   Open the equations window
WSET 15 1
EXPA 3
ESTM 2
NOTE   ***********************************************************************

Thanks for your consideration.

Patrick
ChrisCharlton
Posts: 1355
Joined: Mon Oct 19, 2009 10:34 am

Re: "Unhandled exception"

Post by ChrisCharlton »

It sounds like MLwiN may not be able to allocate as much memory as it wants. One possible way to fix this would be to reduce the amount that it is trying to use by specifying the optimat option in mlwin_settings. Alternatively if you are using a 64-bit machine you could set your MLwiN global to point to the mlnscript.exe file in the x64 directory of MLwiN. This should allow MLwiN to use all the memory on your machine, at the cost of not having the GUI available.
Paatrick
Posts: 6
Joined: Thu Jun 27, 2013 6:08 pm

Re: "Unhandled exception"

Post by Paatrick »

Dear Chris, thank you very much, this indeed solves the problem. Also, thanks for pointing out the mlnscript.exe option. I was not yet aware of this possibility, but I have a strong feeling that this will make working with -runmlwin- easier.
Post Reply