-
Notifications
You must be signed in to change notification settings - Fork 662
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
Not compiling on Apple M1 system #8
Comments
try to: |
Yup started there first. Same result shown. Not sure if I need to adjust the make_devel.sh or CMakelists somehow to force it to use the piece I was missing and pulled in from home brew. Or force it to use gcc from home brew instead of apple's clang? |
Should be fixed in master. |
Also trying to compile on M1 Mac. How did you get SODIUM FOUND -- did you edit the make files? I've tried using: brew install libsodium-dev but doesn't seem to be found, so not sure how to add the correct library. I'm getting: |
try: |
Tried installing/reinstalling/uninstall then install for gmp, cleaning and recompiling but still no dice. I did manage to use
since they don't have a -dev version of that for brew, not sure if that's the missing piece. |
I wasn't getting gmp errors before but now am. I did brew install gmp
However earlier I am seeing that CMake is finding gmp.
|
Did you manage to get it compile on an M1 earlier, and then this error came up, or did you hit compile errors until you eventually got to this part? Would be good to know if someone has got it compiled on MacOS and if there are any particular additional steps. |
Haven't gotten it successfully yet, at least not properly. Well, ok, I manually copied gmp.h from homebrew's folders into where I'm compiling, and then got similar error not finding sodium (but that's installed via homebrew too. and copied it and it's folder to the right place in the build folder structure, I think.... And it compiled. But running it always gives me an error after a few minutes, and I can't be sure that it compiled right since I know the above copying wasn't the 'right' way to do it...
|
yep its a bug in the apple kernel I think |
Well how about that! It's rolling along nicely now. Haven't completed a full plot yet but got further so far than previously! |
Nope, same bus error a little later on
|
ok reduce it down to 32768, looks like the m1 is different to intel https://github.com/madMAx43v3r/chia-plotter/pulls that was my job for this morning/ |
Does this write any more detailed logs anywhere to see what it's erroring out on? Is it hitting an open file count limit? https://forum.unity.com/threads/too-many-open-files.1036252/ Trying the increase to maxfiles from above and running again. |
Running out of files..... I doubt it... compile the debug version one i get this FS thing fixed.. ill take a look |
So you have an M1, or not your screenshot and you are trying to tease out specs as I test lower values? Have istat, don't pay much attention to the temps, since I've no concern it would "destroy the cpu" simply by taxing it heavily, plus, they generally stand behind their warranties well. |
Worthwhile to keep lowering it or just chill until that pull request is merged?
|
it's merged now |
yep.. i got the same. MacBook Pro (Retina, 15-inch, Mid 2015).. badly overheating so i think it could do a lot better..... still running but further than you got with the old copy.. so i think it will be fine. |
It shouldn't... how much more are we talking? |
No luck, missing a dependency?
|
Yes, no idea how it works in |
Do I just need to comment out the #include filesystem line?
|
yep i had exactly the same. ahhhh.... I think i did this.. CMakeLists.txt then in "/include" i added: then in "chia_filesystem.hpp" it might also need a "brew install" but leave that till later just incase. but all this is caused by a couple of lines checking a directory validity.. |
yeah I will remove that dependency again... |
Hmm, that compiled, until it hit a new snag at the end
|
yeah just remove that also from CMakeLists.txt |
Cool, plotting away now. |
Interesting. 2 hours later, still plotting. It seems slower than normal. Running Pechy's opimized/combined branch, with just 2 threads and default RAM setting, I was able to plot a K32 on my apple M1 in just over 3 hours to an SSD in a TB3 enclosure. Here I have tmp1 as an ssd in a USB3.1 enclosure (so 5 Gbps), and tmp2 for the ssd in the TB3 enclosure (40 Gbps). (both NVME 1tb SSDs starting empty).
Should it be faster? |
End result, failed: libc++abi: terminating with uncaught exception of type std::runtime_error: thread failed with: fread() failed
|
Is that with latest master? Ie. with this fix 7e768ca ? |
Otherwise I would check kernel logs for USB errors.. |
No, let me recompile and start another. |
ok something else is going on... when I say good runs, they completed & validated. what would be good is if it could utilise more RAM, without ram disks. |
It may be something unique to OS 11, or the fact that I'm using an M1 16GB MBpro. Either way, recompiled and running another plot to see how this one pans out. |
Same issue again. Interestingly, OS X reported that my ssd was disconnected unsafely. It's never done this after plotting 100+ plots on it using the normal chia client... OS X did log a nice crash report for these, although I've no idea how to read it.
Crash report:
|
This is in the OSX kernel what are your temps? try changing teh read block sizes to something stupid like 8192 chia-plotter/src/settings.cpp Also a "stage restart" might be useful for interrupting & restarting plotting jobs.... |
Yeah it didn't physically disconnect something software hiccuped. I can run 2 plots staggered 24/7 on this computer with the official client with no issues. Not sure what you mean with a stage restart since there is no plotman nor chia daemons . I swapped the tmp 1 and tmp2 drive paths to rule out the hardware being an issue. If it quits again maybe I'll recompile with smaller read block size as you suggest. Thanks,. |
The official client does not hammer the hardware the same way. what i mean by restart , is that once it aborts there is no way to restart the process... which makes debugging expensive on time. |
You can use the |
What's interesting is that reversing the tmps directories (both external NVME ssds 1TB, one via usb 3.1, one via TB3) resulted in a successful plot, albeit a bit slower than the standard client. Is there any logic to why it would crash each time if I made the working directory 1 the USB 3.1 drive, and working directory 2 the TB3 drive? I can plot with standard client fine to both simultaneously without issue. How should I run the test_phase_x tool to get more data about why it's crashing? Do they take the same parameters just output more data?
|
The access pattern is different for |
Alright, I'm reliably getting this to work. Performance is surprising. It seems at 4 threads, no faster than the pechy/merged branch of the plotter. I'm running another now set to 5 threads. I can close this out, or keep it around to track discoveries [no, let's use discussions for that]? I'm curious since the Apple M1 cpu has 4 performance cores, and 4 'efficiency' cores, I don't really know what it's doing when I tell it 5 or 6 threads. I know at 5 it's pegging all 4 performance cores at 90-100%, and all 4 efficiency cores have use around 40-75%. (still in phase 1) RAM doesn't seem to be bad (I've got 16gb) I glance at it now and then and the chia_plot process doesn't seem to consume more than 2.5-ish GB, although often I see it claiming less than that (for as accurate as apple's activity monitor is). |
Have you tried running it once on Apple's internal disk (if you have enough space, and don't mind writing a TB or two) just to see how well it can go? I'm surprised it's not doing better, I can only guess it's causing throttling on your external SSDs. I have yet to attempt another compile. |
Well... I've no desire to tempt fate but yeah, I'll run one plot on my internal ssd just for kicks and see what times it gives me. |
Ran it on the internal NVME SSD of my M1 MBP. (1 TB, 16GB ram model). 4 threads, nothing else running. I've hit that regularly using my TB3 NVME SSD, so, using the internal storage offered no speed gain. It's probably limited by just 4 threads on the M1 cpu. |
well at least it is finally running...... |
…onsorship Removed sponsorship notice in the Chia fork (permission granted by madMAx43v3r)
Getting some compiling errors, is this info helpful:
The text was updated successfully, but these errors were encountered: