p-costa / SNaC

A multi-block solver for massively parallel direct numerical simulations (DNS) of fluid flows
MIT License
39 stars 9 forks source link

initiate porting to DO CONCURRENT loops? #25

Open p-costa opened 3 years ago

p-costa commented 3 years ago

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

p-costa commented 3 years ago

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.