CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] 2.3.0: Problems compiling with ICC 11.1 (https://www.cfd-online.com/Forums/openfoam-installation/180734-2-3-0-problems-compiling-icc-11-1-a.html)

rahulksoni November 29, 2016 09:05

2.3.0: Problems compiling with ICC 11.1
 
[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

rahulksoni November 29, 2016 22:54

[Solved Partially]
 
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


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