PHCpack
PHCpack copied to clipboard
Failed to append solution in special 7-bar problem
I'm getting the following test error after building PHCpy in Ubuntu 21.04:
Python 3.9.4 (default, Apr 4 2021, 19:38:44)
[GCC 10.2.1 20210401] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import phcpy
PHCv2.4.84 released 2020-02-26 works!
>>> phcpy.examples.solve_sevenbar()
solving a special 7-bar problem...
Failed to append solution t : 1.00011235011606E-02 0.00000000000000E+00
m : 1
the solution for t :
t1 : NaN***************** NaN*****************
t2 : NaN***************** NaN*****************
t3 : NaN***************** NaN*****************
t6 : NaN***************** NaN*****************
t4 : NaN***************** NaN*****************
t5 : NaN***************** NaN*****************
zz1 : NaN***************** NaN*****************
== err : NaN****** = rco : NaN****** = res : NaN****** =.
Solution at position 17 is not appended.
Failed to append solution t : 2.00011235011606E-02 0.00000000000000E+00
m : 1
the solution for t :
t1 : NaN***************** NaN*****************
t2 : NaN***************** NaN*****************
t3 : NaN***************** NaN*****************
t6 : NaN***************** NaN*****************
t4 : NaN***************** NaN*****************
t5 : NaN***************** NaN*****************
zz1 : NaN***************** NaN*****************
== err : NaN****** = rco : NaN****** = res : NaN****** =.
Solution at position 28 is not appended.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/phcpy/examples.py", line 1009, in solve_sevenbar
assert len(sols[1][1]) == 3
AssertionError
Thanks for reporting this issue. I have not yet tested phcpy with python 3.9 What happens if you do from phcpy.examples import test test() In that test(), the sevenbar problem is solve with a fixed seed of the random number generator.
What happens if you do from phcpy.examples import test test() In that test(), the sevenbar problem is solve with a fixed seed of the random number generator.
Same problem. (Running test() is how I found this issue to begin with. All the other tests it runs were successful.)