1 / 11

Lab : OpenMP Programming

Lab : OpenMP Programming. Parallel Programming (CS5423) Instructor : 鍾葉青 Author : 吳宇宸. Note!. OpenMP 必須由編譯器本身支援,無法以套件方式使用。 使用 OpenMP 前,務必先確定你的編譯器有支援 OpenMP. Compilers and Platforms. IBM XL Fortran and C from IBM IBM AIX Systems Intel C++ and Fortran Compilers

ismet
Download Presentation

Lab : OpenMP Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lab : OpenMP Programming Parallel Programming (CS5423) Instructor : 鍾葉青 Author : 吳宇宸

  2. Note! • OpenMP必須由編譯器本身支援,無法以套件方式使用。 • 使用OpenMP前,務必先確定你的編譯器有支援OpenMP

  3. Compilers and Platforms • IBM XL Fortran and C from IBM • IBM AIX Systems • Intel C++ and Fortran Compilers • Linux (IA32,EM64T, Itanium) • Windows 2K,XP (32bits,64bits) • MAC OS • Sun Microsystems • Sun Studio Compilers and Tools • Sun Studio 11 • OMPlab Presentation, IWOMP 2005 • Others… • GCC 4.2 (new!!)

  4. 開發模式 • 模式1 • 整合Microsoft Visual C++ (studio) .NET 2003 • 模式2 • 終端機指令模式

  5. 模式一 整合 MS VC++ • Step 1. 用一般方式建立自己所需的方案 • Step 2. 轉換成intel方案

  6. 模式一 整合 MS VC++ • Step3. 設定專案屬性

  7. 模式一 整合 MS VC++ • Step4. 調整屬性 “ C/C++ -> Language -> Process OpenMP Directives

  8. 模式一 整合 MS VC++ • Step 5. 執行編譯 • Demo

  9. 不該有錯誤訊息! 模式二 終端機指令模式 • Step1 . 開始 > 所有程式 > Intel(R) Software Development Tools > Intel(R) C++ Compiler 9.1 > Build Environment for C++ EM64T-based applications

  10. 模式二 終端機指令模式 • Step2 • Intel C++ compiler的執行指令為 icl,可輸入”icl /help” 來查閱完整資訊 • 若有使用OpenMP • X:\yourdir\>icl /Qopenmp yourfile.c • Demo

  11. Intel C++ compiler 其他常用參數 • Optimize • /O0 : disable • /O : same as /O2 • /O1 : Optimize to favor code size and code locality. Disables loop unrolling. • /O2 : default • /O3 : enable high-level optimization • Others • /S compile to assembly file • /I<dir> add directory to include file search path • Other…(try “icl /?” !)

More Related