CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Installing OpenFOAM 1.7.0 on openSUSE and CentOS 5.5 (http://www.cfd-online.com/Forums/openfoam-installation/111295-installing-openfoam-1-7-0-opensuse-centos-5-5-a.html)

hz283 January 1, 2013 22:03

Installing OpenFOAM 1.7.0 on openSUSE and CentOS 5.5
 
Quote:

Originally Posted by freemankofi (Post 309783)
Bruno,
Q1: I am using Source Pack Installation for OF version 1.7.1 (http://www.openfoam.com/download/source.php). Please note that, I am using "sudo apt-get ...) because my experience with it is that it doesn't allow me to build my own solver since during compilation it tries to access /opt/... which required root user or some admin permission.

But the source pack can be installed in one's local directory and therefore would be easier for creating my own solver. As I indicated in my first posting this very version has been successfully installed on a linux cluster. I am trying to install on a new Workstation which is running on Ubuntu 11.04.


Q2 & 3, Please see below:
========================================
Start ThirdParty Allwmake
========================================

========================================
Compile specific mpi libraries

have OPENMPI shared library
========================================
Build Scotch decomposition library

+ cd scotch_5.1/src
+ mkdir -p /home/adane/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt
+ make scotch
(cd libscotch ; make VERSION=\"5.1\" scotch && make install)
make[1]: Entering directory `/home/adane/OpenFOAM/ThirdParty-1.7.1/scotch_5.1/src/libscotch'
rm -f *~ *.o lib*.so common2* parser_yy.c parser_ly.h parser_ll.c *scotch.h *scotchf.h y.output dummysizes
make CC="gcc" CCD="gcc" SCOTCHLIB=scotch \
scotch.h \
scotchf.h \
libscotch.so \
libscotcherr.so \
libscotcherrexit.so
make[2]: Entering directory `/home/adane/OpenFOAM/ThirdParty-1.7.1/scotch_5.1/src/libscotch'
gcc -O3 -fPIC -DCOMMON_TIMING_OLD -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME -DSCOTCH_VERSION=\""5.1"\" dummysizes.c -o dummysizes -lz -lm -lrt
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[2]: *** [dummysizes] Error 1
make[2]: Leaving directory `/home/adane/OpenFOAM/ThirdParty-1.7.1/scotch_5.1/src/libscotch'
make[1]: *** [scotch] Error 2
make[1]: Leaving directory `/home/adane/OpenFOAM/ThirdParty-1.7.1/scotch_5.1/src/libscotch'
make: *** [scotch] Error 2
========================================
Build PTScotch decomposition library (requires MPI)

+ cd scotch_5.1/src
+ mkdir -p /home/adane/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-1.4.1
+ make ptscotch
(cd libscotch ; make VERSION=\"5.1\" ptscotch && make ptinstall)
make[1]: Entering directory `/home/adane/OpenFOAM/ThirdParty-1.7.1/scotch_5.1/src/libscotch'
rm -f *~ *.o lib*.so common2* parser_yy.c parser_ly.h parser_ll.c *scotch.h *scotchf.h y.output dummysizes
make CFLAGS="-O3 -fPIC -DCOMMON_TIMING_OLD -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME -DSCOTCH_PTSCOTCH" CC="mpicc" SCOTCHLIB=ptscotch \
scotch.h \
scotchf.h \
libptscotch.so \
libptscotcherr.so \
libptscotcherrexit.so
make[2]: Entering directory `/home/adane/OpenFOAM/ThirdParty-1.7.1/scotch_5.1/src/libscotch'
mpicc -O3 -fPIC -DCOMMON_TIMING_OLD -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME -DSCOTCH_PTSCOTCH -DSCOTCH_VERSION=\""5.1"\" dummysizes.c -o dummysizes -lz -lm -lrt
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[2]: *** [dummysizes] Error 1
make[2]: Leaving directory `/home/adane/OpenFOAM/ThirdParty-1.7.1/scotch_5.1/src/libscotch'
make[1]: *** [ptscotch] Error 2
make[1]: Leaving directory `/home/adane/OpenFOAM/ThirdParty-1.7.1/scotch_5.1/src/libscotch'
make: *** [ptscotch] Error 2

Hi All,

I also had the similar problem as follows:

lnInclude/Switch.H:140: note: candidates are: Foam::Switch::Switch(int)
lnInclude/Switch.H:134: note: Foam::Switch::Switch(bool)
lnInclude/Switch.H:62: note: Foam::Switch::Switch(const Foam::Switch&)
make: *** [Make/linux64GccDPOpt/argList.o] Error 1
+ wmake libso lagrangian/basic
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file passiveParticle/passiveParticleCloud.C
Making dependency list for source file indexedParticle/indexedParticleCloud.C

I am installing OF 1.7.0 in OpenSuse. I used the same source package to install it on my PC and that is successful. But when I did it on another machine, the error appears, and lots of the following appears:

/usr/bin/ld: cannot find -lfiniteVolume

Does anybody know how to solve it?

best regards,
H

hz283 January 2, 2013 17:37

Hi Bruno,

When I compiled OF170, the following errors appear, and they are as follows(This is the first error in the compilation process):

.......
+ WM_OPTIONS=linux64GccDPOptOPENMPI
+ wmake libso mpi
'/users/hz283/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/openmpi-1.4.1/libPstream.so' is up to date.
+ wmake libo OSspecific/POSIX
'/users/hz283/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOSspecific.o' is up to date.
+ wmake libso OpenFOAM
SOURCE=global/global.Cver ; sed -e 's/VERSION_STRING/1.7.0/' -e 's/BUILD_STRING/1.7.0-21131bcbd876/' $SOURCE > Make/linux64GccDPOpt/global.C; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/users/hz283/OpenFOAM/ThirdParty-1.7.0/zlib-1.2.3 -IlnInclude -I. -I/users/hz283/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/users/hz283/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude -fPIC -c Make/linux64GccDPOpt/global.C -o Make/linux64GccDPOpt/global.o
SOURCE=global/argList/argList.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/users/hz283/OpenFOAM/ThirdParty-1.7.0/zlib-1.2.3 -IlnInclude -I. -I/users/hz283/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/users/hz283/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/argList.o
lnInclude/dictionaryTemplates.C: In member function €˜T Foam::dictionary::lookupOrDefault(const Foam::word&, const T&, bool, bool) const [with T = Foam::Switch]€™:
global/argList/argList.C:396: instantiated from here
lnInclude/dictionaryTemplates.C:44: error: call of overloaded €˜Switch(Foam::pTraits<Foam::Switch>)€™ is ambiguous
lnInclude/Switch.H:140: note: candidates are: Foam::Switch::Switch(int)
lnInclude/Switch.H:134: note: Foam::Switch::Switch(bool)
lnInclude/Switch.H:62: note: Foam::Switch::Switch(const Foam::Switch&)
make: *** [Make/linux64GccDPOpt/argList.o] Error 1
+ wmake libso lagrangian/basic
'/users/hz283/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/liblagrangian.so' is up to date.
+ wmake libso triSurface
'/users/hz283/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libtriSurface.so' is up to date.
+ wmake libso edgeMesh
'/users/hz283/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libedgeMesh.so' is up to date.
+ wmake libso surfMesh
'/users/hz283/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libsurfMesh.so' is up to date.
+ decompositionMethods/AllwmakeLnInclude
+ wmakeLnInclude decompositionMethods
+ wmakeLnInclude metisDecomp
+ wmakeLnInclude parMetisDecomp
+ wmakeLnInclude scotchDecomp
+ dummyThirdParty/Allwmake
+ wmake libso scotchDecomp
.......

The linux kernal version is 2.6.18-194.17.1.el5.

Thank you very much for your help.

best ,
H

wyldckat January 2, 2013 18:27

Hi H,

Quote:

Originally Posted by hz283 (Post 399827)
The linux kernal version is 2.6.18-194.17.1.el5.

OK, I did some searching and it looks like in this case you've got either RHEL, or SL or CentOS 5.5 installed. For either one of those 3 and OpenFOAM 1.7.1, you've got these instructions: http://consultancy.edvoncken.net/index.php/OpenFOAM

In the same machine where I had tested fireFoam 1.6-1.0 and OpenFOAM 1.7.0, I've also tested with success with OpenFOAM 1.7.1. Therefore, I think it's safe for you to install OpenFOAM 1.7.1, but 1.7.0 should also work with the instructions from the link above.


As for openSUSE, which version do you have installed? 12.2, 12.1, 11.4, or older!? Run this command to know which version you've got:
Code:

cat /etc/SuSE-release
Best regards,
Bruno

PS: I've moved your questions to a new thread.


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