I have installed the PGI
After export the path, and insert to the ~/.bashrc, restart the terminal, it works with I type, pgf90 --version
However other command still not work, error" pgf90 command is still not found" again appear.
cd /usr/local/ioapi-3.2/Linux2_x86_64pg_gcc_nomp; pgf90 -c -DFLDMN=1 -DAUTO_ARRAYS=1 -DF90=1 -DSECOND_UNDERSCORE=1 -O2 -fast -DFLDMN=1 -DAUTO_ARRAYS=1 -DF90=1 -DSECOND_UNDERSCORE=1 -I/usr/local/ioapi-3.2/ioapi /usr/local/ioapi-3.2/ioapi/m3utilio.f
/bin/sh: 1: pgf90: not found
make: *** [Makefile:290: m3utilio.mod] Error 127
The path was exported like this
$ NVARCH=`uname -s`_`uname -m`; export NVARCH
$ NVCOMPILERS=/opt/nvidia/hpc_sdk; export NVCOMPILERS
$ MANPATH=$MANPATH:$NVCOMPILERS/$NVARCH/21.11/compilers/man; export MANPATH
$ PATH=$NVCOMPILERS/$NVARCH/21.11/compilers/bin:$PATH; export PATH
Could you help to diagnose this proble?
It appears that you have setup you’re environment correctly given the shell is able to find pgf90 when you’re executing it from the terminal. Presumable if you typed ‘which pgf90’, it will show the full path to the compiler driver.
Though what’s the “other command”?
It looks like you’re using a Makefile but is there another script you’re using?
Is the PATH being overwritten by this script or is the environment not getting inherited?
Thank for your response, I using pgf90 for several command, both in makefile and in a self-built script, like below:
$ sudo pgf90 -o 1.1.premiss_Onroad-SER-Jan2018 1.1.premiss_Onroad-SER-Jan2018.f
sudo: pgf90: command not found
I try which pgf90 to get the exact pathway to pgf
$ which pgf90
And paste these link to ~/.bashrc
MANPATH=$MANPATH:/opt/nvidia/hpc_sdk/Linux_x86_64/21.11/compilers/man; export MANPATH
PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/21.11/compilers/bin:$PATH; export PATH
then restart terminal,
but the sudo pgf90 command still not found
Could you please guide me more?
Is there a reason why you’re using the ‘sudo’ command?
‘sudo’ allows users to execute some commands (as configured by the system admin) as root. Hence, I’m unclear as to why you need root privileges’ to compile.
If this intended, then use “sudo -E” so that your user environment is preserved when executing the command. Otherwise, ‘root’ environment will be used instead and the path to the compilers is not included in the environment.