Closed jeffhammond closed 2 years ago
Thanks for finding it Jeff. It definitely looks like a bug. We will look into that.
Probably, when we were considering "the host backend default selection logic", we missed the case "-DONEDPL_BACKEND=dpcpp_only". In that case the all host backends (corresponding macros) should be switched OFF. So, it should be fixed.
@jeffhammond, actually, we couldn't reproduce the original issue - we didn't see OpenMP runtime linkage errors.
Did you modify cmake files locally? Also, could you please perform make VERBOSE=1 merge.pass
and provide a command line output?
What we can see right now (from the oneDPL code) is we enable OpenMP backend implicitly only if -fopenmp
option is specified.
It is doing weird stuff for me now. I reproduced just now but couldn't do it again. I guess you can close it. My environment must be cursed.
Anyway, that's interesting finding. We need to double check if our behavior is correct for dpcpp_only
option. Thanks.
@jeffhammond, I've just reproduced the same linkage problem - "...undefined reference to omp_in_parallel ...." with the release compiler (Intel(R) oneAPI DPC++/C++ Compiler 2022.0.0 (2022.0.0.20211123)
Macro _OPENMP
is enabled by option -fopenmp-simd
. It looks like an error in compiler driver (.exe). In the current nightly version the error is fixed. I guess, a new version (update) of the compiler will be released soon.
I'm trying to build 67383db9ac3223c825f4b8783b38bb9ab01aa757 like this:
It fails because OpenMP isn't available. I know how to tell it where OpenMP is, but I should not have to do that, since I am building a DPC++-only backend for the GPU.