forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Attempt to call a routine with argument number seven as a re

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato
View previous topic :: View next topic  
Author Message
oggyogg
Guest





PostPosted: Wed Jul 08, 2015 12:16 am    Post subject: Attempt to call a routine with argument number seven as a re Reply with quote

i compile my prgram then i had this error:

Runtime error from program:c:\users\ogchm\desktop\passfem\passfem.exe
Run-time Error
Attempt to call a routine with argument number seven as a real(kind=2) when an integer(kind=3) was required

PASSIN - in file passfem.for at line 237 [+0252]

main - in file passfem.for at line 71 [+0eee]




here there is my Program:

C ******************************************************************
C * *
C * PASSFEM *
C * *
C * Program for Analysis of Structural Systems *
C * *
C * by *
C * Finite Element Method *
C * *
C ******************************************************************
C****************************************************************************
C MAIN ROUTINE OF THE PROGRAM PASSFEM
C****************************************************************************
C
IMPLICIT REAL*8(A-H,O-Z)
REAL*4 S1,S2,S3,S4,S5,S6,S7,S8,SS1,SS2,SS3,SS4
INTEGER CHT
COMMON/DIM/N1,N2,N3,N4,N5,N6,N7,N8,N9,N10,N11,N12,N13,N14
COMMON/PAR/IND,NET,NSN,NMP,NEQ,NSKY,NEQ1,LCOUNT
COMMON/TAPES/ISTRES,NDARAY,IPR
COMMON/PRECI/ITWO
COMMON/MULT/ELMN
COMMON/ELEM/NDEL(1000)
COMMON/ELOAD/M1,M2,AA1,AA2,AA3,AA4,NSLC,NUM
DIMENSION SS1(10),SS2(10),SS3(10),SS4(10)
DIMENSION LLIB(7,3),NLN(10),TITLE(20),ELM(10)
CHARACTER*15 INFILE,OUTFILE
C
C THE FOLLOWING TWO CARDS ARE USED TO DETERMINE THE MAIN STORAGE THAT CAN BE USED FOR SOLUTION.
C TO CHANGE THE MAIN STORAGE AVAILABLE FOR EXECUTION,CHANGE THE VALUE OF MTOT AND CORRESPONDINGLY COMMON A (MTOT)
DIMENSION A(90 0000)
MTOT=900000

C
ITWO=1
C
C THE FOLLOWING SCRATCH FILES ARE USED
C ISTRES=FILE STORING STRESS DISPLACEMENT MATRIX
C NDARAY=FILE STORING ND ARRAY
ISTRES=1
NDARAY=2
C

OPEN(5,FILE='oggy.dat',FORM='FORMATTED',STATUS='OLD',RECL=80)
OPEN(1,STATUS='SCRATCH',FORM='UNFORMATTED')
OPEN(2,STATUS='SCRATCH',FORM='UNFORMATTED')
OPEN(6,FILE='ok.dat',FORM='FORMATTED',STATUS='new',RECL=132)
C
C READ AND PRINT STRUCTURE DATA
100 READ(5,55)(TITLE(I),I=1,20)
READ(5,11) NSN,NET,NMP,NLC,NEDMAX,MODEX
IF(NSN.EQ.0) STOP
READ(5,12) IPR
WRITE(6,66)(TITLE(I),I=1,20)
WRITE(6,22) NSN,NET,NMP,NLC
N1=1
N2=N1+6*NSN
N3=N2+NSN*ITWO
N4=N3+NSN*ITWO
N5=N4+NSN*ITWO
IF(N5.GT.MTOT) CALL ERROR(N5-MTOT,1)
IF(N5.GT.MTOT) STOP
N6=N5+NMP*ITWO
N7=N6+NMP*ITWO
N8=N7+NMP*ITWO
CALL PASSIN (A(N2),A(N3),A(N4),A(N5),
*A(N6),A(N7),A(N1),NSN,NMP,NEQ)
write(6,*) N1,N2,N3,N4,N5,N6,N7,N8
22 FORMAT(53X,'NUMBER OF STRUCTURE NODES....',I4/53X,'NUMBER
* OF ELEMENT TYPE......',I4/53X,
* 'NUMBER OF MATERIAL GROUPS....',I4/53X,'NUMBER
* OF LOADING CONDITIONS.',I3//)
11 FORMAT(6I5)
12 FORMAT(I5)
55 FORMAT(20A4)
66 FORMAT(130('*')//27X,20A4//59X,'STRUCTURE DATA',/)
end

SUBROUTINE PASSIN(X,Y,Z,E,PR,WD,NDF,NSN,NMP,NEQ)
IMPLICIT REAL*8(A-H,O-Z)
COMMON/PRECI/ITWO
COMMON/TAPES/ISTRES,NDARAY,IPR
DIMENSION X(NSN),Y(NSN),Z(NSN),E(NMP),PR(NMP),WD(NMP)
DIMENSION NDF(6,NSN),JF(6)
DIMENSION NCYLT(1000)
FLOAT(I)=DBLE(I)
MN=0
C
100 READ(5,33)NN,(JF(I),I=1,6),X(NN),Y(NN),Z(NN),
*NI,NCYL
NCYLT(NN)=NCYL
N=MN+NI
MN=MN+1
110 DO 120 I=1,6
NDF(I,NN)=JF(I)
120 CONTINUE
IF (NI.EQ.0) GO TO 130
IF(NN-MN)130,125,140
125 CONTINUE
IF(NSN-NN)170,170,100
130 MN=NN
GO TO 125
C
C AUTOMATIC GENERATION OF NODAL
Back to top
mecej4



Joined: 31 Oct 2006
Posts: 732

PostPosted: Wed Jul 08, 2015 12:48 am    Post subject: Reply with quote

This is not the appropriate forum for Fortran questions that are unrelated to the Plato Editor/IDE.

The source code fragment that you posted (did you notice that most of it got cut off, because this forum imposes a limit on message size?) is enough to show that the code is written in an obsolete style of Fortran, namely, Fortran-IV. It contains statements that will not survive type and subscript checking. In particular, the seventh actual argument to subroutine PASSIN is a section of a REAL array, whereas the corresponding dummy argument is an INTEGER array.

The code may work if you compile without using any checking options such as /CHECK. You may also need to use options such as /SAVE and /ZERO.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 558

PostPosted: Wed Jul 08, 2015 10:23 am    Post subject: Reply with quote

I object to the term 'obsolete style of Fortran' !!! :O)

I also consider that if a compiler is backwards compatible it should also be with regard to any checking !
Maybe with suitable extra message sayng exactly what you have said above for example mecej4 would be sufficient to get the user to compile without checking for 'OLDER style code'
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group