Multiple Fortran source file extensions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libGridXC |
New
|
High
|
Yann Pouillon |
Bug Description
The use of file extensions in LibGridXC is quite heterogeneous. All main Fortran file extensions are found in the library, e.g. bessph.f, ggaxc.F, mesh1d.f90, xcmod.F90. This situation has 3 main drawbacks:
- preprocessing options can only be transmitted to some of the source files, thus precluding systematic testing and debugging of the code;
- different coding styles (free-form and fixed-form) coexist within the same library and will not be treated with the same rigour by most compilers, which will cause portability issues and let some bugs escape early detection;
- if a file is currently not preprocessed and becomes so in the future, some keywords might accidentally be substituted if preprocessing macros are not designed with sufficient care and the file has no corresponding unit test.
The most widely used file extension is currently .F90. We recommend its use for all Fortran source files of LibGridXC, which will likely allow the detection and/or triggering of dormant bugs and design flaws.
Changed in libgridxc: | |
importance: | Undecided → High |
assignee: | nobody → Yann Pouillon (pouillon) |
milestone: | none → 0.9 |
OK.
Do you have a favorite way to invoke the pre-processor? There seems to be quite a lot
of variability in their behavior (cpp (several variants) vs. built-in preprocessor in gfortran, for example). Nick has had a hell of a time with this.