PGI not accessible

Hello,

I have been trying to install PGI 18.4 Community edition on Ubuntu 18.04, I have been following the step by step guide. But I can’t make the compilers accessible, I have tried the following process

% setenv PGI /opt/pgi
% set path=(/opt/pgi/linux86-64/18.4/bin $path)
% setenv MANPATH "$MANPATH":/opt/pgi/linux86-64/18.4/man
% setenv LM_LICENSE_FILE /opt/pgi/license.dat:"$LM_LICENSE_FILE"

But I always get the error MANPATH variable not found
LM_LICENSE_FILE variable not found

and also this one,

$ export PGI=/opt/pgi;
$ export PATH=/opt/pgi/linux86-64/18.4/bin:$PATH;
$ export MANPATH=$MANPATH:/opt/pgi/linux86-64/18.4/man;
$ export LM_LICENSE_FILE=$LM_LICENSE_FILE:/opt/pgi/license.dat;

The latter does not give me any error, but I can’t see the compilers after typing some of the followings.

For Fortran 77, use: pgf77 -V x.f
For Fortran 2003, use: pgfortran -V x.f
For C++, use: pgc++ -V x.cpp
For ANSI C, use: pgcc -V x.c

And then it comes,

Command ‘pgcc’ not found, did you mean:

command ‘gcc’ from deb gcc
command ‘cgcc’ from deb sparse

Try: apt install

And so forth, for each one of the compilers.

I would like to know how to make it work, what am I doing wrong? Please

Thank you guys

I am pretty new to this, I would like to let the reader know how I fixed it. Basically it was always working.


So simple, the syntax bellow should be typed every time on terminal before using PGI. It is just like opening a program on Windows.

$ export PGI=/opt/pgi;
$ export PATH=/opt/pgi/linux86-64/18.4/bin:$PATH;
$ export MANPATH=$MANPATH:/opt/pgi/linux86-64/18.4/man;
$ export LM_LICENSE_FILE=$LM_LICENSE_FILE:/opt/pgi/license.dat;

Hope to clarify doubts to anyone who gets this issue.

Greetings

The exact syntax will depend on which shell you’re using. “setenv” is for csh and “export” is for bash.

So simple, the syntax bellow should be typed every time on terminal before using PGI. It is just like opening a program on Windows.

You can also add the export commands to your “.bashrc” file in your home directory. This way these commands will be executed each time a new bash shell is opened and you don’t need to type it in every time.

Hope this helps,
Mat