Issue compiling ...geometry3d/surfaces.cpp NEURON v7.4

Post Reply
selfdestructo
Posts: 32
Joined: Wed Oct 14, 2009 11:12 am

Issue compiling ...geometry3d/surfaces.cpp NEURON v7.4

Post by selfdestructo » Sat Nov 14, 2015 12:31 pm

Dear Neuron developers,
I'm facing an issue compiling share/lib/python/neuron/rxd/geometry3d/surfaces.cpp during make install with more recent versions of gcc and intel compilers, also across different machines. I did not see other encountering this issue, but I'm getting it on OSX w. macports gcc5, gcc version 4.8.3 20140911 (Red Hat 4.8.3-9), intel compilers icc version 15.0.3 (gcc version 4.9.3 compatibility) on two different clusters. The file appear to be produced from the corresponding surfaces.pyx using Cython version 0.22.

Here, using icc version 15.0.3 (gcc version 4.9.3 compatibility) as provided on the JURECA cluster at Julich Research Centre in Germany using an intel-para software stack (see https://apps.fz-juelich.de/jsc/llview/j ... ra/2015.07):

Code: Select all

...
building 'surfaces' extension
creating ../../../../share
creating ../../../../share/lib
creating ../../../../share/lib/python
creating ../../../../share/lib/python/neuron
creating ../../../../share/lib/python/neuron/rxd
creating ../../../../share/lib/python/neuron/rxd/geometry3d
icc -fno-strict-aliasing -fPIC -O3 -xHost -ftz -fp-speculation=safe -fp-model source -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I../../../../../.././share/lib/python/neuron/rxd/geometry3d -I. -I/usr/local/software/jureca/Stage3/software/Toolchain/intel-para/2015.07/Python/2.7.10/lib/python2.7/site-packages/numpy/core/include -I/usr/local/software/jureca/Stage3/software/Toolchain/intel-para/2015.07/Python/2.7.10/include/python2.7 -c surfaces.cpp -o build/temp.linux-x86_64-2.7/surfaces.o
In file included from /usr/local/software/jureca/Stage3/software/Toolchain/intel-para/2015.07/Python/2.7.10/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h(1804),
                 from /usr/local/software/jureca/Stage3/software/Toolchain/intel-para/2015.07/Python/2.7.10/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h(17),
                 from /usr/local/software/jureca/Stage3/software/Toolchain/intel-para/2015.07/Python/2.7.10/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h(4),
                 from surfaces.cpp(250):
/usr/local/software/jureca/Stage3/software/Toolchain/intel-para/2015.07/Python/2.7.10/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h(15): warning #1224: #warning directive: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
  #warning "Using deprecated NumPy API, disable it by " \
   ^

surfaces.cpp(1076): error: identifier "__pyx_ctuple_double__and_double__and_double" is undefined
  static PyObject* __pyx_convert__to_py___pyx_ctuple_double__and_double__and_double(__pyx_ctuple_double__and_double__and_double);
                                                                                    ^

surfaces.cpp(2848): error: expected a ";"
    __pyx_ctuple_double__and_double__and_double __pyx_t_22;
                                                ^

surfaces.cpp(3196): error: identifier "__pyx_t_22" is undefined
      __pyx_t_22 = PyTuple_GET_ITEM(__pyx_t_20, __pyx_t_21); __Pyx_INCREF(__pyx_t_22); __pyx_t_21++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      ^

surfaces.cpp(3200): error: expression preceding parentheses of apparent call must have (pointer-to-) function type
      __pyx_t_19 = __pyx_convert__to_py___pyx_ctuple_double__and_double__and_double(__pyx_t_22); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                   ^

surfaces.cpp(3435): error: expression preceding parentheses of apparent call must have (pointer-to-) function type
      __pyx_t_19 = __pyx_convert__to_py___pyx_ctuple_double__and_double__and_double(PyTuple_GET_ITEM(__pyx_v_position, 4)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                   ^

surfaces.cpp(3485): error: expression preceding parentheses of apparent call must have (pointer-to-) function type
        __pyx_t_19 = __pyx_convert__to_py___pyx_ctuple_double__and_double__and_double(PyTuple_GET_ITEM(__pyx_v_position, 4)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                     ^

surfaces.cpp(3542): error: expression preceding parentheses of apparent call must have (pointer-to-) function type
        __pyx_t_20 = __pyx_convert__to_py___pyx_ctuple_double__and_double__and_double(PyTuple_GET_ITEM(__pyx_v_position, 4)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                     ^

surfaces.cpp(3608): error: expression preceding parentheses of apparent call must have (pointer-to-) function type
      __pyx_t_19 = __pyx_convert__to_py___pyx_ctuple_double__and_double__and_double(PyTuple_GET_ITEM(__pyx_v_position, 4)); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                   ^

surfaces.cpp(17729): error: variable "__pyx_convert__to_py___pyx_ctuple_double__and_double__and_double" has already been defined
  static PyObject* __pyx_convert__to_py___pyx_ctuple_double__and_double__and_double(__pyx_ctuple_double__and_double__and_double value) {
                   ^

surfaces.cpp(17729): error: expected a ")"
  static PyObject* __pyx_convert__to_py___pyx_ctuple_double__and_double__and_double(__pyx_ctuple_double__and_double__and_double value) {
                                                                                                                                ^

surfaces.cpp(17729): error: expected a ";"
  static PyObject* __pyx_convert__to_py___pyx_ctuple_double__and_double__and_double(__pyx_ctuple_double__and_double__and_double value) {
                                                                                                                                       ^

surfaces.cpp(17771): warning #12: parsing restarts here after previous syntax error
                                       little, !is_unsigned);
                                                            ^

surfaces.cpp(17772): error: expected a declaration
      }
      ^

surfaces.cpp(17797): warning #12: parsing restarts here after previous syntax error
                                       little, !is_unsigned);
                                                            ^

surfaces.cpp(17798): error: expected a declaration
      }
      ^

surfaces.cpp(17873): warning #12: parsing restarts here after previous syntax error
                      return val;
                                ^

surfaces.cpp(17874): error: expected a declaration
              }
              ^

surfaces.cpp(17877): error: expected a declaration
          }
          ^

surfaces.cpp(17888): warning #12: parsing restarts here after previous syntax error
          "value too large to convert to long");
                                               ^

surfaces.cpp(17889): error: expected a declaration
      return (long) -1;
      ^

surfaces.cpp(17890): error #77: this declaration has no storage class or type specifier
  raise_neg_overflow:
  ^

surfaces.cpp(17890): error: expected a ";"
  raise_neg_overflow:
                    ^

surfaces.cpp(17893): error: expected a declaration
      return (long) -1;
      ^

surfaces.cpp(17894): error: expected a declaration
  }
  ^

surfaces.cpp(18193): warning #12: parsing restarts here after previous syntax error
          goto bad;
                  ^

surfaces.cpp(18194): error: expected a declaration
      if (!PyType_Check(result)) {
      ^

surfaces.cpp(18201): warning #12: parsing restarts here after previous syntax error
      basicsize = ((PyTypeObject *)result)->tp_basicsize;
                                                        ^

surfaces.cpp(18212): error: expected a declaration
      if (!strict && (size_t)basicsize > size) {
      ^

surfaces.cpp(18224): warning #12: parsing restarts here after previous syntax error
      return (PyTypeObject *)result;
                                   ^

surfaces.cpp(18225): error #77: this declaration has no storage class or type specifier
  bad:
  ^

surfaces.cpp(18225): error: expected a ";"
  bad:
     ^

surfaces.cpp(18227): error: expected a declaration
      Py_XDECREF(result);
      ^

surfaces.cpp(18228): error: expected a declaration
      return NULL;
      ^

surfaces.cpp(18229): error: expected a declaration
  }
  ^

surfaces.cpp(18256): warning #12: parsing restarts here after previous syntax error
              return -1;
                       ^

surfaces.cpp(18257): error: expected a declaration
          ++t;
          ^

surfaces.cpp(18258): error: expected a declaration
      }
      ^

surfaces.cpp(18260): error: expected a declaration
  }
  ^

surfaces.cpp(18375): warning #12: parsing restarts here after previous syntax error
    return res;
              ^

surfaces.cpp(18376): error: expected a declaration
  }
  ^

surfaces.cpp(18398): warning #12: parsing restarts here after previous syntax error
    ival = PyInt_AsSsize_t(x);
                             ^

surfaces.cpp(18399): error: expected a declaration
    Py_DECREF(x);
    ^

surfaces.cpp(18400): error: expected a declaration
    return ival;
    ^

surfaces.cpp(18401): error: expected a declaration
  }
  ^

surfaces.cpp(18407): warning #12: parsing restarts here after previous syntax error

surfaces.cpp(328): warning #114: function "__Pyx_PyObject_IsTrue" was referenced but not defined
  static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
                           ^

surfaces.cpp(329): warning #114: function "__Pyx_PyNumber_Int" was referenced but not defined
  static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
                                 ^

surfaces.cpp(330): warning #114: function "__Pyx_PyIndex_AsSsize_t" was referenced but not defined
  static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
                                  ^

surfaces.cpp(1078): warning #114: function "__Pyx_PyInt_From_long" was referenced but not defined
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
                                 ^

surfaces.cpp(1080): warning #114: function "__Pyx_PyInt_From_int" was referenced but not defined
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
                                 ^

surfaces.cpp(1182): warning #114: function "__Pyx_check_binary_version" was referenced but not defined
  static int __Pyx_check_binary_version(void);
             ^

surfaces.cpp(1194): warning #114: function "__Pyx_ImportType" was referenced but not defined
  static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
                       ^

surfaces.cpp(1196): warning #114: function "__Pyx_InitStrings" was referenced but not defined
  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
             ^

compilation aborted for surfaces.cpp (code 2)
error: command 'icc' failed with exit status 2
make[7]: *** [install-exec-am] Error 1
make[7]: Leaving directory `/homea/jinb33/jinb3323/sources/nrn/share/lib/python/neuron/rxd/geometry3d'
make[6]: *** [install-am] Error 2
make[6]: Leaving directory `/homea/jinb33/jinb3323/sources/nrn/share/lib/python/neuron/rxd/geometry3d'
make[5]: *** [install-recursive] Error 1
make[5]: Leaving directory `/homea/jinb33/jinb3323/sources/nrn/share/lib/python/neuron/rxd'
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory `/homea/jinb33/jinb3323/sources/nrn/share/lib/python/neuron'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/homea/jinb33/jinb3323/sources/nrn/share/lib/python'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/homea/jinb33/jinb3323/sources/nrn/share/lib'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/homea/jinb33/jinb3323/sources/nrn/share'
make: *** [install-recursive] Error 1
Configuration

Code: Select all

export CC=icc
export CXX=icc
hg clone http://www.neuron.yale.edu/hg/neuron/iv
hg clone http://www.neuron.yale.edu/hg/neuron/nrn
cd iv
sh build.sh
./configure --prefix=$HOME/.local
make -j16
make install
cd ../nrn
sh build_sh
./configure --prefix=$HOME/.local --with-iv=$HOME/.local --with-nrnpython
make -j16
make install
Any help resolving the issue would be welcome. My current workaround would be to go back to v7.3.

hines
Site Admin
Posts: 1574
Joined: Wed May 18, 2005 3:32 pm

Re: Issue compiling ...geometry3d/surfaces.cpp NEURON v7.4

Post by hines » Tue Nov 17, 2015 11:32 am

If you don't need rx3d then you can add the configure option --disable-rx3d
and that will skip those compile steps.


An update of cython may fix the problem.

csh
Posts: 52
Joined: Mon Feb 06, 2006 12:45 pm
Location: University College London
Contact:

Re: Issue compiling ...geometry3d/surfaces.cpp NEURON v7.4

Post by csh » Sat Mar 12, 2016 2:06 pm

hines wrote:An update of cython may fix the problem.
Ran into the same issue and a downgrade of cython from 0.23.4 to 0.21.1 fixed it.

ramcdougal
Posts: 150
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Medicine

Re: Issue compiling ...geometry3d/surfaces.cpp NEURON v7.4

Post by ramcdougal » Mon May 02, 2016 4:38 pm

Here's a patch that fixes the issue present when compiling with newer versions of cython: it changes the tuple position into a list.

Code: Select all

diff -r b8295be34ae5 share/lib/python/neuron/rxd/geometry3d/surfaces.pyx
--- a/share/lib/python/neuron/rxd/geometry3d/surfaces.pyx	Mon May 02 14:29:44 2016 +0200
+++ b/share/lib/python/neuron/rxd/geometry3d/surfaces.pyx	Mon May 02 16:36:25 2016 -0400
@@ -88,18 +88,18 @@
 def process_cell(int i, int j, int k, list objects, numpy.ndarray[numpy.float_t, ndim=1] xs, numpy.ndarray[numpy.float_t, ndim=1] ys, numpy.ndarray[numpy.float_t, ndim=1] zs, numpy.ndarray[numpy.float_t, ndim=1] tridata, int start, bint store_areas=False, numpy.ndarray[numpy.float_t, ndim=3] areas=None, bint print_values=False):
     cdef int new_index
     cdef double x, y, z, x1, y1, z1
-    cdef tuple position
+    cdef list position
     x, y, z = xs[i], ys[j], zs[k]
     x1, y1, z1 = xs[i + 1], ys[j + 1], zs[k + 1]
     
-    position = ((x, y, z),
+    position = [(x, y, z),
                 (x1, y, z),
                 (x1, y1, z),
                 (x, y1, z),
                 (x, y, z1),
                 (x1, y, z1),
                 (x1, y1, z1),
-                (x, y1, z1))
+                (x, y1, z1)]
     cdef double value0, value1, value2, value3, value4, value5, value6, value7
     value0, value1, value2, value3, value4, value5, value6, value7 = [min([objdist(*p) for objdist in objects]) for p in position]
     if print_values:

Post Reply