Hi,
On Mac two OMPT tests (see below) fail because the linking option "--no-as-needed” is not recognized (using LLVM/Clang 6.0.1)
Does anyone know a workaround for this?
Failing Tests (2):
libomp :: ompt/loadtool/tool_available/tool_available.c
libomp :: ompt/loadtool/tool_not_available/tool_not_available.c
Thanks.
Simone
The fix appears to be “don’t use that option”, as demonstrated by https://github.com/pytorch/pytorch/issues/3436. I have not verified this, although I am a Mac user and can do so if necessary.
Jeff
I was wondering because for our tool Archer (OpenMP data race detector) we run the OMPT tests to make sure that we are using the correct OpenMP version and those two failures make fail our Travis CI.
It would be great if it could be fixed.
Thanks.
Simone
Why don’t you verify that it works when that flag is omitted and then submit a patch upstream?
Jeff
Sounds good, I’ll do that.
Simone
Hi Jeff,
Just to make sure. Was your suggestion to completely remove the option, or just drop it on osx?
At least on Ubuntu systems I made the experience that this option is needed to overwrite the default linker behavior which will not load the tool, because the application does not call any of the functions provided by this library.
In our case the OpenMP runtime will use dlsym to find the ompt_start_tool function.
Is there a better way to portably tell the linker to link this library anyways?
Best
Joachim
I guess if we want to keep the flag, we can manage it inside the lit.cfg and drop it only if the os is macOS.
Simone
I meant drop it on MacOS only, where it is not supported
Jeff
Sorry I misunderstood.
Joachim, do you want me to submit another patch or will you take care of it?
Thanks.
Simone