Compiling C++11 Standards with Intel on Pacman

On pacman.arsc.edu, in order to compile functionality for the C++11 standards using the intel compiler, a newer version of gnu must be loaded into your programming environment.  See the following example showing how this is done using modules.

First, confirm the version of gnu loaded into your Programming Environment by default:

pacman12% g++ --version
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 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

Next, remove all currently loaded modules to clean up your Programming Environment, then load both the newer GNU environment and the Intel environment:

pacman12% module purge 
pacman12% module load PrgEnv-gnu/4.7.3 
pacman12% module load PrgEnv-intel/ 2013_sp1

Double check the newer version of GNU is loaded into your environment following the module changes:

pacman12% g++ --version 
g++ (GCC) 4.7.3 
Copyright (C) 2012 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.

Finally, compile using  the "-std=c++0x" flag:

pacman12% icpc -std=c++0x myFile.cpp

Back to Top