LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-30-2010, 12:49 AM   #1
Tynged
LQ Newbie
 
Registered: Jun 2010
Location: United States
Distribution: Yellow Dog Linux 6.2, CentOS 5.4, Easy Peasy 1.6
Posts: 7

Rep: Reputation: 0
Problems executing with OpenMP on YDL 6.2


I am running Yellow Dog Linux release 6.2(Pyxis) on my PS3. I would like to compile and run C programs that utilize OpenMP for parallel programming. Unfortunately, I have not been very successful.

I am able to compile programs containing OpenMP statements error free, but when I attempt to execute the binaries I receive the following error:

Code:
./file: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory
Compiling programs without OpenMP statements works fine.

Because it has to do something with missing libraries, I am not sure if knowing the executable search paths may help in diagnosis, but when echoing the path environment variable:
Code:
#echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
As a possible point-of-interest, after rooting through various directories, I found "libgomp.so" under the path "/usr/lib/gcc/ppc64-yellowdog-linux/4.1.2/", but no "libgomp.so.1".

The version of GCC on this machine, 4.1.2 20080704 (Red Hat 4.1.2-44), is identical to the ones I have on two other machines (CentOS release 5.3 (Final) and CentOS release 5.4 (Final)) and they both compile and execute OpenMP code flawlessly.

I have tried building and installing another version of GCC that would possibly include the OpenMP libraries, since, according to some sources, GCC has only supported OpenMP since version 4.2. But I have not been successful with that either (that problem would make a good second thread.)

I would greatly appreciate any tips or pointing in the right direction.

-- Tynged
 
Old 06-30-2010, 01:04 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Have you tried to create a symlink called libgomp.so.1 in /usr/lib/gcc/ppc64-yellowdog-linux/4.1.2/ (or another directory where the system looks for libs) that points to the libgomp.so that you found?

On systems where it works, you can check using find or locate (might have to run updatedb first) and next follow the links (if any).
 
Old 07-02-2010, 12:43 AM   #3
Tynged
LQ Newbie
 
Registered: Jun 2010
Location: United States
Distribution: Yellow Dog Linux 6.2, CentOS 5.4, Easy Peasy 1.6
Posts: 7

Original Poster
Rep: Reputation: 0
After doing updatedb, I tried find / -name libgomp* which yielded:

/usr/lib/gcc/ppc64-yellodog-linux/4.1.1/libgomp.so
/usr/lib/gcc/ppc64-yellodog-linux/4.1.1/libgomp.a
/usr/lib/gcc/ppc64-yellodog-linux/4.1.1/64/libgomp.so
/usr/lib/gcc/ppc64-yellodog-linux/4.1.1/64/libgomp.a
/usr/lib/gcc/ppc64-yellodog-linux/4.1.1/libgomp.spec


locate libgomp gave the same results (except they're alphabetical this time!):

/usr/lib/gcc/ppc64-yellodog-linux/4.1.1/libgomp.a
/usr/lib/gcc/ppc64-yellodog-linux/4.1.1/libgomp.so
/usr/lib/gcc/ppc64-yellodog-linux/4.1.1/libgomp.spec
/usr/lib/gcc/ppc64-yellodog-linux/4.1.1/64/libgomp.a
/usr/lib/gcc/ppc64-yellodog-linux/4.1.1/64/libgomp.so

All-in-all, no libgomp.so.1 file to be found.

Incidentally, the 4.1.2 directory I was looking in before is just a link to the 4.1.1 directory seen above.

After all this I created a symlink using the command "ln -s libgomp.so libgomp.so.1" within the "/usr/lib/gcc/ppc64-yellowdog-linux/4.1.1/" directory. It seemed to be successful.

Recompiling and executing the code for the OpenMP program resulted in the same error as before (./file: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory). So I tried adding that directory to the LD_LIBRARY_PATH using "export LD_LIBRARY_PATH=/usr/lib/gcc/ppc64-yellowdog-linux/4.1.1/". Recompiling and executing I receive a new message: Illegal instruction. I also tried all the same things in the "/usr/lib/gcc/ppc64-yellowdog-linux/4.1.1/64/" directory to no avail. So I'm rather stumped.

How would I find which directories my system looks for libraries, is there a search path environment variable for libraries? Would linking a file in one of these directories to point to the libgomp.so file be more successful than linking from within the 4.1.1 directory? Do you have any other possible suggestions?

Thanks for the help so far!
 
Old 07-07-2010, 09:39 PM   #4
Tynged
LQ Newbie
 
Registered: Jun 2010
Location: United States
Distribution: Yellow Dog Linux 6.2, CentOS 5.4, Easy Peasy 1.6
Posts: 7

Original Poster
Rep: Reputation: 0
I ended up finding a simple solution to my problem.

Yellow Dog Linux comes prepackaged with the CBEA SDK for Cell programming, which is one of the reasons I chose that distro for my PS3. However the non-enterprise (no cost) distro of YDL does not support OpenMP from the start. You have to install the OpenMP libraries after you finish installing YDL for the first time on your PS3. Simply use Yellodog Updater, Modified (YUM) to install them:

Quote:
yum install libgomp
For YDL 6.2 it will install two short updates and then your OpenMP programs will execute successfully!
 
  


Reply

Tags
gcc412, openmp, ydl


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I have multiple problems on YDL for the PS3. YDLPS3User Linux - Newbie 0 10-17-2007 11:09 AM
YDL 5.0 Sound issues, YDL 5.0 japanese typing help please aa7bb Linux - Newbie 1 12-07-2006 10:17 AM
YDL Noob having problems with USB mouse on Mac hindenbergbaby Linux - Hardware 0 06-16-2004 10:54 AM
New YDL install on an iBook, 6 problems looking for solutions Castaa Linux - Newbie 3 04-02-2004 12:32 PM
problems installing/logging into YDL 3.0 idontknowwhoiam Linux - Newbie 0 11-05-2003 12:42 AM


All times are GMT -5. The time now is 12:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration