I've tried to find out what this is in both the Fortran and OpenMP standards, but haven't found anything relevant.
Consider this Fortran code fragment:
Code: Select all
! 1 - find duplicates !$omp parallel do default(none) & !$omp & shared(lnodes, duplicate_of, nlinks, nnods) & !$omp & private(j, us_node, ds_node) schedule(dynamic) do i = 1, nlinks ! Why not ASSOCIATE? Looks like the associate names get shared in debug builds! us_node = lnodes(link_end_us, i) ds_node = lnodes(link_end_ds, i) if (us_node > nnods .or. ds_node > nnods) cycle ! ignore links to outfalls do j = 1, i - 1 if (lnodes(link_end_us, j) == us_node .and. lnodes(link_end_ds, j) == ds_node) then duplicate_of(i) = j exit else if (lnodes(link_end_ds, j) == us_node .and. lnodes(link_end_us, j) == ds_node) then duplicate_of(i) = -j ! < 0 means reversed orientation exit end if end do end do
Have I missed something in the standard or should this be something that needs to be added to it?