Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error due to petsc compatibility #3767

Open
agiordan96 opened this issue Jan 16, 2024 · 12 comments
Open

Installation error due to petsc compatibility #3767

agiordan96 opened this issue Jan 16, 2024 · 12 comments

Comments

@agiordan96
Copy link

agiordan96 commented Jan 16, 2024

Hello all,

while installing libMesh, I have been facing with the following (see attached log file) 6 warnings and 1 error (follows). I am using Apple M1 Max, Sonoma 14.2.1; petsc 3.20.3

../LIBMESH/src/solvers/petsc_linear_solver.C:1570:10: error: duplicate case value: 'KSP_CONVERGED_CG_CONSTRAINED' and 'KSP_CONVERGED_STEP_LENGTH' both equal '6'
    case KSP_CONVERGED_STEP_LENGTH     : return CONVERGED_STEP_LENGTH;

While installing, I get the following errors:

../LIBMESH/src/solvers/petscdmlibmeshimpl.C:770:112: error: no member named 'type' in '_p_PetscObject'
    SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM of type %s, not of type %s", ((PetscObject)dm)->type, DMLIBMESH);
../LIBMESH/src/solvers/petscdmlibmeshimpl.C:817:112: error: no member named 'type' in '_p_PetscObject' SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM of type %s, not of type %s", ((PetscObject)dm)->type, DMLIBMESH);
../LIBMESH/src/solvers/petscdmlibmeshimpl.C:899:112: error: no member named 'type' in '_p_PetscObject'
    SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM of type %s, not of type %s", ((PetscObject)dm)->type, DMLIBMESH);

config.log

This looks to me somewhat referred to Refs #3416 and previously resolved compatibility issues. So why am I still getting this error? Anyone knows how to solve it?

Thanks!:)

@agiordan96 agiordan96 changed the title Installation: 6 warnings and 1 error generated Installation error due to petsc compatibility Jan 16, 2024
@jwpeterson
Copy link
Member

This is likely due to using too new a version of PETSc (3.20.3 was tagged Dec 30 2023). If it's not essential for you to use that version, then you can likely fix the problem by using a 3.19.x PETSc...

@agiordan96
Copy link
Author

Thanks for your quick reply!

It is unfortunately necessary... I could use 3.20.2, but I dont know if it fixes the issue. Are you by any chance aware of how long it will take to make libMesh compatible with the new version of petsc?

@lindsayad
Copy link
Member

I am on PETSc main, commit e4cb84850f3, and I have no problem building libMesh

@jwpeterson
Copy link
Member

It's hard to say, you can likely fix the duplicate case value error simply by commenting out the duplicate. Fixing the petscdmlibmeshimpl.C code is trickier because it uses "private" struct members like _p_PetscObject directly. Luckily it's not really used by anything, so you may have some luck just commenting out lines there as well.

@lindsayad
Copy link
Member

lindsayad commented Jan 16, 2024

What libMesh hash are you using? Line 770 of petscdmlibmeshimpl.C in current libMesh devel is not the line you pasted, and the last time that file was modified was on August 8th, so it seems that you're using a libMesh that is at least a few months old

@jwpeterson
Copy link
Member

jwpeterson commented Jan 16, 2024

you're using a libMesh that is at least a few months old

Oops, guess I should have asked that question first!

@agiordan96
Copy link
Author

And I guess I should have checked what version I was downloading. I used 1.6.2, as in the IBAMR instructions I am reading that was (literally called) the latest.
Will try with newer version and let you know tomorrow at the latest, thank you all for helping this quickly!

@agiordan96
Copy link
Author

Unfortunately, the error persists with libMesh version 1.7.1....

``../LIBMESH/src/solvers/petscdmlibmeshimpl.C:822:120: error: no member named 'type' in '_p_PetscObject'
LIBMESH_SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM of type %s, not of type %s", ((PetscObject)dm)->type, DMLIBMESH);

../LIBMESH/src/solvers/petscdmlibmeshimpl.C:904:120: error: no member named 'type' in '_p_PetscObject'
LIBMESH_SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM of type %s, not of type %s", ((PetscObject)dm)->type, DMLIBMESH);

../LIBMESH/src/solvers/petscdmlibmeshimpl.C:904:120: error: no member named 'type' in '_p_PetscObject'
LIBMESH_SETERRQ2(((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONG, "DM of type %s, not of type %s", ((PetscObject)dm)->type, DMLIBMESH);

Any ideas, other than downgrading petsc to 3.20.2?

@jwpeterson
Copy link
Member

Any ideas, other than downgrading petsc to 3.20.2?

Yes, you need to use libmesh master if you want to use that new of a PETSc. The 1.7.1 release it itself also quite old.

@agiordan96
Copy link
Author

Meaning the master would work with 3.20.3 or 3.20.2?

@jwpeterson
Copy link
Member

Yes, according to @lindsayad's (#3767 (comment)) that will work.

@lindsayad
Copy link
Member

I will not guarantee that it will work as using PETSc main results in a version that is effectively infinite so it will have different comparison results in macros, but it is certainly more likely to work. If it works with PETSc main but not with the 3.20.3 release, then I would definitely submit fixes to support you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants