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 Install Script (https://www.cfd-online.com/Forums/openfoam-installation/57195-openfoam-install-script.html)

jnattia March 5, 2009 12:26

Andreas, Here is what i did
 
Andreas,

Here is what i did as a new user of Linux as well:

1. Take Jure's second script above and create a doc on your machine.

2. set the file to executable by using the command: chmod a+x (name of file)

3. run the script (from a terminal) as if it was a normal program and enter your password when asked.

that's it.
one very important note. DO NOT run the script as a root.

i use Ubuntu 8.04 and the above worked fine except for a small glitch which was resolved with Jure's help (see above messages). but maybe you won't face it.

Enjoy.
Joseph

mahaputra March 14, 2009 08:18

Hei Jure thanks for your sc
 
Hei Jure

thanks for your script, it is brillian idea. make everything more simple.

by the way, i would like to upgrade my OpenFOAM 1.5 to OpenFOAM 1.5.x or OpenFOAM 1.5-dev

what should i do to modify your script?

please let me know

since i really fresh with LINUX http://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif


anybody have some idea ?


many thanks

have a nice weekend

jlakovic March 14, 2009 09:29

You don't need the script for
 
You don't need the script for this.

How about just following the instructions here?

http://www.cfd-online.com/cgi-bin/Op.../show.cgi?4/12

You will need the package git-core:

sudo aptitude install git-core

move to your OpenFOAM directory

cd $WM_PROJECT_INST_DIR

and execute

git clone git://repo.or.cz/OpenFOAM-1.5.x.git

The post says to follow the instructions in the documentation to compile OpenFOAM. I suggest reading them thoroughly before continuing.

If you have everything needed installed (which I suppose you do, since you have OpenFOAM-1.5 working already), then what I would do is execute

OpenFOAM-1.5.x/Allwmake

and wait until it finishes compiling or until it spits out some error which could take hours/days/forever to fix.

After compilation, if you wish to "upgrade", you will need to update your .bashrc.

nano ~/.bashrc

Edit the line

source /home/$USER/OpenFOAM/OpenFOAM-1.5/etc/bashrc

(where $USER is your username) so that it says OpenFOAM-1.5.x instead of OpenFOAM-1.5. Save, exit, and do

source ~/.bashrc

to update the paths.

Now you can remove the old OpenFOAM folder.

rm -rf OpenFOAM-1.5

To carry over your user files, either copy or rename the personal folder in $WM_PROJECT_INST_DIR to fit the new version, e.g.

mv $USER-1.5 $USER-1.5.x

I think that's it.

Jure

mahaputra March 14, 2009 12:30

fantastic, thanks for quick
 
fantastic,

thanks for quick answer

i will try it today!

mahaputra March 14, 2009 14:47

Dear Jure i have a problem
 
Dear Jure

i have a problem after finish with the OpenFOAM

when i tried to type : paraFoam or paraview

it could open the paraview only 1 second

after that error message came :

''Bus error''



do you know how to solve this problem?


regards

Nugie

jlakovic March 14, 2009 15:28

From http://en.wikipedia.org/w
 
From http://en.wikipedia.org/wiki/Bus_error:

"In computing, a bus error is generally an attempt to access memory that the CPU cannot physically address. Bus errors can also be caused by any general device fault that the computer detects. A bus error rarely means that computer hardware is physically broken - it is normally caused by a bug in a program's source code."

I guess you've encountered your first bug ;-)

mahaputra March 14, 2009 15:47

hemm, im using ubuntu 8.
 
hemm,


im using ubuntu 8.10

and i install OpenFoam 1.5 with your script to my collegue laptop.

everything looks fine by type : foamInstallationTest

test run on the simpleFoam tutorial as well

but when i tried to run paraFoam and paraView, it gived error message : Bus error


spech of the laptop is :

DELL
intel centrino 2
ram 3.5 GB
dual os with windows xp professional


any solution for this problem?

jlakovic March 14, 2009 16:17

Hmmm.... 32-bit or 64-bit U
 
Hmmm....

32-bit or 64-bit Ubuntu?

jlakovic March 14, 2009 17:30

No, this is unrelated. I ad
 
No, this is unrelated.

I advise against installing QT from the repositories (libqt4-dev) because it may come to a version mismatch.

The QT libraries in Ubuntu have been updated to version 4.4.3 - a version ParaView doesn't compile with.

All the needed packages are automatically selected and installed in my ParaView installation script, and the correct version of QT (4.3.5) is downloaded.

You're mixing up OpenFOAM and ParaView. The QT libraries are needed for ParaView, not for OpenFOAM to run properly.

You're saying you're trying to install OpenFOAM-1.5 using my script. You don't need to collect any packages before running the script - the script does that for you.

If you're trying to compile OpenFOAM-1.5.x, you don't need the script. All you need is gcc and wmake, which is included with OpenFOAM.

Also, the bus error your friend is experiencing - I'm thinking the problem lies in the fact that you're using a 32-bit distribution on a system with 3,5 GB of RAM. Can you try again, this time on Ubuntu 64?

Jure

mahaputra March 14, 2009 23:25

the laptop is DELL Precision M
 
the laptop is DELL Precision M4400

32 ? 64 of linux ubuntu installation?

mahaputra March 15, 2009 08:12

Smart !!!! you are right Jure
 
Smart !!!! you are right Jure !!

its because of wrong Ubuntu bit.

after i reinstall Ubuntu from 32 to 64 bit, now i can run paraview / paraFoam

but

it asks for the reader, wich one i have to choose ?


VTK??

* Kitware ParaView 3.2.2

mahaputra March 15, 2009 08:33

if i type $ paraview , it work
 
if i type $ paraview , it works fine (without openfoam case)


but if i run $paraFoam , it asks :

Open Data with ....

a reader for ''cavity.OpenFOAM'' could not be found. Please choose one :


Exodus
Exodusll
LSDyna
Paraview Data Files
VTK PolyData Files

and soon






which reader should be ?

mahaputra March 15, 2009 08:35

i already tried several option
 
i already tried several option , but the error message came :




vtkXMLPImageDataReader (0x2d60a90): Error parsing input file. ReadXMLInformation aborting.


ERROR: In /build/buildd/paraview-3.2.2/VTK/Filtering/vtkExecutive.cxx, line 757
vtkCompositeDataPipeline (0x2d33060): Algorithm vtkXMLPImageDataReader(0x2d60a90) returned failure for request: vtkInformation (0x2d14b90)
Debug: Off
Modified Time: 94299
Reference Count: 1
Registered Events: (none)
Request: REQUEST_INFORMATION
FORWARD_DIRECTION: 0
KEYS_TO_COPY: COMPOSITE_DATA_INFORMATION
ALGORITHM_AFTER_FORWARD: 1

mahaputra March 15, 2009 09:09

ahaaa... i found this one
 
ahaaa...


i found this one :


http://ubuntuforums.org/archive/index.php/t-156298.html




if paraFoam gives you the "open with" bug then instead of parafoam do

foamToVTK

then try running

paraview

@ your case directory

go to open file and you should notice that there is a VTK folder at your case directory, open it and view your results using by opening the last file.



now i can open and get post processing simulation on the paraview

http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

finnally thanks God







NB : but i still could not use $paraFoam command http://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif

jlakovic March 16, 2009 03:59

Quote:

Originally Posted by mahaputra (Post 197823)
if i type $ paraview , it works fine (without openfoam case)


but if i run $paraFoam , it asks :

Open Data with ....

a reader for ''cavity.OpenFOAM'' could not be found. Please choose one :


Exodus
Exodusll
LSDyna
Paraview Data Files
VTK PolyData Files

and soon






which reader should be ?

You still need to compile PV3FoamReader:

cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
./Allwclean
./Allwmake

Xabi March 17, 2009 13:22

I dont find the script
 
Hi Jure,

Just some days ago I found the script you've made and today when i wanted to install the openFoam Ive not been able to get it. Could you tell me where it is (i am new with the program and in the forum as well) or otherwise send it to me by email?

Thanks,
xabi

jlakovic March 17, 2009 13:31

Quote:

Originally Posted by Xabi (Post 209798)
Hi Jure,

Just some days ago I found the script you've made and today when i wanted to install the openFoam Ive not been able to get it. Could you tell me where it is (i am new with the program and in the forum as well) or otherwise send it to me by email?

Thanks,
xabi

Apparently, not all posts were transferred to the new forum. Some larger posts have not been transferred. This is strange, very strange. I will repost them shortly.

jlakovic March 17, 2009 13:54

OpenFOAM + ParaView Install Scripts
 
The installOpenFOAM script simply downloads and sets up OpenFOAM to work. It is platform independent. It does not install ParaView - that's what the second script is for. The installParaView script needs an APT-based distribution (Debian, Ubuntu) to work.

Instructions:

1. Download the files to your computer:

Attachment 20
Attachment 111

2. Open a terminal and cd to where you downloaded them
3. Type

chmod +x installOpenFOAM.txt installParaView.txt

./installOpenFOAM.txt

4. Follow the instructions to download and install OpenFOAM.
5. Run the second script:

./installParaView.txt


6. Follow instructions to compile ParaView.

Jure

Update: while doing some testing myself, it seems I've forgotten to include one package PV3FoamReader requires to compile properly:

libreadline5-dev

I've updated the installParaView script to reflect the changes.

mahaputra March 24, 2009 07:09

Quote:

Originally Posted by jlakovic (Post 209557)
You still need to compile PV3FoamReader:

cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
./Allwclean
./Allwmake

Dear Jure Lakovic

im sorry to post the report late, since i didnt touch my friend laptop after i install the the OpenFOAM in his Ubuntu 8.10 64 bit.

he still run the foamToVTK until now to post processing on paraview, or
foamDataToFluent to open on Fluent.

by the way, i just followed your instruction, to compile PV3FoamReader:

cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
./Allwclean
./Allwmake


as i shown below :

user@user-laptop:~/OpenFOAM/OpenFOAM-1.5/applications/utilities/postProcessing/graphics/PV3FoamReader$ ./Allwclean
+ rm -r PV3FoamReader/Make
+ wclean libso vtkPV3Foam
wclean vtkPV3Foam
user@user-laptop:~/OpenFOAM/OpenFOAM-1.5/applications/utilities/postProcessing/graphics/PV3FoamReader$ ./Allwmake
+ [ -d /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc -a -r /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc ]
+ wmake libso vtkPV3Foam
wmakeLnInclude: linking include files to /home/user/OpenFOAM/OpenFOAM-1.5/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/lnInclude

Making dependency list for source file vtkPV3Foam.C
could not open file vtkConfigure.h for source file vtkPV3Foam.C
Making dependency list for source file vtkPV3FoamAddVolumeMesh.C
could not open file vtkConfigure.h for source file vtkPV3FoamAddVolumeMesh.C
Making dependency list for source file vtkPV3FoamAddLagrangianMesh.C
could not open file vtkConfigure.h for source file vtkPV3FoamAddLagrangianMesh.C
Making dependency list for source file vtkPV3FoamAddPatchMesh.C
could not open file vtkConfigure.h for source file vtkPV3FoamAddPatchMesh.C
Making dependency list for source file vtkPV3FoamAddFaceZoneMesh.C
could not open file vtkConfigure.h for source file vtkPV3FoamAddFaceZoneMesh.C
Making dependency list for source file vtkPV3FoamAddPointZoneMesh.C
could not open file vtkConfigure.h for source file vtkPV3FoamAddPointZoneMesh.C
Making dependency list for source file vtkPV3FoamAddFaceSetMesh.C
could not open file vtkConfigure.h for source file vtkPV3FoamAddFaceSetMesh.C
Making dependency list for source file vtkPV3FoamAddPointSetMesh.C
could not open file vtkConfigure.h for source file vtkPV3FoamAddPointSetMesh.C
Making dependency list for source file vtkPV3FoamUpdate.C
could not open file vtkConfigure.h for source file vtkPV3FoamUpdate.C
Making dependency list for source file vtkPV3FoamUpdateInformation.C
could not open file vtkConfigure.h for source file vtkPV3FoamUpdateInformation.C
Making dependency list for source file vtkPV3FoamConvertMesh.C
could not open file vtkConfigure.h for source file vtkPV3FoamConvertMesh.C
SOURCE=vtkPV3Foam.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/user/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5/src/lagrangian/basic/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5/src/meshTools/lnInclude -I/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/VTK -I/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs -I/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK -I/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common -I/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Filtering -I/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Rendering -I../PV3FoamReader -IlnInclude -I. -I/home/user/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/user/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/vtkPV3Foam.o
In file included from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkSystemIncludes.h:30,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkIndent.h:24,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkObjectBase.h:43,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkObject.h:41,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Filtering/vtkAlgorithm.h:32,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Filtering/vtkMultiBlockDataSetAlgorithm.h:25,
from ../PV3FoamReader/vtkPV3FoamReader.h:26,
from vtkPV3Foam.C:36:
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkWin32Header.h:27:26: error: vtkConfigure.h: No such file or directory
In file included from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkSystemIncludes.h:40,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkIndent.h:24,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkObjectBase.h:43,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkObject.h:41,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Filtering/vtkAlgorithm.h:32,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Filtering/vtkMultiBlockDataSetAlgorithm.h:25,
from ../PV3FoamReader/vtkPV3FoamReader.h:26,
from vtkPV3Foam.C:36:
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkIOStream.h:68:68: error: iostream.h: No such file or directory
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkIOStream.h:69:23: error: iomanip.h: No such file or directory
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkIOStream.h:70:70: error: fstream.h: No such file or directory
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkIOStream.h:129:58: error: strstream.h: No such file or directory
In file included from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkSystemIncludes.h:44,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkIndent.h:24,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkObjectBase.h:43,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkObject.h:41,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Filtering/vtkAlgorithm.h:32,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Filtering/vtkMultiBlockDataSetAlgorithm.h:25,
from ../PV3FoamReader/vtkPV3FoamReader.h:26,
from vtkPV3Foam.C:36:
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkType.h:162:3: error: #error "No native data type can represent an 8-bit integer."
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkType.h:177:3: error: #error "No native data type can represent a 16-bit integer."
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkType.h:192:3: error: #error "No native data type can represent a 32-bit integer."
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkType.h:212:3: error: #error "No native data type can represent a 64-bit integer."
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkType.h:220:3: error: #error "No native data type can represent a 32-bit floating point value."
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkType.h:228:3: error: #error "No native data type can represent a 64-bit floating point value."
In file included from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkVariant.h:35,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkAbstractArray.h:45,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkDataArray.h:37,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkCharArray.h:29,
from vtkPV3Foam.C:39:
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkStdString.h:25:54: error: vtkstd/string: No such file or directory
In file included from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkVariant.h:35,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkAbstractArray.h:45,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkDataArray.h:37,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkCharArray.h:29,
from vtkPV3Foam.C:39:
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkStdString.h:30: error: ‘vtkstd’ has not been declared
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkStdString.h:30: error: expected `{' before ‘string’
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkStdString.h:30: error: function definition does not declare parameters
In file included from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkAbstractArray.h:45,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkDataArray.h:37,
from /home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkCharArray.h:29,
from vtkPV3Foam.C:39:
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkVariant.h:269: error: ‘vtkTypeInt64’ does not name a type
/home/user/OpenFOAM/ThirdParty/ParaView3.3-cvs/VTK/Common/vtkVariant.h:270: error: ‘vtkTypeUInt64’ does not name a type
make: *** [Make/linux64GccDPOpt/vtkPV3Foam.o] Error 1
+ cd PV3FoamReader
+ mkdir -p Make/linux64GccDPOpt
+ cd Make/linux64GccDPOpt
+ cmake ../..
-- Check for working C compiler: /home/user/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc
-- Check for working C compiler: /home/user/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /home/user/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/c++
-- Check for working CXX compiler: /home/user/OpenFOAM/ThirdParty/gcc-4.3.1/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: *** No targets specified and no makefile found. Stop.



as the report says, No target specified found.

could you please help , how to solve this problem?



many thanks

jlakovic March 31, 2009 06:36

Download the package ThirdParty.linux64Gcc.gtgz and extract it to your OpenFOAM directory:

wget http://mesh.dl.sourceforge.net/sourc...inux64Gcc.gtgz

tar xzf ThirdParty.linux64Gcc.gtgz -C /home/user/OpenFOAM


All times are GMT -4. The time now is 10:13.