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 1.5 installation on OpenSUSE 11.0 (https://www.cfd-online.com/Forums/openfoam-installation/64037-openfoam-1-5-installation-opensuse-11-0-a.html)

bigphil April 27, 2009 13:56

OpenFOAM 1.5 installation on OpenSUSE 11.0
 
Hi,

I am trying to install to install OF 1.5 (as downloaded from the OF website) on my OpenSUSE 11.0. My OpenSUSE 11.0 is a virtual machine but that shouldn't make any difference.

So far I have:

Downloaded the files from the OF website.

Unpacked them in OpenFOAM directory.

Added '. HOME/OpenFOAM/OpenFOAM-1.5.x/etc/bashrc' to my .bashrc, and sourced it.


Then I am a bit confused, should the foam installation be set-up now or must I also compile it?

At this stage I tried to run one of the tutorial cases (icoFoam) but blockMesh and icoFoam and any other program I ran got an error saying it was missing some library file.


So then I tried to compile OF.
I moved to the 'OpenFOAM-1.5' directory and executed './Allwmake'
But this got quite a few errors.
I resourced the bashrc and tried again but it still gets errors.
The first error is:
SOURCE=OPwrite.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/philipc/OpenFOAM/ThirdParty/lam-7.1.4/platforms/linuxGccDPOpt/include -IlnInclude -I. -I/home/philipc/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/philipc/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOptLAM/OPwrite.o
SOURCE=IPread.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/philipc/OpenFOAM/ThirdParty/lam-7.1.4/platforms/linuxGccDPOpt/include -IlnInclude -I. -I/home/philipc/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/philipc/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOptLAM/IPread.o
OPwrite.C:30:17: error: mpi.h: No such file or directory
IPread.C:30:17: error: mpi.h: No such file or directory
IPread.C:40: error: ‘MPI_Request’ was not declared in this scope
IPread.C:40: error: template argument 1 is invalid
IPread.C:40: error: invalid type in declaration before ‘;’ token
IPread.C: In constructor ‘Foam::IPstream::IPstream(Foam::Pstream::commsType s, int, Foam::label, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber)’:
IPread.C:62: error: ‘MPI_Status’ was not declared in this scope

etc.


My foamInstallationTest is:
Checking basic setup...
-------------------------------------------------------------------------------
Shell: bash
Host: linux-qqry
OS: Linux version 2.6.25.18-0.2-pae
-------------------------------------------------------------------------------


Checking main OpenFOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR /home/philipc/OpenFOAM yes yes
$WM_PROJECT_USER_DIR /home/philipc/OpenFOAM/philipc-1.5 yes no
$WM_THIRD_PARTY_DIR /home/philipc/OpenFOAM/ThirdParty 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/philipc/OpenFOAM/OpenFOAM-1.5 yes yes yes

$FOAM_APPBIN ...M-1.5/applications/bin/linuxGccDPOpt yes yes yes
$FOAM_USER_APPBIN ...c-1.5/applications/bin/linuxGccDPOpt yes yes no
$WM_DIR .../philipc/OpenFOAM/OpenFOAM-1.5/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 ...nFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt yes yes yes
$FOAM_USER_LIBBIN ...enFOAM/philipc-1.5/lib/linuxGccDPOpt yes yes no
$MPI_ARCH_PATH ...ty/lam-7.1.4/platforms/linuxGccDPOpt no yes
-------------------------------------------------------------------------------


Third party software
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
gcc 4.3.1 .../OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/bin/gcc
gzip 1.3.12 /usr/bin/gzip
tar 1.19 /bin/tar
icoFoam
WARNING: Conflicting installations:
OpenFOAM settings : /home/philipc/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoFoam
current path :
CRITICAL ERROR

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


Checking networking...
-------------------------------------------------------------------------------
Action Result Crit
-------------------------------------------------------------------------------
Pinging_linux-qqry Successful yes
Pinging_localHost Successful yes
Test_rsh: Unsuccessful_connection_refused* yes
Test_ssh: Successful yes
(*) Only one of rsh or ssh is required by the OpenFOAM enviroment.

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

Base configuration ok.

The foam installation contains 1 critical error(s).

Review the output for warning messages and consult
the installation guide for trouble shooting.

done.





Any help or guidance would be much appreciated,

Philip

ttdtud April 27, 2009 14:42

Hi Philip,
I think that you need only to install OF. If you download the files from OpenFOAM website and unpack them correctly. The last thing you need to check and do is:
add the following line in your "~/.bashrc"
" . $Home/OpenFOAM/OpenFOAM-1.5/etc/bashrc"
then source the edited .bashrc.
Everything should be OK.

I am not sure which version of OF you have downloaded. If you download OF-1.5, it is easy to install. If it is OF-1.5.x, it should be compiled.

Hongyi

StructureITA April 28, 2009 04:23

You are getting the same errors I was used to. Did you download and unpack the "Binary pack, double precision" in the OpenFOAM directory?
Remember that after the set-up of the files, you have to compile ParaView first and OpenFOAM later, as indicated in the READ ME file. Otherwise the program won't work.

bigphil April 28, 2009 04:42

Hi Hongyi and StructureITA,

Thanks for the help.

I downloaded OF 1.5 (not OF 1.5.x) from the OF website.

After I unpacked the for files (including the binary pack, double precision), and after I added the line into my '.bashrc' and sourced it, I was still getting an error when I tried to run anything such as blockMesh or icoFoam.
I got an error saying error while loading shared library 'libPstream.so'.

I found 'libPstream.so' in 'OpenFOAM-1.5/lib/linuxGccDPOpt/dummy/' directory, and when I copied it into the 'OpenFOAM-1.5/lib/linuxGccDPOpt/' directory, then blockMesh and icoFoam and the other solvers seemed to work fine. Why is this?


Now paraFoam is the next step, it gets an error saying error while loading shared library lipmpi.so.0.
According to the website, I must recompile it with the correct version of Qt. My version of OpenSUSE has 4.4 installed.
I can't figure out how to download and install Qt4.3 from the link on the site:
http://download.opensuse.org/repositories/KDE:/Qt43
I am quite new to linux, and I can't figure out which file I am meant to download and what do I do with it? Any help is really appreciated.

One last thing, when I recompile paraView, must I also then recompile OF?

Thanks,
Philip

StructureITA April 28, 2009 04:58

Quote:

Originally Posted by bigphil (Post 214448)
Now paraFoam is the next step, it gets an error saying error while loading shared library lipmpi.so.0.
According to the website, I must recompile it with the correct version of Qt. My version of OpenSUSE has 4.4 installed.
I can't figure out how to download and install Qt4.3 from the link on the site:
http://download.opensuse.org/repositories/KDE:/Qt43
I am quite new to linux, and I can't figure out which file I am meant to download and what do I do with it? Any help is really appreciated.

You don't have to do any new installation. As Alberto Passalacqua told me you have just to do this:
  • Open the file ~/OpenFOAM/ThirdParty/ParaView3.3-cvs/CMakeLists.txt and comment the lines:
MESSAGE(SEND_ERROR “Qt ${QTVERSION} not supported. Please use Qt 4.3 (you may need to clean your dirtied cache).”)
Quote:

Originally Posted by bigphil (Post 214448)
One last thing, when I recompile paraView, must I also then recompile OF?
Philip

Yes. :)

bigphil April 28, 2009 05:23

StructureITA,

Thanks for the help. I did as you said and I am recompiling paraView now.

I'll then try recompiling OF and let you know how I get on.

Thanks again.
Philip
:)

bigphil April 28, 2009 13:40

I was able to compile paraFoam but I get errors when I try compile OF:

The first error seems to be:
+ cd /home/philipc/OpenFOAM/ThirdParty/lam-7.1.4
+ make distclean
make: *** No rule to make target `distclean'. Stop.
+ rm -rf /home/philipc/OpenFOAM/ThirdParty/lam-7.1.4/platforms/linuxGccDPOpt
+ ./configure --prefix=/home/philipc/OpenFOAM/ThirdParty/lam-7.1.4/platforms/linuxGccDPOpt --enable-shared --disable-static --without-romio --without-mpi2cpp --without-profiling --without-fc
./Allwmake: line 66: ./configure: No such file or directory
+ make
make: *** No targets specified and no makefile found. Stop.
+ make install
make: *** No rule to make target `install'. Stop.
+ make distclean
make: *** No rule to make target `distclean'. Stop.

And then shortly after that I get IPread and OPwrite errors:
OPwrite.C:30:17:IPread.C:30:17: error: mpi.h: No such file or directory
error: mpi.h: No such file or directory
IPread.C:40: error: ‘MPI_Request’ was not declared in this scope
IPread.C:40: error: template argument 1 is invalid
IPread.C:40: error: invalid type in declaration before ‘;’ token
OPwrite.C:38: error: ‘MPI_Request’ was not declared in this scope
OPwrite.C:38: error: template argument 1 is invalid

I am not sure what's going wrong.

Any ideas would be really helpful.

bigphil April 28, 2009 14:02

I am not sure if the first error matters, but the second error seems to be happening when './Allwmake' is being executed in the 'OpenFOAM-1.5/src/Pstream' directory, where:
OPwrite.C:30:17: error: mpi.h: No such file or directory
is the first problem.

olesen April 29, 2009 03:15

Quote:

Originally Posted by bigphil (Post 214516)
the second error seems to be happening when './Allwmake' is being executed in the 'OpenFOAM-1.5/src/Pstream' directory, where:
OPwrite.C:30:17: error: mpi.h: No such file or directory
is the first problem.

Check that your selected mpi library has actually been compiled properly in the ../ThirdParty directory.
The directory pointed to by $MPI_ARCH_PATH should contain the usual bin/, include/, lib/ ... subdirectories. Check these for the "mpi.h" file.

bigphil April 29, 2009 04:46

Hi,
Thanks for your help.

Quote:

Originally Posted by olesen (Post 214569)
Check that your selected mpi library has actually been compiled properly in the ../ThirdParty directory.
The directory pointed to by $MPI_ARCH_PATH should contain the usual bin/, include/, lib/ ... subdirectories. Check these for the "mpi.h" file.

The mpi library doesn't seem to be compiled.
In $MPI_ARCH_PATH, there is an empty 'bin/' directory and an empty 'lib/' directory and also no 'include/' directory.


When I run './Allwmake' in the 'OpenFOAM/ThirdParty' directory, the first error seems to be:

+ cd /home/philipc/OpenFOAM/ThirdParty/lam-7.1.4
+ make distclean
make: *** No rule to make target `distclean'. Stop.
+ rm -rf /home/philipc/OpenFOAM/ThirdParty/lam-7.1.4/platforms/linuxGccDPOpt
+ ./configure --prefix=/home/philipc/OpenFOAM/ThirdParty/lam-7.1.4/platforms/linuxGccDPOpt --enable-shared --disable-static --without-romio --without-mpi2cpp --without-profiling --without-fc
./Allwmake: line 66: ./configure: No such file or directory
+ make


where it can't seem to find './configure'.

why can't it find this file, I tried extracting the two ThirdParty archives again and recompiling but I get the same error.

Thanks again for your help,
Philip.

olesen April 29, 2009 04:58

Quote:

Originally Posted by bigphil (Post 214583)

+ cd /home/philipc/OpenFOAM/ThirdParty/lam-7.1.4
...
+ ./configure --prefix=/home/philipc/OpenFOAM/ThirdParty/lam-7.1.4/platforms/linuxGccDPOpt --enable-shared --disable-static --without-romio --without-mpi2cpp --without-profiling --without-fc
./Allwmake: line 66: ./configure: No such file or directory

I can't help you much there since I use openmpi (not only is LAM really annoying with a queuing system, it is no longer being actively developed), but it looks like the LAM source code isn't installed.

bigphil April 29, 2009 05:06

I checked the 'ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt' directory, and all the files seem to be there - 'bin/','include/' and 'lib/' directories.

How do I change it so as to try use 'openmpi' instead of 'lam'?


Thanks very much for your help
:)

olesen April 29, 2009 05:16

Quote:

Originally Posted by bigphil (Post 214591)
How do I change it so as to try use 'openmpi' instead of 'lam'?

The setting WM_MPLIB (set in the etc/{bashrc,cshrc}) controls which mpi library you'll be using. The version information is in the etc/settings.{sh,csh}. In my version, the WM_MPLIB is set to OPENMPI by default, so I don't know why your installation ended up with LAM.

good luck.
/mark

bigphil April 29, 2009 05:50

Quote:

Originally Posted by olesen (Post 214595)
The setting WM_MPLIB (set in the etc/{bashrc,cshrc}) controls which mpi library you'll be using. The version information is in the etc/settings.{sh,csh}. In my version, the WM_MPLIB is set to OPENMPI by default, so I don't know why your installation ended up with LAM.

In my 'etc/bashrc', WM_MPLIB is set to OPENMPI.
It's a bit strange, I am not sure why it's changing to lam.

I tried copying the contents of 'ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt' to 'ThirdParty/lam-7.1.4/platforms/linuxGccDPOpt', and then I tried 'Allwmake' in the 'ThirdParty' directory, and it seemed to get past the error but then got another error straight after:

+ cd ParMetis-3.1
+ wmake libso METISLib
/usr/bin/ld: cannot find -llam
collect2: ld returned 1 exit status
make: *** [/home/philipc/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/lam-7.1.4/libmetis-parmetis.so] Error 1


Why is it using LAM when it's set to OPENMPI.

:confused:

olesen April 29, 2009 06:02

Quote:

Originally Posted by bigphil (Post 214600)
In my 'etc/bashrc', WM_MPLIB is set to OPENMPI.
It's a bit strange, I am not sure why it's changing to lam.

Are you really certain that it really is set to OPENMPI? Either you have changed the etc/bashrc script, or you've simply misread it. The normal version only sets WM_MPLIB conditionally (ie, if it isn't already set before sourcing the file). Either try from a fresh shell, or simply unset WM_MPLIB before sourcing the etc/bashrc.

Pehaps the bash guide might be of some help:
http://www.tldp.org/LDP/abs/html/index.html


Quote:

I tried copying the contents of 'ThirdParty/openmpi-1.2.6/platforms/linuxGccDPOpt' to 'ThirdParty/lam-7.1.4/platforms/linuxGccDPOpt'
Butchering the installation like this is really wrong - you shouldn't be surprised that it generates errors.

bigphil April 29, 2009 06:14

SUCCESS!

The bashrc was set to OPENMPI but I didn't know that WM_MPLIB is only conditionally set so I executed:
unset WM_MPLIB
then I sourced the bashrc,
I then ran './Allwmake' in the 'ThirdParty' directory and it finished with no errors.

It had a few warnings but I think they are OK.

Now on to compile the rest of OF.

Thanks for your patience and help. :)

bigphil April 29, 2009 06:28

OpenFOAM compiled
 
OpenFOAM compiled fine and the first tutorial case seems to be grand! :)

Thanks very much for your help,
It is really appreciated!

ParaFoam is kinda working but not quite right but I'll try compile again, and hopefully sort it out.


Thanks for your help,
Philip C.


All times are GMT -4. The time now is 20:24.