p-costa / SNaC

A multi-block solver for massively parallel direct numerical simulations (DNS) of fluid flows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

initiate porting to DO CONCURRENT loops?

p-costa opened this issue · comments

except for those with reductions (to be supported by the next standard anyway), most loops could be easily ported.

N.B. gfortran does not support yet F2018's locality clauses, so I need to do something like:

 #ifdef _LOCALITY_DO_CONCURRENT
     do concurrent (i=lo(1):hi(1),j=lo(2):hi(2),k=lo(3):hi(3)) &
     default(none) local(i,j,k) shared(up,vp,wp,p,dxf,dyf,dzf,dt)
 #else
     do concurrent (i=lo(1):hi(1),j=lo(2):hi(2),k=lo(3):hi(3))
 #endif

to support the current GNU implementation too. EDIT: a __GFORTRAN__ macro seems more appropriate in that case.