#1333: Fortran module in GRHydro_InterfacesM.h is nonsensical ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: critical | Milestone: ET_2013_05 Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: GRHydro ------------------------------------+--------------------------------------- Changes (by eschnett):
* priority: major => critical * milestone: => ET_2013_05
Comment:
It is not legal in Fortran to define the same module twice. The situation is the same as defining two routines with the same name -- this is a fundamental "don't". I am raising the severity of this. I also consider this a blocker for the release.
I understand that people strive to structure Fortran code in a manner similar to C code, but unfortunately that doesn't work. Instead of defining stand-alone subroutines, and then declaring interfaces (and repeating much code), it is far superior to define subroutines INSIDE a module, and then using that module when the subroutine is to be called. Include files should not be necessary at all for this.
The drawback of this is that Cactus cannot call subroutines that are defined in a module, it only knows how to call stand-alone subroutines (however, this can be changed). That is, all scheduled or externally visible routines need to be stand-alone routines.