gpudigital lab for english partners

18
Scientific Simulation Platform created using a kernel for parallel computations with Microsoft DirectCompute. Gubanov Oleg Igorevich (CEO Omenart Technology) GPUDIGITALLAB

Upload: oleg-gubanov

Post on 11-Feb-2017

230 views

Category:

Science


1 download

TRANSCRIPT

gpudigitalLab

Scientific Simulation Platform created using a kernel for parallel computations with Microsoft DirectCompute.Gubanov Oleg Igorevich(CEO Omenart Technology)gpudigitalLab

Project HistoryI started experimenting with 3D graphics technologies since 2005. During my second year at Aberystwyth University I had my first exposure to 3D graphics technologies.I have spent my industrial year at Microsoft Reading working on a game engine prototype that would later be a part of Microsoft DirectX Engine in Windows 8.My final year project was a 3D Engine prototype Imagine3D a simulation system where you can create 3D cartoons by loading graphics from a 3D package and then program the animation scenario using a scripting language

GPUDigitallab cONCEPTAt the heart of the simulation system there is a computational kernel. Using the kernel we can perform calculations on compute shader technology.The complex task can be split into a set of independent processes called computational agents.The agent management framework controls the behavior of every agent created and updates the final outcome of the computations.The result of the computations can be used to program the 3D animation of a graphics model. On startup the kernel loads up the rendering ray-tracer and render to texture modules in order to visualize the process of 3D animation

Kernel structure

Diagram dESCRIPTIONMain Kernel primary start point of the engine. Launches the subsystem modules and processes eventsAlgorithm Executor module to execute computations using compute shaders with installed data setComputational Agent Framework system to split the complex task into a set of smaller algorithms and collect the outcomesConnected Application Manager module to interchange with system utilities based on the application protocolRaytracing Engine module to produce the video image of the mathematical model simulationMathematical model engine module to load mathematical concepts from the knowledge database.

SIMPLE COMPUTATIONAL ALGORITHM IMPLEMENTATION

How to use gpudIGITALlab for computationsOpen the cloud server www.gpudigitallab.com

Launch the application

Set the initial parameters

Select the application to use

Process the results of the computations

MATHEMATICAL MODEL Establishment and simulationConnect to the data processing engineInstall the initial dataset from excel file or MS SQL Server Database

Open the Graphics Framework

Load up the 3D Model Project

Analyze data and compute the system of equations. Save mathematical modelProgram the animation of the graphics object using the mathematical model. Start the simulation.

How to simulate an environmentEXAMPLE: Solat System SimulationLaunch Graphics EnvironmentLaunch Physics EngineLoad 3D Models of the Solar SystemConnect to the DatabaseDownload Data and Compute the mathematical Model.Create a new simulation objectSet Graphics Set Mathematical Model And Created Data.

Planned software utilities for 2017-2018Image Processing EngineVoxelization EngineFluid Dynamics EngineChemical Reactions Simulation EngineBiological Processes Simulation EnginePower Plant SimulatorFactory SimulatorCar Race Simulator.

Scientific simulation data-centre projectAn institution building consisting of 2 separate blockThe 1-st block is the server room where we would install our clusters as well as cooling mechanism for the servers.The 2-nd block is the visualization room where we would like to install plasma panels to output the results of the scientific experiments that can be manipulated using Kinect Sensors

Server block

Visualization block

Hardware requirementsServerModel: GPX XT10-2260-6GPUCPU: 2 x Six-Core Intel Xeon Processor E5-2630 v2 2.60GHz 15MB Cache (80W)RAM: 8 x 4GB PC3-14900 1866MHz DDR3 ECC Registered DIMMHDD: 250GB SATA 6.0Gb/s 7200RPM - 2.5" - Seagate Constellation.24 x 800GB Micron M500DC 2.5" SATA 6.0Gb/s Solid State Drive2 x 1.6TB Intel DC S3500 Series 2.5" SATA 6.0Gb/s Solid State Drive2 x 800GB Intel DC S3700 Series 2.5" SATA 6.0Gb/s Solid State DriveGPU: NVIDIA Tesla K40M GPU Computing Accelerator - 12GB GDDR5 - 2880 CUDA CoresNetwork Card: Intel 10-Gigabit Ethernet Converged Network Adapter X540-T1 (1x RJ-45)UPS: APC Smart-UPS 1000VA LCD 120V - 2U RackmountOperating System: Microsoft Windows Server 2012

Software requirementsMicrosoft Visual Studio 2015 Ultimate Microsoft Windows Server 2012 Data-Centre Edition Microsoft Direct3D 11 Microsoft DirectCompute Microsoft SQL Server 2014 Microsoft Direct2D Microsoft Media FoundationNVIDIA PhysXNVIDIA OptiXOpenCV

OUR CURRENT INVESTOR PURPOSALEstimated Technology Value 15 000 000$Our Current Needs 3 000 000$ during 5 years1 year 600 0000$2 year 800 000$3 year 800 000$4 year 800 000$Sales Forecast Scientific Cloud Services 50 000$ (per month)Simulation Projects 50 000$ (4 per year)3D Graphics Simulators 12 000$ (1 per moths)Total per year = 600 000 + 200 000 + 144 000 = 944 000$Total per 3 years = 944 000 * 3 = 2 832 000$Break Even Point 3 years

DIRECTCOMPUTE fluid simulation

WELCOME TO THE FUTURE OF HPC

#include "DirectInputManagementlClass.h"

DirectInputManagementlClass::DirectInputManagementlClass(){mdinputmanager = 0;keyboardDevice = 0;mouseDevice = 0;}

DirectInputManagementlClass::DirectInputManagementlClass(const DirectInputManagementlClass&){

}

DirectInputManagementlClass::~DirectInputManagementlClass(){}

bool DirectInputManagementlClass::Initialize(HINSTANCE hinstance, HWND hwnd, int screenWidth, int screenHeight){bool result = false;

HRESULT hr = S_OK;m_screenHeight = screenHeight;m_screenWidth = screenWidth;

m_mouseX = 0;m_mouseY = 0;

hr = DirectInput8Create(hinstance, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&mdinputmanager, NULL);

if (SUCCEEDED(hr)){MessageBoxA(hwnd, (LPCSTR)" ", (LPCSTR)"Message", 0);}

if (FAILED(hr)){MessageBoxA(hwnd, (LPCSTR)" ", (LPCSTR)"Message", 0);return result;}

hr = mdinputmanager->CreateDevice(GUID_SysKeyboard, &keyboardDevice, NULL);

if (SUCCEEDED(hr)){MessageBoxA(hwnd, (LPCSTR)" ", (LPCSTR)"Message", 0);}

if (FAILED(hr)){MessageBoxA(hwnd, (LPCSTR)" ", (LPCSTR)"Message", 0);return result;}

hr = keyboardDevice->SetDataFormat(&c_dfDIKeyboard);

if (FAILED(hr)){MessageBoxA(hwnd, (LPCSTR)" ", (LPCSTR)"Message", 0);return result;}

if (SUCCEEDED(hr)){MessageBoxA(hwnd, (LPCSTR)" ", (LPCSTR)"Message", 0);}

hr = keyboardDevice->SetCooperativeLevel(hwnd, DISCL_FOREGROUND | DISCL_EXCLUSIVE);

if (FAILED(hr)){return result;}

hr = keyboardDevice->Acquire();

if (SUCCEEDED(hr)){MessageBoxA(hwnd, (LPCSTR)" ", (LPCSTR)"Message", 0);}

if (FAILED(hr)){

MessageBoxA(hwnd, (LPCSTR)" ", (LPCSTR)"Message", 0);}

hr = mdinputmanager->CreateDevice(GUID_SysMouse, &mouseDevice, NULL);

if (SUCCEEDED(hr)){MessageBoxA(hwnd, (LPCSTR)" ", (LPCSTR)"Message", 0);}

if (FAILED(hr)){MessageBoxA(hwnd, (LPCSTR)" ", (LPCSTR)"Message", 0);return result;}

hr = mouseDevice->SetDataFormat(&c_dfDIMouse);

if (FAILED(hr)){return false;}

hr = mouseDevice->SetCooperativeLevel(hwnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE);

if (FAILED(hr)){return false;}

return true;

}

void DirectInputManagementlClass::Shutdown(){if (mouseDevice){mouseDevice->Unacquire();mouseDevice->Release();mouseDevice = 0;}

if (keyboardDevice){keyboardDevice->Unacquire();keyboardDevice->Release();keyboardDevice = 0;}

if (mdinputmanager){mdinputmanager->Release();mdinputmanager = 0;}}

unsigned char DirectInputManagementlClass::GetFrame(){unsigned char result;result = ReadKeyboard();

if (!result){return false;}unsigned char mouseState;mouseState = ReadMouse();

if (!result){return false;}

ProcessInput();

return result, mouseState;}

unsigned char DirectInputManagementlClass::ReadKeyboard(){HRESULT result;

result = keyboardDevice->GetDeviceState(sizeof(m_keyboardState), (LPVOID)&m_keyboardState);

if (FAILED(result)){if ((result == DIERR_INPUTLOST) || (result == DIERR_NOTACQUIRED)){keyboardDevice->Acquire();}else{return (unsigned char)"error";}}return (unsigned char)m_keyboardState;}

unsigned char DirectInputManagementlClass::ReadMouse(){HRESULT result;

result = mouseDevice->GetDeviceState(sizeof(DIMOUSESTATE), (LPVOID)&mouseState);

if (FAILED(result)){if ((result == DIERR_INPUTLOST) || (result == DIERR_NOTACQUIRED)){mouseDevice->Acquire();}else{MessageBoxA(NULL, (LPCSTR)" ", (LPCSTR)"Message", 0);}}

return (unsigned char)mouseState.rgbButtons;}

void DirectInputManagementlClass::ProcessInput(){m_mouseX += mouseState.lX;m_mouseY += mouseState.lY;

if (m_mouseX < 0){m_mouseX = 0; }if (m_mouseY < 0){m_mouseY = 0; }

if (m_mouseX > m_screenWidth){m_mouseX = m_screenWidth;}

if (m_mouseY > m_screenHeight){m_mouseY = m_screenHeight;}}

void DirectInputManagementlClass::GetMouseLocation(int x, int y){x = m_mouseX;y = m_mouseY;}

bool DirectInputManagementlClass::IsEscapePressed(){if (m_keyboardState[DIK_LEFT] & 0x80){return true;}

return false;}

bool DirectInputManagementlClass::IsLeftPressed(){// Do a bitwise and on the keyboard state to check if the key is currently being pressed.if(m_keyboardState[DIK_LEFT] & 0x80){return true;}

return false;}

bool DirectInputManagementlClass::IsRightPressed(){// Do a bitwise and on the keyboard state to check if the key is currently being pressed.if(m_keyboardState[DIK_RIGHT] & 0x80){return true;}

return false;}

bool DirectInputManagementlClass::IsUpPressed(){// Do a bitwise and on the keyboard state to check if the key is currently being pressed.if(m_keyboardState[DIK_UP] & 0x80){return true;}

return false;}

bool DirectInputManagementlClass::IsDownPressed(){// Do a bitwise and on the keyboard state to check if the key is currently being pressed.if(m_keyboardState[DIK_DOWN] & 0x80){return true;}

return false;}

bool DirectInputManagementlClass::IsAPressed(){// Do a bitwise and on the keyboard state to check if the key is currently being pressed.if(m_keyboardState[DIK_A] & 0x80){return true;}

return false;}

bool DirectInputManagementlClass::IsZPressed(){// Do a bitwise and on the keyboard state to check if the key is currently being pressed.if(m_keyboardState[DIK_Z] & 0x80){return true;}

return false;}

bool DirectInputManagementlClass::IsPgUpPressed(){// Do a bitwise and on the keyboard state to check if the key is currently being pressed.if(m_keyboardState[DIK_PGUP] & 0x80){return true;}

return false;}

bool DirectInputManagementlClass::IsPgDownPressed(){// Do a bitwise and on the keyboard state to check if the key is currently being pressed.if(m_keyboardState[DIK_PGDN] & 0x80){return true;}

return false;}