Question: "mserver.exe has stopped working" on Windows 7 x64

I am working on a program to calculate steady-state probability in a given Markov chain. My code is pasted as bellow:

 
CalculateSteadyStateProbability := proc (m::integer, r::integer, CV, ROU) 
local P, solutions, pai, l, eqns; 
P := CalculateMatrix(m, r, CV, ROU);    #here we calculate a (m+r)x(m+r) transition martix
eqns := {`$`('pai[i+1] = add(pai[j+1]*P[j+1, i+1], j = 0 .. m+r)', i = 0 .. m+r)
              , add(pai[i+1], i = 0 .. m+r) = 1};#steady-state balance equations
solutions := solve(eqns, {`$`(pai[j+1], j = 0 .. m+r)}); 
assign(solutions); 
end proc
 
 

When m+r is small ( less than 300 ) the program works fine, but when m+r became large I've got some problem. When I run this program on a x32 machine, I got the "Insufficient Memory" error. So I transferred to a x64 machine (also with x64 Maple 16) with 8GB RAM. But every time the solving process went on for a while and then came up with a dialog showing "mserver.exe has stopped working".

My question is:

1. Can I optimize my code so that it can be performed on a x32 computer? I have used kernelopts(datalimit) command to enlarge the soft limit to 3GB and the hard limit is 4GB.

2. Why I got the error message showing "mserver.exe" ha stopped working on x64 platform?

Any help is appreciated!

 

 

Please Wait...