Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solve-fe #587

Open
Farid1488 opened this issue Aug 14, 2023 · 0 comments
Open

solve-fe #587

Farid1488 opened this issue Aug 14, 2023 · 0 comments

Comments

@Farid1488
Copy link

"Hello, I have installed version 0.4.1 of PyMKS. However, when I try to use solve_fe and run the composite stiffness calculation example, I encounter the following error. Could you please assist me if you're familiar with this issue?"

Thank you

AttributeError Traceback (most recent call last)
Cell In[5], line 8
1 #PYTEST_VALIDATE_IGNORE_OUTPUT
3 y_stress = solve_fe(x_data,
4 elastic_modulus=(270, 200),
5 poissons_ratio=(0.28, 0.3),
6 macro_strain=0.001)['stress'][..., 0]
----> 8 y_data = da.average(y_stress.reshape(y_stress.shape[0], -1), axis=1).persist()

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\base.py:263, in DaskMethodsMixin.persist(self, **kwargs)
224 def persist(self, **kwargs):
225 """Persist this dask collection into memory
226
227 This turns a lazy Dask collection into a Dask collection with the same
(...)
261 dask.base.persist
262 """
--> 263 (result,) = persist(self, traverse=False, **kwargs)
264 return result

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\base.py:836, in persist(traverse, optimize_graph, scheduler, *args, **kwargs)
833 keys.extend(a_keys)
834 postpersists.append((rebuild, a_keys, state))
--> 836 results = schedule(dsk, keys, **kwargs)
837 d = dict(zip(keys, results))
838 results2 = [r({k: d[k] for k in ks}, *s) for r, ks, s in postpersists]

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\threaded.py:81, in get(dsk, result, cache, num_workers, pool, **kwargs)
78 elif isinstance(pool, multiprocessing.pool.Pool):
79 pool = MultiprocessingPoolExecutor(pool)
---> 81 results = get_async(
82 pool.submit,
83 pool._max_workers,
84 dsk,
85 result,
86 cache=cache,
87 get_id=_thread_get_id,
88 pack_exception=pack_exception,
89 **kwargs,
90 )
92 # Cleanup pools associated to dead threads
93 with pools_lock:

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\local.py:506, in get_async(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)
504 _execute_task(task, data) # Re-execute locally
505 else:
--> 506 raise_exception(exc, tb)
507 res, worker_id = loads(res_info)
508 state["cache"][key] = res

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\local.py:314, in reraise(exc, tb)
312 if exc.traceback is not tb:
313 raise exc.with_traceback(tb)
--> 314 raise exc

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\local.py:219, in execute_task(key, task_info, dumps, loads, get_id, pack_exception)
217 try:
218 task, data = loads(task_info)
--> 219 result = _execute_task(task, data)
220 id = get_id()
221 result = dumps((result, id))

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\core.py:119, in _execute_task(arg, cache, dsk)
115 func, args = arg[0], arg[1:]
116 # Note: Don't assign the subtask results to a variable. numpy detects
117 # temporaries by their reference count and can execute certain
118 # operations in-place.
--> 119 return func(*(_execute_task(a, cache) for a in args))
120 elif not ishashable(arg):
121 return arg

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\core.py:119, in (.0)
115 func, args = arg[0], arg[1:]
116 # Note: Don't assign the subtask results to a variable. numpy detects
117 # temporaries by their reference count and can execute certain
118 # operations in-place.
--> 119 return func(*(_execute_task(a, cache) for a in args))
120 elif not ishashable(arg):
121 return arg

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\core.py:113, in _execute_task(arg, cache, dsk)
85 """Do the actual work of collecting data and executing a function
86
87 Examples
(...)
110 'foo'
111 """
112 if isinstance(arg, list):
--> 113 return [_execute_task(a, cache) for a in arg]
114 elif istask(arg):
115 func, args = arg[0], arg[1:]

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\core.py:113, in (.0)
85 """Do the actual work of collecting data and executing a function
86
87 Examples
(...)
110 'foo'
111 """
112 if isinstance(arg, list):
--> 113 return [_execute_task(a, cache) for a in arg]
114 elif istask(arg):
115 func, args = arg[0], arg[1:]

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\core.py:119, in _execute_task(arg, cache, dsk)
115 func, args = arg[0], arg[1:]
116 # Note: Don't assign the subtask results to a variable. numpy detects
117 # temporaries by their reference count and can execute certain
118 # operations in-place.
--> 119 return func(*(_execute_task(a, cache) for a in args))
120 elif not ishashable(arg):
121 return arg

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\core.py:119, in (.0)
115 func, args = arg[0], arg[1:]
116 # Note: Don't assign the subtask results to a variable. numpy detects
117 # temporaries by their reference count and can execute certain
118 # operations in-place.
--> 119 return func(*(_execute_task(a, cache) for a in args))
120 elif not ishashable(arg):
121 return arg

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\core.py:119, in _execute_task(arg, cache, dsk)
115 func, args = arg[0], arg[1:]
116 # Note: Don't assign the subtask results to a variable. numpy detects
117 # temporaries by their reference count and can execute certain
118 # operations in-place.
--> 119 return func(*(_execute_task(a, cache) for a in args))
120 elif not ishashable(arg):
121 return arg

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\core.py:119, in (.0)
115 func, args = arg[0], arg[1:]
116 # Note: Don't assign the subtask results to a variable. numpy detects
117 # temporaries by their reference count and can execute certain
118 # operations in-place.
--> 119 return func(*(_execute_task(a, cache) for a in args))
120 elif not ishashable(arg):
121 return arg

[... skipping similar frames: _execute_task at line 119 (2 times), <genexpr> at line 119 (1 times)]

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\core.py:119, in (.0)
115 func, args = arg[0], arg[1:]
116 # Note: Don't assign the subtask results to a variable. numpy detects
117 # temporaries by their reference count and can execute certain
118 # operations in-place.
--> 119 return func(*(_execute_task(a, cache) for a in args))
120 elif not ishashable(arg):
121 return arg

File ~\AppData\Local\anaconda3\envs\pythonProject10\lib\site-packages\dask\core.py:119, in _execute_task(arg, cache, dsk)
115 func, args = arg[0], arg[1:]
116 # Note: Don't assign the subtask results to a variable. numpy detects
117 # temporaries by their reference count and can execute certain
118 # operations in-place.
--> 119 return func(*(_execute_task(a, cache) for a in args))
120 elif not ishashable(arg):
121 return arg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant