This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libgomp, nvptx] Disable OMP_{DISPLAY_AFFINITY,AFFINITY_FORMAT} support


[ was: Re: [committed 2/4] (Partial) OpenMP 5.0 support for GCC 9
(runtime library changes) ]

On 08-11-18 18:18, Jakub Jelinek wrote:
> Hi!
> 
> This is the libgomp/ except libgomp/testsuite/ part of the gomp-5_0-branch
> merge to trunk I've just committed.
> 
> 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* affinity.c (gomp_display_affinity_place): New function.
> 	* affinity-fmt.c: New file.

> 	* fortran.c: Include stdio.h and string.h.
> 	(omp_pause_resource, omp_pause_resource_all): Add ialias_redirect.
> 	(omp_get_schedule_, omp_get_schedule_8_): Mask off GFS_MONOTONIC bit.
> 	(omp_set_affinity_format_, omp_get_affinity_format_,
> 	omp_display_affinity_, omp_capture_affinity_, omp_pause_resource_,
> 	omp_pause_resource_all_): New functions.

Hi,

OK for trunk?

Thanks,
- Tom
[libgomp, nvptx] Disable OMP_{DISPLAY_AFFINITY,AFFINITY_FORMAT} support

Disable compilation of support for OMP_DISPLAY_AFFINITY and OMP_AFFINITY_FORMAT
for nvptx.

This fixes some libgomp testsuite failures for x86_64 with nvptx accelerator.

Build on x86_64 with nvptx accelerator, tested libgomp.

2018-12-12  Tom de Vries  <tdevries@suse.de>

	* affinity.c (gomp_display_affinity_place): Guard with
	#ifndef LIBGOMP_OFFLOADED_ONLY.
	* fortran.c (omp_set_affinity_format_, omp_get_affinity_format_)
	(omp_display_affinity_, omp_capture_affinity_): Same.
	* libgomp/config/nvptx/affinity-fmt.c: New, empty file overriding
	libgomp/affinity-fmt.c.

---
 libgomp/affinity.c                  | 2 ++
 libgomp/config/nvptx/affinity-fmt.c | 0
 libgomp/fortran.c                   | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/libgomp/affinity.c b/libgomp/affinity.c
index efe5c4260e3..dbfb8e7a75d 100644
--- a/libgomp/affinity.c
+++ b/libgomp/affinity.c
@@ -140,6 +140,7 @@ gomp_get_place_proc_ids_8 (int place_num, int64_t *ids)
   (void) ids;
 }
 
+#ifndef LIBGOMP_OFFLOADED_ONLY
 void
 gomp_display_affinity_place (char *buffer, size_t size, size_t *ret,
 			     int place)
@@ -151,6 +152,7 @@ gomp_display_affinity_place (char *buffer, size_t size, size_t *ret,
     strcpy (buf, "0");
   gomp_display_string (buffer, size, ret, buf, strlen (buf));
 }
+#endif
 
 ialias(omp_get_place_num_procs)
 ialias(omp_get_place_proc_ids)
diff --git a/libgomp/config/nvptx/affinity-fmt.c b/libgomp/config/nvptx/affinity-fmt.c
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/libgomp/fortran.c b/libgomp/fortran.c
index 0157baec648..a577a2e515b 100644
--- a/libgomp/fortran.c
+++ b/libgomp/fortran.c
@@ -584,6 +584,7 @@ omp_get_max_task_priority_ (void)
   return omp_get_max_task_priority ();
 }
 
+#ifndef LIBGOMP_OFFLOADED_ONLY
 void
 omp_set_affinity_format_ (const char *format, size_t format_len)
 {
@@ -664,6 +665,7 @@ omp_capture_affinity_ (char *buffer, const char *format,
     memset (buffer + ret, ' ', buffer_len - ret);
   return ret;
 }
+#endif
 
 int32_t
 omp_pause_resource_ (const int32_t *kind, const int32_t *device_num)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]