Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: /home/dancer/anaconda3/envs/ToCo/lib/python3.7/site-packages/bilateralfilter-0.1-py3.7-linux-x86_64.egg/_bilateralfilter.cpython-37m-x86_64-linux-gnu.so: undefined symbol: omp_get_thread_num #31

Open
Italy2006 opened this issue Jun 5, 2023 · 3 comments

Comments

@Italy2006
Copy link

when i try "from bilateralfilter import bilateralfilter, bilateralfilter_batch":
(i have append.the path of lib.linux-x86_64-3.7, but it seems not work)

ImportError: /home/dancer/anaconda3/envs/ToCo/lib/python3.7/site-packages/bilateralfilter-0.1-py3.7-linux-x86_64.egg/_bilateralfilter.cpython-37m-x86_64-linux-gnu.so: undefined symbol: omp_get_thread_num

@ababba12
Copy link

hi did you solve this problem? i met the same error

@shifan-Z
Copy link

I met the same error, too.

@hahahehe-coder
Copy link

You can comment out all the places where omp appears.
For example, in bilateralfilter.cpp:

void bilateralfilter_batch(float * images, int len_images, float * ins, int len_ins, float * outs, int len_outs,
                              int N, int K, int H, int W, float sigmargb, float sigmaxy){
    
    //const int maxNumThreads = omp_get_max_threads();
    //printf("Maximum number of threads for this machine: %i\n", maxNumThreads);
    //omp_set_num_threads(std::min(maxNumThreads,N));
    
    // #pragma omp parallel for
    for(int n=0;n<N;n++){
        bilateralfilter(images+n*3*H*W, 3*H*W, ins+n*K*H*W, K*H*W, outs+n*K*H*W, K*H*W,
                              H, W, sigmargb, sigmaxy);
    }
    //printf("parallel for\n");
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants