PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Shared Library issue
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
Ronald Charlton



Joined: 26 Jul 2006
Posts: 6

PostPosted: Mon Sep 08, 2008 10:45 am    Post subject: Shared Library issue Reply with quote

I have compiled my shared libraries that I used under PGI 6 with PGI 7.

The debugger will not load the libraries using the version 7 debugger. I receive an error message "Dynamic Library Load address should not be null" in the command window.

I created a very simple library that adds two numbers:

addtwo.f90

subroutine addtwo(ine,two, results)
real :: one, two, results

results = one + two

return

end

I created a simple main program tester.f90

program tester

real: three, four, five

three = 2.5
four = 2.45

call addtwo(three, four, five)

write (*, '(A, 3(F8.4))') 'this is a simple test: ', three four, five

stop

end

I compile the library:

pgf90 -g -c -fpic addtwo.f90

pgf90 -o lib.addtwo.so -shared addtwo.o

I compile the program:

pgf90 -o tester -g tester.f90 lib.addtwo.so

I move the .so file into a local directory I have included in LD_LIBRARY_PATH

The program runs without error.

when I start pgdbg the main program loads. I set a breakpoint and click run.

The program exits with a mesage of : dynamic load address shoudl not be null in the command window, and a message of lib.addtwo.so cannot be loaded, file not found.

I do not have this problem when running pgdbg 6.

Any help would be appreciated.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6119
Location: The Portland Group Inc.

PostPosted: Mon Sep 08, 2008 12:51 pm    Post subject: Reply with quote

Hi Ronald,

Thanks for the report. I have sent a technical problem report (TPR#15170) to our tools team for further investigation. I have my ideas as to the problem, but will let them look into it further and will update this post when more information becomes available.

Note I was able to read the shared object when it was located in the same directory where it was built. Hopefully you can use this as a work around until the problem is resolved.

Best Regards,
Mat
Back to top
View user's profile
Ronald Charlton



Joined: 26 Jul 2006
Posts: 6

PostPosted: Mon Sep 08, 2008 1:01 pm    Post subject: Reply with quote

I had the library in both locations t the same time when I ran this test, but I will check this again.

I will also try this with my application as well to see if this helps.

Thanks

Ron
Back to top
View user's profile
Ronald Charlton



Joined: 26 Jul 2006
Posts: 6

PostPosted: Wed Sep 10, 2008 8:43 am    Post subject: Reply with quote

I have tried this again and with or without the shared library in the sorking directory, the debugger does not find it.

I am running 7.1-6 I believe. Perhaps this is a difference between 7.1 and 7.2?
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6119
Location: The Portland Group Inc.

PostPosted: Thu Sep 11, 2008 10:26 am    Post subject: Reply with quote

Most likely Our tools team have fixed some issue with debugging shared objects but obviously have a few more issues to address.

- Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group