|
[Sponsors] |
[OpenFOAM.org] OpenFOAM 5 source pack installation on Ubuntu 16.04 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 3, 2018, 22:35 |
OpenFOAM 5 source pack installation on Ubuntu 16.04
|
#1 |
New Member
jingjing cao
Join Date: Dec 2013
Posts: 15
Rep Power: 12 |
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. |
|
January 4, 2018, 19:06 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
January 5, 2018, 06:16 |
|
#3 | |
New Member
jingjing cao
Join Date: Dec 2013
Posts: 15
Rep Power: 12 |
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 /usr/lib/openmpi/include Code:
sudo update-alternatives --set mpi /usr/lib/openmpi/include Do you have any more suggetion? Quote:
|
||
January 5, 2018, 09:37 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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 readlink -f $(which mpirun) This is so that we can confirm if the correct version and location is being used. |
|
January 8, 2018, 21:07 |
|
#5 | |
New Member
jingjing cao
Join Date: Dec 2013
Posts: 15
Rep Power: 12 |
Thanks, Bruno
Based on your suggestion, I opened a new terminal, sourced the $FOAM_ETC/bashrc and type the following Code:
mpirun --version mpirun (Open MPI) 1.10.2 Code:
readlink -f $(which mpirun) /usr/bin/orterun Code:
which mpirun /usr/bin/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 /usr/lib/openmpi/include sudo update-alternatives --set mpi /usr/lib/openmpi/include Any idea about this? Quote:
|
||
January 9, 2018, 17:57 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answers:
|
|
January 10, 2018, 06:02 |
|
#7 | |
New Member
jingjing cao
Join Date: Dec 2013
Posts: 15
Rep Power: 12 |
Thanks Bruno,
Code:
ls -l $(which mpirun) lrwxrwxrwx 1 root root 24 4月 5 2017 /usr/bin/mpirun -> /etc/alternatives/mpirun Quote:
|
||
January 14, 2018, 13:11 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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:
|
|
January 15, 2018, 06:04 |
|
#9 |
New Member
jingjing cao
Join Date: Dec 2013
Posts: 15
Rep Power: 12 |
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 openmpi-system echo $MPI_ARCH_PATH /usr/lib/openmpi Code:
ldd $FOAM_LIBBIN/openmpi-system/libPsteam.so ldd: /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPsteam.so: No such file or directory Code:
ls -l /usr/bin/ld* lrwxrwxrwx 1 root root 19 8月 7 2016 /usr/bin/ld -> x86_64-linux-gnu-ld lrwxrwxrwx 1 root root 23 8月 7 2016 /usr/bin/ld.bfd -> x86_64-linux-gnu-ld.bfd -rwxr-xr-x 1 root root 5420 6月 17 2017 /usr/bin/ldd lrwxrwxrwx 1 root root 24 8月 7 2016 /usr/bin/ld.gold -> x86_64-linux-gnu-ld.gold Code:
ls -l /usr/bin/x86_64-linux-gnu-ld* lrwxrwxrwx 1 root root 6 8月 7 2016 /usr/bin/x86_64-linux-gnu-ld -> ld.bfd -rwxr-xr-x 1 root root 1220040 8月 7 2016 /usr/bin/x86_64-linux-gnu-ld.bfd -rwxr-xr-x 1 root root 2912776 8月 7 2016 /usr/bin/x86_64-linux-gnu-ld.gold Thank you very much. |
|
January 15, 2018, 06:09 |
|
#10 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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 |
|
January 16, 2018, 03:55 |
|
#11 |
New Member
jingjing cao
Join Date: Dec 2013
Posts: 15
Rep Power: 12 |
sorry about that, the actual results should be
Code:
linux-vdso.so.1 => (0x00007ffda3176000) libmpi.so.12 => /usr/lib/libmpi.so.12 (0x00007fda2f930000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fda2f5ae000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fda2f2a5000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fda2f08f000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fda2ee72000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fda2eaa8000) libibverbs.so.1 => /usr/lib/libibverbs.so.1 (0x00007fda2e899000) libopen-rte.so.12 => /usr/lib/libopen-rte.so.12 (0x00007fda2e61f000) libopen-pal.so.13 => /usr/lib/libopen-pal.so.13 (0x00007fda2e382000) /lib64/ld-linux-x86-64.so.2 (0x00007fda2fe16000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fda2e17e000) libhwloc.so.5 => /usr/lib/x86_64-linux-gnu/libhwloc.so.5 (0x00007fda2df44000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fda2dd3c000) libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fda2db39000) libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x00007fda2d92e000) libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fda2d724000) |
|
June 1, 2018, 08:18 |
|
#13 |
New Member
Abilash Ananthula
Join Date: Sep 2017
Posts: 9
Rep Power: 9 |
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. |
|
June 1, 2018, 14:57 |
|
#14 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
__________________
|
||
June 1, 2018, 16:35 |
|
#15 |
New Member
Abilash Ananthula
Join Date: Sep 2017
Posts: 9
Rep Power: 9 |
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. |
|
June 1, 2018, 17:39 |
|
#16 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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 |
||
June 1, 2018, 23:37 |
|
#17 |
New Member
Abilash Ananthula
Join Date: Sep 2017
Posts: 9
Rep Power: 9 |
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 root@admin-pc:~# echo $WM_MPLIB SYSTEMOPENMPI root@admin-pc:~# echo $MPI_ARCH_PATH /usr/lib/openmpi root@admin-pc:~# ls -l $(which mpirun) lrwxrwxrwx 1 root root 23 May 31 12:32 /home/administrator/OpenFOAM/OpenFOAM-4.1/bin/mpirun -> /usr/bin/mpirun.openmpi root@admin-pc:~# ldd $FOAM_LIBBIN/openmpi-system/libPstream.so linux-vdso.so.1 => (0x00007fff3c76d000) libmpi.so.12 => /usr/local/lib/libmpi.so.12 (0x00007fdd97dfa000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdd97a78000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdd9776f000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdd97559000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdd9733c000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdd96f72000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fdd96d6a000) /lib64/ld-linux-x86-64.so.2 (0x00007fdd9849e000) |
|
June 5, 2018, 07:02 |
|
#18 |
New Member
Abilash Ananthula
Join Date: Sep 2017
Posts: 9
Rep Power: 9 |
Hi Bruno,
Please let me know if it is possible to solve this installation problem. Thanks Abilash |
|
June 5, 2018, 10:48 |
|
#19 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer:
Quote:
There are two possible approaches that I can't go into much detail:
__________________
|
||
June 5, 2018, 12:15 |
|
#20 |
New Member
Abilash Ananthula
Join Date: Sep 2017
Posts: 9
Rep Power: 9 |
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 gcc: error: unrecognized command line option ‘--showme:link’ root@admin-pc:~/OpenFOAM/OpenFOAM-4.1# foam root@admin-pc:~/OpenFOAM/OpenFOAM-4.1# wclean all src/Pstream wclean src/Pstream ./dummy wclean ./dummy /home/administrator/OpenFOAM/OpenFOAM-4.1/src/Pstream/dummy ./mpi wclean ./mpi /home/administrator/OpenFOAM/OpenFOAM-4.1/src/Pstream/mpi root@admin-pc:~/OpenFOAM/OpenFOAM-4.1# wmake all src/Pstream + wmake libso dummy /home/administrator/OpenFOAM/OpenFOAM-4.1/src/Pstream/dummy wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file UOPwrite.C Making dependency list for source file UIPread.C Making dependency list for source file UPstream.C g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/home/administrator/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude -I/home/administrator/OpenFOAM/OpenFOAM-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c UPstream.C -o /home/administrator/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt64Opt/src/Pstream/dummy/UPstream.o g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/home/administrator/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude -I/home/administrator/OpenFOAM/OpenFOAM-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c UIPread.C -o /home/administrator/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt64Opt/src/Pstream/dummy/UIPread.o g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/home/administrator/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude -I/home/administrator/OpenFOAM/OpenFOAM-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c UOPwrite.C -o /home/administrator/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt64Opt/src/Pstream/dummy/UOPwrite.o g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/home/administrator/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude -I/home/administrator/OpenFOAM/OpenFOAM-4.1/src/OSspecific/POSIX/lnInclude -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed /home/administrator/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt64Opt/src/Pstream/dummy/UPstream.o /home/administrator/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt64Opt/src/Pstream/dummy/UIPread.o /home/administrator/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt64Opt/src/Pstream/dummy/UOPwrite.o -L/home/administrator/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt64Opt/lib \ -o /home/administrator/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt64Opt/lib/dummy/libPstream.so '/home/administrator/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt64Opt/lib/dummy/libPstream.so' is up to date. + set +x wmake libso mpi /home/administrator/OpenFOAM/OpenFOAM-4.1/src/Pstream/mpi wmakeLnInclude: linking include files to ./lnInclude '/home/administrator/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt64Opt/lib/openmpi-system/libPstream.so' is up to date. Code:
root@admin-pc:~/OpenFOAM/OpenFOAM-4.1# which mpirun /usr/local/bin/mpirun root@admin-pc:~/OpenFOAM/OpenFOAM-4.1# mpirun --version HYDRA build details: Version: 3.2 Release Date: Wed Nov 11 22:06:48 CST 2015 CC: gcc CXX: g++ F77: gfortran F90: gfortran Configure options: '--disable-option-checking' '--prefix=NONE' '--cache-file=/dev/null' '--srcdir=.' 'CC=gcc' 'CFLAGS= -O2' 'LDFLAGS=' 'LIBS=-lpthread ' 'CPPFLAGS= -I/home/administrator/Downloads/libraries/mpich-3.2/src/mpl/include -I/home/administrator/Downloads/libraries/mpich-3.2/src/mpl/include -I/home/administrator/Downloads/libraries/mpich-3.2/src/openpa/src -I/home/administrator/Downloads/libraries/mpich-3.2/src/openpa/src -D_REENTRANT -I/home/administrator/Downloads/libraries/mpich-3.2/src/mpi/romio/include' Process Manager: pmi Launchers available: ssh rsh fork slurm ll lsf sge manual persist Topology libraries available: hwloc Resource management kernels available: user slurm ll lsf sge pbs cobalt Checkpointing libraries available: Demux engines available: poll select root@admin-pc:~/OpenFOAM/OpenFOAM-4.1# which mpiexec /usr/local/bin/mpiexec root@admin-pc:~/OpenFOAM/OpenFOAM-4.1# mpiexec --version HYDRA build details: Version: 3.2 Release Date: Wed Nov 11 22:06:48 CST 2015 CC: gcc CXX: g++ F77: gfortran F90: gfortran Configure options: '--disable-option-checking' '--prefix=NONE' '--cache-file=/dev/null' '--srcdir=.' 'CC=gcc' 'CFLAGS= -O2' 'LDFLAGS=' 'LIBS=-lpthread ' 'CPPFLAGS= -I/home/administrator/Downloads/libraries/mpich-3.2/src/mpl/include -I/home/administrator/Downloads/libraries/mpich-3.2/src/mpl/include -I/home/administrator/Downloads/libraries/mpich-3.2/src/openpa/src -I/home/administrator/Downloads/libraries/mpich-3.2/src/openpa/src -D_REENTRANT -I/home/administrator/Downloads/libraries/mpich-3.2/src/mpi/romio/include' Process Manager: pmi Launchers available: ssh rsh fork slurm ll lsf sge manual persist Topology libraries available: hwloc Resource management kernels available: user slurm ll lsf sge pbs cobalt Checkpointing libraries available: Demux engines available: poll select Code:
administrator@admin-pc:~$ of41 gcc: error: unrecognized command line option ‘--showme:link’ administrator@admin-pc:~$ blockMesh blockMesh: command not found Thanks Abilash |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] Installation Problem with OF 6 version | Aurel | OpenFOAM Community Contributions | 14 | November 18, 2020 17:18 |
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 | ordinary | OpenFOAM Installation | 19 | September 3, 2019 19:13 |
Problem compiling a custom Lagrangian library | brbbhatti | OpenFOAM Programming & Development | 2 | July 7, 2014 12:32 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |
Source Pack Installation OpenFOAM Version 2.1.0 on Redhat Linux | Indrajit | OpenFOAM Installation | 1 | April 1, 2012 05:39 |