Jump to content

David Heffernan

Members
  • Content Count

    3536
  • Joined

  • Last visited

  • Days Won

    175

Posts posted by David Heffernan


  1. 1 minute ago, at3s said:

    I just trying to check if it's possible to find eigenvalues\eigenvectors using Eigen library so fast as libopenblas.dll does.

    I'd be astounded if that was not the case. Eigen has a very good reputation. Certainly for basic matrix arithmetic performance is excellent. And I'd be astonished if it could not match openblas for eigensolves.

     

    1 minute ago, at3s said:

    I am as well.

    Then I don't know why you asked if it was possible to do something that you were already doing.


  2. 14 minutes ago, at3s said:

    I geuss the difference is because LAPACK is based on Fortran math.

    That isn't it. 

     

    14 minutes ago, at3s said:

    And probably one of reason is Fortran is faster in calculations.

    Not true. C++ compilers can perform just as well. 

     

    15 minutes ago, at3s said:

    The other one could be difference in algorythm as well.

    Possible. But I doubt it. I bet you are asking different questions, and not comparing like with like. 

     

    16 minutes ago, at3s said:

    I'm interesting, if it's possible to call a Fortran function within the Delphi code like libopenblas.dll does?

    Quite simple to call libopenblas from delphi. I do just that. 


  3. 1 hour ago, Mike Torrettinni said:

    Aha, but if each type requires different attribute values, each type has to have it's own attribute. That's how I understand your example and documentation, but have no actual experience with attributes, yet.

    Unless all of your enumerated types have the same names, it seems like you'd have to provide names for each type. 


  4. 3 hours ago, at3s said:

    Can you please suggest libraries for the eigenvalues\eigenvectors finding?

    Is it possible to use them in Delphi code?

    ARPACK is recommended for extracting a small number of eigen vectors from a huge problem.

     

    LAPACK has effective methods for extracting all solutions using a direct method. 

     

    Neither are easy to use from Delphi. I have done so but it isn't for the faint of heart. Especially ARPACK. 

     

    The famous C++ Eigen library is very capable though and easy to use. I'd suggest you wrap that in a DLL. 

     

    Start in Matlab to prove that it can do the calculation sufficiently quickly for a typical matrix that you will work with. 

     

    Then write a C++ program in Eigen to solve the same problems. Does that work effectively? 

     

    Then, and only then, try to wrap it up to be called from Delphi. 

    • Like 3
    • Thanks 1

  5. 4 hours ago, Mahdi Safsafi said:

    For the same reason why anybody should think that your comment is constructive

    It wasn't aimed at the OP. It was aimed at all the misleading posters who guessed and speculated. In my opinion it is those posts that are harmful to the OP's chance of progress. 

     

    This topic requires knowledge of numerical methods for solving eigenproblems. Most of the posts have not lived up to that. 


  6. 4 minutes ago, Kas Ob. said:

    Have a look here 

    https://lemire.me/blog/2020/06/26/gcc-not-nearest/

     

    Means even one compiler can generate code and produce different result with different compile settings !

    So yes there is chance that FPC is doing better or worse, as OP asked for thoughts for brainstorming, so i provided some thoughts,

     

    Take as example "floating-point numbers are not associative" (from that article) which not so many knows and might not need to care even, it doesn't matter that much per one value, but in the case of Aberth method it will accumulate and slide far from the right value, and i am not saying associative property is the problem, no, many things can go south.

    Try other compilers isn't going to make any difference here. Other compilers will face the same problems.

     

    I am reasonably confident that the correct way forward is to use the right tool for the job. And root finding of the characteristic polynomial is not the way to find eigenvalues on a finite computer.


  7. 7 hours ago, Mahdi Safsafi said:

    Obviously soon or later, a system paging will work and starts to swap pages from memory to disk. 

    Not obvious at all. Usually you allocated memory because you wanted to use it.

     

    If you've swapped the entire block to disk then bringing a couple of pages back is the least of your worries. Solve your problem by avoiding swapping in the first place.

     

    Nothing you have said, in my view, supports your claim that all allocation of huge blocks should be done using VirtualAlloc.

    • Haha 1
×