Code Monkey home page Code Monkey logo

Comments (5)

xingkungao avatar xingkungao commented on July 28, 2024

hi @gocanal,
I believe that for Matrix Multiplication Complex Double could be well supported without too much change in the algorithm level, since Breeze itself supports Complex Double data type. But I am not quite sure for Inversion, given that currently the inversion is based on LU Decomposition of the original matrix. If you do need to deal with Complex Matrix Inverse and your use case is not so performance critical, I think you can separate the original Complex Matrix into two parts, Real and Imaginary, each alone using a Double Matrix. Then you can deal with Complex Matrix Inverse at a higher level without a single change in the current codebase.

Best regards.
xingkungao

from marlin.

gocanal avatar gocanal commented on July 28, 2024

Hi,
I assume you mean we can do a 2M * 2M double data inversion, where the original matrix is M * M double complex, and the 2M * 2M matrix is:

real              imaginary
-imaginary            real

Am I correct ?

thanks
canal

from marlin.

xingkungao avatar xingkungao commented on July 28, 2024

Hi,
Yes, I mean for a M * M complex matrix (A + iB), consider it's inverse let's say (C + iD), we have
(A+iB)(C+iD) = I, and so

  AC - BD = I    
  AD + BC = 0

So we first get the inverse of 2M * 2M Double matrix

    A     -B            
    B      A     

then multiplies the inverse with the 2M * M matrix:

    I        
    0    

and we get

    C
    D   

which is exactly what we want.

hope it helps!
xingkungao

from marlin.

gocanal avatar gocanal commented on July 28, 2024

Thank you very much for confirming.

I did a quick test, and compared with Scalapack based solution. I am running on one machine, with only 4GB RAM (I3, 3.3GHz, Ubuntu 14.04, 64-bit Java).

For multiplication, Marlin can support up to 5k * 5k. Scalapack can support up to 8k.

For inverse, Marlin can only support up to 2.5k matrix, while Scalapack can still support up to 8k. Beyond 2.5K, marlin hits 'OutOfMemoryError: Java Heap' (the error happened in org.spark_project.protobuf.AbstractMe
ssageLite.toByteArray).

It seems that Marlin (or I should say Hadoop/Spark) consumes a lot more memory ? Or if there is something I did not configure correctly (I set spark.akka.frameSize=1024, executor-memory 2700m).

from marlin.

Myasuka avatar Myasuka commented on July 28, 2024

Sorry for late reply.

Actually, by default, 60% memory of Spark executor process is occupied by Spark BlockManager, and 20% memory of Spark executor process is used during shuffle, these two parts are configured by parameter spark.storage.memoryFraction and spark.shuffle.memoryFraction. Besides, JVM-based program consumes more memory than MPI program in general. I think 2.7GB executor memory is a bit small.

from marlin.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.