How to build and deploy CUDA Example that ships with GridServer(GS) SDK

How to build and deploy CUDA Example that ships with GridServer(GS) SDK

book

Article ID: KB0079381

calendar_today

Updated On:

Products Versions
TIBCO DataSynapse GridServer 7.0.0

Description

The CUDA Example bundled with GridServer SDK needs some modifications before building and deploying it to the grid. Steps listed below were tested with CUDA Example on a Windows 64bit environment using VC9 and CUDA Toolkit 3.0.
 

Issue/Introduction

Steps to build & deploy CUDA Example in a Windows 64bit environment using VC9, CUDA Toolkit 3.0 and GridServer 7.0

Environment

Windows 64bit

Resolution

Listed below are the steps to build, deploy and run the CUDA Example:

1. Download and install Windows GridServer SDK (GridServerSDK-Windows.zip) on a 64bit Windows machine with Visual Studio(VS) 2008

2. Download the NVIDIA CUDA Toolkit 3.0 from https://developer.nvidia.com/cuda-toolkit-30-downloads

3. Install the CUDA Toolkit on the same machine as GridServer SDK

4. Navigate to [SDK_Install_Dir]\examples\service\CUDA folder

5. Edit the build.properties file in this directory and set the cuda.home.* properties to the absolute path where CUDA Toolkit is installed. On Windows, you must use paths without spaces (for example, "Program Files") or the build script will fail.

Below is an example showing modifications in the file:
cuda.home.win32=F:\\CUDA
cuda.home.win32.nvcc=${cuda.home.win32}\\bin64\\nvcc.exe
cuda.home.win32.lib=${cuda.home.win32}\\lib64

6. Edit the win-makefile to reflect the DSUtil and VC versions in use. For example, for VS2008, change DSUtilVC8 to DSUtilVC9 and VC8 to VC9

Below is an example showing modifications in the file:
DSUtilVC9.lib
/LIBPATH:$(DISTDIR)\lib\vc9\x64

7. Edit the grid-library.xml file as shown:

<?xml version="1.0" encoding="UTF-8"?>
<grid-library os="@dsos@">
    <grid-library-name>@gridlib.name@</grid-library-name>
    <grid-library-version>@gridlib.version@</grid-library-version>
    <dependency>
        <grid-library-name>cppbridge-@dsbridgename@</grid-library-name>
    </dependency>
    <lib-path>
        <pathelement>bin</pathelement>
    </lib-path>
    <lib-path compiler="@dscompiler@">
        <pathelement>lib</pathelement>
    </lib-path>
</grid-library>

Note: The values of @dsos@, @dsbridgename@ and @dscompiler@ variables are substituted from env.bat file under [SDK_Install_Dir]\build folder.

8. Edit build-and-deploy.bat file under [SDK_Install_Dir]\examples\service\CUDA folder and add 'call env.bat' right above where it says 'call ant' in this file.

9. Open a Windows Command Prompt(cmd) and navigate to [SDK_Install_Dir]\examples\service\CUDA

10. Run the build-and-deploy.bat file. This should build and deploy the CUDA Example to the desired manager (usually specified in driver.properties files).