Message: Compile Geant4 with intel compiler on Ubuntu Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Note Compile Geant4 with intel compiler on Ubuntu 

Forum: Multithreading
Date: 17 Aug, 2016
From: Don Vernekohl <Don Vernekohl>

I am planning to run simulations on a Xeon phi and testing if my application compiles with the icc and icpc compilers. On my way through the Geant4 installation itself, I got some trouble and found a workaround which I want to share.

I followed the instructions from: https://twiki.cern.ch/twiki/bin/view/Geant4/XeonPhiSupport

Since I don't have a Xeon Phi installed, I exported only the first two compiler flags: export CC=icc export CXX=icpc

no LD, AR or -mmic flags (last ones will cause errors in the configuration)

I configured with the following command excluding the LD and AR flags:

cmake -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_USE_SYSTEM_EXPAT=OFF -DGEANT4_INSTALL_DATA=ON -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_TOOLCHAIN_FILE=mic-toolchain-file.cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_INSTALL_PREFIX=../install_MT ../geant4.x.x

While the configuration went through, I got a lot of error messages in the compilation. All related to the string.h class:
/usr/include/string.h(86): error: expected a ";"
  __extern_always_inline void *

My workaround is adding the following lines in /usr/include/string.h:

#ifdef __INTEL_COMPILER
#define __extern_always_inline inline
#endif 

which is maybe not the best solution.

I work on Ubuntu 15.10 with the gcc version 4.7.4

The output of "apt-cache show libc6-dev" is given in the appended file

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2016/08/17/15.09-70878-apt-cache-output.txt

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: Compile Geant4 with intel compiler on Ubuntu   (Andrea Dotti - 18 Aug, 2016)
(_ More: Re: Compile Geant4 with intel compiler on Ubuntu   (Don Vernekohl - 19 Aug, 2016)
(_ Ok: Re: Compile Geant4 with intel compiler on Ubuntu   (Don Vernekohl - 30 Aug, 2016)
(_ Feedback: Re: Compile Geant4 with intel compiler on Ubuntu   (Andrea Dotti - 02 Sep, 2016)
(_ Question: Re: Compile Geant4 with intel compiler on Ubuntu   (EugenyZhevak - 12 Sep, 2016)
(_ Ok: Re: Compile Geant4 with intel compiler on Ubuntu   (EugenyZhevak - 12 Sep, 2016)
 Add Message Add Message
to: "Compile Geant4 with intel compiler on Ubuntu"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews