CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Installation problem in Redhat using gcc 4.1.2 (https://www.cfd-online.com/Forums/openfoam-installation/79596-installation-problem-redhat-using-gcc-4-1-2-a.html)

Tarak August 27, 2010 17:35

Installation problem in Redhat using gcc 4.1.2
 
Hii,

While installing openFOAM 1.6 in Redhat, 1st I've tried to do the 3rd party installation. But, I encountered the following error:
wmake error: file 'Make/linux64gccDPOpt/objectFiles' could not be created

Can you pls help me in finding a solution?

Also is it better to build both Openfoam and 3rd party at one go, or first do the 3rd party and later the other one?

wyldckat August 27, 2010 17:55

Greetings Tarak and welcome to the forum!

Unfortunately, gcc 4.1.2 can't be used to build OpenFOAM 1.6. You should use the gcc 4.3.3 version that comes in the ThirdParty. In the link in my signature you can find links to threads that explain how to build gcc and paraview for OpenFOAM 1.6/1.6.x:
Once gcc 4.3.3 (and ParaView) are built, then go to the OpenFOAM-1.6 folder and run with:
Code:

./Allwmake > make.log 2>&1
This way you'll get the whole thing built in one go, including the libraries that OpenFOAM needs from the ThirdParty folder and keep a full log (the file make.log) of the build process, in case something goes sour :D

Best regards,
Bruno

dhoom August 31, 2010 06:32

Bruno,

I am not able to find a GCC compiler in the Thirdparty-1.7.1 package, my centos 5.4 x64 system has 4.1.2 compilers? how do i go about installing OF1.7.1

I am getting the following message
"
Warning in /OpenFOAM/OpenFOAM-1.7.1/etc/settings.sh:
Cannot find /OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.4.3 installation.
Please install this compiler version or if you wish to use the system compiler,
change the 'compilerInstall' setting to 'system' in this file
"

Many thanks.

wyldckat August 31, 2010 07:43

Greetings dhoom,

CentFoam doesn't cover that issue?

Anyway, you can always get the one from 1.6 ;) It's still available online: http://www.openfoam.com/archive/1.6/...ad/linux64.php

Get the ThirdParty-1.6.linux64Gcc.gtgz package, unpack it and move (or copy) it something like this:
Code:

mv /OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64 /OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.3.3
Notice that the 1.6 version has a different folder structure from 1.7! Also keep in mind I'm using the folder structure from your post! Because usually the base folder for OpenFOAM is "$HOME/OpenFOAM".

Moving on - then edit "/OpenFOAM/OpenFOAM-1.7.1/etc/bashrc", find the line that says:
Code:

: ${WM_COMPILER:=Gcc}; export WM_COMPILER
And change it to:
Code:

: ${WM_COMPILER:=Gcc43}; export WM_COMPILER
Save the file, start a new terminal/console, and voilá, you've got gcc 4.3.3 ready to go :)

Well... you should be ready to go. By my experience, when the system's gcc is older than 4.3.3, then it should work as intended. If it doesn't work, you might need to recompile gcc. In the link in my signature, you'll find instructions on how to build gcc 4.3.3.

As for building any other gcc version to be used with OpenFOAM, I've been working on it, but it isn't ready to be released yet :( As soon as it is ready, I hope I don't forget to post a memo here :)

Best regards,
Bruno

dhoom August 31, 2010 08:52

Thanks Bruno,

I will do as you mentioned and get back to you.

Can you please confirm if there is a platform folder when uncompressing the Thirdparty-1.7.1 package from OpenFoam website, I could not find one.

D

wyldckat August 31, 2010 09:48

Hi dhoom,

Nope, there isn't any platforms folder as soon as you unpack the ThirdParty package, because as of 1.7.0, pre-built binary files are only available for Ubuntu. That folder usually only appears after building ParaView.
And I also know that in the settings.sh script it has references for building gcc+mpfr+gmp (+mpc for gcc 4.5.0) in the same fashion as it is for ParaView. That is why I told you to move gcc 4.3.3 into that particular folder :cool:

In theory, the only disadvantage of using gcc 4.3.3 is that the resulting OpenFOAM build might not be as fast as if it were built with 4.4.x or 4.5.x, but I think results may vary depending on the Linux distribution, kernel, and so on. So, the only way (I can think of) to be sure of this would be to run some benchmarks with each build.

Best regards,
Bruno

dhoom August 31, 2010 14:30

Thanks Bruno.

dhoom September 1, 2010 09:16

1 Attachment(s)
Hi Bruno,

I moved the Gcc folder and I am getting the following error while opening a terminal window

"
Warning in /OpenFOAM/OpenFOAM-1.7.1/etc/settings.sh:
Cannot find /OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.3.3 installation.
Please install this compiler version or if you wish to use the system compiler,
change the 'compilerInstall' setting to 'system' in this file

"

I also tried compiling and have attached the log file, please let me know how do I proceed further.

Thanks again,

wyldckat September 1, 2010 09:52

Hi dhoom,

Quote:

Originally Posted by dhoom (Post 273609)
I moved the Gcc folder and I am getting the following error while opening a terminal window

"
Warning in /OpenFOAM/OpenFOAM-1.7.1/etc/settings.sh:
Cannot find /OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.3.3 installation.
Please install this compiler version or if you wish to use the system compiler,
change the 'compilerInstall' setting to 'system' in this file

"

Apparently you didn't move the correct folder :(. What folder (full path please) did you move and to where?
EDIT: I think I know what the problem is - run this:
Code:

cd /OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.3.3
mv linux64/* .
rmdir linux64

I keep forgetting that the cp command is a bit tricky when copying folders :(

Quote:

Originally Posted by dhoom (Post 273609)
I also tried compiling and have attached the log file, please let me know how do I proceed further.

Ah, you're missing the development files of binutils. I'm not familiar with CentOS, so I don't know if it even has binutils-dev in it (it's the name of the package in Ubuntu). Additionally, you would need libiberty installed as well as it's the development package. While you are at it, what version of OpenMPI does CentOS have? You might be able to save some time building OpenMPI if you resort to using the system's version.

NOTE: development files/package are usually only the necessary files for linking to a library, namely header files and ".a"/".la" (library interface) files.


There is something I'm finding odd in all of this: doesn't CentFoam work for you?

Best regards,
Bruno

dhoom September 1, 2010 10:44

Quote:

Originally Posted by wyldckat (Post 273613)
Hi dhoom,

Apparently you didn't move the correct folder :(. What folder (full path please) did you move and to where?
EDIT: I think I know what the problem is - run this:
Code:

cd /OpenFOAM/ThirdParty-1.7.1/platforms/linux64/gcc-4.3.3
mv linux64/* .
rmdir linux64

I keep forgetting that the cp command is a bit tricky when copying folders :(


Ah, you're missing the development files of binutils. I'm not familiar with CentOS, so I don't know if it even has binutils-dev in it (it's the name of the package in Ubuntu). Additionally, you would need libiberty installed as well as it's the development package. While you are at it, what version of OpenMPI does CentOS have? You might be able to save some time building OpenMPI if you resort to using the system's version.

NOTE: development files/package are usually only the necessary files for linking to a library, namely header files and ".a"/".la" (library interface) files.


There is something I'm finding odd in all of this: doesn't CentFoam work for you?

Best regards,
Bruno

Greetings Bruno,

I copied the Gcc-4.3.3 directory from under the OF1.6 Thirdparty installation done using CentFOAM sometime back.

I have managed to setup a small cluster with Centos x64 so do not want to mess around with the centos setup or the system compilers, as you can see I am not an expert and still learning. I used the OpenMPI that comes in the thirdparty package, in the system I have mpich2.

I will try CentFOAM and see how it goes.

Thanks,

D

linnemann September 1, 2010 15:44

Hi

I do not understand why you would go through all this when I have already done it for you.

See here

Also it has been updated to 1.7.1 if you want to compile it yourself you need to change the bashrc and settings.sh file to suit Gcc-4.4.4, mpfr and gmp as per here

Otherwise just use the install script and you will be flying in no time.

dhoom September 3, 2010 00:59

Quote:

Originally Posted by linnemann (Post 273643)
Hi

I do not understand why you would go through all this when I have already done it for you.

See here

Also it has been updated to 1.7.1 if you want to compile it yourself you need to change the bashrc and settings.sh file to suit Gcc-4.4.4, mpfr and gmp as per here

Otherwise just use the install script and you will be flying in no time.

Thanks Linneman,

I will try Centfoam. Appreciate your effort very much.

Regards,

D

vitvit October 9, 2010 06:52

using CentFOAM without internet connection
 
Hello,
I'm trying to install OF 1.7.1 on RHEL 5.4, and I want to use CentFOAM script, but I do not have Internet connection at my linux platform.
how can I use this script ?
Even if I'll use the manual instalation where do I get these packeges?:


"yum install gcc gcc-c++ bison ncurses-devel tix.x86_64 glibc-devel flex flex-devel zlib-devel libXt-devel"

thanks

wyldckat October 9, 2010 11:36

Greetings Vitaly and welcome to the forum!

I've never worked with RHEL 5.4, so I can only assume that since you have it, you (or your system's administrator) should also have either a DVD or an account at Red Hat Network. Also, I can only assume they have an online page at the account for searching for packages and downloading them.

Best regards and good luck!
Bruno


All times are GMT -4. The time now is 07:03.