Jose, I have been revisiting the issue of SLEPc/NEP for shell matrices T(lambda) and T'(lambda). I am having problems running SLEPc/NEP with -nep_type nleigs. I have compiled two versions of PETSc/SLEPc: petsc-arch-real / slepc-arch-real ./configure --with-cc=gcc-13 --with-cxx=g++-13 --with-fc=gfortran --COPTFLAGS='-O3 -fopenmp' --CXXOPTFLAGS='-O3 -fopenmp' --FOPTFLAGS='-O3 -fopenmp' --with-debugging=1 --with-logging=1 --with-scalar-type=real --with-precision=double --download-fblaslapack --with-openmp --with-mpi=0 petsc-arch-complex / slepc-arch-complex ./configure --with-cc=gcc-13 --with-cxx=g++-13 --with-fc=gfortran --COPTFLAGS='-O3 -fopenmp' --CXXOPTFLAGS='-O3 -fopenmp' --FOPTFLAGS='-O3 -fopenmp' --with-debugging=1 --with-logging=1 --with-scalar-type=complex --with-precision=double --download-fblaslapack --with-openmp --with-mpi=0 I use gfortran on an Apple Mac Mini M1. Both the PETSc and SLEPc versions are the latest development versions as of today (a6690fd8 and 267bd1cd, respectively). I ran the ex54f90 test cases: % main-arch-real -nep_type slp -nep_slp_ksp_type gmres -nep_slp_pc_type none % main-arch-complex -nep_type slp -nep_slp_ksp_type gmres -nep_slp_pc_type none % main-arch-real -nep_type nleigs -rg_interval_endpoints 0.2,1.1 -nep_nleigs_ksp_type gmres -nep_nleigs_pc_type none % main-arch-complex -nep_type nleigs -rg_interval_endpoints 0.2,1.1,-.1,.1 -nep_nleigs_ksp_type gmres -nep_nleigs_pc_type none Both the slp cases ran as expected and gave the correct answer. However, both the real and complex architectures failed for the nleigs case. For the complex case, none of the callback functions appear to have been called. For the real case, only the MatMult_A routine appears to be called, 100 times and returns each time, sweeping over lambda from 0.2 to 1.1. Any suggestions would be welcome. Best regards, Kenneth Hall On 10/18/23, 9:16 AM, "Jose E. Roman" <[email protected] <mailto:[email protected]>> wrote: By the way, the MATOP_DESTROY stuff produced segmentation fault in some compilers (in gfortran it worked well). The reason was having the callback functions inside CONTAINS, that is why we have removed it and used regular subroutines instead. Jose
El 18 oct 2023, a las 15:11, Kenneth C Hall <[email protected] <mailto:[email protected]>> escribió:
Jose,
Thank you. I have downloaded and will take a look. I will try the new example and then implement in my actual problem. I will keep you posted as to my results.
Thank you and best regards,
Kenneth
From: Jose E. Roman <[email protected] <mailto:[email protected]>>
Sent: Tuesday, October 17, 2023 2:31 PM
To: Kenneth C Hall <[email protected] <mailto:[email protected]>>
Cc: [email protected] <mailto:[email protected]> <[email protected] <mailto:[email protected]>>
Subject: Re: [petsc-users] SLEPc/NEP for shell matrice T(lambda) and T'(lambda)
Kenneth,
I have worked a bit more on your example and put it in SLEPc https://urldefense.com/v3/__https://gitlab.com/slepc/slepc/-/merge_requests/... <https://urldefense.com/v3/__https://gitlab.com/slepc/slepc/-/merge_requests/596__;!!OToaGQ!oSqCpmczx5VDi5025aO5T3WqW-MwGnKUSzxKVkdyXTHo9vuxP4GYnDfMoYxavvWRAA0WdcwX3tiVaiXWT0dh2-o$>
This version also has MATOP_DESTROY to avoid memory leaks.
Thanks.
Jose
El 12 oct 2023, a las 20:59, Kenneth C Hall <[email protected] <mailto:[email protected]>> escribió:
Jose,
Thanks very much for this. I will give it a try and let you know how it works.
Best regards,
Kenneth
From: Jose E. Roman <[email protected] <mailto:[email protected]>>
Date: Thursday, October 12, 2023 at 2:12 PM
To: Kenneth C Hall <[email protected] <mailto:[email protected]>>
Cc: [email protected] <mailto:[email protected]> <[email protected] <mailto:[email protected]>>
Subject: Re: [petsc-users] SLEPc/NEP for shell matrice T(lambda) and T'(lambda)
I am attaching your example modified with the context stuff.
With the PETSc branch that I indicated, now it works with NLEIGS, for instance:
$ ./test_nep -nep_nleigs_ksp_type gmres -nep_nleigs_pc_type none -rg_interval_endpoints 0.2,1.1 -nep_target 0.8 -nep_nev 5 -n 400 -nep_monitor -nep_view -nep_error_relative ::ascii_info_detail
And also other solvers such as SLP:
$ ./test_nep -nep_type slp -nep_slp_ksp_type gmres -nep_slp_pc_type none -nep_target 0.8 -nep_nev 5 -n 400 -nep_monitor -nep_error_relative ::ascii_info_detail
I will clean the example code an add it as a SLEPc example.
Regards,
Jose
El 11 oct 2023, a las 17:27, Kenneth C Hall <[email protected] <mailto:[email protected]>> escribió:
Jose,
Thanks very much for your help with this. Greatly appreciated. I will look at the MR. Please let me know if you do get the Fortran example working.
Thanks, and best regards,
Kenneth