gcc/libgomp
Tom de Vries c0e9cee285 [libgomp, nvptx] Print error log for link error
By running libgomp test-case libgomp.c/target-28.c with GOMP_NVPTX_PTXRW=w
(using a maintenance patch that adds support for this env var), we dump the
ptx in target-28.exe to file.  By editing one ptx file to rename
gomp_nvptx_main to gomp_nvptx_main2 in both declaration and call, and
running with GOMP_NVPTX_PTXRW=r, we trigger a link error:
...
$ GOMP_NVPTX_PTXRW=r ./target-28.exe
libgomp: cuLinkComplete error: unknown error
...
The error is somewhat uninformative.

Fix this by dumping the error log returned by the failing cuda call, such
that we have instead:
...
$ GOMP_NVPTX_PTXRW=r ./target-28.exe
libgomp: Link error log error   : \
  Undefined reference to 'gomp_nvptx_main2' in ''
libgomp: cuLinkComplete error: unknown error
...

Build on x86_64 with nvptx accelerator, tested libgomp.

libgomp/ChangeLog:

	* plugin/plugin-nvptx.c (link_ptx): Print elog if cuLinkComplete call
	fails.
2020-09-22 13:38:00 +02:00
..
config [libgomp, nvptx] Add __sync_compare_and_swap_16 2020-09-14 08:28:56 +02:00
plugin [libgomp, nvptx] Print error log for link error 2020-09-22 13:38:00 +02:00
testsuite c++: local-scope OMP UDR reductions have no template head 2020-09-16 12:16:11 -07:00
.gitattributes
acc_prof.h
acinclude.m4
aclocal.m4 Removal of HSA offloading from gcc and libgomp 2020-08-03 18:13:00 +02:00
affinity-fmt.c
affinity.c
alloc.c
allocator.c libgomp: Add Fortran routine support for allocators 2020-07-15 08:33:20 +02:00
atomic.c
barrier.c
ChangeLog Daily bump. 2020-09-17 00:16:31 +00:00
ChangeLog.graphite
config.h.in Removal of HSA offloading from gcc and libgomp 2020-08-03 18:13:00 +02:00
configure Removal of HSA offloading from gcc and libgomp 2020-08-03 18:13:00 +02:00
configure.ac libomp: Add omp_depend_kind to omp_lib.{f90,h} 2020-07-23 15:02:15 +02:00
configure.tgt aix: Add GCC64 configuration and FAT target libraries. 2020-06-21 14:14:46 -04:00
critical.c
env.c
error.c
fortran.c libgomp: Add Fortran routine support for allocators 2020-07-15 08:33:20 +02:00
hashtab.h
icv-device.c
icv.c libgomp: Add Fortran routine support for allocators 2020-07-15 08:33:20 +02:00
iter_ull.c
iter.c
libgomp_f.h.in libomp: Add omp_depend_kind to omp_lib.{f90,h} 2020-07-23 15:02:15 +02:00
libgomp_g.h
libgomp-plugin.c
libgomp-plugin.h
libgomp.h OpenMP/Fortran: Fix (re)mapping of allocatable/pointer arrays [PR96668] 2020-09-15 09:24:47 +02:00
libgomp.map libgomp: Add Fortran routine support for allocators 2020-07-15 08:33:20 +02:00
libgomp.spec.in
libgomp.texi libgomp: Fix hang when profiling OpenACC programs with CUDA 9.0 nvprof 2020-07-14 10:31:35 -07:00
lock.c
loop_ull.c
loop.c
Makefile.am build: Use -include instead of conditional include. 2020-06-22 21:31:48 +00:00
Makefile.in Removal of HSA offloading from gcc and libgomp 2020-08-03 18:13:00 +02:00
oacc-async.c
oacc-cuda.c
oacc-host.c
oacc-init.c libgomp: Fix hang when profiling OpenACC programs with CUDA 9.0 nvprof 2020-07-14 10:31:35 -07:00
oacc-int.h
oacc-mem.c openacc: Deep copy attach/detach should not affect reference counts 2020-07-27 09:16:57 -07:00
oacc-parallel.c
oacc-plugin.c
oacc-plugin.h
oacc-profiling.c
oacc-target.c
omp_lib.f90.in libomp: Add omp_depend_kind to omp_lib.{f90,h} 2020-07-23 15:02:15 +02:00
omp_lib.h.in libomp: Add omp_depend_kind to omp_lib.{f90,h} 2020-07-23 15:02:15 +02:00
omp.h.in openmp: Change omp_atv_default value and rename omp_atv_sequential to omp_atv_serialized. 2020-07-09 11:29:30 +02:00
openacc_lib.h
openacc.f90
openacc.h
ordered.c
parallel.c
priority_queue.c
priority_queue.h
sections.c
secure_getenv.h
single.c
splay-tree.c
splay-tree.h
target.c libgomp/target.c: Silence -Wuninitialized warning 2020-09-15 21:28:40 +02:00
task.c
taskloop.c
team.c
teams.c
work.c