How to Compile PROPEP for 32 Bit Systems?

  • Thread starter jelanier
  • Start date
  • Tags
    Bit
In summary: However, the last section (shifting on second line) does not work. t seems like something is wrong with the local variable initialization.
  • #1
jelanier
67
1
I am trying to compile PROPEP for 32 bit systems. (Martin-Marietta FORTRAN program for chemical equilibrium)

It was originally written for IBM professional FORTRAN version 1.00

I can compile with the IBM 1.00, so I know my source code is valid.

I have tried G77 with loads of errors. Does anyone have any suggestions to try?

The 16 bit will not run on Win7 64. I have written a GUI for PROPEP and I would like to update the executable.

http://www.chemroc.com/programs/GDL_Propep120.zip

Thanks,

Jim
 
Last edited by a moderator:
Technology news on Phys.org
  • #2
Nope, it does not look to me like you are trying to update the executable, instead, it sounds like you are trying to re-compile it without having to bother updating it!

If you are going to use a more modern compiler than the one that was used originally...I think you'd better clean up those errors...I bet they are all very trivial given than Fortran is a very noble language and very backwards compatible...

...you just need to know Fortran, if you don't, get somebody who does...otherwise, you are going to find yourself asking question after question after question
 
  • #3
No, I meant what I said. I was trying to compile the same source code to a 32bit executable.

The question was if there was a backward compatible compiler. I have edited FORTRAN source before to change syntax or calls that are no longer valid. This is the case here with calls like:
CALL GETTIM (IHR,IMN,ISEC,IHUN). This is apparently no longer supported. I have edited it to remove those errors.

I am still having problems with the executable. This is a complex program and I don't want to re-write it.

here is the source:
www.chemroc.com/programs/pepsrc.zip

Thanks,

Jim
 
Last edited:
  • #4
Well, JANCREAT.FOR compiles just fine...and seems to run, too. It generates a file over 6000 lines long.

PROPEP.FOR as attached still has the gettim and getdat functions; once removed, this program compiles just fine, too. There seems to be a missing input file: setup.pep, though.

I am using g95 in mingw in Windows XP
 
  • #5
Interesting. I had the same experience with JANCREAT.FOR. It compiled just fine and created the JANNAF.DAF file. This was with G77 (MINGW)

I am having lots of problems with propep however. I changed the date/time issue, also had to add 2 characters to the read PEPCODED.DAT (I guess G77 didn't like the CR/LF)
I had to change some 'con' input/output...but still no joy.

This is a link to all the files needed to run propep.

www.chemroc.com/programs/propep16bit.zip

Place all these files in same folder. It includes the propep.exe 16bit.. Run propep.exe, the PRINT.TXT is the output file. The input file has already been made. (You can see why I created a VB GUI for this program as linked in my original post :) )

I am curious if your G95 compile works. You could just replace the propep.exe with your compiled version. I get an exit and error message after I hit enter.

Thanks,

Jim

gsal said:
Well, JANCREAT.FOR compiles just fine...and seems to run, too. It generates a file over 6000 lines long.

PROPEP.FOR as attached still has the gettim and getdat functions; once removed, this program compiles just fine, too. There seems to be a missing input file: setup.pep, though.

I am using g95 in mingw in Windows XP
 
  • #6
I GOT IT!

I am using G95 now. Lots of things had to be edited. (file I/O issues) It outputs with an extra space before each line now so I will have to change my parsing in GDL_propep..but that I can handle easily :)

I will be putting the new version of GDL_propep up on my website as soon as I am done with the parsing changes.

Thanks for the help

Jim
 
  • #7
I spoke too soon :(

The output file is bad in the last section. t has something to do with my use of 'CONIN$' and 'CONOUT$'

I can't figure it out yet.

my latest:

www.chemroc.com/programs/pep32.zip

Jim
 
Last edited by a moderator:
  • #8
Compiled latest propep.for provided...output file mostly the same as the one provided, except for the last section:
Code:
 **********PERFORMANCE:  FROZEN ON FIRST LINE, SHIFTING ON SECOND LINE**********

 IMPULSE   IS EX      T*      P*      C*    ISP*  OPT-EX  D-ISP      A*M   EX-T
 -1217.1  0.0000     15.********     1.0            0.00    9.0 -0.00019    36.
   325.5     NaN     NaN    1.00 41437.1     NaN    1.00  611.6  1.28820  2001.
 
  • #9
If this is an "old" program, I'll take a guess: find the compiler options to initialise all local variables to 0, allocate all variables in static storage instead of on the stack.

Neither of those is "standard Fortran" now, but there's a fair chance that's what your original IBM compiler did.
 
  • #10
Compiled with:

g95 -fzero -fstatic PROPEP.FOR

output seems to be o.k., now.

Code:
[SIZE="3"]1                   Run using June 1988 Version of PEP,
  Case  1 of  1      1 Jan 1901 at  1: 0: 1. 1 am

   CODE                                   WEIGHT    D-H  DENS      COMPOSITION
    137 AMMONIUM PERCHLORATE (AP)        690.000   -602  0.07040    1CL  4H   1N   4O 
     63 ALUMINUM (PURE CRYSTALINE)       160.000      0  0.09760    1AL
    541 IRON OXIDE                        10.000  -1230  0.18400    3O   2FE
    846 R45M                             140.000    -30  0.04330  667C 999H   5O 

 THE PROPELLANT DENSITY IS 0.06790 LB/CU-IN OR  1.8794 GM/CC
 THE TOTAL PROPELLANT WEIGHT IS 1000.0000 GRAMS

 NUMBER OF GRAM ATOMS OF EACH ELEMENT PRESENT IN INGREDIENTS

   38.862015 H    10.263423 C     5.872490 N    23.754751 O 
    5.930319 AL    5.872490 CL    0.125235 FE

 ****************************CHAMBER RESULTS FOLLOW    *****************************

  T(K)  T(F)  P(ATM)   P(PSI) ENTHALPY  ENTROPY   CP/CV     GAS   RT/V
 3314. 5507.   68.02  1000.00  -431.88  2286.95  1.1788 36.406    1.868
 
 SPECIFIC HEAT (MOLAR) OF GAS AND TOTAL=    9.493   12.158
 NUMBER MOLS GAS AND CONDENSED=  36.4060   2.8283

  11.99570 H2         9.80925 CO         5.10377 HCl        4.31460 H2O     
   2.93053 N2         2.82795 Al2O3*     0.96127 H          0.45132 CO2     
   0.27287 Cl         0.14655 HO         0.14592 AlCl       0.08655 FeCl2   
   0.05432 AlCl2      0.03639 AlOCl      0.03180 Fe         0.01129 AlHO2   
   0.01039 AlHO       0.00920 NO         0.00836 AlCl3      0.00688 O       
  4.00E-03 FeCl      3.06E-03 AlO       2.20E-03 Al        1.48E-03 FeO     
  1.08E-03 FeH2O2    1.00E-03 CHO       9.77E-04 O2        7.85E-04 Al2O    
  7.81E-04 NH3       5.72E-04 Cl2       5.32E-04 CNH       5.11E-04 AlH     
  3.91E-04 COCl      2.22E-04 NH2       1.37E-04 HOCl      1.23E-04 CH2O    
  1.09E-04 N         9.44E-05 OCl       7.68E-05 NH        7.16E-05 FeCl3   
  6.58E-05 Al2O2     3.24E-05 CNHO      2.06E-05 NHO       1.90E-05 AlO2    
  1.43E-05 HO2     

 THE MOLECULAR WEIGHT OF THE MIXTURE IS   25.488

 ****************************EXHAUST RESULTS FOLLOW    *****************************

  T(K)  T(F)  P(ATM)   P(PSI) ENTHALPY  ENTROPY   CP/CV     GAS   RT/V
 2001. 3142.    1.00    14.69 -1217.09  2286.95  1.2043 35.590    0.028
 
 SPECIFIC HEAT (MOLAR) OF GAS AND TOTAL=    8.988   10.812
 NUMBER MOLS GAS AND CONDENSED=  35.5902   2.9652

  12.66665 H2         9.60784 CO         5.61067 HCl        3.94054 H2O     
   2.96481 Al2O3&     2.93596 N2         0.65476 CO2        0.12434 FeCl2   
   0.03489 H          0.01147 Cl         0.00111 HO         0.00052 Fe      
  1.70E-04 AlCl3     7.91E-05 AlCl2     7.14E-05 AlCl      4.96E-05 FeCl    
  4.45E-05 NH3       4.15E-05 FeH2O2    3.40E-05 AlOCl     2.00E-05 FeCl3   
  1.86E-05 NO      

 THE MOLECULAR WEIGHT OF THE MIXTURE IS   25.937

 **********PERFORMANCE:  FROZEN ON FIRST LINE, SHIFTING ON SECOND LINE**********

 IMPULSE   IS EX      T*      P*      C*    ISP*  OPT-EX  D-ISP      A*M   EX-T
   254.3  1.1857   3033.   38.59  5079.9            9.13  478.0  0.15792  1711.
   261.4  1.1550   3089.   39.00  5128.8   197.3   10.06  491.3  0.15944  2001.[/SIZE]
 
  • #11
gsal said:
output seems to be o.k., now.
Code:
[SIZE="3"]1                   Run using June 1988 Version of PEP,
  Case  1 of  1      1 Jan 1901 at  1: 0: 1. 1 am[/size]

Except that it's not Y2K compliant! :smile:
 
  • #12
I have it uploaded to my website with GUI. I see you re-compiled also :)

The time/date I need to fix. I did a quick fix that will not work. I was just trying to get past the easy stuff.

I used:

g95 -fstatic propep.for -o propep.exe

Anyway, you can try it from

www.chemroc.com

Thanks everyone,

Jim
 
  • #13
Here is my latest source code and associated files. Don't laugh at what I did to the time/date stuff. I will fix it. (You will probably beat me :) )

http://www.chemroc.com/programs/propep32.zip

I also included a batch file that runs the compile.

Thanks,

Jim
 
  • #14
OK, I fixed the time with the newer syntax. It seems OK now. Thanks for the help guys...

My new version with GUI is @ www.chemroc.com

This is what I did to fix the time:

*************************************************************************
ORIGINAL FORTRAN IBM VERSION 1.00
*************************************************************************

SUBROUTINE DATETIME (TODAY,CURTIM)
INTEGER*2 IDAY,IMO,IYR,IHR,IMN,ISEC,IHUN
CHARACTER*3 MONTH(12)
CHARACTER*2 IAM,IPM,IAMPM
CHARACTER*11 TODAY
CHARACTER*14 CURTIM
DATA MONTH /3HJan,3HFeb,3HMar,3HApr,3HMay,3HJun,3HJul,3HAug,
1 3HSep,3HOct,3HNov,3HDec/, IAM /2HAm/,IPM /2HPm/
C CALL ROUTINES FOR DATE AND TIME
IAM='am'
IPM='pm'
CALL GETTIM (IHR,IMN,ISEC,IHUN)
IAMPM = IAM
IF (IHR.LT.12) GO TO 10
IHR=IHR-12
IAMPM=IPM
10 CALL GETDAT (IYR,IMO,IDAY)
IF (IYR.LT.1000) IYR=IYR+1900
IF (IHR.EQ.0.AND.IAMPM.EQ.IPM) IHR=12
WRITE (CURTIM,1) IHR,IMN,ISEC,IHUN,IAMPM
WRITE (TODAY,2) IDAY,MONTH(IMO),IYR
RETURN
1 FORMAT (i2,':',i2,':',i2,'.',i2,' ',A2)
2 FORMAT (I2,' ',A3,' ',I4)
END

*********************************************************************
EDITED FOR G95 COMPILER
*********************************************************************
SUBROUTINE DATETIME (TODAY,CURTIM)
INTEGER*2 IDAY,IMO,IYR,IHR,IMN,ISEC,IHUN
integer,dimension(8) :: values
CHARACTER*3 MONTH(12)
CHARACTER*2 IAM,IPM,IAMPM
CHARACTER*11 TODAY
CHARACTER*14 CURTIM
DATA MONTH /3HJan,3HFeb,3HMar,3HApr,3HMay,3HJun,3HJul,3HAug,
1 3HSep,3HOct,3HNov,3HDec/, IAM /2HAm/,IPM /2HPm/
C CALL ROUTINES FOR DATE AND TIME
CALL DATE_AND_TIME(VALUES=VALUES)
IAM='am'
IPM='pm'
IHR=VALUES(5)
IMIN=VALUES(6)
ISEC=VALUES(7)
IHUN=VALUES(8)
IHUN=IHUN/10
IAMPM = IAM
IF (IHR.LT.12) GO TO 10
IHR=IHR-12
IAMPM=IPM
10 IYR=VALUES(1)
IMO=VALUES(2)
IDAY=VALUES(3)
IF (IYR.LT.1000) IYR=IYR+1900
IF (IHR.EQ.0.AND.IAMPM.EQ.IPM) IHR=12
WRITE (CURTIM,1) IHR,IMIN,ISEC,IHUN,IAMPM
WRITE (TODAY,2) IDAY,MONTH(IMO),IYR
RETURN
1 FORMAT (i2,':',i2,':',i2,'.',i2,' ',A2)
2 FORMAT (I2,' ',A3,' ',I4)
END

*********************************************************************

*********************************************************************
 
  • #15
Even uglier when editing for G77. It works, but I'll bet there is an easier way.
FORTRAN is not my native language, but I can eventually find my way around :)

Jim


*********************************************************
TIME DATE Section Edited for G77
*********************************************************
SUBROUTINE DATETIME (TODAY,CURTIM)
CHARACTER(LEN = 8) :: DateINFO ! ccyymmdd
CHARACTER(LEN = 4) :: cYR, cMO*2, cDay*2,cHUN*2
CHARACTER(LEN = 10) :: TimeINFO ! hhmmss.sss
CHARACTER(LEN = 2) :: cHR, cMIN, cSEC*6
CHARACTER*3 MONTH(12)
CHARACTER*2 IAM,IPM,IAMPM
CHARACTER*11 TODAY
CHARACTER*14 CURTIM
INTEGER*4 IDAY,IMO,IYR,IHR,IMIN,ISEC,IHUN
DATA MONTH /3HJan,3HFeb,3HMar,3HApr,3HMay,3HJun,3HJul,3HAug,
1 3HSep,3HOct,3HNov,3HDec/, IAM /2HAm/,IPM /2HPm/
C CALL ROUTINES FOR DATE AND TIME
CALL DATE_AND_TIME(DateINFO, TimeINFO)
IAM='am'
IPM='pm'
cHR=TimeINFO(1:2)
read (cHR,'(I2)') IHR
cMIN=TimeINFO(3:4)
read (cMIN,'(I2)') IMIN
cSEC=TimeINFO(5:6)
read (cSEC,'(I2)') ISEC
cHUN=TimeINFO(8:9)
read (cHUN,'(I2)') IHUN
IAMPM = IAM
IF (IHR.LT.12) GO TO 10
IHR=IHR-12
IAMPM=IPM
10 cYR=DateINFO(1:4)
read (cYR,'(I4)') IYR
cMO=DateINFO(5:6)
read (cMO,'(I2)') IMO
cDAY=DateINFO(7:8)
read (cDAY,'(I2)') IDAY
IF (IYR.LT.1000) IYR=IYR+1900
IF (IHR.EQ.0.AND.IAMPM.EQ.IPM) IHR=12
WRITE (CURTIM,1) IHR,IMIN,ISEC,IHUN,IAMPM
WRITE (TODAY,2) IDAY,MONTH(IMO),IYR
RETURN
1 FORMAT (i2,':',i2,':',i2,'.',i2,' ',A2)
2 FORMAT (I2,' ',A3,' ',I4)
END
 

FAQ: How to Compile PROPEP for 32 Bit Systems?

1. What is PROPEP and why is it important to compile it to 32 bit?

PROPEP is a computer program used in the field of rocket propulsion to calculate the performance of solid rocket motors. It is important to compile it to 32 bit in order to ensure compatibility with older systems and to allow for the use of larger memory spaces.

2. How do I compile PROPEP to 32 bit?

The process of compiling PROPEP to 32 bit will vary depending on the operating system and programming language used. Generally, it involves setting specific compiler options and flags to specify the desired output.

3. Can PROPEP still be used if it is not compiled to 32 bit?

Yes, PROPEP can still be used if it is not compiled to 32 bit. However, it may not be compatible with older systems and may have limitations in memory usage.

4. Are there any advantages to compiling PROPEP to 32 bit?

One advantage of compiling PROPEP to 32 bit is that it allows for the use of larger memory spaces, which can be beneficial for complex simulations and calculations. Additionally, it ensures compatibility with older systems.

5. Is there any support available for compiling PROPEP to 32 bit?

Yes, there may be support available from the developer of PROPEP or from online forums and communities. It is recommended to consult the program's documentation or reach out to other users for assistance with compiling to 32 bit.

Similar threads

Replies
10
Views
4K
Replies
5
Views
1K
Replies
4
Views
14K
Replies
2
Views
3K
Replies
13
Views
4K
Replies
5
Views
3K
Replies
37
Views
5K
Replies
1
Views
3K
Back
Top