calebsmith / automaton

A cellular automata runner in C with Scheme scripting support
GNU General Public License v2.0
5 stars 3 forks source link

Develop #17

Closed kamni closed 9 years ago

kamni commented 9 years ago

Hi Caleb,

This is jleadbetter from CMG. You asked me to see if I could get automaton running on Mac, and I did (albeit, it still runs a bit oddly. It certainly took more than the 2 hours after my Yosemite install that I promised you). I've included a writeup and some changes to the code that were required to make this work. Please ping me at work if you have any questions -- hope it's useful.

calebsmith commented 9 years ago

Excellent! Thanks for this work. How did you figure out building bdw-gc because that part looks very hard to work through.

I think the rest of it follows what I sort of guessed. I should've mentioned the platform-dependent stuff around get_time if I didn't. At the time I implemented that bit, I just found whatever would work first. Since then, I've discovered that glfw has a cross-platform way to do it, and I've filed it under #18 .

As far as the weird performance problems, I have a few ideas but I'm really not sure. One thought is that we need an extra flag in the glfw/opengl initialization code for some reason. I only suspect this because OpenGL settings/capabilities seems to be a common platform related issue. It'd be great if we could run a profiling tool at some point to see where it's getting stuck.

Also, if/when you try to troubleshoot this further, it might be worth making a data file with a very very small board to see if the performance improves. There is a hard coded minimum that it will complain about if you blow past it. I'm thinking this might hopefully provide enough relief for running a profiling tool and not watching your machine fall apart at the seems in the meantime.

Another thought would be related to the OpenGL settings themselves. No idea where this would be for Yosemite. I know for instance that Sync VBlank needs to be set a certain way on my Ubuntu machine using Nvidia. I have an Intel graphics machine running Arch that worked fine with whatever defaults. This part is getting squarely into territory I don't know a lot about.

Thanks again for this work and its a giant first step to making the project cross-platform!

kamni commented 9 years ago

For the bdw-gc, I kind of got lucky and stumbled across the bug that I mentioned -- or more specifically, I stumbled across the patch after I looked up the bug online. I saw that the patch was already merged into the 7.5.0 development head, and from there it was a question of "How can I trick homebrew into using this" -- which was a little bit of trial and a lot of error.

I've noticed a lot of performance issues with Yosemite in general, so I'm not sure whether to blame the freezing on OpenGL configuration, the compile (xcode is getting worse with every release), or just a bloated/misconfigured OS.

Glad this worked for you, and I'll ping you again if I decide to tackle more cross-platform issues.