I guess one way to work around this issue is: diff --git a/include/petscksp.h b/include/petscksp.h index b75810337b..a201c97d3e 100644 --- a/include/petscksp.h +++ b/include/petscksp.h @@ -450,8 +450,6 @@ typedef enum {/* converged */ KSP_DIVERGED_NANORINF = -9, KSP_DIVERGED_INDEFINITE_MAT = -10, KSP_DIVERGED_PC_FAILED = -11, - KSP_DIVERGED_PCSETUP_FAILED_DEPRECATED = -11, - KSP_CONVERGED_ITERATING = 0} KSPConvergedReason; PETSC_EXTERN const char *const*KSPConvergedReasons; Satish
On Sun, 22 Dec 2019, Balay, Satish wrote: > This error is strange. The issue does not come up in petsc build - but in > petsc4py build. > > I see the petsc4py build is with: > > >>>>>> > + CFLAGS=' -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches > -m64 -mtune=generic' > > mpicc -pthread -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 > -mtune=generic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 > -mtune=generic -O3 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 > -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 > -grecord-gcc-switches -m64 -mtune=generic -O2 -g -pipe -Wall > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong > --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -O2 > -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong > --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic > -DPETSC_DIR=/usr -I/usr/include/openmpi-x86_64 > -I/usr/include/openmpi-x86_64/hypre > -I/usr/lib64/gfortran/modules/openmpi/petsc > -I/usr/include/openmpi-x86_64/petsc -I/usr/include -Isrc/include > -I/usr/lib64/python3.6/site-packages/numpy/core/include > -I/usr/include/python3.6m -c src/PETSc.c -o > build/temp.linux-x86_64-3.6/src/PETSc.o > <<< > > I've attempted a petsc+petsc4py build using both the following on fedora-31 > [with petsc-3.12/maint] - and there were no errors > > >>> > CFLAGS=' -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches > -m64 -mtune=generic' > > CFLAGS='-fexceptions -fPIC -fstack-protector-strong -g -grecord-gcc-switches > -m64 -mtune=generic -O2 -O3 --param=ssp-buffer-size=4 -pipe -pthread -Wall > -Wp,-D_FORTIFY_SOURCE=2' > > <<<<< > > gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1) > > petscconf.h has: > > #define PETSC_DEPRECATED_ENUM(why) __attribute((deprecated)) > #define PETSC_DEPRECATED_FUNCTION(why) __attribute((deprecated)) > #define PETSC_DEPRECATED_MACRO(why) _Pragma(why) > #define PETSC_DEPRECATED_TYPEDEF(why) __attribute((deprecated)) > > > Satish > > On Sun, 22 Dec 2019, Smith, Barry F. wrote: > > > > > Please send configure.log and > > /usr/include/openmpi-x86_64/petsc/petscconf.h > > > > In theory our configure checks if deprecated can be used for Enums but > > perhaps our test is not complete. > > > > Barry > > > > > > > On Dec 22, 2019, at 12:01 PM, Antonio Trande <anto.tra...@gmail.com> > > > wrote: > > > > > > Hi all. > > > > > > I don't know of these are errors related to petsc4py or to PETSc, i'm > > > writing a mail to this mailing list too. > > > Issue reported to petsc4py folks: > > > https://bitbucket.org/petsc/petsc4py/issues/133/compiling-petsc4py-3110-against-petsc-3113 > > > > > > > > > In file included from /usr/include/openmpi-x86_64/petsc/petscsys.h:14:0, > > > from /usr/include/openmpi-x86_64/petsc/petscbag.h:4, > > > from /usr/include/openmpi-x86_64/petsc/petsc.h:5, > > > from src/petsc4py.PETSc.c:591, > > > from src/PETSc.c:4: > > > /usr/include/openmpi-x86_64/petsc/petscconf.h:85:36: error: expected ',' > > > or '}' before '__attribute' > > > #define PETSC_DEPRECATED_ENUM(why) __attribute((deprecated)) > > > ^ > > > /usr/include/openmpi-x86_64/petsc/petscksp.h:430:76: note: in expansion > > > of macro 'PETSC_DEPRECATED_ENUM' > > > #define KSP_DIVERGED_PCSETUP_FAILED_DEPRECATED > > > KSP_DIVERGED_PCSETUP_FAILED PETSC_DEPRECATED_ENUM("Use > > > KSP_DIVERGED_PC_FAILED (since v3.11)") > > > > > > ^ > > > /usr/include/openmpi-x86_64/petsc/petscksp.h:452:15: note: in expansion > > > of macro 'KSP_DIVERGED_PCSETUP_FAILED_DEPRECATED' > > > KSP_DIVERGED_PCSETUP_FAILED_DEPRECATED = -11, > > > ^ > > > In file included from src/PETSc.c:4:0: > > > src/petsc4py.PETSc.c: In function > > > '__pyx_f_8petsc4py_5PETSc_KSP_Converged': > > > src/petsc4py.PETSc.c:35723:22: error: 'KSP_CONVERGED_ITERATING' > > > undeclared (first use in this function) > > > (__pyx_v_r[0]) = KSP_CONVERGED_ITERATING; > > > ^ > > > src/petsc4py.PETSc.c:35723:22: note: each undeclared identifier is > > > reported only once for each function it appears in > > > src/petsc4py.PETSc.c: In function > > > '__pyx_pf_8petsc4py_5PETSc_3KSP_50callConvergenceTest': > > > src/petsc4py.PETSc.c:171473:20: error: 'KSP_CONVERGED_ITERATING' > > > undeclared (first use in this function) > > > __pyx_v_reason = KSP_CONVERGED_ITERATING; > > > ^ > > > src/petsc4py.PETSc.c: In function > > > '__pyx_pf_8petsc4py_5PETSc_3KSP_112getConvergedReason': > > > src/petsc4py.PETSc.c:174687:20: error: 'KSP_CONVERGED_ITERATING' > > > undeclared (first use in this function) > > > __pyx_v_reason = KSP_CONVERGED_ITERATING; > > > ^ > > > src/petsc4py.PETSc.c: In function '__pyx_pymod_exec_PETSc': > > > src/petsc4py.PETSc.c:303605:51: error: 'KSP_CONVERGED_ITERATING' > > > undeclared (first use in this function) > > > __pyx_t_7 = > > > __Pyx_PyInt_From_KSPConvergedReason(KSP_CONVERGED_ITERATING); if > > > (unlikely(!__pyx_t_7)) __PYX_ERR(37, 64, __pyx_L1_error) > > > ^ > > > error: command 'mpicc' failed with exit status > > > > > > > > > -- > > > --- > > > Antonio Trande > > > Fedora Project > > > mailto 'sagitter at fedoraproject dot org' > > > GPG key: 0x7B30EE04E576AA84 > > > GPG key server: https://keys.openpgp.org/ > > > > > >