CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Installation

How to build Open FOAM with Intel compilers...?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 16, 2012, 15:26
Default How to build Open FOAM with Intel compilers...?
  #1
New Member
 
Rui Alexandre Trigo Ribeiro Pereira
Join Date: Mar 2009
Location: Coimbra, Coimbra, Portugal
Posts: 23
Rep Power: 7
ed_teller is on a distinguished road
Hi

I have installed intel parallel studio in My Ubuntu 12.04, and I am trying to build OF-2.1.1 using intel.

I untarred Third-party, as well as OpenFoam-2.1.1

I set the environment in /etc/bashrc after changing the default compilers to intel.

I cd to third party, and run ./Allwmake

compilation occurs without incidents, then i cd to OpenFOAM-2.1.1, and run ./Allwmake again.

The libraries build ok, but some of the solvers and utilities do not build, the typical message involves something about libpstream.so :





Code:
 icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,654,819,1125,1476,1505,1572 -xSSE3 -O2 -no-prec-div  -DNoRepository -IphaseModel/lnInclude -ImultiphaseSystem/lnInclude -ImultiphaseFixedFluxPressure -IinterfacialModels/lnInclude -I/home/alex/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/home/alex/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/incompressible/lnInclude -I/home/alex/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/interfaceProperties/lnInclude -I/home/alex/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/incompressible/lnInclude -I/home/alex/OpenFOAM/OpenFOAM-2.1.1/src/transportModels/incompressible/singlePhaseTransportModel -I/home/alex/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels -I/home/alex/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/LES/LESModel -I/home/alex/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/LES/LESdeltas/lnInclude -I/home/alex/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/alex/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/alex/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude   -fPIC Make/linux64IccDPOpt/multiphaseEulerFoam.o -L/home/alex/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/lib \
             -lmultiphaseSystem -lcompressibleMultiPhaseModel -linterfaceProperties -lincompressibleTransportModels -lcompressibleMultiphaseEulerianInterfacialModels -lincompressibleLESModels -lfiniteVolume -lOpenFOAM -ldl   -L/lib -lm -o /home/alex/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/bin/multiphaseEulerFoam
ld: Make/linux64IccDPOpt/multiphaseEulerFoam.o: undefined reference to symbol '_ZN4Foam14incompressible15turbulenceModel8typeNameE'
ld: note: '_ZN4Foam14incompressible15turbulenceModel8typeNameE' is defined in DSO /home/alex/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/lib/libincompressibleTurbulenceModel.so so try adding it to the linker command line
/home/alex/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/lib/libincompressibleTurbulenceModel.so: could not read symbols: Invalid operation
make[2]: *** [/home/alex/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64IccDPOpt/bin/multiphaseEulerFoam] Error 1
make[2]: Leaving directory `/home/alex/OpenFOAM/OpenFOAM-2.1.1/applications/solvers/multiphase/multiphaseEulerFoam'
make[1]: *** [multiphaseEulerFoam] Error 2
Is there any tutorial detailing how to build OpenFOAM in Ubuntu 12.04 using Intel..?

I am using Intel parallel_studio_xe_2011...

Best regards

Alex
ed_teller is offline   Reply With Quote

Old   September 18, 2012, 16:46
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,511
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings Alex,

You better try with the latest 2.1.x, because some tweaks for ICC have been done after 2.1.1 was released.

Well... apparently only this was done for it: https://github.com/OpenFOAM/OpenFOAM...08190dc7c05e66 - so maybe you can still use 2.1.1, but apply those changes manually!

As for specific instructions on using Icc... not that I'm aware of, but you are already in the right track! The change from that commit should do the final trick!

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   September 20, 2012, 13:35
Default
  #3
New Member
 
Rui Alexandre Trigo Ribeiro Pereira
Join Date: Mar 2009
Location: Coimbra, Coimbra, Portugal
Posts: 23
Rep Power: 7
ed_teller is on a distinguished road
Hi Wyldckat

I have built it already

Thanks for the hint

BRGDS

Alex
ed_teller is offline   Reply With Quote

Old   October 8, 2012, 11:08
Default
  #4
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 168
Rep Power: 7
linch is on a distinguished road
Hi Bruno,

me again , this time trying to cmpile OF 2.1.x with icc. I've got some errors directly at the beginning of the ThirdParty build:
Quote:
icc -O3 -no-prec-div -fPIC lex.yy.c -o /home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/wmake/platforms/linux64Icc/wmkdep
icpc -std=c++0x -wd327,654,819,1125,1476,1505,1572 -xSSE3 -O2 -no-prec-div -DNoRepository -fPIC \
wmkdepend.cpp wmkdependParser.cpp wmkdependScanner.cpp \
-o /home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/wmake/platforms/linux64Icc/wmkdepend
/usr/include/c++/4.3.2/type_traits(82): error: expected a ">"
struct is_rvalue_reference<_Tp&&>
^

/usr/include/c++/4.3.2/type_traits(106): error: expected a ">"
struct remove_reference<_Tp&&>
^

/usr/include/c++/4.3.2/type_traits(136): catastrophic error: rvalue references not yet implemented
{ typedef _Tp&& type; };
^

compilation aborted for wmkdepend.cpp (code 4)
/usr/include/c++/4.3.2/type_traits(82): error: expected a ">"
struct is_rvalue_reference<_Tp&&>
^

/usr/include/c++/4.3.2/type_traits(106): error: expected a ">"
struct remove_reference<_Tp&&>
^

/usr/include/c++/4.3.2/type_traits(136): catastrophic error: rvalue references not yet implemented
{ typedef _Tp&& type; };
^

compilation aborted for wmkdependParser.cpp (code 4)
/usr/include/c++/4.3.2/type_traits(82): error: expected a ">"
struct is_rvalue_reference<_Tp&&>
^

/usr/include/c++/4.3.2/type_traits(106): error: expected a ">"
struct remove_reference<_Tp&&>
^

/usr/include/c++/4.3.2/type_traits(136): catastrophic error: rvalue references not yet implemented
{ typedef _Tp&& type; };
^

compilation aborted for wmkdependScanner.cpp (code 4)
make: *** [/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/wmake/platforms/linux64Icc/wmkdepend] Error 4
Do you have any idea, what does it mean?

The rest of the TP-compilation seems to be ok.

Best regards,
Illya

P.S. building OF causes lots of exactly same "catastrophic errors"

Last edited by linch; October 8, 2012 at 11:53.
linch is offline   Reply With Quote

Old   October 8, 2012, 18:05
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,511
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Illya,

very little information you're giving me
I'll need to know which version of Icc you're using and which Linux Distribution you're using.
I ask this because with each new Icc version, the required list of options can change and because Icc depends very much on the Gcc version that is installed in the system!

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   October 9, 2012, 07:36
Default
  #6
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 168
Rep Power: 7
linch is on a distinguished road
Hi Bruno,

sorry, here it comes. Icc:
Quote:
icc (ICC) 11.1 20100806
Gcc:
Quote:
gcc (Debian 4.3.2-1.1) 4.3.2
Linux:
Quote:
Linux version 2.6.26-2-amd64 (Debian 2.6.26-26lenny3) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch
Distributor ID: Debian
Description: Debian GNU/Linux 5.0.8 (lenny)
Release: 5.0.8
Codename: lenny
Best regards,
Illya
linch is offline   Reply With Quote

Old   October 10, 2012, 18:33
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,511
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Illya,

OK, I haven't tested this yet, but the idea is this:
  1. First of all, roughly follow the instructions provided here: http://openfoamwiki.net/index.php/In...tu#Ubuntu_8.04
    Adapt where necessary to use 2.1.x instead of 2.1.1.
  2. After you've built everything with success by using Gcc 4.5.2, as instructed on that wiki page section, to make sure everything works as intended... you'll then need to do the following hacks:
    1. Edit the file "$HOME/.bashrc", find the line that says "WM_COMPILER=Gcc45" and replace it with "WM_COMPILER=Icc".
    2. Edit the file "$WM_PROJECT_DIR/etc/config/settings.sh" and find the line that says:
      Code:
      Gcc45 | Gcc45++0x)
      And replace it with:
      Code:
      Gcc45 | Gcc45++0x | Icc)
    3. Start a new terminal and build OpenFOAM, simply by running Allwmake once again... once and/or twice, as indicated on the step #10 from the wiki page section.
Best regards,
Bruno
wyldckat 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
interFoam & decomposition method: scotch MacGyver OpenFOAM Running, Solving & CFD 2 May 23, 2012 08:00
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 11:57
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56
How to install Open Foam 15 madhukar_nal OpenFOAM 3 June 8, 2010 07:18
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51


All times are GMT -4. The time now is 14:36.