App build error seen with 9.0.1-rc3

.text.startup' referenced in section .init_array.0’ of /tmp/event_delivery_manager-6b2617.o: defined in discarded section `.text.startup[_ZN4nest18DataSecondaryEventIdNS_16GapJunctionEventEE18supported_syn_ids_E]’ of /tmp/event_delivery_manager-6b2617.o
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)

Can this be a bug in Clang 9? I am trying to build my app to print out debugging information from the libomptarget.

Can you try to build using trunk?

Best regards,
Alexey Bataev

I’d like to avoid the current trunk to build my app for two reasons: a) it takes too much time 40 mins to finish and b) kernel is
not set up properly on the device. So I’d like to obtain a sane working stable release like 9.0.0 or 9.0.1-rc3.


Current trunk just builds my app fine, but upon execution, it fails:

Libomptarget → Checking whether device 0 is ready.
Libomptarget → Is the device 0 (local ID 0) initialized? 0
Target CUDA RTL → Init requires flags to 1
Target CUDA RTL → Getting device 0
Target CUDA RTL → Max CUDA blocks per grid 2147483647 exceeds the hard team limit 65536, capping at the hard limit
Target CUDA RTL → Using 1024 CUDA threads per block
Target CUDA RTL → Max number of CUDA blocks 65536, threads 1024 & warp size 32
Target CUDA RTL → Default number of teams set according to library’s default 128
Target CUDA RTL → Default number of threads set according to library’s default 128
Libomptarget → Device 0 is ready to use.
Target CUDA RTL → Load data from image 0x0000000010023c70
Target CUDA RTL → CUDA module successfully loaded!
Target CUDA RTL → Sending global device environment data 4 bytes
Libomptarget → Unable to generate entries table for device id 0.
Libomptarget → Failed to init globals on device 0
Libomptarget → Failed to get device 0 ready
Libomptarget fatal error 1: failure of target construct while offloading is mandatory

Is it NEST? Will try to check it after the holidays.

Best regards,
Alexey Bataev

Yes, it is. I am in a difficult situation as I can’t

reproduce it with a simple C++ like

#pragma omp target parallel for
for () {}

on POWER8. I will track down the bad LLVM commit during the holidays.

This is not observed on x86 with GPUs.


When libomptarget fails to initialize the run time environment, shouldn’t it call out
more descriptive messages than:

Libomptarget fatal error 1: failure of target construct while offloading is mandatory

? As this is apparently not due to a developer introduced a bug in his application.

Georgios, thoughts?

Best regards,
Alexey Bataev

I mean, can we improve it somehow?

Best regards,
Alexey Bataev

With LIBOMPTARGET_DEBUG=1 we get the verbose output. In this particular case libomptarget says it cannot load the offload entries table for the given image, so offload fails. What more is there to print out?


LIBOMPTARGET_DEBUG=1 gives too much information for some user, so I’d prefer that part printed out even under the case set to 0.

Otherwise, user cant tell if his app is failing or not.