Page 1 of 1
recompile openCL kernel macOS after restart
Posted: Wed Jul 08, 2020 11:23 pm
by Cekuhnen
Luxcore always does recompile openCL kernel macOS after macOS restart with the same scene
Windows is fine.
Any idea why for the mac this always needs to be redone?
The compile takes very long and students on macs would be quite turned off by this.
Re: recompile openCL kernel macOS after restart
Posted: Thu Jul 09, 2020 11:03 am
by B.Y.O.B.
Maybe this is some specially configured macOS that wipes itself after restarts?
Or maybe just the kernel cache is created in a directory that is wiped?
Re: recompile openCL kernel macOS after restart
Posted: Thu Jul 09, 2020 5:39 pm
by Dade
B.Y.O.B. wrote: Thu Jul 09, 2020 11:03 am
Maybe this is some specially configured macOS that wipes itself after restarts?
Or maybe just the kernel cache is created in a directory that is wiped?
/tmp ? Some unix system usually delete everything /tmp after a boot ? Does MacOS delete everything after a reboot ?
Other possible problem may something related write permissions.
Re: recompile openCL kernel macOS after restart
Posted: Thu Jul 09, 2020 6:10 pm
by Dade
The code (
https://github.com/LuxCoreRender/LuxCor ... l.cpp#L213) uses boost::filesystem::temp_directory_path(): it is unclear what it is used on MacOS but it may be /tmp.
Re: recompile openCL kernel macOS after restart
Posted: Thu Jul 09, 2020 7:15 pm
by Cekuhnen
yeah after each macOS restart it is gone - just tested it again.
Windows is fine.
Re: recompile openCL kernel macOS after restart
Posted: Thu Jul 09, 2020 7:59 pm
by B.Y.O.B.
I just find it weird that no other macOS user has ever reported this problem.
That's why I'm wondering if those school/university machines are configured differently than normal (at least I assume we are talking about some kind of school/university machines here, or is it also happening on your personal machine?).
Re: recompile openCL kernel macOS after restart
Posted: Fri Jul 10, 2020 3:26 pm
by Dade
I'm out of the town at the moment I will be back in few days, this should be easy to fix. I can make it configurable to solve the problem at root: just something you can set in BlendLuxCore preferences.
Re: recompile openCL kernel macOS after restart
Posted: Tue Jul 14, 2020 1:59 pm
by Dade
MacOS OpenCL/CUDA kernel cache directory is now created in user home directory (as "luxcorerender.org") to avoid to be erased when in /tmp.
I don't have a Mac to test the new code (but it is Unix code and it works on Linux).
Re: recompile openCL kernel macOS after restart
Posted: Sat Jul 18, 2020 10:55 am
by u3dreal
Well guess i never restart my mac.. i'll test the patch
I recompiled so many times so i guess it was normal for me to rebuild the cache every time

Re: recompile openCL kernel macOS after restart
Posted: Sat Jul 18, 2020 11:33 am
by u3dreal
All seems to work here i'm not able to reproduce the problem with older build ... but it should work as expected now.