error when install
I get some error during the install.
the following is the error message:
#!
running build
running build_src
running build_py
running build_ext
PETSC_DIR: /scratch/zhang/python/petsc-3.10.3
PETSC_ARCH: linux-openmpi-opblas
version: 3.10.3 release
integer-size: 32-bit
scalar-type: real
precision: double
language: CONLY
compiler: /scratch/zhang/python/openmpi-2.1.1/build/bin/mpicc
linker: /scratch/zhang/python/openmpi-2.1.1/build/bin/mpicc
building 'PETSc' extension
/scratch/zhang/python/openmpi-2.1.1/build/bin/mpicc -pthread -B /scratch/zhang/anaconda3/compiler_compat -Wl,--sysroot=/ -O3 -fPIC -fPIC -Wsign-compare -DNDEBUG -g -fwrapv-O3 -Wall -DPETSC_DIR=/scratch/zhang/python/petsc-3.10.3 -I/scratch/zhang/python/openmpi-2.1.1/build/include -I/scratch/zhang/python/hdf5-1.10.4/build/include -I/scratch/zhang/python/petsc-3.10.3/linux-openmpi-opblas/include -I/scratch/zhang/python/petsc-3.10.3/include -Isrc/include -I/scratch/zhang/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/scratch/zhang/anaconda3/include/python3.7m -c src/PETSc.c -o build/temp.linux-x86_64-3.7/linux-openmpi-opblas/src/PETSc.o
In file included from src/PETSc.c:4:0:
src/petsc4py.PETSc.c: In function ‘PyInit_PETSc’:
src/petsc4py.PETSc.c:284319:43: error: ‘SNESTEST’ undeclared (first use in this function)
__pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(SNESTEST); if (unlikely(!__pyx_t_7)) __PYX_ERR(37, 7, __pyx_L1_error)
^
src/petsc4py.PETSc.c:284319:43: note: each undeclared identifier is reported only once for each function it appears in
error: command '/scratch/zhang/python/openmpi-2.1.1/build/bin/mpicc' failed with exitstatus 1
can any one give me some help? Thanks.
Comments (11)
-
-
I agree, I don't know why I did this removal in maint.
-
It must have been the Christmas eggnog.
-
Actually commit a013d13 f does not fix the problem. It does not patch src/petsc4py.PETSc.c
-
Belay that. The Debian build tools must have taken some of Barry's eggnog. pdebuild is not updating petsc4py.PETSc.c (so build fails), but dpkg-buildpackage is (so build succeeds). Not petsc4py's problem :)
-
@drewparsons I should really make a new petsc4py patch release, but right now I'm in vacations until end of January. In the mean time, I would recommend to apply the following patch on top of petsc4py 3.10 release tarball.
diff --git a/src/PETSc.c b/src/PETSc.c index c6124b5..c60270a 100644 --- a/src/PETSc.c +++ b/src/PETSc.c @@ -1,4 +1,5 @@ #define MPICH_SKIP_MPICXX 1 #define OMPI_SKIP_MPICXX 1 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#define SNESTEST "test" #include "petsc4py.PETSc.c"
-
Hi @dalcinl, I did get commit a013d13 to work (the Debian build just needed to trigger autoreconf, I found the debhelper tools to do that). So it's all good in Debian, no need for the local definition of SNESTEST.
-
New release 3.10.1 should fix this issue.
-
- changed status to resolved
-
i still met the problem when install the new release 3.10.1 running build running build_src running build_py running build_ext PETSC_DIR: /home/geophyx/PETGEM/PETSc/petsc-3.9.4 PETSC_ARCH: Linux_gnu version: 3.9.4 release integer-size: 32-bit scalar-type: real precision: double language: CONLY compiler: /home/geophyx/PETGEM/MPI/bin/mpicc linker: /home/geophyx/PETGEM/MPI/bin/mpicc building 'PETSc' extension /home/geophyx/PETGEM/MPI/bin/mpicc -pthread -B /home/geophyx/anaconda3/compiler_compat -Wl,--sysroot=/ -fPIC -wd1572 -g -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DPETSC_DIR=/home/geophyx/PETGEM/PETSc/petsc-3.9.4 -I/home/geophyx/PETGEM/MPI/include -I/home/geophyx/PETGEM/PETSc/petsc-3.9.4/Linux_gnu/include -I/home/geophyx/PETGEM/PETSc/petsc-3.9.4/include -Isrc/include -I/home/geophyx/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/home/geophyx/anaconda3/include/python3.7m -c src/PETSc.c -o build/temp.linux-x86_64-3.7/Linux_gnu/src/PETSc.o icc: command line warning #10006: ignoring unknown option '-fwrapv' src/petsc4py.PETSc.c(145369): warning #266: function "MatISFixLocalEmpty" declared implicitly __pyx_t_2 = __pyx_f_8petsc4py_5PETSc_CHKERR(MatISFixLocalEmpty(__pyx_v_self->mat, __pyx_v_cfix)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(34, 1400, __pyx_L1_error) ^
src/petsc4py.PETSc.c(275338): error: identifier "PETSCVIEWERADIOS" is undefined __pyx_t_4 = __pyx_f_8petsc4py_5PETSc_S_(PETSCVIEWERADIOS); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 16, __pyx_L1_error) ^
src/petsc4py.PETSc.c(275350): error: identifier "PETSCVIEWERADIOS2" is undefined __pyx_t_4 = __pyx_f_8petsc4py_5PETSc_S_(PETSCVIEWERADIOS2); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 17, __pyx_L1_error) ^
src/petsc4py.PETSc.c(275736): error: identifier "PETSC_VIEWER_HDF5_XDMF" is undefined __pyx_t_4 = __Pyx_PyInt_From_PetscViewerFormat(PETSC_VIEWER_HDF5_XDMF); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 49, __pyx_L1_error) ^
src/petsc4py.PETSc.c(277868): error: identifier "MATLMVM" is undefined __pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(MATLMVM); if (unlikely(!__pyx_t_7)) __PYX_ERR(34, 67, __pyx_L1_error) ^
src/petsc4py.PETSc.c(279829): error: identifier "PCLMVM" is undefined __pyx_t_7 = __pyx_f_8petsc4py_5PETSc_S_(PCLMVM); if (unlikely(!__pyx_t_7)) __PYX_ERR(35, 47, __pyx_L1_error) ^
src/petsc4py.PETSc.c(283974): error: identifier "TAOBQNLS" is undefined __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_S_(TAOBQNLS); if (unlikely(!__pyx_t_1)) __PYX_ERR(39, 16, __pyx_L1_error) ^
src/petsc4py.PETSc.c(283998): error: identifier "TAOBNLS" is undefined __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_S_(TAOBNLS); if (unlikely(!__pyx_t_1)) __PYX_ERR(39, 18, __pyx_L1_error) ^
src/petsc4py.PETSc.c(284010): error: identifier "TAOBNTR" is undefined __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_S_(TAOBNTR); if (unlikely(!__pyx_t_1)) __PYX_ERR(39, 19, __pyx_L1_error) ^
src/petsc4py.PETSc.c(284022): error: identifier "TAOBNTL" is undefined __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_S_(TAOBNTL); if (unlikely(!__pyx_t_1)) __PYX_ERR(39, 20, __pyx_L1_error) ^
src/petsc4py.PETSc.c(284034): error: identifier "TAOBQNKLS" is undefined __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_S_(TAOBQNKLS); if (unlikely(!__pyx_t_1)) __PYX_ERR(39, 21, __pyx_L1_error) ^
src/petsc4py.PETSc.c(284046): error: identifier "TAOBQNKTR" is undefined __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_S_(TAOBQNKTR); if (unlikely(!__pyx_t_1)) __PYX_ERR(39, 22, __pyx_L1_error) ^
src/petsc4py.PETSc.c(284058): error: identifier "TAOBQNKTL" is undefined __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_S_(TAOBQNKTL); if (unlikely(!__pyx_t_1)) __PYX_ERR(39, 23, __pyx_L1_error) ^
compilation aborted for src/PETSc.c (code 2) error: command '/home/geophyx/PETGEM/MPI/bin/mpicc' failed with exit status 2
-
@geophyx You have to use a PETSc 3.10 release to build petsc4py 3.10. It seems you are using PETSc 3.9.
- Log in to comment
This is an unfortunate consequence of a change in PETSc patch release 3.10.3, for the time being, you should use branch maint of petsc4py's git repository, commit a013d13 fixes this issue.
@BarryFSmith I understand and welcome cleanups, but IMHO patch releases is not the place to make them.