Closed loganoz closed 8 years ago
Can you run the parsing script in debug mode and provide the output? Information on how to do this is now available on the wiki (https://github.com/hansec/autocomplete-fortran/wiki/Debugging-parser-errors).
It seems to work fine with some files, but gives the following error with others.
Found module statement, /home/grubio/Desktop/petsc_solver.f90:1, module petscsolverClass
Found USE statement, /home/grubio/Desktop/petsc_solver.f90:2, use precision_mod, only: RP
Found type statement, /home/grubio/Desktop/petsc_solver.f90:7, type petscsolver
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:13, integer :: niter
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:15, procedure set_A_row
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:16, procedure reset_A_row
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:17, procedure set_B_values
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:18, procedure set_B_value
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:19, procedure solve
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:20, procedure get_X
Found scope end, /home/grubio/Desktop/petsc_solver.f90:21, end type petscsolver
Found INT statement, /home/grubio/Desktop/petsc_solver.f90:23, interface petscsolver
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:24, procedure new_petscsolver
Found scope end, /home/grubio/Desktop/petsc_solver.f90:25, end interface
Found function statement, /home/grubio/Desktop/petsc_solver.f90:32, function new_petscsolver(N, ncols)
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:33, integer :: N, ncols
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:34, type (petscsolver) :: new_petscsolver
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:36, integer :: ierr
Found scope end, /home/grubio/Desktop/petsc_solver.f90:69, end function
Found subroutine statement, /home/grubio/Desktop/petsc_solver.f90:71, subroutine set_A_row(this, row, cols, values)
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:72, class(petscsolver) :: this
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:73, real(kind = RP), intent(in) :: values(0:)
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:74, integer :: cols(:), row
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:76, integer :: ierr
Found scope end, /home/grubio/Desktop/petsc_solver.f90:82, end subroutine
Found subroutine statement, /home/grubio/Desktop/petsc_solver.f90:84, subroutine reset_A_row(this, row, dia_val )
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:85, class(petscsolver) :: this
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:86, real(kind = RP), intent(in) :: dia_val
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:87, integer :: row
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:88, integer :: ierr
Found scope end, /home/grubio/Desktop/petsc_solver.f90:95, end subroutine
Found subroutine statement, /home/grubio/Desktop/petsc_solver.f90:97, subroutine set_B_values(this, B)
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:99, class(petscsolver) :: this
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:100, real(kind = RP), intent(in) :: B(0:)
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:101, integer :: ix(0:size(B)-1), i, ierr
Found scope end, /home/grubio/Desktop/petsc_solver.f90:106, end subroutine
Found subroutine statement, /home/grubio/Desktop/petsc_solver.f90:108, subroutine set_B_value(this, row, value)
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:110, class(petscsolver) :: this
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:111, integer :: row, ierr
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:112, real(kind = RP), intent(in) :: value
Found scope end, /home/grubio/Desktop/petsc_solver.f90:116, end subroutine
Found subroutine statement, /home/grubio/Desktop/petsc_solver.f90:118, subroutine solve(this, i_tol)
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:119, class(petscsolver) :: this
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:120, real(kind = RP), optional :: i_tol
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:122, integer :: ierr
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:123, real(kind = RP) :: tol
Found scope end, /home/grubio/Desktop/petsc_solver.f90:142, end subroutine solve
Found subroutine statement, /home/grubio/Desktop/petsc_solver.f90:144, subroutine get_X(this,X)
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:145, class(petscsolver) :: this
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:146, real(kind = RP) :: X(0:)
Found variable statement, /home/grubio/Desktop/petsc_solver.f90:148, integer :: ix(0:size(X)-1), i, ierr
Found scope end, /home/grubio/Desktop/petsc_solver.f90:152, end subroutine
Found scope end, /home/grubio/Desktop/petsc_solver.f90:153, end module
Traceback (most recent call last):
File "/home/grubio/.atom/packages/autocomplete-fortran/python/parse_fortran.py", line 797, in
Ok, I believe I fixed the error. Can you try parsing one of the problematic files with the updated parser in commit fc644df? If that fixes things I will merge the fix in for the next update.
It seems to be fixed! Thanks!
I tried in Ubuntu 14.04 but get an "Error parsing file 'PATH/TO/FILE/*.f90", "script failed" error.