- #1
selmayda
- 9
- 0
Hello everyone ;
I have tried to run a program which has many subrotines so I control each of them.But, when I run one of them, the below error message is seen;
/tmp/ccMqKR9L.o: In function `MAIN__':
getg0.f:(.text+0x73c): undefined reference to `readin_'
collect2: ld returned 1 exit status
subroutine readin is used to read some constant from an infile (5,*) . the other subroutine getg0.f use some constants from infile to calculate g.For example;
in getg0:
do 346 id = 1,Nd
mi(id) = 1.d0 / ( dexp ( ( Ed(id) / 2.d0 ) / T ) + 1.d0 )
346 continue
and Ed(id) values are readin from infile via readin.f.
readin.f
read(5,*) UU(1), UU(2), UU(3), UU(4), UU(5)
read(5,*) Ed(1), Ed(2), Ed(3), Ed(4), Ed(5)
infile
1.d0, 2.d0, 3.d0, 4.d0, 1d0
-7.24068, -5.32445, -6.63223, -6.40883, -7.66001
readin following
UU(1), UU(2), UU(3), UU(4), UU(5)
Ed(1), Ed(2), Ed(3), Ed(4), Ed(5)
can everyone help me about this error?
Thanks a lot
I have tried to run a program which has many subrotines so I control each of them.But, when I run one of them, the below error message is seen;
/tmp/ccMqKR9L.o: In function `MAIN__':
getg0.f:(.text+0x73c): undefined reference to `readin_'
collect2: ld returned 1 exit status
subroutine readin is used to read some constant from an infile (5,*) . the other subroutine getg0.f use some constants from infile to calculate g.For example;
in getg0:
do 346 id = 1,Nd
mi(id) = 1.d0 / ( dexp ( ( Ed(id) / 2.d0 ) / T ) + 1.d0 )
346 continue
and Ed(id) values are readin from infile via readin.f.
readin.f
read(5,*) UU(1), UU(2), UU(3), UU(4), UU(5)
read(5,*) Ed(1), Ed(2), Ed(3), Ed(4), Ed(5)
infile
1.d0, 2.d0, 3.d0, 4.d0, 1d0
-7.24068, -5.32445, -6.63223, -6.40883, -7.66001
readin following
UU(1), UU(2), UU(3), UU(4), UU(5)
Ed(1), Ed(2), Ed(3), Ed(4), Ed(5)
can everyone help me about this error?
Thanks a lot
Last edited: