by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 06 01:17

    richardotis on sundman-solver

    WIP: Model: redlich_kister_sum:… (compare)

  • Jul 01 16:57

    richardotis on sundman-solver

    FIX: eqcalculate: Calculate deg… MAINT: Rename models -> model f… FIX: Two sublattice ionic liqui… and 3 more (compare)

  • Jul 01 16:08

    richardotis on website

    DOC: Deploy 'latest' docs to we… (compare)

  • Jul 01 16:01

    richardotis on develop

    ENH: hyperplane() improvements … (compare)

  • Jul 01 16:01
    richardotis closed #274
  • Jul 01 15:31
    richardotis edited #274
  • Jun 29 00:43

    richardotis on sundman-solver-zpf

    FIX: FastFunction: pickling (compare)

  • Jun 08 18:28

    richardotis on sundman-solver-zpf

    ENH: find_solution: Remove arra… Merge branch 'sundman-solver' i… (compare)

  • May 31 00:02

    richardotis on sundman-solver

    ENH: find_solution: Remove arra… (compare)

  • May 29 00:31

    richardotis on sundman-solver-zpf

    FIX: binplot: Pass solver eq_kw… (compare)

  • May 26 17:35
    igorjrd synchronize #258
  • May 26 01:47

    richardotis on sundman-solver-zpf

    ENH/WIP: Problem/PhaseRecord/ca… FIX: build_functions: Parameter… (compare)

  • May 25 21:27
    igorjrd synchronize #258
  • May 25 19:45
    igorjrd synchronize #258
  • May 24 01:29
    richardotis review_requested #274
  • May 24 00:51
    richardotis synchronize #274
  • May 24 00:51

    richardotis on vectorize-parameters

    FIX/TST: calculate: parameters … (compare)

  • May 23 23:30
    richardotis synchronize #274
  • May 23 23:30

    richardotis on vectorize-parameters

    MNT: core.utils: Remove unused … (compare)

  • May 23 22:31
    richardotis synchronize #274
Richard Otis
@richardotis
Try adding the following to the top of your script:
import pycalphad.codegen.sympydiff_utils
pycalphad.codegen.sympydiff_utils.LAMBDIFY_DEFAULT_BACKEND = 'lambda'
If you do that, does it work?
monforte-pedro
@monforte-pedro

Now it generated this error

Traceback (most recent call last):
File "<stdin>", line 34, in <module>
File "C:\Users\pedro\miniconda3\lib\site-packages\pycalphad\core\equilibrium.py", line 235, in equilibrium
build_gradients=True, build_hessians=True)
File "C:\Users\pedro\miniconda3\lib\site-packages\pycalphad\codegen\callables.py", line 204, in build_phase_records
build_hessians=build_hessians)
File "C:\Users\pedro\miniconda3\lib\site-packages\pycalphad\codegen\callables.py", line 115, in build_callables
include_grad=build_gradients, include_hess=build_hessians)
File "C:\Users\pedro\miniconda3\lib\site-packages\pycalphad\core\cache.py", line 141, in wrapper
result = user_function(args, kwds)
File "C:\Users\pedro\miniconda3\lib\site-packages\pycalphad\codegen\sympydiff_utils.py", line 114, in build_functions
func = lambdify(inp, [graph],
_get_lambidfy_options(func_options))
File "C:\Users\pedro\miniconda3\lib\site-packages\symengine__init__.py", line 35, in lambdify
return Lambdify(args,
exprs, **kwargs)
File "symengine_wrapper.pyx", line 4868, in symengine.lib.symengine_wrapper.Lambdify
File "symengine_wrapper.pyx", line 4515, in symengine.lib.symengine_wrapper._Lambdify.init
File "symengine_wrapper.pyx", line 4712, in symengine.lib.symengine_wrapper.LambdaDouble._init
RuntimeError: Symbol not in the symbols vector.

Richard Otis
@richardotis
This is the result you're getting for a Ni-Al calculation with the NI_AL_DUPIN_2001.TDB database?
The database hasn't been modified?
monforte-pedro
@monforte-pedro
Yes, the database hasn't been changed
Richard Otis
@richardotis
What is the output of import sympy ; print(sympy.__version__)
monforte-pedro
@monforte-pedro
1.5.1
Richard Otis
@richardotis
Hm, that's correct. As a sanity check, I will try to reproduce your issue now.
monforte-pedro
@monforte-pedro
ok
thank you very much for the help
Richard Otis
@richardotis
I'm able to generate the Al-Ni phase diagram on pycalphad 0.8.3. This is a strange issue.
In console, can you run conda list and provide the output?
monforte-pedro
@monforte-pedro

packages in environment at C:\Users\pedro\miniconda3:

#

Name Version Build Channel

alabaster 0.7.12 py37_0 anaconda
apscheduler 3.6.3 py37hc8dfbb8_1 conda-forge
argh 0.26.2 py37_0 anaconda
ase 3.19.1 py_0 conda-forge
astroid 2.3.3 py37_0 anaconda
atomicwrites 1.4.0 py_0 anaconda
attrs 19.3.0 py_0 conda-forge
autopep8 1.5.3 py_0 anaconda
babel 2.8.0 py_0 anaconda
backcall 0.2.0 pyh9f0ad1d_0 conda-forge
bcrypt 3.1.7 py37h8055547_1 conda-forge
beautifulsoup4 4.9.1 py37hc8dfbb8_0 conda-forge
blas 1.0 mkl
bleach 3.1.5 pyh9f0ad1d_0 conda-forge
blosc 1.19.0 ha925a31_0 conda-forge
brotlipy 0.7.0 py37h4ab8f01_1000 conda-forge
bzip2 1.0.8 hfa6e2cd_2 conda-forge
ca-certificates 2020.6.20 hecda079_0 conda-forge
certifi 2020.6.20 py37hc8dfbb8_0 conda-forge
cffi 1.14.0 py37ha419a9e_0 conda-forge
cftime 1.2.0 py37h44b1f71_1 conda-forge
chardet 3.0.4 py37hc8dfbb8_1006 conda-forge
click 7.1.2 pyh9f0ad1d_0 conda-forge
cloudpickle 1.4.1 py_0 anaconda
colorama 0.4.3 py_0 conda-forge
conda 4.8.3 py37hc8dfbb8_1 conda-forge
conda-package-handling 1.6.0 py37h702c6c1_2 conda-forge
console_shortcut 0.1.1 4
cryptography 2.9.2 py37h26f1ce3_0 conda-forge
curl 7.71.1 h4b64cdc_0 conda-forge
cycler 0.10.0 py_2 conda-forge
cyipopt 0.1.7 py37_2 pycalphad
cython 0.29.20 py37h1834ac0_0 conda-forge
decorator 4.4.2 py_0 conda-forge
defusedxml 0.6.0 py_0 conda-forge
diff-match-patch 20181111 py_0 anaconda
dill 0.3.2 pyh9f0ad1d_0 conda-forge
docutils 0.16 py37_1 anaconda
elastic 5.1.0.17 py_1 conda-forge
entrypoints 0.3 py37hc8dfbb8_1001 conda-forge
expat 2.2.9 he025d50_2 conda-forge
fastcache 1.1.0 py37h8055547_1 conda-forge
fipy 3.4.1 pypi_0 pypi
flake8 3.8.3 py_0 anaconda
flask 1.1.2 pyh9f0ad1d_0 conda-forge
freetype 2.10.2 hd328e21_0 conda-forge
future 0.18.2 py37hc8dfbb8_1 conda-forge
gitdb 4.0.5 py_0 conda-forge
gitpython 3.1.3 py_0 conda-forge
h5io 0.1.2 pyh95af2a2_0 conda-forge
h5py 2.10.0 nompi_py37hde23a51_103 conda-forge
hdf4 4.2.13 hf8e6fe8_1003 conda-forge
hdf5 1.10.6 nompi_ha405e13_100 conda-forge
icc_rt 2019.0.0 h0cc432a_1
icu 64.2 he025d50_1 conda-forge
idna

Richard Otis
@richardotis
It might be better to paste the output into a text file, and then drag and drop the file into the window here. There's a line limit
monforte-pedro
@monforte-pedro
sorry, i'll do that
Richard Otis
@richardotis
Another guess: Try changing the database line in the script to dbf = Database(open('NI_AL_DUPIN_2001.TDB', encoding='latin-1').read())
monforte-pedro
@monforte-pedro
no change at all. I tried with and without the last import change that you said
Richard Otis
@richardotis
I'm honestly puzzled. Do any of the other phase diagram examples work?
monforte-pedro
@monforte-pedro
I tried the Al-Zn also, but the same ocurred.
But i'll try others
Richard Otis
@richardotis
Did you install pycalphad into a fresh conda environment?
monforte-pedro
@monforte-pedro
Hum, actually, no. I forgot to create a new one before the installation
Richard Otis
@richardotis
Give that a try. If you're using Jupyter, be sure to install it into that new environment too
monforte-pedro
@monforte-pedro
okay
monforte-pedro
@monforte-pedro
I've done it, but the error changed
Traceback (most recent call last):
File "<stdin>", line 34, in <module>
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\pycalphad\plot\binary.py", line 48, in binplot
full_eq = equilibrium(dbf, comps, phases, conds, eq_kwargs)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\pycalphad\core\equilibrium.py", line 268, in equilibrium
parameters=param_symbols)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\pycalphad\core\cache.py", line 140, in wrapper
result = user_function(*args,
kwds)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\pycalphad\core\sympydiff_utils.py", line 147, in build_functions
sympy_graph_nobroadcast = sympygraph.xreplace(nobroadcast)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\core\basic.py", line 1168, in xreplace
value,
= self._xreplace(rule)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\core\basic.py", line 1183, in _xreplace
a_xr = _xreplace(rule)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\core\basic.py", line 1183, in _xreplace
a_xr = _xreplace(rule)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\core\basic.py", line 1183, in _xreplace
a_xr = _xreplace(rule)
[Previous line repeated 3 more times]
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\core\basic.py", line 1190, in _xreplace
return self.func(args), True
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\functions\elementary\piecewise.py", line 136, in new
r = cls.eval(
newargs)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\functions\elementary\piecewise.py", line 187, in eval
c = c.as_set().as_relational(x)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\logic\boolalg.py", line 148, in as_set
if periodicity(r, x) not in (0, None):
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\calculus\util.py", line 431, in periodicity
f = simplify(f)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\simplify\simplify.py", line 719, in simplify
return done(expr)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\simplify\simplify.py", line 543, in done
rv = e.doit() if doit else e
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\core\operations.py", line 378, in doit
terms = [term.doit(hints) for term in self.args]
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\core\operations.py", line 378, in <listcomp>
terms = [term.doit(
hints) for term in self.args]
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\sympy\matrices\expressions\matexpr.py", line 724, in doit
return args[0][args[1], args[2]]
TypeError: 'Dummy' object is not subscriptable
I runned the script as the original example, without our fixing trials
Richard Otis
@richardotis
Okay, so I'm not sure what's going on, but that is the wrong version of pycalphad.
The build_functions that is mentioned in that traceback is showing code from an old version
Are you on Python 3.5 or 3.6?
Sorry, 3.6 or 3.7
monforte-pedro
@monforte-pedro
Python 3.6.10
Richard Otis
@richardotis
Your environment showed that you have py37he025d50_0 (0.8.3) installed from the pycalphad channel. I just pulled that package to check it, and the code showing up in your traceback doesn't exist in that version
What does conda list show in the new environment
monforte-pedro
@monforte-pedro
now it is showing that the python version is 3.6.10
Richard Otis
@richardotis
Same with the Py36 package. Do you have multiple versions of pycalphad anywhere, maybe?
Yeah, for the new environment, you have pycalphad 0.7
That version won't work
(not with that version of sympy, anyway)
Try making a new environment, but use the line pycalphad==0.8.3 to make sure the right environment is installed
monforte-pedro
@monforte-pedro
Okay! Hum, but that is strange, since I intalled it with the conda install -c pycalphad -c conda-forge pycalphad
Oh, okay
Richard Otis
@richardotis
conda has to be forced to do the right thing sometimes
monforte-pedro
@monforte-pedro
Tried, but generated a new error
Traceback (most recent call last):
File "<stdin>", line 34, in <module>
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\pycalphad\plot\binary\plot.py", line 100, in binplot
zpf_boundaries = map_binary(database, components, phases, conditions, map_kwargs)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\pycalphad\plot\binary\map.py", line 112, in map_binary
parameters=parameters, to_xarray=False,
calc_kwargs)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\pycalphad\core\calculate.py", line 365, in calculate
largest_energy=float(largest_energy), fake_points=fp)
File "C:\Users\pedro\miniconda3\envs\newenv\lib\site-packages\pycalphad\core\calculate.py", line 185, in _compute_phase_values
phase_record.obj_2d(phase_output, dof)
AttributeError: 'pycalphad.core.phase_rec.PhaseRecord' object has no attribute 'obj_2d'