- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Porting from HP-UX PA-RISC (LP64) to IA 64
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2008 06:13 PM
08-07-2008 06:13 PM
1. My current source code using many 3rd party libraries like Oracle, Xerces, Tuxedo 8.1 all of which are currently PA-RISC (LP64). Will my current PA-RISC (LP64) binaries (executables) run as is on the Itanium machine?
2) If the binaries run as is on the Itanium machine, will there be any performance issues? If yes, what steps should I take to get the best performance on IA machine?
3) If I have to recompile my source code, do I have to recompile the source code of all the 3rd party libraries? In this case what aCC compiler options should I be taking care off?
4) Please provide other misc information which I will have to keep in mind for this porting.
Thanks in advance for your help.
-Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2008 06:43 PM
08-07-2008 06:43 PM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
If they are not kernel intrusive, they should run under Aries. Provided you have the right to copy those libs to your IPF machine.
>2) If the binaries run as is on the Integrity machine, will there be any performance issues?
Yes. If CPU intensive, they will slow down. If I/O intensive, you may not notice it.
>If yes, what steps should I take to get the best performance on IA machine?
Compile natively of course with aCC6.
>3) If I have to recompile my source code, do I have to recompile the source code of all the 3rd party libraries?
Yes. Or have them provide native IPF versions.
>In this case what aCC compiler options should I be taking care of?
You would want to port to using -AA, to match the default.
>4) Please provide other misc information which I will have to keep in mind for this porting.
You are doing 3 ports at once:
1) PA to IPF.
2) aCC3 to aCC6
3) -AP to -AA
For 2) and 3):
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2708d7c682f02110d7c682f02110275d6e10RCRD
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=eb08b3f1eee02110b3f1eee02110275d6e10RCRD
Also see:
http://www.hp.com/go/cpp
http://www.hp.com/go/aries
- Tags:
- Aries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2008 03:43 AM
08-08-2008 03:43 AM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
As for perfomance, the Aries manpages offer some benchmark data as well as other valuable information:
http://docs.hp.com/en/B2355-60130/Aries.5.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 11:08 AM
08-18-2008 11:08 AM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
Thank you very much for the answering my questions. I came across one more problem. My PA-RISC build application is using the unix "tr" command in the C++ code as follows:
----------------------
sprintf(xmlFileName, "%s.xml", fname);
sprintf(shCommand, "tr -d \"\012\" < %s > %s", fname, xmlFileName);
int retVal = system (shCommand);
----------------------
Here fname is "SomeFile.out". This .out file contains xml data. The above piece of code is used to remove the new line from this .out file. When I run this PA-RISC (HP-UX B.11.11 U 9000/800) code on the ITANIUM machine (HP-UX B.11.23 U ia64 0409362437) the problem with the "tr" command is it runs sometimes and fails in some other runs. The interesting thing is when I run this command on the command line using the same SomeFile.out file, it just runs fine and it never fails.
So my questions are:
1) Are there any system parameters that I need to set for the "tr" command to work properly.
2) Is is possible that the system() call is causing some problems?
3) Is it possible that not everything will run perfectly fine in the emulation mode, which further means that I will have to compile the code on Itanium box?
Thanks in advance for the help.
Regards,
Shiv
- Tags:
- tr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 11:13 AM
08-18-2008 11:13 AM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
> 1) Are there any system parameters that I need to set for the "tr" command to work properly.
No.
> 2) Is is possible that the system() call is causing some problems?
I seriously doubt that.
> 3) Is it possible that not everything will run perfectly fine in the emulation mode, which further means that I will have to compile the code on Itanium box?
For the case you cite, I don't think you should have a problem. I suspect that your anamolous results are *data* dependent, and not code-dependent.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 11:36 AM
08-18-2008 11:36 AM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
> other runs.
What does "fails" mean here? What is
"retVal" when it fails? Is the output file
created? What's in it? What happens? As
usual, "fails" is not a useful problem
description.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 11:50 AM
08-18-2008 11:50 AM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
Somefile.out contains xml data as shown in the sample below:
Note that in the above sample, each start element begins on a new line.
After running this file through the "tr" command, the "tr" command should generate the file Somefile.out.xml containing the data as shown below (Note that the new lines are to be removed by the "tr" command here):
By "fail", I mean that the Somefile.out.xml file is not created, which indicates that the "tr" command failed to process the input file Somefile.out
The retVal value is -1 when the Somefile.out.xml is not created and it is 0 when it is created.
Regards,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 12:47 PM
08-18-2008 12:47 PM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
"man system":
[...] If a child process cannot be
created, or if the termination status
for the command language interpreter
cannot be obtained, system() returns
-1 and sets errno to indicate the
error.
[...]
So, what's "errno"?
For that matter, do we know what's really in
"shCommand", or are we asuming that it's all
what we expect it to be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 01:28 PM
08-18-2008 01:28 PM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
It is usually better to set the full path when you call system() for a command else it could be a security issue.
so try /usr/bin/tr
Else only errno can help in finding the root cause.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 02:20 PM
08-18-2008 02:20 PM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
The tr command in the log file looks like:
--------------------
shCommand=tr -d "
" < /tfsw/ocp/temp/API12879_1000.out > /tfsw/ocp/temp/API12879_1000.out.xml
--------------------
I printed the errno immediately after the system() call to run the above given command and it gives the following:
errno(12) strerror(Not enough space)
When I run the "ls -l" on the above files, the retVal from the system() call for both the input and output files is -1 and the errno is 12!!
I checked that the input file /tfsw/ocp/temp/API12879_1000.out is present and is of 153596 bytes.
Also, the "df -k ." command under the /tfsw/ocp/temp directory gives the following :
/tfsw (/dev/vg03/lvol3 ) : 123242977 total allocated Kb
38282738 free allocated Kb
84960239 used allocated Kb
68 % allocation used
So, this indicates that there is enough space available and the final file /tfsw/ocp/temp/API12879_1000.out.xml will certainly be smaller than 153596 bytes in size.
So, then where is the problem?
Regards,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 02:36 PM
08-18-2008 02:36 PM
Solution> Also, the "df -k ." command
errno 12 is ENOMEM, and is related to
(something like) virtual memory, not disk
space.
"man system":
[...]
ERRORS
If errors are encountered, system() sets errno values as described by
fork(2).
[...]
"man fork":
[...]
[ENOMEM] There is insufficient swap space and/or physical
memory available in which to create the new
process.
[...]
So, is the system (or just this process)
running out of memory (swap space)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 04:34 PM
08-18-2008 04:34 PM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
You haven't followed the quoting rules for C and for the shell. This is the correct form:
"tr -d '\\012' < %s > %s"
You toss the double quotes, so you don't have to quote them. And so you don't need 4 \. Then you need an extra \ so C compiler doesn't replace it by a newline.
- Tags:
- quoting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 07:34 AM
08-19-2008 07:34 AM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 3485 611 85% 0 - 1 /dev/vg00/lvol2
reserve - 597 -597
memory 18425 14554 3871 79%
total 22521 18636 3885 83% - 0 -
My development machine where "tr" always works has the following "swapinfo -tam" stats:
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvol11
dev 8192 0 8192 0% 0 - 1 /dev/vg01/lvol12
dev 16384 0 16384 0% 0 - 2 /dev/vg01/lvol17
reserve - 22044 -22044
memory 28019 6768 21251 24%
total 60787 28812 31975 47% - 0 -
I dont know how to read the swapinfo output.
Regards,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 09:17 AM
08-19-2008 09:17 AM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
You need to add more physical memory and/or more swap space on the machine where your 'tr' is failing. An ENOMEM condition or a "can't fork' points to insufficient swap space and/or insufficient data space as bounded by the kernel 'maxdsiz' parameters (32 and 64-bit fences). Your swap and memory utilization are quite high.
As an immediate aid, I would add a generous secondary device swap of 4-8 GB.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 01:41 PM
08-19-2008 01:41 PM
Re: Porting from HP-UX PA-RISC (LP64) to IA 64
I asked my Unix admin guys to add additional swap space of 10 GB. Now the "tr" command is working fine.
Thank's everybody for helping me out on this problem.
Regards,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 01:43 PM
08-19-2008 01:43 PM