Wednesday, June 17, 2015

Solve Differential Equations with Spark, Part 1

##UPDATE: bugfix

Alright. It's a bit early but I couldnt wait.

1D Laplace, Dirchlet BC, FDM, No weight accelerator, No Parallelism
(See here for the actual problem description)

This is good and all, and I KNOW there are many OpenMPI-EC2 Backend ready for launch at my fingertips, but I am just curious how Spark can do this.

After hours of research, it seems that Spark can do this in 2+ way.

1. Application of Pagerank method:

2. Use or Apply matrix multiplier:
3. For each partition, convert (parted) RDD to array and reference away:
  • Oh well, then why I am struggling with Spark at the first place? Ironically, currently this is the best solution from memory usage perspective. 
    • For 1: x3 for tridiagonal, x5 for pentadiagonal, x7 for..
    • For 2: xC, C is number of clusters..
    • For 3: x2 Maximum. If referenced, even less. (but not likely)
  • But the conversion should take (significant) computing time.

There may be other ways for do this but matrix multiplier code gave me good reason to stop looking.

Other issues such as keep partitioning, repartitioning after every iterations. I will keep looking.

Anyway, after implemented these I will ask for help/comments to Spark User forum.

No comments:

Post a Comment