Replies: 2 comments 1 reply
-
Could you provide a minimal code example here, i.e. a |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sure, below I'm attaching
c sample of code to show compilation problems
c
implicit real*8(a-h,o-z)
dimension phase(50)
CHARACTER*20 filen
parameter (ndim1=3800,nd2=36)
real data(ndim1,nd2)
character*80 inpim, outim, errmsg
integer ncols, nlines
integer ier, axlen(7), naxis, pixtype, nargs
nphas=nd2
c --- Get command line arguments.
call clnarg (nargs)
if (nargs .eq. 2) then
call clargc (1, inpim, ier)
if (ier .ne. 0) goto 91
call clargc (2, outim, ier)
if (ier .ne. 0) goto 91
else
write (*, '('' input image :'',$)')
read (*,'(a)') inpim
write (*, '('' output file:'',$)')
read (*,'(a)') outim
endif
c --- Open images
call imopen (inpim, 3, ninp, ier)
if (ier .ne. 0) goto 91
c --- Determine the size and pixel type of the input image.
call imgsiz (ninp, axlen, naxis, pixtype, ier)
if (ier .ne. 0) goto 91
ncols = axlen(1)
nlines = axlen(2)
write(*,*)'Image size is ', ncols,nlines
c --- load image:
do 50 j=1,nlines
call imgl2r(ninp, data(1,j),j, ier)
50 continue
goto 92
c -- Error actions.
91 call imemsg (ier, errmsg)
write (*, '('' Error: '', a80)') errmsg
stop 'at error'
c --- Clean up.
99 call imclos (ninp, ier)
if (ier .ne. 0) goto 91
stop 'at end'
92 continue
c ... etc. ...
write(*,*)"phases file:"
read(*,*) filen
open(11,file=filen)
read(11,*,end=1000,err=1000)(phase(i),i=1,Nphas)
goto 1001
1000 Nphas=i-1
1001 close(11)
goto 99
end |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to compile old (F77) codes with IRAF 2.17.1 (Ubuntu 22.04), getting all kinds of problems.
Searching on this forum, I found this discussion
When I tried @jeromeorosz way, outside of IRAF, using @olebole hint to promote integer 4 to 8, namely
gfortran -std=legacy -fdefault-integer-8 correl.f spectrum.f libimfort.a libsys.a libvops.a libos.a libf2c.a
I got:
Trying it inside IRAF,
xc
on Fortran sources fails weirdly on all OPEN/CLOSE statements (I'm adding the lines as comments toxc
errrors:And simalrly for the second file. Needless to say, Google search on "p1_const: bad constant type '1'" does not return any results. Is it really so that no I/O on external files (other than images opened via IRAF) is allowed?
Interestingly, when I converted both files with
f2c
outside IRAF, I was able to compile and link withxc
:but I have yet to check if the executable works properly.
Beta Was this translation helpful? Give feedback.
All reactions