<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoPlainText"><span style="font-family:Helvetica">Jose,<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">I have been revisiting the issue of SLEPc/NEP for shell matrices T(lambda) and T'(lambda).
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">I am having problems running SLEPc/NEP with -nep_type nleigs.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">I have compiled two versions of PETSc/SLEPc:<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> petsc-arch-real / slepc-arch-real<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> ./configure --with-cc=gcc-13 --with-cxx=g++-13 --with-fc=gfortran --COPTFLAGS='-O3 -fopenmp' --CXXOPTFLAGS='-O3 -fopenmp'
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> --FOPTFLAGS='-O3 -fopenmp' --with-debugging=1 --with-logging=1 --with-scalar-type=real --with-precision=double
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> --download-fblaslapack --with-openmp --with-mpi=0<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> petsc-arch-complex / slepc-arch-complex<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> ./configure --with-cc=gcc-13 --with-cxx=g++-13 --with-fc=gfortran --COPTFLAGS='-O3 -fopenmp' --CXXOPTFLAGS='-O3 -fopenmp'
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> --FOPTFLAGS='-O3 -fopenmp' --with-debugging=1 --with-logging=1 --with-scalar-type=complex --with-precision=double
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> --download-fblaslapack --with-openmp --with-mpi=0<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">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).<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">I ran the ex54f90 test cases:<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> % main-arch-real -nep_type slp -nep_slp_ksp_type gmres -nep_slp_pc_type none<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> % main-arch-complex -nep_type slp -nep_slp_ksp_type gmres -nep_slp_pc_type none<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> % main-arch-real -nep_type nleigs -rg_interval_endpoints 0.2,1.1 -nep_nleigs_ksp_type gmres -nep_nleigs_pc_type none<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"> % 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<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">Both the slp cases ran as expected and gave the correct answer.
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">However, both the real and complex architectures failed for the nleigs case.
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">For the complex case, none of the callback functions appear to have been called.
<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">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. <o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">Any suggestions would be welcome.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">Best regards,<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="font-family:Helvetica">Kenneth Hall<o:p></o:p></span></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">On 10/18/23, 9:16 AM, "Jose E. Roman" <jroman@dsic.upv.es <mailto:jroman@dsic.upv.es>> wrote:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">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.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Jose<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> El 18 oct 2023, a las 15:11, Kenneth C Hall <kenneth.c.hall@duke.edu <mailto:kenneth.c.hall@duke.edu>> escribió:<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Jose,<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> 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.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Thank you and best regards,<o:p></o:p></p>
<p class="MsoPlainText">> Kenneth <o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> From: Jose E. Roman <jroman@dsic.upv.es <mailto:jroman@dsic.upv.es>><o:p></o:p></p>
<p class="MsoPlainText">> Sent: Tuesday, October 17, 2023 2:31 PM<o:p></o:p></p>
<p class="MsoPlainText">> To: Kenneth C Hall <kenneth.c.hall@duke.edu <mailto:kenneth.c.hall@duke.edu>><o:p></o:p></p>
<p class="MsoPlainText">> Cc: petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov> <petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov>><o:p></o:p></p>
<p class="MsoPlainText">> Subject: Re: [petsc-users] SLEPc/NEP for shell matrice T(lambda) and T'(lambda)<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Kenneth,<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> 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/596__;!!OToaGQ!oSqCpmczx5VDi5025aO5T3WqW-MwGnKUSzxKVkdyXTHo9vuxP4GYnDfMoYxavvWRAA0WdcwX3tiVaiXWT0dh2-o$
<https://urldefense.com/v3/__https://gitlab.com/slepc/slepc/-/merge_requests/596__;!!OToaGQ!oSqCpmczx5VDi5025aO5T3WqW-MwGnKUSzxKVkdyXTHo9vuxP4GYnDfMoYxavvWRAA0WdcwX3tiVaiXWT0dh2-o$><o:p></o:p></p>
<p class="MsoPlainText">> This version also has MATOP_DESTROY to avoid memory leaks.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Thanks.<o:p></o:p></p>
<p class="MsoPlainText">> Jose<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> > El 12 oct 2023, a las 20:59, Kenneth C Hall <kenneth.c.hall@duke.edu <mailto:kenneth.c.hall@duke.edu>> escribió:<o:p></o:p></p>
<p class="MsoPlainText">> ><o:p></o:p></p>
<p class="MsoPlainText">> > Jose,<o:p></o:p></p>
<p class="MsoPlainText">> > <o:p></o:p></p>
<p class="MsoPlainText">> > Thanks very much for this. I will give it a try and let you know how it works.<o:p></o:p></p>
<p class="MsoPlainText">> > <o:p></o:p></p>
<p class="MsoPlainText">> > Best regards,<o:p></o:p></p>
<p class="MsoPlainText">> > Kenneth<o:p></o:p></p>
<p class="MsoPlainText">> > <o:p></o:p></p>
<p class="MsoPlainText">> > From: Jose E. Roman <jroman@dsic.upv.es <mailto:jroman@dsic.upv.es>><o:p></o:p></p>
<p class="MsoPlainText">> > Date: Thursday, October 12, 2023 at 2:12 PM<o:p></o:p></p>
<p class="MsoPlainText">> > To: Kenneth C Hall <kenneth.c.hall@duke.edu <mailto:kenneth.c.hall@duke.edu>><o:p></o:p></p>
<p class="MsoPlainText">> > Cc: petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov> <petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov>><o:p></o:p></p>
<p class="MsoPlainText">> > Subject: Re: [petsc-users] SLEPc/NEP for shell matrice T(lambda) and T'(lambda)<o:p></o:p></p>
<p class="MsoPlainText">> ><o:p></o:p></p>
<p class="MsoPlainText">> > I am attaching your example modified with the context stuff.<o:p></o:p></p>
<p class="MsoPlainText">> ><o:p></o:p></p>
<p class="MsoPlainText">> > With the PETSc branch that I indicated, now it works with NLEIGS, for instance:<o:p></o:p></p>
<p class="MsoPlainText">> ><o:p></o:p></p>
<p class="MsoPlainText">> > $ ./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<o:p></o:p></p>
<p class="MsoPlainText">> ><o:p></o:p></p>
<p class="MsoPlainText">> > And also other solvers such as SLP:<o:p></o:p></p>
<p class="MsoPlainText">> ><o:p></o:p></p>
<p class="MsoPlainText">> > $ ./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<o:p></o:p></p>
<p class="MsoPlainText">> ><o:p></o:p></p>
<p class="MsoPlainText">> > I will clean the example code an add it as a SLEPc example.<o:p></o:p></p>
<p class="MsoPlainText">> ><o:p></o:p></p>
<p class="MsoPlainText">> > Regards,<o:p></o:p></p>
<p class="MsoPlainText">> > Jose<o:p></o:p></p>
<p class="MsoPlainText">> ><o:p></o:p></p>
<p class="MsoPlainText">> ><o:p></o:p></p>
<p class="MsoPlainText">> > > El 11 oct 2023, a las 17:27, Kenneth C Hall <kenneth.c.hall@duke.edu <mailto:kenneth.c.hall@duke.edu>> escribió:<o:p></o:p></p>
<p class="MsoPlainText">> > ><o:p></o:p></p>
<p class="MsoPlainText">> > > Jose,<o:p></o:p></p>
<p class="MsoPlainText">> > > <o:p></o:p></p>
<p class="MsoPlainText">> > > 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.<o:p></o:p></p>
<p class="MsoPlainText">> > > <o:p></o:p></p>
<p class="MsoPlainText">> > > Thanks, and best regards,<o:p></o:p></p>
<p class="MsoPlainText">> > > Kenneth<o:p></o:p></p>
<p class="MsoPlainText">> > ><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
</div>
</body>
</html>