Compilers in Linux PATH problems

Hi all

I'm an academic research. My research is on computational chemistry. Quantum espresso is a free open source software which is commonly used. This software is multi threaded and can do computations on GPUs with a plugin.

I was trying to compile the code with intel compilers and nvidia cuda nvcc compiler. Although i am darn sure the compilers are in the path ( i check using the which command) many times it gives me the error e.g.: nvcc : Command not found.

I had to add the full compiler path to the make file. Any idea if you faced similar problems before in other software.

That is a very specific problem that not many people will encounter. Using gcc and standard ocl already present is enough for most people, as most field computational machines for this kind of applications are probably AMD based because of the benefits for OpenCL and OpenMP, the latter which nVidia refuses to support, but which forms the dominant multi-processing programming interface on *nix platforms for years and years. Most computational applications in *nix started out back when multiple machines where clustered, there was never a need to change the principles to solutions with limited scalability, and those hardware vendors that didn't implement the generally accepted principles were just left behind, even if they have published tools to try and convince the market to go their proprietary route instead of the generally accepted industry standard. AMD has had development tools and a set of compliant API's available for its products for years, even when full hybrid computing didn't exist yet because GCN hardware was not on the market yet. Those tools were also absorbed in what is now Vulkan, and what is also the standard on ARM platforms. nVidia has always resisted this solution for evident reasons looking at their hardware and the business plan nVidia adheres to of selling cheaper to produce less longevity narrow bus/higher speed GPU hardware with limited functionality for a higher price, but investing in software limitations and software-based exclusivities to ensure and consolidate market share. This of course doesn't work in open source, so nVidia pretty much dropped out of that market, except for gamers, who hung on in linux until about 2012, after which nVidia dropped taking care of the quality of the linux ports of their proprietary Windows drivers. nVidia ARM solutions were never a success for similar reasons: main API's in *nix were never entirely supported even on nVidia's ARM hardware, and there is no solution for using proprietary nVidia software (including compilers) without violating the basic principles of open source system hygiene, and nobody wants that.

2 Likes

post a link to the makefile? It's probable that it's doing something special.

Indeed, you need to export the run-time shared library loader path to your user binary path.

Thank you for your help.

Just few questions:

@SgtAwesomesauce I cannot attached the makefile hence i will provide the link to Quantum espresso download page:

http://www.quantum-espresso.org/download/

I face this problem only if I use the non GNU compilers.

@thirdmortal : Small question and sorry for being a newbie but when i use the which command does it check the binary path or library path or both. I assumed it will check the binary path.

Can you post the output of

which nvcc
echo $PATH

No worries. Let me get a look at the code...

Also, no need to apologize for being new. Asking questions is one of the best ways to learn!

as far as the which command, it shows the binary path. If you want to learn more about a command in Linux, you can do man <command>.

likely prerequisites were not installed. But from what we can see he doesn't need to compile it depending on his nix os. Since there are available deb packages. As stated in download page.

https://packages.debian.org/wheezy/quantum-espresso

there's also list of other packages that will be downloaded and installed.

Sorry for the delay:

which nvcc gives:

/usr/local/cuda/bin/nvcc

echo $PATH gives:

/opt/QuantumWise/VNL-ATK-2016.2/bin:/opt/QuantumWise/VNL-ATK-2016.2/bin:/opt/QuantumWise/VNL-ATK-2016.2/bin:/opt/QuantumWise/VNL-ATK-2016.2/bin:/opt/QuantumWise/VNL-ATK-2016.2/bin:/opt/QuantumWise/VNL-ATK-2016.2/bin:/opt/QuantumWise/VNL-ATK-2016.2/bin:/opt/QuantumWise/VNL-ATK-2016.2/bin:/home/YTM/bin:/home/YTM/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda/bin

I have installed a software from Quantum Wise called VNL, that's why it appears in the path.