- edited description
petsc4py.PETSc.c: No such file or directory
Running
python setup.py build_ext
after doing a git clone on the master branch. Is there a missing file?
running build_ext
PETSC_DIR: /opt/petsc/petsc-devel-dbg
PETSC_ARCH:
version: 3.7.5 development
integer-size: 32-bit
scalar-type: real
precision: double
language: CXXONLY
compiler: /opt/petsc/petsc-devel-dbg/bin/mpicxx
linker: /opt/petsc/petsc-devel-dbg/bin/mpicxx
building 'PETSc' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
/opt/petsc/petsc-devel-dbg/bin/mpicxx -pthread -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -g -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DPETSC_DIR=/opt/petsc/petsc-devel-dbg -I/opt/petsc/petsc-devel-dbg/include -Isrc/include -I/opt/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/opt/anaconda3/include/python3.6m -c src/PETSc.c -o build/temp.linux-x86_64-3.6/src/PETSc.o
src/PETSc.c:3:28: fatal error: petsc4py.PETSc.c: No such file or directory
compilation terminated.
error: command '/opt/petsc/petsc-devel-dbg/bin/mpicxx' failed with exit status 1
Comments (5)
-
reporter -
You have to install Cython to generate the missing sources. Anyway,
build_ext
will not do what you expect, i.e. using petsc4py from the source tree. You should install withpython setup.py install --user
, which does not require root. -
reporter I installed cython and numpy for python2 and switched to the
maint
branch for petsc and petsc4py. I ran the install as you suggested and successfully installed locally.According to the help for this setup.py script, build_ext is enabled. If it doesn't work as expected, perhaps you can disable its use.
-
reporter - changed status to resolved
See the prior comment.
-
I cannot disable the use of
build_ext
, as this will break the build and install process. The command works just fine, but because of the layout of source files, you simply cannot build petsc4py inplace. - Log in to comment