Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

Setting Up the Build Environment for Using Intel® C++ or Fortran Compilers

$
0
0

 

Intel® Composer XE for Windows*

Follow these steps to invoke the Intel® C++ Compiler or  the Intel® Visual Fortran Compiler from the command line:

  1. Open a command prompt.

    Windows 8

    1. From the Start screen, swipe up from the bottom edge or click the arrow to move the Apps screen.

    2. In the Apps screen, scroll to the right until you find the Intel Parallel Studio XE 2015 group.

    3. Click Intel 64 Visual Studio mode or IA-32 Visual Studio mode to open a command window on the Desktop.

    Windows*

    • Click the appropriate mode from Start > All Programs> Intel Parallel Studio XE 2015 > Compiler and Performance Libraries > Command prompt with Intel Compilers.

  2. From the command window, invoke the compilers as follows:

    icl [options... ] inputfile(s) [/link link_options]

    ifort [options... ] inputfile(s) [/link link_options]

    Use the command icl /help or ifort /help to display all available compiler options.

 

Intel® Composer XE for Linux, for OS X*; Intel® INDE Build Edition for OS X*

This also applies to Intel® C++ Composer XE for Linux, Intel® Fortran Composer XE for Linux, Intel® C++ Composer XE for OS X* and Intel® Fortran Composer XE for OS X*.

Before you can use these tools, you must first set the environment variables by running the compiler environment script compilervars.sh or compilervars.csh with an argument that specifies the target architecture.

The following procedure uses the compilervars.sh script:

  1. Open a terminal session.

  2. Run the compiler environment script compilervars.sh:

    source <install-dir>/bin/compilervars.sh <arg>

    where <install-dir> is the directory structure containing the compiler /bin directory, and <arg> is one of the following architecture arguments:

    • intel64: Compilers and libraries for Intel® 64 architectures only

    • ia32: Compilers and libraries for IA-32 architectures only

    Note: The default path for <install-dir> is /opt/intel/.

 

Intel® System Studio

To setup the environment for the Intel® C++ Compiler and integrate it correctly with the build environment on your Linux host, execute the following command:

source <install-dir>/bin/compilervars.sh [arg]  [-arch arch_arg] [-platform platform_arg]

where <install-dir> is the top-level Intel® System Studio installation directory.

Argument and options specification:

No argument

          Setup the environment for IA32 target architecture and Linux or Linux flavours target OS

[arg]   target OS/architecture argument. Possible values are:

          ia32: Setup the environment for IA32 target architecture and Linux or Linux flavours target OS

          ia32and: Setup the environment for IA32 target architecture and Android target OS

          intel64: Setup the environment for Intel® 64 target architecture and Android target OS

[-arch arch_arg] Setup the environment for target architecture. Reverts target OS settings to the default Linux or Linux flavours OS. Possible values are:

          ia32: Setup the environment for IA32 target architecture

          intel64: Setup the environment for Intel® 64 target architecture

[-platform platform_arg] Setup the environment for target OS. Possible values are:

          android: Setup the environment for Android target OS

          linux: Setup the environment for Linux or Linux flavours target OS

If only a target architecture is set the compiler by default will compile for Linux target OS. To compile for Android target OS the “-platform=android” should be specified to the compiler. Setting up the environment for target OS allows running the compiler without the need to specify “-platform” option. Target OS settings can be changed later by running compilervars.sh script again.

 


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>