Re: [petsc-users] ScaLAPACK EPS error
I tried your example with both real and complex arithmetic, with version 3.20. I did not finish the computation, but I can confirm that the EPSSetUp() phase completes without errors. There is a fix that was made in PETSc around version 3.17, it may affect you if you don't have it: https://gitlab.com/petsc/petsc/-/merge_requests/5441 I would suggest upgrading to the latest version. Jose > El 19 ene 2024, a las 10:35, Peder Jørgensgaard Olesen > escribió: > > The attached code reproduces the error on my system. > > Best, > PederFra: Peder Jørgensgaard Olesen > Sendt: 18. januar 2024 21:06 > Til: Jose E. Roman > Cc: petsc-users@mcs.anl.gov > Emne: Sv: [petsc-users] ScaLAPACK EPS error > I set up the matrix using MatCreateDense(), passing PETSC_DECIDE for the > local dimensions. > > The same error appears with 8, 12, and 16 nodes (32 proc/node). > > I'll have to get back to you regarding a minimal example. > > Best, > PederFra: Jose E. Roman > Sendt: 18. januar 2024 19:28 > Til: Peder Jørgensgaard Olesen > Cc: petsc-users@mcs.anl.gov > Emne: Re: [petsc-users] ScaLAPACK EPS error > How are you setting up your input matrix? Are you giving the local sizes or > setting them to PETSC_DECIDE? > Do you get the same error for different number of MPI processes? > Can you send a small code reproducing the error? > > Jose > > > > El 18 ene 2024, a las 18:59, Peder Jørgensgaard Olesen via petsc-users > > escribió: > > > > Hello, > > > > I need to determine the full set of eigenpairs to a rather large (N=16,000) > > dense Hermitian matrix. I've managed to do this using SLEPc's standard > > Krylov-Schur EPS, but I think it could be done more efficiently using > > ScaLAPACK. I receive the following error when attempting this. As I > > understand it, descinit is used to initialize an array, and the variable in > > question designates the leading dimension of the array, for which it seems > > an illegal value is somehow passed. > > > > I know ScaLAPACK is an external package, but it seems as if the error would > > be in the call from SLEPc. Any ideas as to what could cause this? > > > > Thanks, > > Peder > > > > Error message (excerpt): > > > > PETSC ERROR: #1 MatConvert_Dense_ScaLAPACK() at [...]/matscalapack.c:1032 > > PETSC ERROR: #2 MatConvert at [...]/matrix.c:4250 > > PETSC ERROR: #3 EPSSetUp_ScaLAPACK() at [...]/scalapack.c:47 > > PETSC ERROR: #4 EPSSetUp() at [...]/epssetup.c:323 > > PETSC ERROR: #5 EPSSolve at [...]/epssolve.c:134 > > PETSC ERROR: -- Error message -- > > PETSC ERROR: Error in external library > > PETSC ERROR: Error in ScaLAPACK subroutine descinit: info=-9 > > (...) > > > > Log file (excerpt): > > { 357,0}: On entry to DESCINIT parameter number 9 had an illegal > > value > > [and a few hundred lines similar to this] > > >
Re: [petsc-users] ScaLAPACK EPS error
The attached code reproduces the error on my system. Best, Peder Fra: Peder Jørgensgaard Olesen Sendt: 18. januar 2024 21:06 Til: Jose E. Roman Cc: petsc-users@mcs.anl.gov Emne: Sv: [petsc-users] ScaLAPACK EPS error I set up the matrix using MatCreateDense(), passing PETSC_DECIDE for the local dimensions. The same error appears with 8, 12, and 16 nodes (32 proc/node). I'll have to get back to you regarding a minimal example. Best, Peder Fra: Jose E. Roman Sendt: 18. januar 2024 19:28 Til: Peder Jørgensgaard Olesen Cc: petsc-users@mcs.anl.gov Emne: Re: [petsc-users] ScaLAPACK EPS error How are you setting up your input matrix? Are you giving the local sizes or setting them to PETSC_DECIDE? Do you get the same error for different number of MPI processes? Can you send a small code reproducing the error? Jose > El 18 ene 2024, a las 18:59, Peder Jørgensgaard Olesen via petsc-users > escribió: > > Hello, > > I need to determine the full set of eigenpairs to a rather large (N=16,000) > dense Hermitian matrix. I've managed to do this using SLEPc's standard > Krylov-Schur EPS, but I think it could be done more efficiently using > ScaLAPACK. I receive the following error when attempting this. As I > understand it, descinit is used to initialize an array, and the variable in > question designates the leading dimension of the array, for which it seems an > illegal value is somehow passed. > > I know ScaLAPACK is an external package, but it seems as if the error would > be in the call from SLEPc. Any ideas as to what could cause this? > > Thanks, > Peder > > Error message (excerpt): > > PETSC ERROR: #1 MatConvert_Dense_ScaLAPACK() at [...]/matscalapack.c:1032 > PETSC ERROR: #2 MatConvert at [...]/matrix.c:4250 > PETSC ERROR: #3 EPSSetUp_ScaLAPACK() at [...]/scalapack.c:47 > PETSC ERROR: #4 EPSSetUp() at [...]/epssetup.c:323 > PETSC ERROR: #5 EPSSolve at [...]/epssolve.c:134 > PETSC ERROR: -- Error message -- > PETSC ERROR: Error in external library > PETSC ERROR: Error in ScaLAPACK subroutine descinit: info=-9 > (...) > > Log file (excerpt): > { 357,0}: On entry to DESCINIT parameter number 9 had an illegal value > [and a few hundred lines similar to this] #include #include #include // Minimal example for EPS using ScaLAPACK int main(int argc, char** argv){ PetscInt N = 16000, nconv, i; Mat mat; EPS eps; PetscScalar eval_r; PetscCall(SlepcInitialize(, , NULL, NULL)); // Generate random matrix PetscCall(MatCreateDense(PETSC_COMM_WORLD, PETSC_DECIDE, PETSC_DECIDE, N, N, NULL, )); PetscCall(MatSetRandom(mat, NULL)); // Set up and run EPS PetscCall(EPSCreate(PETSC_COMM_WORLD, )); PetscCall(EPSSetOperators(eps, mat, NULL)); PetscCall(EPSSetType(eps, EPSSCALAPACK)); PetscCall(EPSSetProblemType(eps, EPS_HEP)); PetscCall(EPSSetWhichEigenpairs(eps, EPS_ALL)); PetscCall(EPSSolve(eps)); PetscCall(EPSGetConverged(eps, )); PetscCall(PetscPrintf(PETSC_COMM_WORLD, "%d eigenpairs converged\n", nconv)); PetscCall(MatDestroy()); // Report a few eigenvalues for (i = 0; i < 5; i++){ PetscCall(EPSGetEigenvalue(eps, i, _r, NULL)); PetscCall(PetscPrintf(PETSC_COMM_WORLD, "lamda_%d = %e + %ei\n", i, eval_r)); } PetscCall(EPSDestroy()); PetscCall(SlepcFinalize()); return(0); }
Re: [petsc-users] ScaLAPACK EPS error
It appears my setup doesn't allow me to use versions > 3.17.4, unfortunately (I believe I'll need to speak to admin for this). Best, Peder Fra: Barry Smith Sendt: 18. januar 2024 19:29 Til: Peder Jørgensgaard Olesen Cc: petsc-users@mcs.anl.gov Emne: Re: [petsc-users] ScaLAPACK EPS error Looks like you are using an older version of PETSc. Could you please switch to the latest and try again and send same information if that also fails. Barry On Jan 18, 2024, at 12:59 PM, Peder Jørgensgaard Olesen via petsc-users wrote: Hello, I need to determine the full set of eigenpairs to a rather large (N=16,000) dense Hermitian matrix. I've managed to do this using SLEPc's standard Krylov-Schur EPS, but I think it could be done more efficiently using ScaLAPACK. I receive the following error when attempting this. As I understand it, descinit is used to initialize an array, and the variable in question designates the leading dimension of the array, for which it seems an illegal value is somehow passed. I know ScaLAPACK is an external package, but it seems as if the error would be in the call from SLEPc. Any ideas as to what could cause this? Thanks, Peder Error message (excerpt): PETSC ERROR: #1 MatConvert_Dense_ScaLAPACK() at [...]/matscalapack.c:1032 PETSC ERROR: #2 MatConvert at [...]/matrix.c:4250 PETSC ERROR: #3 EPSSetUp_ScaLAPACK() at [...]/scalapack.c:47 PETSC ERROR: #4 EPSSetUp() at [...]/epssetup.c:323 PETSC ERROR: #5 EPSSolve at [...]/epssolve.c:134 PETSC ERROR: -- Error message -- PETSC ERROR: Error in external library PETSC ERROR: Error in ScaLAPACK subroutine descinit: info=-9 (...) Log file (excerpt): { 357,0}: On entry to DESCINIT parameter number 9 had an illegal value [and a few hundred lines similar to this]
Re: [petsc-users] ScaLAPACK EPS error
I set up the matrix using MatCreateDense(), passing PETSC_DECIDE for the local dimensions. The same error appears with 8, 12, and 16 nodes (32 proc/node). I'll have to get back to you regarding a minimal example. Best, Peder Fra: Jose E. Roman Sendt: 18. januar 2024 19:28 Til: Peder Jørgensgaard Olesen Cc: petsc-users@mcs.anl.gov Emne: Re: [petsc-users] ScaLAPACK EPS error How are you setting up your input matrix? Are you giving the local sizes or setting them to PETSC_DECIDE? Do you get the same error for different number of MPI processes? Can you send a small code reproducing the error? Jose > El 18 ene 2024, a las 18:59, Peder Jørgensgaard Olesen via petsc-users > escribió: > > Hello, > > I need to determine the full set of eigenpairs to a rather large (N=16,000) > dense Hermitian matrix. I've managed to do this using SLEPc's standard > Krylov-Schur EPS, but I think it could be done more efficiently using > ScaLAPACK. I receive the following error when attempting this. As I > understand it, descinit is used to initialize an array, and the variable in > question designates the leading dimension of the array, for which it seems an > illegal value is somehow passed. > > I know ScaLAPACK is an external package, but it seems as if the error would > be in the call from SLEPc. Any ideas as to what could cause this? > > Thanks, > Peder > > Error message (excerpt): > > PETSC ERROR: #1 MatConvert_Dense_ScaLAPACK() at [...]/matscalapack.c:1032 > PETSC ERROR: #2 MatConvert at [...]/matrix.c:4250 > PETSC ERROR: #3 EPSSetUp_ScaLAPACK() at [...]/scalapack.c:47 > PETSC ERROR: #4 EPSSetUp() at [...]/epssetup.c:323 > PETSC ERROR: #5 EPSSolve at [...]/epssolve.c:134 > PETSC ERROR: -- Error message -- > PETSC ERROR: Error in external library > PETSC ERROR: Error in ScaLAPACK subroutine descinit: info=-9 > (...) > > Log file (excerpt): > { 357,0}: On entry to DESCINIT parameter number 9 had an illegal value > [and a few hundred lines similar to this]
Re: [petsc-users] ScaLAPACK EPS error
Looks like you are using an older version of PETSc. Could you please switch to the latest and try again and send same information if that also fails. Barry > On Jan 18, 2024, at 12:59 PM, Peder Jørgensgaard Olesen via petsc-users > wrote: > > Hello, > > I need to determine the full set of eigenpairs to a rather large (N=16,000) > dense Hermitian matrix. I've managed to do this using SLEPc's standard > Krylov-Schur EPS, but I think it could be done more efficiently using > ScaLAPACK. I receive the following error when attempting this. As I > understand it, descinit is used to initialize an array, and the variable in > question designates the leading dimension of the array, for which it seems an > illegal value is somehow passed. > > I know ScaLAPACK is an external package, but it seems as if the error would > be in the call from SLEPc. Any ideas as to what could cause this? > > Thanks, > Peder > > Error message (excerpt): > > PETSC ERROR: #1 MatConvert_Dense_ScaLAPACK() at [...]/matscalapack.c:1032 > PETSC ERROR: #2 MatConvert at [...]/matrix.c:4250 > PETSC ERROR: #3 EPSSetUp_ScaLAPACK() at [...]/scalapack.c:47 > PETSC ERROR: #4 EPSSetUp() at [...]/epssetup.c:323 > PETSC ERROR: #5 EPSSolve at [...]/epssolve.c:134 > PETSC ERROR: -- Error message -- > PETSC ERROR: Error in external library > PETSC ERROR: Error in ScaLAPACK subroutine descinit: info=-9 > (...) > > Log file (excerpt): > { 357,0}: On entry to DESCINIT parameter number 9 had an illegal value > [and a few hundred lines similar to this]
Re: [petsc-users] ScaLAPACK EPS error
How are you setting up your input matrix? Are you giving the local sizes or setting them to PETSC_DECIDE? Do you get the same error for different number of MPI processes? Can you send a small code reproducing the error? Jose > El 18 ene 2024, a las 18:59, Peder Jørgensgaard Olesen via petsc-users > escribió: > > Hello, > > I need to determine the full set of eigenpairs to a rather large (N=16,000) > dense Hermitian matrix. I've managed to do this using SLEPc's standard > Krylov-Schur EPS, but I think it could be done more efficiently using > ScaLAPACK. I receive the following error when attempting this. As I > understand it, descinit is used to initialize an array, and the variable in > question designates the leading dimension of the array, for which it seems an > illegal value is somehow passed. > > I know ScaLAPACK is an external package, but it seems as if the error would > be in the call from SLEPc. Any ideas as to what could cause this? > > Thanks, > Peder > > Error message (excerpt): > > PETSC ERROR: #1 MatConvert_Dense_ScaLAPACK() at [...]/matscalapack.c:1032 > PETSC ERROR: #2 MatConvert at [...]/matrix.c:4250 > PETSC ERROR: #3 EPSSetUp_ScaLAPACK() at [...]/scalapack.c:47 > PETSC ERROR: #4 EPSSetUp() at [...]/epssetup.c:323 > PETSC ERROR: #5 EPSSolve at [...]/epssolve.c:134 > PETSC ERROR: -- Error message -- > PETSC ERROR: Error in external library > PETSC ERROR: Error in ScaLAPACK subroutine descinit: info=-9 > (...) > > Log file (excerpt): > { 357,0}: On entry to DESCINIT parameter number 9 had an illegal value > [and a few hundred lines similar to this]