Open tueda opened 5 years ago
In issue #188 you mention wanting to put ModuleOption noparallel
anywhere, but noparallel
is not in the allowed list of this commit. Is there a problem with that option?
Maybe I just forgot to add noparallel
, or maybe some problem; I don't remember exactly. For consistency, other module options could be added, too.
On the other hand, if in one module both local
and noparallel
are specified, then it indicates some conflicts between a part that should be parallelized and a part that should be executed in the non-parallel mode. Errors/warnings could be useful in such cases.
Can we simply allow all ModuleOption
s to be specified anywhere in the module?
Maybe it would not be a problem if we give warnings/errors for inconsistent use of ModuleOptions
, for example using both local
and noparallel
or polyratfun
twice with different functions/options. The latter is dangerous because it occurs when two subroutines (procedures called in a module) assume different polyratfuns and probably leads to a wrong result.
What is actually inconsistent about using both local
and noparallel
? This should be in the end equivalent to running the code with form
or tform -w1
should it not?
Yes, you are right. But this potentially indicates a performance issue (parallel part and no-parallel part in a module mistakenly), which is easily found if one has to write ModuleOption
s only at the end of a module while may be difficult to recognize when ModuleOption
s are distributed over a big module, especially inside procedures.
From a forgotten Issue #188. We don't need to follow the FORTRAN style for symbol/$-variable declaration: