Fortran
Aristides Kontogeorgis
kontogar at tem.uoc.gr
Mon Nov 19 16:35:01 EET 2001
On Δευ, 2001-11-19 at 15:39, Manolis Doxastakis wrote:
>
> Hrhsimopoiw FORTRAN synexeia se polles platformes kai
> safws exw treksei toso sthn Powerstation oso kai sthn Digital
> gia Windows alla kai sto Linux, omws
> den exw plhrofories apo to mail poio einai to problhma sas....
>
> Mhpws o kwdikas einai Fortran 90 kai oxi Fortran 77 ?
> Giati o g77 einai Fortran 77 compiler kai oxi Fortran 90...
> P.X. an mhdenizeis thn array A(70) me : A = 0.d0 ayto
> safws kai den ginetai sthn Fortran 77 opws kai PARA polla alla..
>
> Perissoteres plhrofories gia to problhma ?
>
>
> Manolis
>
Kanw gia ligo ton proxy server :-)
>>Exei dikio o filos mas. Pes tou oti eimaste asxetoi ... apla
>>0eloume va ma0oume pws va douleuoume kai va eimaste compatible.
>>Sou stelvw attached eva syvvnmevo. Av 0eleis pes tou oti to problnma
>>to
>>exw egw opote isws va mporouse va me bon0nsei (av 0elei) me proswpika
>>myvnmata. (atsol at iris.math.aegean.gr)
>>Eyxaristw,
>>AT
>>Yparxouv dyo pragmata pou xtypave. Mallov apaitouv tis IMSL (isws) kai
>>tnv portlib. Isws 0a mporouse va mas bon0nsei sto pws to apofeygoume
>>n' va mas ypodeiksei kapoio documentation.
>>to programma poy xtypaei
INTEGER NVARIATES
OPEN(9,FILE='RESULTS.TXT')
NVARIATES=10**6
WRITE (9,100) NVARIATES
100 FORMAT (' NVARIATES =',I10)
CALL SUBR2(1,0.5,NVARIATES)
STOP
END
C ****************************************
SUBROUTINE SUBR1(N,NVARIATES,A,K)
REAL A(K)
INTEGER J
DO J=1,K
CALL SUBR2(N,A(J),NVARIATES)
END DO
END
C *****************************************
C ******************************************
SUBROUTINE SUBR2(N,A,NVARIATES)
REAL MODE
INTEGER J
MODE=(SQRT(REAL(N)**2+A**2)-REAL(N))/2
PRINT *,N,A,MODE
WRITE (9,150) N,A,MODE
DO J=1,10
PRINT *,J
CALL SCHEMES(N,A,NVARIATES)
END DO
150 FORMAT (' N =',I4,' a =',F6.2,' Mode = Clos.Int.to',F10.4)
END
SUBROUTINE SCHEMES(N,A,NVARIATES)
REAL
RN,MODE,L,L11,L12,L21,L22,T1,T2,RATIO,U(1),CS1TIME,CS2TIME,RSTIME
INTEGER I,COUNT,DIF,X1(1),X2(1),Y
RN=REAL(N)
C ********* CS2 *************************
COUNT=0
T1=TIMEF()
DO WHILE (COUNT.LT.NVARIATES)
DIF=-1
DO WHILE (DIF.NE.N)
CALL RNPOI(1,A/2,X1)
CALL RNPOI(1,A/2,X2)
DIF=ABS(X1(1)-X2(1))
END DO
Y=MIN(X1(1),X2(1))
COUNT=COUNT+1
END DO
T2=TIMEF()
CS2TIME=T2-T1
C ***************************************
C *******************************************
WRITE (9,200) CS2TIME
C ***************************************
200 FORMAT (F10.2,F10.2,F10.2)
END
--
Aristides Kontogeorgis Αριστείδης Κοντογεώργης
University Of Crete Πανεπιστήμιο Κρήτης
Department of Applied Mathematics Τμήμα Εφαρμοσμένων Μαθηματηκών
Heraklion 71409 Ηράκλειο 71409
kontogar at tem.uoc.gr
http://www.tem.uoc.gr/~kontogar
More information about the Linux-greek-users
mailing list