Operating System - OpenVMS
1752299 Members
5370 Online
108786 Solutions
New Discussion юеВ

Re: Global Section Problem of IA64

 
SOLVED
Go to solution
Kai.Zou
Advisor

Global Section Problem of IA64

Hi, newbie here.
I had met a problem when porting a system from Alpha to IA64.
When creating Global Section, the space is over, then cleared the other variable's memory space.
In the old alpha system, the link map files showed that, the global section space is very large then the real size. But in the IA64, the link map files shows the global section space the only little greater than the real size.
For more information pls refer to attched file.

My question is:
1. Why this happened?
2. What caused this? The compile or link option? Or some System settings, such page size etc.
3. What should I do to deal with it?
TIA
Best reguards
20 REPLIES 20
Joseph Huber_1
Honored Contributor

Re: Global Section Problem of IA64

Well I don't have IA64 available to prove.
Obviously the psect defined by
plgrp_table[PL_GRP_MAX];
is of different size. How is it declared ? which compiler options used (default integer or float size ?).

What I can see is: on alpha the length of the psect is not a multiple of the page-size: so either there was a hidden error already in the program when creating/mapping the psect to a global section, and this error now becomes effective overmapping something else.

The rules for global section mappings:
begin must be on a page boundary
length must be a multiple of the pagesize
(i.e. the last address must be at a page boundary).
if as in Your case on alpha the psect is not an integral multiple of the page size, then how precisely do You pass the parameters (start-address,end-address,size) to the map global section call ?
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: Global Section Problem of IA64

And what do You really mean ?
>> global section space is very large then the real size.<<

The linker map knows nothing about a global section, it only has psects. It is your program code mapping the psect to the global section.
In the alpha case you either mapped only a part of the psect or more than the psect, i.e. some of the address-space following the array.
Maybe if You can show us the code, it becomes obvious what goes wrong.
http://www.mpp.mpg.de/~huber
Hein van den Heuvel
Honored Contributor

Re: Global Section Problem of IA64

Welcome Kai.

You need to show more of the program.
What is that type defined as?
Wat value is PL_GRP_MAX?
Is it the same on both systems?

If I create a silly C program, and compile with HP C V7.3-018 on IA64, V8.3, and link with Linker T02-28, then my MAP files shows something rather different from what you show:

PLGRP_TABLE 00010000 00019C3F 00009C40 ( 40000.)
PAGE 16 OVR,REL,GBL,NOSHR,NOEXE, WRT,NOVEC,NOMOD

So there is more in play.


You talk about "creating Global Section"
May we assume this is dynamic, with a $CRMPSC call or other member of that family?

What is the input address range provided?
What is the mapped range returned?

Sound like the program wants to pre-define a 'zone' for an array and then with a slide of hand (crmpsc) make that array not point to the original memory range, but look a a pre-created global memory section.

Why not define the array as a pointer, never allocate space in the program, map the section and more the RETADRR to the pointer?

Cheers,
Hein.
Hein van den Heuvel
Honored Contributor

Re: Global Section Problem of IA64

Joseph wrote:

"Well I don't have IA64 available to prove."

That reminds me...
Almost a year ago I donated a well equipped RX2600 to OpenVMS-Rocks.com ( aka deathrow ).
It was supposed to become a cluster member, for all to use.
That still has not happened. :-(
I'll ask Da Beave to please please please just bring it online standalone with a clone of the SYSUAF ?!

Also, The old HP testdrive system were very nice to try little things like the above. In fact, that's what I used.

Joseph, send me an Email, and maybe I can find a host system for experiments if you are interested.

Cheers,
Hein van den Heuvel at gmail
Kai.Zou
Advisor

Re: Global Section Problem of IA64

Hi, everyone, thanks very much for your warm hearted help, and sorry for my less information.

It seemed that, the map result became different with the same compile & link optionis, the same source code on alpha and IA64.

I could not tell why it happened and how fix it. My goal is make the program run well on IA64.

For more detail information & explanation, please refer to the new attached file.

TIA
BR
Zou Kai
Hein van den Heuvel
Honored Contributor

Re: Global Section Problem of IA64

>> It seemed that, the map result became different with the same compile & link optionis, the same source code on alpha and IA64.

I doubt it is the same.
But you do NOT show us enough from the map to explain.
You need to show the the next few lines where the MODULE names are filled in, and where the contribution from each module it made clear.
And you need to show us what FOLLOWS the section in question.

>> I could not tell why it happened and how fix it. My goal is make the program run well on IA64.

I suspect that this is BROKEN code, which happens to work on Alpha.

_ALIGN only specifies the START address.
CRMPSC only maps entire pages.
So the program needs to make sure it is over allocated.
By hook or by crook.
(btw... you failed to answer whether, or how, that is used)

Good luck,
Hein
Hein van den Heuvel
Honored Contributor

Re: Global Section Problem of IA64

>> It seemed that, the map result became different with the same compile & link optionis, the same source code on alpha and IA64.

I doubt it is the same. Something probably changed. I would focus on why the Alpha appears to have overalloced.

You do NOT show us enough from the map to help explain.
You need to show the next few lines where the MODULE names are filled in, and where the contribution from each module it made clear.
And you need to show us what FOLLOWS the section in question.

>> I could not tell why it happened and how fix it. My goal is make the program run well on IA64.

I suspect that this is BROKEN code, which happens to work on Alpha.

_ALIGN only specifies the START address.
CRMPSC only maps entire pages.
So the program needs to make sure it is over allocated.
By hook or by crook.
(btw... you failed to answer whether, or how, that is used)

Good luck,
Hein
Kai.Zou
Advisor

Re: Global Section Problem of IA64

Hi. Hein

Sorry for unclear information.
I can send the entrie map file, or the allocation function source code to you.
That will show all about "how to be used"
May I send mail to you privately?

Sincerely
Zou Kai
Hein van den Heuvel
Honored Contributor

Re: Global Section Problem of IA64

Sure, send the Email.
But all we need is the output from:

$ SEARC/WIN=(0,9) xx.MAP PLGRP_TABLE

And the call to CRMPSC (if the is one), its parameters declarations, and immediate use lines.

Cheers,
Hein