#65843 closed defect (fixed)
OpenCoarrays: project mixes-and-matches .F90 and .f90 file extensions
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | barracuda156 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | Cc: | mascguy (Christopher Nielsen) | |
Port: | OpenCoarrays |
Description (last modified by mascguy (Christopher Nielsen))
Initially was an issue with patching:
can't find file to patch at input line 30 |--- src/tests/integration/pde_solvers/coarrayHeatSimplified/main.F90.orig 2022-05-09 10:53:57.000000000 +0700 |+++ src/tests/integration/pde_solvers/coarrayHeatSimplified/main.F90 2022-09-11 01:29:09.000000000 +0700
Case mismatch: the f in f90 should be lowercase.
Now we're seeing more mixed-case issues, this time during builds:
-- Configuring done CMake Error at src/tests/integration/pde_solvers/coarrayHeatSimplified/CMakeLists.txt:6 (add_executable): Cannot find source file: main.F90 CMake Error at src/tests/integration/pde_solvers/coarrayHeatSimplified/CMakeLists.txt:6 (add_executable): No SOURCES given to target: co_heat
Change History (9)
comment:1 Changed 2 years ago by mascguy (Christopher Nielsen)
comment:2 Changed 2 years ago by Christopher Nielsen <mascguy@…>
Owner: | set to Christopher Nielsen <mascguy@…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:3 Changed 2 years ago by Christopher Nielsen <mascguy@…>
comment:4 Changed 2 years ago by mascguy (Christopher Nielsen)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Summary: | OpenCoarrays: patch fails → OpenCoarrays: project mixes-and-matches .F90 and f90 file extensions |
comment:5 follow-up: 7 Changed 2 years ago by mascguy (Christopher Nielsen)
Cc: | barracuda156 removed |
---|---|
Description: | modified (diff) |
Owner: | changed from Christopher Nielsen <mascguy@…> to barracuda156 |
Status: | reopened → assigned |
Sergey, can you double-check the filename case within CMake files, etc, vis-a-vis the actual project source?
comment:6 Changed 2 years ago by mascguy (Christopher Nielsen)
Summary: | OpenCoarrays: project mixes-and-matches .F90 and f90 file extensions → OpenCoarrays: project mixes-and-matches .F90 and .f90 file extensions |
---|
comment:7 Changed 2 years ago by barracuda156
Replying to mascguy:
Sergey, can you double-check the filename case within CMake files, etc, vis-a-vis the actual project source?
The file extension must be changed to capitalized version, otherwise preprocessing fails. Fortran differentiates between sources to be preprocessed or not that way. See the link in the patch.
What I did not consider is case-sensitive MacOS case.
I am not on my laptop now, but a fix will be changing the extension either pre-patch or post-patch.
UPD. So here is why it should be changed to .F90
:
First and simplest, the source file in which you attempt to employ it apparently has the extension .f90. What this extension signifies to gfortran (and to the GCC compiler driver, by any other name) is: Free form Fortran source code that should not be preprocessed. Similarly .f95, .f03 and .f08. If you want gfortran to infer that a source file contains free form Fortran code that must be preprocessed, give it one of the extensions .F90, .F95, .F03 or .F08.
https://stackoverflow.com/questions/31649691/stringify-macro-with-gnu-gfortran
However file rename
fails on non-case-sensitive MacOS:
Error: Failed to patch OpenCoarrays: error renaming "/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/integration/pde_solvers/coarrayHeatSimplified/main.f90" to "/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/integration/pde_solvers/coarrayHeatSimplified/main.F90": file already exists
https://github.com/macports/macports-ports/pull/16075#issuecomment-1249183960
How to solve this?
comment:8 Changed 2 years ago by barracuda156
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:9 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
Don't forget to report the problem to the developers so they can fix it properly.
Oh, this is easy enough to fix. I'll take care of ASAP.