Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Amlesh_K_
Beginner
130 Views

Completely removing the Intel Runtime Library

Hi,

I am running the following program -

 
#include<iostream>
#include<omp.h>
using namespace std;
int main(){
        unsigned i;
#pragma omp parallel for 
        for(i=0 ;i < 20 ;i++)
                cout<<"Thread id: "<<omp_get_thread_num()<<" i value: "<<i<<endl;
        return 0;
}

 

 
using the GCC 5.2.1 20150902 (Red Hat 5.2.1-2) compiler.
 
I encounter the following error during link time.
 
g++ -fopenmp test_omp.cpp 
/tmp/ccIuzTDT.o: In function `main':
test_omp.cpp:(.text+0x19): undefined reference to `GOMP_parallel'
collect2: error: ld returned 1 exit status
 
I also tried the flag -lgomp, but got negative results.
 
I think it has something to do with the Intel Runtime library. Earlier intel compilers were installed. I removed them by following the procedure in the following link

https://software.intel.com/en-us/articles/uninstall-intel-compiler-for-linux-when-uninstallsh-is-missing-or-not-functioning.
 

I have confirmed that the error is not due to any other packages installed.

 

Please help me to remove the complete Intel Runtime library.

 

Thanks.

0 Kudos
6 Replies
TimP
Black Belt
130 Views

This doesn't appear to be a problem which could be provoked by icc installation.

MalReddy_Y_Intel
Employee
130 Views

Agree with Tim, Intel runtime library will be installed in different path So icc installation may not disturb the g++ environment.

Can you please check the gcc's libgomp.so installed path ? Something as below.

#g++ -fopenmp -Wl,-y,GOMP_parallel ompdll.cpp
/tmp/cct09q9u.o: reference to GOMP_parallel
/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../lib64/libgomp.so: definition of GOMP_parallel
#icpc -fopenmp -Wl,-y,GOMP_parallel ompdll.cpp

../compiler/lib/intel64/libiomp5.so: definition of GOMP_parallel

Thanks,

Reddy

 

Amlesh_K_
Beginner
130 Views

Hi,
 
I executed the following command and I got many instances of libgomp library file as follows:
 
 sudo locate  libgomp.so
/home/ankita/cilkplus-gcc/b-gcc/prev-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so
/home/ankita/cilkplus-gcc/b-gcc/prev-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1
/home/ankita/cilkplus-gcc/b-gcc/prev-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1.0.0
/home/ankita/cilkplus-gcc/b-gcc/stage1-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so
/home/ankita/cilkplus-gcc/b-gcc/stage1-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1
/home/ankita/cilkplus-gcc/b-gcc/stage1-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1.0.0
/home/ankita/cilkplus-gcc/b-gcc/x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so
/home/ankita/cilkplus-gcc/b-gcc/x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1
/home/ankita/cilkplus-gcc/b-gcc/x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1.0.0
/home/rintu/Galois/gcc-4.8.4/prev-x86_64-unknown-linux-gnu/32/libgomp/.libs/libgomp.so
/home/rintu/Galois/gcc-4.8.4/prev-x86_64-unknown-linux-gnu/32/libgomp/.libs/libgomp.so.1
/home/rintu/Galois/gcc-4.8.4/prev-x86_64-unknown-linux-gnu/32/libgomp/.libs/libgomp.so.1.0.0
/home/rintu/Galois/gcc-4.8.4/prev-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so
/home/rintu/Galois/gcc-4.8.4/prev-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1
/home/rintu/Galois/gcc-4.8.4/prev-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1.0.0
/home/rintu/Galois/gcc-4.8.4/stage1-x86_64-unknown-linux-gnu/32/libgomp/.libs/libgomp.so
/home/rintu/Galois/gcc-4.8.4/stage1-x86_64-unknown-linux-gnu/32/libgomp/.libs/libgomp.so.1
/home/rintu/Galois/gcc-4.8.4/stage1-x86_64-unknown-linux-gnu/32/libgomp/.libs/libgomp.so.1.0.0
/home/rintu/Galois/gcc-4.8.4/stage1-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so
/home/rintu/Galois/gcc-4.8.4/stage1-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1
/home/rintu/Galois/gcc-4.8.4/stage1-x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1.0.0
/home/rintu/Galois/gcc-4.8.4/x86_64-unknown-linux-gnu/32/libgomp/.libs/libgomp.so
/home/rintu/Galois/gcc-4.8.4/x86_64-unknown-linux-gnu/32/libgomp/.libs/libgomp.so.1
/home/rintu/Galois/gcc-4.8.4/x86_64-unknown-linux-gnu/32/libgomp/.libs/libgomp.so.1.0.0
/home/rintu/Galois/gcc-4.8.4/x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so
/home/rintu/Galois/gcc-4.8.4/x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1
/home/rintu/Galois/gcc-4.8.4/x86_64-unknown-linux-gnu/libgomp/.libs/libgomp.so.1.0.0
/home/rintu/Galois/objdir/lib/libgomp.so
/home/rintu/Galois/objdir/lib/libgomp.so.1
/home/rintu/Galois/objdir/lib/libgomp.so.1.0.0
/home/rintu/Galois/objdir/lib64/libgomp.so
/home/rintu/Galois/objdir/lib64/libgomp.so.1
/home/rintu/Galois/objdir/lib64/libgomp.so.1.0.0
/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/libgomp.so
/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/32/libgomp.so
/opt/gcc-cilkplus-install/lib64/libgomp.so
/opt/gcc-cilkplus-install/lib64/libgomp.so.1
/opt/gcc-cilkplus-install/lib64/libgomp.so.1.0.0
/opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/libgomp.so
/opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/32/libgomp.so
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/libgomp.so
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/32/libgomp.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/libgomp.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libgomp.so
/usr/lib64/libgomp.so.1
/usr/lib64/libgomp.so.1.0.0
 
Should I delete the cilk plus's libgomp files? It was installed by a previous user and I don't require it any more.
 
Note: I don't have the problem when I use gcc 4.4 or gcc 4.7. Its only when I am using gcc version more than 4.9.
 
Thanks.
Kittur_G_Intel
Employee
130 Views

Hi,
I can't reproduce the issue on my system as well.  I think a clean install of the compiler and a corresponding clean GNU distro won't show this issue. So, my assumption is if you don't need that which was installed by the previous user then you should do so and try it out.

This was an issue a few years ago with Intel openmp runtime https://software.intel.com/en-us/articles/gcc-49-openmp-code-cannot-be-linked-with-intel-openmp-runt...  but that's not the case now with the latest releases.

Kittur

Amlesh_K_
Beginner
130 Views

Hi Kittur, Mal. and Tim,

 

Thanks a lot.

Kittur_G_Intel
Employee
130 Views

Our pleasure, Amlesh. Thanks for using the product and bringing up issues to our attention.

Kittur.

Reply