I am not able to execute this line via script properly:
export PATH=/usr/lib64/openmpi/bin:$PATH;
or writing it to a file and sourcing the file:
echo "export PATH=/usr/lib64/openmpi/bin:$$PATH" >> shrc;
source shrc;
when I lunch the openFoam Installation afterwards it tells me "command not found mpicc" only when I directly type it myself into the commandline everything works just fine.
(the script is executed using a function therefor I source the script before executing the function - mpicc is not in conflict with other variables)
(I also tried setting mpicc as alias with the complete path "/usr/lib64/openmpi/bin/mpicc" and also tried to export not only the bin directory but the direct path to mpicc to $PATH - nothing worked)
How can I run this command by script so that ./Allwmake of OpenFOAM will be able to find it?
(Using BASH, RHEL 7.6 (Maipo))
export PATH=/usr/lib64/openmpi/bin:$PATH;
. What does that mean? Does it give an error message, or does it just leave you unable to runmpicc
? You say tried definingmpicc
as alias with the complete path/usr/lib64/openmpi/bin/mpicc
and that didn’t work. The obvious questions are: what happens when you just type/usr/lib64/openmpi/bin/mpicc
into the shell? What doesls -ld /usr/lib64/openmpi/bin/mpicc
say?