I have a FORTRAN 77 program code. I am using Fortran Power Station 4.0 on Windows. It is a very long Finite element method code.

The code is the following :

---

1 Main Program starts with

```
PARAMETER (HLENGTH=600.0,VLENGTH=600.0,NHELE=6,NVELE=6,NTYPE=1) 
PARAMETER (DENSITY=2.78E-6,POISON=0.34,THICK=1.0,EMODULE=6.87E4)
PARAMETER (NTOTALNODE=(NHELE+1)*(NVELE+1))                  
PARAMETER (NHNODE=NHELE+1,NVNODE=NVELE+1)                   
PARAMETER (MK=(NTOTALNODE-2*NHNODE-2*(NVNODE-2))*5)      
PARAMETER (DELTAH=(HLENGTH+0.0)/(NHELE+0.0))
PARAMETER (DELTAV=(VLENGTH+0.0)/(NVELE+0.0)) 

DIMENSION NODEMATRIX(NTOTALELE,4)                           
REAL*8    STIFFMATRIX(20,20),MASSMATRIX(20,20)
REAL*8    STIFFMATRIXS(20,20),MASSMATRIXS(20,20)
DIMENSION NODEROWT(4),NODEROWT2(20)     
DIMENSION NM(NVNODE,NHNODE)                                                
REAL*8 GSM(NTOTALNODE*5,NTOTALNODE*5),NCARRIER(MK),
      &GMM(NTOTALNODE*5,NTOTALNODE*5),AA(MK,MK),BB(MK,MK)

CALL STIFFMAT(STIFFMATRIX,DELTAV,DELTAH,THICK,EMODULE)
CALL MASSMAT(MASSMATRIX,DELTAV,DELTAH,THICK,DENSITY)
CALL STIFFMATS(STIFFMATRIXS,DELTAV,DELTAH)
CALL MASSMATS(MASSMATRIXS,DELTAV,DELTAH,DENSITY)
.
.
.
. etc

```

2 - The Subroutins are starts as following:

```
SUBROUTINE STIFFMAT(STIFFMATRIX,DELTAV,DELTAH,THICK,EMODULE)

   REAL*8 STIFFMATRIX(20,20),B(6,20),BT(20,6),D(6,6)

   REAL*8 CC(5),ZETAM(5),ETAM(5),CA,CB,ZETA,ETA,SUM,SUM2,SUM3

   .
   .
   .etc

SUBROUTINE MASSMAT(MASSMATRIX,DELTAV,DELTAH,THICK,DENSITY)

   REAL*8 MASSMATRIX(20,20),B(5,20),BT(20,5),D(5,5)

   REAL*8 CC(5),ZETAM(5),ETAM(5),CA,CB,ZETA,ETA,SUM,SUM2,SUM3

   .
   .
   .etc

SUBROUTINE MASSMATS(MASSMATRIXS,DELTAV,DELTAH,DENSITY)

   REAL*8 MASSMATRIXS(20,20),B(5,20),BT(20,5),D(5,5),IS,JS,AS

   REAL*8 CC(5),ZETAM(5),CA,ZETA,ETA,SUM,SUM2,SUM3

   .
   .
   .etc

SUBROUTINE STIFFMATS(STIFFMATRIXS,DELTAV,DELTAH)

   REAL*8 STIFFMATRIXS(20,20),B(3,20),BT(20,3),D(3,3)

   REAL*8 CC(5),ZETAM(5),CA,ZETA,ETA,SUM,SUM2,SUM3

   .
   .
   .etc

```

When I press the compile command it shows me the following message :

> 
> fatal error F1002: compiler is out of heap space in pass 2
> 
> 
> 

I Googled the problem, and found the [following solutions](http://www.microsofttranslator.com/BV.aspx?ref=CSSKB&from=en&to=ar&a=http://support.microsoft.com/kb/112345/en-us?fr=1)

But I did not understand the solution! 

I do not know how to change the `Zi` option, where I can find it?

I think my code is good and clear. Does any one have any suggestions to solve this problem?