recompile openCL kernel macOS after restart

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
Cekuhnen
Posts: 8
Joined: Fri Dec 27, 2019 12:38 pm

recompile openCL kernel macOS after restart

Post 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.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: recompile openCL kernel macOS after restart

Post 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?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: recompile openCL kernel macOS after restart

Post 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.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: recompile openCL kernel macOS after restart

Post 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.
Support LuxCoreRender project with salts and bounties
Cekuhnen
Posts: 8
Joined: Fri Dec 27, 2019 12:38 pm

Re: recompile openCL kernel macOS after restart

Post by Cekuhnen »

yeah after each macOS restart it is gone - just tested it again.

Windows is fine.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: recompile openCL kernel macOS after restart

Post 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?).
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: recompile openCL kernel macOS after restart

Post 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.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: recompile openCL kernel macOS after restart

Post 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).
Support LuxCoreRender project with salts and bounties
User avatar
u3dreal
Developer
Developer
Posts: 560
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

Re: recompile openCL kernel macOS after restart

Post 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 :)
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - BigSur
Xeon X5650@4Ghz, RX 5700 - BigSur , Windows 10, Ubuntu 20.04
User avatar
u3dreal
Developer
Developer
Posts: 560
Joined: Tue Dec 03, 2019 3:23 pm
Location: Ulm
Contact:

Re: recompile openCL kernel macOS after restart

Post 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.
check out my newest stuff http://q3de.com/research/
portfolio http://q3de.com/


MB Pro i7 2.3Ghz, IrisPro 1.5GB, GTX750m 2GB - BigSur
Xeon X5650@4Ghz, RX 5700 - BigSur , Windows 10, Ubuntu 20.04
Post Reply