libMesh / libmesh

libMesh github repository
http://libmesh.github.io
GNU Lesser General Public License v2.1
659 stars 286 forks source link

Temporary workaround for MOOSE apps (mis)using LibmeshPetscCall #3984

Closed nmnobre closed 1 week ago

moosebuild commented 3 weeks ago

Job Coverage, step Generate coverage on b5e4298 wanted to post the following:

Coverage

Coverage did not change

Full coverage report

This comment will be updated on new commits.

roystgnr commented 3 weeks ago

Copied to https://github.com/libMesh/libmesh/tree/farscape_workaround_test so we can test this in the MOOSE PRs. Please remind me to delete that when we're done with it.

nmnobre commented 1 week ago

Is this what just passed in idaholab/moose#28969?

Affirm.

lindsayad commented 1 week ago

Such a simple process 😆

jwpeterson commented 5 days ago

@nmnobre I think this PR caused a failure in the "Test No Exceptions" testing that we do for the devel -> master merge, see e.g. here. There are many error error messages from the compiler, but some representative ones are:

In file included from ./include/libmesh/petsc_shell_matrix.h:33,
                 from ./include/libmesh/petsc_matrix_shell_matrix.h:26,
                 from ./include/libmesh/static_condensation.h:26,
                 from ../src/base/dof_map.C:42:
./include/libmesh/petsc_vector.h: In constructor 'libMesh::PetscVector<T>::PetscVector(Vec, const libMesh::Parallel::Communicator&)':
./include/libmesh/petsc_vector.h:598:3: error: there are no arguments to 'LibmeshPetscCall' that depend on a template parameter, so a declaration of 'LibmeshPetscCall' must be available [-fpermissive]
   LibmeshPetscCall(VecGetLocalSize(_vec, &petsc_local_size));
   ^~~~~~~~~~~~~~~~
./include/libmesh/petsc_vector.h:598:3: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)

And many others along the same lines:

./include/libmesh/petsc_vector.h:602:3: error: there are no arguments to 'LibmeshPetscCall' that depend on a template parameter, so a declaration of 'LibmeshPetscCall' must be available [-fpermissive]
   LibmeshPetscCall(VecGetType(_vec, &ptype));
   ^~~~~~~~~~~~~~~~
./include/libmesh/petsc_vector.h:637:7: error: there are no arguments to 'LibmeshPetscCall' that depend on a template parameter, so a declaration of 'LibmeshPetscCall' must be available [-fpermissive]
       LibmeshPetscCall(VecGetLocalToGlobalMapping(_vec, &mapping));
       ^~~~~~~~~~~~~~~~

I see from your previous comment that reverting this PR is part of the 8 step plan so I guess the issue will eventually be resolved, but we won't have any devel -> master merges in the meantime.

nmnobre commented 4 days ago

The errors make sense, the temporary definition is only on the with-exceptions code path. I'm at SC24, I'll try to push a patch this afternoon (or feel free to go ahead with a patch).

jwpeterson commented 4 days ago

It's not urgent for me (and I don't know exactly what the fix is!) so I'll let you take care of it when you have some time. Thanks!