parallel-runtimes / lomp

Little OpenMP Library
Apache License 2.0
153 stars 17 forks source link

Missing tasking entrypoint(s) #22

Closed JimCownie closed 3 years ago

JimCownie commented 3 years ago

Describe the bug At least the __kmpc_omp_task_begin_if0 library entrypoint is missing from LOMP.

./taskbench: relocation error: ./taskbench: symbol __kmpc_omp_task_begin_if0, version VERSION not defined in file libom\
p.so with link time reference

To Reproduce Attempt to execute the EPCC tasking benchmark using the LOMP library. EPCC Benchmarks.

The library entrypoints used by the taskbench code are

br-jcownie@xcil01:~/openmpbench_C_v31> nm taskbench | grep __kmpc
                 U __kmpc_barrier@@VERSION
                 U __kmpc_end_master@@VERSION
                 U __kmpc_fork_call@@VERSION
                 U __kmpc_global_thread_num@@VERSION
                 U __kmpc_master@@VERSION
                 U __kmpc_omp_task_alloc@@VERSION
                 U __kmpc_omp_task_begin_if0@@VERSION
                 U __kmpc_omp_task_complete_if0@@VERSION
                 U __kmpc_omp_task@@VERSION
                 U __kmpc_omp_taskwait@@VERSION

I expect that __kmpc_task_complete_if0 is also missing from LOMP.

Expected behaviour The entrypoint should exist.

Desktop (please complete the following information):

LOMP:runtime version 0.1 (SO version 1) compiled at 12:04:35 on Jul 20 2021
LOMP:from Git commit 5db9696 for aarch64 by LLVM:11:0:0
LOMP:with configuration -march=armv8.1a;DEBUG=10;LOMP_WARN_API_STUBS=1;LOMP_WARN_ARCH_FEATURES=1;LOMP_HAVE_LIBATOMIC=1;\
LOMP_HAVE_LIBNUMA=1
mjklemm commented 3 years ago

Thanks. I will have a look and add the missing entrypoints. I guess this is the first time, we came across an if(0) task. :)

JimCownie commented 3 years ago

There is really a more general issue here, which is that there are a lot of other entrypoints missing too, which should also be implemented. I'll set up a separate bug for that... Depending on the architecture, some of those may be so obscure that they're not worth doing (anything on X87 80b float format, for instance).

mjklemm commented 3 years ago

Maybe a good start would be to add respective test cases. Then I can start adding the entrypoints as I see the tests failing with (dynamic) linker errors.

As for the amount of complexity we want to add here: I guess supporting at least the EPCC benchmarks seems useful for now.

mjklemm commented 3 years ago

I have opened PR #24 for this. I'm working on the GCC entrypoint now, hoping to have t ready soon.