Closed Drinausaur closed 2 years ago
It compiles with the newest petsc from theur main branch, I tested today. What's not correct?
This is the error I get when building the sparselizard AUR package:
https://aur.archlinux.org/packages/sparselizard
/home/fabien/.cache/yay/sparselizard/src/sparselizard-v.2021.11/src/mesh/petscmesh.cpp: In constructor ‘petscmesh::petscmesh(std::string)’:
/home/fabien/.cache/yay/sparselizard/src/sparselizard-v.2021.11/src/mesh/petscmesh.cpp:40:65: error: cannot convert ‘PetscBool’ to ‘const char*’
40 | DMPlexCreateFromFile(PETSC_COMM_SELF, filename.c_str(), PETSC_TRUE, &mypetscmesh);
| ^~~~~~~~~~
| |
| PetscBool
In file included from /home/fabien/.cache/yay/sparselizard/src/sparselizard-v.2021.11/src/mesh/petscmesh.h:17,
from /home/fabien/.cache/yay/sparselizard/src/sparselizard-v.2021.11/src/mesh/petscmesh.cpp:1:
/opt/petsc/linux-c-opt/include/petscdmplex.h:191:74: note: initializing argument 3 of ‘PetscErrorCode DMPlexCreateFromFile(MPI_Comm, const char*, const char*, PetscBool, _p_DM**)’
191 | PETSC_EXTERN PetscErrorCode DMPlexCreateFromFile(MPI_Comm, const char[], const char[], PetscBool, DM *);
| ^~~~~~~~~~~~
The 3.17 version uses the plexname[]
argument :
https://gitlab.com/petsc/petsc/-/blob/v3.17.0/src/dm/impls/plex/plexcreate.c#L4671
So I suppose the
#if PETSC_VERSION_GE(3, 16, 3)
line should be replaced with
#if PETSC_VERSION_GE(3, 16, 3) or 3.17
EDIT:
I realized that _GE certainly stands for "greater or equal"... So I don't know, why this does not work, I'm using 3.17.1-1
I ll check on Monday. Or merge your PR before that if you can check until then
Ok, I think I understand what happened.
sparselizard master does certainly work. But not the latest release ( 2021.11-1 ). ( It does not contain the #if PETSC_VERSION_GE
line )
The AUR package is set for the latest release. In order to repair the AUR package, I think we would need a new tag ( so a new sparselizard version ? ) You just created a new subversion, maybe you could tag it, so we can use it ? ( it is literally the last commit right now )
@pointhi certainly knows what would be the best option.
( On our side we'll check If sparselizard master still works with our code, as we only tested the release )
Until we repair it, sparselizard cannot be installed using the package.
Indeed! And we discussed with @pointhi a new release is needed. Let me know if it works for you as it is now. If yes I ll make a new release. If no I'll fix it then make a release.
@halbux I'm pretty sure we need a new git tag, which then allows me to bump the AUR package version
Ok. Will do this week.
@pointhi @Drinausaur New relase done.
I updated the AUR package: https://aur.archlinux.org/packages/sparselizard
This is not valid for petsc 3.17 which is now released, and is the default in the AUR. 3.16.3 cannot be easily installed on Arch anymore.
( in
src/mesh/petscmesh.cpp
)Apparently petsc 3.17 should use the same line as 3.16.3