Skip to content

[OMP_OFFLOAD_LLVM] Undefined references to .omp_offloading symbols #1399

@dmikushin

Description

@dmikushin

By testing

flang -O2 -fopenmp -fopenmp-targets=x86_64 /openmp-offload-example/src/example.f90 -o /openmp-offload-example/build/example

I get a linking error:

/usr/bin/ld: /tmp/example-49d1c7.o:(.rodata+0x0): undefined reference to `.omp_offloading.img_start.nvptx64-nvidia-cuda'
/usr/bin/ld: /tmp/example-49d1c7.o:(.rodata+0x8): undefined reference to `.omp_offloading.img_end.nvptx64-nvidia-cuda'
/usr/bin/ld: /tmp/example-49d1c7.o:(.rodata+0x10): undefined reference to `.omp_offloading.entries_begin'
/usr/bin/ld: /tmp/example-49d1c7.o:(.rodata+0x18): undefined reference to `.omp_offloading.entries_end'
/usr/bin/ld: /tmp/example-49d1c7.o:(.rodata+0x30): undefined reference to `.omp_offloading.entries_begin'
/usr/bin/ld: /tmp/example-49d1c7.o:(.rodata+0x38): undefined reference to `.omp_offloading.entries_end'

Instead of following my -fopenmp-targets=x86_64 command, Flang gives me offloading to NVIDIA. "I no longer have a motorcycle, but the habit remains" (c)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions