CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] OpenFOAM 3.0.0 Installation - from source code (https://www.cfd-online.com/Forums/openfoam-installation/162189-openfoam-3-0-0-installation-source-code.html)

fazalhaq November 5, 2015 09:01

OpenFOAM 3.0.0 Installation - from source code
 
Hello Everyone,

I tried installing OpenFoam on my computer following the source installation instructions. After building everything the Installation test gives me the following:
Code:

---------------------------------------------------------------------------------------------------------------
Checking basic setup...
-------------------------------------------------------------------------------
Shell:              bash
Host:              fazal
OS:                Linux version 3.19.0-31-generic
-------------------------------------------------------------------------------


Checking main OpenFOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid      Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR /home/fazal/OpenFOAM                    yes      yes
$WM_PROJECT_USER_DIR /home/fazal/OpenFOAM/fazal-3.0.0        yes      no
$WM_THIRD_PARTY_DIR  /home/fazal/OpenFOAM/ThirdParty-3.0.0    yes      yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR      /home/fazal/OpenFOAM/OpenFOAM-3.0.0      yes  yes  yes

$FOAM_APPBIN        ...0/platforms/linux64GccDPInt32Opt/bin  no        yes
$FOAM_SITE_APPBIN    ...0/platforms/linux64GccDPInt32Opt/bin  no        no
$FOAM_USER_APPBIN    ...0/platforms/linux64GccDPInt32Opt/bin  no        no
$WM_DIR              .../fazal/OpenFOAM/OpenFOAM-3.0.0/wmake  yes  yes  yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the LD_LIBRARY_PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid Path Crit
-------------------------------------------------------------------------------
$FOAM_LIBBIN        ...0/platforms/linux64GccDPInt32Opt/lib  yes  yes  yes
$FOAM_SITE_LIBBIN    ...0/platforms/linux64GccDPInt32Opt/lib  no        no
$FOAM_USER_LIBBIN    ...0/platforms/linux64GccDPInt32Opt/lib  no        no
$MPI_ARCH_PATH      /usr/lib/openmpi                        yes  yes  yes
-------------------------------------------------------------------------------


Third party software
-------------------------------------------------------------------------------
Software Version  Location
-------------------------------------------------------------------------------
flex    2.5.35    /usr/bin/flex                                           
gcc      4.8.4    /usr/bin/gcc                                           
g++      4.8.4    /usr/bin/g++                                           
gzip    1.6      /bin/gzip                                               
tar      1.27.1    /bin/tar                                               
icoFoam         
WARNING:  Conflicting installations:
          OpenFOAM settings        : /home/fazal/OpenFOAM/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/bin/icoFoam
          current path            :
          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
-------------------------------------------------------------------------------------------------------

Could someone please explaine what I can do? Do I have to change variables and compile again or can I copy something into the right place?

Thank you in advance

Fazal Haq

alexeym November 5, 2015 09:14

Hi,

Long introduction: this output

Code:

icoFoam
WARNING: Conflicting installations:
OpenFOAM settings : /home/fazal/OpenFOAM/OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/bin/icoFoam
current path :
CRITICAL ERROR

is produced by function reportExecutable called like this:

Code:

reportExecutable icoFoam  "$FOAM_APPBIN/icoFoam"
first parameter is executable name (icoFoam), second parameter is location where it should be located. Function tries to locate executable with given name and compare result with canonical path.

Short conclusion: since your "current path" is empty, guess your compilation procedure finished with error and icoFoam was not built. What is output of "icoFoam -help"?

Villo November 5, 2015 17:06

Dears,
I'm facing the same issue of Fazal (I'm using Ubuntu 15.10 running on Oracle Virtual Machine).
Dear Alexey, I would reply to the question made to Fazel (I guess that our issue is the same)
Quote:

Originally Posted by alexeym (Post 572044)
What is output of "icoFoam -help"?

tommy@tommy-VirtualBox:~/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt$ icoFoam -help
icoFoam: command not found
No OpenFoam command is available (icoFoam, simpleFoam, twoLiquidMixingFoam, etc. etc.) even if i call the OpenFoam bash source in my .bashrc

The error is generated in the checking of OF variables:
Code:

[...]
Checking the OpenFOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR      /home/tommy/OpenFOAM/OpenFOAM-3.0.x      yes  yes  yes

$FOAM_APPBIN        ...x/platforms/linux64GccDPInt32Opt/bin  no        yes
$FOAM_SITE_APPBIN    ...x/platforms/linux64GccDPInt32Opt/bin  no        no
$FOAM_USER_APPBIN    ...x/platforms/linux64GccDPInt32Opt/bin  no        no
$WM_DIR              .../tommy/OpenFOAM/OpenFOAM-3.0.x/wmake  yes  yes  yes
[...]

Which leads to the critical error:

[...]
icoFoam         
WARNING:  Conflicting installations:
          OpenFOAM settings        : /home/tommy/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/bin/icoFoam
          current path            :
          CRITICAL ERROR
-------------------------------------------------------------------------------
Summary
-------------------------------------------------------------------------------
Base configuration ok.
The foam installation contains 1 critical error(s).
[...]

Checking the folder /home/tommy/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/ I realized that there's no bin folder!

alexeym November 6, 2015 01:53

@Villo

Unfortunately I can only say that the error happened during your build process. So Allwmake script stopped and executables was not built.

I do not know if you have Allwmake script output but it is the only was to diagnose the error (well, if you still have terminal session with build output open...). Could you run Allwmake (after setting up environment variable etc.) like this:

Code:

$ ./Allwmake > log.Allwmake 2>&1
and then post compressed log.Allwmake?

IIRC there were errors during build on Fedora 22, yet I do not remember what were their reasons and how I fixed them.

lhutifis November 7, 2015 14:50

1 Attachment(s)
Hello,

I`m facing the same problem too... (Using RHEL 5.3)

Here`s my make.log file.

wyldckat November 7, 2015 16:04

Greetings to all!

Thanks to lhutifis' log file, I was able to notice that the problem is that the Boost package is missing from the official installation instructions. I've reported this here: http://www.openfoam.org/mantisbt/view.php?id=1906

To install the complete Boost development package on Ubuntu, run:
Code:

sudo apt-get install libboost-all-dev
If you prefer to keep it to the minimum, then use this:
Code:

sudo apt-get install libboost-system-dev libboost-thread-dev
By the way, keep in mind that as of this version, the build system will stop on the first major error, on contrary to how things worked in OpenFOAM 2.4 and older versions, which use to continue building even if any errors had occurred.


As for those who are not using Ubuntu, please state which Linux distribution you're using!!

edit: @lhutifis: Sorry, didn't notice that you had mentioned RHEL 5.3. Give me a few hours and I'll have the instructions on the wiki up for 3.0. In the meantime, you can try following the ones for OpenFOAM 2.4.x and CentOS 5.11: http://openfoamwiki.net/index.php/In...EL#CentOS_5.11 - what you are looking for are the instructions needed for installing Boost...

edit2: Sorry, only have the instructions up for Ubuntu https://openfoamwiki.net/index.php/I...M-3.0.0/Ubuntu - and CentOS 6.7: https://openfoamwiki.net/index.php/I...HEL#CentOS_6.7 - for CentOS 5.x and 7.x will still take me a few more days until I have these two done.

Best regards,
Bruno

lhutifis November 9, 2015 13:12

Hi Bruno,

I appreciate your support.


Best,
Willian

lhutifis November 11, 2015 10:32

Hi Bruno,

I'm trying to install OpenFoam2.4 following your instructions.
Everything went well until paraview installation. I'm facing this
error:


Code:

[ 96%] Generating Documentation HTMLs from xmls
CMake Error at /opt/OpenFOAM/ThirdParty-2.4.0/ParaView-4.1.0/CMake/generate_proxydocumentation.cmake:18 (message):
  No xmlpatterns executable was defined!!!


make[2]: *** [Plugins/PointSprite/ParaViewPlugin/CSCS_PointSprite_Rendering.xml.xml] Error 1
make[1]: *** [Plugins/PointSprite/ParaViewPlugin/CMakeFiles/PointSprite_Plugin.dir/all] Error 2
make: *** [all] Error 2

Do you have any idea what could be causing this problem?

Thanks!


Edit: Everything is running now!

I just needed to compile Qt with -xmlpatterns option.

wyldckat November 15, 2015 11:47

Quote:

Originally Posted by lhutifis (Post 572351)
I`m facing the same problem too... (Using RHEL 5.3)

@lhutifis: Instructions for CentOS 5.11 is up and should work with RHEL 5.3: https://openfoamwiki.net/index.php/I...EL#CentOS_5.11

In addition, for CentOS 7.1 is also up: https://openfoamwiki.net/index.php/I...HEL#CentOS_7.1

Quote:

Originally Posted by lhutifis (Post 572928)
I'm trying to install OpenFoam2.4 following your instructions.
[...]
I just needed to compile Qt with -xmlpatterns option.

This is a bit strange... the instructions on the wiki: https://openfoamwiki.net/index.php/I...EL#CentOS_5.11 - point to using the script makeQt, which seems to build "xmlpatterns" by default...

nethmech April 18, 2016 22:45

1 Attachment(s)
Hello Everyone,

I tried installing Openfoam 3.0+. Installation proceeded smoothly but at the end I get one critical error. Updated Boost lib files as well, as suggested by Bruno, but issue still remains :confused:. Here is my log file. Kindly help.

wyldckat April 19, 2016 18:08

Quick answer: Run:
Code:

./Allwmake > log.make 2>&1
so that the actual error messages are sent into the log file. Because the one you attached doesn't have the actual error messages :(

nethmech April 20, 2016 10:33

OpenFoam 3.0 installation error from source code
 
2 Attachment(s)
Hello,

Here is the log file and the installation test result.:)

I followed all instructions given on the OpenFoam webpage. Still it didn't work. Let me know what's happening here.


Thanks in Advance. :confused:

wyldckat April 20, 2016 17:12

Quick answer: Run the following commands:
Code:

#Go into OpenFOAM's main source folder
cd $WM_PROJECT_DIR
 
#Change how the flex version is checked
find src applications -name "*.L" -type f | xargs sed -i -e 's=\(YY\_FLEX\_SUBMINOR\_VERSION\)=YY_FLEX_MINOR_VERSION < 6 \&\& \1='

./Allwmake > log.make 2>&1

If all goes well, the problem will be solved.

Manyway July 7, 2016 17:48

Similar Problem
 
1 Attachment(s)
Hello all, I would really appreciate if you help me.

I keep getting the errors while compiling the OpenFoam. Here is the result of the installation test:

moto@ubuntu:~/OpenFOAM/OpenFOAM-v1606+$ foamInstallationTest
Code:

Executing /home/moto/OpenFOAM/OpenFOAM-v1606+/bin/foamInstallationTest:


Checking basic setup...
-------------------------------------------------------------------------------
Shell:              bash
Host:              ubuntu
OS:                Linux version 4.4.0-21-generic
-------------------------------------------------------------------------------


Checking main OpenFOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid      Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR /home/moto/OpenFOAM                      yes      yes
$WM_PROJECT_USER_DIR /home/moto/OpenFOAM/moto-v1606+          yes      no
$WM_THIRD_PARTY_DIR  /home/moto/OpenFOAM/ThirdParty-v1606+    yes      yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR      /home/moto/OpenFOAM/OpenFOAM-v1606+      yes  yes  yes

$FOAM_APPBIN        ...+/platforms/linux64GccDPInt32Opt/bin  yes  yes  yes
$FOAM_SITE_APPBIN    ...+/platforms/linux64GccDPInt32Opt/bin  no        no
$FOAM_USER_APPBIN    ...+/platforms/linux64GccDPInt32Opt/bin  no        no
$WM_DIR              .../moto/OpenFOAM/OpenFOAM-v1606+/wmake  yes  yes  yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the LD_LIBRARY_PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid Path Crit
-------------------------------------------------------------------------------
$FOAM_LIBBIN        ...+/platforms/linux64GccDPInt32Opt/lib  yes  yes  yes
$FOAM_SITE_LIBBIN    ...+/platforms/linux64GccDPInt32Opt/lib  no        no
$FOAM_USER_LIBBIN    ...+/platforms/linux64GccDPInt32Opt/lib  no        no
$MPI_ARCH_PATH      /usr/lib/lam                            yes  yes  yes
-------------------------------------------------------------------------------


Third party software
-------------------------------------------------------------------------------
Software Version  Location
-------------------------------------------------------------------------------
flex    2.6.0    /usr/bin/flex                                           
gcc      5.3.1    /usr/bin/gcc                                           
g++      5.3.1    /usr/bin/g++                                           
gzip    1.6      /bin/gzip                                               
tar      1.28      /bin/tar                                               
icoFoam         
WARNING:  Conflicting installations:
          OpenFOAM settings        : /home/moto/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/icoFoam
          current path            :
          CRITICAL ERROR

-------------------------------------------------------------------------------


Summary
-------------------------------------------------------------------------------
Base configuration ok.
The foam installation contains 1 critical error(s).

The full log file is attached.
Attachment 48974

So, the errors it shows:
Quote:

collect2: error: ld returned 1 exit status
/home/moto/OpenFOAM/OpenFOAM-v1606+/wmake/makefiles/general:132: recipe for target '/home/moto/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/laplacianFoam' failed
make[2]: *** [/home/moto/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/bin/laplacianFoam] Error 1
make[2]: Leaving directory '/home/moto/OpenFOAM/OpenFOAM-v1606+/applications/solvers/basic/laplacianFoam'
/home/moto/OpenFOAM/OpenFOAM-v1606+/wmake/makefiles/apps:39: recipe for target 'laplacianFoam' failed
make[1]: *** [laplacianFoam] Error 2
make[1]: Leaving directory '/home/moto/OpenFOAM/OpenFOAM-v1606+/applications/solvers/basic'
/home/moto/OpenFOAM/OpenFOAM-v1606+/wmake/makefiles/apps:39: recipe for target 'basic' failed
make: *** [basic] Error 2
I installed libboost and everything I could find.
What can be the problem?

alexeym July 7, 2016 18:59

Hi,

error is here

Code:

/home/moto/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `PMPI::Intracomm::current_op'
/home/moto/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `PMPI::Comm::mpi_comm_map'
/home/moto/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI::Is_initialized()'
/home/moto/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `PMPI::Comm::mpi_err_map'
/home/moto/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI::Op::Free()'
/home/moto/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `op_intercept'
/home/moto/OpenFOAM/OpenFOAM-v1606+/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so: undefined reference to `MPI::Op::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)'
collect2: error: ld returned 1 exit status

it is rather strange, do you have openmpi-dev (since headers are there) and no openmpi (there are no libraries to link to)?

Also, you are trying to compile new version, why post your message to 3.0.0 thread?

Manyway July 7, 2016 20:09

Oh, thanks! I'm new to this forum. I moved this question to a new thread!
Here is the link:
http://www.cfd-online.com/Forums/ope...tml#post608490

Yes, I have openmpi-dev. I even updated it, however the issue is still there


All times are GMT -4. The time now is 23:57.