User:Arash: Difference between revisions

From ASCEND
Jump to navigation Jump to search
No edit summary
Arash (talk | contribs)
No edit summary
Line 10: Line 10:
* Prepare a large model (preferably 100,000+) and a unit test for verifying and benchmarking the NLA solver using this model.
* Prepare a large model (preferably 100,000+) and a unit test for verifying and benchmarking the NLA solver using this model.
* Develop a CUDA code generator that creates GPU-based bintokens.
* Develop a CUDA code generator that creates GPU-based bintokens.
* Create a new library in ascend (GPU_manager) which is responsible to manage all the GPU related tasks. Including data transfer between host and GPU, launching bintoken CUDA kernels and parallel calculation of the residuals normal (required in line-search algorithm).
* Create a new library in ascend (accelerator_mgr) which is responsible to manage all the GPU related tasks. Including data transfer between host and GPU, launching bintoken CUDA kernels and parallel calculation of the residuals normal (required in line-search algorithm).
* Fork a new NLA solver from current solver: In the new solver when the solver needs to evaluate a block residual or Jacobian, the call is redirected to GPU_manager.  
* Fork a new NLA solver from current solver: In the new solver when the solver needs to evaluate a block residual or Jacobian, the call is redirected to GPU_manager.  
* Wrapping appropriate functionality in ascend solver interface that decouples GPU manager from the solver. (The interface should provide batch residual (and Jacobian) evaluation for group of relations).
* Wrapping appropriate functionality in ascend solver interface that decouples GPU manager from the solver. (The interface should provide batch residual (and Jacobian) evaluation for group of relations).
Line 18: Line 18:


''fill in here''
''fill in here''
== Installation ==
To run BinCUDA objects, host machine of ASCEND should be supplied with a NVIDIA CUDA enabled GPU card, preferably Fermi (or newer) architecture.
The BiCUDAs need the CUDA SDK and developer driver also their Makefile should be linked to the SDK directory:
=== Install CUDA SDK on Linux ===
In the following we will explain a step by step installation method for CUDA Driver/SDK/Samples on a Ubuntu (10.04) 32bit machine. It should be noted that the installation process on other Linux flavors is quiet similar, however, the appropriate file distribution from [[NVIDIA site]] should be replaced with current Ubuntu (10.04) 32bit files.
1) In the terminal window issue
wget http://developer.download.nvidia.com/compute/cuda/3_2_prod/drivers/devdriver_3.2_linux_32_260.19.26.run
chmod +x ./devdriver_3.2_linux_32_260.19.26.run
2) Stop the X Windows by pressing CTRL+ALT+F1 and then issue
sudo /etc/init.d/gdm stop
sudo ./devdriver_3.2_linux_32_260.19.26.run
sudo /etc/init.d/gdm start
3) The X Windows should be restarted with NVIDIA developer driver and now you are be able to install the CUDA 3.2 toolkit and samples(it is recommended to use default directories - i.e. /usr/local/cuda and ~/NVIDIA_GPU_Computing_SDK).
wget http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/cudatoolkit_3.2.16_linux_32_ubuntu10.04.run
chmod +x ./cudatoolkit_3.2.16_linux_32_ubuntu10.04.run
sudo ./cudatoolkit_3.2.16_linux_32_ubuntu10.04.run
wget http://developer.download.nvidia.com/compute/cuda/3_2_prod/sdk/gpucomputingsdk_3.2.16_linux.run
chmod + ./gpucomputingsdk_3.2.16_linux.run
./gpucomputingsdk_3.2.16_linux.run
4) Add /usr/local/cuda/bin to PATH and /user/local/cuda/lib to LD_LIBRARY_PATH:
5) Now you should be able to compile the SDK samples. To test this issue:
cd ~/NVIDIA_GPU_Computing_SDK/C
make
6) The executable binaries for the samples are created in bin/linux/release. For example you should be able to run N-Body simulation example:
=== Set CUDA SDK in Makefile ===


== Test models ==
== Test models ==
Line 53: Line 95:
METHODS
METHODS
END c5_10_demo_column;</source>
END c5_10_demo_column;</source>
== More information ==
More information about the BinCUDAs is provided in the read-me file.


[[Category:GSOC2011]]
[[Category:GSOC2011]]

Revision as of 08:49, 25 May 2011

Arash Sadrieh is working on developing GPU-based solvers for ASCEND. He is a PhD student at Murdoch University in Western Australia.

Development branch: arash:

Goals

  • Make ASCEND to export models(residuals and jacobian) evaluators to bintokens.
    • reinstate bintoken functionality
    • add gradient calculation support to bintoken stuff
  • Prepare a large model (preferably 100,000+) and a unit test for verifying and benchmarking the NLA solver using this model.
  • Develop a CUDA code generator that creates GPU-based bintokens.
  • Create a new library in ascend (accelerator_mgr) which is responsible to manage all the GPU related tasks. Including data transfer between host and GPU, launching bintoken CUDA kernels and parallel calculation of the residuals normal (required in line-search algorithm).
  • Fork a new NLA solver from current solver: In the new solver when the solver needs to evaluate a block residual or Jacobian, the call is redirected to GPU_manager.
  • Wrapping appropriate functionality in ascend solver interface that decouples GPU manager from the solver. (The interface should provide batch residual (and Jacobian) evaluation for group of relations).
  • Benchmark the results and probably switch to other many (or multi) core architectures and languages.

Progress

fill in here

Installation

To run BinCUDA objects, host machine of ASCEND should be supplied with a NVIDIA CUDA enabled GPU card, preferably Fermi (or newer) architecture.

The BiCUDAs need the CUDA SDK and developer driver also their Makefile should be linked to the SDK directory:

Install CUDA SDK on Linux

In the following we will explain a step by step installation method for CUDA Driver/SDK/Samples on a Ubuntu (10.04) 32bit machine. It should be noted that the installation process on other Linux flavors is quiet similar, however, the appropriate file distribution from NVIDIA site should be replaced with current Ubuntu (10.04) 32bit files.

1) In the terminal window issue

wget http://developer.download.nvidia.com/compute/cuda/3_2_prod/drivers/devdriver_3.2_linux_32_260.19.26.run chmod +x ./devdriver_3.2_linux_32_260.19.26.run

2) Stop the X Windows by pressing CTRL+ALT+F1 and then issue

sudo /etc/init.d/gdm stop sudo ./devdriver_3.2_linux_32_260.19.26.run sudo /etc/init.d/gdm start

3) The X Windows should be restarted with NVIDIA developer driver and now you are be able to install the CUDA 3.2 toolkit and samples(it is recommended to use default directories - i.e. /usr/local/cuda and ~/NVIDIA_GPU_Computing_SDK).

wget http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/cudatoolkit_3.2.16_linux_32_ubuntu10.04.run chmod +x ./cudatoolkit_3.2.16_linux_32_ubuntu10.04.run sudo ./cudatoolkit_3.2.16_linux_32_ubuntu10.04.run wget http://developer.download.nvidia.com/compute/cuda/3_2_prod/sdk/gpucomputingsdk_3.2.16_linux.run chmod + ./gpucomputingsdk_3.2.16_linux.run ./gpucomputingsdk_3.2.16_linux.run

4) Add /usr/local/cuda/bin to PATH and /user/local/cuda/lib to LD_LIBRARY_PATH:

5) Now you should be able to compile the SDK samples. To test this issue:

cd ~/NVIDIA_GPU_Computing_SDK/C make

6) The executable binaries for the samples are created in bin/linux/release. For example you should be able to run N-Body simulation example:


Set CUDA SDK in Makefile

Test models

A distillation column model was created to test the GPU-based bintokens, the model was proposed by Ben Allan.


Distillation Column Model

REQUIRE "column.a4l";
MODEL larg_distil() REFINES test_demo_column();
        demo IS_A
        demo_column(['n_butane','n_pentane','n_hexane','n_heptane','n_octane','n_nonane','n_decane'],'n_decane',100,51);
METHODS
END larg_distil;

Number of Equations

The model originally has 128 unique equation symbolic forms and 19959 equation instances.The number of relations in the model can be adjusted by changing two parameters, 100 and 51, by a multiplicative factor. For example,

REQUIRE "column.a4l";
MODEL larg_distil() REFINES test_demo_column();
        demo IS_A
        demo_column(['n_butane','n_pentane','n_hexane','n_heptane','n_octane','n_nonane','n_decane'],'n_decane',500,255);
METHODS
END larg_distil;

Alternatively, multiple columns can be used instead of single column,

REQUIRE "column.a4l";
MODEL c5_10_demo_column() REFINES test_demo_column();
        demo,demo2,demo3,demo4 IS_A
        demo_column(['n_butane','n_pentane','n_hexane','n_heptane','n_octane','n_nonane','n_decane'],'n_decane',100,51);
METHODS
END c5_10_demo_column;

More information

More information about the BinCUDAs is provided in the read-me file.