Setting Up MPICH
You should follow the instructions in the PGI HPF manual and MPICH manual to ensure that you can build an HPF program and run it by using MPICH. One way to do this is to create your own .pghpfrc file and add lines similar to the following:
# Set up to use my MPI with PGI HPF.
# Change the path to libmpi.a as appropriate
#
INCLUDE $DRIVER/.pghpfrc
set HPF_MPI=/where_your_mpi_lives/libmpi.a
set HPF_COMM_LIBS= \
"-lpghpf_mpi$P $HPF_MPI $HPF_SOCKET"
Because these lines tell pghpf to use the MPI communications library, you do not need to name them on the command line at compilation time.