[f2py] Crackline: -error

Torppa Johanna <[email protected]>
Newsgroups gmane.comp.python.f2py.user
Message-ID <CDC71670B5C4D842B22F4C56819D4D8CB7DAC27E78@EXVS05.postipalvelut.lounet>
If anyone has time to try answer to my problem I would be really grateful.

I keep getting crackline: -errors when using f2py for my fortran code. A short test .f90 code is below:

-------------------------------
subroutine footprint(wrkdir)

implicit none
integer,parameter::tark=selected_real_kind(12,30)
integer,parameter::nmax=1000,lmax=50
integer i,nline,nobs(lmax)
real(tark) mea(lmax,nmax),x(lmax,nmax),y(lmax,nmax),line(nmax)
real(tark) tx,ty,tm
character(len=30) wrkdir,inaem

open(1,file=trim(wrkdir)//"ascii_table_AEM.txt",STATUS='OLD')
nline=1
nobs=0
do i=1,nmax
  read(1,*,end=10) tx,ty,line(i),tm
  if (i>1) then
    if (line(i)-line(i-1)>0) nline=nline+1
  endif
  nobs(nline)=nobs(nline)+1
  if(nobs(nline)>nmax) print*,'too many data points'
  if(nline>lmax) print*,'too many data points'
  x(nline,nobs(nline))=tx
  y(nline,nobs(nline))=ty
end do
close(1)

10 end subroutine footprint
-------------------------------

and it yields the followng messages:

-----------------------------------
1) crackline: groupcounter=3 groupname={0: ' ', 1: 'module', 2: 'interface', 3: 'subroutine'}
   crackline: Mismatch of blocks encountered. Trying to fix it by assuming "end" statement
2) Could not locate executable f95
-----------------------------------

I saw a problem like this in some osdir archived messages from 2004, but could not figure out what's the mistake.
Actually, the compilation is succesfull despite of these error messages IF the array sizes in the fortran code are small enough. If the arrays are larger, the "error messages" will be:

-----------------------------------------
1) In: :footprint:footprint.f90:footprint
   get_parameters: got "name 'selected' is not defined" on 'selected'
2) Could not locate executable f95
-----------------------------------------

And in this case I'm not able to import the created .pyd file to the Python script.

Thanks in advance if anyone can help.

With best regards, Johanna Torppa
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.