Giter Site home page Giter Site logo

arpackpp's People

Contributors

jgraydus avatar jschueller avatar m-reuter avatar pierre-dejoue avatar wo80 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arpackpp's Issues

Valgrind Error from ARrcStdEig::FindEigenvalues

Hello,
When calling ARrcStdEig::FindEigenvalues, Valgrind complains about Conditional jump or move depends on uninitialised value(s) This is caused by HowMny not being initialized prior to the Fortran call.
Even though the value should not be referenced when only eigenvalues are computed, in dseupd.f it is checked before recv,

320 | if ( (howmny .ne. 'A' .and.
     &           howmny .ne. 'P' .and.
     &           howmny .ne. 'S'.and. rvec )
     &                                         ierr = -15

The simplest solution would probably be to either give HowMny a default value, or set it to some value before calling Eupp()

superlu 5.0 should set $BLAS

"install-superlu.sh" says that if $BLAS is not equal to "SYSTEM", then it will resort to locally installed openblas. For people who have done apt-get install libopenblas-dev, maybe it is better to make it clear:
$export BLAS=SYSTEM && ./install-superlu.sh

How to use `ARSymStdEig` in the shift-invert mode?

The problem I'm solving is a truncated SVD, so following an example in the documentation, I'm using ARSymStdEig with ARdsNonSymMatrix in the following way:

    typedef ARdsNonSymMatrix<double, double> ArMatrix;
    ArMatrix ar_matrix(n_rows, n_cols, raw_matrix);

    ARSymStdEig<double, ArMatrix>
      right_eigen_solver(n_cols, n_sing, &ar_matrix, &ArMatrix::MultMtMv);

The issue with this is that my singular values are clustered around 1.0, the first few are actually exactly 1.0, and then they decay very slowly, so I was thinking of using the shift-invert mode to speed up the convergence. Documentation says in that case the method you provide in the constructor should return (A - sigma * I)^(-1) * v instead of A*v, but there is no ready-made method for that in ARdsNonSymMatrix.

Should I inherit from ARdsNonSymMatrix and write my own method that solves a linear system (A - sigma * I) * x = v within itself? What are the arguments, and how do I know the value of sigma?

Thanks!

Is it possible to use `gemv` from BLAS directly on `ARdsNonSymMatrix`?

Hi, I wonder if it's possible to perform this operation:

w = alpha * matrix * v;

where matrix is of type ARdsNonSymMatrix, v and w are vectors, and alpha is a double?

There is matrix.MultMv, which does exactly that but without alpha multiplication. There's also a gemv function (it is used internally in matrix.MultMv) which could do that but the problem is A member is protected in the ARdsNonSymMatrix class.

Thank you!

Error when compile with gcc 5.4

Hello

After successfully configuring with cmake ../,
The following errors occur during the compilation step

/usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.a(write.o): In function write_float': (.text.write_float+0xb2): undefined reference tosignbitq'
/usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.a(write.o): In function write_float': (.text.write_float+0xbf): undefined reference tofiniteq'
/usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.a(write.o): In function write_float': (.text.write_float+0x133): undefined reference toquadmath_snprintf'
/usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.a(write.o): In function write_float': (.text.write_float+0x254): undefined reference tofiniteq'
/usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.a(write.o): In function write_float': (.text.write_float+0xaff): undefined reference toisnanq'
/usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.a(write.o): In function write_float': (.text.write_float+0xb83): undefined reference toquadmath_snprintf'
/usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.a(write.o): In function write_float': (.text.write_float+0xf7d): undefined reference toquadmath_snprintf'
/usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.a(write.o): In function write_float': (.text.write_float+0x10d8): undefined reference toquadmath_snprintf'

I'm using ubuntu 16.04 with gcc 5.4.
I think the -lquadmath should be added to the link flags.

Duplicate symbols when linking two objects including arsnsym.h

Hello,
When linking two different objects both including some arpackpp headers, I get symbol duplicate errors (see below). It seems that some global variables or members are declared in these headers without the "extern" keyword. This is problematic when the user is designing a library on top of arpackpp with implementations in different files than the headers. Or am I getting confused somewhere?

`g++ -undefined dynamic_lookup -o spectrum.out spectrum.o ../cfg/readConfig.o -L/Users/atantet/PhD/dev/lib/ -lgsl -lconfig++ -lergopack

duplicate symbol ArpackError::Set(ArpackError::ErrorCode, std::basic_string<char, std::char_traits, std::allocator > const&) in:
spectrum.o
/Users/atantet/PhD/dev/lib//libergopack.a(transferSpectrum.o)

duplicate symbol ArpackError::code in:
spectrum.o
/Users/atantet/PhD/dev/lib//libergopack.a(transferSpectrum.o)

duplicate symbol MemoryOverflow() in:
spectrum.o
/Users/atantet/PhD/dev/lib//libergopack.a(transferSpectrum.o)

duplicate symbol debug in:
spectrum.o
/Users/atantet/PhD/dev/lib//libergopack.a(transferSpectrum.o)

ld: 4 duplicate symbols for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [spectrum.out] Error 1
`

Error with multiple threads

Hello,
When i tried to solve several eigen value problems in prallel, i met an error:

Arpack error in Aupp.
-> Maximum number of iterations taken.

Basically, i used "for" loop with openMP for parallelizing in multiple threads. I can't find any description about whether arpackpp is thread-safe or not.

All the best

Installing with dynamic gfortran library

It looks like arpackpp has not been terribly active recently but I am wondering if you would be able to address a small issue we have encountered trying to install arpackpp on our compute cluster at the University of Chicago.

We use Scientific Linux 7. I have all the dependencies installed. However, the cmake step fails because it is unable to find a static gfortran library; on our system, we only have dynamic gfortran libraries installed:

$ ls -1 /lib64/libgfortran*
/lib64/libgfortran.so.1
/lib64/libgfortran.so.1.0.0
/lib64/libgfortran.so.3
/lib64/libgfortran.so.3.0.0

Indeed, there is a note in the CMakeLists.txt file that the static gfortran library is preferred. Is it possible to revise the cmake procedure to check for availability of libgfortran.so as well? Or is there a reason why this is discouraged? I think some Linux setups by default will not have the static libraries installed, and this will make it more difficult to install arpackpp on these systems.

Wrong method signatures

I think some of the method signatures for calling the SuperLU routines are wrong. Please take a look at my commit: wo80@2635daa

I'll create a pull request, if you confirm.

Posible memory leak?

Hi
When I compute eigenvalues with ARluSymGenEig a few times, the memory required is only increase.

In this program
I call that function with diferent values of hsim_val, ms_val, mv_val. (the irow is equal in these 3 matrix)
I call it 10 times, and the required memory in every call increase the total memory required ( and when the matrix is big, requires 1.5 GB in each call)

void eigen(int n, int nz, std::vector<double> &exp_val, std::vector<double> &evec){
  ARumSymMatrix<double> A(n, nz, hsim_val, irow, pcol, 'U');
  ARumSymMatrix<double> B(n, nz, ms_val, irow, pcol, 'U');
  ARumSymMatrix<double> C(n, nz, mv_val, irow, pcol, 'U');
  ARluSymGenEig<double> dprob('C', NEV, A, B, -10, "SA");

  dprob.FindEigenvectors();
  evec.resize(NEV);
  double *Ax = new double[n * NEV];
  for (int i=0; i<NEV; i++) {
    evec[i] = dprob.Eigenvalue(i);
    C.MultMv(dprob.RawEigenvector(i), &Ax[n * i]);
  }
  double *Rx = new double[NEV];
  for(int i=0 ; i<NEV ; i++){
      Rx[i] = 0;
      for(int o=0 ; o<n ; o++){
        Rx[i] +=  dprob.RawEigenvector(i)[o] * Ax[o + n * i];
      }
  }

  delete[] Ax;
  exp_val.resize(NEV);
  for(int i=0 ; i<NEV ; i++){
    exp_val[i] = Rx[i];
  }
  delete[] Rx;
}

Wrong eigenvalues with UMFpack

Hi,

I am using arpackpp to solve a generalized eigenvalue for symmetric sparse matrices. However, I noticed I get negative eigenvalues for a symmetric positive semi-definite matrix. When I replace the call with SuperLU instead of UMFpack then I get correct values. Any one noticed this problem?

I don't mind using SuperLU but I am calling my program within MPI. And I get memory mapping error and segfault when I use SuperLU within MPI. (I am using the serial SuperLU version as provided in the library. I just need to call it within in my MPI program which uses MPI just to divide the data into pieces. I am not using SuperLU-dist). If I don't use MPI, SuperLU works fine.

The UMFPack works within my MPI program without any segfault but gives negative eigenvalues.

I would greatly appreciate any help.

Thanks,
Manu

Question about the arpackpp

Dear Doctor Martin Reuter,

I am guobiao Yao and following your github for a period of time. Because I am doing my research on line feature matching by using the libraries of arpackpp. So I need install the arpackpp in my computer with Window10 64bit. So is it feasible if I want intall the arpackpp in my compuer?
Thanks for your help.
Looking forward to your reply.
Guobiao Yao in OSU PCVLAB

Integer overflow

Hello,

i recently found a problem in the arpackpp library when trying to compute eigenvalues of very large matrices. This is caused by an integer overflow in the Prepare function in the arrseig.h header when memory gets allocated by V=new ARTYPE[n*ncv+1] because n*ncv exceeds the maximum integer value (for example for n=4000000 and ncv=601).
It is sufficient to change the datatype of n, ncv, etc from int unsigned long in the arrseig.h header or might there occur further problems in other header files or in the Fortran routines?

Also sometimes the calculations get stuck at some iteration when choosing the dimensions such that the integer overflow problem does not occur. Might this also be caused by a bug of the library or might it be caused by the algorithm used?

It would be nice if somebody could help me out with these problems.

Best regards
IdontKehr

Plans to make a release?

The last release was in 2015. Then there were many commits in 2019.

Maybe it makes sense to make a release?

Generalised eigenvalue problem with shift-inverse mode using UMFPACK

Hello

Thank you for keeping the repository up - I profit a lot from the code available here.

When trying to solve generalized eigenvalue problem with shift-inverse mode I saw that the example using UMFPACK:

/arpackpp/examples/umfpack/nonsym/unsymgsc.cc

does not compile. In fact it is commented out in the CMakeLists.txt. However the coresponding SuperLU file:

/arpackpp/examples/superlu/nonsym/lnsymgsc.cc

is compiled and the example works. Is the umfpack not meant to be used for this kind of problem or was is just not implemented yet?

Yours
Artur

compiling on windows

Hi,

Is there any way to compile arpackpp into a Windows DLL? My goal is to P/Invoke this in C#.

Cheers,
Raphael

Error while using ARNonSymStdEig

Hi I'm Leonardo,

I'm writing a project using arpack++ to find the eigenvector and eigenvalue of an Laplacian matrix.

https://en.wikipedia.org/wiki/Laplacian_matrix

I standardized the matrix in order to have a symmetric matrix (L_sym) and use it in the ARmStrong class.
And everything works.

Then, for different reason, I had to take the same matrix and written it in the form of a real non symmetric matrix (L_rw). In this case I used the ARSymStdEig class. And on the same input the program, on several runs, give me as result right and wrong in a randomly way.

My first reaction was to think that my program was poorly written and then I went to see how the example nsymreg works. And I noticed that changing the number of the request eigenvalue or the tolerance or the mcv the result change. i.e. the order of the eigenvalue are wrong or they are completely different.

I really don't know what to do.

ps: sorry for my english

Access Violation exception

I was kind of surprised, while debugging a (somewhat random) access violation exception with Visual Studio, to see the following code in arlnsmat.h, FactorAsI:

SuperMatrix AsI;
 
// ...
 
irowi = new int[nnz+this->n];
pcoli = new int[this->n+1];
asi   = new ARTYPE[nnz+this->n];
 
// ...
 
Create_CompCol_Matrix(&AsI, this->n,  this->n, nnz, asi, irowi, pcoli, SLU_NC, SLU_GE);
 
// ...
 
Destroy_CompCol_Matrix(&AsI);

The SuperLU function Destroy_CompCol_Matrix will call free, which is probably causing the exception, see https://isocpp.org/wiki/faq/freestore-mgmt#mixing-malloc-and-delete.

I think, the best way to solve this, would be to add malloc for the different datatypes to superluc.h.

I haven't looked, but there might be other places with similar issues.

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.