Giter VIP home page Giter VIP logo

mfkiwl / dpc-experiments Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guminer/dpc-experiments

0.0 1.0 0.0 3.44 MB

Experiments with DPC++ (Data Parallel C++) https://software.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top/oneapi-programming-model/data-parallel-c-dpc.html

C++ 98.81% GLSL 0.01% C 0.72% OpenSCAD 0.01% Makefile 0.01% Objective-C 0.46% Shell 0.01%

dpc-experiments's Introduction

DPC-experiments

This repository hosts experiments with DPC++ (Data Parallel C++).

For more information on DPC++, see https://software.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top/oneapi-programming-model/data-parallel-c-dpc.html

DPCDemo

Purpose

DPCDemo is a particle simulator to test fan performance

https://devmesh.intel.com/projects/fan-efficiency-particle-simulation

While work on DPCDemo has concluded, there are many improvements that can be made. For more information, see the DevMesh project post for this project: https://devmesh.intel.com/projects/fan-efficiency-particle-simulation

Status Image

Usage

  1. Build (See "Building" below)
  2. Run DPCDemo.exe
    • Specify --device <device_type> to use a different device.
    • Specify --input <input-file> to specify a different fan to test the performance of.

Running on DevCloud

  1. Build using the "Building in DevCloud" section below.
  2. make run to run locally.

Queue run on a CPU

  1. qsub -d . devcloud-run-cpu.sh
  2. Watch for the STDOUT output file to be created from the run.
  3. nano devcloud-run-cpu.sh.oABCDEF to inspect the output!

Queue run on a GPU

  1. qsub -l nodes=1:gpu:ppn=2 -d . devcloud-run-gpu.sh
  2. Watch for the STDOUT output file to be created from the run.
  3. nano devcloud-run-gpu.sh.oABCDEF to inspect the output!

Queue run on an FPGA

Unfortunately this application appears to be too large to build for an FPGA:

$ dpcpp SimConstants.h Simulation.h Simulation.cpp Random.h Random.cpp RandData.h RandData.cpp Particle.h Particle.cpp ModelLoader.h ModelLoader.cpp FanMesh.h ExitingParticle.h DPCDemo.cpp DeviceQuerier.h DeviceQuerier.cpp -Idevcloud-dep/include -std=c++17 -fintelfpga -Xshardware
Out of memory in module quartus_sh (1023 megabytes used).
...
dpcpp: error: fpga compiler command failed with exit code 1 (use -v to see invocation)
$

Sample DevCloud Output (CPU)

See the following files:

Sample DevCloud Output (GPU)

See the following files:

Building

Because DPCDemo relies on locally-installed technologies, there's no release -- you'll need to build DPCDemo from source using the instructions below.

Build Locally (Windows, Visual Studio Community 2019)

  1. Install the Intel oneAPI DPC++/C++ compiler
  2. Get 'vcpkg' to install dependent libraries
    • git clone https://github.com/microsoft/vcpkg.git
    • cd vcpkg
    • bootstrap-vcpkg.bat
  3. Install dependent libraries using 'vcpkg' and integrate them into Visual Studio
    • vcpkg install glew:x64-windows glfw3:x64-windows glm:x64-windows imgui:x64-windows libigl[imgui]:x64-windows magic-enum:x64-windows stb:x64-windows argparse:x64-windows
    • vcpkg integrate install
  4. Download this repository
    • git clone https://github.com/GuMiner/DPC-experiments.git
  5. Open in Visual Studio, build, and run!
    • Edit SimConstants.h to change any settings as desired.

Building in DevCloud

Setup

  1. ssh devcloud
  2. git clone https://github.com/GuMiner/DPC-experiments
  3. cd DPC-experiments/DPCDemo
  4. nano SimConstants.h and set ENABLE_GUI to 0

Queue build

  1. qsub -d . devcloud-build.sh
  • If this is running into problems (for instance, if 'a.out' isn't generated), locally run devcloud-build.sh or make all
  1. watch -n 1 qstat -n -1
  • This will show the status of the build job, if running.

Inspiration

This application was inspired by the The Great Cross Architecture Challenge.

Results

For more information on these results and what they mean, see https://devmesh.intel.com/projects/fan-efficiency-particle-simulation

Because randomness in this program is seeded, see either the CPU or GPU results in the devcloud-gpu-cpu-output folder.

For a direct link to the CPU results, use the links below:

dpc-experiments's People

Contributors

guminer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.