I am using ubuntu, I downloaded the community edition of the PGI and followed the instructions provided in the documentation for a workstation installation. After successful installation, I went ahead and set the environment and added path as instructed. However, when I use the command to check the PGI version or to compile code, it throws “command not found” error. I have uninstalled and tried to install it multiple times but failed. Kindly help.
Sorry you’re having issues, but there’s not enough information here to determine the problem. Can you please post the command line you’re using as well as full output? Also, please post the output from the command “which pgcc” and “echo $PATH”.
Here is the output when I try to compile a fortran code
------------- The code executes fine with gfortran ------------
asher@mohammed-asheruddin:~/Desktop/Fort1$ ls
hello.exe HELLO.f90 test1.f
asher@mohammed-asheruddin:~/Desktop/Fort1$ gfortran HELLO.f90 -o exec
asher@mohammed-asheruddin:~/Desktop/Fort1$ ./exec
Hello World
------------- Error with pgi compiler--------------
asher@mohammed-asheruddin:~/Desktop/Fort1$ pgf77 Hello.f90
pgf77: command not found
asher@mohammed-asheruddin:~$ pgf77 -V x.f
pgf77: command not found
asher@mohammed-asheruddin:~$ which pgcc
asher@mohammed-asheruddin:~$ echo $path
pgf77 wasn’t carried forward with the LLVM compiler tree and is only found under the older noLLVM path ($PGI/linux86-64-nollvm/19.10/bin), and will be dropped altogether in a later release. Please switch to using pgfortran which with the exception of some very old Fortran extensions, can compile F77 code as well as F90, F2003, and parts of F2008.
Though pgcc should be there, assuming it’s in your path. Can you please post the output to “echo $PATH”? (note PATH is all upper case not lower case as you have here).
Your PATH should include “$PGI/linux86-64-llvm/19.10/bin”. Please replace “$PGI” with the actual base directory where you installed the compilers (default is “/opt/pgi”) and the release (19.10) with the actual release you’re using.
The path variable was the error. I changed it as per your suggestion and it seems to work perfectly now. Tried an example fortran code, compiled and executed smoothly.