1 year ago

#379291

test-img

Saram Abbas

Cannot find directory for linker -lgomp

I am on an M1 Mac and I have Homebrew GCC installed. I am trying to multithread using OpenMP.

I have a setup.py file containing:

                  sources = ['pyTsetlinMachineParallel/ConvolutionalTsetlinMachine.c', 'pyTsetlinMachineParallel/MultiClassConvolutionalTsetlinMachine.c', 'pyTsetlinMachineParallel/Tools.c'],
                  include_dirs=['pyTsetlinMachineParallel'],
                  extra_compile_args=['-fopenmp'],
                  extra_link_args=['-L/usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11 -lgomp' ])  

When I build the file, I get the error:

ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11 -lgomp'

In /usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11 I have these files: libgomp.1.dylib libgomp.a libgomp.dylib libgomp.spec

What am I getting wrong?

gcc

linker

openmp

python-c-api

0 Answers

Your Answer

Accepted video resources