hansec / autocomplete-fortran

https://atom.io/packages/autocomplete-fortran
MIT License
16 stars 0 forks source link

No possibility to autocomplete the MPI subroutines #6

Open marmistrz opened 7 years ago

marmistrz commented 7 years ago

Consider the following program:

program name
    use mpi
    implicit none

    integer :: err, rank

    call MPI_INIT(err)
    print *, 'Hello world!'
    call MPI_FINALIZE(err)
end program

Then, while typing in the MPI_* calls, there's no autocompletion. The mpi.mod file resides in /usr/lib/openmpi/mpi.mod. Copying the file to the current directory doesn't help.

hansec commented 7 years ago

Unfortunately this package cannot read *.mod files for autocomplete information. It only provides autocompletion from source files. Libraries like MPI can be included through external index files, however at the moment I do not have an MPI index setup that you can just download. I will try and generate a MPI index files as soon as I have time. You can give this a shot yourself if you are interested and contribute the resulting file to the companion repo of library indices.

marmistrz commented 7 years ago

Is it not enough that the include files are provided by the package too? Output of pacman -Ql openmpi | grep include: http://paste.ubuntu.com/24025653/

hansec commented 7 years ago

The Fortran include files for MPI (and most libraries) only include variable definitions. It would be possible to add those files to the available completions, but it would be limited to the MPI variables like MPI_INT, MPI_SUM, etc. No function calls would be available.