-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Description
The following code example fails to calculate with the given database. The database is known to work as tested in other software.
dbf = Database('/path/to/db.tdb')
phases = ['FCC'_A1, 'FCC_L12' ]
components = ["AL", "CO", "CR", "W", "VA"]
conditions = {"T": 1248, "P":101325, v.X("AL"):0.081, v.X("CR"): 0.020, v.X("W"):0.094}
equilibrium(dbf, components, phases, conditions)
The traceback for this is as follows
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-3-2193fcd054eb> in <module>()
15 components = ["AL", "CO", "CR", "W", "VA"]
16 conditions = {"T": 1248, "P":101325, v.X("AL"):0.081, v.X("CR"): 0.020, v.X("W"):0.094}
---> 17 equilibrium(dbf, components, phases, conditions)
18 #equilibrium(dbf, ['AL', 'CO', 'CR', 'W'], phases, {v.X('CR'):0.05 v.X('CO'):0.77, v.X('W'):0.09, v.X('AL'):0.09, v.T:1250, v.P:101325})
19 #binplot(db, ['AL', 'CR', 'VA'] , phases, {v.X('CR'):(0,1,0.02),
/Users/brandon/Projects/pycalphad/pycalphad/core/equilibrium.py in equilibrium(dbf, comps, phases, conditions, output, model, verbose, broadcast, calc_opts, scheduler, parameters, **kwargs)
356 delayed(properties.attrs.__setitem__, pure=False)('created', datetime.utcnow())
357 if scheduler is not None:
--> 358 properties = dask.compute(properties, get=scheduler)[0]
359 return properties
/Users/brandon/anaconda3/envs/espei/lib/python3.5/site-packages/dask/base.py in compute(*args, **kwargs)
176 dsk = merge(var.dask for var in variables)
177 keys = [var._keys() for var in variables]
--> 178 results = get(dsk, keys, **kwargs)
179
180 results_iter = iter(results)
/Users/brandon/anaconda3/envs/espei/lib/python3.5/site-packages/dask/async.py in get_sync(dsk, keys, **kwargs)
548 kwargs.pop('num_workers', None) # if num_workers present, remove it
549 return get_async(apply_sync, 1, dsk, keys,
--> 550 raise_on_exception=True, **kwargs)
551
552
/Users/brandon/anaconda3/envs/espei/lib/python3.5/site-packages/dask/async.py in get_async(apply_async, num_workers, dsk, result, cache, get_id, raise_on_exception, rerun_exceptions_locally, callbacks, dumps, loads, **kwargs)
507
508 while state['ready'] and len(state['running']) < num_workers:
--> 509 fire_task()
510
511 except KeyboardInterrupt:
/Users/brandon/anaconda3/envs/espei/lib/python3.5/site-packages/dask/async.py in fire_task()
474 args=(key, dumps((dsk[key], data)),
475 dumps, loads, get_id, raise_on_exception),
--> 476 callback=queue.put)
477
478 # Seed initial tasks into the thread pool
/Users/brandon/anaconda3/envs/espei/lib/python3.5/site-packages/dask/async.py in apply_sync(func, args, kwds, callback)
536 def apply_sync(func, args=(), kwds={}, callback=None):
537 """ A naive synchronous version of apply_async """
--> 538 res = func(*args, **kwds)
539 if callback is not None:
540 callback(res)
/Users/brandon/anaconda3/envs/espei/lib/python3.5/site-packages/dask/async.py in execute_task(key, task_info, dumps, loads, get_id, raise_on_exception)
266 try:
267 task, data = loads(task_info)
--> 268 result = _execute_task(task, data)
269 id = get_id()
270 result = dumps((result, None, id))
/Users/brandon/anaconda3/envs/espei/lib/python3.5/site-packages/dask/async.py in _execute_task(arg, cache, dsk)
247 func, args = arg[0], arg[1:]
248 args2 = [_execute_task(a, cache) for a in args]
--> 249 return func(*args2)
250 elif not ishashable(arg):
251 return arg
/Users/brandon/Projects/pycalphad/pycalphad/core/eqsolver.pyx in pycalphad.core.eqsolver._solve_eq_at_conditions (pycalphad/core/eqsolver.c:17825)()
IndexError: index 4 is out of bounds for axis 6 with size 4
This was also confirmed using each phase individually and in another database and the same conditions, so it does not seem to be a problem with how any one specific model is represented.
This is on the develop branch, commit a518e1a
Metadata
Metadata
Assignees
Labels
No labels