|
[Sponsors] |
July 30, 2018, 17:32 |
Compiling v1806 from source
|
#1 |
New Member
S
Join Date: Jun 2016
Posts: 15
Rep Power: 10 |
I'm having an issue installing OpenFOAM from source on a remote cluster according to the instructions here
https://www.openfoam.com/download/install-source.php I followed all the instructions up to Code:
./Allwmake Code:
... wmake solvers wmake basic make[1]: Entering directory `/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/applications/solvers/basic' wmake laplacianFoam make[2]: Entering directory `/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/applications/solvers/basic/laplacianFoam' wmake overLaplacianDyMFoam make[3]: Entering directory `/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/applications/solvers/basic/laplacianFoam/overLaplacianDyMFoam' g++ -std=c++11 -m64 -DOPENFOAM=1806 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -I/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/src/finiteVolume/lnInclude -I/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/src/dynamicFvMesh/lnInclude -I/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/src/overset/lnInclude -I/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/src/meshTools/lnInclude -IlnInclude -I. -I/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/src/OpenFOAM/lnInclude -I/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/build/linux64GccDPInt32Opt/applications/solvers/basic/laplacianFoam/overLaplacianDyMFoam/overLaplacianDyMFoam.o -L/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib \ -loverset -lOpenFOAM -ldl \ -lm -o /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/bin/overLaplacianDyMFoam /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Comm_rank' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Abort' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Alltoallv' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Scatterv' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Comm_group' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Allreduce' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Bsend' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Buffer_detach' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Recv' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Wait' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Test' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Alltoall' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Comm_size' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Waitall' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Get_count' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Comm_create' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Group_incl' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Initialized' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Probe' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Finalized' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Send' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Irecv' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Comm_free' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Gatherv' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Init_thread' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Isend' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Finalize' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Buffer_attach' /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI_Group_free' collect2: error: ld returned 1 exit status make[3]: *** [/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/bin/overLaplacianDyMFoam] Error 1 make[3]: Leaving directory `/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/applications/solvers/basic/laplacianFoam/overLaplacianDyMFoam' make[2]: *** [overLaplacianDyMFoam] Error 2 make[2]: Leaving directory `/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/applications/solvers/basic/laplacianFoam' make[1]: *** [laplacianFoam] Error 2 make[1]: Leaving directory `/home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/applications/solvers/basic' make: *** [basic] Error 2 And the output of foamInstallationTest is Code:
Executing /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806/bin/foamInstallationTest: Basic setup : ------------------------------------------------------------------------------- OpenFOAM: OpenFOAM-v1806 ThirdParty: ThirdParty-v1806 Shell: bash Host: fe.cm.cluster OS: Linux version 3.10.0-229.el7.x86_64 ------------------------------------------------------------------------------- Main OpenFOAM env variables : ------------------------------------------------------------------------------- EnvironmentVariable FileOrDirectory Valid Crit ------------------------------------------------------------------------------- $WM_PROJECT_INST_DIR /home/sgs/pkg/OpenFOAM yes yes $WM_PROJECT_USER_DIR /home/sgs/OpenFOAM/sgs-v1806 no no $WM_THIRD_PARTY_DIR .../sgs/pkg/OpenFOAM/ThirdParty-v1806 yes yes ------------------------------------------------------------------------------- OpenFOAM env variables in PATH : ------------------------------------------------------------------------------- EnvironmentVariable FileOrDirectory Valid Path Crit ------------------------------------------------------------------------------- $WM_PROJECT_DIR /home/sgs/pkg/OpenFOAM/OpenFOAM-v1806 yes yes yes $FOAM_APPBIN ...06/platforms/linux64GccDPInt32Opt/bin yes yes yes $FOAM_SITE_APPBIN ...06/platforms/linux64GccDPInt32Opt/bin no no $FOAM_USER_APPBIN ...06/platforms/linux64GccDPInt32Opt/bin no no $WM_DIR ...oka/pkg/OpenFOAM/OpenFOAM-v1806/wmake yes yes yes ------------------------------------------------------------------------------- OpenFOAM env variables in LD_LIBRARY_PATH : ------------------------------------------------------------------------------- EnvironmentVariable FileOrDirectory Valid Path Crit ------------------------------------------------------------------------------- $FOAM_LIBBIN ...06/platforms/linux64GccDPInt32Opt/lib yes yes yes $FOAM_SITE_LIBBIN ...06/platforms/linux64GccDPInt32Opt/lib no no $FOAM_USER_LIBBIN ...06/platforms/linux64GccDPInt32Opt/lib no no $MPI_ARCH_PATH /cm/shared/myCluster/openmpi/2.0.3 yes yes yes ------------------------------------------------------------------------------- Third-party software ------------------------------------------------------------------------------- Software Version Location ------------------------------------------------------------------------------- flex 2.5.37 /bin/flex gcc 4.8.4 /cm/shared/apps/gcc/4.8.4/bin/gcc g++ 4.8.4 /cm/shared/apps/gcc/4.8.4/bin/g++ gzip 1.5 /bin/gzip tar 1.26 /bin/tar icoFoam *** not installed *** CRITICAL ERROR ------------------------------------------------------------------------------- Summary ------------------------------------------------------------------------------- Base configuration ok. The foam installation contains 1 critical error(s). Review the output for warning messages and consult the installation guide for troubleshooting. Done Last edited by Sgs; August 5, 2018 at 19:44. |
|
July 31, 2018, 02:21 |
|
#2 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19 |
Hi,
I've got the same problem too. Have you resolved yours? |
|
August 7, 2018, 10:13 |
successful compile
|
#3 |
New Member
S
Join Date: Jun 2016
Posts: 15
Rep Power: 10 |
TL;DR
I used the Third Party MPI library rather than my system MPI library - I'm not sure why my system MPI didn't work. Slightly longer version I created a prefs.sh file by copying the example one (etc/config.sh/example) into etc, although the only re-definition I have in it is Code:
export WM_MPLIB=OPENMPI Code:
source OpenFOAM-v1806/etc/bashrc cgal_version=CGAL-4.9.1 boost_version=boost_1_64_0 cd OpenFOAM-v1806 ./Allwmake |
|
August 15, 2018, 23:59 |
|
#4 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19 |
Hmm, tried it but got the error:
checking for style of include used by make... GNU checking whether make supports nested variables... yes checking whether UID '20822' is supported by ustar format... yes checking whether GID '1002' is supported by ustar format... yes checking how to create a ustar tar archive... ATTENTION! pax archive volume change required. Ready for archive volume: 1 Input archive name or "." to quit pax. Archive name > |
|
August 17, 2018, 14:58 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick question @quarkz: Which installation instructions are you following and which Linux Distribution are you using?
__________________
|
|
August 20, 2018, 02:19 |
|
#6 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19 |
Hi wyldckat,
I using instructions from: https://www.openfoam.com/code/build-guide.php My linux version is: Linux version 2.6.32-696.30.1.el6.x86_64 (mockbuild@x86-033.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) ) #1 SMP Fri May 18 11:50:44 EDT 2018 Thanks. |
|
August 20, 2018, 15:25 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer: gcc version 4.4.7 is not supported for building the recent OpenFOAM versions, from both the OpenFOAM Foundation and ESI-OpenCFD.
It seems you are using RHEL 6.x, by looking at the kernel and GCC versions. There should be a way to have GCC 6 or GCC 7 available for your system. If you are using a machine that is managed by an administrator, I strongly advise you to talk to said admin, in order to know which MPI toolbox(es) to use and how to use a more modern GCC. If you installed this machine yourself, then you will have to either build from source code (see for example https://openfoamwiki.net/index.php/I...HEL#CentOS_6.9 for ideas) - or see https://openfoamwiki.net/index.php/I...6.10_.28SCL.29 for ideas on how to build by using the Software Collections Library that provides GCC 7. edit: I forgot to mention that the error message that you've gotten is likely from trying to build Open-MPI, which sometimes gives that error message and I don't know yet why that happens... Last edited by wyldckat; August 20, 2018 at 15:26. Reason: see "edit:" |
|
August 24, 2018, 04:14 |
|
#8 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19 |
Hi wyldckat,
Thanks for the help. Actually the sys comes with gcc 4.4.7 but thru module loading, I use 4.9.3. Currently, that's the version with MPI. I'm not sure if the admin will agree to install gcc 6 or 7. However, I managed to install OpenFOAM 6 on the cluster. So I'm not sure if it is due to gcc version. |
|
August 24, 2018, 15:00 |
|
#9 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answers:
Quote:
As for MPI, then you don't need to use: Code:
export WM_MPLIB=OPENMPI What I mean is that the error message that you had gotten usually occurs when trying to build Open-MPI. Then... wait, how did you configure the MPI to work with OpenFOAM 6? Because it should work the same way with v1806... |
||
August 28, 2018, 02:35 |
|
#10 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19 |
Hi wyldckat,
I just followed the standard instruction to install OpenFOAM 6. Ya, I think the problem lies with OpenMPI. I will see what can be done. Thanks! |
|
January 20, 2019, 21:46 |
|
#11 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19 |
Hi,
I realise that I had the same problem with v1706. Recently, I tried to recompile but using: export WM_COMPILER=Gcc49 since my cluster is using only gcc 4.9.3. I managed to successfully compile now. I also tried v1812 and it works. Last edited by quarkz; January 22, 2019 at 01:41. |
|
Tags |
compile error, mpi, openfoam 1806, undefined reference |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 07:42 |
Problem compiling a custom Lagrangian library | brbbhatti | OpenFOAM Programming & Development | 2 | July 7, 2014 12:32 |
Trouble compiling utilities using source-built OpenFOAM | Artur | OpenFOAM Programming & Development | 14 | October 29, 2013 11:59 |
[swak4Foam] funkySetFields compilation error | tayo | OpenFOAM Community Contributions | 39 | December 3, 2012 06:18 |