| Engineer Guy 2006-01-10, 3:16 pm |
| I am not a programmer. I am simply trying to compile and run a Fortran code that I want to use to do 3-D fluid flow modeling. The code is from the DOE, and it compiles on my windows NT PC, but then doesn't do anything when run, except sit there and make my PC work slower, until I get a stack overflow problem.
I think the problem is that one section of the code is a subroutine that starts:
subroutine dattim (iopt,cpu,alph)
C**
include 'com.facts'
C**
C** THIS SUBROUTINE CONTAINS MACHINE DEPENDENT
C** REFERENCES TO SYSTEM-SPECIFIC DATE, TIME, AND
C** ELAPSED CPU ROUTINES
C**
C** MODIFY AS NEEDED FOR THE COMPUTER SYSTEM IN USE.
There are codes for computers like Cray, IBM 3090, Apollo, and Sun, but not windows. The Sun version of the code is:
dimension alph(3)
character*4 alph,year
character*24 date
character*8 dummy
real*4 etime,cpu1,carray(2)
integer tarray(3)
C**
go to (100,200,300),iopt
C**
C** DATE
C**
100 continue
call idate(tarray)
write (year,'(i4)') tarray(3)
write (dummy,1) tarray(1),tarray(2),year(3:4)
1 format (i2,'/',i2,'/',a2)
alph(1)=dummy(1:4)
alph(2)=dummy(5:8)
alph(3) = ' '
go to 999
C**
C** TIME
C**
200 continue
call fdate(date)
alph(1)=date(12:15)
alph(2)=date(16:19)
alph(3) = ' '
go to 999
C**
C** ELAPSED CPU TIME
C**
300 continue
cpu1 = etime(carray)
cpu = cpu1
go to 999
999 continue
end
My questions:
- Is this likely the reason that my code isn't running well?
- How would I go about modifying this for a Windows NT OS? |