Compiler Topics

使用idb调试Intel® Xeon Phi协处理器上的本地应用程序

在使用idb对运行在Intel® Xeon PhiTM协处理器上的本地应用程序(Native Code)进行调试之前首先需要建立起调试器的运行环境。该环境的设置也被包含在Intel®编译器的环境设置脚本中,所以可以通过运行下面的命令建立Intel®编译器和调试器的使用环境:
$ source /opt/intel/composerxe/bin/compilervars.sh intel64

和主机程序的调试一样,我们需要在生成协处理器本地应用程序的编译命令行中加上”-g”选项让编译器生成带有调试符号的可执行程序;然后将可执行程序上传到协处理器系统并确认该程序可以正常启动执行。

接下来在主机环境中启动远程调试器:
idbc_mic -tco -rconnect=tcpip:coprocessor-ip-address:port
缺省情况下的端口号是2000

例如:当协处理器使用缺省的网络配置时启动对第一个Intel® Xeon PhiTM协处理器进行调试的命令行就是:
idbc_mic -tco -rconnect=tcpip:mic0:2000

  • Developers
  • Students
  • Linux*
  • C/C++
  • Fortran
  • Intel® Parallel Studio XE
  • intel debugger
  • Intel Xeon Phi
  • MIC
  • Debugging
  • Development Tools
  • Intel® Many Integrated Core Architecture
  • Parallel Computing
  • 使用Intel® Fortran编译器编译Coarray程序

    Coarray是在Fortran 2008中实现标准化的一种数据共享概念, 它通过使用同一个程序的多个拷贝来实现并行处理。这里的每一个拷贝,也被称image,同时拥有普通局部变量和叫做coarray的共享变量。一个共享变量既可以是一个数组也可以是一个标量,它的存储空间会跨越一个程序对应的所有image。在这种分区全局地址空间(Partitioned Global Address Space – PGAS)模式中,每一个image既可以像访问局部变量一样访问某个共享变量的自有部分,还可以访问位于别的image中的该变量其它部分。

     

    Intel编译器支持在使用共享内存的多核或多处理机系统上运行coarray程序。通过使用可选的许可证coarray程序也可以运行在使用分布式内存的Linux*操作系统或Windows*操作系统的集群上。这些程序还可以运行在使用Intel®集成众核(Intel® MIC架构)的Linux系统上。

     

  • Developers
  • Students
  • Linux*
  • Microsoft Windows* (XP, Vista, 7)
  • Fortran
  • Beginner
  • Intermediate
  • Intel® Fortran Compiler
  • Intel Fortran
  • Coarray Fortran
  • Development Tools
  • Three progamming points to mention on Offloaded Code for Intel® Graphics Technology

    Intel® Graphic Technology is a supported part of the compiler product. Developers should adhere to the programming guidelines in order to benefit from the compiler and GT features efficiently.

    1."#pragma offload target(gfx)" is required to mark the parallel loop as an "offload region".  The "__declspec(target(gfx))" does not do that.  It merely states that the function should be compiled to run on the GFX target.

    For example, the following incorrect code snippet use is from a customer:

  • Developers
  • Microsoft Windows* (XP, Vista, 7)
  • Code for Good
  • C/C++
  • OpenMP*
  • Installing Intel Compilers for OS X, pre-requisite Xcode command line tools

    In order to use the Intel compilers on OS X 10.9 and greater (Mavericks), the 'command line tools' for Xcode must be installed.  By default these are NOT installed when you install Xcode 5. 

    First, install Xcode 5 to your system ( App Store, search for Xcode, install )

    To install the Xcode command line tools:

    While logged into your Mac as an adminstrative user, open a Terminal window (Applications -> Utilities -> Terminal)

  • Developers
  • Apple OS X*
  • C/C++
  • Fortran
  • Xcode command line tools xcode-select
  • icpc error: namespace "std" has no member "function" or "bind" or other

    Affects OS X and some older Linux distributions

    Error message is seen when compiling C++11 C++ applications using std::function. 

    Root cause:  stdlib headers and libraries used by ICPC come from the system supplied gnu gcc/g++ by default.  Thus the system g++ must be fairly modern and support std::function.  Older gcc versions such as those found on OS X and some older Linux distributions do not have full support for all new C++11 std:: namespace functions.  You will see an error such as this:

  • Developers
  • Professors
  • Students
  • Apple OS X*
  • Linux*
  • C/C++
  • C++11 -stdlib -std=c++11
  • Привязка потоков (affinity) в Intel® Threading Building Blocks на сопроцессоре Intel® Xeon Phi™

    Библиотека Intel® Threading Building Blocks (Intel® TBB) [1] [2] предоставляет высокоуровневые интерфейсы для написания программ, использующих параллельные вычисления. И несмотря на то, что цель этих интерфейсов скрыть от разработчика управление потоками в системе, всё же иногда встречаются задачи, требующие ручного управления. Одна из таких задач - привязка программных потоков к определённым физическим потокам (ядрам) [3].

  • Developers
  • Students
  • Linux*
  • Business Client
  • Server
  • C/C++
  • Intel® C++ Composer XE
  • Intel® Threading Building Blocks
  • Intel Threading Building Blocks (Intel TBB)
  • Intel Xeon Phi
  • Affinity
  • tbb affinity
  • cache efficiency
  • observer
  • task_scheduler_observer
  • pi
  • тбб
  • аффинити
  • кэш
  • привязка потоков
  • Initializer lists not compiling with template constructors

    Products: Intel® C++ Composer XE

    Versions: 2013 SP1 (compiler 14.0)

    Operating Systems: Windows*, Linux*, OS X*

    Software Defect ID: DPD200248554

    Problem: The compiler currently gives an error on initializer lists passed to template constructors. For example:

  • Apple OS X*
  • Linux*
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 8
  • C/C++
  • Intel® C++ Compiler
  • Intel® C++ Composer XE
  • Development Tools
  • Subscribe to Compiler Topics