Code Comments
Programming Forum and web based access to our favorite programming groups.Given this code: do i=1,ntrax write(*,'(10f8.2)') . ((blobs(track(i)%lpts(j))%rx , . blobs(track(i)%lpts(j))%ry), . j=1,track(i)%numpts) enddo I get this error with gfortran (cygwin under WinXP Pro): $ /usr/local/gcc-4_1/bin/gfortran -ffixed-form hough3.f90 In file hough3.f90:257 . ((blobs(track(i)%lpts(j))%rx , 1 Error: Expected a right parenthesis in expression at (1) Have I hit a subtle extension of the standard (the code used to compile on an Alpha UNIX box with F95 compiler) or is gfortran wrong? Last time I tried a beta version of one of the f95 compilers (can't remember which now) it also flagged this as an error. Frankly I can't see anything wrong myself but I would say that, wouldn't I? Later: Ah, I think I see what it might be complaining about. Changing to do i=1,ntrax write(*,'(10f8.2)') . (blobs(track(i)%lpts(j))%rx , . blobs(track(i)%lpts(j))%ry, . j=1,track(i)%numpts) enddo the error message disappears, but then it seems I have an installation error: $ /usr/local/gcc-4_1/bin/gfortran -ffixed-form hough3.f90 /cygdrive/c/DOCUME~1/Ivan/LOCALS~1/Temp/cc5qvAD3.o:hough3.f90:(.text+0x4457) : undefined reference to `_sppsv_' /cygdrive/c/DOCUME~1/Ivan/LOCALS~1/Temp/cc5qvAD3.o:hough3.f90:(.text+0x44f9) : undefined reference to `_sgesv_' collect2: ld returned 1 exit status The original question still stands. Relevant declarations (I hope...): [Full code at http://ireid.home.cern.ch/ireid/hough3.f90 ] === module pathdefs implicit none integer, parameter:: maxlines=16, maxsegs=32, maxtrax=5000 integer, parameter:: nblobs=2500 type point !Basic unit - centre of a detected grain integer :: x,y,z !co-ordinates in pixels/planes real :: rx,ry,rz !co-ordinates in microns end type type cluster !Agglomeration of points into a possible track real :: vxi(maxsegs),vyi(maxsegs) !individual distances to fit integer :: lpts(maxsegs) !point numbers integer :: xt,xb,yt,yb !initial top & bottom coordinates integer :: numpts !number of points in cluster real :: ax,bx,cx,ay,by,cy,vx,vy !quadratic coefficients logical :: valid !flag that cluster is still being considered end type end module pathdefs program findpath use pathdefs implicit NONE type (point) :: blobs(nblobs) !Our points type (cluster) :: track(100) !Our tracks ... -- Ivan Reid, Electronic & Computer Engineering, ___ CMS Collaboration , Brunel University. Ivan.Reid@brunel.ac.uk Room 40-1-B12, CER N KotPT -- "for stupidity above and beyond the call of duty".
Post Follow-up to this messageIn article <slrnda1lkj.dee.Ivan.Reid@loki.brunel.ac.uk>, "Dr Ivan D. Reid" <Ivan.Reid@brunel.ac.uk> writes: I can't help you with the 1st problem. > > the error message disappears, but then it seems I have an installation > error: > > $ /usr/local/gcc-4_1/bin/gfortran -ffixed-form hough3.f90 > /cygdrive/c/DOCUME~1/Ivan/LOCALS~1/Temp/cc5qvAD3.o:hough3.f90:(.text+0x445 7): > undefined reference to `_sppsv_' > /cygdrive/c/DOCUME~1/Ivan/LOCALS~1/Temp/cc5qvAD3.o:hough3.f90:(.text+0x44f 9): > undefined reference to `_sgesv_' > collect2: ld returned 1 exit status > This looks like you need to give the LAPACK and BLAS libraries on the command line. After fixing your (mangled?) implied do-loop, I can compile your code with gfortran -o z -ffixed-form hough3.f90 -L/usr/kargl/lib -llapack -lblas -- Steve http://troutmask.apl.washington.edu/~kargl/
Post Follow-up to this messageOn Fri, 3 Jun 2005 22:42:21 +0000 (UTC), Steven G. Kargl <kargl@troutmask.apl.washington.edu> wrote in <d7qmcd$4kj$1@gnus01.u.washington.edu>: > In article <slrnda1lkj.dee.Ivan.Reid@loki.brunel.ac.uk>, > "Dr Ivan D. Reid" <Ivan.Reid@brunel.ac.uk> writes: > This looks like you need to give the LAPACK and BLAS libraries > on the command line. After fixing your (mangled?) implied do-loop, > I can compile your code with > gfortran -o z -ffixed-form hough3.f90 -L/usr/kargl/lib -llapack -lblas Thanks, looks like I need to get those libraries now, they didn't come by default. -- Ivan Reid, Electronic & Computer Engineering, ___ CMS Collaboration , Brunel University. Ivan.Reid@brunel.ac.uk Room 40-1-B12, CER N KotPT -- "for stupidity above and beyond the call of duty".
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.