CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   gcc (OpenFOAM 2.1.0 on CentOS 5) (http://www.cfd-online.com/Forums/openfoam-installation/101308-gcc-openfoam-2-1-0-centos-5-a.html)

sukye April 30, 2012 16:13

gcc (OpenFOAM 2.1.0 on CentOS 5)
 
Question:
Where to find rpm file of gcc4.3 or 4.4?

I am installing 2.1.0 on CentOS 5 with yum-updated gcc 4.1.2.

The error messages include
Code:

mpi.h: No such file or directory
It's mentioned in
http://www.openfoam.org/download/git.php
that gcc-4.4.? is recommended but gcc-4.3.? is sufficient.

sukye April 30, 2012 16:55

and how to set the environment?
Code:

export WM_COMPILER=/usr/bin/gcc44
is it all?

wyldckat April 30, 2012 17:39

Greetings sukye and welcome to the forum!

Since you have CentOS, then it's best/easier for you to use CentFOAM: http://sourceforge.net/apps/mediawik...itle=Main_Page

Best regards,
Bruno

sukye April 30, 2012 18:20

Thank you Bruno. You are always so helpful.

When I run python centFOAM.py --netgen, here is the error
Code:

adding netgen-4.9.14-svn to .bashrc file for user running the script
Traceback (most recent call last):
  File "centFOAM.py", line 338, in ?
    main()
  File "centFOAM.py", line 312, in main
    installNetgen(options.path, "4.9.14-svn",rel)
  File "centFOAM.py", line 135, in installNetgen
    writeStartNetgen(path, package, "netgen")
  File "centFOAM.py", line 39, in writeStartNetgen
    fileHandle = open ( fileName , 'w' )
IOError: [Errno 2] No such file or directory: '/home/sukye/centFOAM//netgen-4.9.14-svn/bin/start_netgen'

Should I run --yum first, then --paraview etc. one by one?


Quote:

Originally Posted by wyldckat (Post 358534)
Greetings sukye and welcome to the forum!

Since you have CentOS, then it's best/easier for you to use CentFOAM: http://sourceforge.net/apps/mediawik...itle=Main_Page

Best regards,
Bruno


wyldckat May 1, 2012 05:56

Hi sukye,

Unfortunately I don't know the answer, but Linnemann should know the answer, since he's the one who has developed CentFOAM. In the mean time, you can read the following threads and perhaps ask again in the second one:
Best regards,
Bruno

sukye May 1, 2012 16:17

Thank you Bruno,

Here are steps I have made:
1. sudo python centFOAM.py --yum
(yum only install 4.1.2 instead of 4.3 required by OF)
2. python centFOAM.py --nonOF
3. python centFOAM.py --OF21
(double slashes (incorrectly?):
installing OpenFOAM-2.1.0 to /home/sujian/centFOAM//OpenFOAM/OpenFOAM-2.1.0
Folder does not exist, now creating if possible)
Any further steps to complete the compilation?

When
~/centFOAM/OpenFOAM/OpenFOAM-2.1.0>./Allwmake
It says:
./Allwmake: line 4: wmakeCheckPwd: command not found
Error: Current directory is not $WM_PROJECT_DIR
but actually:
>echo $WM_PROJECT_DIR ~/centFOAM/OpenFOAM/OpenFOAM-2.1.0


Thanks.

linnemann May 1, 2012 20:27

No need to compile when using CentFOAM it is already compiled for you.

sukye May 2, 2012 00:37

Thank you Linnemann.

But blockMesh and other functions do not work.


Quote:

Originally Posted by linnemann (Post 358723)
No need to compile when using CentFOAM it is already compiled for you.


linnemann May 2, 2012 00:47

you have to source the OF environment.

So open a new terminal as the user who installed OF and type OF21

that will source the OF environment using an alias to the OpenFOAM bashrc file.

you can see the alias in your $HOME/.bashrc file of the user who installed using the centFOAM script.

sukye May 2, 2012 01:06

I followed your instruction and it works! Thank you Linnemann!

wyldckat May 5, 2012 10:35

Greetings to all!

@Linnemann: sukye had problems using paraFoam - which you do indeed describe about on the wiki:
Quote:

Originally Posted by sourceforge.net/apps/mediawiki/centfoam/index.php?title=Main_Page
To use Paraview with the new reader just create an empty file in your case folder "touch casename.foam" and open this file using Paraview.

Anyway, here is another hack for using paraFoam: http://www.cfd-online.com/Forums/ope...tml#post359479 post #21

Best regards,
Bruno


All times are GMT -4. The time now is 04:53.