Problem with installation

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.

Thanks.

Hi Asher,

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”.

Thanks,
Mat

Thank you, Mat,

I’m using the bash command line

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

asher@mohammed-asheruddin:~$
asher@mohammed-asheruddin:~$


Thank you.

Hi Asher,

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.

-Mat

Hi Mat, thank you. Kindly review this output, I could not follow your last paragraph.

asher@mohammed-asheruddin:~/Desktop/Fort1$ pgfortran Hello.f90

Command ‘pgfortran’ not found, did you mean:

command ‘gfortran’ from deb gfortran

Try: sudo apt install

asher@mohammed-asheruddin:~/Desktop/Fort1$ echo $PATH
/opt/pgi/linux86-64/15.1/bin:/opt/pgi/linux86-64/15.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
asher@mohammed-asheruddin:~/Desktop/Fort1$ echo $PGI
/opt/pgi
asher@mohammed-asheruddin:~/Desktop/Fort1$

Thanks,
Asher

Hi Asher,

Assuming that you just downloaded the most recent PGI Community Edition, the release number would be 19.10, not 15.1 as you have in your PATH.

/opt/pgi/linux86-64/> 15.1> /bin

should be

/opt/pgi/linux86-64/> 19.10> /bin

Though, you may want to look in the “/opt/pgi/linux86-64” directory to see which PGI releases you have installed.

-Mat

Hi Mat,

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.

Thank you. Thank you. Thank you. :)

Regards,
Asher