Closed YarlBoro closed 5 years ago
Thanks for reporting this, I will try to reproduce ASAP
On Sep 12, 2018, at 10:19 AM, Michał notifications@github.com wrote:
Versions of mandelbulber2: 2.14 Official Release 2.15 Alpha2
Hardware and OS:
1
MacBook Pro 15" 2011, GPU: Radeon HD 6750M 1 GB MacOS Sierra 10.12.6
2
Hackintosh Desktop PC, GPU: Radeon R9 380 4 GB MacOS Sierra 10.12.6
Two rigs, same problem.
Problem: Any attempt to render image with OpenCL enabled immediately causes error (screen attached). CPU only mode works properly (alpha, z-buffer, surface normals included).
Steps to reproduce: Try rendering with any OpenCL mode enabled. All modes (fast, medium or full) will fail.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Thanks for looking into it!
OpenCL works on my Mac with the integrated GPU but fails on the discrete GPU (even using bleeding edge build.)
Thanks for the additional information. I am still working on getting remote access to some Apple hardware, the virtual machine I’ve been using to develop does not have a GPU. We will make this issue a priority as macOS build needs to work before 2.15 release.
On Sep 20, 2018, at 4:38 PM, KnifeOfPi notifications@github.com wrote:
OpenCL works on my Mac with the integrated GPU but fails on the discrete GPU (even using bleeding edge build.)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Thanks @mancoast, I'll be here to test your handiwork. Keep us posted. :D
I also see the GPU failure when using the Radeon 555 GPU:
Partial crash report:
Thread 2 Crashed:: RenderJob Dispatch queue: opencl_runtime 0 libsystem_kernel.dylib 0x00007fff59e2db66 __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff59ff8080 pthread_kill + 333 2 libsystem_c.dylib 0x00007fff59d891ae abort + 127 3 libGPUSupportMercury.dylib 0x00007fff4a9170f1 gpusGenerateCrashLog + 168 4 com.apple.driver.AppleIntelKBLGraphicsGLDriver 0x000000010cdfe2e9 gpusKillClientExt + 9 5 libGPUSupportMercury.dylib 0x00007fff4a917ab0 gpusQueueSubmitDataBuffers + 171 6 com.apple.driver.AppleIntelKBLGraphicsGLDriver 0x000000010c4ccc87 IntelCLCommandBuffer::getNew(GLDQueueRec) + 31 7 com.apple.driver.AppleIntelKBLGraphicsGLDriver 0x000000010c4ccb6f intelSubmitCLCommands(GLDQueueRec, unsigned int) + 69 8 com.apple.driver.AppleIntelKBLGraphicsGLDriver 0x000000010c4ccabc CHAL_INTEL::ChalContext::ChalFlush() + 82 9 com.apple.driver.AppleIntelKBLGraphicsGLDriver 0x000000010c4cca2b gldFinishQueue + 43 10 com.apple.opencl 0x00007fff3a6260c1 0x7fff3a618000 + 57537 11 com.apple.opencl 0x00007fff3a626567 0x7fff3a618000 + 58727 12 com.apple.opencl 0x00007fff3a6436d6 0x7fff3a618000 + 177878 13 com.apple.opencl 0x00007fff3a646a86 0x7fff3a618000 + 191110 14 libdispatch.dylib 0x00007fff59ca3db8 _dispatch_client_callout + 8 15 libdispatch.dylib 0x00007fff59cb71e1 _dispatch_queue_barrier_sync_invoke_and_complete + 60 16 com.apple.opencl 0x00007fff3a64690a 0x7fff3a618000 + 190730 17 com.apple.opencl 0x00007fff3a64284d 0x7fff3a618000 + 174157 18 com.apple.opencl 0x00007fff3a638023 clEnqueueReadBuffer + 760 19 com.yourcompany.mandelbulber2 0x0000000105f6a82c cOpenClEngine::ReadBuffersFromQueue() + 220 20 com.yourcompany.mandelbulber2 0x0000000105f7c689 cOpenClEngineRenderFractal::Render(cImage, bool, sRenderData) + 1753 21 com.yourcompany.mandelbulber2 0x0000000105fb520b cRenderJob::Execute() + 6043 22 com.yourcompany.mandelbulber2 0x0000000105fb72ae cRenderJob::slotExecute() + 14 23 org.qt-project.QtCore 0x00000001075b639b QMetaObject::activate(QObject, int, int, void**) + 2923 24 org.qt-project.QtCore 0x00000001073cd6a8 QThread::started(QThread::QPrivateSignal) + 56 25 org.qt-project.QtCore 0x00000001073d6324 0x1073a9000 + 185124 26 libsystem_pthread.dylib 0x00007fff59ff5661 _pthread_body + 340 27 libsystem_pthread.dylib 0x00007fff59ff550d _pthread_start + 377 28 libsystem_pthread.dylib 0x00007fff59ff4bf9 thread_start + 13
==============================
Entire crash report:
Process: mandelbulber2 [55117] Path: /Applications/mandelbulber2.app/Contents/MacOS/mandelbulber2 Identifier: com.yourcompany.mandelbulber2 Version: 0 Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: mandelbulber2 [55117] User ID: 502
Date/Time: 2018-11-07 00:27:18.360 -0500 OS Version: Mac OS X 10.13.6 (17G65) Report Version: 12 Bridge OS Version: 3.0 (14Y664) Anonymous UUID: 78C2AAD5-997A-8D08-0950-A924B6FABEBE
Sleep/Wake UUID: 59CC5972-3F27-4DAF-BCFF-9C48FC7E1B37
Time Awake Since Boot: 3300000 seconds Time Since Wake: 46000 seconds
System Integrity Protection: enabled
Crashed Thread: 2 RenderJob Dispatch queue: opencl_runtime
Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information: abort() called
Application Specific Signatures: Graphics hardware encountered an error and was reset: 0x00000813
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff59e2420a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff59e23724 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff31e9d785 CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff31e9cad7 CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff31e9c153 CFRunLoopRunSpecific + 483
5 com.apple.HIToolbox 0x00007fff31186d96 RunCurrentEventLoopInMode + 286
6 com.apple.HIToolbox 0x00007fff31186b06 ReceiveNextEventCommon + 613
7 com.apple.HIToolbox 0x00007fff31186884 _BlockUntilNextEventMatchingListInModeWithFilter + 64
8 com.apple.AppKit 0x00007fff2f437a73 _DPSNextEvent + 2085
9 com.apple.AppKit 0x00007fff2fbcde34 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044
10 com.apple.AppKit 0x00007fff2f42c885 -[NSApplication run] + 764
11 libqcocoa.dylib 0x00000001099f661d 0x1099cc000 + 173597
12 org.qt-project.QtCore 0x000000010758138e QEventLoop::exec(QFlags
Thread 1:: com.apple.NSEventThread 0 libsystem_kernel.dylib 0x00007fff59e2420a mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff59e23724 mach_msg + 60 2 com.apple.CoreFoundation 0x00007fff31e9d785 CFRunLoopServiceMachPort + 341 3 com.apple.CoreFoundation 0x00007fff31e9cad7 CFRunLoopRun + 1783 4 com.apple.CoreFoundation 0x00007fff31e9c153 CFRunLoopRunSpecific + 483 5 com.apple.AppKit 0x00007fff2f574fc4 _NSEventThread + 184 6 libsystem_pthread.dylib 0x00007fff59ff5661 _pthread_body + 340 7 libsystem_pthread.dylib 0x00007fff59ff550d _pthread_start + 377 8 libsystem_pthread.dylib 0x00007fff59ff4bf9 thread_start + 13
Thread 2 Crashed:: RenderJob Dispatch queue: opencl_runtime 0 libsystem_kernel.dylib 0x00007fff59e2db66 __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff59ff8080 pthread_kill + 333 2 libsystem_c.dylib 0x00007fff59d891ae abort + 127 3 libGPUSupportMercury.dylib 0x00007fff4a9170f1 gpusGenerateCrashLog + 168 4 com.apple.driver.AppleIntelKBLGraphicsGLDriver 0x000000010cdfe2e9 gpusKillClientExt + 9 5 libGPUSupportMercury.dylib 0x00007fff4a917ab0 gpusQueueSubmitDataBuffers + 171 6 com.apple.driver.AppleIntelKBLGraphicsGLDriver 0x000000010c4ccc87 IntelCLCommandBuffer::getNew(GLDQueueRec) + 31 7 com.apple.driver.AppleIntelKBLGraphicsGLDriver 0x000000010c4ccb6f intelSubmitCLCommands(GLDQueueRec, unsigned int) + 69 8 com.apple.driver.AppleIntelKBLGraphicsGLDriver 0x000000010c4ccabc CHAL_INTEL::ChalContext::ChalFlush() + 82 9 com.apple.driver.AppleIntelKBLGraphicsGLDriver 0x000000010c4cca2b gldFinishQueue + 43 10 com.apple.opencl 0x00007fff3a6260c1 0x7fff3a618000 + 57537 11 com.apple.opencl 0x00007fff3a626567 0x7fff3a618000 + 58727 12 com.apple.opencl 0x00007fff3a6436d6 0x7fff3a618000 + 177878 13 com.apple.opencl 0x00007fff3a646a86 0x7fff3a618000 + 191110 14 libdispatch.dylib 0x00007fff59ca3db8 _dispatch_client_callout + 8 15 libdispatch.dylib 0x00007fff59cb71e1 _dispatch_queue_barrier_sync_invoke_and_complete + 60 16 com.apple.opencl 0x00007fff3a64690a 0x7fff3a618000 + 190730 17 com.apple.opencl 0x00007fff3a64284d 0x7fff3a618000 + 174157 18 com.apple.opencl 0x00007fff3a638023 clEnqueueReadBuffer + 760 19 com.yourcompany.mandelbulber2 0x0000000105f6a82c cOpenClEngine::ReadBuffersFromQueue() + 220 20 com.yourcompany.mandelbulber2 0x0000000105f7c689 cOpenClEngineRenderFractal::Render(cImage, bool, sRenderData) + 1753 21 com.yourcompany.mandelbulber2 0x0000000105fb520b cRenderJob::Execute() + 6043 22 com.yourcompany.mandelbulber2 0x0000000105fb72ae cRenderJob::slotExecute() + 14 23 org.qt-project.QtCore 0x00000001075b639b QMetaObject::activate(QObject, int, int, void**) + 2923 24 org.qt-project.QtCore 0x00000001073cd6a8 QThread::started(QThread::QPrivateSignal) + 56 25 org.qt-project.QtCore 0x00000001073d6324 0x1073a9000 + 185124 26 libsystem_pthread.dylib 0x00007fff59ff5661 _pthread_body + 340 27 libsystem_pthread.dylib 0x00007fff59ff550d _pthread_start + 377 28 libsystem_pthread.dylib 0x00007fff59ff4bf9 thread_start + 13
Thread 3: 0 libsystem_kernel.dylib 0x00007fff59e2e28a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff59ff520e _pthread_wqthread + 1552 2 libsystem_pthread.dylib 0x00007fff59ff4be9 start_wqthread + 13
Thread 4: 0 libsystem_kernel.dylib 0x00007fff59e2e28a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff59ff5009 _pthread_wqthread + 1035 2 libsystem_pthread.dylib 0x00007fff59ff4be9 start_wqthread + 13
Thread 2 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x000070000cae8000 rcx: 0x000070000cae6eb8 rdx: 0x0000000000000000 rdi: 0x000000000001df23 rsi: 0x0000000000000006 rbp: 0x000070000cae6ef0 rsp: 0x000070000cae6eb8 r8: 0x000070000cae6cc0 r9: 0x0000000000000010 r10: 0x0000000000000000 r11: 0x0000000000000206 r12: 0x000000000001df23 r13: 0x000070000cae7130 r14: 0x0000000000000006 r15: 0x000000000000002d rip: 0x00007fff59e2db66 rfl: 0x0000000000000206 cr2: 0x00007fff927ce168
Logical CPU: 0 Error Code: 0x02000148 Trap Number: 133
Binary Images:
0x105dec000 - 0x10654efff +com.yourcompany.mandelbulber2 (0)
External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 13 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 15620320 thread_create: 0 thread_set_state: 0
VM Region Summary: ReadOnly portion of Libraries: Total=473.9M resident=0K(0%) swapped_out_or_unallocated=473.9M(100%) Writable regions: Total=2.5G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.5G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Accelerate framework 256K 3 Activity Tracing 256K 2 CG backing stores 36.8M 7 CG image 392K 25 CoreAnimation 1100K 26 CoreGraphics 8K 2 CoreImage 28K 4 CoreUI image data 5196K 38 CoreUI image file 348K 8 Foundation 16.0M 5 Image IO 12K 2 Kernel Alloc Once 8K 2 MALLOC 2.4G 145 MALLOC guard page 48K 10 Memory Tag 242 12K 2 Memory Tag 251 24K 2 OpenCL 64K 3 STACK GUARD 56.0M 6 Stack 10.0M 6 VM_ALLOCATE 200K 29 DATA 39.4M 363 FONT_DATA 4K 2 GLSLBUILTINS 2588K 2 LINKEDIT 201.5M 40 TEXT 272.4M 362 UNICODE 560K 2 mapped file 230.6M 74 shared memory 4720K 20 =========== ======= ======= TOTAL 3.3G 1164
Model: MacBookPro14,3, BootROM MBP143.0178.B00, 4 processors, Intel Core i7, 2.8 GHz, 16 GB, SMC 2.45f0 Graphics: Radeon Pro 555, Radeon Pro 555, PCIe Graphics: Intel HD Graphics 630, Intel HD Graphics 630, Built-In Memory Module: BANK 0/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C31473332443450472D30393320 Memory Module: BANK 1/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C31473332443450472D30393320 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x173), Broadcom BCM43xx 1.0 (7.77.37.31.1a9) Bluetooth: Version 6.0.7f10, 3 services, 27 devices, 1 incoming serial ports USB Device: USB 3.0 Bus USB Device: iBridge Thunderbolt Bus: MacBook Pro, Apple Inc., 33.1 Thunderbolt Bus: MacBook Pro, Apple Inc., 33.1
I see that on MacOS we have all possible kind of OpenCl errors: compiler errors, platform/device identification errors, runtime errors. I think 95% of problems are caused by graphics drivers and poor implementation of OpenCL on MacOS.
The last error reported by @bunnysoup looks like GPU timeout error (probably similar to timeout issue under Windows). I hope there is some way to disable GPU watchdog in MacOS.
Some more info for triggering the problem above:
OpenCL option and memory settings don't seem relevant. The failure occurs when renders reaches a diffuse area subject to DE_factor. There seems to be some interaction between DE_factor < 0.125 and detail_level > 8. Very small images (<1Mpx) don't fail. Larger images fail as DE_factor decreases and detail_level increases, but I haven't pinned down exactly how they are interacting.
@bunnysoup , after your latest comment now I'm sure that it is GPU timeout problem. When DE_factor is low and detail level high, there is quite long time to render one tile of image (to process one single job (workgroup) by GPU). Now there is needed to figure out how to disable GPU watchdog on MacOS. On Linux watchdog is disabled by default. On Windows we are disabling it by adding registry entry using regedit.
@buddhi1980
OK, thanks, good to know. Do you have access to Mac hardware yet? Need me to run any specific tests?
I'm trying lower iterations now (N == 256) seemed to work better yesterday).
Also, a timeout problem makes sense, because there is a few seconds' pause before the crash.
@mancoast probably have some access to Mac hardware. Maybe he can find solution.
This information is great. I do have access to Mac hardware now and will get this operational ASAP (hopefully this weekend if I can finish the honey-do-list with time to spare). I can also reproduce these errors and am thinking for 2.15 fix that and we release on the Apple Store 😎
On Nov 7, 2018, at 1:37 PM, Krzysztof Marczak notifications@github.com wrote:
@mancoast probably have some access to Mac hardware. Maybe he can find solution.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@mancoast I have an Apple developer account if you need :)
Thanks for the offer @luchansky . I also have an account for apple store. @buddhi1980 please review this log and let me know what you think. Also the system operates with openCL on "Fast" mode. full_OCL.mandelbulber_log.txt
Hi - would like to report that with certain settings on v2.15 release, discrete GPU render works on macOS in 'medium' mode. Compile time is still egregiously slow for first time but faster thereafter.
"Full" is still broken. Edit: Actually full is not broken. It just takes around 1-2 minutes to initialize!! Edit 2: Interestingly it's only around 50% faster than CPU. This is on a 560X.
[main_parameters] ambient_occlusion_enabled true; camera 6.331865617276508 -3.098686986647213 1.973310693387694; camera_distance_to_target 0.9799672961235052; camera_rotation 111.072718533952 9.105609312538615 0; camera_top 0.1476714248503795 0.05690089206269259 0.9873983181903485; detail_level 2; fake_lights_enabled true; file_background /Users/knife/Downloads/mandelbulber2/mandelbulber2/qmake/mandelbulber2.app/textures/background.jpg; file_envmap /Users/knife/Downloads/mandelbulber2/mandelbulber2/qmake/mandelbulber2.app/textures/envmap.jpg; file_lightmap /Users/knife/Downloads/mandelbulber2/mandelbulber2/qmake/mandelbulber2.app/textures/lightmap.jpg; flight_last_to_render 99999; formula_1 8; image_height 2400; image_width 3200; keyframe_last_to_render 0; mat1_is_defined true; raytraced_reflections true; target 5.428957167809067 -3.446596518079543 2.128395158407411; [fractal_1] mandelbox_generalized_fold_type fold_dodeca;
Greetings @luchansky
I have started a few posts on the apple developer forum, but most people there balk at opencl because it is being phased out. We might have to develop a new strategy for macOS GPU support. @buddhi1980 what are your thoughts here?
Hello, I have problems too to use the OpenCL engine with Mandelbulber 2.17 on macOS 10.13.6. GPU: GTX 980ti - OpenCL 4.3 is running fine on other software.
So I guess it is possible to get it to work. I will try 2.15 to see if I can use it with my machine. Thanks to all, regards FrameKarl
Mac & i OpenCL Benchmark 1.0 (1) 2019-04-23 15:47:03 +0000 iMac14,2 ( { deviceAdressBits = 64; deviceID = "<00270201 00000000>"; deviceName = "GeForce GTX 980 Ti"; deviceType = 4; deviceVersion = "OpenCL 1.2 "; globalMemSize = 6442450944; localMemSize = 49152; maxClockFrequency = 1190; maxComputeUnits = 22; maxWorkGroupSize = 1024; preferedVectorWidthFloat = 1; }, { deviceAdressBits = 64; deviceID = "<ffffffff 00000000>"; deviceName = "Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz"; deviceType = 2; deviceVersion = "OpenCL 1.2 "; globalMemSize = 34359738368; localMemSize = 32768; maxClockFrequency = 3492; maxComputeUnits = 8; maxWorkGroupSize = 1024; preferedVectorWidthFloat = 4; } )
GeForce GTX 980 Ti, VW 1 4096 x 4096 pixel in 39.84 ms 421.08 megapixel per second 1768.52 GFLOPS
GeForce GTX 980 Ti, VW 4 4096 x 4096 pixel in 61.29 ms 273.75 megapixel per second 1149.74 GFLOPS
GeForce GTX 980 Ti, VW 8 4096 x 4096 pixel in 87.01 ms 192.82 megapixel per second 809.85 GFLOPS
Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz, VW 1 4096 x 4096 pixel in 2725.77 ms 6.16 megapixel per second 25.85 GFLOPS
Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz, VW 4 4096 x 4096 pixel in 874.54 ms 19.18 megapixel per second 80.57 GFLOPS
Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz, VW 8 4096 x 4096 pixel in 686.69 ms 24.43 megapixel per second 102.61 GFLOPS
All OpenCL devices together, VW ( 1, 8 ) 4096 x 4096 pixel in 62.38 ms 268.95 megapixel per second 1129.60 GFLOPS
done.
Versions of mandelbulber2: 2.14 Official Release 2.15 Alpha2
Hardware and OS:
1
MacBook Pro 15" 2011, GPU: Radeon HD 6750M 1 GB MacOS Sierra 10.12.6
2
Hackintosh Desktop PC, GPU: Radeon R9 380 4 GB MacOS Sierra 10.12.6
Two rigs, same problem.
Problem: Any attempt to render image with OpenCL enabled immediately causes error (screen attached). CPU only mode works properly (alpha, z-buffer, surface normals included).
Steps to reproduce: Try rendering with any OpenCL mode enabled. All modes (fast, medium or full) will fail.