Makefile PG Compiler Library Link Error

When I compile my make file I am getting the following error:

/bin/sh: pgf90: command not found
make: *** [link] Error 127

This is a fresh download of the MacOS PGI Community Community Edition and of Xcode. I can successfully compile with IFORT and Gfortran, but need to use pgf90 to compare with a colleague’s outputs. The pgf90 executable can be found here:

/opt/pgi/osx86-64/19.10/bin/pgf90

I have manually added /opt into the PATH

What shell is this? I’m guessing bash since that is the default on macOS.

You need to add the full path (up to the folder containing the binary). Just /opt is too broad and bash won’t go looking in subdirectors, it’ll look just in /opt.

I think this:

export PATH=/opt/pgi/osx86-64/19.10/bin:$PATH

is what you’ll want. Once it is in your .bashrc/.bash_local, open a new shell for the changes to pick up or source the rc file.