How to get an mpif90 from pgf90

Hello all,

My problem is I am not able to generate a mpif90 compiler using either lam-7.0.4 or mpich-1.2.6 with Portland Group Server package 6.0 for x86-64. Can u tell me how to make a mpif90 compiler using Portland Group compiler.


Hi Saurabh,

mpif90 is a script which gets configured to use the pgf90 compiler when you build the MPI library. So long as you have properly configured, built, and installed the MPI library, mpif90 will be located in the bin directory of your MPI install. Note that you can also use pgf90 directly instead of mpif90 so long as you add the path to the mpi.h file to the compilation line ("-I/path/to/mpi/include/dir") and the path to the mpi library and mpi libraries to the link line. ("-L/path/to/mpi/lib/dir -lmpich").

To create a MPICH or LAM/MPI package, first unpack the tar package, cd into the main directory, and run configure using one of the following: (Be sure to change the install path)


 env CFLAGS="-fast -I/usr/include" CXXFLAGS="-fast -I/usr/include" \
 FFLAGS="-fast -I/usr/include" LDFLAGS="-fast -I/usr/include" CXXLDFLAGS="-fast -I/usr/include" \
 CC="pgcc" CXX="pgCC"  FC="pgf90" ./configure --prefix=/path/to/install/dir


 env CFLAGS="-fast" CXXFLAGS="-fast" FFLAGS="-fast" F90FLAGS="-fast" LDFLAGS="-fast" \
 OPTFLAGS="-fast"  CC="pgcc" CXX="pgCC"  F90="pgf90"  FC="pgf77"  CPP="pgCC -E" \
 ./configure --prefix=/path/to/install/dir

The build and install the packages:

make install

Hope this helps,