CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Experience in building OpenFOAM on LinuxIA64 (https://www.cfd-online.com/Forums/openfoam-installation/57588-experience-building-openfoam-linuxia64.html)

Nils Smeds (Smeds) January 5, 2005 12:20

I am looking for other sites
 
I am looking for other sites that are also building OpenFOAM on Linux/IA64.

In particular I am interested in setting it up to use Myrinet/GM, Intel compilers and Intel MKL libraries.

/Nils

Nils Smeds (Smeds) January 14, 2005 09:28

I've got complete builds of Op
 
I've got complete builds of OpenFOAM of versions 1.0 and 1.0.2. The important modifications I needed to do were:


Declaration in dynamicMesh:
<PRE>
*** ../REFDIR/OpenFOAM-1.0.2/src/dynamicMesh/slidingInterface/slidingInterface.C Tue Dec 7 15:20:25 2004
--- ./src/dynamicMesh/slidingInterface/slidingInterface.C Thu Jan 13 15:24:56 2005
*************** const char* Foam::NamedEnum
const Foam::NamedEnum
Foam::slidingInterface::typeOfMatchNames_;
-

// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

--- 59,69 ----
"partial"
};

+ /*
template
+ */
const Foam::NamedEnum
Foam::slidingInterface::typeOfMatchNames_;

// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
</PRE>
Compiler rule change
<PRE>
diff -p -r1.1 wmake/rules/linuxIA64I64/c++
*** wmake/rules/linuxIA64I64/c++ 2005/01/12 13:26:35 1.1
--- wmake/rules/linuxIA64I64/c++ 2005/01/12 13:26:56
***************
*** 2,8 ****

c++WARN = -wd654,819,1125,1476,1505,1572

! CC = icpc

include $(RULES)/c++$(WM_COMPILE_OPTION)

--- 2,8 ----

c++WARN = -wd654,819,1125,1476,1505,1572

! CC = icpc -gcc-version=330

include $(RULES)/c++$(WM_COMPILE_OPTION)
</PRE>


The modification to the compile rule is necessary as the Intel compiler otherwise fakes a _GNUC_ setting based on the gcc installed in /usr/bin, which in our case is obsolete and causes OpenFOAM to select code targeted for g++ 2.9 which the Intel compiler barfs at.

Still, when I try to execute the suggested test case I get an error. Anyone that has a suggestion what might be wrong here? (WM_64 is set to yes both at compile time and at run time).

blockMesh . cavity
<PRE>
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : blockMesh . cavity
Date : Jan 14 2005
Time : 15:27:21
Host : h05n21.pdc.kth.se
PID : 15785
Root : /afs/pdc.kth.se/home/s/smeds/OpenFOAM/smeds-1.0/run/tutorials/icoFoam
Case : cavity
Nprocs : 1
Create database


Reading block mesh description dictionary

Creating block mesh

Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

Creating block mesh topology

Default patch type set to empty

Check block mesh topology

Basic statistics
Number of internal faces : 0
Number of boundary faces : 6
Number of defined boundary faces : 6
Number of undefined boundary faces : 0

Checking patch -> block consistency

Creating block offsets

Creating merge list .

Creating points

Creating cells

Creating patches

Creating mesh from block mesh

Default patch type set to empty


--> FOAM FATAL ERROR : face 2 in patch 0 does not have neighbour cell face: 4(110 293 326 91)

Function: polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID)
in file: meshes/polyMesh/polyShapeMeshTools.C at line: 120.

FOAM aborting
</PRE>

Henry Weller (Henry) January 14, 2005 09:40

I have included your two chan
 
I have included your two changes in 1.0.3.

Incidentally I created the linuxIA64I64 rules for an SGI Altix system, is that the platform you are compiling on? I didn't have any problems running the code after the Intel compiler had been upgraded and patched to be the absolute latest. If these problems persist I suggest you compile gcc-3.4.3 and use that instead which also worked fine on the Altix system although there was a modest loss in performance ~10% for some applications.

Nils Smeds (Smeds) January 14, 2005 14:42

No this was not an Altix syste
 
No this was not an Altix system. It is an HP Itanium system running a Debian installation and Myrinet 2000.

Note that the error is independent on what gcc supposedly get installed in OpenFOAM/linuxIA64 as it is the Intel compiler that gets source code it can not compile. The reason once again is that the Intel compiler sets _GNUC_ to be in accordance to the compiler located in /usr/bin.

In order for the Intel compiler to parse all files correctly one must either have

Have a gcc compiler in /usr/bin that is 3.0 or newer
Use the flag -gcc-version=330 (300, 310... 340 will also work)


The reason is that some files that get compiled by the Intel compiler has #ifdefs on the value of __GNUC__.

Nils Smeds (Smeds) January 18, 2005 03:32

Henry Waller wrote: > Incid
 
Henry Waller wrote:

> Incidentally I created the linuxIA64I64 rules for an SGI Altix system, is that the platform you are compiling on? I didn't have any problems running the code after the Intel compiler had been upgraded and patched to be the absolute latest.


A recompile in debug mode did run the test case to completion without any problem. I am now experimenting with different optimization flags to find a functional yet reasonable set of flags. What version of the compiler did you recognize as being the "upgraded and patched to the absolute latest"?

I am using:

h05n21:~/OpenFOAM/OpenFOAM-1.0.2> icpc -V
Intel(R) C++ Itanium(R) Compiler for Itanium(R)-based applications
Version 8.1 Build 20041123 Package ID: l_cc_pc_8.1.026
h05n21:~/OpenFOAM/OpenFOAM-1.0.2> icc -V
Intel(R) C Itanium(R) Compiler for Itanium(R)-based applications
Version 8.1 Build 20041123 Package ID: l_cc_pc_8.1.026

/Nils

Henry Weller (Henry) January 18, 2005 03:48

I did this port for SGI at th
 
I did this port for SGI at their porting centre towards the end of last year. I no longer have access to the machine I was working on so I cannot check the compiler version for you and it may have been upgraded since. What I can say is that I had similar optimisation problems until the compiler was upgraded. If you would like further information about the Intel compiler on the SGI Altix system please contact SGI directly.

Nils Smeds (Smeds) January 18, 2005 17:59

A tentative suggestion for a s
 
A tentative suggestion for a set of compiler options that pass the initial tests on Linux IA64 using the Intel 8.1 Build 20041123 (l_cc_pc_8.1.026) compilers are:

<PRE>
================================================== =================
RCS file: wmake/rules/linuxIA64I64/c++Opt,v
retrieving revision 1.1
diff -p -r1.1 wmake/rules/linuxIA64I64/c++Opt
*** wmake/rules/linuxIA64I64/c++Opt 2005/01/17 21:50:13 1.1
--- wmake/rules/linuxIA64I64/c++Opt 2005/01/17 21:52:44
***************
*** 1,2 ****
c++DBUG =
! c++OPT = -O3 -ftz
--- 1,3 ----
c++DBUG =
! #c++OPT = -O3 -ftz
! c++OPT = -O2 -ftz -IPF_fma -IPF_fltacc -ip
================================================== =================
RCS file: wmake/rules/linuxIA64I64/cOpt,v
retrieving revision 1.1
diff -p -r1.1 wmake/rules/linuxIA64I64/cOpt
*** wmake/rules/linuxIA64I64/cOpt 2005/01/17 21:50:13 1.1
--- wmake/rules/linuxIA64I64/cOpt 2005/01/17 21:53:02
***************
*** 1,2 ****
cDBUG =
! cOPT = -O3
--- 1,3 ----
cDBUG =
! #cOPT = -O3
! cOPT = -O2 -ftz -IPF_fma -IPF_fltacc -ip
</PRE>

I am tempted to add a -g as well to better support debugging of the optimized binary. On most modern compilers debug symbols can be produced with reasonable accuracy even for optimized codes. Anyone who has an opinion on this for this particular platform/compiler combination?

/Nils

Nils Smeds (Smeds) January 20, 2005 06:00

My testing of the parallel imp
 
My testing of the parallel implementation of OpenFOAM using GM/Myrinet on IA64 has led me to test the interFoam tutorial cases. However, I have run into some problems with this case which are probably related my limited experience with the software.

When I run the damBreak and damBreakFine tutorials in interFoam and rasInterFoam. The problem is not related to optimization as it is present in my debug version as well.

I apologize for the size of the post as well as the poor rendering of the log files on the bulltin board web page. Any help on what might be wrong, and/or confirmation that the case works on other platforms is most welcome. All cases and compilations are made with WM_64=yes.

The log file for interFoam reads:

h05n05:~/OpenFOAM/smeds-1.0.2/run/tutorials> cat interFoam/damBreak/log.interFoam
<PRE>
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0.2 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : interFoam . damBreak
Date : Jan 20 2005
Time : 11:42:04
Host : h04n05.pdc.kth.se
PID : 24923
Root : /afs/pdc.kth.se/home/s/smeds/OpenFOAM/smeds-1.0.2/run/tutorials/interFoam
Case : damBreak
Nprocs : 1
Create database

Create mesh

Selecting movingFvMesh staticFvMesh

Reading environmentalProperties
Reading field pd

Reading field gamma

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Calculating field g.h


Max Courant Number = 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0

Starting time loop


Max Courant Number = 0
deltaT = 0.00192308
Time = 0.00192308

Liquid phase volume fraction = 0.119821 Min(gamma) = 0 Max(gamma) = 1
Liquid phase volume fraction = 0.119821 Min(gamma) = 0 Max(gamma) = 1
Liquid phase volume fraction = 0.119821 Min(gamma) = 0 Max(gamma) = 1
Liquid phase volume fraction = 0.119821 Min(gamma) = 0 Max(gamma) = 1
ICCG: Solving for pd, Initial residual = 1, Final residual = 7.90876e-11, No Iterations 83
ICCG: Solving for pd, Initial residual = 2.82359e-05, Final residual = 9.06376e-11, No Iterations 67


--> FOAM FATAL ERROR :
request for surfaceScalarField phi from objectRegistry failed
available objects of type surfaceScalarField are

9
(
interpolate(gh)
muEff
meshPhi_0
UBlendingFactor
interpolate(gamma)
((interpolate(grad(gamma))|(mag(interpolate(grad(g amma)))+deltaN))&S)
((interpolate(gamma)*rho)+((1-interpolate(gamma))*rho))
rho*phi
(rho|A(U))
)


Function: objectRegistry::lookupObject(const word&)
in file: /afs/pdc.kth.se/home/s/smeds/OpenFOAM/OpenFOAM-1.0.2/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line: 166.

FOAM aborting
</PRE>

The log file for rasInterFoam reads:

h04n05:~/OpenFOAM/smeds-1.0.2/run/tutorials> cat rasInterFoam/damBreak/log.rasInterFoam
<PRE>
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.0.2 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : rasInterFoam . damBreak
Date : Jan 20 2005
Time : 11:34:27
Host : h04n05.pdc.kth.se
PID : 24488
Root : /afs/pdc.kth.se/home/s/smeds/OpenFOAM/smeds-1.0.2/run/tutorials/rasInterFoam
Case : damBreak
Nprocs : 1
Create database

Create mesh, no clear-out for time = 0


Reading environmentalProperties
Reading field pd

Reading field gamma

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model twoPhase
Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Calculating field g.h

Selecting turbulence model kEpsilon

Max Courant Number = 0


--> FOAM FATAL IO ERROR : keyword div((nuEff*grad(U).T())) is undefined in dictionary "/afs/pdc.kth.se/home/s/smeds/OpenFOAM/smeds-1.0.2/run/tutorials/rasInterFoam/damBreak/system/fvSchemes::divSchemes"

file: /afs/pdc.kth.se/home/s/smeds/OpenFOAM/smeds-1.0.2/run/tutorials/rasInterFoam/damBreak/system/fvSchemes::divSchemes from line 37 to line 45.

Function: dictionary::lookupEntry(const word& keyword) const
in file: db/dictionary/dictionary.C at line: 144.

FOAM exiting
</PRE>

Henry Weller (Henry) January 20, 2005 06:53

I have just tested the damBre
 
I have just tested the damBreak tutorial case with interFoam and it runs fine on both Linux on a P4 and Linux on an AMD64. I am not sure why you are experiencing difficulty although I have seen something similar a long time ago when I ported to a DEC Tru64/OSF1 machine. On that occasion the problem did relate to bugs in the compiler which were fixed eventually. I also ran the full set of tutorials on the SGI Altix system last year without difficulty. It might be a good idea to try compiling with gcc-3.4.3.

However, there are indeed a couple of errors in the rasInterFoam damBreak tutorial. Firstly you will need to add

div((nuEff*grad(U).T())) Gauss linear;

to the divSchemes list in fvSchemes

and set the initial value for the atmosphere BC for k and epsilon to 0.1 rather than 0.

After these two changes the case runs fine on the two Linux platforms.

Nils Smeds (Smeds) January 20, 2005 10:53

Thanks Henry, By modifying
 
Thanks Henry,

By modifying the input deck for the rasInterFoam damBreak tutorial it now fails the same way as the InterFoam tutorial.

I am making a bug-report to Intel on this, but as I have very little substance to provide I am not expecting too much. Hopefully the problem that appears to have been introduced in the recent compiler gets caught and removed in a later release.

/Nils

Henry Weller (Henry) January 20, 2005 12:00

I can't be sure that the prob
 
I can't be sure that the problem is not in FOAM but I think it unlikely given that we don't see it on any other platform. But even if it is in FOAM I am not sure how I would go about finding it without access to a machine that show it. Let me know what happens with newer versions of the Intel compiler and if gcc shows the same problem.

Nils Smeds (Smeds) January 21, 2005 05:53

Building OpenFOAM using GCC-3
 
Building OpenFOAM using GCC-3.4.3 allowed me to run the interFoam damBreak case without problems.

I'll try to wade through previous installations of the Intel compilers to find if I can locate a version that builds a working interFoam/damBreak.

/Nils

Ali (Ali) January 21, 2005 14:57

This may seem to be stupid, b
 
This may seem to be stupid, but I don't know how to build gcc-3.4.3 from source on SGI IRIX6.5. I've downloaded the gcc-3.4.3 source from gcc.gnu.org. Is it supposed to work on all platforms. Is there anyone who can help me how to build gcc or even better if anyone has built OpenFOAM for IRIX, that'd be great.

seang January 21, 2005 15:07

Authentication Error

Y

 
<H3>Authentication Error</H3>Your username/password combination was invalid, or you do not have permission to post to this topic. You may revise your username and password using the form at the bottom of this page.

Kuan Tek Seang (Seang) January 21, 2005 15:07

usually, doing ./configure --p
 
usually, doing ./configure --prefix= should set things up pretty nicely ... then make -> make install should fix up your gcc ... yup, gcc is supposed to work on most platforms ...

Tek Seang

Ali (Ali) January 21, 2005 15:18

First, I did > ./configure
 
First, I did

> ./configure --prefix=

then I used

> make

But i got this error (I'll show only the latest part):

----------------------------------
creating config.h
config.h is unchanged
echo timestamp > cstamp-h
Unmatched closing curly braces or parenthesis in line containing:
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(DEFS-$@) $(INCLUDES).
*** Error code 1 (bu21)
-----------------------------------------------

I couldn't find 'config.h' and don't know what to do now.

Thanks.

Kuan Tek Seang (Seang) January 21, 2005 15:26

sounds like a nasty problem th
 
sounds like a nasty problem there Ali ... hmm i didn't try compiling 3.4.3 before ... just a suggestion ... maybe you can try installing the pre-compiled version from http://freeware.sgi.com ... only problem is the latest version they have there is 3.3

Tek Seang

Ali (Ali) January 21, 2005 16:06

Tek Seang, Thanks. I have g
 
Tek Seang,

Thanks. I have gcc-3.3.1 installed on my machine. But I still can't build OpenFOAM. As Henry and others suggest, lots of problems occur if one doesn't use the latest gcc version. I don't really know if this is also the case forthis problem. I've shown the latest part of what machine gives me when I try to build OpenFOAM using 'Allwmake'.

ali@ns> which gcc
/home/ali/OpenFOAM/sgi64/gcc-3.3.1/bin/gcc
ali@ns>cd /home/ali/OpenFOAM/OpenFOAM-1.0
ali@ns>Allwmake

...... I've removed most of this part.........


/home/ali/OpenFOAM/OpenFOAM-1.0/wmake/bashScripts/mkObjectDir /home/ali/OpenFOAM/OpenFOAM-1.0/applications/bin/sgi64GccOpt/foamInfoExec
g++ -mabi=64 -mips4 -Dsgi64 -Dsgi64GccOpt -DscalarMachine -DoptSolvers -Wall -W -Wno-unused-parameter -O3 -ffast-math -fno-schedule-insns -DNoRepository -ftemplate-depth-30 -I/home/ali/OpenFOAM/OpenFOAM-1.0/src/OpenFOAM/lnInclude -IlnInclude -I. -DWM_PROJECT_VERSION='"'1.0'"' -fPIC -Wl,-LD_LAYOUT:lgot_buffer=100 Make/sgi64GccOpt/foamInfoExec.o -L/home/ali/OpenFOAM/OpenFOAM-1.0/lib/sgi64GccOpt \
-lOpenFOAM -lfpe -lm -o /home/ali/OpenFOAM/OpenFOAM-1.0/applications/bin/sgi64GccOpt/foamInfoExec
ld64: FATAL 9 : I/O error (-lOpenFOAM): No such file or directory
collect2: ld returned 32 exit status
*** Error code 1 (bu21)

Kuan Tek Seang (Seang) January 21, 2005 21:51

heya Ali, I encountered th
 
heya Ali,

I encountered the same problem ... try version 1.0.2 ... The problem is there was a problem in compiling libOpenFOAM.so ...

My problem was by default, my shell doesn't look for the executable in the current directory ... I corrected some bits but not all of them, and one of the problems was with the one that builds libOpenFoam.so ... I noticed that in 1.0.2, the Allwmake scripts has "./" added to the front of it ...

its much easier locating the problem if you break up Allwmake and do the instructions in there individually ... ie copy the individual segments in Allwmake to a certain file and executing that instead. That way, its easier to locate which portion of Allwmake did not compile properly ...

Tek Seang

Manuel Garcia (Garcia) January 21, 2005 23:50

I recently compiled the gcc 3.
 
I recently compiled the gcc 3.4.3 with no problem in an IRIS 6.5 :

./configure --prefix=$HOME/OpenFOAM/$WM_ARCH/gcc-3.4.3

make

make install

So far it compiled OpenFOAM ok. I haven't test it because the machine is in maintenance at the moment. I also tried the binary gcc 3.3 version from http://freeware.sgi.com but the compiler actually died compiling Openfoam.


All times are GMT -4. The time now is 10:17.