How to get PGI rather than gcc compiler pls help

I am writing to you and I hope you will accept my topic, which may be simple to some
I am a student and I need to use PGI in my project and no one I know has ever used it. I tried to download the tool, but it asks "These files are available to users linked to a for-fee PGI license. " and I do not know how to get it even if it is paid, and the free version is not forgiven. Do you run PGI or did I make a mistake in downloading it?
My main goal is to run OpenACC programs with MPI and I do that with PGI and I don’t want to use g++ because there are features that I can only get through pgcc

Hi huda.basloom,

PGI was rebranded to be the NVIDIA HPC Compiler a few years ago and is included in the NV HPC SDK (High Performance Computing (HPC) SDK | NVIDIA). All the old driver names, like pgcc, are still there for compatibility, but have also been renamed (i.e. pgcc is now called nvc).

The NV HPC SDK is available at no-cost (with registration) and can be downloaded at: NVIDIA HPC SDK 21.7 Downloads | NVIDIA Developer

Hope this helps,
Mat

1 Like

Thank you for your reply, which really helped me as I was not aware of that information
Today I downloaded a new version from the link you mentioned

And this message, I hope it was installed correctly, as I did not work with Ubuntu previously and it is new to me

sudo apt-get install ./nvhpc-21-7_21.7_amd64.deb ./nvhpc-2021_21.7_amd64.deb ./nvhpc-21-7-cuda-multi_21.7_amd64.deb
[sudo] password for oliver: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'nvhpc-21-7' instead of './nvhpc-21-7_21.7_amd64.deb'
Note, selecting 'nvhpc-2021' instead of './nvhpc-2021_21.7_amd64.deb'
Note, selecting 'nvhpc-21-7-cuda-multi' instead of './nvhpc-21-7-cuda-multi_21.7_amd64.deb'
nvhpc-2021 is already the newest version (21.7).
nvhpc-21-7 is already the newest version (21.7).
The following NEW packages will be installed:
  nvhpc-21-7-cuda-multi
0 upgraded, 1 newly installed, 0 to remove and 44 not upgraded.
Need to get 0 B/2405 MB of archives.
After this operation, 6347 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 /home/oliver/nvhpc-21-7-cuda-multi_21.7_amd64.deb nvhpc-21-7-cuda-multi amd64 21.7 [2405 MB]
(Reading database ... 269371 files and directories currently installed.)
Preparing to unpack .../nvhpc-21-7-cuda-multi_21.7_amd64.deb ...
Unpacking nvhpc-21-7-cuda-multi (21.7) ...
Setting up nvhpc-21-7-cuda-multi (21.7) ...

But when I tried to use it
pgcc -Minfo=accel -acc test.c -fast -o gpu
it didn’t work and I didn’t know why I can’t use it

Command 'pgcc' not found, did you mean:

  command 'gcc' from deb gcc (4:9.3.0-1ubuntu2)
  command 'cgcc' from deb sparse (0.6.1-2build1)
  command 'pcc' from deb pcc (1.2.0~DEVEL+20181216-1)

After the rebranding:

  • pgcc is now nvc
  • pgc++ is now nvc++
  • pgf90 is now nvfortran

Also, some of the OpenACC compiler options are changed, such as -ta=tesla now becomes -gpu.

1 Like

Thank you for your reply
I think some thing wrong in my installation ,
even when i tried:

nvc 

Command 'nvc' not found, did you mean:

  command 'dvc' from snap dvc (2.5.4)
  command 'svc' from deb daemontools (1:0.76-7)
  command 'nqc' from deb nqc (3.1.r6-7build1)
  command 'nvlc' from deb vlc-bin (3.0.9.2-1)
  command 'nbc' from deb nbc (1.2.1.r4+dfsg-9)
  command 'tvc' from deb tvc (5.0.3+git20151221.80e144e+dfsg-3)
  command 'nvi' from deb nvi (1.81.6-15build1)
  command 'nyc' from deb filters (2.55-3build1)
  command 'rvc' from deb vtgrab (0.1.8-3.2)
  command 'nc' from deb netcat-openbsd (1.206-1ubuntu1)
  command 'nc' from deb ncat (7.80+dfsg1-2build1)
  command 'nc' from deb netcat-traditional (1.10-41.1ubuntu1)
  command 'nvcc' from deb nvidia-cuda-toolkit (10.1.243-3)

I followed the instruction in :
https://docs.nvidia.com/hpc-sdk/hpc-sdk-install-guide/index.html#install-linux-prep

but I already have other install version before months, maybe this affect

I found this folders in hpc_sdk folder

the previos folder: 2020,
20.11,
21.1
should I delete it??


during install i found this instruction in NVIDIA HPC SDK Installation Guide:

 The HPC SDK keeps version numbers under an architecture type directory, e.g. Linux_x86_64/21.7. The name of the architecture is in the form of `uname -s`_`uname -m`

what they mean by uname??

another thing this instruction in NVIDIA HPC SDK Installation Guide:

in csh, use these commands:
% setenv NVARCH `uname -s`_`uname -m`
% setenv NVCOMPILERS /opt/nvidia/hpc_sdk
% setenv MANPATH "$MANPATH":$NVCOMPILERS/$NVARCH/21.7/compilers/man
% set path = ($NVCOMPILERS/$NVARCH/21.7/compilers/bin $path)

what should I put instead of uname

and after i finished how to close “”“csh”"

Your screenshot shows that you’re running Ubuntu Linux, in which case the default shell is bash, not csh. Follow the instructions right after that part:

In bash, sh, or ksh, use these commands:

$ NVARCH=`uname -s`_`uname -m`; export NVARCH
$ NVCOMPILERS=/opt/nvidia/hpc_sdk; export NVCOMPILERS
$ MANPATH=$MANPATH:$NVCOMPILERS/$NVARCH/21.7/compilers/man; export MANPATH
$ PATH=$NVCOMPILERS/$NVARCH/21.7/compilers/bin:$PATH; export PATH

This adds two environment variables (called NVARCH and NVCOMPILERS), prepends the directory containing the nvc compiler to the PATH environment variable, as well as the directory containing the manpages (so that you can use man nvc in a terminal window.

You might want to add those four lines (without the $ in the front) into your .bashrc file in your home directory, such that this setting is persistent. This file, like any other filenames starting with a dot. is normally hidden. One way to edit this file is by pressing Alt+F2, enter the following command:
gedit ~/.bashrc
and hit enter.

uname is a Linux utility that gives you various information about your system, such as the architecture. Leave it be.

Save the file. The next terminal window that you open should be able to call nvc, version 21.7.

You can safely uninstall the older version using sudo apt remove nvhpc-20-11 in a terminal window.

1 Like

I feel stupid asking, cant find .bashrc in home

it open empty file and after I add lines and save it say no such file in home

I try to find solution through google and i do :

ls -la ~/ | more

drwxr-xr-x 28 oliver oliver       4096 أغسطس   6 15:04 .
drwxr-xr-x  3 root   root         4096 يناير   3  2021 ..
-rwxrwxr-x  1 oliver oliver      16744 فبراير 17 12:42 a.out
-rw-------  1 oliver oliver      41015 أغسطس   6 18:00 .bash_history
-rw-r--r--  1 oliver oliver        220 يناير   3  2021 .bash_logout
-rw-r--r--  1 oliver oliver       3874 فبراير  8 12:15 .bashrc

but cant understand where it locate to edit

First,

cd ~

Then this should do the trick:

gedit ~/.bashrc &

for a nice windowed Text Editor (gedit) or

nano ~/.bashrc

if you’re comfortable with nano in the terminal.

1 Like

It do the trick

Thank you so much
Finally I can start my project :)

How could I thank you

Do the LD_LIBRARY_PATH paths need to be set too (like in the module file), or does nvc use an implicit “rpath” to hard-link the libraries for run time?

We use rpath, so using LD_LIBRARY_PATH would be optional on a system where the compilers are installed in the same location.

1 Like