Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

IA64 Analyze/Object doesn't process all modules in a file

Glenn Wolf
Advisor

IA64 Analyze/Object doesn't process all modules in a file

Environment: OpenVMS V8.3, HP Fortran V8.1-1-104930-50GBS

I have a function in Fortran that is contained in a source file which also contains about 16 other subroutines and functions (it being the last one in the file). When I do Analyze/object on the F90 output (on Itanium), it only reports information on some of the modules. To get the analyze/object output for the last function in the file, I had to copy the function out into a source file containing only that function, compile and analyze/object that file. Sometimes (dependent on what sections I chose???) I get analysis output for only the first module in the source file; other times it would give me the first 4 (of 17) modules.

For example:
DEV01>search lotinfoutil.for subroutine,function/match=or
integer*4 function SSPLIS_LotInfoUtil_RLock()
integer*4 function SSPLIS_LotInfoUtil_WLock()
integer*4 function SSPLIS_LotInfoUtil_Unlock()
subroutine SspLis_LotInfoUtil_CheckExprBuff (dispInfo, exprBufResetLimit)
integer*4 function SspLis_LotInfoUtil_ExprBuffUsage (exprBuff)
subroutine SspLis_LotInfoUtil_InitLotInfoGlb ()
subroutine SspLis_LotInfoUtil_InitLotInfoRec (lotInfoRec)
subroutine SspLis_LotInfoUtil_InitComputedFields (lotInfoRec)
subroutine SspLis_LotInfoUtil_LoadIni
subroutine SspLis_LotInfoUtil_AddCompLot (compTime, lotId)
subroutine SspLis_LotInfoUtil_CleanCompLot (compTime)
subroutine SspLis_LotInfoUtil_TlogInfo (primRecSent, secRecApplied)
subroutine SspLis_LotInfoUtil_PublishSysLogEvent (eventType, eventTime)
logical*4 function SspLis_LotInfoUtil_IsRunning (state)
logical*4 function SspLis_LotInfoUtil_IsOnHold (state)
integer*4 function SspLis_LotInfoUtil_DispatchString
integer*4 function SspLis_LotInfoUtil_DispString
DEV01>analyze/image/section=all lotinfoutil.obj/out=lotinfoutil.ana
DEV01>type/page lotinfoutil.ana


Analyze Image 27-JUL-2007 14:56:37.94 Page 1
USER1:[DEV01.SSP.LIS]LOTINFOUTIL.OBJ;1
ANALYZ I01-51

Analyzing 4 Elf object modules
----------^
[...]

It says it is only analyzing 4 object modules out of the 17 in the file. But it actually puts the symbols for 5 of the 17 in the output (but not the one I care about, the last one):
DEV01>pipe search lotinfoutil.ana symbol,"(",")","SSPLIS_"/match=and|sort sys$pipe sys$output/nodup

00000850 00000180 Symbol 16. (00000010) "SSPLIS_LOTINFOUTIL_RLOCK"
000019F0 00000180 Symbol 16. (00000010) "SSPLIS_LOTINFOUTIL_WLOCK"
00002C10 00000180 Symbol 16. (00000010) "SSPLIS_LOTINFOUTIL_UNLOCK"
00005600 000001B0 Symbol 18. (00000012) "SSPLIS_LOTINFOUTIL_CHECKEXPRBUFF"
00005690 00000240 Symbol 24. (00000018) "SSPLIS_LOTINFOUTIL_EXPRBUFFUSAGE"

Is this a documented behavior? I can't find any analyze/object switch that allows me get the data about the later modules in the file.

If this has been answered, please point me to that entry.

I can post the analysis output anyone is that interested.
8 REPLIES
John Gillings
Honored Contributor

Re: IA64 Analyze/Object doesn't process all modules in a file

Glenn,

What you describe looks like a bug to me. I'd recommend you log a case with HP customer support.

That said, the meaning of "module" and "routine" is not always clear cut. I'd do some sanity checks. Try inserting the object module into a library and see what the librarian considers to be modules:

$ LIBRARY/CREATE/OBJ TEST lotinfoutil.obj
$ LIB/LIST/NAMES TEST

You may be able to use the librarian as a workaround to split the object file into individual module files, which presumably will be visible to ANALYZE.
A crucible of informative mistakes
Volker Halle
Honored Contributor

Re: IA64 Analyze/Object doesn't process all modules in a file

Glen,

> DEV01>analyze/image/section=all lotinfoutil.obj/out=lotinfoutil.ana

To analyze an object file it's recommended to use analyze/object.

Analyze/image will switch into the object mode and it should work. But object files can contain multiple object modules - which are Elf objects - but image files can contain only one image - which is one Elf object.

To get the symbol tables, it is sufficient to request /section=symtab.

To check if all object modules are processed check the Elf headers. Requesting the symbol tables also displays the Elf headers.
Together with the section header table information and the file size it should be possible to determine if all modules are processed.

So please, post the output of ANALYZE/OBJECT/SECTION=SYMTAB and a DIR/SIZE for the object file. That's also the minimum amount of information HP support needs to analyze if there is a problem. But the whole object file is a better input.

Volker (just the messenger).
Glenn Wolf
Advisor

Re: IA64 Analyze/Object doesn't process all modules in a file

The librarian thinks there are 17 "modules" in the object file.

> $ LIBRARY/CREATE/OBJ TEST lotinfoutil.obj
> $ LIB/LIST/NAMES TEST

DEV01>lib/cre/obj test lotinfoutil.obj
DEV01>lib/list/names test
Directory of ELF OBJECT library USER1:[DEV01.SSP.LIS]TEST.OLB;1 on 30-JUL-2007 10:49:43
Creation date: 30-JUL-2007 10:49:33 Creator: Librarian I01-37
Revision date: 30-JUL-2007 10:49:33 Library format: 6.0
Number of modules: 17 Max. key length: 1024
Other entries: 17 Preallocated index blocks: 213
Recoverable deleted blocks: 0 Total index blocks used: 8
Max. Number history records: 20 Library history records: 0

Module SSPLIS_LOTINFOUTIL_ADDCOMPLOT
SSPLIS_LOTINFOUTIL_ADDCOMPLOT

Module SSPLIS_LOTINFOUTIL_CHECKEXPRBUFF
SSPLIS_LOTINFOUTIL_CHECKEXPRBUFF

Module SSPLIS_LOTINFOUTIL_CLEANCOMPLOT
SSPLIS_LOTINFOUTIL_CLEANCOMPLOT

Module SSPLIS_LOTINFOUTIL_DISPATCHSTRING
SSPLIS_LOTINFOUTIL_DISPATCHSTRING

Module SSPLIS_LOTINFOUTIL_DISPSTRING
SSPLIS_LOTINFOUTIL_DISPSTRING

Module SSPLIS_LOTINFOUTIL_EXPRBUFFUSAGE
SSPLIS_LOTINFOUTIL_EXPRBUFFUSAGE

Module SSPLIS_LOTINFOUTIL_INITCOMPUTEDFIELDS
SSPLIS_LOTINFOUTIL_INITCOMPUTEDFIELDS

Module SSPLIS_LOTINFOUTIL_INITLOTINFOGLB
SSPLIS_LOTINFOUTIL_INITLOTINFOGLB

Module SSPLIS_LOTINFOUTIL_INITLOTINFOREC
SSPLIS_LOTINFOUTIL_INITLOTINFOREC

Module SSPLIS_LOTINFOUTIL_ISONHOLD
SSPLIS_LOTINFOUTIL_ISONHOLD

Module SSPLIS_LOTINFOUTIL_ISRUNNING
SSPLIS_LOTINFOUTIL_ISRUNNING

Module SSPLIS_LOTINFOUTIL_LOADINI
SSPLIS_LOTINFOUTIL_LOADINI

Module SSPLIS_LOTINFOUTIL_PUBLISHSYSLOGEVENT
SSPLIS_LOTINFOUTIL_PUBLISHSYSLOGEVENT

Module SSPLIS_LOTINFOUTIL_RLOCK
SSPLIS_LOTINFOUTIL_RLOCK

Module SSPLIS_LOTINFOUTIL_TLOGINFO
SSPLIS_LOTINFOUTIL_TLOGINFO

Module SSPLIS_LOTINFOUTIL_UNLOCK
SSPLIS_LOTINFOUTIL_UNLOCK

Module SSPLIS_LOTINFOUTIL_WLOCK
SSPLIS_LOTINFOUTIL_WLOCK

DEV01>
> To analyze an object file it's recommended
> to use analyze/object.

Sorry for the confusion. I was using Analyze/Object, but in "prettying up" the commands to post here, I substituted /image for /Object. Somehow, when I type "Analyze/", "Image" always follows, no matter what I mean :>
> To check if all object modules are
> processed check the Elf headers. Requesting
> the symbol tables also displays the Elf
> headers.
> Together with the section header table
> information and the file size it should be
> possible to determine if all modules are
> processed.

> So please, post the output of
> ANALYZE/OBJECT/SECTION=SYMTAB and a
> DIR/SIZE for the object file. That's also
> the minimum amount of information HP
> support needs to analyze if there is a
> problem. But the whole object file is a
> better input.

DEV01>dir /size lotinfoutil.obj

Directory USER1:[DEV01.SSP.LIS]

LOTINFOUTIL.OBJ;1 594

Total of 1 file, 594 blocks.
DEV01>

I've attached the output from analyze/object/section=symtab/out=root:[temp]lotinfoutil.ana lotinfoutil.obj

Thanks;

Glenn
John Gillings
Honored Contributor

Re: IA64 Analyze/Object doesn't process all modules in a file

Glenn,

If ANALYZE sees a different number of modules than LIBRARIAN, that's a bug. Please report it to HP Customer Support, send them a copy of the errant file.

There's not a lot this forum can do about bugs apart from recommending they get reported (or hoping that an HP engineer sees this thread, BUT without a formal report from a customer, there's not always much they can do about it).

If you need to analyze all the modules, use LIBRARIAN to extract modules into separate object files:

$ LIBRARY/EXTRACT=(mod1,mod2,...)/OUTPUT=file.obj yourlib

will place the listed modules into the output file. It may be interesting to experiment with different numbers and/or combinations of modules into a single object file. Is there one specific module that stops the analysis? Worst case, split the file into 17 individual files and ANALYZE them independently.
A crucible of informative mistakes
Volker Halle
Honored Contributor

Re: IA64 Analyze/Object doesn't process all modules in a file

Glenn,

Yes, it looks like a bug, either in Analyze (98%) or in the Fortran compiler (2%). The last shown module ends at a disk block boundary. The next module should start immediately after that. When reporting this problem to HP, please supply the object file.

Once all the modules are loaded into an object library, you should be able to analyze them with $ ANALYZE/OBJECT object-library.OLB/INCLUDE

If no module is specified with /INCLUDE, "*" is default.

Volker (the messenger).
Glenn Wolf
Advisor

Re: IA64 Analyze/Object doesn't process all modules in a file

I will open a problem report with HP. Thanks for all your help!

Glenn
John Reagan
Respected Contributor

Re: IA64 Analyze/Object doesn't process all modules in a file

While I think something is odd, read about the /SEPARATE_COMPILATION qualifier for the FORTRAN command. The default is not to create single object modules per 'routine' like F77 used to do. This often catches folks when moving to F90.
Glenn Wolf
Advisor

Re: IA64 Analyze/Object doesn't process all modules in a file

This is apparently a known bug in Analyze. Here is the response from OpenVMS engineering:

Thanks for reporting this problem. There is a bug in ANALYZE processing multiple modules in an object file. Analyze incorrectly adds a NOBITS section into the size of the module. The forth module in the supplied object file contains a big NOBITS section. So, to ANALYZE it looks like this module covers all (and even more) of the object file and ANALYZE stops looking for more modules.

The problem will be fixed in the next version of VMS.