项目作者: Yiiinsh

项目描述 :
OpenMP affinity scheduling implementation by hand
高级语言: C
项目地址: git://github.com/Yiiinsh/OpenMPAffinityScheduling.git
创建时间: 2017-11-27T22:47:23Z
项目社区:https://github.com/Yiiinsh/OpenMPAffinityScheduling

开源协议:

下载


OpenMP Affinity Scheduling

Introduction

OpenMP affinity scheduling implementation by hand.

Project Structure

  • loops2.c : main entry of the program for testing.
  • workqueue.h/.c : workqueue definition & implementation

Build

To build this project, open terminal and type:

  1. make

Program with name loops2 will appear under current working directory.

Usage

To run this program, type:

  1. ./loops2

Demo

Assumed that user has already build the program.

Firstly, set OMP_NUM_THREADS to expected value :

  1. export OMP_NUM_THREADS=8

Then, run the program:

  1. ./loops2

Execution results will be printed to the screen:

  1. Loop 1 check: Sum of a is -343021.474766
  2. Total time for 1000 reps of loop 1 = 0.340465
  3. Loop 2 check: Sum of c is -25242644.603147
  4. Total time for 1000 reps of loop 2 = 1.647152

Author

B119172