You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some UM files contains OMP sentinels for use statements, e.g. control/grids/p_to_t_vol.F90:
!$ USE compute_chunk_size_mod, ONLY: compute_chunk_size ! Note OpenMP sentinel
Since fparser does not support this, FAB misses this dependency (and compilation fails). While I have a patch more or less ready to go (https://github.com/hiker/fab/tree/13_omp_sentinels), I have discussed this in our telco, and we agreed that this would be a useful feature for fparser to support, see stfc/fparser#443. So I'll add this support to fparser, and once this has been released, we just need to enable this feature in FAB (it will be disabled by default in order not to break compatibility).
The text was updated successfully, but these errors were encountered:
I have just submitted stfc/fparser#444 to get support for omp conditional sentinels into fparser. I have confirmed that fab now detects the dependencies in the original case when setting the fparser flag to handle them:
diff --git a/source/fab/parse/fortran_common.py b/source/fab/parse/fortran_common.py
index 0ed4f3f..8b987d8 100644
--- a/source/fab/parse/fortran_common.py
+++ b/source/fab/parse/fortran_common.py
@@ -142,7 +142,8 @@ class FortranAnalyserBase(ABC):
def _parse_file(self, fpath):
"""Get a node tree from a fortran file."""
- reader = FortranFileReader(str(fpath), ignore_comments=False)
+ reader = FortranFileReader(str(fpath), ignore_comments=False,
+ omp_sentinel=True)
reader.exit_on_error = False # don't call sys.exit, it messes up the multi-processing
try:
stfc/fparser#444. has been merged, so once we do the next fparser release we can support these statements. As part of the improved compiler support I am also improving the handling of openmp, so FAB will 'know' whether openmp is enabled or not.
Some UM files contains OMP sentinels for use statements, e.g. control/grids/p_to_t_vol.F90:
Since fparser does not support this, FAB misses this dependency (and compilation fails). While I have a patch more or less ready to go (https://github.com/hiker/fab/tree/13_omp_sentinels), I have discussed this in our telco, and we agreed that this would be a useful feature for fparser to support, see stfc/fparser#443. So I'll add this support to fparser, and once this has been released, we just need to enable this feature in FAB (it will be disabled by default in order not to break compatibility).
The text was updated successfully, but these errors were encountered: