fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
DATAPOOL LISTING FILE
Syntax:
[NO] DATAPOOL [INPUT] LISTING FILE <file>
Function:
The DATAPOOL construct is supported by ENCORE (Gould-SEL) Concept-32 and RSX series systems under the MPX operating system. The DATAPOOL LISTING FILE command is used in migrating code which uses the construct from MPX systems to standard Fortran environments.
DATAPOOL is essentially a Fortran 77 COMMON block in which the addresses of objects in the COMMON block are maintained by the operating system independently of the Fortran compiler. DATAPOOL statements are written with the same syntax as COMMON statements, for example:
COMMON /DATAPOOL/ X,Y,H,THETA,PSI,PHI
If this were a standard Fortran 77 COMMON block, the statement would specify the addresses of the variables X, Y, H etc. relative to the start of the COMMON block. In the DATAPOOL it does not. X, Y, H, THETA etc. are assigned the addresses held in the DATAPOOL database, and these addresses are not necessarily adjacent. Typically, a DATAPOOL may contain several thousand variables and arrays. The advantages of the construct are that:
The disadvantage was that the construct was not supported by any vendor other than Gould-SEL (ENCORE). However, DATAPOOL, the external debugging environment and the associated utilities have now been re-implemented in standard Fortran 77, and may be used in any Fortran environment. Please contact SimCon if these facilities are required.
The MPX system may be used to generate a listing file which shows the addresses of all variables in the DATAPOOL. The fpt command DATAPOOL LISTING FILE instructs fpt to read this file, and to use the address and data type information which it contains to convert DATAPOOL statements to standard Fortran 77. The changes made are as follows:
This command therefore converts the program to standard Fortran. However, the code has the disadvantage that the entire DATAPOOL is declared in every sub-program which needs it. The DATAPOOL INCLUDE file may contain several thousand declarations, and this may have an adverse effect on compilation times.
The problem of the size of the INCLUDE file is overcome by the DATAPOOL Toolkit, DPTK. This re-processes the Fortran sources to replace the single DATAPOOL INCLUDE file by separate declaration INCLUDE files for each DATAPOOL variable. Thus, if a sub-program uses six DATAPOOL variables, it has six very small INCLUDE files rather than one very large one. The separate INCLUDE files are maintained by components of DPTK, using an ASCII text file database. This database file is written in response to the fpt command WRITE DATAPOOL TEXT FILE.
Where to Use this Command
Operating system command line | Yes |
Configuration file, config.fsp | Yes |
Specification (fsp) files, *.fsp | Yes |
Interactively, to FPT> prompt | No |
Interactive command files | No |
Embedded in the Fortran code | No |
Default
NO DATAPOOL LISTING FILE
(Note that defaults may be changed in the configuration file)
Examples
The program HOVER2 is processed with the command:
$ fpt hover2.fsp /datapool_listing_file:dpool.lis
A fragment of the Gould-SEL DATAPOOL listing file, dpool.lis, is shown below:
LOG X EQU X:QDO +X'00028' EW001 X Pos, World, ft LOG Y EQU X:QDO +X'0002C' EW001 Y Pos, World, ft LOG H EQU X:QDO +X'00030' EW001 Height abs ft LOG HRAD EQU X:QDO +X'00034' EW001 Height radar ft LOG HBAR EQU X:QDO +X'00038' EW001 Height baromet ft LOG THETA EQU X:QDO +X'0003C' EW001 Degrees LOG PHI EQU X:QDO +X'00040' EW001 Degrees LOG PSI EQU X:QD0 +X'00044' EW001 Degrees +- 180 LOG P EQU X:QDO +X'00048' EW001 Degrees/sec LOG Q EQU X:QDO +X'0004C' EW001 Degrees/sec LOG R EQU X:QDO +X'00050' EW001 Degrees/sec LOG LAT EQU X:QDO +X'00058' ED001 Latitude, degrees LOG LONG EQU X:QDO +X'00060' ED001 Longitde, degrees
The INCLUDE file hover2_cmn.fpi is generated. The variables shown above generate the fragment:
BYTE DP_BYTE(0:103) : : REAL*4 X ! X Position, World, ft REAL*4 Y ! Y Position, World, ft REAL*4 H ! Height absolute ft REAL*4 HRAD ! Height radar ft REAL*4 HBAR ! Height barometric ft REAL*4 THETA ! Degrees REAL*4 PHI ! Degrees REAL*4 PSI ! Degrees +- 180 REAL*4 P ! Degrees/sec REAL*4 Q ! Degrees/sec REAL*4 R ! Degrees/sec REAL*8 LAT ! Latitude, degrees REAL*8 LONG ! Longitude, degrees : ! COMMON /DATAPOOL/DP_BYTE ! : EQUIVALENCE (X,DP_BYTE(40)) EQUIVALENCE (Y,DP_BYTE(44)) EQUIVALENCE (H,DP_BYTE(48)) EQUIVALENCE (HRAD,DP_BYTE(52)) EQUIVALENCE (HBAR,DP_BYTE(56)) EQUIVALENCE (THETA,DP_BYTE(60)) EQUIVALENCE (PHI,DP_BYTE(64)) EQUIVALENCE (PSI,DP_BYTE(68)) EQUIVALENCE (P,DP_BYTE(72)) EQUIVALENCE (Q,DP_BYTE(76)) EQUIVALENCE (R,DP_BYTE(80)) EQUIVALENCE (LAT,DP_BYTE(88)) EQUIVALENCE (LONG,DP_BYTE(96))
and references to this INCLUDE file are inserted in all sub-programs which use DATAPOOL variables.
See Also
Copyright ©1995 to 2024 Software Validation Ltd. All rights reserved.