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

[OpenFOAM.org] OpenFOAM 4.1 on CentOS 7 using Intel Compilers

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2017, 21:38
Default OpenFOAM 4.1 on CentOS 7 using Intel Compilers
  #1
Member
 
Fatih Ertinaz
Join Date: Feb 2011
Location: Istanbul
Posts: 64
Rep Power: 15
fertinaz is on a distinguished road
Hi everyone

Subject is quite explanatory.

I am trying to compile OpenFOAM 4.1 version from git repo.
The OS: CentOS Linux release 7.3.1611
Compiler: Intel Parallel Studio XE 2017 Update 2 for Linux

Modifications to OpenFOAM:
  • I completed each step for Third Party compilations (until step 13) without making any modifications
  • Before proceeding to OpenFoam compilation, I first set WM_Compiler to Icc and WM_MPLIB to INTELMPI in OF/etc/bashrc
  • Then changes in OF/etc/config.sh/settings:
    • WM_CC=mpicc
    • WM_CXX=mpicxx
  • Changes in OF/etc/config.sh/mpi:
    • export MPI_ROOT=/opt/intel/impi/impi_version_dir
    • export MPI_ARCH_PATH=$MPI_ROOT
  • Changes in OF/wmake/rules/linux64Icc/c:
    • cc = mpicc
  • Then changes in OF/wmake/rules/linux64Icc/c++:
    • CC = mpicxx -std=c++0x
  • Changes in OF/wmake/rules/linux64Icc/mplibINTELMPI:
    • PFLAGS = -DMPICH_SKIP_MPICXX
      PINC = -I$(MPI_ARCH_PATH)/include64
      PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi

Now it is time to run Allwmake and when we do that two issues appear:
  • foamyMesh cannot be compiled due to the problem related with cgal and mpfr:
    • /home/hpcuser/OpenFOAM/ThirdParty-4.1/platforms/linux64Icc/CGAL-4.8/include/CGAL/GMP/Gmpz_type.h:33:18: fatal error: mpfr.h: No such file or directory
      #include <mpfr.h>
  • I skipped that and when compiling utilities in /OF/applications/utilities/mesh/manipulation another set of issues appeared
    • undefined reference to _intel_fast_memset
      undefined reference to __intel_sse2_strlen
      undefined reference to __intel_sse2_strncmp
      undefined reference to _intel_fast_memcmp
      undefined reference to _intel_fast_memmove
      undefined reference to __intel_sse2_strchr
      undefined reference to _intel_fast_memcpy

Anyone can help me with this issue?

// Fatih
fertinaz is offline   Reply With Quote

Old   March 11, 2017, 03:03
Default
  #2
Member
 
Fatih Ertinaz
Join Date: Feb 2011
Location: Istanbul
Posts: 64
Rep Power: 15
fertinaz is on a distinguished road
Quote:
Originally Posted by iqbalsk8 View Post
Hi Bruno,

Thank you for the reply. I will try to answer your every question one by one.
  • I have gcc-4.9.2 version available so I am exporting its path in the alias command in my local .bashrc.
My 'GMP' and 'MPFR' header path is $WM_THIRD_PARTY_DIR/platforms/linux64. So I extended my alias command to export the path as below i.e.

Code:
alias of1606+='export PATH=$PATH:/opt/gcc49/bin;
export MPFR_ARCH_PATH=/home/iqbalsk8/OpenFOAM/ThirdParty-v1606+OpenCFD/platforms/linux64/mpfr-3.1.2;
export GMP_ARCH_PATH=/home/iqbalsk8/OpenFOAM/ThirdParty-v1606+OpenCFD/platforms/linux64/gmp-5.1.2;
source $HOME/OpenFOAM/OpenFOAM-v1606+OpenCFD/etc/bashrc'
After that I ran Allwmake from $WM_PROJECT_DIR and the libraries were compiled successfully. However, I wanted to ask you whether exporting the
'MPFR_ARCH_PATH' and 'GMP_ARCH_PATH' using the alias is common practice. What is the standard way for exporting those path or in which files must those path be set to make it more clean/standard.

Regards

Sohail
I am experiencing a similar issue with mpfr and gmp.

I compiled CGAL following the steps in: https://openfoamwiki.net/index.php/I...CentOS_SL_RHEL

But when I try to compile foamyMesh (using OF41 and Intel compiler) I get:
Quote:
/....../OpenFOAM/ThirdParty-4.1/platforms/linux64Icc/CGAL-4.8/include/CGAL/gmp.h:30:17: fatal error: gmp.h: No such file or directory
#include <gmp.h>
However I checked the path and there exists the gmp.h file. I changed
Code:
#include <gmp.h>
with
Code:
#include "gmp.h"
it worked but now this time I get

Code:
/home/hpcuser/OpenFOAM/ThirdParty-4.1/platforms/linux64Icc/CGAL-4.8/include/CGAL/GMP/Gmpz_type.h:33:18: fatal error: mpfr.h: No such file or directory
 #include <mpfr.h>
I set the environment variables in .bashrc file however I copied the mpfr-5.1.2 and gmp-5.1.2 directories to linux64Icc directory from linux64 manually. Can it be the reason?

Or is it related to compiling ThirdParty/makeCGAL with Gcc and trying to compile foamyMesh with Intel compiler?

Many thanks
fertinaz is offline   Reply With Quote

Old   October 26, 2017, 11:59
Default
  #3
New Member
 
Vladeta
Join Date: May 2009
Location: BGD
Posts: 5
Rep Power: 16
vlad is on a distinguished road
Hello,
I haven't seen your post before, so I do not know if this is already solved. I've had a very similar problem in installing OpenFOAM 5.0 to scientific calculation cluster running on ScientificLinux 6.4 which is practically very similar to RHEL and Centos. When following the OpenFOAMwiki for installing without administrative privileges I was getting the same error as you.

This error actually comes from not properlly installed gcc, gmp mpfr and its applications. You are, as me getting the error :
Quote:
ThirdParty-5.0/platforms/linux64/CGAL-4.10/include/CGAL/GMP/Gmpz_type.h:33:18: fatal error: mpfr.h: No such file or directory
#include <mpfr.h>
or same for gmp.h
However the problem is not mpfr.h or gmp.h even the error log points to them as they are existing and findable but in their respective libraries: libmpfr.so and libgmp.so. See the 2 lines above the error log message you've posted. These 2 libraries needs to be placed in lib64 folder of mpfr and gmp directories. To compile them you should use:
Code:
./configure --prefix=$WM_THIRD_PARTY_DIR/platforms/linux64/mpfr-3.1.2
make
make install
same for the gmp. Then you could simply ren/move lib folders to lib64. After this no problems with CGAL or foamyMesh.

Next to successfully install mpc I used similarly in its extracted source dir:
Code:
\configure --prefix=$WM_THIRD_PARTY_DIR/platforms/linux64/mpc-1.0.5 --with-gmp=$WM_THIRD_PARTY_DIR/platforms/linux64/gmp-5.2.1 --with-mpfr=$WM_THIRD_PARTY_DIR/platforms/linux64/mpfr-3.1.2
make
make install
Then I have properly 'make install' gcc and its libraries with the same switches.

After installing this gcc and its subsidiaries no problem with rest of the installation done according to wiki.
vlad is offline   Reply With Quote

Old   November 15, 2017, 03:40
Default
  #4
New Member
 
Shweta
Join Date: Nov 2017
Posts: 3
Rep Power: 8
naktu is on a distinguished road
Hello,
I had encountered the same problem.
The problem is, the GMP_ARCH_PATH and MPFR_ARCH_PATH are some how not set by the OpenFOAM bashrc.

The solution I applied is to write the complete path of your thirdparty library in wmake/rules/General/CGAL script.

This will resolve the error.
naktu is offline   Reply With Quote

Old   January 12, 2018, 08:41
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by naktu View Post
Hello,
I had encountered the same problem.
The problem is, the GMP_ARCH_PATH and MPFR_ARCH_PATH are some how not set by the OpenFOAM bashrc.

The solution I applied is to write the complete path of your thirdparty library in wmake/rules/General/CGAL script.

This will resolve the error.
Your solution of changing the CGAL config file is correct. The problem is that gmp/mpfr are nominally for ThirdParty gcc (so they don't get seen for other combinations), but they may also be used for CGAL with other compilers if there aren't any system versions.

Another alternative, with more hacking. Build CGAL without gmp/mpfr and then remove the -lmpfr linkage in the corresponding CGAL wmake rule.
olesen is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Differences in interPhaseChangeFoam between OpenFOAM 2.3 and OpenFOAM 4.1 Mashiro5 OpenFOAM Running, Solving & CFD 2 May 29, 2017 04:13
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin CFDFoundation OpenFOAM Announcements from Other Sources 0 January 4, 2017 06:15
Open Foam 1.7.x Installation on Altix Ice 8400 with Intel 12.1 compilers yadavmahe OpenFOAM Installation 1 February 1, 2012 15:30
installation with Intel MPI and Intel compilers achim OpenFOAM Installation 12 November 10, 2011 05:56
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18:56


All times are GMT -4. The time now is 12:46.