CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

OpenFoam 1.7.0 on RHEL 4.6

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 27, 2010, 06:11
Default OpenFoam 1.7.0 on RHEL 4.6
  #1
New Member
 
Pankaj Singh
Join Date: Jun 2010
Posts: 10
Rep Power: 15
Pankaj Singh is on a distinguished road
Hi All,

I need to install OF 1.7.0 (or higher) on a cluster with following specs:

OS: Red Hat Enterprise Linux ES release 4 (Nahant Update 6)
gcc: 3.4.6
cmake: command not found (cmake --version command output)
flex: 2.5.4
bison: 1.875c
qmake: 1.07a using Qt 3.3.3

I know OF1.7.0 needs higher version of gcc. Is it possible to use ThirdParty's gcc version? I guess gcc version in ThirdParty will need some libraries which are outdated in RHEL4.x and it might be tough to use gcc of ThirdParty.

Has anyone installed OF1.7.0 on RHEL4.x?

I can try somethings on my own but as the cluster is being used by many other users so i want to skip experimenting.

Regards
Pankaj
Pankaj Singh is offline   Reply With Quote

Old   September 27, 2010, 07:58
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Pankaj,

I have no experience with RHEL myself, but as of yesterday, I've made available two build scripts for gcc 4.4.x and 4.5.x customized to work with OpenFOAM: Automated scripts for building gcc 4.4.x and 4.5.x for using with OpenFOAM 1.7 series
On that blog post you should find some additional information on what extra stuff is needed.

As for some more details about RHEL + OpenFOAM, you can also look in this thread: http://www.cfd-online.com/Forums/ope...linux-5-a.html

You might also want to look at the CentFOAM project page (http://www.cfd-online.com/Forums/ope...-released.html) for some more tips on how to build in RHEL.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 28, 2010, 06:46
Default
  #3
New Member
 
Pankaj Singh
Join Date: Jun 2010
Posts: 10
Rep Power: 15
Pankaj Singh is on a distinguished road
Hi Bruno,

Thanks a lot for your suggestions.

I was able to use your script gccbuild-4.5.0 and installed gcc-4.5.0 successfully.

which gcc gives:

/home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64/gcc-4.5.0/bin/gcc

gcc--version gives

gcc (OpenFOAM) 4.5.0

So, am sure gcc4.5.0 was successfully installed.

I was buliding OF-1.7.0 on OpenSuse 11.1. Later when compiling OF-1.7.0 i got following errors:

First error occurence text is:

Code:
make[1]: Entering directory `/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/applications/solvers/basic'
make[2]: Entering directory `/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/applications/solvers/basic/laplacianFoam'
Making dependency list for source file laplacianFoam.C
make[2]: Leaving directory `/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/applications/solvers/basic/laplacianFoam'
make[2]: Entering directory `/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/applications/solvers/basic/laplacianFoam'
SOURCE=laplacianFoam.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/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/laplacianFoam.o
/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude/readSIMPLEControls.H: In function ‘int main(int, char**)’:
/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude/readSIMPLEControls.H:6:10: warning: unused variable ‘momentumPredictor’
/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude/readSIMPLEControls.H:9:10: warning: unused variable ‘transonic’
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/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/POSIX/lnInclude   -fPIC Make/linux64GccDPOpt/laplacianFoam.o -L/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt \
             -lfiniteVolume -lOpenFOAM -liberty -ldl   -lm -o /home/pankaj/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linux64GccDPOpt/laplacianFoam
/home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64/gcc-4.5.0/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libz.so.1, needed by /home/pankaj/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so, not found (try using -rpath or -rpath-link)
/home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64/gcc-4.5.0/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libnsl.so.1, needed by /home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64Gcc/openmpi-1.4.1/lib/libmpi.so.0, not found (try using -rpath or -rpath-link)
/home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64/gcc-4.5.0/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libutil.so.1, needed by /home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64Gcc/openmpi-1.4.1/lib/libmpi.so.0, not found (try using -rpath or -rpath-link)
/home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64/gcc-4.5.0/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libpthread.so.0, needed by /home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64Gcc/openmpi-1.4.1/lib/libmpi.so.0, not found (try using -rpath or -rpath-link)
/home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-rte.so.0: undefined reference to `pthread_setspecific@GLIBC_2.2.5'
/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so: undefined reference to `gzopen'
/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so: undefined reference to `gzread'
/home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-pal.so.0: undefined reference to `pthread_create@GLIBC_2.2.5'
/home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-rte.so.0: undefined reference to `pthread_key_create@GLIBC_2.2.5'
/home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-pal.so.0: undefined reference to `openpty@GLIBC_2.2.5'
/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so: undefined reference to `gzclose'
/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so: undefined reference to `gzwrite'
/home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-pal.so.0: undefined reference to `pthread_join@GLIBC_2.2.5'
/home/pankaj/OpenFOAM/ThirdParty-1.7.0/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-rte.so.0: undefined reference to `pthread_getspecific@GLIBC_2.2.5'
collect2: ld returned 1 exit status
make[2]: *** [/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linux64GccDPOpt/laplacianFoam] Error 1
make[2]: Leaving directory `/home/pankaj/OpenFOAM/OpenFOAM-1.7.0/applications/solvers/basic/laplacianFoam'
make[1]: *** [laplacianFoam] Error 2
Later all errors where of same type. First they give warning about [libz.so.1, libnsl.so.1, libutil.so.1, libpthread.so.0] not found and then about undefined reference to [pthread_create@GLIBC_2.2.5, pthread_key_create@GLIBC_2.2.5, openpty@GLIBC_2.2.5, pthread_join@GLIBC_2.2.5, pthread_getspecific@GLIBC_2.2.5]and finally Error.

I terminated the compilation in between when saw many of such errors.

I should mention that i was able to successfully build OF1.7.0 with system version of gcc (4.3.2)

Thanks again for your time.

Regards
Pankaj

Last edited by Pankaj Singh; September 28, 2010 at 07:07.
Pankaj Singh is offline   Reply With Quote

Old   September 28, 2010, 08:25
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Pankaj,

Hold it! Lets go in steps:
  • For building in OpenSUSE 11.1, you should follow this tutorial: http://albertopassalacqua.com/?p=653
    It's for OpenSUSE 11.3, but it should work for 11.1 as well.
  • For building with gcc 4.5.0, you have to use at least OpenFOAM 1.7.1!! The 1.7.0 will build but some solvers and utilities will not work as intended!!!
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 29, 2010, 04:02
Default
  #5
New Member
 
Pankaj Singh
Join Date: Jun 2010
Posts: 10
Rep Power: 15
Pankaj Singh is on a distinguished road
Hi Bruno,

I downloaded OF1.7.1 and used your buildgcc-4.5.0 script for using gcc4.5.0

But i got same error as mentioned in my last post. That error happens with almost all of the solvers.

I then tried using OpenFOAM's gcc4.4.4 (installed from your script) on OF1.7.1. But got same error.

Both times, gcc4.5.0 and gcc4.4.4 got installed properly. I saw log files generated by your script and there wasnt any error. Also the commands "which gcc" and "gcc --version" point to gcc installed in ThirdParty Folder.

I have noticed that if i use "system" gcc compiler, with OpenSuse 11.1, things work fine. But if i want to use OpenFOAM gcc compiler (4.5.0 or 4.4.4) i get errors.

Additionally, libz.so.1, libnsl.so.1, libutil.so.1, libpthread.so.0 not found are existing in my root /lib and /lib64. So seems this installation of gcc4.5.0 and 4.4.4 in ThirdParty ddin't install these missing libraries properly in ThirdParty/platforms/gcc....

Any clues Bruno?

Regards
Pankaj

Last edited by Pankaj Singh; September 29, 2010 at 05:02.
Pankaj Singh is offline   Reply With Quote

Old   September 29, 2010, 13:31
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Pankaj,

OK, now I've read the output properly. The problem you are having is related to a simple issue: you didn't clean up the builds you have from building with OpenSUSE's gcc 4.3.2. The system's gcc 4.3.2 made OpenMPI be dependent of old system libraries that are no longer compatible with gcc 4.4.4 and 4.5.0.

You will have to at least remove the build OpenMPI:
Code:
rm -rf $WM_THIRD_PARTY_DIR/platforms/linux64Gcc/openmpi-1.4.1
But you should also run:
Code:
cd $WM_THIRD_PARTY_DIR
wclean all
rm -rf scotch_5.1/lib/*
cd $WM_PROJECT_DIR
wclean all
This is to make sure the clean up is made properly. Then you can run again Allwmake.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 1, 2010, 06:28
Default
  #7
New Member
 
Pankaj Singh
Join Date: Jun 2010
Posts: 10
Rep Power: 15
Pankaj Singh is on a distinguished road
Hi Bruno,

Thanks again for responding.

I did that "wclean all" and "rm -rf" stuff but i still get same errors.

Earlier I missed the first instance of error which happened during building of Scotch decomposition library. Error is as follows:

Code:
========================================
Build Scotch decomposition library

+ cd scotch_5.1/src
+ mkdir -p /home/pankaj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt
+ make scotch
mkdir ../lib
(cd libscotch ;      make VERSION=\"5.1\" scotch && make install)
make[1]: Entering directory `/home/pankaj/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/pankaj/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
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libpthread.so.0, needed by /usr/lib/../lib64/librt.so, not found (try using -rpath or -rpath-link)
/usr/lib/../lib64/librt.so: undefined reference to `pthread_barrier_wait@GLIBC_2.2.5'
/usr/lib/../lib64/librt.so: undefined reference to `__pthread_unwind@GLIBC_PRIVATE'
/usr/lib/../lib64/librt.so: undefined reference to `pthread_sigmask@GLIBC_2.2.5'
/usr/lib/../lib64/librt.so: undefined reference to `pthread_attr_setstacksize@GLIBC_2.2.5'
/usr/lib/../lib64/librt.so: undefined reference to `pthread_once@GLIBC_2.2.5'
/usr/lib/../lib64/librt.so: undefined reference to `pthread_detach@GLIBC_2.2.5'
/usr/lib/../lib64/librt.so: undefined reference to `pthread_create@GLIBC_2.2.5'
/usr/lib/../lib64/librt.so: undefined reference to `pthread_cancel@GLIBC_2.2.5'
/usr/lib/../lib64/librt.so: undefined reference to `pthread_barrier_init@GLIBC_2.2.5'
collect2: ld returned 1 exit status
make[2]: *** [dummysizes] Error 1
make[1]: *** [scotch] Error 2
make[2]: Leaving directory `/home/pankaj/OpenFOAM/ThirdParty-1.7.1/scotch_5.1/src/libscotch'
make[1]: Leaving directory `/home/pankaj/OpenFOAM/ThirdParty-1.7.1/scotch_5.1/src/libscotch'
make: *** [scotch] Error 2
========================================
So, basically above error occurred because of libpthread.so.0 was not found.

Later i get many errors (all while building various solvers like icoFoam, laplacianFoam etc) which basically complain about libz.so.1, libnsl.so.1, libutil.so.1, libpthread.so.0 not found. Error log for such errors is as under:


Code:
make[2]: Entering directory `/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/combustion/dieselFoam'
Making dependency list for source file dieselFoam.C
make[2]: Leaving directory `/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/combustion/dieselFoam'
make[2]: Entering directory `/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/combustion/dieselFoam'
SOURCE=dieselFoam.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I../dieselEngineFoam     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels/compressible/turbulenceModel     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/lagrangian/basic/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/lagrangian/dieselSpray/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/liquids/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/liquidMixture/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/specie/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/thermophysicalFunctions/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/reactionThermo/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/basic/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/laminarFlameSpeed/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/../applications/solvers/reactionThermo/XiFoam     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/chemistryModel/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/ODE/lnInclude -IlnInclude -I. -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/dieselFoam.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I../dieselEngineFoam     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels/compressible/turbulenceModel     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/lagrangian/basic/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/lagrangian/dieselSpray/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/liquids/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/liquidMixture/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/specie/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/thermophysicalFunctions/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/reactionThermo/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/basic/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/laminarFlameSpeed/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/../applications/solvers/reactionThermo/XiFoam     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/chemistryModel/lnInclude     -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/ODE/lnInclude -IlnInclude -I. -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude   -fPIC Make/linux64GccDPOpt/dieselFoam.o -L/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt \
             -lcompressibleTurbulenceModel     -lcompressibleRASModels     -lcompressibleLESModels     -lreactionThermophysicalModels     -llagrangian     -ldieselSpray     -lliquids     -lliquidMixture     -lthermophysicalFunctions     -lspecie     -lbasicThermophysicalModels     -llaminarFlameSpeedModels     -lchemistryModel     -lODE     -lpdf     -lfiniteVolume -lOpenFOAM -liberty -ldl   -lm -o /home/pankaj/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/dieselFoam
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libz.so.1, needed by /home/pankaj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so, not found (try using -rpath or -rpath-link)
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libnsl.so.1, needed by /home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64Gcc/openmpi-1.4.1/lib/libmpi.so.0, not found (try using -rpath or -rpath-link)
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libutil.so.1, needed by /home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64Gcc/openmpi-1.4.1/lib/libmpi.so.0, not found (try using -rpath or -rpath-link)
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/lib/gcc/x86_64-unknown-linux-gnu/4.4.4/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libpthread.so.0, needed by /home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64Gcc/openmpi-1.4.1/lib/libmpi.so.0, not found (try using -rpath or -rpath-link)
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-rte.so.0: undefined reference to `pthread_setspecific@GLIBC_2.2.5'
/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so: undefined reference to `gzopen'
/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so: undefined reference to `gzread'
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-pal.so.0: undefined reference to `pthread_create@GLIBC_2.2.5'
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-rte.so.0: undefined reference to `pthread_key_create@GLIBC_2.2.5'
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-pal.so.0: undefined reference to `openpty@GLIBC_2.2.5'
/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so: undefined reference to `gzclose'
/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so: undefined reference to `gzwrite'
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-pal.so.0: undefined reference to `pthread_join@GLIBC_2.2.5'
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64Gcc/openmpi-1.4.1/lib/libopen-rte.so.0: undefined reference to `pthread_getspecific@GLIBC_2.2.5'
collect2: ld returned 1 exit status
make[2]: *** [/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/dieselFoam] Error 1
make[2]: Leaving directory `/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/applications/solvers/combustion/dieselFoam'
make[1]: *** [dieselFoam] Error 2
To summarize again:
OS: OpenSuse 11.1
gcc: 4.4.4 (Using your script files)
cmake: 2.8.2
qmake: 2.01a Using Qt 4.6.2
flex: 2.5.35
bison: 2.3

Just to make sure that when i am not using OpenFOAM's gcc compiler (4.4.4) i tried using "System" compiler (gcc 4.3.2) and everything works fine.

So i think our forcing OpenFOAM to use new gcc compiler 4.4.4 foced these errors and while building ti wasnt able to found above said libraries in ThirdParty installation of gcc 4.4.4 (while when using System compiler, these libraries are found and no error is reported).

Bruno, did you test your gcc-build-scripts with OpenSuse 11.1.

Do we have to use LD_LIBRARY_PATH for those libraries? But i read somehwere using "LD" is not a good thing and instead some runtime path for these libraries should be given. How do we do that?

Waiting for your reply Bruno :-)

Thanks a lot and Regards
Pankaj
Pankaj Singh is offline   Reply With Quote

Old   October 1, 2010, 09:59
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Pankaj,

No, I haven't had the time to test the build-gcc scripts in older systems But I'll have a go at it this weekend with OpenSUSE 11.1

In the mean time, when your environment is setup to work with gcc 4.4.4, what does your LD_LIBRARY_PATH look like?
Code:
echo $LD_LIBRARY_PATH
It's very possible that the OpenFOAM related libraries aren't being defined before the system libraries.

Additionally, the errors seem to me, by what I've read from your outputs, to be more related to the applications/libraries built with make instead of wmake (wmake is only for OpenFOAM libraries and applications). But like I said, I'll have a go at it with OpenSUSE 11.1 and try to figure out what is going wrong.

And yes, LD_LIBRARY_PATH can be considered a security risk in itself, but it's usually the quickest way to tell programs where the libraries they need are.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 3, 2010, 22:03
Default
  #9
New Member
 
Pankaj Singh
Join Date: Jun 2010
Posts: 10
Rep Power: 15
Pankaj Singh is on a distinguished road
Hi Bruno,

After gcc is being set up, my LD_LIBRARY_PATH is:

Code:
/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-1.4.1
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64Gcc/openmpi-1.4.1/lib
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/mpfr-2.4.2/lib
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gmp-5.0.1/lib
/home/pankaj/OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.4/lib64
/home/pankaj/OpenFOAM/pankaj-1.7.1/lib/linux64GccDPOpt
/home/pankaj/OpenFOAM/site/1.7.1/lib/linux64GccDPOpt
/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt
/home/pankaj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/dummy
/usr/local/Trolltech/Qt-4.6.2/lib
So, you see OpenFOAM libraries are defined before system libraries.

I think i should give a try to append system library path (/lib64) of libz.so.1, libnsl.so.1, libutil.so.1, libpthread.so.0 to current LD_LIBRARY_PATH.

Thanks again Bruno :-)

Regards
Pankaj
Pankaj Singh is offline   Reply With Quote

Old   October 4, 2010, 01:29
Default
  #10
New Member
 
Pankaj Singh
Join Date: Jun 2010
Posts: 10
Rep Power: 15
Pankaj Singh is on a distinguished road
Hi Bruno,

After adding

Quote:
setenv LD_LIBRARY_PATH /lib64:$LD_LIBRARY_PATH
The above errors regarding search of libz.so.1, libnsl.so.1, libutil.so.1, libpthread.so.0 went off but there were lot of warning messages which i think need proper attention.

Warning messages are regarding "Unused Variable" for following parameters:

transonic, nOuterCorr, nCorr, nNonOrthCorr, momentumPredictor etc...

I saw a fix at http://www.openfoam.com/mantisbt/pri....php?bug_id=15 but wanted to confirm if i should do same??

Please have a look Bruno.

Another thing i wanted to ask is regarding parallel installation.

I am using tcsh, and as described in OF's site i did following for parallel installation:

setenv WM_SCHEDULER wmakeScheduler
setenv WM_HOSTS "IP_ADDRESS:10"
setenv WM_NCOMPPROCS 10
setenv WM_COLOURS "black blue green cyan red magenta yellow"


I have manually entered value of WM_NCOMPPROCS to 10. Because if i do

setenv WM_NCOMPPROCS=$($WM_SCHEDULER -count)

i get error: "Illegal Variable name"

I just wanted to ask, if what am doing is correct? (I tried running and it felt like installation is pretty fast :-) )

Thanks and Regards
Pankaj
Pankaj Singh is offline   Reply With Quote

Old   October 4, 2010, 09:27
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Pankaj,

I'm glad the lib issues are fixed. I've taken a few shots at OpenSUSE 11.1 in a virtual machine and never got past getting gcc to be built successfully. OpenSUSE 11.1 seems to contradict my notions of reality LD_LIBRARY_PATH had no effect in gcc building, always resulting in not finding libc.so. Anyway, I've already got a battle plan drawn for upgrading my build-gcc44/5 scripts and include libc in the building process. This hopefully will help in situations were the OS is far too old for gcc 4.4.x or 4.5.x.

Quote:
Originally Posted by Pankaj Singh View Post
Warning messages are regarding "Unused Variable" for following parameters:

transonic, nOuterCorr, nCorr, nNonOrthCorr, momentumPredictor etc...

I saw a fix at http://www.openfoam.com/mantisbt/pri....php?bug_id=15 but wanted to confirm if i should do same??
Those warnings are actually normal. AFAIK, those solvers use header files that are common to various solvers and not all solvers use those variables, therefore it triggers warning messages on those that don't use them.
As for that bug report, it's not related to that; it's related to an issue where Fedora 13 demands that link libraries are explicitly defined.

Quote:
Originally Posted by Pankaj Singh View Post
Another thing i wanted to ask is regarding parallel installation.

I am using tcsh, and as described in OF's site i did following for parallel installation:

setenv WM_SCHEDULER wmakeScheduler
setenv WM_HOSTS "IP_ADDRESS:10"
setenv WM_NCOMPPROCS 10
setenv WM_COLOURS "black blue green cyan red magenta yellow"


I have manually entered value of WM_NCOMPPROCS to 10. Because if i do

setenv WM_NCOMPPROCS=$($WM_SCHEDULER -count)

i get error: "Illegal Variable name"
By what you've posted, the last setenv command should be:
Code:
setenv WM_NCOMPPROCS $($WM_SCHEDULER -count)
You could also try:
Code:
setenv WM_NCOMPPROCS `($WM_SCHEDULER -count)`
If you are running in a single machine, setting WM_NCOMPPROCS should be enough; the other variables are for multiple machines. If you are using multiple machines, you can set WM_NCOMPPROCS by hand with no problems, as long as it's the correct number

Quote:
Originally Posted by Pankaj Singh View Post
(I tried running and it felt like installation is pretty fast :-) )
Yes, it pays off using as many cores as available Personally I've had problems using multiple machines, but the fix for me was to do the building process in two passes: first pass with multiple machines, where all libraries are built and some of the applications are built; second pass with a single machine, where the applications left to build are done.

Like I've said before, I've already got plans for upgrading the build scripts. If for some reason things later on don't go well with RHEL, hopefully I'll have the updated build scripts up and running by the end of today or tomorrow.

Good luck! Best regards,
Bruno
__________________

Last edited by wyldckat; October 5, 2010 at 10:36. Reason: Had a missing ")" after "-count"
wyldckat is offline   Reply With Quote

Old   October 5, 2010, 00:12
Default
  #12
New Member
 
Pankaj Singh
Join Date: Jun 2010
Posts: 10
Rep Power: 15
Pankaj Singh is on a distinguished road
Thanks a lot Bruno for all your help and patient replies :-)

Quote:
LD_LIBRARY_PATH had no effect in gcc building, always resulting in not finding libc.so


libc.so
exists in my /usr/lib64, so i would add:
Code:
setenv LD_LIBRARY_PATH /usr/lib64:$LD_LIBRARY_PATH
to my ~/.cshrc file.

I had same problems with libz.so.1, libnsl.so.1, libutil.so.1, libpthread.so.0 libraries not being found while OF buliding. After adding them to LD_LIBRARY_PATH, things worked fine for me. May be you too can try same :-)

And ofcourse a new gcc-build script that by default installs libc.so etc into ThirdParty will be great. Am looking forward for your new script :-)

Quote:
Those warnings are actually normal. AFAIK, those solvers use header files that are common to various solvers and not all solvers use those variables, therefore it triggers warning messages on those that don't use them.
Thanks for above explanation Bruno. I should have thought so or should have peeped into that solver.

About parallel installation i did this but it gives same error of Illegal Variable name.

Code:
setenv WM_NCOMPPROCS $($WM_SCHEDULER -count)
And yes this works fine. Thanks :-)

Code:
setenv WM_NCOMPPROCS `($WM_SCHEDULER -count)`
Actually i started this thread with title "OpenFoam 1.7.0 pn RHEL 4.6" and later drifted to installation on OpenSuse 11.1 with non-system compiler. I have a cluster machine with RHEL 4.6 while my local machine has OpenSuse 11.1 (NFS mounted on RHEL 4.6). OpenFoam (installed to use system compiler) was working fine on my local machine but when i tried a parallel run to use cluster, it gave errors. I learnt that my cluster RHEL 4.6 had pretty old gcc compiler and might be the cause for the error. So i went ahead to use non-system compiler (your script helped me a lot here) for OF installation on OpenSuse 11.1 and now am able to use my cluster machine with RHEL 4.6 for parallel runs successfully :-)

Thanks again Bruno :-)

Regards
Pankaj
Pankaj Singh is offline   Reply With Quote

Old   October 24, 2010, 21:04
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Pankaj,
Quote:
Originally Posted by Pankaj Singh View Post
And ofcourse a new gcc-build script that by default installs libc.so etc into ThirdParty will be great. Am looking forward for your new script :-)
I'm posting just to let you know about my endeavour towards libc: Trying to include glibc in my build-gcc scripts...
Spolier alert: I didn't manage to get it working Which may look bad, but probably it's for the best...

Nonetheless, a version 2 of the scripts has been released in the same page as before, with some more improvements. The old version was left there, just in case the new version has more bugs then the previous version

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
openfoam 1.7.x, rhel 4.x

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM 1.7.0 Released opencfd OpenFOAM Announcements from ESI-OpenCFD 1 May 26, 2011 04:09
OpenFOAM 1.6.x, 1.7.0 and 1.7.x are not fully prepared to work with gcc-4.5.x wyldckat OpenFOAM Bugs 18 October 21, 2010 06:51
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 07:25
OpenFOAM 1.7.0 on OpenSUSE 11.1 Bufacchi OpenFOAM Installation 8 August 6, 2010 10:57
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 05:48


All times are GMT -4. The time now is 23:02.