Compilation error of Cython #372
-
I just started using pysph last week. I managed to install pysph on MacOS in a conda environment. I pass the tests and am able to run the examples suggested on the installation page. However, recently I was running a code written by my colleague and went into a compilation error. I searched the keywords in the following error information but could not find a solution. However, the same code could be successfully run on my colleague's MacOS. ERROR warning: /Users/blair/pysph/pysph/base/nnps_base.pxd:27:13: 'INT_MAX' redeclared Error compiling Cython file:
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:360:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:361:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:365:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:368:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:377:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:382:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:383:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:390:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:445:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:446:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:450:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:454:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:458:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:462:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:468:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:477:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:484:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:514:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:515:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:519:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:522:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:525:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:527:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:532:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:533:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:536:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:538:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:763:35: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:764:35: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:767:35: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:771:35: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:774:35: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:777:35: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:782:35: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:813:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:822:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:829:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:942:31: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:982:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1037:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1038:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1042:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1045:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1055:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1065:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1081:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1083:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1137:35: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1150:35: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1152:35: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1158:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1160:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1218:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1219:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1227:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1234:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1278:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1279:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1282:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1284:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ...
/Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1324:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:1326:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:2904:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:2911:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:2914:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:2917:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:2925:27: Python object cannot be passed as a varargs parameter Error compiling Cython file: ... /Users/blair/.pysph/source/py3.7-macosx-10.9-x86_64/m_c19b0920dc3337a73a8894d8ced774d0.pyx:2933:27: Python object cannot be passed as a varargs parameter |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
This is Cython and not C so there are some subtle differences. If you see the error message, all your errors are with the printf statement you have added, and not with anything else. Try this:
The problem is when you pass "%s" and the argument of "Elastic strain", in this case the second is a Python object (a string) and this cannot be passed as an argument directly to the C function printf. Since all you want is a string to be printed, just calling |
Beta Was this translation helpful? Give feedback.
-
Hi Prabhu, Thanks for the advice! I deleted all the "%s" in the code. However, it still gives me the same error message. Also, I find that I don't have these
things in my code. Also, in the error message, it seems that the error is in the temporary file .pysph/source/py3.7-macosx-10.9-x86_64/m_82019ae34e4c02317b6781d8ce2df9c4.pyx:2933:27.
As I searched for this file, the sd_pysph.log popped up (The filename of the code I'm running is sd_pysph.py):
|
Beta Was this translation helpful? Give feedback.
-
Those files are automatically generated from your equations. So you must have those print statements in some equation you are using. You can read the file |
Beta Was this translation helpful? Give feedback.
This is Cython and not C so there are some subtle differences. If you see the error message, all your errors are with the printf statement you have added, and not with anything else. Try this:
The problem is when you pass "%s" and the argument of "Elastic strain", in this case the second is a Python object (a string) and this cannot be passed as an argument directly to the C function printf. Since all you want is a string to be printed, just calling
printf("string")
will work. For other integer and number arguments the usualprintf("%f\n", some_float)
will work fine.