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

Issue with very large families #6

Open
Tb8854 opened this issue Jul 30, 2018 · 6 comments
Open

Issue with very large families #6

Tb8854 opened this issue Jul 30, 2018 · 6 comments

Comments

@Tb8854
Copy link

Tb8854 commented Jul 30, 2018

Hello,

When I go for a large family (which works in smaller chunks) I have the following error

When I run the following

kingraph myfamily_all.yml -F png > myfamily_all.png

I get the following result.

Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value 16777216, (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 
abort("Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value 16777216, (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 ") at Error
    at jsStackTrace (/usr/local/lib/node_modules/kingraph/node_modules/viz.js/viz.js:5:20800)
    at stackTrace (/usr/local/lib/node_modules/kingraph/node_modules/viz.js/viz.js:5:20983)
    at abort (/usr/local/lib/node_modules/kingraph/node_modules/viz.js/viz.js:28:5424)
    at abortOnCannotGrowMemory (/usr/local/lib/node_modules/kingraph/node_modules/viz.js/viz.js:5:21343)
    at enlargeMemory (/usr/local/lib/node_modules/kingraph/node_modules/viz.js/viz.js:5:21788)
    at Function.dynamicAlloc [as alloc] (/usr/local/lib/node_modules/kingraph/node_modules/viz.js/viz.js:5:6269)
    at _sbrk (/usr/local/lib/node_modules/kingraph/node_modules/viz.js/viz.js:5:602676)
    at N4 (/usr/local/lib/node_modules/kingraph/node_modules/viz.js/viz.js:21:7406)
    at cK (/usr/local/lib/node_modules/kingraph/node_modules/viz.js/viz.js:13:185312)
    at bK (/usr/local/lib/node_modules/kingraph/node_modules/viz.js/viz.js:13:185061)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

Adding options (1), (2) or (3) has no effect. The family isn't that big - around 200 lines and 400-500 people in 10 houses.

Any advice appreciated.

Mac OS 10.13.3

@vsmalladi
Copy link

I also have this issue.

@janisz
Copy link

janisz commented Aug 30, 2018

It looks like it's a problem with viz.js. Temporary workaround is to use dot

kingraph family.yaml --format=dot > family.dot  && dot -Tsvg family.dot > family.svg

@rstacruz
Copy link
Owner

rstacruz commented Sep 5, 2018

Thanks for the help debugging the issue!

@rstacruz
Copy link
Owner

rstacruz commented Sep 5, 2018

This seems to be worth at least documenting somewhere. Let's see if updating viz.js would help too.

@janisz
Copy link

janisz commented Sep 5, 2018

We can try increase totalMemory like proposed here mdaines/viz-js#89 or heere mdaines/viz-js#23

@momack2
Copy link

momack2 commented Jan 7, 2019

In case anyone else is curious - I fixed this by changing the totalMemory variable in viz.js with this line:
sudo sed -i '' -e 's/|16777216/|1677721600/' viz.js - that allows viz to use ~1.6GB

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

5 participants