Re: Open MP offloading

2024-01-11 Thread Tobias Burnus

Hi,

Rheinhardt Matthias wrote:
at the moment, offloading Open MP workshare section is not supported, 
nor can implicit do-loops from expressions with array syntax be delt 
with in another way for offloading. Are there any plannings to lift this 
restriction, which is rather severe for - in particular scientific - 
Fortran codes?


I think the real solution is 'coexecute' that can also be used as 
'target teams coexecute'.


However, 'coexecute' was only added to the second preview of OpenMP 
(TR/Technical Report 12); thus, it will take a while until it is 
implemented and even longer until compiler produce optimized code. The 
first preview of OpenMP 6.0 was released in November 2022, TR12 last 
November and the final OpenMP 6.0 is expected for this November (2024).


The TR12 specification can be found at 
https://www.openmp.org/specifications/ (as can all other OpenMP versions 
and also an a separate document with OpenMP examples).


* * *

With regards to 'workshare', I might miss something but I don't see a 
reason why:


!$omp target
...
 !$omp workshare
 !$omp end workshare
...
!$omp end target

wouldn't work.

* * *

With regards to GCC's OpenMP implementation status, see 
http://gcc.gnu.org/projects/gomp/ – some more items have been 
implemented but still need to be merged (they are in the OG13 / 
devel/omp/gcc-13 vendor branch) or are already work in progress.


GCC 14 is expected to be released in late spring and has currently the 
following new features: https://gcc.gnu.org/gcc-14/changes.html
(release notes not yet fully updated, albeit OpenMP is nearly complete) 
- note that certain features like memory management (like whether 
pinning supported etc.) do not show up in the list above as a compliant 
implementation does not have to support it; those get mentioned in the 
release notes and more details can be found in the manual.


For GCC 15, I hope to see a full support of OpenMP 5.x (x=0,1,2), but 
essentially no OpenMP 6 features like 'coexecute'.


Thanks,

Tobias


Open MP offloading

2024-01-11 Thread Rheinhardt Matthias
Hi,

at the moment, offloading Open MP workshare section is not supported, nor can 
implicit do-loops from expressions with array syntax be delt with in another 
way for offloading. Are there any plannings to lift this restriction, which is 
rather severe for - in particular scientific - Fortran codes?

Best regards,
M. Rheinhardt



Re: [PATCH v2] libgfortran: Bugfix if not define HAVE_ATOMIC_FETCH_ADD

2024-01-11 Thread Jakub Jelinek
On Thu, Jan 04, 2024 at 08:43:26PM -0500, Lipeng Zhu wrote:
> This patch try to fix the bug when HAVE_ATOMIC_FETCH_ADD is
> not defined in dec_waiting_unlocked function. As io.h does
> not include async.h, the WRLOCK and RWUNLOCK macros are
> undefined.
> 
> libgfortran/ChangeLog:
> 
>   * io/io.h (dec_waiting_unlocked): Use
>   __gthread_rwlock_wrlock/__gthread_rwlock_unlock or
>   __gthread_mutex_lock/__gthread_mutex_unlock functions
>   to replace WRLOCK and RWUNLOCK macros.
> 
> Signed-off-by: Lipeng Zhu 

LGTM.

Jakub