Application Programmer's I/O Guide


Table of Contents
Preface
Related publications
Obtaining publications
Conventions
Reader Comments
1. Introduction
1.1. The message system
2. Standard Fortran I/O
2.1. Files
2.1.1. Internal files
2.1.2. External files
2.2. Fortran unit identifiers
2.3. Data transfer statements
2.3.1. Formatted I/O
2.3.2. Unformatted I/O
2.4. Auxiliary I/O
2.4.1. File connection statements
2.4.2. The INQUIRE statement
2.4.3. File positioning statements
2.5. Private I/O on Cray T3E systems
2.6. Multithreading and standard Fortran I/O
3. Fortran I/O Extensions
3.1. BUFFER IN/BUFFER OUT routines
3.1.1. The UNIT intrinsic
3.1.2. The LENGTH intrinsic
3.1.3. Positioning
3.2. Random access I/O routines
3.3. Word-addressable I/O routines
3.4. Asynchronous queued I/O (AQIO) routines
3.4.1. Error detection by using AQIO
3.5. Logical record I/O routines
4. Tape and Named Pipe Support
4.1. Tape support
4.1.1. User EOV processing
4.1.2. Handling bad data on tapes
4.1.3. Positioning
4.2. Named pipes
4.2.1. Piped I/O example without end-of-file detection
4.2.2. Detecting end-of-file on a named pipe
4.2.3. Piped I/O example with end-of-file detection
5. System and C I/O
5.1. System I/O
5.1.1. Synchronous I/O
5.1.2. Asynchronous I/O
5.1.3. listio I/O
5.1.4. Unbuffered I/O
5.2. C I/O
5.2.1. C I/O from Fortran
6. The assign Environment
6.1. assign basics
6.1.1. Open processing
6.1.2. The assign command
6.1.3. Related library routines
6.2. assign and Fortran I/O
6.2.1. Alternative file names
6.2.2. File structure selection
6.2.3. Buffer size specification
6.2.4. Foreign file format specification
6.2.5. File space allocation
6.2.6. Device allocation
6.2.7. Direct-access I/O tuning
6.2.8. Fortran file truncation
6.3. The assign environment file
6.4. Local assign
7. File Structures
7.1. Unblocked file structure
7.1.1. assign -s unblocked file processing
7.1.2. assign -s sbin file processing (not recommended)
7.1.3. assign -s bin file processing (not recommended)
7.1.4. assign -s u file processing
7.2. Text file structure
7.3. COS or blocked file structure
7.4. Tape/bmx file structure
7.4.1. Library buffers
8. Buffering
8.1. Buffering overview
8.2. Types of buffering
8.2.1. Unbuffered I/O
8.2.2. Library buffering
8.2.3. System cache
8.2.4. Logical cache buffering
8.2.5. Default buffer sizes
9. Devices
9.1. Tape
9.1.1. Tape I/O interfaces
9.1.2. Tape subsystem capabilities
9.2. SSD
9.2.1. SSD file systems
9.2.2. Secondary data segments (SDS)
9.2.3. Logical device cache (ldcache)
9.3. Disk drives
9.4. Main memory
10. Introduction to FFIO
10.1. Layered I/O
10.2. Using layered I/O
10.2.1. I/O layers
10.2.2. Layered I/O options
10.3. Setting FFIO library parameters (UNICOS systems only)
11. Using FFIO
11.1. FFIO and common formats
11.1.1. Reading and writing text tiles
11.1.2. Reading and writing unblocked files
11.1.3. Reading and writing fixed-length records
11.1.4. Reading and writing COS blocked files
11.2. Enhancing performance
11.2.1. Buffer size considerations
11.2.2. Removing blocking
11.2.3. The bufa and cachea layers
11.2.4. The sds layer (available only on UNICOS systems)
11.2.5. The mr layer
11.2.6. The cache layer
11.3. Sample programs for UNICOS systems
12. Foreign File Conversion
12.1. Conversion overview
12.2. Transferring data
12.2.1. Using fdcp to transfer files
12.2.2. Moving data between systems
12.3. Data item conversion
12.3.1. Explicit data item conversion
12.3.2. Implicit Data Item Conversion
12.3.3. Choosing a Conversion Method
12.3.4. Disabling Conversion Types
12.4. Foreign Conversion Techniques
12.4.1. CDC CYBER NOS (VE and NOS/BE 60-bit) Conversion
12.4.2. COS Conversions
12.4.3. CDC CYBER 205 and ETA Conversion
12.4.4. CTSS Conversion
12.4.5. IBM Overview
12.4.6. Workstation and IEEE Conversion
12.4.7. VAX/VMS Conversion
12.5. Implicit Numeric Conversions (UNICOS systems Only)
13. I/O Optimization
13.1. Overview
13.2. An overview of optimization techniques
13.2.1. Evaluation tools
13.2.2. Optimizations not affecting source code
13.2.3. Optimizations that affect source code
13.2.4. Optimizing I/O speed
13.3. Determining I/O activity
13.3.1. Checking program execution time
13.4. Optimizing system requests
13.4.1. The MR feature
13.4.2. Using faster devices
13.4.3. Using MR/SDS combinations
13.4.4. Using a cache layer
13.4.5. Preallocating file space
13.4.6. User striping
13.5. Optimizing file structure overhead
13.5.1. Scratch files
13.5.2. Alternate file structures
13.5.3. Using the asynchronous COS blocking layer
13.5.4. Using asynchronous read-ahead and write-behind
13.5.5. Using simpler file structures
13.6. Minimizing data conversions
13.7. Minimizing data copying
13.7.1. Changing library buffer sizes
13.7.2. Bypassing library buffers
13.8. Other optimization options
13.8.1. Using pipes
13.8.2. Overlapping CPU and I/O
13.9. Optimization on UNICOS/mk systems
14. FFIO Layer Reference
14.1. Characteristics of layers
14.2. Individual layers
14.2.1. The blankx expansion/compression layer
14.2.2. The bmx/tape layer
14.2.3. The bufa layer
14.2.4. The CYBER 205/ETA (c205)
14.2.5. The cache layer
14.2.6. The cachea layer
14.2.7. The cdc layer
14.2.8. The cos blocking layer
14.2.9. The er90 layer (available only on UNICOS systems)
14.2.10. The event layer
14.2.11. The f77 layer
14.2.12. The fd layer
14.2.13. The global layer
14.2.14. The ibm layer
14.2.15. The mr layer
14.2.16. The nosve layer
14.2.17. The null layer
14.2.18. The sds layer (available only on UNICOS systems)
14.2.19. The syscall layer
14.2.20. The system layer
14.2.21. The text layer
14.2.22. The user and site layers
14.2.23. The vms layer
15. Creating a user Layer
15.1. Internal functions
15.1.1. The operations structure
15.1.2. FFIO and the stat structure
15.2. user layer example
A. Older Data Conversion Routines
A.1. Old IBM data conversion routines
A.2. Old CDC data conversion routines
A.3. Old VAX/VMS data conversion routines
Glossary
List of Tables
7-1. Fortran access methods and options
7-2.
7-3.
7-4.
7-5.
9-1. Disk information
12-1. Conversion routines for Cray PVP systems
12-2. Conversion routines for Cray MPP systems
12-3. Conversion routines for Cray T90 systems
12-4. Conversion types on Cray PVP systems
12-5. Conversion types on Cray MPP systems
12-6. Conversion types on Cray T90/IEEE systems
12-7. Supported foreign I/O formats and default data types
13-1.
13-2.
14-1. Data manipulation: blankx layer
14-2. Supported operations: blankx layer
14-3. -T specified on tpmnt
14-4. Data manipulation: bmx/tape layer
14-5. Supported operations: bmx/tape layer
14-6. Data manipulation: bufa layer
14-7. Supported operations: bufa layer
14-8. Data manipulation: c205 layer
14-9. Supported operations: c205 layer
14-10. Data manipulation: cache layer
14-11. Supported operations: cache layer
14-12. Data manipulation: cachea layer
14-13. Supported operations: cachea layer
14-14. Data manipulation: cdc layer
14-15. Supported operations: cdc layer
14-16. Data manipulation: cos layer
14-17. Supported operations: cos layer
14-18. Data manipulation: er90 layer
14-19. Supported operations: er90 layer
14-20. Data manipulation: f77 layer
14-21. Supported operations: f77 layer
14-22. Data manipulation: global layer
14-23. Supported operations: global layer
14-24. Values for maximum record size on ibm layer
14-25. Values for maximum block size in ibm layer
14-26. Data manipulation: ibm layer
14-27. Supported operations: ibm layer
14-28. Data manipulation: mr layer
14-29. Supported operations: mr layer
14-30. Values for maximum record size
14-31. Values for maximum block size
14-32. Data manipulation: nosve layer
14-33. Supported operations: nosve layer
14-34. Data manipulation: sds layer
14-35. Supported operations: sds layer
14-36. Data manipulation: syscall layer
14-37. Supported operations: syscall layer
14-38. Data manipulation: text layer
14-39. Supported operations: text layer
14-40. Values for record size: vms layer
14-41. Values for maximum block size: vms layer
14-42. Data manipulation: vms layer
14-43. Supported operations: vms layer
A-1.
A-2.
A-3.
List of Figures
6-1. Access methods and default buffer sizes (UNICOS systems)
10-1. Typical data flow
13-1. I/O layers
13-2. I/O data movement
13-3. I/O data movement (current)
13-4. I/O processing with library processing eliminated
List of Examples
3-1. MS package use
3-2. DR package use
3-3. WA package use
3-4. AQIO routines: compound read operations
3-5. AQIO routines: error detection
4-1. No EOF detection: writerd
4-2. No EOF detection: readwt
4-3. EOF detection: writerd
4-4. EOF detection: readwt
5-1. C I/O from Fortran
6-1. Local assign mode
11-1. sds using buffer I/O
11-2. Unformatted sequential sds example
11-3. sds and mr with WAIO
11-4. Unformatted direct sds and mr example
11-5. sds with MS package example
11-6. mr with buffer I/O example
11-7. Unformatted sequential mr examples
11-8. mr and MS package example
12-1. Copy VAX/VMS tape file to disk
12-2. Copy unknown tape type to disk
12-3. Creating files for other systems
12-4. Copying to UNICOS text files