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

Compiling with Intel icc

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 8, 2005, 09:47
Default Hi all, has already someone
  #1
gellert
Guest
 
Posts: n/a
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
  Reply With Quote

Old   March 8, 2005, 11:22
Default Yes the Intel C++ compiler is
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 13
henry is on a distinguished road
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.
henry is offline   Reply With Quote

Old   November 28, 2006, 13:31
Default Hi, I tried to compile OpenFO
  #3
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 8
rolando is on a distinguished road
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
rolando is offline   Reply With Quote

Old   November 28, 2006, 14:26
Default Well, mine compiles and runs f
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
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
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   November 28, 2006, 15:07
Default Hi Hrvoje, it needs a few hou
  #5
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 8
rolando is on a distinguished road
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
rolando is offline   Reply With Quote

Old   November 28, 2006, 15:13
Default Oh, I remmeberfixing a whole l
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
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
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   November 28, 2006, 15:16
Default Thaks Hrvoje, IŽll try it and
  #7
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 8
rolando is on a distinguished road
Thaks Hrvoje,
IŽll try it and tell you what happens.
Rolando
rolando is offline   Reply With Quote

Old   November 29, 2006, 07:19
Default Hi, I tried using triSurfaceP
  #8
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 8
rolando is on a distinguished road
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
rolando is offline   Reply With Quote

Old   November 29, 2006, 07:38
Default Try using -cxxlib-icc as a com
  #9
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Try using -cxxlib-icc as a compiler option.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   November 29, 2006, 08:07
Default Thanks a lot Hrvoje, it seems
  #10
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 8
rolando is on a distinguished road
Thanks a lot Hrvoje,
it seems to work.
Rolando
rolando is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Intel compiling problem cosimobianchini OpenFOAM Installation 1 March 6, 2008 17:59
Compiling with Intel compiler icc90 hjasak OpenFOAM Installation 19 October 27, 2007 11:35
CPU:Intel 3.0E or 3.0C Andrew CFX 2 May 24, 2004 13:00
AMD MP vs INTEL Xeon Albert CD-adapco 6 February 19, 2003 10:50
INTEL vs. AMD Michael Bo Hansen CFX 9 June 19, 2001 16:54


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