OpenFOAM 5 source pack installation on Ubuntu 16.04
Hello FOAMers,
I tried to install the source pack in the first place ,but failed. Later I used the method in the following link, and it worked out. https://openfoam.org/download/5-0-ubuntu/ Now I try to change the cloud type from reactingCloud to sprayCloud in the reactingParcelFilmFoam to build a new solver, following errors appeared,there error messages appeared before in the source pack installation: -lm -o /opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/sprayFilmFoam /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_comm_null' /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_group_null' /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_byte' /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_double' /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_op_min' /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_comm_world' /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `ompi_mpi_op_sum' collect2: error: ld returned 1 exit status /opt/openfoam5/wmake/makefiles/general:140: recipe for target '/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/sprayFilmFoam' failed make: *** [/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/sprayFilmFoam] Error 1 Could anyone help me with this? Thank you very much. |
Quick answer: I suspect that the problem has to do with the default version of MPI that is defined in your Ubuntu installation. That would also explain why you were not able to install from source code.
In order to have the correct MPI version being used for the Deb package of OpenFOAM, run the following command: Code:
sudo update-alternatives --set mpi /usr/lib/openmpi/include |
Thanks Bruno, based on the suggestion on the website
I check whether MPICH is installed by Code:
sudo update-alternatives --list mpi Code:
/usr/include/mpich Code:
sudo update-alternatives --set mpi /usr/lib/openmpi/include Do you have any more suggetion? Quote:
|
Quick answer: I forgot to mention that it would be preferable to start a new terminal after that, so that it would refresh the shell environment. Don't forget to activate OpenFOAM's shell environment as well, in case it's not done automatically:
Code:
source /opt/openfoam5/etc/bashrc Code:
mpirun --version This is so that we can confirm if the correct version and location is being used. |
Thanks, Bruno
Based on your suggestion, I opened a new terminal, sourced the $FOAM_ETC/bashrc and type the following Code:
mpirun --version Code:
readlink -f $(which mpirun) Code:
which mpirun which mpirun. Is this corrected installed or not? If not, how to point to the right folder? and then I type Code:
sudo update-alternatives --list mpi Code:
/usr/include/mpich Any idea about this? Quote:
|
Quick answers:
|
1 Attachment(s)
Thanks Bruno,
Code:
ls -l $(which mpirun) Quote:
|
Quick answer: I've finally managed to take a quick look into this. Something seems to be misplaced in your Ubuntu and/or OpenFOAM installation.
Hopefully the following commands will help us diagnose the issue further:
|
Hello, Bruno
Thank you very much for your time and help on fixing this problem. It seems the libPsteam.so is not corrected installed. Code:
echo $FOAM_MPI Code:
ldd $FOAM_LIBBIN/openmpi-system/libPsteam.so Code:
ls -l /usr/bin/ld* Code:
ls -l /usr/bin/x86_64-linux-gnu-ld* Thank you very much. |
Quick note: There is an 'r' missing when you wrote "libPsteam", it should be "libPstream", like this:
Code:
ldd $FOAM_LIBBIN/openmpi-system/libPstream.so |
sorry about that, the actual results should be
Code:
linux-vdso.so.1 => (0x00007ffda3176000) Quote:
|
My apologies, but I haven't had time to look into this since we last exchanged messages.
Have you managed to solve this problem? |
Hello Bruno,
I am facing the similar problem in 'libPstream.so' related to mpi. Will you please let me know the solution for it. Thanks. |
Quote:
|
Hi Bruno,
Thanks for the reply. I am installing OpenFoam 4.1 on Ubuntu 16.04 following the instructions at https://openfoamwiki.net/index.php/I...u#Ubuntu_16.04 My HPC system is shared by other users and has MPI installations like MPICH, along with open mpi. |
Hi Abilash,
I was too much in a hurry and forgot to ask: Please provide the complete output that gave you the message about "libPstream.so". Quote:
Best regards, Bruno |
1 Attachment(s)
Bruno,
Please find the attached log file generated. I am using the following symbolic links described in the installation procedure to link open mpi to OpenFoam. ln -s /usr/bin/mpicc.openmpi OpenFOAM-4.1/bin/mpicc ln -s /usr/bin/mpirun.openmpi OpenFOAM-4.1/bin/mpirun I checked the commands that were mentioned in the post to verify the proper implementation of MPI and the output seemed to be okay. Code:
root@admin-pc:~# of41 |
Hi Bruno,
Please let me know if it is possible to solve this installation problem. Thanks Abilash |
Quick answer:
Quote:
There are two possible approaches that I can't go into much detail:
|
Hi Bruno,
Thanks for the help. After following the steps, I am having this output. Although the I am successful in rebuilding the "Pstream" folder, I suppose the installation is incomplete as it is showing error when I tried to activate the OpenFoam shell environment with "of41". Code:
root@admin-pc:~/OpenFOAM/OpenFOAM-4.1# of41 Code:
root@admin-pc:~/OpenFOAM/OpenFOAM-4.1# which mpirun Code:
administrator@admin-pc:~$ of41 Thanks Abilash |
All times are GMT -4. The time now is 06:15. |