-
Notifications
You must be signed in to change notification settings - Fork 6
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
Coffee dies on assembling degree 8 bilinear form. #113
Comments
I cannot reproduce this. |
Coffee's optimiser tries to call |
|
So this code does: decls = visit(self.header, info_items=['decls'])['decls']
# Assume the size of a C type double is 8 bytes
c_double_size = 8
# Assume the stack size is 1.7 MB (2 MB is usually the limit)
stack_size = 1.7*1024*1024
decls = [d for d in decls.values() if d.size]
size = sum([reduce(operator.mul, d.sym.rank) for d in decls])
if size * c_double_size > stack_size:
# Increase the stack size if the kernel's stack size seems to outreach
# the space available
try:
resource.setrlimit(resource.RLIMIT_STACK, (resource.RLIM_INFINITY,
resource.RLIM_INFINITY))
except resource.error:
warn("Stack may blow up, could not increase its size.") So you have a machine where both the soft and hard stack limits are 32MB. Without root, you can't up the stack size above the hard limit (which this code is doing). On mine, and I think @miklos1's, the hard limit is unlimited, so we're fine. This code is well sketchy anyway. It should at least ask for the current stack limit before deciding to change it... You could band-aid by also catching |
The bandaid solution appears to work. However.... |
Related: firedrakeproject/tsfc#127. |
COFFEE chokes on the following:
The error is:
The text was updated successfully, but these errors were encountered: