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

[OpenFOAM.org] 2.3.0: Problems compiling with ICC 11.1

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 29, 2016, 10:05
Default 2.3.0: Problems compiling with ICC 11.1
  #1
Member
 
rahulksoni's Avatar
 
Rahul Kumar Soni
Join Date: Oct 2013
Location: Bhubaneswar, India
Posts: 68
Rep Power: 13
rahulksoni is on a distinguished road
Send a message via Skype™ to rahulksoni
[Moderator note: The original title was: "/opt/intel/Compiler/11.1/073/include/math.h:27:3: error: #error "This Intel <math.h>"]

While compiling OpenFOAM with Icc (defined in /etc/cshrc file) following type of error is produced:
Code:
/usr/include/c++/4.3.2/type_traits(82): error: expected a ">"
struct is_rvalue_reference<_Tp&&>
^
I am getting this error while doing ./Allwmake in OpenFOAM project directory.
I am installing in HPC cluster with SUSE Enterprise OS, of which ~/.cshrc file is presented below:

Code:
set path=($path /opt/pbs/default/bin $HOME/bin)
source /usr/share/modules/init/tcsh
module load mpt/2.01
module load intel_11.1.073
#setenv BOOST_ARCH_PATH $HOME/boost/1_62_0


setenv FOAM_SETTINGS 'WM_NCOMPPROCS=4 WM_MPLIB=OPENMPI WM_ARCH_OPTION=64'
alias of230 'source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/cshrc $FOAM_SETTINGS'
#setenv of230 source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/cshrc $FOAM_SETTINGS
#source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/cshrc $FOAM_SETTINGS
#source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/cshrc

#set WM_COMPILER="Icc"
alias of230 'source \/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/etc/cshrc WM_NCOMPPROCS=4 WM_MPLIB=OPENMPI WM_ARCH_OPTION=64'
These are after some attempts to modify it to support foam installation.

I have struggled a lot over internet about troubleshooting but no luck. Can be anybody please help me how to resolve. How to prevent Foam using intel include files especially math.h

Further, details regarding system are as follows:

cat /proc/version
Code:
Linux version 2.6.32.12-0.7-default (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP 2010-05-20 11:14:20 +0200
icc --version
Code:
icc (ICC) 11.1 20100806
Copyright (C) 1985-2010 Intel Corporation.  All rights reserved.
lsb_release -a
Code:
LSB Version:    core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: SUSE LINUX
Description:    SUSE Linux Enterprise Server 11 (x86_64)
Release:        11
Codename:       n/a
uname -m
Code:
x86_64

Last edited by wyldckat; November 30, 2016 at 06:20.
rahulksoni is offline   Reply With Quote

Old   November 29, 2016, 23:54
Default [Solved Partially]
  #2
Member
 
rahulksoni's Avatar
 
Rahul Kumar Soni
Join Date: Oct 2013
Location: Bhubaneswar, India
Posts: 68
Rep Power: 13
rahulksoni is on a distinguished road
Send a message via Skype™ to rahulksoni
Ok, got it solved partially.
The key is with the source with following switch:
Code:
-U__GXX_EXPERIMENTAL_CXX0X__
The files inside $WM_PROJECT_DIR/wmake/rules define the compilation controls and switches. What we need to do is to identify our system configuration i.e. architecture and compiler and then enter into appropriate directory and modify the c++ to append above switch.

Example for my case:
uname -m
Code:
x86_64
echo $WM_ARCH
Code:
linux64
icc --version
Code:
icc (ICC) 11.1 20100806
Copyright (C) 1985-2010 Intel Corporation.  All rights reserved.
icc --version
Code:
gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Since, it is problem of Icc I modified /linux64Icc/c++

So the c++FLAGS lines look like
Code:
c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -U__GXX_EXPERIMENTAL_CXX0X__
Ref links:
https://software.intel.com/pt-br/for...r/topic/287222

Last edited by rahulksoni; November 30, 2016 at 03:39.
rahulksoni is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling OF-2.1.0 on RHEL6.2 with icc lishijie OpenFOAM Installation 2 March 26, 2013 21:14
Error compiling OpenFoam 1.6.x with intel compiler icc mak_04 OpenFOAM Installation 5 October 28, 2011 08:06
Error occurs when compiling OpenFoam 1.6.x with Icc fs82 OpenFOAM Bugs 5 January 20, 2010 04:08
Problems compiling UDFs under SuSE 10.2 George FLUENT 1 February 21, 2007 09:36
Problems on Compiling UDF in FLUENT Strawberi-KeatKeat FLUENT 1 October 4, 2006 02:50


All times are GMT -4. The time now is 18:05.