CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Compiling with Intel icc (https://www.cfd-online.com/Forums/openfoam-installation/57591-compiling-intel-icc.html)

gellert March 8, 2005 08:47

Hi all, has already someone
 
Hi all,

has already someone tried to compile OpenFoam with Intels C++ compiler?
If yes, are there known problems? What do I need to change/adapt?

-marcus

henry March 8, 2005 10:22

Yes the Intel C++ compiler is
 
Yes the Intel C++ compiler is supported and OpenFOAM should compile with it. However we did not get much if any speed improvement even for the Itanium 2 chip and so encourage people to use the latest gcc compiler instead.

rolando November 28, 2006 12:31

Hi, I tried to compile OpenFO
 
Hi,
I tried to compile OpenFOAM on an Intel Itanium machine with the icc 9.1. I set -gcc-version=410 to be compatible with the gcc version 4.1 I used before. Compiling "triSurface.C" following error occured:

SOURCE=triSurface/triSurface.C ; foamMpiCC -gcc-version=410 -DlinuxIA64 -DDP -wd654,819,1125,1476,1505,1572 -O3 -ftz -DNoRepository -I/home/cluster/t7861aa/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -KPIC -c $SOURCE -o Make/linuxIA64I64DPOpt/triSurface.o
triSurface/triSurface.C(733): error: type "Foam::List<t>::List [with T=Foam::labelledTri]" is not a class template
PrimitivePatch<labelledtri,>
^

triSurface/triSurface.C(733): error: "PrimitivePatch" is not a nonstatic data member or base class of class "Foam::triSurface"
PrimitivePatch<labelledtri,>
^

triSurface/triSurface.C(735): error: expected a ")"
List<labelledtri>(0),
^

triSurface/triSurface.C(741): error: no default constructor exists for class "Foam::PrimitivePatch<foam::labelledtri,>"
{}
^

Can anyone help me?
Thanks in advance

Rolando

hjasak November 28, 2006 13:26

Well, mine compiles and runs f
 
Well, mine compiles and runs fine - this is what I've got around line 733:

// Construct null
triSurface::triSurface()
:
triSurfacePatch
(
List<labelledtri>(0),
pointField(0)
),
patches_(0),
sortedEdgeFacesPtr_(NULL),
edgeOwnerPtr_(NULL)
{}


What does your code say?

Hrv

rolando November 28, 2006 14:07

Hi Hrvoje, it needs a few hou
 
Hi Hrvoje,
it needs a few hours until I can access the Itanium machine again. IŽll tell you, if it will work.
By the way. Do I have to define triSurfacePatch or is it a member of OpenFOAM?

Rolando

hjasak November 28, 2006 14:13

Oh, I remmeberfixing a whole l
 
Oh, I remmeberfixing a whole lot of those. In:

/home/hjasak/OpenFOAM/OpenFOAM-1.3/src/triSurface/triSurface/triSurfacePatch.H

there should be a typedef:

namespace Foam
{
typedef PrimitivePatch AB labelledTri, List, pointField AB triSurfacePatch;
}

(the stupid forum software does not like angled brackets so I've replaced them by AB - I'm sure you can follow).

From there onwards, you need to replace all explicit statements like:

PrimitivePatch AB labelledTri, List, pointField AB

with triSurfacePatch.

The compiler gets confused, but in any case it looks nicer like this.

Hrv

rolando November 28, 2006 14:16

Thaks Hrvoje, IŽll try it and
 
Thaks Hrvoje,
IŽll try it and tell you what happens.
Rolando

rolando November 29, 2006 06:19

Hi, I tried using triSurfaceP
 
Hi,
I tried using triSurfacePatch and everything works fine. Thanks for that Hrvoje.
IŽve one more fundamental question:
I set the path to the gcc 4.1.0 libraries into LD_LIBRARY_PATH. (Because the Intel compiler should perform compatible to gcc 4.1.0)
Otherwise I get an error like this:

SOURCE_DIR=OSspecific/Unix/signals
SOURCE=OSspecific/Unix/signals/sigFpe.C ; icpc -gcc-version=410 -DlinuxIA64 -DDP -wd654,819,1125,1476,1505,1572 -O3 -ftz -DNoRepository -DWM_PROJECT_VERSION='"'1.3'"' -I/home/cluster/t7861aa/OpenFOAM/OpenFOAM-1.3/src/zlib-1.2.1 -I/home/cluster/t7861aa/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -KPIC -c $SOURCE -o Make/linuxIA64I64DPOpt/sigFpe.o
/usr/include/g++/sstream(181): error: identifier "_M_buf_size" is undefined
_M_buf_size = _M_string.size();
^
detected during:
instantiation of "std::basic_stringbuf<_chart,>::basic_stringbuf(co nst std::basic_stringbuf<_chart,>::__string_type &, std::ios_base::openmode={std::_Ios_Openmode}) [with _CharT=char, _Traits=std::char_traits<char>, _Alloc=std::allocator<char>]" at line 355
instantiation of "std::basic_istringstream<_chart,>::basic_istrings tream(const std::basic_istringstream<_chart,>::__string_type &, std::ios_base::openmode={std::_Ios_Openmode}) [with _CharT=char, _Traits=std::char_traits<char>, _Alloc=std::allocator<char>]"

/usr/include/g++/sstream(187): error: identifier "_M_buf_size_opt" is undefined
_M_buf_size_opt = 512;
^
detected during:
instantiation of "std::basic_stringbuf<_chart,>::basic_stringbuf(co nst std::basic_stringbuf<_chart,>::__string_type &, std::ios_base::openmode={std::_Ios_Openmode}) [with _CharT=char, _Traits=std::char_traits<char>, _Alloc=std::allocator<char>]" at line 355
instantiation of "std::basic_istringstream<_chart,>::basic_istrings tream(const std::basic_istringstream<_chart,>::__string_type &, std::ios_base::openmode={std::_Ios_Openmode}) [with _CharT=char, _Traits=std::char_traits<char>, _Alloc=std::allocator<char>]"

.
.
.

Is it legal what IŽm doing, to set the gcc lib-path in addition to the intel compiler path in order to avoid these errors?

Thanks in advance.

Rolando

hjasak November 29, 2006 06:38

Try using -cxxlib-icc as a com
 
Try using -cxxlib-icc as a compiler option.

Hrv

rolando November 29, 2006 07:07

Thanks a lot Hrvoje, it seems
 
Thanks a lot Hrvoje,
it seems to work.
Rolando


All times are GMT -4. The time now is 19:34.