Installing HPC (11.6) on Ubuntu 20.4 - Unrecognized Commands

Dear, use this reputable forum to solve a problem in the installation of HPC. Following Nvidia’s installation guide for HPC, I used the commands:

$ echo ‘deb [trusted=yes] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /’ | sudo tee /etc/apt/sources.list.d/nvhpc.list
$ sudo apt-get update -y
$ sudo apt-get install -y nvhpc-22-2

then I used the commands in sequence to configure the environment variables:

$ NVARCH=uname -s_uname -m; export NVARCH
$ NVCOMPILERS=/opt/nvidia/hpc_sdk; export NVCOMPILERS
$ MANPATH=$MANPATH:$NVCOMPILERS/$NVARCH/22.2/compilers/man; export MANPATH
$ PATH=$NVCOMPILERS/$NVARCH/22.2/compilers/bin:$PATH; export PATH

and

$ export PATH=$NVCOMPILERS/$NVARCH/22.2/comm_libs/mpi/bin:$PATH
$ export MANPATH=$MANPATH:$NVCOMPILERS/$NVARCH/22.2/comm_libs/mpi/man

However, after restarting the PC, I notice that no HPC commands work, they are not recognized (nvaccelinfo, nvc, nvfortran, etc.)

Despite the above sequence of commands following the installation guide, I believe I’m missing some step in the installation, but I don’t know what it is. If anyone can help, thanks in advance.

Hi delima,

Environment variables need to be set each time a new shell is created. In order to get these to be set automatically when loading the shell, you’ll want to put these commands in your shell ‘rc’ file, typically located in your home directory.

For bash, this is typically the “~/.bashrc” for “~./bash_profile” files. For CSH, it would be “~/.cshrc”.

Hope this helps,
Mat

1 Like

Dear MatColgrove,

As per your guidance, I edited the .bashrc file and the HPC commands are working now! I have little experience in Linux, so I couldn’t solve this question that seems to be simple. Thank you so much for responding quickly and accurately, it was a great help!

Sincerely,

Delima

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.