Opened 3 years ago

Closed 2 years ago

#2949 closed user story (fixed)

PETSc 3.8 support

Reported by: GaryM Owned by:
Priority: normal Milestone: Iteration I4
Component: infrastructure Keywords:
Cc: Estimated pair-hours remaining: 0
Pair-hours expended on ticket: 4 Initial estimate of effort: 6
Editable by public: yes

Description

PETSc 3.8 was released https://www.mcs.anl.gov/petsc/download/index.html

Currently on 3.8.3

Change History (7)

comment:1 Changed 2 years ago by fcooper

Seem to be several problems supporting PETSc 3.8.

First:

In PETSc < 3.8, in PETSC_DIR/include/petscerror.h there is a block

#if !defined(__FUNCT__)
#define __FUNCT__ "User provided function"
#endif

which no longer exists in 3.8 and 3.9. This conflicts with Chaste's PetscException.hpp which uses __FUNCT__ in two macros.

Second:

At least one function appears to be deprecated, which is causing build errors:

error: ‘PetscErrorCode MatGetSubMatrix(Mat, IS, IS, MatReuse, _p_Mat**)’ is deprecated (declared at /home/robert/petsc-3.8.4_h5-1_8_20/include/petscmat.h:532) [-Werror=deprecated-declarations]
         MatGetSubMatrix(system_matrix, A11_local_rows, A11_local_rows,
         ^

comment:2 Changed 2 years ago by fcooper

The deprecated function looks to be a fairly straightforward fix: https://www.mcs.anl.gov/petsc/documentation/changes/38.html

Several methods have simply changed names, including

Renamed MatGetSubMatrix() to MatCreateSubMatrix()

comment:3 Changed 2 years ago by fcooper

  • Estimated pair-hours remaining changed from 6 to 4.5
  • Pair-hours expended on ticket changed from 0 to 1.5

09b57b6/git_repo implements the name-change for PETSc >= 3.8.

comment:4 Changed 2 years ago by fcooper

c24e795/git_repo Adds support for updated PETSc citations.

comment:5 Changed 2 years ago by fcooper

  • Estimated pair-hours remaining changed from 4.5 to 3
  • Pair-hours expended on ticket changed from 1.5 to 3

6691726/git_repo removes the PETSc macro __FUNCT__ and replaces it with the C++11 __func__.

__FUNCT__ was removed from PETSc in this commit, with the following message:

Remove the use and definition of __FUNCT__ throughout the code. Since all modern C/C++ compilers provide this functionality we no longer need to provide it manually in PETSc

__func__ accurately reports the function name, so error messages now look like:

DIVERGED_DTOL in function 'TestKspExceptionsForCoverage' on line 102 of file...

instead of

DIVERGED_DTOL in function 'User provided function' on line 102 of file...

comment:6 Changed 2 years ago by fcooper

All Continuous tests now pass on Lofty.

comment:7 Changed 2 years ago by fcooper

  • Estimated pair-hours remaining changed from 3 to 0
  • Pair-hours expended on ticket changed from 3 to 4
  • Resolution set to fixed
  • Status changed from new to closed

PETSc 3.8.4 version is now in the Lofty rotation for Saturday, and all tests have passed. Marked as light green on the wiki. Closing as fixed.

Note: See TracTickets for help on using tickets.