FYI. Sorry about the repost if it already made it through. I originally attached config.log but the attachment was rejected during moderation. Let me know if you need any info. I could send the log file to your email if need be (not sure if you got it the last time).
I will look into the comment on KSPGMRESSetRestart and propose a solution soon. I am traveling this week and might not have enough time to go over this until the weekend. Best, Vijay ---------- Forwarded message ---------- From: Vijay S. Mahadevan <[email protected]> Date: Tue, Sep 6, 2011 at 9:39 AM Subject: Re: [deal.II] Patch for working with petsc/slepc -dev. To: "Toby D. Young" <[email protected]> Cc: [email protected] Toby, > If you run svn update, acloca, and autoconf, at least petsc-dev should > compile ok for you. Please let me know if that works! I checked out a new repository and tried to configure/make. I see that config.h has "DEAL_II_USE_PETSC_VERSION_DEV" undefined even though I am using the dev version of petsc/slepc. I've attached config.log. I haven't had time to look into this yet. Let me know if you need any other information. > We never check for SLEP_ARCH or SLEPC_VERSION directly in the wrapper > classes. It is assumed (at configuration time) that the PETSC_VERSION > and SLEPC_VERSION are identical. If not, an error is thrown. Therefore, > to keep the link between petsc and slepc obvious, and to make the > interface simple, only PETSc checks are performed. An example is in > slepc_solver.cc This is usually true. But if the petsc version differs only by a patch, it might not necessarily break a slepc version. So it is not a one-to-one petsc and slepc release cycle. Also, I haven't tried configure a petsc-dev version with a slepc-release version or vice-versa. The configure script for slepc may disallow this but it might be worth confirming. > You will note the changes I have made to your patches. The reason for > this is that the order of checking always allows that *later* versions > of PETSc/SLEPc will work with the current interface; unless of course, > PETSc change their interface again ;-) The check on whether it is a dev version alone might not be sufficient for the *Destroy(&x) family of routines. This is because in the next version of petsc, these changes will be part of the release and your code branch will have compiler errors. You probably want to check for DEAL_II_PETSC_VERSION_GTE(3,2,0) also. I will look more into the changes and let you know if something else breaks. Thanks, Vijay On Tue, Sep 6, 2011 at 4:43 AM, Toby D. Young <[email protected]> wrote: > > Vijay, > > I have patched in the changes to deal.II subversion and now it is > possible to use petsc-dev. Sadly, I still need to fix the header links > with slepc-dev; I suspect this can be done quite quickly. > > I have been suing petsc-dev and slepc-dev with deal.II for quite some > time, however, not in the last six months (which is why part of the > interface was missing). > > If you run svn update, acloca, and autoconf, at least petsc-dev should > compile ok for you. Please let me know if that works! > > Here are some comments: > >> 1) common/Make.global_options: need to check for slepc version > 3.1 >> or release. Currently I added a check only for major version of "3" in >> order to include $(DEAL_II_SLEPC_DIR)/$(DEAL_II_PETSC_ARCH)/include in >> the path. > > We never check for SLEP_ARCH or SLEPC_VERSION directly in the wrapper > classes. It is assumed (at configuration time) that the PETSC_VERSION > and SLEPC_VERSION are identical. If not, an error is thrown. Therefore, > to keep the link between petsc and slepc obvious, and to make the > interface simple, only PETSc checks are performed. An example is in > slepc_solver.cc > >> 2) The typedef for PetscTruth is redefined in petsc_vector_base.h and >> petsc_matrix_base.h. This can be consolidated into a single include >> file. I was not sure if the config.h.in was an appropriate place to >> add this under the umbrella of DEAL_HAVE_PETSC mainly because it >> requires the inclusion of petscsys.h. > > This looks like a good idea! I will have a think about this. > >> 3) I was not entirely sure if the new copy mode option for >> "ISCreateGeneral" makes a difference unless the index set is actually >> copied. By default, I left them as PETSC_COPY_VALUES. > > That's the right thing to do... > >> On a side note, when modifying the petsc_solver.cc source file, I >> noticed a comment regarding KSPGMRESSetRestart. It is not a macro >> anymore and I saw couple of comments in petsc_solver.cc that indicate >> this. You could perform a version based code switch by defaulting to >> the existing code for old versions and directly using the method in >> future releases and the dev version. Jed might be able to correct me >> in case I'm off. > > I will look into this. In any case, we have a little time getting this > right (until the next deal.II release). > > Thanks again for you hard work and for sharing it with us; we really > do appreceate that! Normally I keep up-to-date with PETSc/SLEPc but, as > sketched above, the last six months I have not been able to do this - > your patch made it possible. > > You will note the changes I have made to your patches. The reason for > this is that the order of checking always allows that *later* versions > of PETSc/SLEPc will work with the current interface; unless of course, > PETSc change their interface again ;-) It is also always worth > remembering that the latest petsc-release is not always a complete issue > of petsc-dev. > > I will try to get the header files linking correctly for SLEPc. Do you > know exactly what changes need to be made? Please let me know if so, > and I will check and patch them in. > > Best, > Toby > > > > -- > Toby D. Young > > Assistant Professor Philosophy & Physics > Polish Academy of Sciences > www: http://www.ippt.gov.pl/~tyoung > skype: stenografia > > _______________________________________________ > dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii > _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
