Problems running FORD

I am trying to use FORD on one of our programs. The source code consists of some 20 files, nothing really large and I thought it was a good test before I would attempt FORD on the whole suite. However, I run into bizarre problems and I have not been able to create a small example that exhibits the same phenomena.

What happens is that FORD complains about a USE statement:

Reading file src\agr_hyd_step.f
Traceback (most recent call last):
  File "c:\users\markus\.julia\conda\3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
 ...
Exception: Found USE statemnt in SOURCEFILE

When I comment out the USE statements (there are actually two), I get:

Reading file src\agr_hyd_step.f
Traceback (most recent call last):
  File "c:\users\markus\.julia\conda\3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
 ... 
Exception: Found variable in SOURCEFILE

The module is not included in the source tree in which I do the experiment, but that should not matter because I have defined that as an “extra_mod” in the project file. And furthermore I do not see any evidence of FORD first scanning all the source files for module definitions.

I even tried putting a dummy module in the source file, so that it would surely be found, but that does not help in any way either.

In short: I cannot proceed here. Does anyone know what I can do about it? Or should I report this at the FORD site?

I would try the FORD site, as at least until recently it did not support fixed-format source files.
I could not find a clear statement on the page up front taking a quick glance. If there are still restrictions I would hope at least that a statement is added indicating what Fortran standards are supported up front as well as any restrictions like that. What version of ford(1) are you using?

I run FORD 6.0.0 at the moment. But I tried to reproduce the problem via a small fixed-form file and that was accepted.

Okay, I will report this to the FORD project.

Okay, done.

I found the cause: the error messages have nothing to do with it. The source file simply contains lines that are (much) longer than 72 characters. Many compilers allow that as an extension. That is not an excuse, though.

1 Like

You can overcome the problem easily, they have a project-file option for that! :slight_smile:

Alas, that does not seem to work with FORD 6.0.0 (that is the one that I installed with conda). I will have to try with an upgraded version.

1 Like

And after updating to 6.1.16 I get different errors (however, I only had to correct a single long line). I have reported the issue.

1 Like