The code: https://github.com/enjalot/adventures_in_opencl/tree/master/part2/
From the README:
We demonstrate OpenCL and OpenGL context sharing by making a simple particle system.
Build:
| What exactly is "iowait"? | |
| To summarize it in one sentence, 'iowait' is the percentage | |
| of time the CPU is idle AND there is at least one I/O | |
| in progress. | |
| Each CPU can be in one of four states: user, sys, idle, iowait. | |
| Performance tools such as vmstat, iostat, sar, etc. print | |
| out these four states as a percentage. The sar tool can | |
| print out the states on a per CPU basis (-P flag) but most |
| # -*- coding: utf-8 -*- | |
| # from | |
| # Импортируем все необходимые библиотеки: | |
| from OpenGL.GL import * | |
| from OpenGL.GLU import gluPerspective | |
| from OpenGL.GLUT import * | |
| #import sys | |
| # Из модуля random импортируем одноименную функцию random | |
| from random import random |
The code: https://github.com/enjalot/adventures_in_opencl/tree/master/part2/
From the README:
We demonstrate OpenCL and OpenGL context sharing by making a simple particle system.
Build:
Open Computing Language (OpenCL) is a language and framework for writing computationally intensive kernels that run accross heterogenious platforms, including GPUs, CPUs, and perhaps other more esoteric devices.
Intel provides an OpenCL implementation for Intel CPUs, but there's not a lot of instructions on how to get it set up. Here's what I did.
intel_sdk_for_ocl_applications_2013_xe_sdk_3.0.67279_x64.tgz| #include "TFile.h" | |
| #include "TTree.h" | |
| #include "TH1D.h" | |
| #include <iostream> | |
| void histo2() | |
| { | |
| std::cout << "fetch file\n" ; |
| # list the files in EOS | |
| eos ls [-la] /eos/cms/user/t/test/ | |
| # copy all inside the directory recursively | |
| eos cp -r /eos/cms/user/t/test/histodirectory/ /afs/cern.ch/user/t/test/histodirectory | |
| # copy a single file | |
| eos cp /eos/cms/user/t/test/histo.root /tmp/ | |
| eos cp /eos/cms/store/user/Username/Datadir/Data.root . |
| $ steam | |
| Running Steam on ubuntu 14.04 32-bit | |
| STEAM_RUNTIME is enabled automatically | |
| Installing breakpad exception handler for appid(steam)/version(1416617579) | |
| Installing breakpad exception handler for appid(steam)/version(1416617579) | |
| Installing breakpad exception handler for appid(steam)/version(1416617579) | |
| Gtk-Message: Failed to load module "overlay-scrollbar" | |
| Gtk-Message: Failed to load module "unity-gtk-module" | |
| Gtk-Message: Failed to load module "overlay-scrollbar" | |
| Gtk-Message: Failed to load module "unity-gtk-module" |
| $ steam | |
| Running Steam on ubuntu 14.04 32-bit | |
| STEAM_RUNTIME is enabled automatically | |
| Installing breakpad exception handler for appid(steam)/version(1416617579) | |
| Installing breakpad exception handler for appid(steam)/version(1416617579) | |
| Installing breakpad exception handler for appid(steam)/version(1416617579) | |
| Gtk-Message: Failed to load module "overlay-scrollbar" | |
| Gtk-Message: Failed to load module "unity-gtk-module" | |
| Gtk-Message: Failed to load module "overlay-scrollbar" | |
| Gtk-Message: Failed to load module "unity-gtk-module" |
| $ steam | |
| Running Steam on ubuntu 14.04 32-bit | |
| STEAM_RUNTIME is enabled automatically | |
| Installing breakpad exception handler for appid(steam)/version(1416617579) | |
| Installing breakpad exception handler for appid(steam)/version(1416617579) | |
| Installing breakpad exception handler for appid(steam)/version(1416617579) | |
| Gtk-Message: Failed to load module "overlay-scrollbar" | |
| Gtk-Message: Failed to load module "unity-gtk-module" | |
| Gtk-Message: Failed to load module "overlay-scrollbar" | |
| Gtk-Message: Failed to load module "unity-gtk-module" |