[PATCH] D108904: [flang][OpenMP] Added semantic checks for sections (associated section(s) should be structured block(s)) and simd constructs (associated loop(s) should be structured block(s))

Josh Mottley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 05:58:17 PDT 2021


josh.mottley.arm added a comment.

@NimishMishra I believe this patch is causing a false semantic error with SNAP <https://github.com/lanl/SNAP>. The error being:

  error: Semantic errors in inner.f90
  ./inner.f90:152:7: error: CYCLE to construct outside of PARALLEL DO construct is not allowed
          IF ( g == 0 ) CYCLE

The code in snap it is erroring at in inner.f90 is:

  !$OMP PARALLEL DO NUM_THREADS(nnstd_used) IF(nnstd_used>1)           &
  !$OMP& SCHEDULE(STATIC,1) DEFAULT(SHARED) PRIVATE(n,g)               &
  !$OMP& PROC_BIND(CLOSE)
    DO n = 1, ng_per_thrd
      g = grp_act(n,t)
      IF ( g == 0 ) CYCLE
      CALL inner_df_calc ( inno, iits(g), flux0pi(:,:,:,g),            &
                        flux0(:,:,:,g), dfmxi(g) )
    END DO
  !$OMP END PARALLEL DO

AFAIK this should be valid code, and I know that @Leporacanthicus is also experiencing this issue (although it looks like there could be a secondary issue as well).
I've tried reverting this patch, and managed to stop getting this error when using the flang-omp-report plugin.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108904/new/

https://reviews.llvm.org/D108904



More information about the llvm-commits mailing list