Operating System - HP-UX
1753776 Members
7522 Online
108799 Solutions
New Discussion юеВ

About sorting in Fortran 95

 
SOLVED
Go to solution
Roxana_4
Frequent Advisor

About sorting in Fortran 95

My names Roxana and I am from Romania.
For the internal sort operations in Fortran 77 under MPE/iX 7.0 I use the following intrinsics: SORTINIT, SORTINPUT, SORTOUTPUT, SORTEND.
I want to know if any intrinsics for sorting exists on Fortran 95 (v.2.8.4) under HP-UX 11i v2.
Please tel me know where I could find documentations about intrinsics in Fortran95 under HP-UX 11iv2.
Thank you and best regards.
5 REPLIES 5
Ralph Grothe
Honored Contributor

Re: About sorting in Fortran 95

Hi Roxana,

it is way too long ago since I last coded in Fortran, and then this was before the advent of Fortran95 only Fortran77.

Then I'm neither familiar with MPE/iX nor HP-UX 11.23

Why did you call the intrinsic routines instead of the generic interface routines?
Or is it that you are interested in implementation details?

I would suggest you look at the docs for your compiler.
You might find them here

http://docs.hp.com/en/dev.html#Fortran

As for sorting algorithms (in case you wish to implement one yourself) you could cast a glance at chapter 8

http://www.nr.com/

http://lib-www.lanl.gov/numerical/bookfpdf.html

http://www.library.cornell.edu/nr/bookf90pdf.html
Madness, thy name is system administration
Bill Hassell
Honored Contributor
Solution

Re: About sorting in Fortran 95

MPE is very different from Unix in that it was designed as a database operating system and thus you have a multitude of library calls (intrinsics in MPE terms). HP-UX does not have database tools and the closest thing to a sort operation is the sort command. It is definitely fast but not nearly as versatile the MPR intrinsics. Look at the sort man page for details. sort works best on ASCII files and does have some fairly nice features, but you'll have to pass the file to sort (or write the file to stdin of the sort command) and have sort create a new file as output or capture the output from stdout.

All the libraries in HP-UX are documented in the section 2 and 3 man pages. In Unix, man pages are divided up into 'bricks' (because the printed sections look like bricks). The sections are numbered 1-9 with a couple of suffix sections. Here are a few more common sections:

1 = user commands (programs)
1m = root (superuser) commands
2 = system calls (opsystem intrinsics)
3 = library (general library functions, see man 3 intro)
4 = file formats
5 = Misc topics
7 = devicefile (driver special) details

See more details with the command: man introduction

Also see the online manuals at http://docs.hp.com and ttp://docs.hp.com/en/B2355-60103/index.html


Bill Hassell, sysadmin
Roxana_4
Frequent Advisor

Re: About sorting in Fortran 95

Hi Bill,
Thank you very much for your help.
Roxana
Roxana_4
Frequent Advisor

Re: About sorting in Fortran 95

Hi Ralph
I am interested to make in fortran 95 a call towards a sorting intrinsic from HP-UX, which is similar with sort intrinsics from MPE/iX. So i don't wanna do sorting algorithms. In fortran documentation i found the QSORT intrinsic wich is not similar with sorting intrinsics from mpe/ix.
In man pages i found SORT - sort or merge files.

Thanks.
Roxana_4
Frequent Advisor

Re: About sorting in Fortran 95

Resolved