Open MatthewHambley opened 1 year ago
I just realised that this is a duplicate of #297. I have extended fparser to handle OMP sentinels (if a flag is specified at parse time), see https://github.com/stfc/fparser/pull/444. Once we release a new fparser version, we just need to provide this flag to fparser (and as part of the improved compiler support I am adding improved handling of openmp, so FAB will 'know' if openmp sentinels should be enabled or not).
As well as setting a preprocessor macro
_OPENMP
which may be used in#ifdef
lines the OpenMP standard also specifies a magic comment for including code only when compiling with OpenMP.This magic comment has the form
!$ <code>
. If such a comment is used to make ause
statement conditional we can end up with an incomplete dependency tree.At the moment Fab knows nothing of OpenMP, it's just an argument specified by the user and passed to the compiler. In order to properly support these magic comments, with the dependency only existing if OpenMP is enabled, Fab probably needs to be taught about the existence of OpenMP.