Intel® MPI Library Developer Reference for Linux* OS

ID 768732
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Compilation Command Options

-nostrip

Use this option to turn off the debug information stripping while linking the Intel® MPI Library statically.

-config=<name>

Use this option to source a compiler configuration file. The file should contain the environment settings to be used with the specified compiler.

Use the following naming convention for configuration files:

<install-dir>/etc/mpi<compiler>-<name>.conf

where:

  • <compiler>={cc,cxx,f77,f90}, depending on the language compiled.
  • <name> is the name of the underlying compiler with spaces replaced by hyphens; for example, the <name> value for cc -64 is cc--64.

-profile=<profile_name>

Use this option to specify an MPI profiling library. <profile_name> is the name of the configuration file (profile) that loads the corresponding profiling library. The profiles are taken from <install-dir>/etc .

The Intel MPI Library comes with several predefined profiles for the Intel® Trace Collector:

  • <install-dir>/etc/vt.conf — regular tracing library

  • <install-dir>/etc/vtfs.conf — fail-safe tracing library

  • <install-dir>/etc/vtmc.conf — correctness checking tracing library

  • <install-dir>/etc/vtim.conf — load imbalance tracing library

You can also create your own profile as <profile-name>.conf. You can define the following environment variables in a configuration file:

  • PROFILE_PRELIB - libraries (and paths) to load before the Intel MPI Library
  • PROFILE_POSTLIB - libraries to load after the Intel MPI Library
  • PROFILE_INCPATHS - C preprocessor arguments for any include files

For example, create a file myprof.conf with the following lines:

PROFILE_PRELIB="-L<path_to_myprof>/lib -lmyprof"
PROFILE_INCPATHS="-I<paths_to_myprof>/include"

Use the -profile=myprof option for the relevant compiler wrapper to select this new profile.

-t or -trace

Use the -t or -trace option to link the resulting executable file against the Intel® Trace Collector library. Using this option has the same effect as the -profile=vt option.

You can also use the I_MPI_TRACE_PROFILE environment variable to <profile_name> to specify another profiling library. For example, set I_MPI_TRACE_PROFILE to vtfs to link against the fail-safe version of the Intel Trace Collector.

To use this option, include the installation path of the Intel® Trace Collector in the VT_ROOT environment variable. Source the vars.[c]sh script provided in the Intel® Trace Analyzer and Collector installation folder.

-trace-imbalance

Use the -trace-imbalance option to link the resulting executable file against the load imbalance tracing library of Intel Trace Collector. Using this option has the same effect as the -profile=vtim option.

To use this option, include the installation path of the Intel Trace Collector in the VT_ROOT environment variable. Source the vars.[c]sh script provided in the Intel® Trace Analyzer and Collector installation folder.

-check_mpi

Use this option to link the resulting executable file against the Intel® Trace Collector correctness checking library. The default value is libVTmc.so. Using this option has the same effect as the -profile=vtmc option.

You can also use the I_MPI_CHECK_PROFILE environment variable to <profile_name> to specify another checking library.

To use this option, include the installation path of the Intel Trace Collector in the VT_ROOT environment variable. Source the vars.[c]sh script provided in the Intel® Trace Analyzer and Collector installation folder.

-ilp64

Use this option to enable partial ILP64 support. All integer arguments of the Intel MPI Library are treated as 64-bit values in this case.

-no_ilp64

Use this option to disable the ILP64 support explicitly. This option must be used in conjunction with -i8 option of Intel® Fortran Compiler.

If you specify the -i8 option for the separate compilation with Intel Fortran Compiler, you still have to use the i8 orilp64 option for linkage.

-dynamic_log

Use this option in combination with the -t option to link the Intel Trace Collector library dynamically. This option does not affect the default linkage method for other libraries.

To run the resulting programs, include $VT_ROOT/slib in the LD_LIBRARY_PATH environment variable.

-g

Use this option to compile a program in debug mode and link the resulting executable file against the debugging version of the Intel MPI Library. See I_MPI_DEBUG for information on how to use additional debugging features with the -g builds.

The optimized library is linked with the -g option by default.

Use vars.{sh|csh} [debug|debug_mt] at runtime to load a particular libmpi.so configuration.

-link_mpi=<arg>

Use this option to always link the specified version of the Intel MPI Library. See the I_MPI_LINK environment variable for detailed argument descriptions. This option overrides all other options that select a specific library .

Use vars.{sh|csh}[debug|debug_mt] during runtime to load particular libmpi.so configuration.

-O

Use this option to enable compiler optimization.

-fast

Use this option to maximize speed across the entire program. This option forces static linkage method for the Intel MPI Library.

This option is supported only by the mpiicc, mpiicpc, and mpiifort Intel® compiler wrappers.

-echo

Use this option to display everything that the command script does.

-show

Use this option to learn how the underlying compiler is invoked, without actually running it. Use the following command to see the required compiler flags and options:

$ mpiicc -show -c test.c

Use the following command to see the required link flags, options, and libraries:

$ mpiicc -show -o a.out test.o

This option is particularly useful for determining the command line for a complex build procedure that directly uses the underlying compilers.

-show_env

Use this option to see the environment settings in effect when the underlying compiler is invoked.

-{cc,cxx,fc}=<compiler>

Use this option to select the underlying compiler.

The table below lists the recommended product default LLVM and IL0 compiler options and commands used to invoke them.

LLVM Compiler Options for Intel® oneAPI
Language/Model Product Name Compiler Driver Compiler Wrapper Command Example
C Intel® oneAPI DPC++/C++ Compiler icx mpiicc -cc=icx $ mpiicc -cc=icx -c test.c
C++ Intel® oneAPI DPC++/C++ C icpx mpiicpc -cxx=icpx $  mpiicpc -cxx=icpx -c test.cpp
SYCL* Intel® oneAPI DPC++/C++ Compiler $ -cxx=icpx -fsycl mpiicpc $ -cxx=icpx -fsycl $ mpiicpc -cxx=icpx -fsycl -c test.cpp
Fortran Intel® oneAPI Fortran Compiler ifx mpiifort -fc=ifx $ mpiifort -fc=ifx -c test.
NOTE:
Make sure that the wrapper name is in your PATH. Alternatively, you can specify the full path to the compiler.

-nofortbind, -nofortran

Use this option to disable mpiicc linking with Fortran bindings. This has the same effect as the I_MPI_FORT_BIND variable.

-v

Use this option to print the compiler wrapper script version and its underlying compiler version.

-norpath

Use this option to disable rpath for the compiler wrapper for the Intel® MPI Library.