This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed 0/4] (Partial) OpenMP 5.0 support for GCC 9
- From: Thomas Schwinge <thomas at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Cc: Ilya Verbin <ilya dot verbin at intel dot com>
- Date: Fri, 14 Dec 2018 21:55:51 +0100
- Subject: Re: [committed 0/4] (Partial) OpenMP 5.0 support for GCC 9
- References: <20181108171611.GK11625@tucnak>
Hi Jakub!
On Thu, 8 Nov 2018 18:16:11 +0100, Jakub Jelinek <jakub@redhat.com> wrote:
> The OpenMP 5.0 specification, https://www.openmp.org/specifications/ ,
> has been just released a few minutes ago and to celebrate that, I've merged
> gomp-5_0-branch into trunk after bootstrapping/regtesting it on x86_64-linux and
> i686-linux.
In addition to not having tested this with nvptx offloading (where Tom
and you now restored the regressed test cases, thanks!), I can tell that
you also didn't test this with Intel MIC (emulated) offloading. ;-)
> Because the amount of changes in OpenMP 5.0 is much bigger than in any of the earlier
> releases of the standard, [...]
Oh yes, that's massive! I immediately thought "poor Jakub" ;-) when I
read a summary of all the new stuff in there.
After <https://gcc.gnu.org/PR87833> 'Intel MIC (emulated) offloading:
"relocation [...] can not be used when making a shared object; recompile
with -fPIC"', yours is now another commit that further broke Intel MIC
(emulated) offloading, but in the past month apparently nobody but me has
run into this (or didn't bother to report it), and I thus again wonder
whether anyone but me is still testing Intel MIC (emulated) offloading?
Anyway, that was easy enough to fix; in r267145 committed to trunk:
commit fbd4f724c13b078755a96a257eabc18ddb83a9cd
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Dec 14 20:41:46 2018 +0000
Repair liboffloadmic after "(Partial) OpenMP 5.0 support for GCC 9"
..., which now failed to build, as follows:
In file included from [...]/source-gcc/liboffloadmic/runtime/offload_common.h:43,
from [...]/source-gcc/liboffloadmic/runtime/dv_util.cpp:31:
[...]/source-gcc/liboffloadmic/runtime/offload.h:220:12: error: conflicting declaration of C function 'int omp_target_is_present(void*, int)'
220 | extern int omp_target_is_present(
| ^~~~~~~~~~~~~~~~~~~~~
In file included from [...]/source-gcc/liboffloadmic/runtime/offload.h:45,
from [...]/source-gcc/liboffloadmic/runtime/offload_common.h:43,
from [...]/source-gcc/liboffloadmic/runtime/dv_util.cpp:31:
./../libgomp/omp.h:166:12: note: previous declaration 'int omp_target_is_present(const void*, int)'
166 | extern int omp_target_is_present (const void *, int) __GOMP_NOTHROW;
| ^~~~~~~~~~~~~~~~~~~~~
In file included from [...]/source-gcc/liboffloadmic/runtime/offload_common.h:43,
from [...]/source-gcc/liboffloadmic/runtime/dv_util.cpp:31:
[...]/source-gcc/liboffloadmic/runtime/offload.h:236:12: error: conflicting declaration of C function 'int omp_target_memcpy(void*, void*, size_t, size_t, size_t, int, int)'
236 | extern int omp_target_memcpy(
| ^~~~~~~~~~~~~~~~~
In file included from [...]/source-gcc/liboffloadmic/runtime/offload.h:45,
from [...]/source-gcc/liboffloadmic/runtime/offload_common.h:43,
from [...]/source-gcc/liboffloadmic/runtime/dv_util.cpp:31:
./../libgomp/omp.h:167:12: note: previous declaration 'int omp_target_memcpy(void*, const void*, long unsigned int, long unsigned int, long unsigned int, int, int)'
167 | extern int omp_target_memcpy (void *, const void *, __SIZE_TYPE__,
| ^~~~~~~~~~~~~~~~~
In file included from [...]/source-gcc/liboffloadmic/runtime/offload_common.h:43,
from [...]/source-gcc/liboffloadmic/runtime/dv_util.cpp:31:
[...]/source-gcc/liboffloadmic/runtime/offload.h:262:12: error: conflicting declaration of C function 'int omp_target_memcpy_rect(void*, void*, size_t, int, const size_t*, const size_t*, const size_t*, const size_t*, const size_t*, int, int)'
262 | extern int omp_target_memcpy_rect(
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from [...]/source-gcc/liboffloadmic/runtime/offload.h:45,
from [...]/source-gcc/liboffloadmic/runtime/offload_common.h:43,
from [...]/source-gcc/liboffloadmic/runtime/dv_util.cpp:31:
./../libgomp/omp.h:170:12: note: previous declaration 'int omp_target_memcpy_rect(void*, const void*, long unsigned int, int, const long unsigned int*, const long unsigned int*, const long unsigned int*, const long unsigned int*, const long unsigned int*, int, int)'
170 | extern int omp_target_memcpy_rect (void *, const void *, __SIZE_TYPE__, int,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from [...]/source-gcc/liboffloadmic/runtime/offload_common.h:43,
from [...]/source-gcc/liboffloadmic/runtime/dv_util.cpp:31:
[...]/source-gcc/liboffloadmic/runtime/offload.h:285:12: error: conflicting declaration of C function 'int omp_target_associate_ptr(void*, void*, size_t, size_t, int)'
285 | extern int omp_target_associate_ptr(
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from [...]/source-gcc/liboffloadmic/runtime/offload.h:45,
from [...]/source-gcc/liboffloadmic/runtime/offload_common.h:43,
from [...]/source-gcc/liboffloadmic/runtime/dv_util.cpp:31:
./../libgomp/omp.h:177:12: note: previous declaration 'int omp_target_associate_ptr(const void*, const void*, long unsigned int, long unsigned int, int)'
177 | extern int omp_target_associate_ptr (const void *, const void *, __SIZE_TYPE__,
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from [...]/source-gcc/liboffloadmic/runtime/offload_common.h:43,
from [...]/source-gcc/liboffloadmic/runtime/dv_util.cpp:31:
[...]/source-gcc/liboffloadmic/runtime/offload.h:299:12: error: conflicting declaration of C function 'int omp_target_disassociate_ptr(void*, int)'
299 | extern int omp_target_disassociate_ptr(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from [...]/source-gcc/liboffloadmic/runtime/offload.h:45,
from [...]/source-gcc/liboffloadmic/runtime/offload_common.h:43,
from [...]/source-gcc/liboffloadmic/runtime/dv_util.cpp:31:
./../libgomp/omp.h:179:12: note: previous declaration 'int omp_target_disassociate_ptr(const void*, int)'
179 | extern int omp_target_disassociate_ptr (const void *, int) __GOMP_NOTHROW;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:904: recipe for target 'liboffloadmic_target_la-dv_util.lo' failed
make[3]: *** [liboffloadmic_target_la-dv_util.lo] Error 1
make[3]: Leaving directory '[...]/build-gcc-offload-x86_64-intelmicemul-linux-gnu/x86_64-intelmicemul-linux-gnu/liboffloadmic'
Makefile:1031: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '[...]/build-gcc-offload-x86_64-intelmicemul-linux-gnu/x86_64-intelmicemul-linux-gnu/liboffloadmic'
Makefile:12707: recipe for target 'all-target-liboffloadmic' failed
make[1]: *** [all-target-liboffloadmic] Error 2
make[1]: Leaving directory '[...]/build-gcc-offload-x86_64-intelmicemul-linux-gnu'
Makefile:941: recipe for target 'all' failed
make: *** [all] Error 2
liboffloadmic/
* runtime/offload.h (omp_target_is_present, omp_target_memcpy)
(omp_target_memcpy_rect, omp_target_associate_ptr)
(omp_target_disassociate_ptr): Adjust to libgomp changes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267145 138bc75d-0d04-0410-961f-82ee72b054a4
---
liboffloadmic/ChangeLog | 6 ++++++
liboffloadmic/runtime/offload.h | 12 ++++++------
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git liboffloadmic/ChangeLog liboffloadmic/ChangeLog
index 701cdff074ac..8e4dc3747141 100644
--- liboffloadmic/ChangeLog
+++ liboffloadmic/ChangeLog
@@ -1,3 +1,9 @@
+2018-12-14 Thomas Schwinge <thomas@codesourcery.com>
+
+ * runtime/offload.h (omp_target_is_present, omp_target_memcpy)
+ (omp_target_memcpy_rect, omp_target_associate_ptr)
+ (omp_target_disassociate_ptr): Adjust to libgomp changes.
+
2018-10-31 Joseph Myers <joseph@codesourcery.com>
PR bootstrap/82856
diff --git liboffloadmic/runtime/offload.h liboffloadmic/runtime/offload.h
index b12af3442a56..4a329ba0e560 100644
--- liboffloadmic/runtime/offload.h
+++ liboffloadmic/runtime/offload.h
@@ -218,7 +218,7 @@ extern void omp_target_free(
\return true if storage is found, false otherwise.
*/
extern int omp_target_is_present(
- void *ptr,
+ const void *ptr,
int device_num
) __GOMP_NOTHROW;
@@ -235,7 +235,7 @@ extern int omp_target_is_present(
*/
extern int omp_target_memcpy(
void *dst,
- void *src,
+ const void *src,
size_t length,
size_t dst_offset,
size_t src_offset,
@@ -261,7 +261,7 @@ extern int omp_target_memcpy(
*/
extern int omp_target_memcpy_rect(
void *dst,
- void *src,
+ const void *src,
size_t element_size,
int num_dims,
const size_t *volume,
@@ -283,8 +283,8 @@ extern int omp_target_memcpy_rect(
\return 0 on success, 1 otherwise.
*/
extern int omp_target_associate_ptr(
- void *host_ptr,
- void *device_ptr,
+ const void *host_ptr,
+ const void *device_ptr,
size_t size,
size_t device_offset,
int device_num
@@ -297,7 +297,7 @@ extern int omp_target_associate_ptr(
\return 0 on success, 1 otherwise.
*/
extern int omp_target_disassociate_ptr(
- void *host_ptr,
+ const void *host_ptr,
int device_num
) __GOMP_NOTHROW;
Grüße
Thomas