pghpf Frequently Asked Questions

This page lists some frequently asked questions (FAQs) on the subject of pghpf. It is intended that pghpf users worldwide will supply additional questions and answers regarding pghpf. In the future, we hope users will find this page to be a useful resource for pghpf, HPF and HPC questions and problems. According to the WWW spirit, users will be able to interact with and collaborate with other HPC users worldwide.

If you have written a useful routine in HPF, or have overcome a difficult problem in any area of HPC and would like to let others know about your work, this information can be posted to the PGI FAQ, along with your email address. Please contribute to this area of the PGI web site by sending mail to trs@pgroup.com. In the near future PGI will add a WWW form to allow you to add information to this area. If you do not find the information regarding pghpf or HPF in this section, you can contact PGI by email or by phone.

email: trs@pgroup.com
telephone: (503) 682-0696
fax: (503) 682-2637


The Basics


Where can I get more information on pghpf?

A. The HPF compiler pghpf is described in some detail on this web site. Further information on pghpf.

How do I order pghpf?

A. The PGI worldwide sales staff should be able to help you.
Further information on pghpf sales.

Where can I get more information on the PGI Partners In Parallel Education program?

A. This web site has additional information on the PIPE program. There are actually two versions of this program, one for domestic U.S. universities, and one for universities outside the U.S.

Further information on PIPE (domestic U.S.)

Further information on PIPE (international)


Technical Questions

Non-HPF Directives

Q. The pghpf compiler strips away all comments in the HPF source code, including non-HPF directives. Is there any way around this?

A. There is currently no way to supply non-HPF directives that are passed through to the Fortran 77 compiler. This limitation should be eliminated in future versions of pghpf.

Heterogeneous Systems

Q. I'd like to run an HPF program on a network of systems that include different CPUs, for example, an SGI workstation and a SPARC workstation. Can I do this using pghpf?

A. The current pghpf compilation system does not support heterogeneous runtime environments. Future versions of pghpf may support this type of a system.

Passing Arrays

Q. Why do I get the error message:
pghpf_copy_in: scalar passed to array
A. Sometimes when converting Fortran 77 code, an indexed array element that is passed as a parameter to a subroutine. In Fortran 77 code the address of that element is passed and can be used as the starting address for an assumed size array.

In HPF, the compiler treats it as a *scalar* that is element A(1,1) is a scalar. You can fix this by passing an array section instead of the scalar

Compiler Options

Q. I've found an option to my underlying F77 compiler that isn't recognized by pghpf. How can I pass it through:

A. You need to locate the driver configuration file for your system and modify it to add the option as a "pass through". Appendix C, Driver Configuration describes how to modify the driver, but for a pass thru, the instructions are repeated below. Note that this driver configuration command will need to be added to your driver configuration file. For example, on a system of type xarch, this file would be found in the directory /usr/pgi/xarch//xarchbin/xarchrc.

The passthru statement allows a command with optional or required arguments to be "passed through" to the compiler and linker passes. This switch is used by the pghpf driver to pass switches directly to another Fortran f77 compiler.

When using the -help option, the driver sorts and merges the passthru defined switches with the list of switches embedded into the driver.

The passthru PGIRC statement has either of the following forms:

passthru "-switch";="help description"
passthru "-switch",="help description"
where the switch is the switch to pass through. The ';' indicates an optional argument follows the switch. The ',' indicates a required argument follows the switch.

For example,

passthru "-p"="a p switch with no arguments"
passthru "-g";="a g switch with an optional argument"
passthru "-ko",="a ko switch with one argument"

Security

Q. I'm working in a secure environment and I need to use a secure shell to spawn remote processes. How do I do this?

A The -rsh runtime option and the PGHPF_RSH environment variable specifies the name of the remote shell to be used for creating remote proceses. The value is normally "rsh". If your want to change to a protected remote shell such as "ksh", the command would be:

a.out -pghpf -rsh ksh

Fortran 77 Compilation Fails

Q. The compilation of my HPF program is failing during the Fortran 77 compilation phase. How do I work around this problem.

A. This problem may indicate a coding error in the HPF program, or a compiler code generation error. In this case, you will need to contact PGI with for further support (email to trs@pgroup.com)

Debugging HPF Programs

Q. How do I go about debugging an HPF program?

A. Debugging programs developed under pghpf 1.3 can be difficult. No HPF debugger is currently provided. However, if necessary the programmer can debug the generated SPMD F77 program on each node using multiple X windows. This can be particularly useful in obtaining a traceback on a program that is crashing unexpectedly.

To prepare an HPF program for debugging, use the -Mg compile-time option to pghpf. The generated F77 output will be saved and the node F77 compiler will be invoked with the -g compile-time option to provide symbolic information in the image file. If you wish to execute the program on only a single processor, use the -Mrpm1 compiler option when linking the program. You can then use a standard debugger on the image file.

If you need to execute the program on multiple processors, the following sequence is useful:

  1. #!/bin/sh
    exec xterm -e dbx $1
  2. % setenv PGHPF_DEBUGGER xdbg
  3. a.out -pghpf -np 2 -g all

    will create two xterm windows running dbx on the program.
Similar functionality is possible using PVM.

HPF Runtime Messages

Q. I'm getting the following messge when I execute my program: A. When specifying a general distribution with BLOCK(n) in a DISTRIBUTE directive, block of size n are assigned to a unique processor. There needs to be enough processors to hand the data distributed in a BLOCK(n) fashion. For example:

INTEGER, DIMENSION(4) :: A
!HPF DISTRIBUTE (BLOCK(1)) :: A

would require at least 4 processors.

pghpf Runtime Errors

Q. I'm getting an error message from the pghpf runtime. How do I determine which subroutine is causing the error?

A. Compile using -Hrpm1 and using a single processor (any PROCESSORS directives must be set to 1) start execution under the debugger. Set a breakpoint at __hpf_abort. Run the program. The program should break in __hpf_abort before printing the error message. A where command will give a traceback and indicate the user subroutine from which the error is originating.

Extrinsic Compilation

Q. I want to use an extrinsic Fortran 77 routine; how do I write and compile it?

A. Writing an extrinsic for a routine using distributed data involves to writing a message passing routine using the PGI runtime library, and the routines described in Chapter 8, Using Modules and Extrinsics, of the pghpf User's Guide.

HPF Profiling

Q. Is there any way to find out how much time is spent in the communications portion of a program, as opposed to the computation portion?

A. You can see the number of communication calls, and the number of bytes transferred, and the entire time spent in a given statement. However, currently pghpf does not provide tools showing the total communications versus computation performed during a program's execution. Refer to the -Mprof and -Mstatspghpf option, and the -stat runtime option described in Chapters Two and Three of the pghpf User's Guide for more information on using these options.


Additional HPF Information