What's the difference between launching `bsp task' and `gpu bsp task'?
Will gpu bsp task fork and execute c/ c++ process?
It might be good to distinguish how gpu bsp task will be executed,
then deciding how to launch such task.
Basically for launching a bsp task, an external process is created.
The logic to execute BSP.bsp() is at
BSPTask.java
where the method
runBSP()
is called with a BSP implementation class loaded at runtime
Class<?> workClass = job.getConfiguration().getClass("bsp.work.class",
BSP.class);
and then the bsp method is executed
bsp.bsp(bspPeer);
On 23 August 2013 21:45, Martin Illecker <[email protected]> wrote:
> Hi,
>
> I have created a HybridBSP [1] class which should combine the default BSP
> (CPU) class with GPU methods [2].
>
> The abstract HybridBSP class extends the BSP class and adds bspGpu,
> setupGpu and cleanupGpu method.
>
> public abstract class HybridBSP<K1, V1, K2, V2, M extends Writable> extends
> BSP<K1, V1, K2, V2, M> implements BSPGpuInterface<K1, V1, K2, V2, M> {
>
> @Override
> public abstract void bspGpu(BSPPeer<K1, V1, K2, V2, M> peer)
> throws IOException, SyncException, InterruptedException;
>
> @Override
> public void setupGpu(BSPPeer<K1, V1, K2, V2, M> peer) throws IOException,
> SyncException, InterruptedException {
> }
>
> @Override
> public void cleanupGpu(BSPPeer<K1, V1, K2, V2, M> peer) throws IOException {
> }
> }
>
>
> Now I want to add a new scheduling technique which checks the conf property
> (gpuBspTaskNum) and executes the bspGpu instead of default bsp method.
>
> e.g., bspTaskNum=3 and gpuBspTaskNum=1
> The scheduler should run four bsp tasks simultaneously and execute three
> times the bsp method and once the bspGpu. (both defined within one derived
> HybridBSP class)
>
> Do I have to modify the taskrunner or create a new SimpleTaskScheduler?
>
> How can I integrate this into Hama?
>
> Thanks!
>
> Martin
>
> [1]
> https://github.com/millecker/hama/blob/5d0e8b26abd6b63fa5afad09a2ba960bf9922868/core/src/main/java/org/apache/hama/bsp/gpu/HybridBSP.java
> [2]
> https://github.com/millecker/hama/blob/5d0e8b26abd6b63fa5afad09a2ba960bf9922868/core/src/main/java/org/apache/hama/bsp/gpu/BSPGpuInterface.java