Closed sfilippone closed 6 years ago
Hi Salvatore,
No idea whether or not this will be a useful suggestion, as I have yet to test it, but I'm wondering if a temporary workaround might be to add a double colon after the procedure
declaration. Or even declare with the f90/f95 syntax as module procedure ::
.
Just FYI, the formatting makes your comment somewhat difficult to read. If you put ```
on lines before and after your code this will create a "fenced code block" which will use a mono-space font and preserve all input without trying to render it as markdown. e.g.,
```bash
[sfilippo@localhost psblas3]$ ford --debug psblas-ford-doc.md
Reading file base/modules/psblas/psb_d_psblas_mod.F90
Processing documentation comments...
Correlating information from different parts of your project...
# etc.
```
As you can see in the above example, you can optionally embed the language name immediately following the first ```
and this will give colored syntax highlighting:
[sfilippo@localhost psblas3]$ ford --debug psblas-ford-doc.md
Reading file base/modules/psblas/psb_d_psblas_mod.F90
Processing documentation comments...
Correlating information from different parts of your project...
# etc.
Sorry for the bad formatting, this is my first issue raised here, I'll have to go study the interface. Your suggestion of using
procedure ::
does not cure the ICE. As for using
module procedure
that would not work because those symbols are referring to interfaces for subroutines implemented elsewhere. All this predates the availability of submodules, so at some point I'll bite the bullet and move to submodules. Salvatore (Let's see if this post is formatted decently)
I can't investigate this right now, as my laptop is currently away being repaired. Hopefully it will be fixed by next weekend and, since doing so is long overdue, I will start going through bug reports then.
Salvatore (Let's see if this post is formatted decently)
Beautiful! (It just makes it a bit easier to follow, and without the formatting, Github will eat certain characters that it believes to be for formatting)
Hi Any news on this issue? Thanks
Is the FORD project file available anywhere? Were you running it from the root of https://github.com/sfilippone/psblas3 on the master branch?
If you help me reproduce this (and I have time) I may try running it with a more up to date fork of FORD and also seeing if I can debug it.
Minimum file attached. Ideally I would want to parse the entire project, but this is sufficent to reproduce the bug, and yes, it's from the root of the master branch of https://github.com/sfilippone/psblas3 Thanks S.
---
project: PSBLAS
summary: Parallel Sparse Basic Linear Algebra Subroutines
src_dir: base/modules/serial
src_dir: base/modules/desc
output_dir: ford-doc
preprocessor: gfortran -E -DHAVE_BUGGY_GENERICS
preprocess: true
display: public
protected
private
source: true
graph: true
sort: alpha
extra_mods: iso_fortran_env:https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fFORTRAN_005fENV.html
print_creation_date: true
creation_date: %Y-%m-%d %H:%M %z
project_download: https://github.com/sfilippone/psblas3
license: bsd
author: Salvatore Filippone
email: salvatore.filippone@cranfield.ac.uk
author_description: Lecturer
author_pic: https://www.cranfield.ac.uk/~/media/people/794215.ashx?w=200
website: https://www.cranfield.ac.uk/people/dr-salvatore-filippone-794215
---
[source: display source code corresponding to item being documented]:#
[graph: generate call graphs, module dependency graphs, derive type composition/inheritance graphs ]:#
[sort: different sorting schemes for the modules or procedures or programs or derived types (alpha = alphabetical see wiki).]:#
[extra_mods: documentation for intrinsic modules]:#
[This document is a FORD project file, formatted with Pythonic Markdown ]:#
[See https://github.com/cmacmackin/ford/wiki/Project-File-Options for more info on writing FORD project files]:#
--------------------
Brief description
-----------------
@warning
This archive uses advaned features of Fortran 2015. As of October 2016, only GNU Fortran compiler supports all features employed.
### ToDo
X marks directories being documented:
- [X] Done [pargen](./test/pargen)
- [X] Done [krylov](./krylov)
- [ ] To Do [something](./prec)
Compilers
---------
This archive has been tested with GNU Fortran compiler (gfortran) 6.3.0 with the MPICH implementation of MPI
Sorry it has taken me so long to work on this bug. Life seemed to keep getting in the way. Is this legal syntax? I wasn't aware that procedures specified within generic interfaces could be accessed on their own. I've looked through section 12.4.3.4 of the draft 2008 standard and can't find anything which says either way.
@cmacmackin I'm not sure I 100% follow what you're asking---are you wondering if it is legal for psb_damax
to be used in the psb_genrmi
and/or psb_normi
interface blocks?
In 12.4.3.2 of F2008:
3 The name of the entity declared by an interface body is the function-name in the function-stmt or the subroutine-name in the subroutine-stmt that begins the interface body
My reading of this is that this is true with or without a generic-spec. Then 12.4.3.4.1(2) says:
The generic-spec in an interface-stmt is a generic identifier for all the procedures in the interface block. ...
Personal experience also seems to indicated that this is perfectly legal. After all, you can have a module procedure that you specify a generic interface for, but you can still reference the module procedure on its own. (Module procedures have explicit interfaces.)
@zbeekman Yes, that's what I'm asking. Module procedures within a generic interface have their explicit interface defined elsewhere. To me it feels wrong to use an explicit interface defined withing a generic interface because it's like you're doing two things at once (declaring explicit interfaces for those procedures while also declaring a generic interface). It feels tidier to me to define the explicit interfaces in their own block and then have a separate generic interface block. Doesn't make it illegal syntax, mind, just how I'd lay out my code.
I've updated FORD so it now knows to consider non-module procedure entries to generic interfaces. This fixes the bug. These changes will be in the next release.
Hi there, First of all, let me say that in general this tool rocks! However, I am getting this error with version 5.0.6
with the attached source file psbd_psblas_mod.F90, when I specify as preprocessor the string gfortran -E.
The problem seems to be the procedure statement, because if I change the preprocessor to gfortran -E -DHAVE_BUGGY_GENERICS it works. (as an aside, from the name of the variable, you can see that I have encountered compilers that fail to honour the specification....) Thanks Salvatore