# Changes between Version 16 and Version 19 of Ticket #27492

Ignore:
Timestamp:
Dec 16, 2020, 10:14:52 AM (2 years ago)
Comment:

Unmodified
Removed
Modified
• ## Ticket #27492 – Description

 v16 As reported in this [https://groups.google.com/forum/#!topic/sage-devel/k4W5eo4nQ50 sage-devel post] (see also [https://groups.google.com/d/msg/sage-devel/I00PGgyIZYo/RkCYmlmZEAAJ this one]), Sage fails silently on some parallelized computations involving symbolic functions. A minimal example with Sage 8.7.beta7 (**python2** version) is Sage fails in parallelized computations on tensor fields involving symbolic functions: {{{ sage: Parallelism().set(nproc=2) sage: v[0], v[1] = 1 + x*y, -x^2 sage: s = t.contract(v)  # parallelized computation occurs here sage: s0 = s[0].expr(); s0  # symbolic expression OK -x^3 - (x^2 - x*f(x))*y + f(x) sage: s0.coefficient(a, 1)  # incorrect output 0 }}} The correct result should be `x*y + 1`. The latter is obtained if one sets `nproc=1` in the first line (i.e. no parallelization). Furthermore, if one replaces the line {{{ sage: a = function('f')(x) }}} by {{{ sage: a = sin(x) }}} one gets a correct result as well. With the **python3** version of Sage 8.7.beta7, one does not get a silent failure but an error message when the parallel computation is performed, i.e. at the line `s = t.contract(v)`: {{{ TypeError                                 Traceback (most recent call last) /home/eric/sage/py3/local/lib/python3.6/site-packages/sage/symbolic/function_factory.py in function_factory(name, nargs, latex_name, conversions, evalf_params_first, eval_func, evalf_func, conjugate_func, real_part_func, imag_part_func, derivative_func, tderivative_func, power_func, series_func, print_func, print_latex_func) 109             setattr(NewSymbolicFunction, '_%s_'%func_name, func) 110 --> 111     return NewSymbolicFunction() 112 113 ... TypeError: expected str, bytes found }}} The full error message is attached. **UPDATE** (1 Aug. 2020): the parallel computation still fails in Sage 9.2.beta6, but this time the error message is different: {{{ sage: s = t.contract(v) --------------------------------------------------------------------------- RemoteTraceback                           Traceback (most recent call last) }}} The full error message is attached. This issue has been reported in various places previously. With old Python-2 Sage it resulted in a silent error, see this [https://groups.google.com/forum/#!topic/sage-devel/k4W5eo4nQ50 sage-devel post] (see also [https://groups.google.com/d/msg/sage-devel/I00PGgyIZYo/RkCYmlmZEAAJ this one]).