install on Mac OS 10.11
Issue #19
resolved
running
python setup.py install
gives:
#!
running install
invalid PETSC_ARCH: arch_complex (ignored)
running build
running build_src
cythonizing 'slepc4py.SLEPc.pyx' -> 'slepc4py.SLEPc.c'
Error compiling Cython file:
------------------------------------------------------------
...
# initialize SLEPC
CHKERR( SlepcInitialize(NULL, NULL, NULL, NULL) )
# register finalization function
if Py_AtExit(finalize) < 0:
PySys_WriteStderr("warning: could not register %s with Py_AtExit()",
"SlepcFinalize()")
^
------------------------------------------------------------
SLEPc/SLEPc.pyx:178:26: Python object cannot be passed as a varargs parameter
error: Cython failure: 'slepc4py.SLEPc.pyx' -> 'slepc4py.SLEPc.c'
If I change:
#!
PySys_WriteStderr("warning: could not register %s with Py_AtExit()",
"SlepcFinalize()")
to
#!
PySys_WriteStderr("warning: could not register SlepcFinalize() with Py_AtExit()")
gives:
#!
running install
running build
running build_src
running build_py
running build_ext
SLEPC_DIR: /usr/local/Cellar/slepc/3.6.2_1/complex
PETSC_DIR: /usr/local/Cellar/petsc/3.6.3_4/complex
PETSC_ARCH:
version: 3.6.3 release
scalar-type: complex
precision: double
language: CONLY
compiler: /usr/local/bin/mpicc
linker: /usr/local/bin/mpicc
building 'SLEPc' extension
/usr/local/bin/mpicc -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -O -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -DPETSC_DIR=/usr/local/Cellar/petsc/3.6.3_4/complex -DSLEPC_DIR=/usr/local/Cellar/slepc/3.6.2_1/complex -I/usr/local/Cellar/slepc/3.6.2_1/complex/include -I/usr/local/Cellar/open-mpi/1.10.2/include -I/usr/local/opt/fftw/include -I/usr/local/opt/hdf5/include -I/usr/local/opt/netcdf/include -I/usr/local/opt/metis/include -I/usr/local/opt/parmetis/include -I/usr/local/opt/superlu_dist/include/superlu_dist -I/usr/local/Cellar/superlu43/4.3_1/include/superlu -I/usr/local/opt/suite-sparse/include -I/usr/local/opt/mumps/libexec/include -I/usr/local/Cellar/petsc/3.6.3_4/complex/include -Isrc/include -I/usr/local/lib/python2.7/site-packages/petsc4py/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/SLEPc.c -o build/temp.macosx-10.11-x86_64-2.7/src/SLEPc.o
In file included from src/SLEPc.c:3:
src/slepc4py.SLEPc.c:24979:18: error: use of undeclared identifier 'EPS_CONV_REL'
__pyx_v_conv = EPS_CONV_REL;
^
src/slepc4py.SLEPc.c:30756:47: warning: implicit declaration of function 'EPSKrylovSchurGetSubcommMats' is invalid in C99 [-Wimplicit-function-declaration]
__pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetSubcommMats(__pyx_v_self->eps, (&__pyx_v_A->mat), (&__pyx_v_B->mat))); if (unlikely(__pyx_t_2 == -1)) {__pyx_filenam...
^
src/slepc4py.SLEPc.c:31062:48: warning: implicit declaration of function 'EPSKrylovSchurUpdateSubcommMats' is invalid in C99 [-Wimplicit-function-declaration]
__pyx_t_10 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurUpdateSubcommMats(__pyx_v_self->eps, __pyx_t_6, __pyx_t_7, __pyx_v_Amat, __pyx_t_8, __pyx_t_9, __pyx_v_Bmat, __pyx_v_vs...
^
src/slepc4py.SLEPc.c:40466:18: error: use of undeclared identifier 'PEP_CONV_REL'
__pyx_v_conv = PEP_CONV_REL;
^
src/slepc4py.SLEPc.c:40651:3: error: use of undeclared identifier 'PEPRefineScheme'; did you mean 'PEPRefineTypes'?
PEPRefineScheme __pyx_v_scheme;
^~~~~~~~~~~~~~~
PEPRefineTypes
/usr/local/Cellar/slepc/3.6.2_1/complex/include/slepcpep.h:126:26: note: 'PEPRefineTypes' declared here
PETSC_EXTERN const char *PEPRefineTypes[];
^
In file included from src/SLEPc.c:3:
src/slepc4py.SLEPc.c:40651:18: error: expected ';' after expression
PEPRefineScheme __pyx_v_scheme;
^
;
src/slepc4py.SLEPc.c:40651:19: error: use of undeclared identifier '__pyx_v_scheme'; did you mean '__pyx_k_scheme'?
PEPRefineScheme __pyx_v_scheme;
^~~~~~~~~~~~~~
__pyx_k_scheme
src/slepc4py.SLEPc.c:2440:13: note: '__pyx_k_scheme' declared here
static char __pyx_k_scheme[] = "scheme";
^
src/slepc4py.SLEPc.c:40709:3: error: use of undeclared identifier '__pyx_v_scheme'; did you mean '__pyx_k_scheme'?
__pyx_v_scheme = PEP_REFINE_SCHEME_MBE;
^~~~~~~~~~~~~~
__pyx_k_scheme
src/slepc4py.SLEPc.c:2440:13: note: '__pyx_k_scheme' declared here
static char __pyx_k_scheme[] = "scheme";
^
src/slepc4py.SLEPc.c:40709:20: error: use of undeclared identifier 'PEP_REFINE_SCHEME_MBE'; did you mean 'PEP_REFINE_SIMPLE'?
__pyx_v_scheme = PEP_REFINE_SCHEME_MBE;
^~~~~~~~~~~~~~~~~~~~~
PEP_REFINE_SIMPLE
/usr/local/Cellar/slepc/3.6.2_1/complex/include/slepcpep.h:124:16: note: 'PEP_REFINE_SIMPLE' declared here
PEP_REFINE_SIMPLE,
^
In file included from src/SLEPc.c:3:
src/slepc4py.SLEPc.c:40709:18: error: array type 'char [7]' is not assignable
__pyx_v_scheme = PEP_REFINE_SCHEME_MBE;
~~~~~~~~~~~~~~ ^
src/slepc4py.SLEPc.c:40718:147: error: use of undeclared identifier '__pyx_v_scheme'; did you mean '__pyx_k_scheme'?
__pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetRefine(__pyx_v_self->pep, (&__pyx_v_ref), (&__pyx_v_npart), (&__pyx_v_tol), (&__pyx_v_its), (&__pyx_v_scheme))); if (unlikely(__...
^~~~~~~~~~~~~~
__pyx_k_scheme
src/slepc4py.SLEPc.c:2440:13: note: '__pyx_k_scheme' declared here
static char __pyx_k_scheme[] = "scheme";
^
src/slepc4py.SLEPc.c:40718:145: warning: incompatible pointer types passing 'char (*)[7]' to parameter of type 'PetscBool *' [-Wincompatible-pointer-types]
__pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetRefine(__pyx_v_self->pep, (&__pyx_v_ref), (&__pyx_v_npart), (&__pyx_v_tol), (&__pyx_v_its), (&__pyx_v_scheme))); if (unlikely(__...
^~~~~~~~~~~~~~~~~
/usr/local/Cellar/slepc/3.6.2_1/complex/include/slepcpep.h:216:98: note: passing argument to parameter here
PETSC_EXTERN PetscErrorCode PEPGetRefine(PEP,PEPRefine*,PetscInt*,PetscReal*,PetscInt*,PetscBool*);
^
In file included from src/SLEPc.c:3:
src/slepc4py.SLEPc.c:40736:30: error: use of undeclared identifier '__pyx_v_scheme'; did you mean '__pyx_k_scheme'?
__pyx_t_6 = PyInt_FromLong(__pyx_v_scheme); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
^~~~~~~~~~~~~~
__pyx_k_scheme
src/slepc4py.SLEPc.c:2440:13: note: '__pyx_k_scheme' declared here
static char __pyx_k_scheme[] = "scheme";
^
src/slepc4py.SLEPc.c:40651:3: warning: expression result unused [-Wunused-value]
PEPRefineScheme __pyx_v_scheme;
^~~~~~~~~~~~~~~
src/slepc4py.SLEPc.c:40651:19: warning: expression result unused [-Wunused-value]
PEPRefineScheme __pyx_v_scheme;
^~~~~~~~~~~~~~
src/slepc4py.SLEPc.c:40891:3: error: use of undeclared identifier 'PEPRefineScheme'; did you mean 'PEPRefineTypes'?
PEPRefineScheme __pyx_v_tscheme;
^~~~~~~~~~~~~~~
PEPRefineTypes
/usr/local/Cellar/slepc/3.6.2_1/complex/include/slepcpep.h:126:26: note: 'PEPRefineTypes' declared here
PETSC_EXTERN const char *PEPRefineTypes[];
^
In file included from src/SLEPc.c:3:
src/slepc4py.SLEPc.c:40891:18: error: expected ';' after expression
PEPRefineScheme __pyx_v_tscheme;
^
;
src/slepc4py.SLEPc.c:40891:19: error: use of undeclared identifier '__pyx_v_tscheme'; did you mean '__pyx_v_scheme'?
PEPRefineScheme __pyx_v_tscheme;
^~~~~~~~~~~~~~~
__pyx_v_scheme
src/slepc4py.SLEPc.c:40886:204: note: '__pyx_v_scheme' declared here
...PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_npart, PyObject *__pyx_v_tol, PyObject *__pyx_v_its, PyObject *__pyx_v_scheme) {
^
src/slepc4py.SLEPc.c:40899:3: error: use of undeclared identifier 'PEPRefineScheme'; did you mean 'PEPRefineTypes'?
PEPRefineScheme __pyx_t_6;
^~~~~~~~~~~~~~~
PEPRefineTypes
/usr/local/Cellar/slepc/3.6.2_1/complex/include/slepcpep.h:126:26: note: 'PEPRefineTypes' declared here
PETSC_EXTERN const char *PEPRefineTypes[];
^
In file included from src/SLEPc.c:3:
src/slepc4py.SLEPc.c:40899:18: error: expected ';' after expression
PEPRefineScheme __pyx_t_6;
^
;
src/slepc4py.SLEPc.c:40899:19: error: use of undeclared identifier '__pyx_t_6'
PEPRefineScheme __pyx_t_6;
^
src/slepc4py.SLEPc.c:40950:3: error: use of undeclared identifier '__pyx_v_tscheme'; did you mean '__pyx_v_scheme'?
__pyx_v_tscheme = PEP_REFINE_SCHEME_MBE;
^~~~~~~~~~~~~~~
__pyx_v_scheme
src/slepc4py.SLEPc.c:40886:204: note: '__pyx_v_scheme' declared here
...PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_npart, PyObject *__pyx_v_tol, PyObject *__pyx_v_its, PyObject *__pyx_v_scheme) {
^
src/slepc4py.SLEPc.c:40950:21: error: use of undeclared identifier 'PEP_REFINE_SCHEME_MBE'; did you mean 'PEP_REFINE_SIMPLE'?
__pyx_v_tscheme = PEP_REFINE_SCHEME_MBE;
^~~~~~~~~~~~~~~~~~~~~
PEP_REFINE_SIMPLE
/usr/local/Cellar/slepc/3.6.2_1/complex/include/slepcpep.h:124:16: note: 'PEP_REFINE_SIMPLE' declared here
PEP_REFINE_SIMPLE,
^
In file included from src/SLEPc.c:3:
src/slepc4py.SLEPc.c:40950:19: warning: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
__pyx_v_tscheme = PEP_REFINE_SCHEME_MBE;
^ ~~~~~~~~~~~~~~~~~~~~~
src/slepc4py.SLEPc.c:41010:19: error: use of undeclared identifier 'PEPRefineScheme'; did you mean 'PEPRefineTypes'?
__pyx_t_6 = ((PEPRefineScheme)PyInt_AsLong(__pyx_v_scheme)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto _...
^~~~~~~~~~~~~~~
PEPRefineTypes
/usr/local/Cellar/slepc/3.6.2_1/complex/include/slepcpep.h:126:26: note: 'PEPRefineTypes' declared here
PETSC_EXTERN const char *PEPRefineTypes[];
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
6 warnings and 20 errors generated.
error: command '/usr/local/bin/mpicc' failed with exit status 1
Comments (6)
-
-
- changed status to resolved
-
The fix I mentioned is for the Cython error. About the others, are you sure you are using slepc/master branch?
-
reporter I do
#! git clone https://harryharel@bitbucket.org/slepc/slepc4py.git cd slepc4py git branch
which returns:
#! * master
Is it the right one ?
-
Yes, but you also have to use the master branch or SLEPc. If you use slepc-3.6 (or the slepc/maint branch), it will not work. PETSc 3.7 was just released, if you use that, then you need to use {petsc4py|slepc|slepc4py}/master, at least until SLEPc/petsc4py/slepc4py make new matching 3.7 releases.
-
reporter Ok, thanks. I got it now. I installed slepc4py 3.6 for now and it worked.
- Log in to comment
Just pushed a fix: f1ffc4e