LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-23-2012, 01:45 PM   #16
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,107

Rep: Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114

Edit: I did a google search after posting the info below. The only relevant looking hit I found listed that same error message as a symptom of a bug fixed in the Intel compiler version 11.1. What version do you have and what level of downloading patches have you done?

The error still might be a result of user error, so what I originally wrote might still apply:
-----------------------------------------------
Did you turn on multi-file optimization on purpose?

I've never gotten that to work. I work on big projects that are probably too big for Intel's multi-file optimization. I'm sure that if you give the right commands, that optimization can work for reasonable size projects. But I've never had occasion to want it in a reasonable size project.

If you didn't purposely turn it on, it should be easy to fix your command line to not turn it on.

If you do want multi-file optimization, I think you will need to read some tutorial on how to use it. Or ask in an Intel forum. Maybe start a new thread specifically about Intel Compiler multi-file optimization.

Anyway, I can't tell you how to use it.

Last edited by johnsfine; 12-23-2012 at 01:54 PM.
 
Old 12-25-2012, 12:38 AM   #17
dalal
LQ Newbie
 
Registered: Dec 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
I am tring to run the Example using QR factorization in plasma(example_cgeqrf.c)
for compiling I run gcc-c pt.c -I/home/dalal/plasma-installer_2.5.0/plasma-installer_2.5.0b1/install/include
no problems in compiling.
for linking I run gcc -o exe pt2.o -L/home/dalal/plasma-installer_2.5.0/plasma-installer_2.5.0b1/install/lib -lplasma -lquark -lpthread -llapacke -lcoreblas -lcblas -ltmg -llapack -lm -L/opt/intel/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core

also there is no error but to execute:
./exe it give me the following error:
./exe: symbol lookup error: ./exe: undefined symbol: LAPACKE_cgeqr2_work

can you please help me to understand what going on and fix it?
Thanks

Last edited by dalal; 12-25-2012 at 04:47 AM.
 
Old 12-25-2012, 06:58 AM   #18
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,107

Rep: Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114
After linking, you can use the following command to find out what .so files your exe depends on and whether those can be found with the default load time search for .so files

ldd exe

Please post the output of that. Before I can deduce any details of why a symbol might be missing at load time, I need to understand what .so files are needed/found.

But my best guess based on just the info you provided is that the linker found some version of liblapacke.so at link time, but the loader found a different version at load time. You need the one found at load time to be the same as the one found at link time.

There are a few different ways to control which .so files are found during load time. One way is to set the LD_LIBRARY_PATH environment variable before running the exe. Another is to specify the full path of the .so to the linker.

The first method could be done with a command such as
Code:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/dalal/plasma-installer_2.5.0/plasma-installer_2.5.0b1/install/lib
In many of my projects, I have a tiny bash script for executing the program. The script sets LD_LIBRARY_PATH then executes the program. If you are doing the command manually rather than in a script, only do it once per shell session; don't do it again each time you run the exe.

I think the second method can be accomplished by using the full path and name of the .so file without a -l instead of -llapacke

Check the directory listing to be sure, but I think that full path and name might be:
/home/dalal/plasma-installer_2.5.0/plasma-installer_2.5.0b1/install/lib/liblapacke.so

I hope some other expert comments here. I'm not entirely confident the methods I have used for forcing the right .so to be found are best practice.

Last edited by johnsfine; 12-25-2012 at 07:14 AM.
 
Old 12-25-2012, 07:02 AM   #19
dalal
LQ Newbie
 
Registered: Dec 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
linux-vdso.so.1 => (0x00007fffb19ff000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003576000000)
libm.so.6 => /lib64/libm.so.6 (0x0000003576800000)
libmkl_intel_lp64.so => /opt/share/INTEL/v11.1.075.app/ifort/mkl/lib/em64t/libmkl_intel_lp64.so (0x00007f7a8a70c000)
libmkl_sequential.so => /opt/share/INTEL/v11.1.075.app/ifort/mkl/lib/em64t/libmkl_sequential.so (0x00007f7a89dd5000)
libmkl_core.so => /opt/share/INTEL/v11.1.075.app/ifort/mkl/lib/em64t/libmkl_core.so (0x00007f7a89918000)
libc.so.6 => /lib64/libc.so.6 (0x0000003575c00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003575400000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003575800000)
 
Old 12-25-2012, 07:09 AM   #20
dalal
LQ Newbie
 
Registered: Dec 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
Actually I am not so familiar with these things, how you do know this is the reosone of this that error?, what i have to change now?

thanks
 
Old 12-25-2012, 07:18 AM   #21
dalal
LQ Newbie
 
Registered: Dec 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
still give the same error!!!!!!!!!!
 
Old 12-25-2012, 07:19 AM   #22
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,107

Rep: Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114
After seeing your ldd output I'm confused. Everything I guessed about liblapacke.so seems to be incorrect.
 
Old 12-25-2012, 07:31 AM   #23
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,107

Rep: Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114
The sequence of the -l options in the link command matters. Generally you want high level packages before low level packages.

In my experience, an undefined symbol error caused by a sequence problem is reported at link time, not at load time. But maybe it is that kind of problem anyway.

When it is difficult to figure out the perfect sequence, you can fix the problem by repeating some of the -l options at the end of the command line.

Try adding another copy of -llapacke at the end of your link command line. If that changes any link time or load time behavior that indicates the problem was sequencing of -l options. If it doesn't change any behavior the problem was something else.

If adding that changes which symbols are undefined then the problem was sequence of -l options, but duplicating that one at the end wasn't enough to fix it (more rearrange or duplication of -l options is required).

Last edited by johnsfine; 12-25-2012 at 07:33 AM.
 
Old 12-25-2012, 07:37 AM   #24
dalal
LQ Newbie
 
Registered: Dec 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
no changes the same error.
 
Old 12-25-2012, 07:42 AM   #25
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,107

Rep: Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114
Where is liblapacke.a and/or liblapacke.so ?

If the linker didn't find that file at all, I'd expect an error at link time, which you haven't mentioned. But something is going wrong with use of that file at link time, so you need to start from there.
 
Old 12-25-2012, 07:51 AM   #26
dalal
LQ Newbie
 
Registered: Dec 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
liblapacke.a is in plasma-installer_2.5.0/ plasma-installer_2.5.0b1/install/lib
there is any command to find the path of liblapacke.so ?
 
Old 12-25-2012, 07:56 AM   #27
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,107

Rep: Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114
The linker only uses one or the other of those two files. I wasn't sure which. Since the .a is where the -L told the linker to find it, I assume that is the one the linker used.

At the moment, I have no idea why that undefined symbol would be reported at load time. If the symbol were needed and missing that should have been reported at link time.

No google search results exactly matched your issue, but one result hinted at a possibility:
http://icl.cs.utk.edu/plasma/forum/v...c.php?f=2&t=67

You might have installed a version of lapack that is too old to be compatible with your version of plasma.

Last edited by johnsfine; 12-25-2012 at 08:00 AM.
 
Old 12-29-2012, 02:22 AM   #28
dalal
LQ Newbie
 
Registered: Dec 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
Iam tring to run example_dpotrf in plasma, no problem in compliling and linking but when I excute it it give me:
Floating point exception

what the mean of this? how I can solve this error?

Thanks
 
Old 12-29-2012, 02:47 AM   #29
dalal
LQ Newbie
 
Registered: Dec 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
I am tring to run example_dpotrf in plasma, no problems in compiling nor in linking, but when I excute it, it gives:
Floating point exception.

what is the mean of this error and how to solve this problem?
Thanks
 
Old 12-29-2012, 07:36 AM   #30
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,107

Rep: Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114Reputation: 1114
I'm not sure why floating point exceptions are turned on in your example. I thought they were turned off by default.

There should be some way to turn them off. Try google yourself this time.

Various operations such as divide by zero produce floating point exceptions if those are enabled, but produce INF and NaN values if floating point exceptions are disabled. So the problem may be that your data is bad. If you had better data, you could avoid the floating point exceptions without disabling them.
 
  


Reply


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
Error while running perl code to access Oracle spreadsheet umesh_linuxq Linux - Software 1 04-12-2012 07:37 PM
Error while signing a compiled code for Exadigm PoS running Arm-Linux sunnyben Linux - Newbie 0 05-02-2010 01:29 PM
Facing error while running "g++ 3.4.4" code in "g++ 4.3.3" Suranjit Ubuntu 2 10-08-2009 11:22 PM
Error in Perl Code : Bad switch statement(Problem in code block)? near ## line # suyog255 Programming 4 02-20-2008 05:35 PM


All times are GMT -5. The time now is 01:17 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