[petsc-users] PETSc initialization error

Sam Guo sam.guo at cd-adapco.com
Sat Jun 20 00:32:05 CDT 2020


Dear PETSc team,
   When I called SLEPc multiple time, I eventually got following error:

MPI operation not supported by PETSc's sequential MPI wrappers
[0]PETSC ERROR: #1 PetscInitialize() line 967 in
../../../petsc/src/sys/objects/pinit.c
[0]PETSC ERROR: #2 SlepcInitialize() line 262 in
../../../slepc/src/sys/slepcinit.c
[0]PETSC ERROR: #3 SlepcInitializeNoPointers() line 359 in
../../../slepc/src/sys/slepcinit.c
PETSC ERROR: Logging has not been enabled.
You might have forgotten to call PetscInitialize().

  I debugged: it is because of following in petsc/src/sys/mpiuni/mpi.c

if (num_attr >= MAX_ATTR)

in function int MPI_Comm_create_keyval(MPI_Copy_function
*copy_fn,MPI_Delete_function *delete_fn,int *keyval,void *extra_state)

num_attr is declared static and keeps increasing every
time MPI_Comm_create_keyval is called.

I am using petsc 3.11.3 but found 3.13.2 has the same logic.

Is this a bug or I didn't use it correctly?

Thanks,
Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200619/31be14af/attachment.html>


More information about the petsc-users mailing list