[petsc-dev] How to pass user data to a registered PC (PCRegister) ?

Jed Brown jed at jedbrown.org
Tue Jan 23 23:41:44 CST 2018


Franck, you set the prefix "igs_" so the option you're looking for is "-igs_geneo_lvl ASM,0".

$ git diff
diff --git i/src/geneo.cpp w/src/geneo.cpp
index b4a4ea6..f09f97c 100644
--- i/src/geneo.cpp
+++ w/src/geneo.cpp
@@ -2318,8 +2318,11 @@ static PetscErrorCode setUpGenEOPCFromOptions(PetscOptionItems * PetscOptionsObj
 
   PetscErrorCode pcRC = PetscOptionsHead(PetscOptionsObject, "GenEO options");
   CHKERRQ(pcRC);
+  //#define ORIGINAL
+#ifdef ORIGINAL
   pcRC = PetscOptionsBegin(PETSC_COMM_WORLD, NULL, "GenEO options", "GenEO options");
   CHKERRQ(pcRC);
+#endif
 
   PetscBool pcHasOpt = PETSC_FALSE;
   PetscInt nbArgs = 2;
@@ -2461,8 +2464,10 @@ static PetscErrorCode setUpGenEOPCFromOptions(PetscOptionItems * PetscOptionsObj
     gCtx->check = true;
   }
 
-  pcRC = PetscOptionsEnd();
-  CHKERRQ(pcRC);
+#ifdef ORIGINAL
+    pcRC = PetscOptionsEnd();
+    CHKERRQ(pcRC);
+#endif
   pcRC = PetscOptionsTail();
   CHKERRQ(pcRC);
 

$ ../../src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -igs_geneo_lvl ASM,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual | tail                                                                                     
4.                                                                                                                                                                                            
5.
6.
7.
8.

INFO: nb DOFs 8, nb elements 7, nnz coefs 22, nb partitions 1, overlap 0, metis dual
INFO: gmres ksp, eps rel 1.0e-12, eps abs 1.0e-12, max iterations 10000
INFO: geneo0ASM pc, L1 mumps no-proj-fine-space
INFO: solve - converged


You can see the correct option by running with -help:

$ ../../src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -igs_geneo_lvl ASM,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual -help | grep geneo_lvl                                                                     
  -igs_geneo_lvl <string1,string2,...>: GenEO levels (GenEO levels)


Also, if you hadn't gone out of your way to pass "-options_left no", you
would have seen this output, which is actually not a joke:

$ ../../src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 --metisDual | tail -5                                                                                                       
WARNING! There are options you set that were not used!                                                                                                                                        
WARNING! could be spelling mistake, etc!
Option left: name:-geneo_chk value: log
Option left: name:-geneo_dbg value: log,2
Option left: name:-geneo_lvl value: ASM,0


Franck Houssen <franck.houssen at inria.fr> writes:

> Forgot the logs !
>
> ----- Mail original -----
>> De: "Franck Houssen" <franck.houssen at inria.fr>
>> À: "Jed Brown" <jed at jedbrown.org>
>> Cc: "Barry F. Smith" <bsmith at mcs.anl.gov>, "For users of the development version of PETSc" <petsc-dev at mcs.anl.gov>
>> Envoyé: Lundi 22 Janvier 2018 18:03:20
>> Objet: Re: [petsc-dev] How to pass user data to a registered PC (PCRegister) ?
>> 
>> ----- Mail original -----
>> > De: "Jed Brown" <jed at jedbrown.org>
>> > À: "Franck Houssen" <franck.houssen at inria.fr>
>> > Cc: "Barry F. Smith" <bsmith at mcs.anl.gov>, "For users of the development
>> > version of PETSc" <petsc-dev at mcs.anl.gov>
>> > Envoyé: Lundi 22 Janvier 2018 16:48:26
>> > Objet: Re: [petsc-dev] How to pass user data to a registered PC
>> > (PCRegister) ?
>> > 
>> > Franck Houssen <franck.houssen at inria.fr> writes:
>> > 
>> > > ----- Mail original -----
>> > >> De: "Jed Brown" <jed at jedbrown.org>
>> > >> À: "Barry F. Smith" <bsmith at mcs.anl.gov>, "Franck Houssen"
>> > >> <franck.houssen at inria.fr>
>> > >> Cc: "For users of the development version of PETSc"
>> > >> <petsc-dev at mcs.anl.gov>
>> > >> Envoyé: Lundi 22 Janvier 2018 16:06:26
>> > >> Objet: Re: [petsc-dev] How to pass user data to a registered PC
>> > >> (PCRegister) ?
>> > >> 
>> > >> I used
>> > >> 
>> > >>   mkdir build; cd build
>> > >>   PKG_CONFIG_PATH=$PETSC_DIR/$PETSC_ARCH/lib/pkgconfig:$SLEPC_DIR/$PETSC_ARCH/lib/pkgconfig
>> > >>   cmake ..
>> > >> 
>> > >> and got a successful build.  Franck, you can have your CMakeLists.txt
>> > >> add these paths to PKG_CONFIG_PATH before using pkgconfig.  It saves
>> > >> time because it's the conventional way to specify PETSc libraries.
>> > >> 
>> > >
>> > > You are right. I'll do that.
>> > >
>> > >>
>> > >> In general, when providing a test case, it's best to be precise and
>> > >> complete.  It isn't a good use of Barry's time to expect him to browse
>> > >> around your github repository and find your wiki.
>> > >> 
>> > >> Anyway, I have it built, but I don't know what the "dummy test case" is.
>> > >> I tried tst/dummy/dummy.sh and got
>> > >> 
>> > >
>> > > make all check
>> > 
>> > I'm on 'master' and getting usage errors along with
>> > 
>> >    Error: check argument KO
>> > 
>> > Am I supposed to ignore all these failures before modifying code in
>> > search of a different error?
>> > 
>> 
>> 
>> In the dummy test case I added one line to run the app with --help: this is
>> only for coverage purposes (this ends with "Error: check argument KO").
>> 
>> ~/geneo4PETSc> head tst/dummy/dummy.sh
>> #!/bin/bash
>> @CMAKE_BINARY_DIR@/src/geneo4PETSc --help # Help for coverage.     <=====
>> This is only for coverage
>> echo "" # Add space for clarity.
>> for f in "identity" "tridiag"                                      <======
>> Here begins the test
>> do
>>   for p in "-igs_pc_type#bjacobi"                                  \
>>   <====== OK
>>                "-igs_pc_type#geneo#-geneo_lvl#ASM,0"               \
>>                <====== Fails according to the diff
>> 
>> Now run the dummy test case:
>> 
>> ~/geneo4PETSc/BUILD> make all test ARGS="-V -R dummy" > OK.log (log attached)
>> 
>> You see that, among others, this (sub) test has been ran OK (third solve):
>> mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB
>> B.inp -igs_pc_type geneo -geneo_lvl ASM,0 --verbose 2 -geneo_chk log
>> -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12
>> -options_left no --metisDual
>> 
>> 
>> Now apply following modifications:
>> 
>> >> git diff
>> diff --git a/src/geneo.cpp b/src/geneo.cpp
>> index b4a4ea6..3f9be0f 100644
>> --- a/src/geneo.cpp
>> +++ b/src/geneo.cpp
>> @@ -2318,8 +2318,8 @@ static PetscErrorCode
>> setUpGenEOPCFromOptions(PetscOptionItems * PetscOptionsObj
>>    PetscErrorCode pcRC = PetscOptionsHead(PetscOptionsObject, "GenEO
>>    options");
>>    CHKERRQ(pcRC);
>> -  pcRC = PetscOptionsBegin(PETSC_COMM_WORLD, NULL, "GenEO options", "GenEO
>> options");
>> -  CHKERRQ(pcRC);
>> +  //pcRC = PetscOptionsBegin(PETSC_COMM_WORLD, NULL, "GenEO options", "GenEO
>> options");
>> +  //CHKERRQ(pcRC);
>>    PetscBool pcHasOpt = PETSC_FALSE;
>>    PetscInt nbArgs = 2;
>> @@ -2461,8 +2461,8 @@ static PetscErrorCode
>> setUpGenEOPCFromOptions(PetscOptionItems * PetscOptionsObj
>>      gCtx->check = true;
>>    }
>> -  pcRC = PetscOptionsEnd();
>> -  CHKERRQ(pcRC);
>> +  //pcRC = PetscOptionsEnd();
>> +  //CHKERRQ(pcRC);
>>    pcRC = PetscOptionsTail();
>>    CHKERRQ(pcRC);
>> 
>> And rerun the dummy test:
>> 
>> >> make all test ARGS="-V -R dummy" > KO.log
>> Errors while running CTest
>> make: *** [test] Error 8
>> >> tail -n 20 KO.log
>> 1:
>> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp
>> --inpFileB B.inp -igs_pc_type bjacobi --verbose 2 -geneo_chk log -geneo_dbg
>> log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no
>> --metisDual
>> 1:
>> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp
>> --inpFileB B.inp -igs_pc_type bjacobi --verbose 2 -geneo_chk log -geneo_dbg
>> log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no
>> --metisNodal
>> 1:
>> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp
>> --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,0 --verbose 2 -geneo_chk
>> log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12
>> -options_left no --metisDual
>> 1:
>> 1: 44c44
>> 1: < INFO: geneo0ASM pc, L1 mumps no-proj-fine-space
>> 1: ---
>> 1: > INFO: geneo1ASM pc, L1 mumps no-proj-fine-space, tau 0.10, L2 arpack
>> mumps
>> 1/1 Test #1: dummy ............................***Failed    0.66 sec
>> 
>> 
>> In tst/dummy, the same command line "mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc
>> --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,0
>> --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12
>> -igs_ksp_rtol 1.e-12 -options_left no --metisDual" does not do the same
>> thing with and without the modifications: this is because the options are
>> not read correctly (seems the option database is empty)
>> 
>> 
>> The correct behavior (no modif) is:
>> 
>> >> mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp
>> >> --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,0 --verbose 2
>> >> -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12
>> >> -igs_ksp_rtol 1.e-12 -options_left no --metisDual
>> ...
>> INFO: geneo0ASM pc, L1 mumps no-proj-fine-space  <===== you get geneo0ASM
>> because you asked -geneo_lvl ASM,0
>> 
>> The incorrect behavior (with modif) is:
>> 
>> >> mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp
>> >> --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,0 --verbose 2
>> >> -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12
>> >> -igs_ksp_rtol 1.e-12 -options_left no --metisDual
>> ....
>> INFO: geneo1ASM pc, L1 mumps no-proj-fine-space, tau 0.10, L2 arpack mumps
>> <======= you asked -geneo_lvl ASM,0 but you get the default
>> parameter-geneo_lvl ASM,1 (=> geneo1ASM)
>> 
>> 
>> Anyway, this is not so blocking as I have a bypass
>> 
>> 
>> > > The diff of the firt test of the suite (called dummy) fails this way:
>> > > 1: < INFO: geneo0ASM pc, L1 mumps no-proj-fine-space
>> > > 1: ---
>> > > 1: > INFO: geneo1ASM pc, L1 mumps no-proj-fine-space, tau 0.10, L2 arpack
>> > > mumps
>> > >
>> > >
>> > >>   Error: check argument KO
>> > >> 
>> > >> Can you give the exact command to run and expected output?
>> > >> 
>> > >> "Smith, Barry F." <bsmith at mcs.anl.gov> writes:
>> > >> 
>> > >> >   I absolutely hate package configures that say they can't find
>> > >> >   something
>> > >> >   but give NO indication how to indicate the location of the missing
>> > >> >   thing.
>> > >> >
>> > >> > $ SLEPC_DIR=$SLEPC_DIR cmake ..
>> > >> > -DBOOST_ROOT=/Users/barrysmith/Src/boost_1_66_0 -DSLEPC_DIR=$SLEPC_DIR
>> > >> > CMake Warning at
>> > >> > /usr/local/Cellar/cmake/3.9.5/share/cmake/Modules/FindBoost.cmake:786
>> > >> > (message):
>> > >> >   New Boost version may have incorrect or missing dependencies and
>> > >> >   imported
>> > >> >   targets
>> > >> > Call Stack (most recent call first):
>> > >> >   /usr/local/Cellar/cmake/3.9.5/share/cmake/Modules/FindBoost.cmake:892
>> > >> >   (_Boost_COMPONENT_DEPENDENCIES)
>> > >> >   /usr/local/Cellar/cmake/3.9.5/share/cmake/Modules/FindBoost.cmake:1523
>> > >> >   (_Boost_MISSING_DEPENDENCIES)
>> > >> >   CMakeLists.txt:38 (find_package)
>> > >> >
>> > >> >
>> > >> > CMake Warning at
>> > >> > /usr/local/Cellar/cmake/3.9.5/share/cmake/Modules/FindBoost.cmake:786
>> > >> > (message):
>> > >> >   New Boost version may have incorrect or missing dependencies and
>> > >> >   imported
>> > >> >   targets
>> > >> > Call Stack (most recent call first):
>> > >> >   /usr/local/Cellar/cmake/3.9.5/share/cmake/Modules/FindBoost.cmake:892
>> > >> >   (_Boost_COMPONENT_DEPENDENCIES)
>> > >> >   /usr/local/Cellar/cmake/3.9.5/share/cmake/Modules/FindBoost.cmake:1523
>> > >> >   (_Boost_MISSING_DEPENDENCIES)
>> > >> >   CMakeLists.txt:38 (find_package)
>> > >> >
>> > >> >
>> > >> > -- Boost version: 1.66.0
>> > >> > -- Found the following Boost libraries:
>> > >> > --   mpi
>> > >> > --   serialization
>> > >> > -- Checking for module 'SLEPc>=3.8.1'
>> > >> > --   No package 'SLEPc' found
>> > >> > CMake Error at
>> > >> > /usr/local/Cellar/cmake/3.9.5/share/cmake/Modules/FindPkgConfig.cmake:412
>> > >> > (message):
>> > >> >   A required package was not found
>> > >> > Call Stack (most recent call first):
>> > >> >   /usr/local/Cellar/cmake/3.9.5/share/cmake/Modules/FindPkgConfig.cmake:588
>> > >> >   (_pkg_check_modules_internal)
>> > >> >   CMakeLists.txt:42 (pkg_check_modules)
>> > >> >
>> > >> >
>> > >> > -- Configuring incomplete, errors occurred!
>> > >> > See also
>> > >> > "/Users/barrysmith/Src/geneo4PETSc/BUILD/CMakeFiles/CMakeOutput.log".
>> > >> > ~/Src/geneo4PETSc/BUILD (master=) arch-franck
>> > >> > $
>> > >> >
>> > >> >
>> > >> > Note at first it could not find BOOST but told me to set the directory
>> > >> > with
>> > >> > exact syntax. That's the way it should always do it.
>> > >> >
>> > >> > SLEPC_ROOT also did not work, nor did SLEPc_ROOT ;(
>> > >> >
>> > >> > So please tell me how to work through this dependency hell.
>> > >> >
>> > >> >    Barry
>> > >> >
>> > >> >> On Jan 21, 2018, at 11:06 AM, Franck Houssen
>> > >> >> <franck.houssen at inria.fr>
>> > >> >> wrote:
>> > >> >> 
>> > >> >> The last problem I had here was that, for now, I must use a bypass:
>> > >> >> calling  PetscOptionsBegin/End after/before PetscOptionsHead/Tail in
>> > >> >> the
>> > >> >> setup callback defined on PCRegister.
>> > >> >> 
>> > >> >> git-clone https://github.com/fghoussen/geneo4PETSc, the dummy test
>> > >> >> case
>> > >> >> should run. Then comment lines 2321 and 2464 in geneo.cpp
>> > >> >> (PetscOptionsBegin/End): the dummy test case should fail because as
>> > >> >> the
>> > >> >> option database "seems" to be empty, the default parameter are used
>> > >> >> and
>> > >> >> the name/version of the pc is not the expected one.
>> > >> >> 
>> > >> >> I believe (?) I use the correct PCRegister pattern (PCSetFromOptions
>> > >> >> between PCRegister and initGenEOPC). Either I'm wrong, or there is
>> > >> >> something behind...
>> > >> >> 
>> > >> >> Franck
>> > >> >> 
>> > >> >> PS: still trying to get osx to work... (don't know mac/clang enough,
>> > >> >> and,
>> > >> >> travis osx boxes are so slow to start and run - difficult to test).
>> > >> >> But
>> > >> >> if you used to it, you'll probably get this to work.
>> > >> >> 
>> > >> >> ----- Mail original -----
>> > >> >>> De: "Franck Houssen" <franck.houssen at inria.fr>
>> > >> >>> À: "Barry F. Smith" <bsmith at mcs.anl.gov>
>> > >> >>> Cc: "For users of the development version of PETSc"
>> > >> >>> <petsc-dev at mcs.anl.gov>
>> > >> >>> Envoyé: Mardi 2 Janvier 2018 15:15:25
>> > >> >>> Objet: Re: [petsc-dev] How to pass user data to a registered PC
>> > >> >>> (PCRegister) ?
>> > >> >>> 
>> > >> >>> ----- Mail original -----
>> > >> >>>> De: "Barry F. Smith" <bsmith at mcs.anl.gov>
>> > >> >>>> À: "Franck Houssen" <franck.houssen at inria.fr>
>> > >> >>>> Cc: "For users of the development version of PETSc"
>> > >> >>>> <petsc-dev at mcs.anl.gov>
>> > >> >>>> Envoyé: Mardi 2 Janvier 2018 14:50:02
>> > >> >>>> Objet: Re: [petsc-dev] How to pass user data to a registered PC
>> > >> >>>> (PCRegister) ?
>> > >> >>>> 
>> > >> >>>> 
>> > >> >>>> 
>> > >> >>>> 
>> > >> >>>>> On Jan 2, 2018, at 7:47 AM, Franck Houssen
>> > >> >>>>> <franck.houssen at inria.fr>
>> > >> >>>>> wrote:
>> > >> >>>>> 
>> > >> >>>>> I'll try to fetch/pull the git clone: maybe there is a reg on the
>> > >> >>>>> code
>> > >> >>>>> level I am on.
>> > >> >>>> 
>> > >> >>>>  Unlikely.
>> > >> >>>> 
>> > >> >>>>   I'm afraid you need to use the debugger and slog through the
>> > >> >>>>   call.
>> > >> >>> 
>> > >> >>> OK, I'll do that ! For now, calling Begin/End is this only by-pass I
>> > >> >>> have.
>> > >> >>> 
>> > >> >>>> It    seems you are doing things ok so why this happens I cannot
>> > >> >>>> explain.
>> > >> >>>> We
>> > >> >>>>   use this paradigm everywhere with options in PETSc and it always
>> > >> >>>>   works
>> > >> >>>>   so
>> > >> >>>>   I am totally lost as to why it fails for you.
>> > >> >>>> 
>> > >> >>>>   Barry
>> > >> >>>> 
>> > >> >>>>> 
>> > >> >>>>> ----- Mail original -----
>> > >> >>>>>> De: "Barry F. Smith" <bsmith at mcs.anl.gov>
>> > >> >>>>>> À: "Franck Houssen" <franck.houssen at inria.fr>
>> > >> >>>>>> Cc: "For users of the development version of PETSc"
>> > >> >>>>>> <petsc-dev at mcs.anl.gov>
>> > >> >>>>>> Envoyé: Mardi 2 Janvier 2018 13:22:16
>> > >> >>>>>> Objet: Re: [petsc-dev] How to pass user data to a registered PC
>> > >> >>>>>> (PCRegister) ?
>> > >> >>>>>> 
>> > >> >>>>>> 
>> > >> >>>>>> static PetscErrorCode PCSetFromOptions_Jacobi(PetscOptionItems
>> > >> >>>>>> *PetscOptionsObject,PC pc)
>> > >> >>>>>> {
>> > >> >>>>>> PC_Jacobi      *jac = (PC_Jacobi*)pc->data;
>> > >> >>>>>> PetscErrorCode ierr;
>> > >> >>>>>> PetscBool      flg;
>> > >> >>>>>> PCJacobiType   deflt,type;
>> > >> >>>>>> 
>> > >> >>>>>> PetscFunctionBegin;
>> > >> >>>>>> ierr = PCJacobiGetType(pc,&deflt);CHKERRQ(ierr);
>> > >> >>>>>> ierr = PetscOptionsHead(PetscOptionsObject,"Jacobi
>> > >> >>>>>> options");CHKERRQ(ierr);
>> > >> >>>>>> ierr = PetscOptionsEnum("-pc_jacobi_type","How to construct
>> > >> >>>>>> diagonal
>> > >> >>>>>> matrix","PCJacobiSetType",PCJacobiTypes,(PetscEnum)deflt,(PetscEnum*)&type,&flg);CHKERRQ(ierr);
>> > >> >>>>>> if (flg) {
>> > >> >>>>>>   ierr = PCJacobiSetType(pc,type);CHKERRQ(ierr);
>> > >> >>>>>> }
>> > >> >>>>>> ierr = PetscOptionsBool("-pc_jacobi_abs","Use absolute values of
>> > >> >>>>>> diagaonal
>> > >> >>>>>> entries","PCJacobiSetUseAbs",jac->useabs,&jac->useabs,NULL);CHKERRQ(ierr);
>> > >> >>>>>> ierr = PetscOptionsTail();CHKERRQ(ierr);
>> > >> >>>>>> PetscFunctionReturn(0);
>> > >> >>>>>> }
>> > >> >>>>>> 
>> > >> >>>>>> Note how PetscOptionsHead() is called with the argument
>> > >> >>>>>> PetscOptionsObject
>> > >> >>>>> 
>> > >> >>>>> I do call PetscOptionsHead(PetscOptionsObject, ...);
>> > >> >>>>> 
>> > >> >>>>>> which is passed in from above. My guess is that you don't
>> > >> >>>>>> call it with this argument? You would get behavior you describe
>> > >> >>>>>> if
>> > >> >>>>>> you
>> > >> >>>>>> don't.
>> > >> >>>>>> Please send your REAL setupfromoptions_mypc() not just pseudo
>> > >> >>>>>> code.
>> > >> >>>>>> 
>> > >> >>>>> 
>> > >> >>>>> #define SETERRABT(msg)
>> > >> >>>>> SETERRABORT(PETSC_COMM_WORLD,PETSC_ERR_ARG_NULL,msg)
>> > >> >>>>> 
>> > >> >>>>> static PetscErrorCode setUpGenEOPCFromOptions(PetscOptionItems *
>> > >> >>>>> PetscOptionsObject, PC pcPC) {
>> > >> >>>>> // Get the context.
>> > >> >>>>> 
>> > >> >>>>> if (!pcPC) SETERRABT("GenEO preconditioner is invalid");
>> > >> >>>>> geneoContext * gCtx = (geneoContext *) pcPC->data;
>> > >> >>>>> if (!gCtx) SETERRABT("GenEO preconditioner without context");
>> > >> >>>>> 
>> > >> >>>>> // Check arguments.
>> > >> >>>>> 
>> > >> >>>>> PetscErrorCode pcRC = PetscOptionsHead(PetscOptionsObject, "GenEO
>> > >> >>>>> options");
>> > >> >>>>> CHKERRQ(pcRC);
>> > >> >>>>> pcRC = PetscOptionsBegin(PETSC_COMM_WORLD, NULL, "GenEO options",
>> > >> >>>>> "GenEO
>> > >> >>>>> options");
>> > >> >>>>> CHKERRQ(pcRC);
>> > >> >>>>> 
>> > >> >>>>> PetscBool pcHasOpt = PETSC_FALSE;
>> > >> >>>>> PetscInt nbArgs = 2;
>> > >> >>>>> char *args[2];
>> > >> >>>>> pcRC = PetscOptionsStringArray("-geneo_lvl", "GenEO levels",
>> > >> >>>>> "GenEO
>> > >> >>>>> levels", args, &nbArgs, &pcHasOpt);
>> > >> >>>>> CHKERRQ(pcRC);
>> > >> >>>>> if (pcHasOpt) {
>> > >> >>>>>   ...
>> > >> >>>>> 
>> > >> >>>>> 
>> > >> >>>>>> Barry
>> > >> >>>>>> 
>> > >> >>>>>> 
>> > >> >>>>>> 
>> > >> >>>>>> 
>> > >> >>>>>>> On Jan 2, 2018, at 5:04 AM, Franck Houssen
>> > >> >>>>>>> <franck.houssen at inria.fr>
>> > >> >>>>>>> wrote:
>> > >> >>>>>>> 
>> > >> >>>>>>> ----- Mail original -----
>> > >> >>>>>>>> De: "Barry F. Smith" <bsmith at mcs.anl.gov>
>> > >> >>>>>>>> À: "Franck Houssen" <franck.houssen at inria.fr>
>> > >> >>>>>>>> Cc: "For users of the development version of PETSc"
>> > >> >>>>>>>> <petsc-dev at mcs.anl.gov>
>> > >> >>>>>>>> Envoyé: Dimanche 31 Décembre 2017 23:41:42
>> > >> >>>>>>>> Objet: Re: [petsc-dev] How to pass user data to a registered PC
>> > >> >>>>>>>> (PCRegister) ?
>> > >> >>>>>>>> 
>> > >> >>>>>>>> 
>> > >> >>>>>>>> 
>> > >> >>>>>>>>> On Dec 31, 2017, at 8:40 AM, Franck Houssen
>> > >> >>>>>>>>> <franck.houssen at inria.fr>
>> > >> >>>>>>>>> wrote:
>> > >> >>>>>>>>> 
>> > >> >>>>>>>>> Seems finally, I got it to work.
>> > >> >>>>>>>>> To get the options to work I had to call PetscOptionsBegin/End
>> > >> >>>>>>>>> after/before
>> > >> >>>>>>>>> PetscOptionsHead/Tail which is not what is done in the jacobi
>> > >> >>>>>>>>> example:
>> > >> >>>>>>>>> is
>> > >> >>>>>>>>> this the right way to go ?
>> > >> >>>>>>>> 
>> > >> >>>>>>>> Something is wrong.
>> > >> >>>>>>> 
>> > >> >>>>>>> I felt there was something wrong !...
>> > >> >>>>>>> 
>> > >> >>>>>>>> PetscOptionsBegin/end are called in PCSetFromOptions()
>> > >> >>>>>>>> that is suppose to wrap YOUR PCSetFromOptions_mypc().
>> > >> >>>>>>> 
>> > >> >>>>>>> OK, sounds logical, that's how I expected things to be done.
>> > >> >>>>>>> That's
>> > >> >>>>>>> why
>> > >> >>>>>>> I
>> > >> >>>>>>> was suspicious: what worked should not !...
>> > >> >>>>>>> 
>> > >> >>>>>>> I believed maybe the problem was connected to the fact that I do
>> > >> >>>>>>> NOT
>> > >> >>>>>>> use
>> > >> >>>>>>> compose function, but, according to Matt's explanation, I would
>> > >> >>>>>>> say
>> > >> >>>>>>> no:
>> > >> >>>>>>> the use of PetscComposeFunction seems independent from the
>> > >> >>>>>>> PCSetFromOptions_mypc problem.
>> > >> >>>>>>> 
>> > >> >>>>>>> Note: in my case, I believe I do not really need PetscCompose, I
>> > >> >>>>>>> just
>> > >> >>>>>>> need
>> > >> >>>>>>> one (regular) function to initialize specific stuffs needed in
>> > >> >>>>>>> my_pc
>> > >> >>>>>>> (at
>> > >> >>>>>>> least for a start). I can go to PetscCompose later if it turns
>> > >> >>>>>>> out
>> > >> >>>>>>> to
>> > >> >>>>>>> be
>> > >> >>>>>>> relevant (that's how I understand this).
>> > >> >>>>>>> 
>> > >> >>>>>>>> Perhaps you are
>> > >> >>>>>>>> calling PCSetFromOptions_mypc directly which you should never
>> > >> >>>>>>>> do.
>> > >> >>>>>>> 
>> > >> >>>>>>> No, I don't call PCSetFromOptions_mypc directly.
>> > >> >>>>>>> 
>> > >> >>>>>>>> Your PCCreate_mypc() should stick the function pointer for
>> > >> >>>>>>>> PCSetFromOptions_mypc into the ops table like it does
>> > >> >>>>>>>> PCApply_mypc
>> > >> >>>>>>>> etc.
>> > >> >>>>>>>> Then you just directly use PCSetFromOptions.
>> > >> >>>>>>> 
>> > >> >>>>>>> create_mpc(PC pc) { // CB for PCRegister
>> > >> >>>>>>> ...
>> > >> >>>>>>> pcPC->ops->setfromoptions = setupfromoptions_mypc;
>> > >> >>>>>>> ...
>> > >> >>>>>>> }
>> > >> >>>>>>> 
>> > >> >>>>>>> static PetscErrorCode setupfromoptions_mypc(PetscOptionItems *
>> > >> >>>>>>> PetscOptionsObject, PC pcPC) {
>> > >> >>>>>>> ...
>> > >> >>>>>>> PetscOptionsHead()
>> > >> >>>>>>> PetscOptionsBegin()
>> > >> >>>>>>> PetscOptionsStringArray("-mypc_opt", ..., flag)
>> > >> >>>>>>> cout << "debug " << flag << endl;
>> > >> >>>>>>> PetscOptionsEnd()
>> > >> >>>>>>> PetscOptionsTail()
>> > >> >>>>>>> }
>> > >> >>>>>>> 
>> > >> >>>>>>> I got called on setupfromoptions_mypc when I call
>> > >> >>>>>>> PCSetUpFromOptions().
>> > >> >>>>>>> 
>> > >> >>>>>>> If I let PetscOptionsBegin/End, it looks like I read in the
>> > >> >>>>>>> "correct"
>> > >> >>>>>>> option data base, I get (cout) : "debug 1" (-my_opt is read)
>> > >> >>>>>>> 
>> > >> >>>>>>> If I comment PetscOptionsBegin/End, seems I read an incorrect
>> > >> >>>>>>> (empty
>> > >> >>>>>>> ?)
>> > >> >>>>>>> option data base, I get (cout) : "debug 0"
>> > >> >>>>>>> 
>> > >> >>>>>>> Looks weird even if it's not blocking for now (I know there is
>> > >> >>>>>>> problem
>> > >> >>>>>>> but
>> > >> >>>>>>> I can by pass it)
>> > >> >>>>>>> 
>> > >> >>>>>>>> 
>> > >> >>>>>>>> Barry
>> > >> >>>>>>>> 
>> > >> >>>>>>>>> 
>> > >> >>>>>>>>> Franck
>> > >> >>>>>>>>> 
>> > >> >>>>>>>>> PetscErrorCode PCSetFromOptions_mypc(PetscOptionItems *
>> > >> >>>>>>>>> PetscOptionsObject,
>> > >> >>>>>>>>> PC pcPC) {
>> > >> >>>>>>>>> PetscOptionsHead
>> > >> >>>>>>>>> PetscOptionsBegin
>> > >> >>>>>>>>> ... // PetscOptionsStringArray
>> > >> >>>>>>>>> PetscOptionsEnd
>> > >> >>>>>>>>> PetscOptionsTail
>> > >> >>>>>>>>> 
>> > >> >>>>>>>>> 
>> > >> >>>>>>>>> ----- Mail original -----
>> > >> >>>>>>>>>> De: "Franck Houssen" <franck.houssen at inria.fr>
>> > >> >>>>>>>>>> À: "Barry F. Smith" <bsmith at mcs.anl.gov>
>> > >> >>>>>>>>>> Cc: "For users of the development version of PETSc"
>> > >> >>>>>>>>>> <petsc-dev at mcs.anl.gov>
>> > >> >>>>>>>>>> Envoyé: Dimanche 31 Décembre 2017 15:01:43
>> > >> >>>>>>>>>> Objet: Re: [petsc-dev] How to pass user data to a registered
>> > >> >>>>>>>>>> PC
>> > >> >>>>>>>>>> (PCRegister) ?
>> > >> >>>>>>>>>> 
>> > >> >>>>>>>>>> Using PCSHELL means calling:
>> > >> >>>>>>>>>> - PCShellSetSetUp, PCShellSetApply, PCShellSetDestroy to set
>> > >> >>>>>>>>>> callbacks.
>> > >> >>>>>>>>>> - PCShellSetContext/PCShellGetContext to get/set context in
>> > >> >>>>>>>>>> callbacks.
>> > >> >>>>>>>>>> 
>> > >> >>>>>>>>>> To go from PCSHELL to PCRegister, one need to:
>> > >> >>>>>>>>>> - #include <petsc/private/pcimpl.h> // Access to PC
>> > >> >>>>>>>>>> data/struct.
>> > >> >>>>>>>>>> - Set callbacks with pc->ops->...
>> > >> >>>>>>>>>> - NO more use ANY shell methods (context, name), but, use
>> > >> >>>>>>>>>> pc->data
>> > >> >>>>>>>>>> instead.
>> > >> >>>>>>>>>> - call PCRegister.
>> > >> >>>>>>>>>> 
>> > >> >>>>>>>>>> Correct ? Did I miss something ?
>> > >> >>>>>>>>>> 
>> > >> >>>>>>>>>> Seems I get things to work (without compose function).
>> > >> >>>>>>>>>> 
>> > >> >>>>>>>>>> The last problem I have is in the options: options are passed
>> > >> >>>>>>>>>> to
>> > >> >>>>>>>>>> PetscInitialize but not found in the database (I mimic'ed the
>> > >> >>>>>>>>>> jacobi
>> > >> >>>>>>>>>> example). Is there specific related to this ?
>> > >> >>>>>>>>>> 
>> > >> >>>>>>>>>> 
>> > >> >>>>>>>>>> ----- Mail original -----
>> > >> >>>>>>>>>>> De: "Franck Houssen" <franck.houssen at inria.fr>
>> > >> >>>>>>>>>>> À: "Barry F. Smith" <bsmith at mcs.anl.gov>
>> > >> >>>>>>>>>>> Cc: "For users of the development version of PETSc"
>> > >> >>>>>>>>>>> <petsc-dev at mcs.anl.gov>
>> > >> >>>>>>>>>>> Envoyé: Samedi 30 Décembre 2017 17:12:09
>> > >> >>>>>>>>>>> Objet: Re: [petsc-dev] How to pass user data to a registered
>> > >> >>>>>>>>>>> PC
>> > >> >>>>>>>>>>> (PCRegister) ?
>> > >> >>>>>>>>>>> 
>> > >> >>>>>>>>>>> Don't get the link. I'll try first with independent function
>> > >> >>>>>>>>>>> (no
>> > >> >>>>>>>>>>> compose)
>> > >> >>>>>>>>>>> and
>> > >> >>>>>>>>>>> see if this can work at least for a start.
>> > >> >>>>>>>>>>> 
>> > >> >>>>>>>>>>> Franck
>> > >> >>>>>>>>>>> 
>> > >> >>>>>>>>>>> ----- Mail original -----
>> > >> >>>>>>>>>>>> De: "Barry F. Smith" <bsmith at mcs.anl.gov>
>> > >> >>>>>>>>>>>> À: "Franck Houssen" <franck.houssen at inria.fr>
>> > >> >>>>>>>>>>>> Cc: "For users of the development version of PETSc"
>> > >> >>>>>>>>>>>> <petsc-dev at mcs.anl.gov>
>> > >> >>>>>>>>>>>> Envoyé: Vendredi 29 Décembre 2017 17:55:30
>> > >> >>>>>>>>>>>> Objet: Re: [petsc-dev] How to pass user data to a
>> > >> >>>>>>>>>>>> registered
>> > >> >>>>>>>>>>>> PC
>> > >> >>>>>>>>>>>> (PCRegister) ?
>> > >> >>>>>>>>>>>> 
>> > >> >>>>>>>>>>>> 
>> > >> >>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>> On Dec 29, 2017, at 9:03 AM, Franck Houssen
>> > >> >>>>>>>>>>>>> <franck.houssen at inria.fr>
>> > >> >>>>>>>>>>>>> wrote:
>> > >> >>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>> OK, on the highway now (bad ssh !), I'll try to check this
>> > >> >>>>>>>>>>>>> out.
>> > >> >>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>> ----- Mail original -----
>> > >> >>>>>>>>>>>>>> De: "Barry F. Smith" <bsmith at mcs.anl.gov>
>> > >> >>>>>>>>>>>>>> À: "Franck Houssen" <franck.houssen at inria.fr>
>> > >> >>>>>>>>>>>>>> Cc: "For users of the development version of PETSc"
>> > >> >>>>>>>>>>>>>> <petsc-dev at mcs.anl.gov>
>> > >> >>>>>>>>>>>>>> Envoyé: Jeudi 28 Décembre 2017 18:21:48
>> > >> >>>>>>>>>>>>>> Objet: Re: [petsc-dev] How to pass user data to a
>> > >> >>>>>>>>>>>>>> registered
>> > >> >>>>>>>>>>>>>> PC
>> > >> >>>>>>>>>>>>>> (PCRegister) ?
>> > >> >>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>> On Dec 28, 2017, at 10:34 AM, Franck Houssen
>> > >> >>>>>>>>>>>>>>> <franck.houssen at inria.fr>
>> > >> >>>>>>>>>>>>>>> wrote:
>> > >> >>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>> ----- Mail original -----
>> > >> >>>>>>>>>>>>>>>> De: "Barry F. Smith" <bsmith at mcs.anl.gov>
>> > >> >>>>>>>>>>>>>>>> À: "Franck Houssen" <franck.houssen at inria.fr>
>> > >> >>>>>>>>>>>>>>>> Cc: "For users of the development version of PETSc"
>> > >> >>>>>>>>>>>>>>>> <petsc-dev at mcs.anl.gov>
>> > >> >>>>>>>>>>>>>>>> Envoyé: Jeudi 28 Décembre 2017 16:43:16
>> > >> >>>>>>>>>>>>>>>> Objet: Re: [petsc-dev] How to pass user data to a
>> > >> >>>>>>>>>>>>>>>> registered
>> > >> >>>>>>>>>>>>>>>> PC
>> > >> >>>>>>>>>>>>>>>> (PCRegister) ?
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> The register is for a new type of PC of which can have
>> > >> >>>>>>>>>>>>>>>> many
>> > >> >>>>>>>>>>>>>>>> instantiations
>> > >> >>>>>>>>>>>>>>>> at the same time.
>> > >> >>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>> OK, I didn't get that that way ! I was looking for a way
>> > >> >>>>>>>>>>>>>>> to
>> > >> >>>>>>>>>>>>>>> plug
>> > >> >>>>>>>>>>>>>>> "my"
>> > >> >>>>>>>>>>>>>>> pc
>> > >> >>>>>>>>>>>>>>> at
>> > >> >>>>>>>>>>>>>>> the command line this way: -pc_type my_pc.
>> > >> >>>>>>>>>>>>>>> I already call PCSetType(pc, PCSHELL) and
>> > >> >>>>>>>>>>>>>>> PCShellSetName(pc,
>> > >> >>>>>>>>>>>>>>> "my_pc"):
>> > >> >>>>>>>>>>>>>>> maybe this already enables "-pc_type shell" or "-pc_type
>> > >> >>>>>>>>>>>>>>> my_pc"...
>> > >> >>>>>>>>>>>>>>> And
>> > >> >>>>>>>>>>>>>>> I
>> > >> >>>>>>>>>>>>>>> didn't know it ! :D I'll try that.
>> > >> >>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>> I was looking for a way to integrate "my" (external) pc
>> > >> >>>>>>>>>>>>>>> as
>> > >> >>>>>>>>>>>>>>> any
>> > >> >>>>>>>>>>>>>>> other
>> > >> >>>>>>>>>>>>>>> regular/existing petsc pc (bjacobi, ...) like a kind of
>> > >> >>>>>>>>>>>>>>> plugin
>> > >> >>>>>>>>>>>>>>> but
>> > >> >>>>>>>>>>>>>>> still
>> > >> >>>>>>>>>>>>>>> integrated to the cmd line: I believed PCRegister was
>> > >> >>>>>>>>>>>>>>> meant
>> > >> >>>>>>>>>>>>>>> for
>> > >> >>>>>>>>>>>>>>> that.
>> > >> >>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>> Indeed it is exactly what it is meant for.  Please try to
>> > >> >>>>>>>>>>>>>> follow
>> > >> >>>>>>>>>>>>>> my
>> > >> >>>>>>>>>>>>>> recipe
>> > >> >>>>>>>>>>>>>> and let us know when you get stuck.
>> > >> >>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>> Not sure if this is actually possible/enabled by the
>> > >> >>>>>>>>>>>>>>> API.
>> > >> >>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> For example
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> PCRegister("mypctype",mypc_create);
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> KSPCreate(&ksp1);
>> > >> >>>>>>>>>>>>>>>> KSPCreate(&ksp2);
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> KSPGetPC(ksp1,&pc1);
>> > >> >>>>>>>>>>>>>>>> KSPGetPC(ksp2,&pc2);
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> You don't want pc1 and pc2 to have the same dof
>> > >> >>>>>>>>>>>>>>>> multiplicities,
>> > >> >>>>>>>>>>>>>>>> domain
>> > >> >>>>>>>>>>>>>>>> intersections etc since they are associated with
>> > >> >>>>>>>>>>>>>>>> completely
>> > >> >>>>>>>>>>>>>>>> different
>> > >> >>>>>>>>>>>>>>>> linear systems and presumably meshes etc.
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> Presumably you want each of pc1, pc2, to have their own
>> > >> >>>>>>>>>>>>>>>> version
>> > >> >>>>>>>>>>>>>>>> of
>> > >> >>>>>>>>>>>>>>>> the
>> > >> >>>>>>>>>>>>>>>> data so you need to stick it directly in the PC, for
>> > >> >>>>>>>>>>>>>>>> example
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> PCMypcSetDOFMultiplicities(pc1,stuff);
>> > >> >>>>>>>>>>>>>>>> PCMypcSetDOFMultiplicities(pc2,otherstuff);
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>> OK, I must provide/implement PCMypcSetDOFMultiplicities
>> > >> >>>>>>>>>>>>> (add
>> > >> >>>>>>>>>>>>> data
>> > >> >>>>>>>>>>>>> to
>> > >> >>>>>>>>>>>>> pc
>> > >> >>>>>>>>>>>>> context) besides mypc_create: sounds logical.
>> > >> >>>>>>>>>>>>> Is this OK if PCMypcSetDOFMultiplicities is independent
>> > >> >>>>>>>>>>>>> from
>> > >> >>>>>>>>>>>>> mypc_create
>> > >> >>>>>>>>>>>>> ?
>> > >> >>>>>>>>>>>>> I guess yes.
>> > >> >>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>> From what I remember/understand, I got lost here: from the
>> > >> >>>>>>>>>>>>> jacobi
>> > >> >>>>>>>>>>>>> example,
>> > >> >>>>>>>>>>>>> mypc_create looks to be supposed (?) to call some kind of
>> > >> >>>>>>>>>>>>> Petsc*ComposeFunction to associate
>> > >> >>>>>>>>>>>>> PCMypcSetDOFMultiplicities
>> > >> >>>>>>>>>>>>> to
>> > >> >>>>>>>>>>>>> the
>> > >> >>>>>>>>>>>>> pc
>> > >> >>>>>>>>>>>>> (correct ?)... But, in the jacobi example,
>> > >> >>>>>>>>>>>>> PCJacobiGetUseAbs_Jacobi
>> > >> >>>>>>>>>>>>> is
>> > >> >>>>>>>>>>>>> associated to PCJacobiGetUseAbs_C...
>> > >> >>>>>>>>>>>> 
>> > >> >>>>>>>>>>>> the _C name is a string name that is used by PETSc to
>> > >> >>>>>>>>>>>> "find"
>> > >> >>>>>>>>>>>> the
>> > >> >>>>>>>>>>>> correct
>> > >> >>>>>>>>>>>> function pointer which is PCJacobiGetUseAbs_Jacobi. There
>> > >> >>>>>>>>>>>> is
>> > >> >>>>>>>>>>>> no
>> > >> >>>>>>>>>>>> _C function.
>> > >> >>>>>>>>>>> 
>> > >> >>>>>>>>>>> ?!
>> > >> >>>>>>>>>>> 
>> > >> >>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>> Which turns out not to be implemented according to git
>> > >> >>>>>>>>>>>>> grep
>> > >> >>>>>>>>>>>>> ?!
>> > >> >>>>>>>>>>>>> Got
>> > >> >>>>>>>>>>>>> lost
>> > >> >>>>>>>>>>>>> here (and looked for a way to pass user data directly to
>> > >> >>>>>>>>>>>>> PCRegister):
>> > >> >>>>>>>>>>>>> is
>> > >> >>>>>>>>>>>>> PCMypcSetDOFMultiplicities supposed to be
>> > >> >>>>>>>>>>>>> "attached/composed"
>> > >> >>>>>>>>>>>>> or
>> > >> >>>>>>>>>>>>> independent from the pc ?
>> > >> >>>>>>>>>>>> 
>> > >> >>>>>>>>>>>> composed.
>> > >> >>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>> git grep PCJacobiGetUseAbs_C
>> > >> >>>>>>>>>>>>> src/ksp/pc/impls/jacobi/jacobi.c:  ierr =
>> > >> >>>>>>>>>>>>> PetscObjectComposeFunction((PetscObject)pc,"PCJacobiGetUseAbs_C",PCJacobiGetUseAbs_Jacobi);CHKERRQ(ierr);
>> > >> >>>>>>>>>>>>> src/ksp/pc/impls/jacobi/jacobi.c:  ierr =
>> > >> >>>>>>>>>>>>> PetscUseMethod(pc,"PCJacobiGetUseAbs_C",(PC,PetscBool*),(pc,flg));CHKERRQ(ierr);
>> > >> >>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>> Sorry, for the short answer. Hope I succeeded to be clear
>> > >> >>>>>>>>>>>>> enough.
>> > >> >>>>>>>>>>>> 
>> > >> >>>>>>>>>>>> Just copy jacobi.c and start converting it over to your
>> > >> >>>>>>>>>>>> names
>> > >> >>>>>>>>>>>> and
>> > >> >>>>>>>>>>>> needs
>> > >> >>>>>>>>>>>> and you'll see it is actually really straightforward and
>> > >> >>>>>>>>>>>> not
>> > >> >>>>>>>>>>>> as
>> > >> >>>>>>>>>>>> complicated as you think it is.
>> > >> >>>>>>>>>>>> 
>> > >> >>>>>>>>>>>> Barry
>> > >> >>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> You write as many of these Set() functions as you need
>> > >> >>>>>>>>>>>>>>>> for
>> > >> >>>>>>>>>>>>>>>> your
>> > >> >>>>>>>>>>>>>>>> PCtype.
>> > >> >>>>>>>>>>>>>>>> You
>> > >> >>>>>>>>>>>>>>>> store the data inside the PC_Mypc data structure you
>> > >> >>>>>>>>>>>>>>>> create
>> > >> >>>>>>>>>>>>>>>> with
>> > >> >>>>>>>>>>>>>>>> mypc_create(). Look at PCCreate_Jacobi() and
>> > >> >>>>>>>>>>>>>>>> PCJacobiSetType
>> > >> >>>>>>>>>>>>>>>> for
>> > >> >>>>>>>>>>>>>>>> the
>> > >> >>>>>>>>>>>>>>>> pattern.
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> Barry
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>>> On Dec 28, 2017, at 9:34 AM, Franck Houssen
>> > >> >>>>>>>>>>>>>>>>> <franck.houssen at inria.fr>
>> > >> >>>>>>>>>>>>>>>>> wrote:
>> > >> >>>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>>> How to pass user data to a registered PC (PCRegister)
>> > >> >>>>>>>>>>>>>>>>> ?
>> > >> >>>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>>> At first, I expected the signature would be
>> > >> >>>>>>>>>>>>>>>>> "PetscErrorCode
>> > >> >>>>>>>>>>>>>>>>> PCRegister(const char sname[],PetscErrorCode
>> > >> >>>>>>>>>>>>>>>>> (*function)(PC,
>> > >> >>>>>>>>>>>>>>>>> void
>> > >> >>>>>>>>>>>>>>>>> *))"
>> > >> >>>>>>>>>>>>>>>>> but
>> > >> >>>>>>>>>>>>>>>>> it turns out to be "PetscErrorCode PCRegister(const
>> > >> >>>>>>>>>>>>>>>>> char
>> > >> >>>>>>>>>>>>>>>>> sname[],PetscErrorCode (*function)(PC))"
>> > >> >>>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>>> I try to integrate a PC that needs A but also other
>> > >> >>>>>>>>>>>>>>>>> informations
>> > >> >>>>>>>>>>>>>>>>> (dof
>> > >> >>>>>>>>>>>>>>>>> multiplicities, domain intersections that the user
>> > >> >>>>>>>>>>>>>>>>> must
>> > >> >>>>>>>>>>>>>>>>> provide).
>> > >> >>>>>>>>>>>>>>>>> I
>> > >> >>>>>>>>>>>>>>>>> guess
>> > >> >>>>>>>>>>>>>>>>> I can get A with PCGetOperators in the setup callback
>> > >> >>>>>>>>>>>>>>>>> of
>> > >> >>>>>>>>>>>>>>>>> the
>> > >> >>>>>>>>>>>>>>>>> PC.
>> > >> >>>>>>>>>>>>>>>>> But
>> > >> >>>>>>>>>>>>>>>>> still
>> > >> >>>>>>>>>>>>>>>>> not sure how to pass the other informations if I get
>> > >> >>>>>>>>>>>>>>>>> to
>> > >> >>>>>>>>>>>>>>>>> use
>> > >> >>>>>>>>>>>>>>>>> PCRegister.
>> > >> >>>>>>>>>>>>>>>>> I
>> > >> >>>>>>>>>>>>>>>>> looked a few examples in the bitbucket (jacobi:
>> > >> >>>>>>>>>>>>>>>>> src/ksp/ksp/examples/tutorials/ex12.c and
>> > >> >>>>>>>>>>>>>>>>> src/ksp/pc/impls/jacobi/jacobi.c
>> > >> >>>>>>>>>>>>>>>>> + SOR: src/ksp/pc/impls/sor/sor.c)... But didn't get
>> > >> >>>>>>>>>>>>>>>>> any
>> > >> >>>>>>>>>>>>>>>>> real
>> > >> >>>>>>>>>>>>>>>>> relevant
>> > >> >>>>>>>>>>>>>>>>> answer and feel a bit lost among the numerous pc !...
>> > >> >>>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>>> The idea is: for now I use PCSetType(pc, PCSHELL) and
>> > >> >>>>>>>>>>>>>>>>> PCShellSetContext
>> > >> >>>>>>>>>>>>>>>>> with a context who knows the extra needed informations
>> > >> >>>>>>>>>>>>>>>>> which
>> > >> >>>>>>>>>>>>>>>>> is
>> > >> >>>>>>>>>>>>>>>>> "not
>> > >> >>>>>>>>>>>>>>>>> so
>> > >> >>>>>>>>>>>>>>>>> handy" (that's OK as for now I am both the user and
>> > >> >>>>>>>>>>>>>>>>> the
>> > >> >>>>>>>>>>>>>>>>> PC
>> > >> >>>>>>>>>>>>>>>>> provider).
>> > >> >>>>>>>>>>>>>>>>> I'd
>> > >> >>>>>>>>>>>>>>>>> like to package this in a more convenient way (a
>> > >> >>>>>>>>>>>>>>>>> unique
>> > >> >>>>>>>>>>>>>>>>> and
>> > >> >>>>>>>>>>>>>>>>> "simple"
>> > >> >>>>>>>>>>>>>>>>> call
>> > >> >>>>>>>>>>>>>>>>> to PCRegister) to decouple the user from the PC
>> > >> >>>>>>>>>>>>>>>>> machinery.
>> > >> >>>>>>>>>>>>>>>>> 
>> > >> >>>>>>>>>>>>>>>>> Franck
>> > >> >>>> 
>> > >> >>>> 
>> > >> >>> 
>> > >> 
>> > 
>> 
> [ 25%] Built target geneoLib
> [ 50%] Built target geneo4PETSc
> [ 75%] Built target genlaplacian
> [100%] Built target gengraph
> Running tests...
> UpdateCTestConfiguration  from :/tmp/BUILD/DartConfiguration.tcl
> Parse Config file:/tmp/BUILD/DartConfiguration.tcl
> UpdateCTestConfiguration  from :/tmp/BUILD/DartConfiguration.tcl
> Parse Config file:/tmp/BUILD/DartConfiguration.tcl
> Test project /tmp/BUILD
> Constructing a list of tests
> Done constructing a list of tests
> Updating test list for fixtures
> Added 0 tests to meet fixture requirements
> Checking test dependency graph...
> Checking test dependency graph end
> test 1
>     Start 1: dummy
>
> 1: Test command: /tmp/BUILD/tst/dummy/dummy.sh
> 1: Test timeout computed to be: 1500
> 1: 
> 1: usage: geneo4PETSc is an implementation of the GenEO preconditioner with PETSc and SLEPc
> 1: 
> 1:   -phelp,         print help related to PETSc
> 1:   -shelp,         print help related to SLEPc
> 1:   --help,         print help related to geneo4PETSc
> 1:   --inpFileA F,   input file F describing the A matrix (mandatory)
> 1:                   - a unique ID (number) is attributed to each degree of freedom of the problem (described by A)
> 1:                   - each line of the input file stands for one element described like:
> 1:                     - a list of n degrees of freedom (mandatory)
> 1:                     - a "-" followed by a dense row ordered nxn matrix (optional)
> 1:                       note: if the dense matrix is not specified, a default one is built with --inpEps
> 1:                   you can pass arguments to the A matrix at the command line using prefix -A_
> 1:   --inpEps E,     epsilon used to tune the elementary matrix (defaults to 0.0001)
> 1:                   the default nDOF x nDOF elementary matrix is:
> 1:                   | 1.+eps,  alpha,  alpha,  alpha, ... |
> 1:                   |  alpha, 1.+eps,  alpha,  alpha, ... |
> 1:                   |  alpha,  alpha, 1.+eps,  alpha, ... | where alpha = -1./(nDOF-1)
> 1:                   |  alpha,  alpha,  alpha, 1.+eps, ... |
> 1:                   |    ...,    ...,    ...,    ..., ... |
> 1:   --inpLibA L A,  input file describing the A matrix provided as a library (.so)
> 1:                   L: path to the library /path/to/libinput.so
> 1:                   A: arguments to pass to the library (string)
> 1:                      for geneo4PETSc, A must be one token, but for L, A may be a list of (sub) tokens
> 1:                      the geneo4PETSc token will be the concatenation of all L sub tokens with #
> 1:                      example: --inpLibA /path/to/lib --param1=1#--param2=2#--param3=3
> 1:                   the library must provide and implement the following function
> 1:                     /*
> 1:                      * getInput: provide inputs (elements and associated matrices) for domain decomposition
> 1:                      *           each element is considered to be a set of n DOFs
> 1:                      * input parameter:
> 1:                      *   - args: command line arguments passed to L needed to create inputs (if any)
> 1:                      * output parameters:
> 1:                      *   - nbElem: number of elements
> 1:                      *   - nbNode: number of nodes
> 1:                      *   - elemPtr: list of element pointers (CSR format)
> 1:                      *   - elemIdx: list of element indices (CSR format)
> 1:                      *   - elemSubMat: list of matrice associated to each element
> 1:                      *                 each matrice is a dense row ordered nxn matrix (std::vector<double>)
> 1:                      * return:
> 1:                      *   - integer as return code (0 if OK, error code otherwise)
> 1:                      * linking:
> 1:                      *   - use extern "C" to get a C style decoration of symbols
> 1:                      */ 
> 1:                     int getInput(std::string const & args,
> 1:                                  unsigned int & nbElem, unsigned int & nbNode,
> 1:                                  std::vector<unsigned int> & elemPtr, std::vector<unsigned int> & elemIdx,
> 1:                                  std::vector<std::vector<double>> & elemSubMat)
> 1:                   you can pass arguments to the A matrix at the command line using prefix -A_
> 1:   --inpFileB F,   input file F describing the B vector
> 1:                   - a unique ID (number) is attributed to each degree of freedom of the problem (described by A)
> 1:                   - each line of the input file stands for one degree of freedom described like:
> 1:                     - one degree of freedom (mandatory)
> 1:                     - one value (optional)
> 1:                       note: if the value is not specified, the default one is 1.
> 1:                   you can pass arguments to the B vector at the command line using prefix -B_
> 1:   --metisDual,    use dual approach to partition input data with metis (partition according to elements)
> 1:                   each element belongs to one partition only
> 1:   --metisNodal,   use nodal approach to partition input data with metis (partition according to nodes)
> 1:                   each element belongs to a partition if one of its nodes does
> 1:                   each element can belong to several partitions
> 1:   --addOverlap L, add L layers of overlap at each domain borders
> 1:   --debug F,      create debug files for steps before and after solve (metis, A, B, X)
> 1:                   F = log (ASCII file), bin (binary file) or mat (matlab file)
> 1:   --verbose V,    dump A, B and X
> 1:                   V = 1: dumps X
> 1:                   V = 2: dumps A, B and X
> 1:   --timing,       print timing
> 1:   --shortRes,     print short result status (makes output stable for test suite checks)
> 1:   --cmdLine,      print command line at the end of the log
> 1: 
> 1: usage: implementation of GenEO (Domain Decomposition Method) with PETSc and SLEPc
> 1: 
> 1:   -geneo_lvl L1,L2 preconditioner with 2 levels L1 and L2
> 1:                    L1 =   ASM = Additive Schwarz Method
> 1:                    L1 =   RAS = Restricted Additive Schwarz method
> 1:                    L1 =  SRAS = Symmetrized Restricted Additive Schwarz method
> 1:                    L1 =  ORAS = Optimized Restricted Additive Schwarz method
> 1:                    L1 = SORAS = Symmetrized Optimized Restricted Additive Schwarz method
> 1:                    L2 =     0 = do not use GenEO (enables to compare 1-level with 2-levels methods)
> 1:                    L2 =     1 =                  GenEO-1 (1st level                    +  2d level [coarse space])
> 1:                    L2 =    H1 =           hybrid GenEO-1 (1st level [proj. fine space] +  2d level [coarse space])
> 1:                    L2 =    E1 = efficient hybrid GenEO-1 (initial guess [coarse space] + 1st level [proj. fine space])
> 1:                    L2 =     2 =                  GenEO-2 (1st level                    +  2d level [coarse space])
> 1:                    L2 =    H2 =           hybrid GenEO-2 (1st level [proj. fine space] +  2d level [coarse space])
> 1:                    L2 =    E2 = efficient hybrid GenEO-2 (initial guess [coarse space] + 1st level [proj. fine space])
> 1:                    you can pass arguments to PETSc / SLEPc solvers at the command line using prefix:
> 1:                      -igs_  for iterative   global solve:           -igs_ksp_atol 1.e-06 -igs_ksp_rtol 1.e-06
> 1:                      -dls1_ for      direct  local solve (level 1): -dls1_pc_factor_mat_solver_package mumps
> 1:                      -syl2_ for   sylvester  local solve (level 2): -syl2_ksp_view
> 1:                      -els2_ for       eigen  local solve (level 2): -els2_eps_max_it 100 -els2_eps_type arnoldi
> 1:                      -dcs2_ for      direct coarse solve (level 2): -dcs2_pc_factor_mat_solver_package mumps
> 1:                      -ubl2_ for upper bound  local solve (level 2): -ubl2_eps_max_it 100
> 1:                      -chks_ for customizing EPS solver used to check for SPD (--check)
> 1:                      -chkr_ for customizing basis vector used to check for rank (--check)
> 1:                    in case a solver diverges (for instance dcs2_), you may add to the command line:
> 1:                      -dcs2_ksp_view:        to see informations related to the solve
> 1:                      -mat_mumps_icntl_33 1: to ask mumps to compute the determinant (if mumps is used)
> 1:   -geneo_optim A   if an optimized method (ORAS, SORAS) is used as level 1, a robin condition is used
> 1:                    to modify the dirichlet matrix. robin = dirichlet + optim * neumann (optim defaults to 0.)
> 1:   -geneo_tau T     tau threshold (needed for GenEO - defaults to 0.1)
> 1:   -geneo_gamma G   gamma threshold (needed for GenEO - defaults to 10.)
> 1:   -geneo_cst       when using SORAS2 (or HSORAS) with GenEO2, do not allow local variations of tau and gamma
> 1:   -geneo_cut C     maximum number of local eigen vectors used to build Z (defaults to false)
> 1:   -geneo_no_syl    do not use Sylvester's law (inertia) to estimate the number of eigen values used to build Z
> 1:                    in case the eigen solver handles this estimation (krylovschur), you don't need to do it
> 1:   -geneo_offload   offload Z and E at master side (gather inputs, local solve, scatter outputs)
> 1:   -geneo_dbg F,D   create debug files
> 1:                    F = log (ASCII file), bin (binary file) or mat (matlab file)
> 1:                    D = 1: timing and residual
> 1:                    D = 2: global and local informations (timings may not be relevant because of dumps)
> 1:   -geneo_chk F     perform additional checks
> 1:                      - check partition of unity
> 1:                      - check matrices are SPD (with solvers prefixed chks_)
> 1:                      - check R from Z=QR (with solvers prefixed chkr_)
> 1:                    F = log (ASCII file), bin (binary file) or mat (matlab file)
> 1: 
> 1: Error: check argument KO
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type bjacobi --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type bjacobi --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: 44c44
> 1: < INFO: geneo0ASM pc, L1 mumps no-proj-fine-space
> 1: ---
> 1: > INFO: geneo1ASM pc, L1 mumps no-proj-fine-space, tau 0.10, L2 arpack mumps
> 1/1 Test #1: dummy ............................***Failed    0.66 sec
>
> 0% tests passed, 1 tests failed out of 1
>
> Total Test time (real) =   0.66 sec
>
> The following tests FAILED:
> 	  1 - dummy (Failed)
> Makefile:72: recipe for target 'test' failed
> [ 25%] Built target geneoLib
> [ 50%] Built target geneo4PETSc
> [ 75%] Built target genlaplacian
> [100%] Built target gengraph
> Running tests...
> UpdateCTestConfiguration  from :/tmp/BUILD/DartConfiguration.tcl
> Parse Config file:/tmp/BUILD/DartConfiguration.tcl
> UpdateCTestConfiguration  from :/tmp/BUILD/DartConfiguration.tcl
> Parse Config file:/tmp/BUILD/DartConfiguration.tcl
> Test project /tmp/BUILD
> Constructing a list of tests
> Done constructing a list of tests
> Updating test list for fixtures
> Added 0 tests to meet fixture requirements
> Checking test dependency graph...
> Checking test dependency graph end
> test 1
>     Start 1: dummy
>
> 1: Test command: /tmp/BUILD/tst/dummy/dummy.sh
> 1: Test timeout computed to be: 1500
> 1: 
> 1: usage: geneo4PETSc is an implementation of the GenEO preconditioner with PETSc and SLEPc
> 1: 
> 1:   -phelp,         print help related to PETSc
> 1:   -shelp,         print help related to SLEPc
> 1:   --help,         print help related to geneo4PETSc
> 1:   --inpFileA F,   input file F describing the A matrix (mandatory)
> 1:                   - a unique ID (number) is attributed to each degree of freedom of the problem (described by A)
> 1:                   - each line of the input file stands for one element described like:
> 1:                     - a list of n degrees of freedom (mandatory)
> 1:                     - a "-" followed by a dense row ordered nxn matrix (optional)
> 1:                       note: if the dense matrix is not specified, a default one is built with --inpEps
> 1:                   you can pass arguments to the A matrix at the command line using prefix -A_
> 1:   --inpEps E,     epsilon used to tune the elementary matrix (defaults to 0.0001)
> 1:                   the default nDOF x nDOF elementary matrix is:
> 1:                   | 1.+eps,  alpha,  alpha,  alpha, ... |
> 1:                   |  alpha, 1.+eps,  alpha,  alpha, ... |
> 1:                   |  alpha,  alpha, 1.+eps,  alpha, ... | where alpha = -1./(nDOF-1)
> 1:                   |  alpha,  alpha,  alpha, 1.+eps, ... |
> 1:                   |    ...,    ...,    ...,    ..., ... |
> 1:   --inpLibA L A,  input file describing the A matrix provided as a library (.so)
> 1:                   L: path to the library /path/to/libinput.so
> 1:                   A: arguments to pass to the library (string)
> 1:                      for geneo4PETSc, A must be one token, but for L, A may be a list of (sub) tokens
> 1:                      the geneo4PETSc token will be the concatenation of all L sub tokens with #
> 1:                      example: --inpLibA /path/to/lib --param1=1#--param2=2#--param3=3
> 1:                   the library must provide and implement the following function
> 1:                     /*
> 1:                      * getInput: provide inputs (elements and associated matrices) for domain decomposition
> 1:                      *           each element is considered to be a set of n DOFs
> 1:                      * input parameter:
> 1:                      *   - args: command line arguments passed to L needed to create inputs (if any)
> 1:                      * output parameters:
> 1:                      *   - nbElem: number of elements
> 1:                      *   - nbNode: number of nodes
> 1:                      *   - elemPtr: list of element pointers (CSR format)
> 1:                      *   - elemIdx: list of element indices (CSR format)
> 1:                      *   - elemSubMat: list of matrice associated to each element
> 1:                      *                 each matrice is a dense row ordered nxn matrix (std::vector<double>)
> 1:                      * return:
> 1:                      *   - integer as return code (0 if OK, error code otherwise)
> 1:                      * linking:
> 1:                      *   - use extern "C" to get a C style decoration of symbols
> 1:                      */ 
> 1:                     int getInput(std::string const & args,
> 1:                                  unsigned int & nbElem, unsigned int & nbNode,
> 1:                                  std::vector<unsigned int> & elemPtr, std::vector<unsigned int> & elemIdx,
> 1:                                  std::vector<std::vector<double>> & elemSubMat)
> 1:                   you can pass arguments to the A matrix at the command line using prefix -A_
> 1:   --inpFileB F,   input file F describing the B vector
> 1:                   - a unique ID (number) is attributed to each degree of freedom of the problem (described by A)
> 1:                   - each line of the input file stands for one degree of freedom described like:
> 1:                     - one degree of freedom (mandatory)
> 1:                     - one value (optional)
> 1:                       note: if the value is not specified, the default one is 1.
> 1:                   you can pass arguments to the B vector at the command line using prefix -B_
> 1:   --metisDual,    use dual approach to partition input data with metis (partition according to elements)
> 1:                   each element belongs to one partition only
> 1:   --metisNodal,   use nodal approach to partition input data with metis (partition according to nodes)
> 1:                   each element belongs to a partition if one of its nodes does
> 1:                   each element can belong to several partitions
> 1:   --addOverlap L, add L layers of overlap at each domain borders
> 1:   --debug F,      create debug files for steps before and after solve (metis, A, B, X)
> 1:                   F = log (ASCII file), bin (binary file) or mat (matlab file)
> 1:   --verbose V,    dump A, B and X
> 1:                   V = 1: dumps X
> 1:                   V = 2: dumps A, B and X
> 1:   --timing,       print timing
> 1:   --shortRes,     print short result status (makes output stable for test suite checks)
> 1:   --cmdLine,      print command line at the end of the log
> 1: 
> 1: usage: implementation of GenEO (Domain Decomposition Method) with PETSc and SLEPc
> 1: 
> 1:   -geneo_lvl L1,L2 preconditioner with 2 levels L1 and L2
> 1:                    L1 =   ASM = Additive Schwarz Method
> 1:                    L1 =   RAS = Restricted Additive Schwarz method
> 1:                    L1 =  SRAS = Symmetrized Restricted Additive Schwarz method
> 1:                    L1 =  ORAS = Optimized Restricted Additive Schwarz method
> 1:                    L1 = SORAS = Symmetrized Optimized Restricted Additive Schwarz method
> 1:                    L2 =     0 = do not use GenEO (enables to compare 1-level with 2-levels methods)
> 1:                    L2 =     1 =                  GenEO-1 (1st level                    +  2d level [coarse space])
> 1:                    L2 =    H1 =           hybrid GenEO-1 (1st level [proj. fine space] +  2d level [coarse space])
> 1:                    L2 =    E1 = efficient hybrid GenEO-1 (initial guess [coarse space] + 1st level [proj. fine space])
> 1:                    L2 =     2 =                  GenEO-2 (1st level                    +  2d level [coarse space])
> 1:                    L2 =    H2 =           hybrid GenEO-2 (1st level [proj. fine space] +  2d level [coarse space])
> 1:                    L2 =    E2 = efficient hybrid GenEO-2 (initial guess [coarse space] + 1st level [proj. fine space])
> 1:                    you can pass arguments to PETSc / SLEPc solvers at the command line using prefix:
> 1:                      -igs_  for iterative   global solve:           -igs_ksp_atol 1.e-06 -igs_ksp_rtol 1.e-06
> 1:                      -dls1_ for      direct  local solve (level 1): -dls1_pc_factor_mat_solver_package mumps
> 1:                      -syl2_ for   sylvester  local solve (level 2): -syl2_ksp_view
> 1:                      -els2_ for       eigen  local solve (level 2): -els2_eps_max_it 100 -els2_eps_type arnoldi
> 1:                      -dcs2_ for      direct coarse solve (level 2): -dcs2_pc_factor_mat_solver_package mumps
> 1:                      -ubl2_ for upper bound  local solve (level 2): -ubl2_eps_max_it 100
> 1:                      -chks_ for customizing EPS solver used to check for SPD (--check)
> 1:                      -chkr_ for customizing basis vector used to check for rank (--check)
> 1:                    in case a solver diverges (for instance dcs2_), you may add to the command line:
> 1:                      -dcs2_ksp_view:        to see informations related to the solve
> 1:                      -mat_mumps_icntl_33 1: to ask mumps to compute the determinant (if mumps is used)
> 1:   -geneo_optim A   if an optimized method (ORAS, SORAS) is used as level 1, a robin condition is used
> 1:                    to modify the dirichlet matrix. robin = dirichlet + optim * neumann (optim defaults to 0.)
> 1:   -geneo_tau T     tau threshold (needed for GenEO - defaults to 0.1)
> 1:   -geneo_gamma G   gamma threshold (needed for GenEO - defaults to 10.)
> 1:   -geneo_cst       when using SORAS2 (or HSORAS) with GenEO2, do not allow local variations of tau and gamma
> 1:   -geneo_cut C     maximum number of local eigen vectors used to build Z (defaults to false)
> 1:   -geneo_no_syl    do not use Sylvester's law (inertia) to estimate the number of eigen values used to build Z
> 1:                    in case the eigen solver handles this estimation (krylovschur), you don't need to do it
> 1:   -geneo_offload   offload Z and E at master side (gather inputs, local solve, scatter outputs)
> 1:   -geneo_dbg F,D   create debug files
> 1:                    F = log (ASCII file), bin (binary file) or mat (matlab file)
> 1:                    D = 1: timing and residual
> 1:                    D = 2: global and local informations (timings may not be relevant because of dumps)
> 1:   -geneo_chk F     perform additional checks
> 1:                      - check partition of unity
> 1:                      - check matrices are SPD (with solvers prefixed chks_)
> 1:                      - check R from Z=QR (with solvers prefixed chkr_)
> 1:                    F = log (ASCII file), bin (binary file) or mat (matlab file)
> 1: 
> 1: Error: check argument KO
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type bjacobi --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type bjacobi --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,1  --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,1  --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,1  -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,1  -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,H1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,H1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,H1 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,H1 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,H1 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,H1 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,E1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,E1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,E1 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,E1 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,E1 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl ASM,E1 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,2  --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,2  --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,2  -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,2  -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,H2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,H2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,H2 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,H2 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,H2 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,H2 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,E2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,E2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,E2 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,E2 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,E2 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA identity.inp --inpFileB B.inp -igs_pc_type geneo -geneo_lvl SORAS,E2 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type bjacobi --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type bjacobi --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,1  --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,1  --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,1  -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,1  -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,H1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,H1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,H1 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,H1 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,H1 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,H1 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,E1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,E1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,E1 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,E1 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,E1 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl ASM,E1 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,0 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,2  --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,2  --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,2  -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,2  -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,H2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,H2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,H2 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,H2 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,H2 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,H2 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,E2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,E2 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,E2 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,E2 --addOverlap 1 --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,E2 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisDual
> 1: 
> 1: mpirun  -n 2  /tmp/BUILD/src/geneo4PETSc --inpFileA tridiag.inp --inpEps 1. -igs_pc_type geneo -geneo_lvl SORAS,E2 -geneo_offload --verbose 2 -geneo_chk log -geneo_dbg log,2 --shortRes -igs_ksp_atol 1.e-12 -igs_ksp_rtol 1.e-12 -options_left no --metisNodal
> 1: 
> 1: OK
> 1/1 Test #1: dummy ............................   Passed   22.71 sec
>
> The following tests passed:
> 	dummy
>
> 100% tests passed, 0 tests failed out of 1
>
> Total Test time (real) =  22.71 sec


More information about the petsc-dev mailing list