When I use assumed size arrays instead of adjustable size, it works, no idea why! So if I use: real:: x(:,:) Instead of real:: x(n,n) It runs fine. Scott.