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)

ljsh September 12, 2008 05:45

Tried the script and it just w
 
Tried the script and it just work great!!! Thanks a lot Jure!

elvis September 20, 2008 07:55

I tried the script on my 32 bi
 
I tried the script on my 32 bit machine with success.
So first of all! Thanks a lot Jure!
But compiling QT 4.3.5 take a lot of time.

My thoughts were to use (libqt4xx) comment wget 4 QT 4.3.5 download and put some more debs to aptitude
libqt4-dev
qt4-dev-tools
libqt4-opengl-dev

in the script, that would install QT 4.4
modify "CMakeLists.txt" => comment the line: 94
as described in
http://www.cfd-online.com/cgi-bin/OpenFOAM_Discus/show.cgi?tpc=126&post=24573#POST245 73

and use the rest of the install script as before

yongshenglian September 21, 2008 08:58

Jure, I use SUSE10 SP1 an
 
Jure,

I use SUSE10 SP1 and do not have sudo and apitude packages. I guess these two are not for SUSE. Is there another way that I can go around so I can install OpenFOAM on my server?

By the way, it is a Sun server using AMD64 processors.

Thanks,
Yongsheng

alberto September 22, 2008 08:56

Dear Lian, sudo is part of
 
Dear Lian,

sudo is part of all distributions, and SUSE installs it by default. You can check with:

rpm -qa sudo

However it is easier to use "su", so that you have to insert root's password only once.

The command line interface for the package manager o is "rug", and the syntax to install packages is:

rug in <package_name>

You might want to check if you have "zypper", that was introduced in openSUSE 10.2, and probably also in SLE 10 with SP1. The syntax is the same:

zypper in <package_name>

but it does not rely on the ZENWorks daemon, making it more efficient.

I hope this helps,
Alberto

yongshenglian September 22, 2008 16:46

Hi Alberto, Thank you for
 
Hi Alberto,

Thank you for the response

I checked with our system administrator and he knows suse but not others. So follow the instruction in the INSTALL of OPENFOAM-1.5. We almost get there but get error message like

/usr/local/bin/ld: cannot find -lfiniteVolume
collect2: ld returned 1 exit status

It seems that this is a common error. I am not sure whether there is a solution.

I use SUSE10, sp1.
gcc4.3.1
cmake 2.4--patch 6
ld --2.18

I compiled all these over the weekend and the installation still does not work. Maybe should switch to others.
Thanks,
Yongsheng

alberto September 22, 2008 21:13

I don't think the distribution
 
I don't think the distribution is the problem (I have SUSE 10 too), but a library path problem. Is the OF bashrc sourced correctly?

You might want to try the easy way of using the third party tools (compiler, cmake, ...) provided by OpenCFD.

Regards,
Alberto

yongshenglian September 25, 2008 05:48

Alberto, I compile the so
 
Alberto,

I compile the source code using the binary version of the Thirdparty package. When I compile the code, it has the same error.

/usr/bin/ld cannot find lfiniteVolume.


So I installed sudo but cannot install aptitude on my SUSE.

If I do not have apitude, how can I use the script posted here?

Thanks,
Yongsheng

alberto September 25, 2008 10:48

You don't need the script post
 
You don't need the script posted here to install OpenFOAM 1.5 on your system. That script is specific for Ubuntu.

The error you obtain is not related to the fact you don't have aptitude, but to a wrong setting in your paths.

First of all, you need to install QT 4.3.5, and being a SLE 10 user, you're lucky, because you can install the pre-packaged RPM offered on the Novell buildservice, without conflicts with newer versions. Simply add this repository to your installation sources in YaST:

http://download.opensuse.org/reposit...:/Qt43/SLE_10/

and then install libqt4-devel-4.3.5-2.1.i586.rpm and libqt4-4.3.5-2.1.i586.rpm

After that, simply follow the installation instructions provided by OpenCFD in their package, and you will be able to compile OpenFOAM.

- Create a directory called OpenFOAM in your home
- Obtain the source from the git repository, so you have the latest updated version.
- Extract the third party package.
- Run ./Allwmake in the main directory ~/OpenFOAM/OpenFOAM-1.5.x

I hope this helps.

Alberto

alberto September 25, 2008 11:44

Of course, if you work on a 64
 
Of course, if you work on a 64 bit platform, use the 64-bit RPMS for Qt.

A.

hani September 27, 2008 14:40

Hi, I just installed Ubuntu
 
Hi,

I just installed Ubuntu 8.04 LTS Desktop Edition for the first time on my new Dell Latitude D430 Laptop with Intel Core 2 Duo U7700 (64 bit) CPUs.

I used the script provided by Jure (thanks!), but I would like to add a couple of comments that might help others who are trying to do the same.

First of all, in order to be able to use the script in a freshly installed Ubuntu distribution you must first download all the packages (APT). Otherwise the sudo and aptitude will not work. I guess that this is what Jure was trying to tell me, but I'm too fresh with linux installations to understand this completely.

The script by Jure worked nicely until the buildParaView3.3-cvs. Then I had the following error message:
--------------------------------------------
-- Check for working C compiler: /home/hani/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc -- broken
CMake Error: The C compiler "/home/hani/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc" is not able to compile a simple test program.
It fails with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/home/hani/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFiles/ CMakeTmp'
/home/hani/OpenFOAM/ThirdParty/cmake-2.4.6/platforms/linux64/bin/cmake -E cmake_progress_report /home/hani/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFiles/C MakeTmp/CMakeFiles 1
make[1]: /home/hani/OpenFOAM/ThirdParty/cmake-2.4.6/platforms/linux64/bin/cmake: Command not found
make[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.o] Error 127
make[1]: Leaving directory `/home/hani/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFiles/ CMakeTmp'
make: *** [cmTryCompileExec/fast] Error 2


CMake will not be able to correctly generate this project.
--------------------------------------------

This problem was solved by sourcing the OpenFOAM bashrc file in order to use the gcc-2.4.6 distributed with OpenFOAM. However, for some reason it was necessary to comment out the cmake part of the OpenFOAM-1.5/etc/apps/paraview3/bashrc so that the system cmake (version 2.4-patch 7) was used instead of the one distributed with OpenFOAM. Don't ask me why, but perhaps someone else knows why. Then I was able to continue with the rest of the script by Jure successfully.

Good luck with your installations!
Håkan.

yongshenglian September 29, 2008 20:53

Thank both. Here is what I did
 
Thank both. Here is what I did.

1: I reloaded the SUSE10 SP1 on the server. (I am afraid that I messed up some files)

2: install qmake4.3.5

3: install gmp4.2.2 (because when I compiled the OpenFOAM the makefile does not recognize the binary format of some libraries in the ThirdParty)

4: install mprf2.3.2

5: try to configure gcc4.3

However, I always get the waring message saying that Building GCC requires GMP 4.1+ and MPFR 2.3.0+.

6: I use > rpm -q mpfr and find that my mpfr/gmp are a lower version mpfr-2.2.1-6.6


Confused.

Is anyone in US? Someone can send me his contact so I can call for some help? send email to y0lian05@louisville.edu.

Thanks

mavimo January 17, 2009 11:22

I think use apt-get and not ap
 
I think use apt-get and not apitude is best solution.

jlakovic January 18, 2009 18:54

I stand corrected. Apparently
 
I stand corrected. Apparently there is an APT for RPM-based distributions:

http://www.linux-magazine.com/issue/54/apt4rpm.pdf

Jure

mavimo January 25, 2009 06:52

For Ubuntu system this package
 
For Ubuntu system this package are not aviable:

. No candidate version found for firebird2-dev
. No candidate version found for libmpfr1

change to

. firebird2.0-dev

automatically add other dependences, I try to find substitute for libmpfr1

mavimo January 25, 2009 07:00

For Ubuntu system this package
 
For Ubuntu system this package are not aviable:

. No candidate version found for firebird2-dev
. No candidate version found for libmpfr1

change to

. firebird2.0-dev

automatically add other dependences, I try to find substitute for libmpfr1

jlakovic January 25, 2009 14:53

Well, if you look closely, the
 
Well, if you look closely, the script installs both firebird2-dev and firebird2.0-dev as well as libmpfr1 and libmpfr1ldbl, because Ubuntu and Debian name some of their packages differently. So ignore the errors, the appropriate packages still get installed.

amz January 27, 2009 08:18

Hi GUYS I am running the s
 
Hi GUYS

I am running the script for the installation but after downloading and extracting the files, the installation process is halted due to missing libraries. here is on the of the message i received.

Initializing package states... Done
Couldn't find any package whose name or description matched "build-essential"
Couldn't find any package whose name or description matched "cmake"
Couldn't find any package whose name or description matched "firebird2-dev"
Couldn't find any package whose name or description matched "firebird2.0-dev"
No candidate version found for flex

please kindly give me directions

Regards

jlakovic January 27, 2009 08:30

Which Linux distribution are y
 
Which Linux distribution are you running?

amz January 27, 2009 09:18

I am runing Ubuntu 8.10
 
I am runing Ubuntu 8.10

jlakovic January 27, 2009 09:28

Post the output of the command
 
Post the output of the command

cat /etc/apt/sources.list

amz January 27, 2009 09:42

here is the output #deb cdr
 
here is the output

#deb cdrom:[Ubuntu 8.10 _Intrepid Ibex_ - Release i386 (20081029.5)]/ intrepid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://au.archive.ubuntu.com/ubuntu/ intrepid main restricted
deb-src http://au.archive.ubuntu.com/ubuntu/ intrepid main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://au.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted
deb-src http://au.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://au.archive.ubuntu.com/ubuntu/ intrepid universe
deb-src http://au.archive.ubuntu.com/ubuntu/ intrepid universe
deb http://au.archive.ubuntu.com/ubuntu/ intrepid-updates universe
deb-src http://au.archive.ubuntu.com/ubuntu/ intrepid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://au.archive.ubuntu.com/ubuntu/ intrepid multiverse
deb-src http://au.archive.ubuntu.com/ubuntu/ intrepid multiverse
deb http://au.archive.ubuntu.com/ubuntu/ intrepid-updates multiverse
deb-src http://au.archive.ubuntu.com/ubuntu/ intrepid-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://au.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse
# deb-src http://au.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
# deb http://archive.canonical.com/ubuntu intrepid partner
# deb-src http://archive.canonical.com/ubuntu intrepid partner

# Line commented out by installer because it failed to verify:
#deb http://security.ubuntu.com/ubuntu intrepid-security main restricted
# Line commented out by installer because it failed to verify:
#deb-src http://security.ubuntu.com/ubuntu intrepid-security main restricted
# Line commented out by installer because it failed to verify:
#deb http://security.ubuntu.com/ubuntu intrepid-security universe
# Line commented out by installer because it failed to verify:
#deb-src http://security.ubuntu.com/ubuntu intrepid-security universe
# Line commented out by installer because it failed to verify:
#deb http://security.ubuntu.com/ubuntu intrepid-security multiverse
# Line commented out by installer because it failed to verify:
#deb-src http://security.ubuntu.com/ubuntu intrepid-security multiverse

jlakovic January 27, 2009 10:02

Looks to be ok... Before we
 
Looks to be ok...

Before we do anything else, try a simple

sudo apt-get update

and then, for 'cmake', 'firebird', 'build-essential' and 'flex', do

aptitude search NAME_OF_PACKAGE

to check if the missing packages are now available. (If aptitude is not installed, do sudo apt-get install aptitude)

hamcer February 8, 2009 11:20

Good day for all foamers; *
 
Good day for all foamers;

*I used ubuntu 8.10 system in my sony laptop, i done the script installation for OF-1.5 created by Jure (great Thanks), but when the script runs, I shown like these warning:
......
......
qchar.h:59: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:60: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:239: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:240: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:241: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:326: warning: type qualif: In member function 'bool
...
....
QPdfBaseEnginePrivate::openPrintDevice()':
painting/qpdf.cpp:1567: warning: deprecated conversion from string constant to 'char*'
painting/qpdf.cpp:1573: warning: deprecated conversion from string constant to 'char*'
painting/qpdf.cpp:1575: warning: deprecated conversion from string constant to 'char*'
painting/qpdf.cpp:1583: warning: deprecated conversion from string constant
...
....


*2nd thing, I didn't show the Qt icons in the star menu

but when i run qtdemo, it works,
also the tutorials of OF examples worked well and, i can display the paraview to show them

I didn't know if my installation is complete !!

Thanks in advance for your help.

hamcer February 8, 2009 11:35

Good day for all foamers; *
 
Good day for all foamers;

*I used ubuntu 8.10 system in my sony laptop, i done the script installation for OF-1.5 created by Jure (great Thanks), but when the script runs, I shown like these warning:
......
......
qchar.h:59: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:60: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:239: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:240: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:241: warning: type qualifiers ignored on function return type
../../include/QtCore/../../src/corelib/tools/qchar.h:326: warning: type qualif: In member function 'bool
...
....
QPdfBaseEnginePrivate::openPrintDevice()':
painting/qpdf.cpp:1567: warning: deprecated conversion from string constant to 'char*'
painting/qpdf.cpp:1573: warning: deprecated conversion from string constant to 'char*'
painting/qpdf.cpp:1575: warning: deprecated conversion from string constant to 'char*'
painting/qpdf.cpp:1583: warning: deprecated conversion from string constant
...
....


*2nd thing, I didn't show the Qt icons in the star menu

but when i run qtdemo, it works,
also the tutorials of OF examples worked well and, i can display the paraview to show them

I didn't know if my installation is complete !!

Thanks in advance for your help.

jlakovic February 8, 2009 12:11

Your OpenFOAM installation is
 
Your OpenFOAM installation is complete if the command

foamInstallationTest

displays no other errors than a possible conflict in gcc versions and / or failing to detect the availability of a remote shell.

Your ParaView / PV3FoamReader installation is complete if ParaView can properly open any OpenFOAM case (which, judging by your message, it does).

So congratulations on successfully getting it to work!

hamcer February 8, 2009 12:20

hi Jure ! Thanks for your scr
 
hi Jure !
Thanks for your script

but when I run foamInstallationTest , it crashed , I didn't know the Pb.

Thanks again

hamcer February 8, 2009 12:55

hi! Now I know: when i type
 
hi!

Now I know: when i type ". foamInstallationTest "it crashed (with point); without point "foamInstallationTest" it works normaly; but, I have error
FATAL ERROR : No remote shell available,

Can I ignored it?. else what the solution

jlakovic February 8, 2009 13:01

Please read my post again.
 
Please read my post again.

hamcer February 8, 2009 13:20

hi! Jure. Sorry for my quik s
 
hi! Jure.
Sorry for my quik sends.
if I understood, I can ignore this error, since I am the only user.

ThanKs.

jnattia February 18, 2009 08:27

Jure, As a new Ubuntu and L
 
Jure,

As a new Ubuntu and Linux user thanks a lot for this script. it's great. I ran it on ubuntu 8.04 but encountered a few issues and was hoping to get some advice from yourself or any of the other Linux experts here:

1. I ran script #2 and entered answers and passwords as needed by the script but noticed that during running it said "at line 83: home/.../OpenFOAM-1.5/etc/bashrc permission denied". not sure if that's the cause of installation failure. foamInstallationTest tells me FATAL ERROR: environment not configured.

2. the OpenFOAM folder created by the script is protected as a root permission only folder. so i'm unable to even remove things to re-run the script on a clean system.

3. I re-ran script #2 onto the old installation but got the same errors.

4. when i try to access the bashrc file under etc in the OpenFOAM folder i find it completely empty.

5. the baffling issue also, is that when i start a terminal i get this error before even the prompt: "bash: /home/joe/OpenFOAM/OpenFOAM-1.5/etc/bashrc: Permission denied" ????

the rest of the builds seem to have worked fine.

I know all of the above could be very basic issues but i'd appreciate any help.

regards,
Joseph

jlakovic February 18, 2009 08:49

Did you run any of the scripts
 
Did you run any of the scripts as root?

jnattia February 18, 2009 09:10

No. do i need to? my sudo comm
 
No. do i need to? my sudo commands are working.

feymark February 18, 2009 09:17

You should not install OF as r
 
You should not install OF as root. But if you need to add some packages via apt-get these will require root password.

jnattia February 18, 2009 09:29

I provided the root password w
 
I provided the root password when script asked for it.

jlakovic February 18, 2009 09:33

You wrote: --- 2. the Open
 
You wrote:

---
2. the OpenFOAM folder created by the script is protected as a root permission only folder. so i'm unable to even remove things to re-run the script on a clean system.
---

This happens only if the script is run as root...

Anyway, to solve this, try

cd
sudo chown -R joe:joe OpenFOAM

jnattia February 18, 2009 09:48

Jure, this is great. thanks
 
Jure,

this is great. thanks.
Problems 2, 4 and 5 are now gone. but still foamInstallationTest gives me a FATAL ERROR.

thanks
Joe

jnattia February 18, 2009 10:43

should i remove this OpenFOAM
 
should i remove this OpenFOAM dir created by the script and re-run it?

maruthamuthu_venkatraman February 18, 2009 10:53

Hello Joseph,
 
Hello Joseph,
I have some problems while installing OpenFoam Script and have to rerun againdue to improper paraview installation. I deleted both OpenFoam folder and also "src" directory.

After running the Script, then all works fine No worries till now...

May be it answers your Query.

Regards

jnattia February 18, 2009 11:41

Thanks everyone for the help.
 
Thanks everyone for the help.

Works just fine now.

schneemann March 5, 2009 09:28

Hi, I'm an absolute newbi on
 
Hi,
I'm an absolute newbi on linux and i need to install OpenFoam on my computer.
I already have installed Ubuntu 8.10.
But I don't really know how to use the skript above.
Can you tell me how to make it run, please?

Thanks for your help.


All times are GMT -4. The time now is 14:52.