lyxsus / GVirtuS-1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How To install GVirtuS framework and plugins#

Prerequisites:

GCC, G++

OS: Ubuntu 10.04 (tested) / Ubuntu 12.04 (tested) / Ubuntu 14.04 (tested) /CentOS 6.8 (tested)

CUDA Toolkit: up to Version 9.0

This package are required: build-essential autotools-dev automake git libtool libxmu-dev libxi-dev libgl-dev libosmesa-dev liblog4cplus-dev libzmq-dev

Ubuntu: sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev libosmesa-dev git liblog4cplus-dev libzmq-dev

Installation:

  1. Clone the GVirtuS main repository

    git clone https://github.com/raffmont/GVirtuS.git

In the directory “GVirtuS” there are three directories named “gvirtus”, “gvirtus.cudart” and "gvirtus.cudadr".

“gvirtus” contains the framework.

“gvirtus.cudart” and "gvirtus.cudadr" contains the cuda runtime plugin and the cuda driver plugin.

  1. Launch the installer script indicating the destination folder of the installation (es. "/home/rapid/opt"):

    ./gvirtus-installer "GVIRTUS_PATH"

To check your installation please check the following directories:

Check GVIRTUS_PATH/lib for frontend and backend directories

EXAMPLE cuda application

Backend machine (physical GPU and Cuda required)

On the remote machine where the cuda executables will be executed

Modify the Gvirtus configuration file backend if the default port 9998 is occuped or the machine is remote:

GVIRTUS_PATH/etc/gvirtus.properties

#
# gVirtuS config file
#

#
# Communicator
#   AfUnix: afunix://path:mode
#   Shm: shm://
#   Tcp: tcp://hostname:port
#   VMShm: vmshm://hostname:port

communicator : tcp://127.0.0.1:9998 #change 127.0.0.1 with remote host if necessary
plugins : cudart, cudadr

#
# End Of File
#

Export the dynamic CUDA library:(typically /usr/local/cuda/lib64)

export LD_LIBRARY_PATH=”<CUDA_PATH>/lib64” 

Execute application server gvirtus-backend with follow command:

GVIRTUS_PATH/bin/gvirtus-backend

Frontend machine (No GPU or Cuda required)

Modify the Gvirtus configuration file frontend:

GVIRTUS_PATH/etc/gvirtus.properties

#
# gVirtuS config file
#

#
# Communicator
#   AfUnix: afunix://path:mode
#   Shm: shm://
#   Tcp: tcp://hostname:port
#   VMShm: vmshm://hostname:port

communicator : tcp://127.0.0.1:9998 #change 127.0.0.1 with the host of backend machine if necessary
plugins : cudart, cudadr

#
# End Of File
#

NOTE: In the local configuration GvirtuS Backend and Frontend share the same configuration files.

Export the dynamic GVirtuS library:

export  LD_LIBRARY_PATH=GVIRTUS_PATH/gvirtus/lib/frontend

execute the cuda application compiled with cuda dynamic library (with -lcuda -lcudart)

./example

About

License:Apache License 2.0


Languages

Language:C++ 84.9%Language:C 6.2%Language:Makefile 5.9%Language:M4 1.7%Language:Shell 0.9%Language:Ruby 0.4%