Shared Library issue

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:


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

results = one + two



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



I compile the library:

pgf90 -g -c -fpic addtwo.f90

pgf90 -o -shared addtwo.o

I compile the program:

pgf90 -o tester -g tester.f90

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 cannot be loaded, file not found.

I do not have this problem when running pgdbg 6.

Any help would be appreciated.

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,

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.



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?

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

  • Mat


I have tried this in two different environments. Here is what I found:

Centos 5 PGI 7.1-5
The debugger will run the main routine when the shared libraries are in the default library directory (/usr/lib) but the debugger cannot find the source for the libraries.
I still get a library load error of a NULL address in the command window.

Centos 5 PGI 7.2-5 (Trial license)
The debugger will run the main routine if the shared library is in the default library directory (/usr/lib) and it also finds the library source.

Hopefully this will help.

Ron C.

Hi Ronald,

Thanks for the information. The tools team has made several improvements in regards to shared library debugging, but obviously have some room for improvements.

I’ve made our Tool’s manager aware of the additional problems. However, they are currently hard at work on some very cool (and useful!) improvements to the PGI profiler (PGPROF) so addition improvements to shared library debugging wont be available for the PGI 8.0 release. I do apologize for the inconvenience and hope the 7.2 release will be sufficient for now.

Best Regards,