CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   OpenFOAM 2.0.1-foamInstallationTest Failed on Fedora 15 x64 (http://www.cfd-online.com/Forums/openfoam/91421-openfoam-2-0-1-foaminstallationtest-failed-fedora-15-x64.html)

Winston Wu August 10, 2011 06:14

OpenFOAM 2.0.1-foamInstallationTest Failed on Fedora 15 x64
 
Hi!
I'm a newcomer to OpenFOAM, and when I tried to compile OpenFOAM 2.0.1, everything seemed to be fine except...

WARNING: Conflicting installations:
OpenFOAM settings : /home/mirage/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/bin/icoFoam
current path :
CRITICAL ERROR

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

Can somebody tell me what am I doing wrong?

Thank you.

wyldckat August 10, 2011 09:58

Greetings Winston and welcome to the forum!

You can check this post: Fedora 15 install help post #4 - it's a bit old, since those instructions were for OpenFOAM 1.7.x, but they are easily adaptable to 2.0.1 and/or 2.0.x.

But what you probably need to know from that post is this:
  1. The packages necessary for building OpenFOAM in Fedora:
    Code:

    yum install gcc gcc-c++ binutils-devel flex git-core wget cmake qt4-devel python-devel readline-devel bison ncurses-devel tix.x86_64 glibc-devel flex zlib-devel libXt-devel binutils-static python-devel qt-devel cmake flex patch
  2. Keep a log of the build process:
    Code:

    ./Allwmake > make.log 2>&1
    The first occurrence of an error is usually the indicative of the responsible problem.
  3. If you aren't able to verify what the problem is, run:
    Code:

    tar -czf make.log.tar.gz make.log
    Then attach the file make.log.tar.gz to your next post.
Best regards,
Bruno

Winston Wu August 13, 2011 11:54

Quote:

Originally Posted by wyldckat (Post 319624)
Greetings Winston and welcome to the forum!

You can check this post: Fedora 15 install help post #4 - it's a bit old, since those instructions were for OpenFOAM 1.7.x, but they are easily adaptable to 2.0.1 and/or 2.0.x.

But what you probably need to know from that post is this:
  1. The packages necessary for building OpenFOAM in Fedora:
    Code:

    yum install gcc gcc-c++ binutils-devel flex git-core wget cmake qt4-devel python-devel readline-devel bison ncurses-devel tix.x86_64 glibc-devel flex zlib-devel libXt-devel binutils-static python-devel qt-devel cmake flex patch
  2. Keep a log of the build process:
    Code:

    ./Allwmake > make.log 2>&1
    The first occurrence of an error is usually the indicative of the responsible problem.
  3. If you aren't able to verify what the problem is, run:
    Code:

    tar -czf make.log.tar.gz make.log
    Then attach the file make.log.tar.gz to your next post.
Best regards,
Bruno

Hi Bruno!

Thank you!Dealing with my headache and had no access to cfd-online. Sorry for absent><

I compiled OpenFOAM successfully but when I run paraFoam, it seemed there are some problems...

FATAL ERROR: ParaView reader module libraries do not exist

Please build the reader module before continuing:
cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers
./Allwclean
./Allwmake

I did as the instruction above and it still didn't work!

Then I tried to compile the paraView module by ./makeParaView, and
[ 7%] Building CXX object VTK/Utilities/vtkmetaio/CMakeFiles/vtkmetaio.dir/metaUtils.cxx.o
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx: In function 'bool vtkmetaio::MET_StringToWordArray(const char*, int*, char***)':
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:804:3: error: 'ptrdiff_t' was not declared in this scope
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:804:3: note: suggested alternatives:
/usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../include/c++/4.6.0/x86_64-redhat-linux/bits/c++config.h:1737:28: note: 'std::ptrdiff_t'
/usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../include/c++/4.6.0/x86_64-redhat-linux/bits/c++config.h:1737:28: note: 'std::ptrdiff_t'
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:804:13: error: expected ';' before 'l'
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:806:13: error: expected ';' before 'p'
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:807:9: error: 'p' was not declared in this scope
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:807:11: error: 'l' was not declared in this scope
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:813:13: error: expected ';' before 'pp'
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:815:9: error: 'pp' was not declared in this scope
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:815:12: error: 'l' was not declared in this scope
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:828:3: error: 'pp' was not declared in this scope
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:828:6: error: 'l' was not declared in this scope
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:844:13: error: expected ';' before 'i'
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:845:7: error: 'i' was not declared in this scope
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:847:8: error: 'p' was not declared in this scope
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:853:11: error: 'p' was not declared in this scope
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:857:5: error: 'j' was not declared in this scope
/home/caonima/OpenFOAM/ThirdParty-2.0.x/ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx:858:11: error: 'p' was not declared in this scope
make[2]: *** [VTK/Utilities/vtkmetaio/CMakeFiles/vtkmetaio.dir/metaUtils.cxx.o] Error 1
make[1]: *** [VTK/Utilities/vtkmetaio/CMakeFiles/vtkmetaio.dir/all] Error 2
make: *** [all] Error 2
---
it didn't work ><

Then I followed the post Fedora 15 install help post to install paraView from fedora Repository and set the environment. It didn't work either.

Winston Wu

wyldckat August 14, 2011 16:47

Hi Winston Wu,

Quote:

Originally Posted by Winston Wu (Post 319992)
Then I followed the post Fedora 15 install help post to install paraView from fedora Repository and set the environment. It didn't work either.

Try running paraFoam like this:
Code:

paraFoam -builtin
As for building ParaView itself, I'll check it in a while as to what might be missing...

_______________
edit: stupid Fedora... they changed the name for qmake to qmake-qt4... you'll have to run makeParaView like this:
Code:

./makeParaView -qmake `which qmake-qt4`
But before that, do as indicated here: http://www.cfd-online.com/Forums/blo...tml#comment760 - Or better, run this command on the same folder where makeParaView is:
Code:

sed -i -e 's=ptrdiff_t=std::ptrdiff_t='  ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx
This will fix the compiler bug, namely the error you got.
_______________

edit 2: well, in case someone who is reading this wants to use Fedora's OpenMPI version, here's a few more steps to be made before building OpenFOAM:
  1. Install openmpi with development stuff:
    Code:

    yum install openmpi-devel
  2. Add a few more details to OpenFOAM's environment (this is assuming x86_64 version of Fedora):
    Code:

    foam
    echo export WM_MPLIB=SYSTEMOPENMPI > etc/prefs.sh
    echo module load openmpi-x86_64  >> etc/prefs.sh
    echo export WM_COMPILER=Gcc46 >> etc/prefs.sh
    echo export WM_NCOMPPROCS=4 >> etc/prefs.sh

    WM_NCOMPPROCS=4 specifies the number of cores to use during the building process.
  3. Log out and log back in... or even reboot, since this is necessary for the "module" system to work properly.
  4. The rest is the same as usual.
_______________

Best regards,
Bruno

l_r_mcglashan August 16, 2011 04:43

Quote:

Originally Posted by wyldckat (Post 320042)

_______________
edit: stupid Fedora... they changed the name for qmake to qmake-qt4... you'll have to run makeParaView like this:
Code:

./makeParaView -qmake `which qmake-qt4`
But before that, do as indicated here: http://www.cfd-online.com/Forums/blo...tml#comment760 - Or better, run this command on the same folder where makeParaView is:
Code:

sed -i -e 's=ptrdiff_t=std::ptrdiff_t='  ParaView-3.10.1/VTK/Utilities/vtkmetaio/metaUtils.cxx
This will fix the compiler bug, namely the error you got.
_______________

I can confirm that bug - when it came up first time I installed paraview I panicked, but fortunately that was the only bug and it was only in that file! Glad to see I'm not the only one who bumped into it!

wyldckat August 16, 2011 07:24

Hi Laurence,

Well, for future reference, this has already been fixed for ParaView 3.12: http://paraview.org/Bug/view.php?id=12157 - but I don't have a clue when will it come out...

Best regards,
Bruno


All times are GMT -4. The time now is 11:40.