Advertisement
Tioz90

Untitled

Nov 16th, 2021
13
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. #!/bin/sh
  3. Last login: Tue Nov 16 12:10:59 on ttys000
  4. (base) thomastiotto@mac-mini ~ % conda activate brian
  5. (brian) thomastiotto@mac-mini ~ % cd $CONDA_PREFIX
  6. (brian) thomastiotto@mac-mini brian % mkdir -p ./etc/conda/activate.d
  7. mkdir -p ./etc/conda/deactivate.d
  8. (brian) thomastiotto@mac-mini brian % vim $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
  9. (brian) thomastiotto@mac-mini brian % vim $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh
  10. (brian) thomastiotto@mac-mini brian % conda deactivate
  11. (base) thomastiotto@mac-mini brian % conda activate brian
  12. overriding CC,CLANG with gcc, and CLANGXX,CXX with g++
  13. (brian) thomastiotto@mac-mini brian % python
  14. Python 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:25:50)
  15. [Clang 11.1.0 ] on darwin
  16. Type "help", "copyright", "credits" or "license" for more information.
  17. >>> import brian2
  18. >>> brian2.test(additional_args=['-x'])
  19. Running tests in /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2 for targets numpy, cython (excluding long tests)
  20. Running Brian version 2.4.2 from '/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2'
  21. Testing codegen-independent code
  22. Resetting to default preferences
  23.  
  24. Running doctests
  25.  
  26. ==================================== ERRORS ====================================
  27. ____________________ ERROR collecting sphinxext/briandoc.py ____________________
  28. lib/python3.8/site-packages/brian2/sphinxext/briandoc.py:22: in <module>
  29.     from docutils import statemachine
  30. E   ModuleNotFoundError: No module named 'docutils'
  31. =========================== short test summary info ============================
  32. ERROR lib/python3.8/site-packages/brian2/sphinxext/briandoc.py - ModuleNotFou...
  33. !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
  34. 1 error in 0.19s
  35. Running tests that do not use code generation
  36. ........................................................................ [ 19%]
  37. ........................................................................ [ 39%]
  38. .............................................ss......................... [ 59%]
  39. ........................................................................ [ 79%]
  40. ........................................................F
  41. =================================== FAILURES ===================================
  42. _________________________ test_numpy_functions_logical _________________________
  43.  
  44.     @pytest.mark.codegen_independent
  45.     def test_numpy_functions_logical():
  46.         '''
  47.        Assure that logical numpy functions work on all quantities and return
  48.        unitless boolean arrays.
  49.        '''
  50.         unit_values1 = [3 * mV, np.array([1, 2]) * mV, np.ones((3, 3)) * mV]
  51.         unit_values2 = [3 * second, np.array([1, 2]) * second,
  52.                         np.ones((3, 3)) * second]
  53.         for ufunc in UFUNCS_LOGICAL:
  54.             for value1, value2 in zip(unit_values1, unit_values2):
  55.                 try:
  56.                     # one argument
  57. >                   result_units = eval('np.%s(value1)' % ufunc)
  58.  
  59. lib/python3.8/site-packages/brian2/tests/test_units.py:976:
  60. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  61.  
  62. >   ???
  63. E   TypeError: logical_and() takes from 2 to 3 positional arguments but 1 were given
  64.  
  65. <string>:1: TypeError
  66. =============================== warnings summary ===============================
  67. tests/test_clocks.py: 3 warnings
  68. tests/test_devices.py: 5 warnings
  69. tests/test_network.py: 13 warnings
  70. tests/test_spikegenerator.py: 7 warnings
  71. tests/test_stateupdaters.py: 2 warnings
  72. tests/test_synapses.py: 3 warnings
  73.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/core/clocks.py:95: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  74.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  75.     dtype=np.float, read_only=True, constant=True,
  76.  
  77. tests/test_codegen.py::test_apply_loop_invariant_optimisation_no_optimisation
  78.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:253: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  79.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  80.     Statement('v1', '=', 'rand() - rand()', '', np.float),
  81.  
  82. tests/test_codegen.py::test_apply_loop_invariant_optimisation_no_optimisation
  83.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:254: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  84.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  85.     Statement('v1', '=', '3*rand() - 3*rand()', '', np.float),
  86.  
  87. tests/test_codegen.py::test_apply_loop_invariant_optimisation_no_optimisation
  88.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:255: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  89.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  90.     Statement('v1', '=', '3*rand() - ((1+2)*rand())', '', np.float),
  91.  
  92. tests/test_codegen.py::test_apply_loop_invariant_optimisation_no_optimisation
  93.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:257: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  94.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  95.     Statement('v1', '=', 's1*rand()*N', '', np.float),
  96.  
  97. tests/test_codegen.py::test_apply_loop_invariant_optimisation_no_optimisation
  98.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:258: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  99.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  100.     Statement('v1', '=', 's2*rand()*N', '', np.float),
  101.  
  102. tests/test_codegen.py::test_apply_loop_invariant_optimisation_no_optimisation
  103.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:261: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  104.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  105.     Statement('v1', '=', '0*rand()*N', '', np.float),
  106.  
  107. tests/test_codegen.py::test_apply_loop_invariant_optimisation_no_optimisation
  108.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:262: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  109.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  110.     Statement('v1', '=', '0/rand()*N', '', np.float)
  111.  
  112. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  113.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:279: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  114.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  115.     Statement('v1', '=', 'v1 - v1', '', np.float),
  116.  
  117. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  118.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:280: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  119.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  120.     Statement('v1', '=', 'N*v1 - N*v1', '', np.float),
  121.  
  122. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  123.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:281: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  124.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  125.     Statement('v1', '=', 'v1*N * 0', '', np.float),
  126.  
  127. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  128.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:282: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  129.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  130.     Statement('v1', '=', 'v1 * 0', '', np.float),
  131.  
  132. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  133.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:283: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  134.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  135.     Statement('v1', '=', 'v1 * 0.0', '', np.float),
  136.  
  137. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  138.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:284: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  139.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  140.     Statement('v1', '=', '0.0 / (v1*N)', '', np.float),
  141.  
  142. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  143.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:286: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  144.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  145.     Statement('i1', '=', 'i1*N * 0', '', np.int),
  146.  
  147. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  148.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:287: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  149.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  150.     Statement('i1', '=', '0 * i1', '', np.int),
  151.  
  152. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  153.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:288: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  154.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  155.     Statement('i1', '=', '0 * i1*N', '', np.int),
  156.  
  157. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  158.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:289: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  159.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  160.     Statement('i1', '=', 'i1 * 0', '', np.int),
  161.  
  162. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  163.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:291: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  164.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  165.     Statement('v2', '=', '0 + v1*N', '', np.float),
  166.  
  167. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  168.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:292: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  169.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  170.     Statement('v2', '=', 'v1*N + 0.0', '', np.float),
  171.  
  172. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  173.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:293: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  174.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  175.     Statement('v2', '=', 'v1*N - 0', '', np.float),
  176.  
  177. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  178.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:294: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  179.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  180.     Statement('v2', '=', 'v1*N - 0.0', '', np.float),
  181.  
  182. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  183.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:295: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  184.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  185.     Statement('v2', '=', '1 * v1*N', '', np.float),
  186.  
  187. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  188.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:296: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  189.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  190.     Statement('v2', '=', '1.0 * v1*N', '', np.float),
  191.  
  192. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  193.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:297: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  194.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  195.     Statement('v2', '=', 'v1*N / 1.0', '', np.float),
  196.  
  197. tests/test_codegen.py::test_apply_loop_invariant_optimisation_simplification
  198.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:298: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  199.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  200.     Statement('v2', '=', 'v1*N / 1', '', np.float),
  201.  
  202. tests/test_codegen.py::test_apply_loop_invariant_optimisation_constant_evaluation
  203.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:355: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  204.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  205.     Statement('v1', '=', 'v1 * (1 + 2 + 3)', '', np.float),
  206.  
  207. tests/test_codegen.py::test_apply_loop_invariant_optimisation_constant_evaluation
  208.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:356: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  209.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  210.     Statement('v1', '=', 'exp(N)*v1', '', np.float),
  211.  
  212. tests/test_codegen.py::test_apply_loop_invariant_optimisation_constant_evaluation
  213.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:357: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  214.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  215.     Statement('v1', '=', 'exp(0)*v1', '', np.float),
  216.  
  217. tests/test_codegen.py::test_automatic_augmented_assignments
  218.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_codegen.py:384: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  219.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  220.     dtype=np.bool, device=device),
  221.  
  222. tests/test_monitor.py: 2 warnings
  223. tests/test_network.py: 3 warnings
  224. tests/test_neurongroup.py: 7 warnings
  225. tests/test_spatialneuron.py: 3 warnings
  226. tests/test_subgroup.py: 6 warnings
  227. tests/test_synapses.py: 2 warnings
  228.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/groups/group.py:257: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  229.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  230.     if index_array.dtype == np.bool:
  231.  
  232. tests/test_network.py: 10 warnings
  233. tests/test_neurongroup.py: 20 warnings
  234. tests/test_poissongroup.py: 4 warnings
  235. tests/test_refractory.py: 1 warning
  236. tests/test_spatialneuron.py: 1 warning
  237. tests/test_synapses.py: 16 warnings
  238.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/groups/neurongroup.py:313: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  239.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  240.     self.variables.add_auxiliary_variable('_cond', dtype=np.bool)
  241.  
  242. tests/test_network.py: 21 warnings
  243. tests/test_neurongroup.py: 10 warnings
  244. tests/test_subgroup.py: 1 warning
  245. tests/test_timedarray.py: 4 warnings
  246.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/core/variables.py:1027: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  247.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  248.     variables.add_auxiliary_variable('_cond', dtype=np.bool)
  249.  
  250. tests/test_network.py: 8 warnings
  251. tests/test_neurongroup.py: 1 warning
  252. tests/test_subgroup.py: 1 warning
  253. tests/test_synapses.py: 14 warnings
  254.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses/synapses.py:1713: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  255.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  256.     variables.add_auxiliary_variable('_cond', dtype=np.bool)
  257.  
  258. tests/test_neurongroup.py::test_variables
  259. tests/test_neurongroup.py::test_get_dtype
  260. tests/test_neurongroup.py::test_get_dtype
  261. tests/test_neurongroup.py::test_no_code
  262. tests/test_refractory.py::test_refractoriness_types
  263. tests/test_refractory.py::test_refractoriness_types
  264. tests/test_refractory.py::test_refractoriness_types
  265. tests/test_refractory.py::test_refractoriness_types
  266. tests/test_refractory.py::test_conditional_write_set
  267.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/groups/group.py:148: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  268.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  269.     return np.bool
  270.  
  271. tests/test_neurongroup.py: 15 warnings
  272.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/groups/neurongroup.py:731: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  273.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  274.     if not np.issubsctype(index_array.dtype, np.int):
  275.  
  276. tests/test_neurongroup.py::test_indices
  277. tests/test_neurongroup.py::test_indices
  278. tests/test_neurongroup.py::test_indices
  279.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/groups/group.py:294: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  280.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  281.     variables.add_auxiliary_variable('_cond', dtype=np.bool)
  282.  
  283. tests/test_neurongroup.py::test_get_dtype
  284.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_neurongroup.py:1438: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  285.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  286.     assert get_dtype(eqs['b']) == np.bool
  287.  
  288. tests/test_neurongroup.py::test_get_dtype
  289.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_neurongroup.py:1445: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  290.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  291.     assert get_dtype(eqs['b']) == np.bool
  292.  
  293. tests/test_parsing.py::test_is_boolean_expression
  294. tests/test_parsing.py::test_is_boolean_expression
  295.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/core/variables.py:324: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  296.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  297.     dtype = np.bool
  298.  
  299. tests/test_spikequeue.py::test_spikequeue
  300. tests/test_spikequeue.py::test_spikequeue
  301.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses/spikequeue.py:92: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  302.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  303.     delays = np.array(np.round(delays / dt)).astype(np.int)
  304.  
  305. tests/test_units.py::test_get_dimensions
  306.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_units.py:126: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  307.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  308.     assert get_dimensions(np.array(5, dtype=np.int)) is DIMENSIONLESS
  309.  
  310. tests/test_units.py::test_get_dimensions
  311.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_units.py:132: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  312.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  313.     assert is_scalar_type(np.array(5, dtype=np.int))
  314.  
  315. -- Docs: https://docs.pytest.org/en/stable/warnings.html
  316. =========================== short test summary info ============================
  317. FAILED lib/python3.8/site-packages/brian2/tests/test_units.py::test_numpy_functions_logical
  318. !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
  319. 1 failed, 342 passed, 2 skipped, 304 deselected, 232 warnings in 53.08s
  320. Running tests for target numpy:
  321. .................................ssssss................................. [ 28%]
  322. ........................................................................ [ 56%]
  323. ........................................................................ [ 84%]
  324. ........................................                                 [100%]
  325. =============================== warnings summary ===============================
  326. tests/test_complex_examples.py: 1 warning
  327. tests/test_functions.py: 1 warning
  328. tests/test_monitor.py: 5 warnings
  329. tests/test_neurongroup.py: 4 warnings
  330. tests/test_poissoninput.py: 1 warning
  331. tests/test_refractory.py: 26 warnings
  332. tests/test_stateupdaters.py: 10 warnings
  333. tests/test_synapses.py: 3 warnings
  334.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/groups/group.py:148: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  335.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  336.     return np.bool
  337.  
  338. tests/test_complex_examples.py: 1 warning
  339. tests/test_functions.py: 1 warning
  340. tests/test_monitor.py: 15 warnings
  341. tests/test_network.py: 4 warnings
  342. tests/test_neurongroup.py: 11 warnings
  343. tests/test_poissongroup.py: 7 warnings
  344. tests/test_poissoninput.py: 1 warning
  345. tests/test_refractory.py: 21 warnings
  346. tests/test_spikegenerator.py: 1 warning
  347. tests/test_stateupdaters.py: 1 warning
  348. tests/test_subgroup.py: 20 warnings
  349. tests/test_synapses.py: 148 warnings
  350. tests/test_thresholder.py: 2 warnings
  351.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/groups/neurongroup.py:313: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  352.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  353.     self.variables.add_auxiliary_variable('_cond', dtype=np.bool)
  354.  
  355. tests/test_complex_examples.py: 1 warning
  356. tests/test_devices.py: 3 warnings
  357. tests/test_functions.py: 9 warnings
  358. tests/test_monitor.py: 3 warnings
  359. tests/test_network.py: 1 warning
  360. tests/test_neurongroup.py: 34 warnings
  361. tests/test_stateupdaters.py: 20 warnings
  362. tests/test_subgroup.py: 24 warnings
  363. tests/test_synapses.py: 69 warnings
  364.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/core/variables.py:1027: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  365.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  366.     variables.add_auxiliary_variable('_cond', dtype=np.bool)
  367.  
  368. tests/test_complex_examples.py: 2 warnings
  369. tests/test_functions.py: 1 warning
  370. tests/test_monitor.py: 3 warnings
  371. tests/test_neurongroup.py: 1 warning
  372. tests/test_poissongroup.py: 3 warnings
  373. tests/test_refractory.py: 3 warnings
  374. tests/test_spikegenerator.py: 2 warnings
  375. tests/test_subgroup.py: 39 warnings
  376. tests/test_synapses.py: 198 warnings
  377.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses/synapses.py:1713: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  378.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  379.     variables.add_auxiliary_variable('_cond', dtype=np.bool)
  380.  
  381. tests/test_functions.py: 3 warnings
  382. tests/test_monitor.py: 33 warnings
  383. tests/test_network.py: 4 warnings
  384. tests/test_neurongroup.py: 10 warnings
  385. tests/test_refractory.py: 5 warnings
  386. tests/test_spatialneuron.py: 18 warnings
  387. tests/test_spikegenerator.py: 45 warnings
  388. tests/test_subgroup.py: 79 warnings
  389. tests/test_synapses.py: 68 warnings
  390. tests/test_timedarray.py: 2 warnings
  391.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/groups/group.py:257: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  392.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  393.     if index_array.dtype == np.bool:
  394.  
  395. tests/test_monitor.py: 2 warnings
  396. tests/test_neurongroup.py: 6 warnings
  397. tests/test_subgroup.py: 13 warnings
  398. tests/test_synapses.py: 7 warnings
  399.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/core/variables.py:1073: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  400.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  401.     variables.add_auxiliary_variable('_cond', dtype=np.bool)
  402.  
  403. tests/test_monitor.py: 1 warning
  404. tests/test_neurongroup.py: 2 warnings
  405. tests/test_spatialneuron.py: 2 warnings
  406. tests/test_spikegenerator.py: 4 warnings
  407. tests/test_stateupdaters.py: 3 warnings
  408. tests/test_synapses.py: 4 warnings
  409. tests/test_timedarray.py: 9 warnings
  410.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/core/clocks.py:95: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  411.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  412.     dtype=np.float, read_only=True, constant=True,
  413.  
  414. tests/test_monitor.py::test_synapses_state_monitor
  415. tests/test_monitor.py::test_synapses_state_monitor
  416. tests/test_synapses.py::test_indices
  417. tests/test_synapses.py::test_indices
  418.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/groups/group.py:294: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  419.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  420.     variables.add_auxiliary_variable('_cond', dtype=np.bool)
  421.  
  422. tests/test_neurongroup.py::test_linked_subexpression
  423. tests/test_neurongroup.py::test_linked_subexpression_3
  424. tests/test_neurongroup.py::test_linked_subexpression_synapse
  425.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/groups/neurongroup.py:731: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  426.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  427.     if not np.issubsctype(index_array.dtype, np.int):
  428.  
  429. tests/test_neurongroup.py::test_semantics_floor_division
  430.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_neurongroup.py:1782: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  431.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  432.     'x': np.float, 'y': np.double})
  433.  
  434. tests/test_neurongroup.py::test_semantics_floating_point_division
  435.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_neurongroup.py:1812: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  436.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  437.     'x': np.float, 'y': np.double})
  438.  
  439. tests/test_neurongroup.py::test_semantics_mod
  440.   /Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/tests/test_neurongroup.py:1846: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  441.   Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  442.     'x': np.float, 'y': np.double})
  443.  
  444. -- Docs: https://docs.pytest.org/en/stable/warnings.html
  445. 250 passed, 6 skipped, 410 deselected, 1030 warnings in 128.11s (0:02:08)
  446. Running tests for target cython:
  447. F
  448. =================================== FAILURES ===================================
  449. _______________________________ test_active_flag _______________________________
  450.  
  451. self = <distutils.unixccompiler.UnixCCompiler object at 0x13c06bfd0>
  452. obj = '/Users/thomastiotto/Library/Caches/cython/brian_extensions/Users/thomastiotto/Library/Caches/cython/brian_extensions/_cython_magic_3222b51974c5bfffb38fc4d2e4e2bfd2.o'
  453. src = '/Users/thomastiotto/Library/Caches/cython/brian_extensions/_cython_magic_3222b51974c5bfffb38fc4d2e4e2bfd2.cpp'
  454. ext = '.cpp'
  455. cc_args = ['-I/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses', '-I/Users/thomastiotto/mam...an/lib/python3.8/site-packages/brian2/synapses', '-I/Users/thomastiotto/mambaforge/envs/brian/include/python3.8', '-c']
  456. extra_postargs = ['-w', '-O3', '-ffast-math', '-fno-finite-math-only', '-march=native', '-std=c++11', ...]
  457. pp_opts = ['-I/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses', '-I/Users/thomastiotto/mam...vs/brian/lib/python3.8/site-packages/brian2/synapses', '-I/Users/thomastiotto/mambaforge/envs/brian/include/python3.8']
  458.  
  459.     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
  460.         compiler_so = self.compiler_so
  461.         if sys.platform == 'darwin':
  462.             compiler_so = _osx_support.compiler_fixup(compiler_so,
  463.                                                     cc_args + extra_postargs)
  464.         try:
  465. >           self.spawn(compiler_so + cc_args + [src, '-o', obj] +
  466.                        extra_postargs)
  467.  
  468. lib/python3.8/distutils/unixccompiler.py:117:
  469. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  470.  
  471. self = <distutils.unixccompiler.UnixCCompiler object at 0x13c06bfd0>
  472. cmd = ['gcc', '-Wno-unused-result', '-Wsign-compare', '-Wunreachable-code', '-DNDEBUG', '-g', ...]
  473.  
  474.     def spawn(self, cmd):
  475. >       spawn(cmd, dry_run=self.dry_run)
  476.  
  477. lib/python3.8/distutils/ccompiler.py:910:
  478. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  479.  
  480. cmd = ['gcc', '-Wno-unused-result', '-Wsign-compare', '-Wunreachable-code', '-DNDEBUG', '-g', ...]
  481. search_path = 1, verbose = 0, dry_run = 0
  482.  
  483.     def spawn(cmd, search_path=1, verbose=0, dry_run=0):
  484.         """Run another program, specified as a command list 'cmd', in a new process.
  485.  
  486.        'cmd' is just the argument list for the new process, ie.
  487.        cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
  488.        There is no way to run a program with a name different from that of its
  489.        executable.
  490.  
  491.        If 'search_path' is true (the default), the system's executable
  492.        search path will be used to find the program; otherwise, cmd[0]
  493.        must be the exact path to the executable.  If 'dry_run' is true,
  494.        the command will not actually be run.
  495.  
  496.        Raise DistutilsExecError if running the program fails in any way; just
  497.        return on success.
  498.        """
  499.         # cmd is documented as a list, but just in case some code passes a tuple
  500.         # in, protect our %-formatting code against horrible death
  501.         cmd = list(cmd)
  502.         if os.name == 'posix':
  503. >           _spawn_posix(cmd, search_path, dry_run=dry_run)
  504.  
  505. lib/python3.8/distutils/spawn.py:36:
  506. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  507.  
  508. cmd = 'gcc', search_path = 1, verbose = 0, dry_run = 0
  509.  
  510.     def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0):
  511.         log.info(' '.join(cmd))
  512.         if dry_run:
  513.             return
  514.         executable = cmd[0]
  515.         exec_fn = search_path and os.execvp or os.execv
  516.         env = None
  517.         if sys.platform == 'darwin':
  518.             global _cfg_target, _cfg_target_split
  519.             if _cfg_target is None:
  520.                 from distutils import sysconfig
  521.                 _cfg_target = sysconfig.get_config_var(
  522.                                       'MACOSX_DEPLOYMENT_TARGET') or ''
  523.                 if _cfg_target:
  524.                     _cfg_target_split = [int(x) for x in _cfg_target.split('.')]
  525.             if _cfg_target:
  526.                 # ensure that the deployment target of build process is not less
  527.                 # than that used when the interpreter was built. This ensures
  528.                 # extension modules are built with correct compatibility values
  529.                 cur_target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', _cfg_target)
  530.                 if _cfg_target_split > [int(x) for x in cur_target.split('.')]:
  531.                     my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: '
  532.                               'now "%s" but "%s" during configure'
  533.                                     % (cur_target, _cfg_target))
  534.                     raise DistutilsPlatformError(my_msg)
  535.                 env = dict(os.environ,
  536.                            MACOSX_DEPLOYMENT_TARGET=cur_target)
  537.                 exec_fn = search_path and os.execvpe or os.execve
  538.         pid = os.fork()
  539.         if pid == 0: # in the child
  540.             try:
  541.                 if env is None:
  542.                     exec_fn(executable, cmd)
  543.                 else:
  544.                     exec_fn(executable, cmd, env)
  545.             except OSError as e:
  546.                 if not DEBUG:
  547.                     cmd = executable
  548.                 sys.stderr.write("unable to execute %r: %s\n"
  549.                                  % (cmd, e.strerror))
  550.                 os._exit(1)
  551.  
  552.             if not DEBUG:
  553.                 cmd = executable
  554.             sys.stderr.write("unable to execute %r for unknown reasons" % cmd)
  555.             os._exit(1)
  556.         else: # in the parent
  557.             # Loop until the child either exits or is terminated by a signal
  558.             # (ie. keep waiting if it's merely stopped)
  559.             while True:
  560.                 try:
  561.                     pid, status = os.waitpid(pid, 0)
  562.                 except OSError as exc:
  563.                     if not DEBUG:
  564.                         cmd = executable
  565.                     raise DistutilsExecError(
  566.                           "command %r failed: %s" % (cmd, exc.args[-1]))
  567.                 if os.WIFSIGNALED(status):
  568.                     if not DEBUG:
  569.                         cmd = executable
  570.                     raise DistutilsExecError(
  571.                           "command %r terminated by signal %d"
  572.                           % (cmd, os.WTERMSIG(status)))
  573.                 elif os.WIFEXITED(status):
  574.                     exit_status = os.WEXITSTATUS(status)
  575.                     if exit_status == 0:
  576.                         return   # hey, it succeeded!
  577.                     else:
  578.                         if not DEBUG:
  579.                             cmd = executable
  580. >                       raise DistutilsExecError(
  581.                               "command %r failed with exit status %d"
  582. E                             distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
  583.  
  584. lib/python3.8/distutils/spawn.py:157: DistutilsExecError
  585.  
  586. During handling of the above exception, another exception occurred:
  587.  
  588. self = MagicNetwork()
  589. run_namespace = {'@py_builtins': <module 'builtins' (built-in)>, '@pytest_ar': <module '_pytest.assertion.rewrite' from '/Users/thomas...e-packages/_pytest/assertion/rewrite.py'>, 'ALLOW_THREADS': 1, 'Annotation': <class 'matplotlib.text.Annotation'>, ...}
  590.  
  591.     @device_override('network_before_run')
  592.     def before_run(self, run_namespace):
  593.         '''
  594.        before_run(namespace)
  595.  
  596.        Prepares the `Network` for a run.
  597.  
  598.        Objects in the `Network` are sorted into the correct running order, and
  599.        their `BrianObject.before_run` methods are called.
  600.  
  601.        Parameters
  602.        ----------
  603.        run_namespace : dict-like, optional
  604.            A namespace in which objects which do not define their own
  605.            namespace will be run.
  606.        '''
  607.         all_objects = self.sorted_objects
  608.         prefs.check_all_validated()
  609.  
  610.         # Check names in the network for uniqueness
  611.         names = [obj.name for obj in all_objects]
  612.         non_unique_names = [name for name, count in Counter(names).items()
  613.                             if count > 1]
  614.         if len(non_unique_names):
  615.             formatted_names = ', '.join("'%s'" % name
  616.                                         for name in non_unique_names)
  617.             raise ValueError('All objects in a network need to have unique '
  618.                              'names, the following name(s) were used more than '
  619.                              'once: %s' % formatted_names)
  620.  
  621.         # Check that there are no SummedVariableUpdaters targeting the same
  622.         # target variable
  623.         _check_multiple_summed_updaters(all_objects)
  624.  
  625.         self._stopped = False
  626.         Network._globally_stopped = False
  627.  
  628.         device = get_device()
  629.         if device.network_schedule is not None:
  630.             # The device defines a fixed network schedule
  631.             if device.network_schedule != self.schedule:
  632.                 # TODO: The human-readable name of a device should be easier to get
  633.                 device_name = list(all_devices.keys())[list(all_devices.values()).index(device)]
  634.                 logger.warn(("The selected device '{device_name}' only "
  635.                              "supports a fixed schedule, but this schedule is "
  636.                              "not consistent with the network's schedule. The "
  637.                              "simulation will use the device's schedule.\n"
  638.                              "Device schedule: {device.network_schedule}\n"
  639.                              "Network schedule: {net.schedule}\n"
  640.                              "Set the network schedule explicitly or set the "
  641.                              "core.network.default_schedule preference to "
  642.                              "avoid this warning.").format(device_name=device_name,
  643.                                                            device=device,
  644.                                                            net=self),
  645.                             name_suffix='schedule_conflict', once=True)
  646.  
  647.         logger.debug("Preparing network {self.name} with {numobj} "
  648.                      "objects: {objnames}".format(self=self,
  649.                         numobj=len(all_objects),
  650.                         objnames=', '.join(obj.name for obj in all_objects)),
  651.                      "before_run")
  652.  
  653.         self.check_dependencies()
  654.  
  655.         for obj in all_objects:
  656.             if obj.active:
  657.                 try:
  658. >                   obj.before_run(run_namespace)
  659.  
  660. lib/python3.8/site-packages/brian2/core/network.py:897:
  661. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  662.  
  663. self = StateUpdater(clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0, name='neurongroup_stateupdater')
  664. run_namespace = {'@py_builtins': <module 'builtins' (built-in)>, '@pytest_ar': <module '_pytest.assertion.rewrite' from '/Users/thomas...e-packages/_pytest/assertion/rewrite.py'>, 'ALLOW_THREADS': 1, 'Annotation': <class 'matplotlib.text.Annotation'>, ...}
  665.  
  666.     def before_run(self, run_namespace):
  667. >       self.create_code_objects(run_namespace)
  668.  
  669. lib/python3.8/site-packages/brian2/groups/group.py:1143:
  670. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  671.  
  672. self = StateUpdater(clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0, name='neurongroup_stateupdater')
  673. run_namespace = {'@py_builtins': <module 'builtins' (built-in)>, '@pytest_ar': <module '_pytest.assertion.rewrite' from '/Users/thomas...e-packages/_pytest/assertion/rewrite.py'>, 'ALLOW_THREADS': 1, 'Annotation': <class 'matplotlib.text.Annotation'>, ...}
  674.  
  675.     def create_code_objects(self, run_namespace):
  676.         # By default, we only have one code object for each CodeRunner.
  677.         # Overwrite this function to use more than one.
  678. >       code_object = self.create_default_code_object(run_namespace)
  679.  
  680. lib/python3.8/site-packages/brian2/groups/group.py:1136:
  681. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  682.  
  683. self = StateUpdater(clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0, name='neurongroup_stateupdater')
  684. run_namespace = {'@py_builtins': <module 'builtins' (built-in)>, '@pytest_ar': <module '_pytest.assertion.rewrite' from '/Users/thomas...e-packages/_pytest/assertion/rewrite.py'>, 'ALLOW_THREADS': 1, 'Annotation': <class 'matplotlib.text.Annotation'>, ...}
  685.  
  686.     def create_default_code_object(self, run_namespace):
  687.         self.update_abstract_code(run_namespace=run_namespace)
  688.         # If the CodeRunner has variables, add them
  689.         if hasattr(self, 'variables'):
  690.             additional_variables = self.variables
  691.         else:
  692.             additional_variables = None
  693.  
  694.         if not self.generate_empty_code and len(self.abstract_code) == 0:
  695.             self.codeobj = None
  696.         else:
  697. >           self.codeobj = create_runner_codeobj(group=self.group,
  698.                                                  code=self.abstract_code,
  699.                                                  user_code=self.user_code,
  700.                                                  template_name=self.template,
  701.                                                  name=self.name + '_codeobject*',
  702.                                                  check_units=self.check_units,
  703.                                                  additional_variables=additional_variables,
  704.                                                  needed_variables=self.needed_variables,
  705.                                                  run_namespace=run_namespace,
  706.                                                  template_kwds=self.template_kwds,
  707.                                                  override_conditional_write=self.override_conditional_write,
  708.                                                  codeobj_class=self.codeobj_class
  709.                                                  )
  710.  
  711. lib/python3.8/site-packages/brian2/groups/group.py:1118:
  712. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  713.  
  714. group = <weakproxy at 0x13bb14130 to NeuronGroup at 0x13bea6100>
  715. code = {None: '_v = dt/ms + v\nv = _v'}, template_name = 'stateupdate'
  716. run_namespace = {'@py_builtins': <module 'builtins' (built-in)>, '@pytest_ar': <module '_pytest.assertion.rewrite' from '/Users/thomas...e-packages/_pytest/assertion/rewrite.py'>, 'ALLOW_THREADS': 1, 'Annotation': <class 'matplotlib.text.Annotation'>, ...}
  717. user_code = {None: 'v = 1/ms'}, variable_indices = None
  718. name = 'neurongroup_stateupdater_codeobject*', check_units = False
  719. needed_variables = [], additional_variables = None, template_kwds = None
  720. override_conditional_write = set()
  721. codeobj_class = <class 'brian2.codegen.runtime.cython_rt.cython_rt.CythonCodeObject'>
  722.  
  723.     def create_runner_codeobj(group, code, template_name,
  724.                               run_namespace,
  725.                               user_code=None,
  726.                               variable_indices=None,
  727.                               name=None, check_units=True,
  728.                               needed_variables=None,
  729.                               additional_variables=None,
  730.                               template_kwds=None,
  731.                               override_conditional_write=None,
  732.                               codeobj_class=None
  733.                               ):
  734.         ''' Create a `CodeObject` for the execution of code in the context of a
  735.        `Group`.
  736.  
  737.        Parameters
  738.        ----------
  739.        group : `Group`
  740.            The group where the code is to be run
  741.        code : str or dict of str
  742.            The code to be executed.
  743.        template_name : str
  744.            The name of the template to use for the code.
  745.        run_namespace : dict-like
  746.            An additional namespace that is used for variable lookup (either
  747.            an explicitly defined namespace or one taken from the local
  748.            context).
  749.        user_code : str, optional
  750.            The code that had been specified by the user before other code was
  751.            added automatically. If not specified, will be assumed to be identical
  752.            to ``code``.
  753.        variable_indices : dict-like, optional
  754.            A mapping from `Variable` objects to index names (strings).  If none is
  755.            given, uses the corresponding attribute of `group`.
  756.        name : str, optional
  757.            A name for this code object, will use ``group + '_codeobject*'`` if
  758.            none is given.
  759.        check_units : bool, optional
  760.            Whether to check units in the statement. Defaults to ``True``.
  761.        needed_variables: list of str, optional
  762.            A list of variables that are neither present in the abstract code, nor
  763.            in the ``USES_VARIABLES`` statement in the template. This is only
  764.            rarely necessary, an example being a `StateMonitor` where the
  765.            names of the variables are neither known to the template nor included
  766.            in the abstract code statements.
  767.        additional_variables : dict-like, optional
  768.            A mapping of names to `Variable` objects, used in addition to the
  769.            variables saved in `group`.
  770.        template_kwds : dict, optional
  771.            A dictionary of additional information that is passed to the template.
  772.        override_conditional_write: list of str, optional
  773.            A list of variable names which are used as conditions (e.g. for
  774.            refractoriness) which should be ignored.
  775.        codeobj_class : class, optional
  776.            The `CodeObject` class to run code with. If not specified, defaults to
  777.            the `group`'s ``codeobj_class`` attribute.
  778.         '''
  779.  
  780.        if name is None:
  781.            if group is not None:
  782.                name = '%s_%s_codeobject*' % (group.name, template_name)
  783.            else:
  784.                name = '%s_codeobject*' % template_name
  785.  
  786.        if user_code is None:
  787.            user_code = code
  788.  
  789.        if isinstance(code, str):
  790.            code = {None: code}
  791.            user_code = {None: user_code}
  792.  
  793.        msg = 'Creating code object (group=%s, template name=%s) for abstract code:\n' % (group.name, template_name)
  794.        msg += indent(code_representation(code))
  795.        logger.diagnostic(msg)
  796.        from brian2.devices import get_device
  797.        device = get_device()
  798.  
  799.        if override_conditional_write is None:
  800.            override_conditional_write = set([])
  801.        else:
  802.            override_conditional_write = set(override_conditional_write)
  803.  
  804.        if codeobj_class is None:
  805.            codeobj_class = device.code_object_class(group.codeobj_class)
  806.        else:
  807.            codeobj_class = device.code_object_class(codeobj_class)
  808.  
  809.        template = getattr(codeobj_class.templater, template_name)
  810.        template_variables = getattr(template, 'variables', None)
  811.  
  812.        all_variables = dict(group.variables)
  813.        if additional_variables is not None:
  814.            all_variables.update(additional_variables)
  815.  
  816.        # Determine the identifiers that were used
  817.        identifiers = set()
  818.        user_identifiers = set()
  819.        for v, u_v in zip(code.values(), user_code.values()):
  820.            _, uk, u = analyse_identifiers(v, all_variables, recursive=True)
  821.            identifiers |= uk | u
  822.            _, uk, u = analyse_identifiers(u_v, all_variables, recursive=True)
  823.            user_identifiers |= uk | u
  824.  
  825.        # Add variables that are not in the abstract code, nor specified in the
  826.        # template but nevertheless necessary
  827.        if needed_variables is None:
  828.            needed_variables = []
  829.        # Resolve all variables (variables used in the code and variables needed by
  830.        # the template)
  831.        variables = group.resolve_all(identifiers | set(needed_variables) | set(template_variables),
  832.                                      # template variables are not known to the user:
  833.                                      user_identifiers=user_identifiers,
  834.                                      additional_variables=additional_variables,
  835.                                      run_namespace=run_namespace)
  836.        # We raise this error only now, because there is some non-obvious code path
  837.        # where Jinja tries to get a Synapse's "name" attribute via syn['name'],
  838.         # which then triggers the use of the `group_get_indices` template which does
  839.         # not exist for standalone. Putting the check for template == None here
  840.         # means we will first raise an error about the unknown identifier which will
  841.         # then make Jinja try syn.name
  842.         if template is None:
  843.             codeobj_class_name = codeobj_class.class_name or codeobj_class.__name__
  844.             raise AttributeError(('"%s" does not provide a code generation '
  845.                                   'template "%s"') % (codeobj_class_name,
  846.                                                       template_name))
  847.  
  848.  
  849.         conditional_write_variables = {}
  850.         # Add all the "conditional write" variables
  851.         for var in variables.values():
  852.             cond_write_var = getattr(var, 'conditional_write', None)
  853.             if cond_write_var in override_conditional_write:
  854.                 continue
  855.             if cond_write_var is not None:
  856.                 if (cond_write_var.name in variables and
  857.                         not variables[cond_write_var.name] is cond_write_var):
  858.                     logger.diagnostic(('Variable "%s" is needed for the '
  859.                                        'conditional write mechanism of variable '
  860.                                        '"%s". Its name is already used for %r.') % (cond_write_var.name,
  861.                                                                                     var.name,
  862.                                                                                     variables[cond_write_var.name]))
  863.                 else:
  864.                     conditional_write_variables[cond_write_var.name] = cond_write_var
  865.  
  866.         variables.update(conditional_write_variables)
  867.  
  868.         if check_units:
  869.             for c in code.values():
  870.                 # This is the first time that the code is parsed, catch errors
  871.                 try:
  872.                     check_units_statements(c, variables)
  873.                 except (SyntaxError, ValueError) as ex:
  874.                     error_msg = _error_msg(c, name)
  875.                     raise ValueError(error_msg) from ex
  876.  
  877.         all_variable_indices = copy.copy(group.variables.indices)
  878.         if additional_variables is not None:
  879.             all_variable_indices.update(additional_variables.indices)
  880.         if variable_indices is not None:
  881.             all_variable_indices.update(variable_indices)
  882.  
  883.         # Make "conditional write" variables use the same index as the variable
  884.         # that depends on them
  885.         for varname, var in variables.items():
  886.             cond_write_var = getattr(var, 'conditional_write', None)
  887.             if cond_write_var is not None:
  888.                 all_variable_indices[cond_write_var.name] = all_variable_indices[varname]
  889.  
  890.         # Check that all functions are available
  891.         for varname, value in variables.items():
  892.             if isinstance(value, Function):
  893.                 try:
  894.                     value.implementations[codeobj_class]
  895.                 except KeyError as ex:
  896.                     # if we are dealing with numpy, add the default implementation
  897.                     from brian2.codegen.runtime.numpy_rt import NumpyCodeObject
  898.                     if codeobj_class is NumpyCodeObject:
  899.                         value.implementations.add_numpy_implementation(value.pyfunc)
  900.                     else:
  901.                         raise NotImplementedError(('Cannot use function '
  902.                                                    '%s: %s') % (varname, ex)) from ex
  903.  
  904.         # Gather the additional compiler arguments declared by function
  905.         # implementations
  906.         all_keywords = [_gather_compiler_kwds(var, codeobj_class)
  907.                         for var in variables.values()
  908.                         if isinstance(var, Function)]
  909.         compiler_kwds = _merge_compiler_kwds(all_keywords)
  910.  
  911.         # Add the indices needed by the variables
  912.         for varname in list(variables):
  913.             var_index = all_variable_indices[varname]
  914.             if not var_index in ('_idx', '0'):
  915.                 variables[var_index] = all_variables[var_index]
  916.  
  917. >       return device.code_object(owner=group,
  918.                                   name=name,
  919.                                   abstract_code=code,
  920.                                   variables=variables,
  921.                                   template_name=template_name,
  922.                                   variable_indices=all_variable_indices,
  923.                                   template_kwds=template_kwds,
  924.                                   codeobj_class=codeobj_class,
  925.                                   override_conditional_write=override_conditional_write,
  926.                                   compiler_kwds=compiler_kwds
  927.                                   )
  928.  
  929. lib/python3.8/site-packages/brian2/codegen/codeobject.py:441:
  930. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  931.  
  932. self = <brian2.devices.device.RuntimeDevice object at 0x12de84a30>
  933. owner = <weakproxy at 0x13bb14130 to NeuronGroup at 0x13bea6100>
  934. name = 'neurongroup_stateupdater_codeobject'
  935. abstract_code = {None: '_v = dt/ms + v\nv = _v'}
  936. variables = {'N': <Constant(dimensions=Dimension(),  dtype=int64, scalar=True, constant=True, read_only=True)>, 'dt': <ArrayVariab...ly=True)>, 'v': <ArrayVariable(dimensions=Dimension(),  dtype=float64, scalar=False, constant=False, read_only=False)>}
  937. template_name = 'stateupdate'
  938. variable_indices = defaultdict(..., {'N': '0', 't': '0', 'dt': '0', 't_in_timesteps': '0', 'v': '_idx', 'ms': '_idx', '_v': '_idx'})
  939. codeobj_class = <class 'brian2.codegen.runtime.cython_rt.cython_rt.CythonCodeObject'>
  940. template_kwds = {'dt': '_array_defaultclock_dt[0]', 'load_namespace': '_var_N = _namespace["_var_N"]\ncdef int64_t N = _namespace["N"]...group_v\'])\ncdef double v\ncdef double _lio_1\ncdef double _v', 'support_code_lines': [], 'v': '_array_neurongroup_v'}
  941. override_conditional_write = set()
  942. compiler_kwds = defaultdict(<class 'list'>, {})
  943.  
  944.    def code_object(self, owner, name, abstract_code, variables, template_name,
  945.                    variable_indices, codeobj_class=None,
  946.                    template_kwds=None, override_conditional_write=None,
  947.                    compiler_kwds=None):
  948.        if compiler_kwds is None:
  949.            compiler_kwds = {}
  950.        name = find_name(name)
  951.        codeobj_class = self.code_object_class(codeobj_class)
  952.        template = getattr(codeobj_class.templater, template_name)
  953.        iterate_all = template.iterate_all
  954.        generator = codeobj_class.generator_class(variables=variables,
  955.                                                  variable_indices=variable_indices,
  956.                                                  owner=owner,
  957.                                                  iterate_all=iterate_all,
  958.                                                  codeobj_class=codeobj_class,
  959.                                                  override_conditional_write=override_conditional_write,
  960.                                                  allows_scalar_write=template.allows_scalar_write,
  961.                                                  name=name,
  962.                                                  template_name=template_name)
  963.        if template_kwds is None:
  964.            template_kwds = dict()
  965.        else:
  966.            template_kwds = template_kwds.copy()
  967.  
  968.        logger.diagnostic('%s abstract code:\n%s' % (name, indent(code_representation(abstract_code))))
  969.  
  970.        scalar_code, vector_code, kwds = generator.translate(abstract_code,
  971.                                                             dtype=prefs['core.default_float_dtype'])
  972.        # Add the array names as keywords as well
  973.        for varname, var in variables.items():
  974.            if isinstance(var, ArrayVariable):
  975.                pointer_name = generator.get_array_name(var)
  976.                if var.scalar:
  977.                    pointer_name += '[0]'
  978.                template_kwds[varname] = pointer_name
  979.                if hasattr(var, 'resize'):
  980.                    dyn_array_name = generator.get_array_name(var,
  981.                                                              access_data=False)
  982.                    template_kwds['_dynamic_'+varname] = dyn_array_name
  983.  
  984.  
  985.        template_kwds.update(kwds)
  986.        logger.diagnostic('%s snippet (scalar):\n%s' % (name, indent(code_representation(scalar_code))))
  987.        logger.diagnostic('%s snippet (vector):\n%s' % (name, indent(code_representation(vector_code))))
  988.  
  989.        code = template(scalar_code, vector_code,
  990.                        owner=owner, variables=variables, codeobj_name=name,
  991.                        variable_indices=variable_indices,
  992.                        get_array_name=generator.get_array_name,
  993.                        **template_kwds)
  994.        logger.diagnostic('%s code:\n%s' % (name, indent(code_representation(code))))
  995.  
  996.        codeobj = codeobj_class(owner, code, variables, variable_indices,
  997.                                template_name=template_name,
  998.                                template_source=template.template_source,
  999.                                name=name, compiler_kwds=compiler_kwds)
  1000. >       codeobj.compile()
  1001.  
  1002. lib/python3.8/site-packages/brian2/devices/device.py:327:
  1003. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1004.  
  1005. self = <brian2.codegen.runtime.cython_rt.cython_rt.CythonCodeObject object at 0x13bbab7f0>
  1006.  
  1007.    def compile(self):
  1008.        for block in ['before_run', 'run', 'after_run']:
  1009. >           self.compiled_code[block] = self.compile_block(block)
  1010.  
  1011. lib/python3.8/site-packages/brian2/codegen/codeobject.py:101:
  1012. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1013.  
  1014. self = <brian2.codegen.runtime.cython_rt.cython_rt.CythonCodeObject object at 0x13bbab7f0>
  1015. block = 'run'
  1016.  
  1017.    def compile_block(self, block):
  1018.        code = getattr(self.code, block, '').strip()
  1019.        if not code or 'EMPTY_CODE_BLOCK' in code:
  1020.            return None
  1021. >       return cython_extension_manager.create_extension(
  1022.            code,
  1023.            define_macros=self.define_macros,
  1024.            libraries=self.libraries,
  1025.            extra_compile_args=self.extra_compile_args,
  1026.            extra_link_args=self.extra_link_args,
  1027.            include_dirs=self.include_dirs,
  1028.            library_dirs=self.library_dirs,
  1029.            compiler=self.compiler,
  1030.            owner_name=self.owner.name+'_'+self.template_name,
  1031.            sources=self.sources
  1032.            )
  1033.  
  1034. lib/python3.8/site-packages/brian2/codegen/runtime/cython_rt/cython_rt.py:143:
  1035. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1036.  
  1037. self = <brian2.codegen.runtime.cython_rt.extension_manager.CythonExtensionManager object at 0x12de930d0>
  1038. code = '#cython: language_level=3\n#cython: boundscheck=False\n#cython: wraparound=False\n#cython: cdivision=False\n#cython: ...       v = _array_neurongroup_v[_idx]\n        _v = _lio_1 + v\n        v = _v\n        _array_neurongroup_v[_idx] = v'
  1039. force = False, name = None, define_macros = []
  1040. include_dirs = ['/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses', '/Users/thomastiotto/mambafo...-packages/numpy/core/include', '/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses']
  1041. library_dirs = ['/Users/thomastiotto/mambaforge/envs/brian/lib']
  1042. runtime_library_dirs = None
  1043. extra_compile_args = ['-w', '-O3', '-ffast-math', '-fno-finite-math-only', '-march=native', '-std=c++11', ...]
  1044. extra_link_args = [], libraries = [], compiler = 'unix', sources = []
  1045. owner_name = 'neurongroup_stateupdate'
  1046.  
  1047.     def create_extension(self, code, force=False, name=None,
  1048.                          define_macros=None,
  1049.                          include_dirs=None,
  1050.                          library_dirs=None,
  1051.                          runtime_library_dirs=None,
  1052.                          extra_compile_args=None,
  1053.                          extra_link_args=None,
  1054.                          libraries=None,
  1055.                          compiler=None,
  1056.                          sources=None,
  1057.                          owner_name='',
  1058.                          ):
  1059.         if sources is None:
  1060.             sources = []
  1061.         self._simplify_paths()
  1062.  
  1063.         if Cython is None:
  1064.             raise ImportError('Cython is not available')
  1065.  
  1066.         code = deindent(code)
  1067.  
  1068.         lib_dir = get_cython_cache_dir()
  1069.         if '~' in lib_dir:
  1070.             lib_dir = os.path.expanduser(lib_dir)
  1071.         try:
  1072.             os.makedirs(lib_dir)
  1073.         except OSError:
  1074.             if not os.path.exists(lib_dir):
  1075.                 raise IOError("Couldn't create Cython cache directory '%s', try setting the "
  1076.                               "cache directly with prefs.codegen.runtime.cython.cache_dir." % lib_dir)
  1077.  
  1078.         numpy_version = '.'.join(numpy.__version__.split('.')[:2])  # Only use major.minor version
  1079.         key = code, sys.version_info, sys.executable, Cython.__version__, numpy_version
  1080.  
  1081.         if force:
  1082.             # Force a new module name by adding the current time to the
  1083.             # key which is hashed to determine the module name.
  1084.             key += time.time(),
  1085.  
  1086.         if key in self._code_cache:
  1087.             return self._code_cache[key]
  1088.  
  1089.         if name is not None:
  1090.             module_name = name#py3compat.unicode_to_str(args.name)
  1091.         else:
  1092.             module_name = "_cython_magic_" + hashlib.md5(str(key).encode('utf-8')).hexdigest()
  1093.         if owner_name:
  1094.             logger.diagnostic('"{owner_name}" using Cython module "{module_name}"'.format(owner_name=owner_name,
  1095.                                                                                      module_name=module_name))
  1096.  
  1097.  
  1098.         module_path = os.path.join(lib_dir, module_name + self.so_ext)
  1099.  
  1100.         if prefs['codegen.runtime.cython.multiprocess_safe']:
  1101.             lock = FileLock(os.path.join(lib_dir, module_name + '.lock'))
  1102.             with lock:
  1103. >               module = self._load_module(module_path,
  1104.                                            define_macros=define_macros,
  1105.                                            include_dirs=include_dirs,
  1106.                                            library_dirs=library_dirs,
  1107.                                            extra_compile_args=extra_compile_args,
  1108.                                            extra_link_args=extra_link_args,
  1109.                                            libraries=libraries,
  1110.                                            code=code,
  1111.                                            lib_dir=lib_dir,
  1112.                                            module_name=module_name,
  1113.                                            runtime_library_dirs=runtime_library_dirs,
  1114.                                            compiler=compiler,
  1115.                                            key=key,
  1116.                                            sources=sources)
  1117.  
  1118. lib/python3.8/site-packages/brian2/codegen/runtime/cython_rt/extension_manager.py:112:
  1119. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1120.  
  1121. self = <brian2.codegen.runtime.cython_rt.extension_manager.CythonExtensionManager object at 0x12de930d0>
  1122. module_path = '/Users/thomastiotto/Library/Caches/cython/brian_extensions/_cython_magic_3222b51974c5bfffb38fc4d2e4e2bfd2.cpython-38-darwin.so'
  1123. define_macros = []
  1124. include_dirs = ['/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses', '/Users/thomastiotto/mambafo...-packages/numpy/core/include', '/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses']
  1125. library_dirs = ['/Users/thomastiotto/mambaforge/envs/brian/lib']
  1126. extra_compile_args = ['-w', '-O3', '-ffast-math', '-fno-finite-math-only', '-march=native', '-std=c++11', ...]
  1127. extra_link_args = [], libraries = []
  1128. code = '#cython: language_level=3\n#cython: boundscheck=False\n#cython: wraparound=False\n#cython: cdivision=False\n#cython: ...       v = _array_neurongroup_v[_idx]\n        _v = _lio_1 + v\n        v = _v\n        _array_neurongroup_v[_idx] = v'
  1129. lib_dir = '/Users/thomastiotto/Library/Caches/cython/brian_extensions'
  1130. module_name = '_cython_magic_3222b51974c5bfffb38fc4d2e4e2bfd2'
  1131. runtime_library_dirs = None, compiler = 'unix'
  1132. key = ('#cython: language_level=3\n#cython: boundscheck=False\n#cython: wraparound=False\n#cython: cdivision=False\n#cython:..., micro=12, releaselevel='final', serial=0), '/Users/thomastiotto/mambaforge/envs/brian/bin/python', '0.29.24', '1.21')
  1133. sources = []
  1134.  
  1135.    def _load_module(self, module_path, define_macros, include_dirs, library_dirs,
  1136.                     extra_compile_args, extra_link_args, libraries, code,
  1137.                     lib_dir, module_name, runtime_library_dirs, compiler,
  1138.                     key, sources):
  1139.        have_module = os.path.isfile(module_path)
  1140.  
  1141.        if not have_module:
  1142.            if define_macros is None:
  1143.                define_macros = []
  1144.            if include_dirs is None:
  1145.                include_dirs = []
  1146.            if library_dirs is None:
  1147.                library_dirs = []
  1148.            if extra_compile_args is None:
  1149.                extra_compile_args = []
  1150.            if extra_link_args is None:
  1151.                extra_link_args = []
  1152.            if libraries is None:
  1153.                libraries = []
  1154.  
  1155.            c_include_dirs = include_dirs
  1156.            if 'numpy' in code:
  1157.                import numpy
  1158.                c_include_dirs.append(numpy.get_include())
  1159.  
  1160.            # TODO: We should probably have a special folder just for header
  1161.            # files that are shared between different codegen targets
  1162.            import brian2.synapses as synapses
  1163.            synapses_dir = os.path.dirname(synapses.__file__)
  1164.            c_include_dirs.append(synapses_dir)
  1165.  
  1166.            pyx_file = os.path.join(lib_dir, module_name + '.pyx')
  1167.            # ignore Python 3 unicode stuff for the moment
  1168.            #pyx_file = py3compat.cast_bytes_py2(pyx_file, encoding=sys.getfilesystemencoding())
  1169.            #with io.open(pyx_file, 'w', encoding='utf-8') as f:
  1170.            #    f.write(code)
  1171.            with open(pyx_file, 'w') as f:
  1172.                f.write(code)
  1173.  
  1174.            for source in sources:
  1175.                if not source.lower().endswith('.pyx'):
  1176.                    raise ValueError('Additional Cython source files need to '
  1177.                                     'have an .pyx ending')
  1178.                # Copy source and header file (if present) to library directory
  1179.                shutil.copyfile(source, os.path.join(lib_dir,
  1180.                                                     os.path.basename(source)))
  1181.                name_without_ext = os.path.splitext(os.path.basename(source))[0]
  1182.                header_name = name_without_ext + '.pxd'
  1183.                if os.path.exists(os.path.join(os.path.dirname(source), header_name)):
  1184.                    shutil.copyfile(os.path.join(os.path.dirname(source), header_name),
  1185.                                    os.path.join(lib_dir, header_name))
  1186.            final_sources = [os.path.join(lib_dir, os.path.basename(source))
  1187.                             for source in sources]
  1188.            extension = Extension(
  1189.                name=module_name,
  1190.                sources=[pyx_file],
  1191.                define_macros=define_macros,
  1192.                include_dirs=c_include_dirs,
  1193.                library_dirs=library_dirs,
  1194.                runtime_library_dirs=runtime_library_dirs,
  1195.                extra_compile_args=extra_compile_args,
  1196.                extra_link_args=extra_link_args,
  1197.                libraries=libraries,
  1198.                language='c++')
  1199.            build_extension = self._get_build_extension(compiler=compiler)
  1200.            try:
  1201.                opts = dict(
  1202.                    quiet=True,
  1203.                    annotate=False,
  1204.                    force=True,
  1205.                    )
  1206.                # suppresses the output on stdout
  1207.                with std_silent():
  1208.                    build_extension.extensions = Cython_Build.cythonize([extension] + final_sources, **opts)
  1209.  
  1210.                    build_extension.build_temp = os.path.dirname(pyx_file)
  1211.                    build_extension.build_lib = lib_dir
  1212. >                   build_extension.run()
  1213.  
  1214. lib/python3.8/site-packages/brian2/codegen/runtime/cython_rt/extension_manager.py:258:
  1215. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1216.  
  1217. self = <distutils.command.build_ext.build_ext object at 0x13e756d60>
  1218.  
  1219.    def run(self):
  1220.        from distutils.ccompiler import new_compiler
  1221.  
  1222.        # 'self.extensions', as supplied by setup.py, is a list of
  1223.        # Extension instances.  See the documentation for Extension (in
  1224.        # distutils.extension) for details.
  1225.        #
  1226.        # For backwards compatibility with Distutils 0.8.2 and earlier, we
  1227.        # also allow the 'extensions' list to be a list of tuples:
  1228.        #    (ext_name, build_info)
  1229.        # where build_info is a dictionary containing everything that
  1230.        # Extension instances do except the name, with a few things being
  1231.        # differently named.  We convert these 2-tuples to Extension
  1232.        # instances as needed.
  1233.  
  1234.        if not self.extensions:
  1235.            return
  1236.  
  1237.        # If we were asked to build any C/C++ libraries, make sure that the
  1238.        # directory where we put them is in the library search path for
  1239.        # linking extensions.
  1240.        if self.distribution.has_c_libraries():
  1241.            build_clib = self.get_finalized_command('build_clib')
  1242.            self.libraries.extend(build_clib.get_library_names() or [])
  1243.            self.library_dirs.append(build_clib.build_clib)
  1244.  
  1245.        # Setup the CCompiler object that we'll use to do all the
  1246.         # compiling and linking
  1247.         self.compiler = new_compiler(compiler=self.compiler,
  1248.                                      verbose=self.verbose,
  1249.                                      dry_run=self.dry_run,
  1250.                                      force=self.force)
  1251.         customize_compiler(self.compiler)
  1252.         # If we are cross-compiling, init the compiler now (if we are not
  1253.         # cross-compiling, init would not hurt, but people may rely on
  1254.         # late initialization of compiler even if they shouldn't...)
  1255.         if os.name == 'nt' and self.plat_name != get_platform():
  1256.             self.compiler.initialize(self.plat_name)
  1257.  
  1258.         # And make sure that any compile/link-related options (which might
  1259.         # come from the command-line or from the setup script) are set in
  1260.         # that CCompiler object -- that way, they automatically apply to
  1261.         # all compiling and linking done here.
  1262.         if self.include_dirs is not None:
  1263.             self.compiler.set_include_dirs(self.include_dirs)
  1264.         if self.define is not None:
  1265.             # 'define' option is a list of (name,value) tuples
  1266.             for (name, value) in self.define:
  1267.                 self.compiler.define_macro(name, value)
  1268.         if self.undef is not None:
  1269.             for macro in self.undef:
  1270.                 self.compiler.undefine_macro(macro)
  1271.         if self.libraries is not None:
  1272.             self.compiler.set_libraries(self.libraries)
  1273.         if self.library_dirs is not None:
  1274.             self.compiler.set_library_dirs(self.library_dirs)
  1275.         if self.rpath is not None:
  1276.             self.compiler.set_runtime_library_dirs(self.rpath)
  1277.         if self.link_objects is not None:
  1278.             self.compiler.set_link_objects(self.link_objects)
  1279.  
  1280.         # Now actually compile and link everything.
  1281. >       self.build_extensions()
  1282.  
  1283. lib/python3.8/distutils/command/build_ext.py:340:
  1284. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1285.  
  1286. self = <distutils.command.build_ext.build_ext object at 0x13e756d60>
  1287.  
  1288.     def build_extensions(self):
  1289.         # First, sanity-check the 'extensions' list
  1290.         self.check_extensions_list(self.extensions)
  1291.         if self.parallel:
  1292.             self._build_extensions_parallel()
  1293.         else:
  1294. >           self._build_extensions_serial()
  1295.  
  1296. lib/python3.8/distutils/command/build_ext.py:449:
  1297. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1298.  
  1299. self = <distutils.command.build_ext.build_ext object at 0x13e756d60>
  1300.  
  1301.     def _build_extensions_serial(self):
  1302.         for ext in self.extensions:
  1303.             with self._filter_build_errors(ext):
  1304. >               self.build_extension(ext)
  1305.  
  1306. lib/python3.8/distutils/command/build_ext.py:474:
  1307. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1308.  
  1309. self = <distutils.command.build_ext.build_ext object at 0x13e756d60>
  1310. ext = <setuptools.extension.Extension('_cython_magic_3222b51974c5bfffb38fc4d2e4e2bfd2') at 0x13c28b6a0>
  1311.  
  1312.     def build_extension(self, ext):
  1313.         sources = ext.sources
  1314.         if sources is None or not isinstance(sources, (list, tuple)):
  1315.             raise DistutilsSetupError(
  1316.                   "in 'ext_modules' option (extension '%s'), "
  1317.                   "'sources' must be present and must be "
  1318.                   "a list of source filenames" % ext.name)
  1319.         sources = list(sources)
  1320.  
  1321.         ext_path = self.get_ext_fullpath(ext.name)
  1322.         depends = sources + ext.depends
  1323.         if not (self.force or newer_group(depends, ext_path, 'newer')):
  1324.             log.debug("skipping '%s' extension (up-to-date)", ext.name)
  1325.             return
  1326.         else:
  1327.             log.info("building '%s' extension", ext.name)
  1328.  
  1329.         # First, scan the sources for SWIG definition files (.i), run
  1330.         # SWIG on 'em to create .c files, and modify the sources list
  1331.         # accordingly.
  1332.         sources = self.swig_sources(sources, ext)
  1333.  
  1334.         # Next, compile the source code to object files.
  1335.  
  1336.         # XXX not honouring 'define_macros' or 'undef_macros' -- the
  1337.         # CCompiler API needs to change to accommodate this, and I
  1338.         # want to do one thing at a time!
  1339.  
  1340.         # Two possible sources for extra compiler arguments:
  1341.         #   - 'extra_compile_args' in Extension object
  1342.         #   - CFLAGS environment variable (not particularly
  1343.         #     elegant, but people seem to expect it and I
  1344.         #     guess it's useful)
  1345.         # The environment variable should take precedence, and
  1346.         # any sensible compiler will give precedence to later
  1347.         # command line args.  Hence we combine them in order:
  1348.         extra_args = ext.extra_compile_args or []
  1349.  
  1350.         macros = ext.define_macros[:]
  1351.         for undef in ext.undef_macros:
  1352.             macros.append((undef,))
  1353.  
  1354. >       objects = self.compiler.compile(sources,
  1355.                                          output_dir=self.build_temp,
  1356.                                          macros=macros,
  1357.                                          include_dirs=ext.include_dirs,
  1358.                                          debug=self.debug,
  1359.                                          extra_postargs=extra_args,
  1360.                                          depends=ext.depends)
  1361.  
  1362. lib/python3.8/distutils/command/build_ext.py:528:
  1363. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1364.  
  1365. self = <distutils.unixccompiler.UnixCCompiler object at 0x13c06bfd0>
  1366. sources = ['/Users/thomastiotto/Library/Caches/cython/brian_extensions/_cython_magic_3222b51974c5bfffb38fc4d2e4e2bfd2.cpp']
  1367. output_dir = '/Users/thomastiotto/Library/Caches/cython/brian_extensions'
  1368. macros = []
  1369. include_dirs = ['/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses', '/Users/thomastiotto/mambafo...-packages/numpy/core/include', '/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses']
  1370. debug = None, extra_preargs = None
  1371. extra_postargs = ['-w', '-O3', '-ffast-math', '-fno-finite-math-only', '-march=native', '-std=c++11', ...]
  1372. depends = ['/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses/stdint_compat.h', '/Users/thom...s.h', '/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/numpy/core/include/numpy/npy_math.h', ...]
  1373.  
  1374.     def compile(self, sources, output_dir=None, macros=None,
  1375.                 include_dirs=None, debug=0, extra_preargs=None,
  1376.                 extra_postargs=None, depends=None):
  1377.         """Compile one or more source files.
  1378.  
  1379.        'sources' must be a list of filenames, most likely C/C++
  1380.        files, but in reality anything that can be handled by a
  1381.        particular compiler and compiler class (eg. MSVCCompiler can
  1382.        handle resource files in 'sources').  Return a list of object
  1383.        filenames, one per source filename in 'sources'.  Depending on
  1384.        the implementation, not all source files will necessarily be
  1385.        compiled, but all corresponding object filenames will be
  1386.        returned.
  1387.  
  1388.        If 'output_dir' is given, object files will be put under it, while
  1389.        retaining their original path component.  That is, "foo/bar.c"
  1390.        normally compiles to "foo/bar.o" (for a Unix implementation); if
  1391.        'output_dir' is "build", then it would compile to
  1392.        "build/foo/bar.o".
  1393.  
  1394.        'macros', if given, must be a list of macro definitions.  A macro
  1395.        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
  1396.        The former defines a macro; if the value is None, the macro is
  1397.        defined without an explicit value.  The 1-tuple case undefines a
  1398.        macro.  Later definitions/redefinitions/ undefinitions take
  1399.        precedence.
  1400.  
  1401.        'include_dirs', if given, must be a list of strings, the
  1402.        directories to add to the default include file search path for this
  1403.        compilation only.
  1404.  
  1405.        'debug' is a boolean; if true, the compiler will be instructed to
  1406.        output debug symbols in (or alongside) the object file(s).
  1407.  
  1408.        'extra_preargs' and 'extra_postargs' are implementation- dependent.
  1409.        On platforms that have the notion of a command-line (e.g. Unix,
  1410.        DOS/Windows), they are most likely lists of strings: extra
  1411.        command-line arguments to prepend/append to the compiler command
  1412.        line.  On other platforms, consult the implementation class
  1413.        documentation.  In any event, they are intended as an escape hatch
  1414.        for those occasions when the abstract compiler framework doesn't
  1415.        cut the mustard.
  1416.  
  1417.        'depends', if given, is a list of filenames that all targets
  1418.        depend on.  If a source file is older than any file in
  1419.        depends, then the source file will be recompiled.  This
  1420.        supports dependency tracking, but only at a coarse
  1421.        granularity.
  1422.  
  1423.        Raises CompileError on failure.
  1424.        """
  1425.         # A concrete compiler class can either override this method
  1426.         # entirely or implement _compile().
  1427.         macros, objects, extra_postargs, pp_opts, build = \
  1428.                 self._setup_compile(output_dir, macros, include_dirs, sources,
  1429.                                     depends, extra_postargs)
  1430.         cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
  1431.  
  1432.         for obj in objects:
  1433.             try:
  1434.                 src, ext = build[obj]
  1435.             except KeyError:
  1436.                 continue
  1437. >           self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  1438.  
  1439. lib/python3.8/distutils/ccompiler.py:574:
  1440. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1441.  
  1442. self = <distutils.unixccompiler.UnixCCompiler object at 0x13c06bfd0>
  1443. obj = '/Users/thomastiotto/Library/Caches/cython/brian_extensions/Users/thomastiotto/Library/Caches/cython/brian_extensions/_cython_magic_3222b51974c5bfffb38fc4d2e4e2bfd2.o'
  1444. src = '/Users/thomastiotto/Library/Caches/cython/brian_extensions/_cython_magic_3222b51974c5bfffb38fc4d2e4e2bfd2.cpp'
  1445. ext = '.cpp'
  1446. cc_args = ['-I/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses', '-I/Users/thomastiotto/mam...an/lib/python3.8/site-packages/brian2/synapses', '-I/Users/thomastiotto/mambaforge/envs/brian/include/python3.8', '-c']
  1447. extra_postargs = ['-w', '-O3', '-ffast-math', '-fno-finite-math-only', '-march=native', '-std=c++11', ...]
  1448. pp_opts = ['-I/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/brian2/synapses', '-I/Users/thomastiotto/mam...vs/brian/lib/python3.8/site-packages/brian2/synapses', '-I/Users/thomastiotto/mambaforge/envs/brian/include/python3.8']
  1449.  
  1450.     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
  1451.         compiler_so = self.compiler_so
  1452.         if sys.platform == 'darwin':
  1453.             compiler_so = _osx_support.compiler_fixup(compiler_so,
  1454.                                                     cc_args + extra_postargs)
  1455.         try:
  1456.             self.spawn(compiler_so + cc_args + [src, '-o', obj] +
  1457.                        extra_postargs)
  1458.         except DistutilsExecError as msg:
  1459. >           raise CompileError(msg)
  1460. E           distutils.errors.CompileError: command 'gcc' failed with exit status 1
  1461.  
  1462. lib/python3.8/distutils/unixccompiler.py:120: CompileError
  1463.  
  1464. The above exception was the direct cause of the following exception:
  1465.  
  1466.     @pytest.mark.standalone_compatible
  1467.     @pytest.mark.multiple_runs
  1468.     def test_active_flag():
  1469.         G = NeuronGroup(1, 'dv/dt = 1/ms : 1')
  1470.         mon = StateMonitor(G, 'v', record=0)
  1471.         mon.active = False
  1472. >       run(1*ms)
  1473.  
  1474. lib/python3.8/site-packages/brian2/tests/test_base.py:73:
  1475. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1476. lib/python3.8/site-packages/brian2/units/fundamentalunits.py:2434: in new_f
  1477.     result = f(*args, **kwds)
  1478. lib/python3.8/site-packages/brian2/core/magic.py:373: in run
  1479.     return magic_network.run(duration, report=report, report_period=report_period,
  1480. lib/python3.8/site-packages/brian2/core/magic.py:231: in run
  1481.     Network.run(self, duration, report=report, report_period=report_period,
  1482. lib/python3.8/site-packages/brian2/core/base.py:278: in device_override_decorated_function
  1483.     return func(*args, **kwds)
  1484. lib/python3.8/site-packages/brian2/units/fundamentalunits.py:2434: in new_f
  1485.     result = f(*args, **kwds)
  1486. lib/python3.8/site-packages/brian2/core/network.py:1008: in run
  1487.     self.before_run(namespace)
  1488. lib/python3.8/site-packages/brian2/core/base.py:278: in device_override_decorated_function
  1489.     return func(*args, **kwds)
  1490. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1491.  
  1492. self = MagicNetwork()
  1493. run_namespace = {'@py_builtins': <module 'builtins' (built-in)>, '@pytest_ar': <module '_pytest.assertion.rewrite' from '/Users/thomas...e-packages/_pytest/assertion/rewrite.py'>, 'ALLOW_THREADS': 1, 'Annotation': <class 'matplotlib.text.Annotation'>, ...}
  1494.  
  1495.     @device_override('network_before_run')
  1496.     def before_run(self, run_namespace):
  1497.         '''
  1498.        before_run(namespace)
  1499.  
  1500.        Prepares the `Network` for a run.
  1501.  
  1502.        Objects in the `Network` are sorted into the correct running order, and
  1503.        their `BrianObject.before_run` methods are called.
  1504.  
  1505.        Parameters
  1506.        ----------
  1507.        run_namespace : dict-like, optional
  1508.            A namespace in which objects which do not define their own
  1509.            namespace will be run.
  1510.        '''
  1511.         all_objects = self.sorted_objects
  1512.         prefs.check_all_validated()
  1513.  
  1514.         # Check names in the network for uniqueness
  1515.         names = [obj.name for obj in all_objects]
  1516.         non_unique_names = [name for name, count in Counter(names).items()
  1517.                             if count > 1]
  1518.         if len(non_unique_names):
  1519.             formatted_names = ', '.join("'%s'" % name
  1520.                                         for name in non_unique_names)
  1521.             raise ValueError('All objects in a network need to have unique '
  1522.                              'names, the following name(s) were used more than '
  1523.                              'once: %s' % formatted_names)
  1524.  
  1525.         # Check that there are no SummedVariableUpdaters targeting the same
  1526.         # target variable
  1527.         _check_multiple_summed_updaters(all_objects)
  1528.  
  1529.         self._stopped = False
  1530.         Network._globally_stopped = False
  1531.  
  1532.         device = get_device()
  1533.         if device.network_schedule is not None:
  1534.             # The device defines a fixed network schedule
  1535.             if device.network_schedule != self.schedule:
  1536.                 # TODO: The human-readable name of a device should be easier to get
  1537.                 device_name = list(all_devices.keys())[list(all_devices.values()).index(device)]
  1538.                 logger.warn(("The selected device '{device_name}' only "
  1539.                              "supports a fixed schedule, but this schedule is "
  1540.                              "not consistent with the network's schedule. The "
  1541.                              "simulation will use the device's schedule.\n"
  1542.                              "Device schedule: {device.network_schedule}\n"
  1543.                              "Network schedule: {net.schedule}\n"
  1544.                              "Set the network schedule explicitly or set the "
  1545.                              "core.network.default_schedule preference to "
  1546.                              "avoid this warning.").format(device_name=device_name,
  1547.                                                            device=device,
  1548.                                                            net=self),
  1549.                             name_suffix='schedule_conflict', once=True)
  1550.  
  1551.         logger.debug("Preparing network {self.name} with {numobj} "
  1552.                      "objects: {objnames}".format(self=self,
  1553.                         numobj=len(all_objects),
  1554.                         objnames=', '.join(obj.name for obj in all_objects)),
  1555.                      "before_run")
  1556.  
  1557.         self.check_dependencies()
  1558.  
  1559.         for obj in all_objects:
  1560.             if obj.active:
  1561.                 try:
  1562.                     obj.before_run(run_namespace)
  1563.                 except Exception as ex:
  1564. >                   raise BrianObjectException("An error occurred when preparing an object.", obj) from ex
  1565. E                   brian2.core.base.BrianObjectException: Error encountered with object named "neurongroup_stateupdater".
  1566. E                   Object was created here (most recent call only, full details in debug log):
  1567. E                     File "/Users/thomastiotto/mambaforge/envs/brian/lib/python3.8/site-packages/_pytest/python.py", line 183, in pytest_pyfunc_call
  1568. E                       result = testfunction(**testargs)
  1569. E
  1570. E                   An error occurred when preparing an object. (See above for original error message and traceback.)
  1571.  
  1572. lib/python3.8/site-packages/brian2/core/network.py:899: BrianObjectException
  1573. ----------------------------- Captured stderr call -----------------------------
  1574. clang: error: the clang compiler does not support '-march=native'
  1575. clang: error: the clang compiler does not support '-march=native'
  1576. =========================== short test summary info ============================
  1577. FAILED lib/python3.8/site-packages/brian2/tests/test_base.py::test_active_flag
  1578. !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
  1579. 1 failed, 410 deselected in 0.85s
  1580. ERROR: 3/4 test suite(s) did not complete successfully (see above).
  1581. False
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement