views:

90

answers:

2

Hi ,

I have a Fortran 77 program code , I am using fortran power station 4.0 on XP .

I wrote this program because I am studying Master's degree in Mechanics , 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 :

A- 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

B- 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

C- 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

D- 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 order 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 to be honest , 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 ?? please consider me as a very simple programmer.

I will really appreciate that .

Thanks in Advance

Ghazooo

A: 

From the link you provided:

There are three different ways to resolve these problems:

  • Reorder the structure. Putting small items first often eliminates both errors. -or-

  • Use one-character-long member names. -or-

  • Recompile without -Zi.

If you're compiling with the -Zi parameter, take the parameter off.

If that doesn't work, reorder the structure. That means putting the smaller individual INTEGER, FLOAT, etc. elements towards the front of the program, followed by the Array declarations.

If that doesn't work, your program is too large for Fortran power station.

Gilbert Le Blanc
@ GilbertThank you for your answer.well , I read the solution from MS ... but I do not know how to change the settings for the Zi Parameter !! . Please note the changes I have made in my question. I added the basic parts of programs.Can you pleaes give me your notes on it , and tell me what I have to change?Thanks In advance
Ghazooo
You have to compile all of your subroutines at the same time you compile your main program? Can you compile your subroutines separate from your main program?
Gilbert Le Blanc
No , I can not compile the Subroutines separately . I have to compile the main program and subroutines at the same time . I think this is one of F77 standards. Did you fine something wrong in the structure ??? How I can change the Zi option ??
Ghazooo
The FORTRAN77 standard certainly does not require you to compile the program and subroutines in one go. I do not understand why you think you cannot compile the subroutines separately -- is this a limitation of imposed by your lack of knowledge or by some quirk of the old compiler you are using ?
High Performance Mark
I want to compile the the Main program and the subroutines at one time because they are all in one page !!! I do not know how to compile separately !! anyway , Is this effect our main problem of the F1002 error ?
Ghazooo
Typically you can place the main program and subroutines in different files and compile them separately, then in an additional step link them into an executable. I don't know about MS PowerStation. Perhaps this will allow your program to compile.-Zi is a setting on your compiler. Look for settings or options or menus. Do you have any documentation?
M. S. B.
@M.S.B. ... well , I think I have have some lake in knowledge, I am Mechanics engineer , not a computer one.....I do not know how to seperate the subroutines and linking them to the main program, don't know the code ..... No , I do not have any document about the FPS !! all my information is from the help of the program ... can you help me plz ??
Ghazooo
+1  A: 

There is only so much help that can be given over the internet. And only so much that can be done with an outdated product (MS Fortran Power Station) for which you lack the documentation. I have several suggestions. Get a modern compiler. With your computer experience, and since you are using MS Windows, you would probably do best with a commercial product such as Intel Visual Fortran Compiler for Windows. There may be an educational discount. There is probably a trial download (timed demo). If you still have difficulties (installing, compiling your program, etc.), offer some money to a undergraduate who is good with computers to help you for a couple of hours. I also suggest learning Fortran 95. You can gradually switch from FORTRAN 77 to Fortran 95 since the languages are compatible. Fortran 95 is a more capable language. It also has features that better allow compilers to find programmer mistakes, speeding the development process.

M. S. B.