HP OpenVMS Systems Documentation
HP Pascal for OpenVMS
HP Pascal is now installed and can be invoked by all users with the PASCAL command. You can perform the following tasks after installing HP Pascal:
You usually run the Installation Verification Procedure (IVP) during installation. If you want to run the IVP separately to ensure the integrity of installed files should system problems occur, enter the following command procedure:
HP Pascal VERSION V5.n TEST FAILED
Several products cannot be used unless certain privilege and quota requirements are met by user accounts.
HP Pascal does not require any special privileges. There is no benefit from installing the HP Pascal compiler with privileges.
You can edit the system startup file to provide for automatic startup of
HP Pascal when your system is rebooted. Use the optional startup file to define the PASCAL$EXAMPLES logical name and to install HP Pascal as a shared image (see Section 3.4.2).
Edit the system startup file SYS$STARTUP:SYSTARTUP_VMS.COM (or SYS$STARTUP:SYSTARTUP_V5.COM on OpenVMS VAX V5.n systems) to include the following line:
This section includes information on system tuning and explains how to
install HP Pascal as a shared image.
3.4.1 Using Multiple Environment Files (OpenVMS VAX systems only)
If you intend to use multiple HP Pascal environment files, you can
increase the compilation speed by modifying the FILLM quota of those
processes that run the compiler. The HP Pascal compiler will keep
more than one environment file open during the compilation (with a
maximum of 50 environment files). If you inherit more than 50
environment files, the compiler will close some of them in order to
open other files.
3.4.2 Installing HP Pascal as a Shared Image
If you expect HP Pascal to be used extensively on your system, you can reduce the system overhead and memory requirements by installing it as a shared image.
To install HP Pascal as a shared image on a system that is currently running, use the optional HP Pascal startup file:
HP recommends that you install HP Pascal as shared on a system that has been rebooted recently because the available space in the global page table is less likely to be fragmented.
The requirements for additional global pages and global sections are
listed in Section 1.4.2.
3.4.3 Improving HP Pascal Compilation Performance on OpenVMS I64 and OpenVMS Alpha Systems
For many user applications, the HP Pascal compiler for OpenVMS I64 and OpenVMS Alpha systems requires significantly more system resources than HP Pascal for OpenVMS VAX. The compiler will sometimes fail with a "%LIB-E-INSVIRMEM, insufficient virtual memory" error. Also, for very large programs (greater than 10,000 lines), there could be a report of an extremely long compile time.
The following sections explain why HP Pascal for OpenVMS I64 and OpenVMS Alpha systems requires more memory, and suggests actions to be taken to avoid resource problems.
The Alpha architecture is a RISC (Reduced Instruction Set Computer) architecture. The Itanium architecture, while not technically a RISC architecture, has many of the same details that require additional compiler resources. The VAX architecture is a CISC (Complex Instruction Set Computer) architecture. The main distinguishing characteristic of a RISC machine is that it has few instructions, and each instruction does a small amount of work. A CISC machine generally has many instructions, most of which perform many complicated operations in one step.
By reducing the amount of work that is done in each instruction (and by reducing the number of instructions), the complexity of the hardware is reduced. This reduction in complexity allows the hardware designers to raise the clock speed (and thus the number of instructions per second that can be completed). This results in better overall system performance.
Another characteristic of RISC systems is that compilers for these architectures generally must do a great deal more work than a corresponding compiler for a CISC architecture.
For example, the compiler must compute the best way to use all of the functional units of the processor, and it must determine how to make the best use of registers and on-chip data cache, because reads and writes to main memory are generally slow compared to the speed of the processor.
The HP Pascal compiler for OpenVMS I64 and OpenVMS Alpha systems is a globally optimizing compiler. The compiler constructs an internal representation of the entire Pascal program, and repeatedly traverses this structure at compile time, so that it can produce the most efficient machine code for the program. This results in high performance code, but the drawback is that the compiler requires more resources than the HP Pascal for OpenVMS VAX compiler.
The HP Pascal compiler for OpenVMS I64 and OpenVMS Alpha will require more resources than the HP Pascal for OpenVMS VAX compiler because it must do more work. However, there are some things that can be done to reduce system resource usage:
In many tuning exercises, it is instructive to work with a relatively quiet system, submit batch jobs, and retain the log files for later analysis.
The information in the following section is based on a study of a set of large modules. Note that your results may differ.
For more information on OpenVMS tuning, see the HP OpenVMS System Manager's Manual, Volume 2: Tuning, Monitoring, and Complex Systems.
18.104.22.168 Required Virtual Memory
If there is not enough virtual memory, the compile command may fail with the message "insufficient virtual memory."
OpenVMS has two parameters that control the amount of virtual memory available to a process:
After an "insufficient virtual memory" error, issue the following DCL command to see the peak virtual size used by the process, or look at the peak page file size at the end of a batch job's log:
If the peak size is at the system generation parameter VIRTUALPAGECNT, you will need to raise this value. If the peak size is below VIRTUALPAGECNT, and at or above PGFLQUOTA, run AUTHORIZE to increase PGFLQUOTA for the Pascal users. Peak size can exceed PGFLQUOTA because some virtual memory, such as read-only image code, is not allocated page file space.
It is difficult to predict precisely how much virtual memory will be required for a compilation, but a starting point for system tuning can be computed by either of the following:
The resulting figure can then be used as a starting point for the system generation parameter VIRTUALPAGECNT. Place a line in the parameter file SYS$SYSTEM:MODPARAMS.DAT. For example, if you estimate 370,000 pages, add the following line in MODPARAMS, run AUTOGEN and reboot.
MIN_VIRTUALPAGECNT = 400000
If the compilation now completes successfully, use the command SHOW PROCESS/ACCOUNTING to determine the Peak Virtual Size; if the actual peak is significantly less than the value computed above, you can reduce VIRTUALPAGECNT.
When modifying VIRTUALPAGECNT and PGFLQUOTA, you may also need to
increase the size of the page file.
22.214.171.124 Required Physical Memory
When dealing with physical memory you must know:
If the physical memory on the system is too small, the command LOGOUT/FULL (which is automatically issued at the end of a batch job) will show a high number of faults, for example, > 100,000 for a single compilation, and an "Elapsed time" that greatly exceeds the "Charged CPU time," as the system waits for disk I/Os to resolve page faults. In this situation, tuning attempts may be of limited benefit.
If the physical memory on the system is adequate, but the physical memory allotted to the process running the compilation is too small, you may still observe a large number of faults, but elapsed time may remain closer to CPU time. This is because OpenVMS resolves page faults from the page caches (free list, modified list) whenever possible, avoiding the relatively slow disk I/Os. In this situation, basic tuning may also be beneficial.
The amount of physical memory required will vary, but it should be a large fraction of the process peak virtual size---as close to 1.0 as practical. The reason for this is that the compiler makes multiple passes over the internal representation of the program; therefore a page which falls out of the working set in one pass is probably going to be needed again on the very next pass.
The physical memory present on the system can be determined by the command SHOW MEMORY/PHYSICAL. The physical memory used by the compilation is reported as "Peak working set size" by the command SHOW PROCESS/ACCOUNTING or at the end of a batch log file.
More physical memory can be made available to a process by minimizing the number of competing processes on the system (for example, by compiling one module at a time, or scheduling large compiles for off hours.)
It can also be made available to a process (if it is present on the machine) by adjusting the system generation parameter WSMAX and the corresponding WSEXTENT (in AUTHORIZE). Such adjustments must be attempted with great caution, as the system may hang if memory is oversubscribed and you create a situation where OpenVMS effectively has no options to reclaim memory.
The following guidelines are useful:
The effects of physical memory on compilation time were studied for a set of seven large modules. The modules ranged in size from about 1600 to 3300 disk blocks. Your results may differ; but to help give a rough appreciation for the effect of physical memory on compilation time, the following can be noted:
Your results will be strongly affected by the speed of the devices that
are used for paging. Both virtual memory and physical memory
requirements can be reduced by breaking large modules up into smaller
3.5 Determining and Reporting Problems
If you encounter a problem while using HP Pascal, see the section on Troubleshooting Tips in the Release Notes. If the problem is unresolved, report it to HP. If you have a Software Product Services Support Agreement, you can contact HP Global Services, either by telephone or by using the electronic means provided with your support agreement. HP Global Services provides telephone support for high-level advisory and remedial assistance. When you initially contact HP Global Services, please indicate the following:
you can provide more detailed information when you submit information electronically or when you speak with the appropriate HP Pascal support specialist. The information should include the specific commands used to compile and link the program, the error messages displayed, and possibly the source program listings. Please attempt to narrow the cause of the problem to a specific module or lines of code.
Support personnel may ask for additional information, such as listings of any command files, INCLUDE and COPY files, relevant data files, and so forth. If the program is longer than 50 lines, submit a copy of it electronically or provide machine-readable media.
Experience shows that many problem reports do not contain enough information to duplicate or identify the problem. Concise, complete information helps HP give accurate and timely service to software problems.