CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   installation OpenFOAM (https://www.cfd-online.com/Forums/openfoam-installation/69527-installation-openfoam.html)

lyna October 26, 2009 09:53

installation OpenFOAM
 
Hi !
please can you help me to install the OpenFOAM in the fedora linux distribution
thank you:o

sega October 26, 2009 12:55

What is the problem?
Please be more specific or you won't get any answers.

lyna October 27, 2009 05:29

Hi
first can I used the fedora distribution instead of the ubuntu or suse distributions
to install OpenFOAM code
thank you

gwierink October 28, 2009 02:57

Hi Lynda,

Yes it is possible, my OpenFOAM is very happy on Fedora :D. Here are some basic instructions that worked for me (it is for OpenFOAM-1.5, but works also for 1.6, just the file names are different). Hope that solves your trouble.

Cheers,

Gijsbert

lyna November 2, 2009 06:05

Hi Gijsbert
Mon .bashrc is in /root /.bashrc directory.
When I copy the following line:
/ home/OpenFOAM/OpenFOAM-1.6/etc/bashrc
in / root/.bashrc file, I have a problem when I turn on my PC or when I open a new terminal because I find the following error message:
Permission not granted (Permission non accordée)
please help me

gwierink November 2, 2009 06:19

Hi Lynda,

You need to put the line
Code:

. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
in $HOME/.bashrc (in case you don't know, "$HOME" is another way to put the path to your user home directory, in my case /home/gijsbert/). This is your user .bashrc, not root's .bashrc :). Just open a terminal and type
Code:

gedit .bashrc &
and paste the line above in it (notice the "." at the beginning). Save and close gedit and source the terminal with (notice the "." at the beginning again)
Code:

. $HOME/.bashrc
or just close it and open an new terminal.

Hope this helps.

Regards,

Gijsbert

lyna November 2, 2009 06:48

Hi Gijsbert
I did all the steps in your message, I've copied a terminal to see better things

terminal
bash: ./root/OpenFOAM/OpenFOAM-1.6/etc/bashrc: Aucun fichier ou répertoire de ce type
[root@localhost ~]# .$HOME/.bashrc
bash: ./root/.bashrc: Aucun fichier ou répertoire de ce type
[root@localhost ~]# .$HOME/.bashrc
bash: ./root/.bashrc: Aucun fichier ou répertoire de ce type
[root@localhost ~]#



thank you

gwierink November 2, 2009 07:30

Hi Lynda,

Ok, first of all you need to be in your user account in the terminal, not in root. It seems you are root
Quote:

[root@localhost ~]#
It is better to use your user account (type "exit" to get out of the root account in the terminal). Also, there needs to be a space between "." and "$HOME/....", so not
Quote:

.$HOME/.bashrc
, but
Code:

. $HOME/.bashrc
Let me know how it goes.

Cheers, Gijs

lyna November 2, 2009 10:19

Hi Gijsbert

I opened another session and I redid all, but I had the same messages in
the terminal, it may be necessary to copy the OpenFOAM directory in my file LTPMP
is not it?
Here's what I got :

terminal
bash: /home/LTPMP/OpenFOAM/OpenFOAM-1.6/etc/bashrc: Aucun fichier ou répertoire de ce type
[LTPMP@localhost ~]$ . $HOME/.bashrc
bash: /home/LTPMP/OpenFOAM/OpenFOAM-1.6/etc/bashrc: Aucun fichier ou répertoire de ce type
[LTPMP@localhost ~]$

thank you

gwierink November 2, 2009 10:36

Hi Lynda,

Did you install OF as root? If so, it is probably located in /root/OpenFOAM/. It is better to install OF in your user account. In your case, I'm afraid, you need to reinstall OF in your user account, i.e. do the whole installation procedure as [LTPMP@localhost ~]$. And to keep things tidy I would delete the OpenFOAM directory from root.

Cheers, Gijsbert

lyna November 9, 2009 09:56

Hi Gijsbert

I do not have Qt installed, I tried on the two methods listed in your''....................'' yum install or download package qt-x11-opensource-src-4.3.5.tar.gz, but it did not work. I downloaded this package and I followed the instructions through step 3
make when I typed in my terminal I have the following result;

[root@localhost qt-x11-opensource-src-4.3.5]# make
make: *** Pas de cibles spécifiées et aucun makefile n'a été trouvé. Arrêt.

THANK YOU

gwierink November 9, 2009 11:14

Hi Lyna,

So
Code:

yum groupinstall "X Software Development"
did not work?

Did you do
Code:

./configure
after you unpacked qt?
And then
Code:

gmake
followed by
Code:

gmake install
?

Cheers, Gijs

PS If you need to re-make qt again for some reason you can clean by
Code:

gmake confclean

lyna November 11, 2009 09:59

Hi Gijsbert

I installed QT, I tried to run the sample "cavity" I wanted to show the mesh and found the results, I typed "paraFoam" ParaView window opens but I do not knew how to get certified in Figure 6.1 User Guide (p U-160)

thank you

gwierink November 12, 2009 05:00

I am sorry, Lyna, but I do not understand what you mean. Did you solve the problem? If not, what is the issue?

lyna November 12, 2009 07:59

Hi Gijibert
yes,I solved the « qt-x11-opensource-src-4.3.5 »problem.
I want to rebuild the paraview ( the next step of the 'qt-x11-opensource-src-4.3.5') unfortunately, I can't run the last step (builparaview) and even (makeparaview)

gwierink November 12, 2009 10:55

Hi Lynda,

It seems that you are using OpenFOAM-1.6, am I right? If so, you need to do the following:
Code:

cd $WM_THIRD_PARTY_DIR

rm -rf paraview-3.6.1/platforms

makeParaView

as explained in section 7 of the README file. What is the terminal output if you try makeParaView?

It may be that you need to specify the location of Qt and Mesa in lines 37-60 of $HOME/OpenFOAM/ThirdParty-1.6/makeParaView. Mine looks like this:

Code:

# User options:
# ~~~~~~~~~~~~~

# MPI support:
withMPI=false
MPI_MAX_PROCS=32

# Python support:
# note: script will try to determine the appropriate python library.
#      If it fails, specify the path using the PYTHON_LIBRARY variable
withPYTHON=false
PYTHON_LIBRARY=""
# PYTHON_LIBRARY="/usr/lib64/libpython2.6.so.1.0"

# MESA graphics support:
withMESA=false
MESA_INCLUDE="/usr/include/GL"
MESA_LIBRARY="/usr/lib64/libOSMesa.so"

# extra QT gui support (useful for re-using the installation for engrid)
withQTSUPPORT=true

# Set the path to the Qt-4.3.? qmake if the system Qt is other than this version
QMAKE_PATH=""

If you need to know the qmake path, just type
Code:

which qmake
Cheers,

Gijs

lyna November 16, 2009 05:49

Hi Gijibert

Yes, you're right. I use OpenFOAM-1.6.
I have problem with the command « makeParaView »; the output terminal don't find this command,
Please, I don't know in what file are the 37 and 60 lines and how to specify Qt and Misa.


Thank you

gwierink November 17, 2009 02:34

Hi Lynda,

First find out where qmake is located by
Code:

which qmake
This will give you the QMAKE_PATH, in my case it is $HOME/tmp/qt-x11-opensource-src-4.3.5/bin/qmake. Then, open the file makeParaView with
Code:

gedit $HOME/OpenFOAM/ThirdParty-1.6/makeParaView &
and check that the openGL libraries (MESA), python, and qmake are the right paths (make changes if needed and save). Mine looks like this (line 37-60):
Code:

# User options:
# ~~~~~~~~~~~~~

# MPI support:
withMPI=false
MPI_MAX_PROCS=32

# Python support:
# note: script will try to determine the appropriate python library.
#      If it fails, specify the path using the PYTHON_LIBRARY variable
withPYTHON=false
PYTHON_LIBRARY=""
# PYTHON_LIBRARY="/usr/lib64/libpython2.6.so.1.0"

# MESA graphics support:
withMESA=false
MESA_INCLUDE="/usr/include/GL"
MESA_LIBRARY="/usr/lib64/libOSMesa.so"

# extra QT gui support (useful for re-using the installation for engrid)
withQTSUPPORT=true

# Set the path to the Qt-4.3.? qmake if the system Qt is other than this version
QMAKE_PATH=""


lyna November 18, 2009 03:37

Hi Gijibert

after the change the path in to lines (37-60), shows in the following lines :

code ;
************************************************** ***************************************
# MPI support:
withMPI=false
MPI_MAX_PROCS=32

# Python support:
# note: script will try to determine the appropriate python library.
# If it fails, specify the path using the PYTHON_LIBRARY variable
withPYTHON=false
PYTHON_LIBRARY="/usr/lib64/libpython2.5.so.1.0"
# PYTHON_LIBRARY="/usr/lib64/libpython2.6.so.1.0"

# MESA graphics support:
withMESA=false
MESA_INCLUDE="/usr/include/GL"
MESA_LIBRARY="/usr/lib64/libOSMesa.so.6.5.2"

# extra QT gui support (useful for re-using the installation for engrid)
withQTSUPPORT=true

# Set the path to the Qt-4.3? qmake if the system Qt is other than this version
QMAKE_PATH="/tmp/qt-x11-opensource-src-4.3.5/bin/qmake"
************************************************** ************************************************** **

Because, I find the qmake Mesa and libpython libraries paths, the output terminal is ;

************************************************
[root@localhost ~]# find / -name 'libpython*' -print
/usr/lib/libpython2.5.so
/usr/lib/python2.5/config/libpython2.5.a
/usr/lib/python2.5/config/libpython2.5.so
/usr/lib/libpython2.5.so.1.0
/usr/lib64/libpython2.5.so
/usr/lib64/python2.5/config/libpython2.5.a
/usr/lib64/python2.5/config/libpython2.5.so
/usr/lib64/libpython2.5.so.1.0
/usr/lib64/gnome-vfs-2.0/modules/libpythonmethod.so
[root@localhost ~]# find / -name 'libOSMesa.so*' -print
/usr/lib/libOSMesa.so.6.5.2
/usr/lib/libOSMesa.so.6
/usr/lib64/libOSMesa.so.6.5.2
/usr/lib64/libOSMesa.so.6
************************************************** ***********

I want to rebuild the paraview. unfortunately, I can't run "maKeParaview", the output terminal don't find this command,

thank you

wyldckat November 18, 2009 09:06

Hello Lynda,

In Linux, to run scripts from a local folder, usually you have to use "./". For your case:
Code:

./makeParaView
I know, it's a bit weird, but that's how it works.

I hope it finally works. Best regards,
Bruno

lyna November 23, 2009 03:34

1 Attachment(s)
Hi
Thank you for your help.
After installing OF, I tried to treat the example of "cavity" in README file mentioned in Section 6,
I got "0.1, 0.2, 0.3, 0.4, 0.5" folders
I did not get the display on screen as it appears in User Guide (Figure 6.1), see the attached file

Thank you

lyna November 23, 2009 03:39

viewing
 
1 Attachment(s)
Hi
Thank you for your help.
After installing OF, I tried to treat the example of "cavity" in README file mentioned in Section 6,
I got "0.1, 0.2, 0.3, 0.4, 0.5" folders
I did not get the display on screen as it appears in User Guide (Figure 6.1), see the attached file

Thank you

sega November 23, 2009 03:45

Quote:

Originally Posted by lyna (Post 237302)
After installing OF, I tried to treat the example of "cavity" in README file mentioned in Section 6

I think you didn't install as mentioned in the README file.
Refer to section seven of the README for the compilation of ParaView and your problem will be gone.

EDIT: gwierink suggested it allready in Post #16.

gwierink November 23, 2009 04:03

Hi Lynda,

Now you seemingly managed to compile paraFoam. The reason ParaView cannot find a reader for your case is probably that you have not yet recompiled the PV3FoamReader (as indeed mentioned in the README file). For this do the following:

Code:

cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
Code:

./Allwclean
Code:

./Allwmake
(Note again the dot (".") before the command)

lyna November 23, 2009 06:45

Hi
when I typed in my terminal "./Allwmake" , I have the following result;

In file included from /root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkSystemIncludes.h:44,
from /root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkIndent.h:24,
from /root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkObjectBase.h:43,
from /root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkObject.h:41,
from /root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Filtering/vtkAlgorithm.h:32,
from /root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Filtering/vtkMultiBlockDataSetAlgorithm.h:25,
from ../PV3FoamReader/vtkPV3FoamReader.h:31,
from vtkPV3Foam.C:28:
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:165:3: error: #error "No native data type can represent an 8-bit integer."
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:180:3: error: #error "No native data type can represent a 16-bit integer."
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:195:3: error: #error "No native data type can represent a 32-bit integer."
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:215:3: error: #error "No native data type can represent a 64-bit integer."
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:223:3: error: #error "No native data type can represent a 32-bit floating point value."
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:231:3: error: #error "No native data type can represent a 64-bit floating point value."
make: *** [Make/linux64GccDPOpt/vtkPV3Foam.o] Erreur 1
+ cd PV3FoamReader
+ mkdir -p Make/linux64GccDPOpt
+ cd Make/linux64GccDPOpt
+ cmake ../..
./Allwmake: line 14: cmake: command not found
+ make
make: *** Pas de cibles spécifiées et aucun makefile n'a été trouvé. Arrêt.

sega November 23, 2009 06:47

Quote:

Originally Posted by lyna (Post 237325)
./Allwmake: line 14: cmake: command not found

You will have to install cmake before!
BTW: Still trying to install in the root-directory?

lyna November 23, 2009 07:29

I installed cmake, I have other problem
I have the following result;
.
.
.
.
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:165:3: error: #error "No native data type can represent an 8-bit integer."
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:180:3: error: #error "No native data type can represent a 16-bit integer."
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:195:3: error: #error "No native data type can represent a 32-bit integer."
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:215:3: error: #error "No native data type can represent a 64-bit integer."
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:223:3: error: #error "No native data type can represent a 32-bit floating point value."
/root/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/VTK/Common/vtkType.h:231:3: error: #error "No native data type can represent a 64-bit floating point value."
make: *** [Make/linux64GccDPOpt/vtkPV3Foam.o] Erreur 1
+ cd PV3FoamReader
+ mkdir -p Make/linux64GccDPOpt
+ cd Make/linux64GccDPOpt
+ cmake ../..
-- Check for working C compiler: /root/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/gcc
-- Check for working C compiler: /root/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /root/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/c++
-- Check for working CXX compiler: /root/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/bin/c++ -- works
CMake Error: ParaView_DIR is not set. It must be set to the directory containing ParaViewConfig.cmake in order to use ParaView.
-- Configuring done
+ make
make: *** Pas de cibles spécifiées et aucun makefile n'a été trouvé. Arrêt.
[root@localhost PV3FoamReader]#

sega November 23, 2009 07:34

This may be (I'm not sure) because you are installing in the root-directory and not in your user account. (Why did you do this again?)

Check for section 3.1 in the README. Maybe this will solve the problem.

l_r_mcglashan November 23, 2009 07:37

Why use Fedora when you aren't comfortable with Linux? Why not use Ubuntu or OpenSuse?
Why are you installing as root?

I would think about the answers to those questions before proceeding further.

alberto November 23, 2009 18:04

Just a hint for the paraFoam reader problems. The reader is a bit sensitive to the version of Qt you use. For example, I did not manage to make it work correctly, even if it builds, on OpenSUSE 11.2, where it launches paraview, it opens the case but it does not show data or it shows them not correctly.

You can easily workaround the problem using pvFoam, that can be downloaded from the wiki:

http://openfoamwiki.net/index.php/Co...r_for_ParaView

Simply build it, and copy the pvFoam bash script in a directory included in your PATH.

Best,

lyna November 30, 2009 05:43

Hi

when I typed in my terminal "./Allwmake" , I have other problem
I have the following result;

************************************************** ************************************************** ****************
.
.
.
.

-- Build files have been written to: /root/OpenFOAM/OpenFOAM-1.6/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/Make/linux64GccDPOpt
+ make
[ 8%] Generating qrc_PV3FoamReader.cxx
[ 16%] Generating moc_PV3FoamReaderPluginImplementation.cxx
Scanning dependencies of target PV3FoamReader
[ 25%] Building CXX object CMakeFiles/PV3FoamReader.dir/moc_PV3FoamReaderPluginImplementation.o
[ 33%] Building CXX object CMakeFiles/PV3FoamReader.dir/PV3FoamReaderPluginImplementation.o
[ 41%] Building CXX object CMakeFiles/PV3FoamReader.dir/qrc_PV3FoamReader.o
Linking CXX shared library /root/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libPV3FoamReader.so
/usr/bin/ld: cannot find -lpqComponents
collect2: ld returned 1 exit status
make[2]: *** [/root/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libPV3FoamReader.so] Erreur 1
make[1]: *** [CMakeFiles/PV3FoamReader.dir/all] Erreur 2
make: *** [all] Erreur 2

************************************************** ************************************************** ****************
please help me
thank you

lyna December 2, 2009 09:16

Hi

when I typed in my terminal "./Allwmake" , I have other problem
I have the following result;

************************************************** ************************************************** ****************
.
.
.
.

-- Build files have been written to: /root/OpenFOAM/OpenFOAM-1.6/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/Make/linux64GccDPOpt
+ make
[ 8%] Generating qrc_PV3FoamReader.cxx
[ 16%] Generating moc_PV3FoamReaderPluginImplementation.cxx
Scanning dependencies of target PV3FoamReader
[ 25%] Building CXX object CMakeFiles/PV3FoamReader.dir/moc_PV3FoamReaderPluginImplementation.o
[ 33%] Building CXX object CMakeFiles/PV3FoamReader.dir/PV3FoamReaderPluginImplementation.o
[ 41%] Building CXX object CMakeFiles/PV3FoamReader.dir/qrc_PV3FoamReader.o
Linking CXX shared library /root/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libPV3FoamReader.so
/usr/bin/ld: cannot find -lpqComponents
collect2: ld returned 1 exit status
make[2]: *** [/root/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libPV3FoamReader.so] Erreur 1
make[1]: *** [CMakeFiles/PV3FoamReader.dir/all] Erreur 2
make: *** [all] Erreur 2

************************************************** ************************************************** ***********
in this [/root/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libPV3FoamReader.so] path
I don't find the "libPV3FoamReader.so" file.

I found the "libPV3FoamReader_SM.so" file instead of "libPV3FoamReader.so" file

Please help me

thank you

lyna January 4, 2010 08:26

installation OF
 
Hi
please help me, I have a great problem ! I have used the Fedora7 distribution for the installation of OF , but I found problem in the post processing (ParaFoam).
Is it due to the fedora distribution ? or to the Qt,.... versions?
please send me the well distribution of de Linux and the versions of the all corresponding logiciels to install the OF:confused:
thank you

gwierink January 4, 2010 08:39

Fedora 7? Hmm, I don't know, the oldest Fedora I used was 9. The Qt version I used is 4.3.5 and can be found on Trolltech's website: ftp://ftp.trolltech.no/qt/source/ (get package qt-x11-opensource-src-4.3.5.tar.gz). The distributions I use/have used are Fedora 10 and 11, Ubuntu, and OpenSUSE. OF worked just fine on my older Fedora 9 as well, but never tried F7. If you're really stuck I suggest you install ParaView and use foamToVTK.


All times are GMT -4. The time now is 05:30.