shashikiran
shashikiran

Reputation: 379

Execute Openmp program in LLVM-3.0

I generated a .ll file using llvm-gcc for a Openmp program(written in c).
Then Optimized using opt(version 3.0)
But when I try to execute the optimized .ll file using lli or llvm-ld, getting the following errors,

        LLVM ERROR: Program used external function 'GOMP_parallel_start' which could not be resolved!

Here is the step I followed,

   $ llvm-gcc -emit-llvm loop11.c -fopenmp -o loop.ll -S
   $ opt -O3  loop.ll -o loop.opt.ll -S
   $ lli loop.opt.ll
    LLVM ERROR: Program used external function 'GOMP_parallel_start' which could not be resolved!

Please help me to solve this problem.
Thanks in advance.

Upvotes: 1

Views: 409

Answers (1)

Anton Korobeynikov
Anton Korobeynikov

Reputation: 9324

You have to link / load the OpenMP runtime, libgomp in this case.

Upvotes: 3

Related Questions