Opened 8 years ago

Closed 8 years ago

#678 closed defect (wontfix)

Hard crash when running complex model on GPU

Reported by: pkienzle Owned by:
Priority: major Milestone: SasView 4.1.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

The attached model crashes sasview when it is run on an Radeon R9 Nano with windows, leaving the screen briefly blank, then not returning (SasView 4.0 release).

Testing again under run.py, and the display went blank, forcing a hard reboot.

Not tested on other hardware/os.

Attachments (2)

KatharinaDataRadomOrientation_SandiaD2O.ABS (22.9 KB) - added by pkienzle 8 years ago.
RandomToOrientedCoreShellShellChains.py (15.1 KB) - added by pkienzle 8 years ago.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by pkienzle

Changed 8 years ago by pkienzle

comment:1 Changed 8 years ago by pkienzle

OS/X result. Maybe don't use arrays?

Error(s) Occurred:
	Traceback (most recent call last):
  File "/Users/pkienzle/Source/sasview-new/src/sas/sascalc/data_util/calcthread.py", line 268, in _run
    self.compute(*args, **kwargs)
RuntimeError: clBuildProgram failed: build program failure - 

Build on <pyopencl.Device 'HD Graphics 4000' on 'Apple' at 0x1024400>:

/Users/pkienzle/.sasview/plugin_models/RandomToOrientedCoreShellShellChains.py:153:33: error: array initializer must be an initializer list
    float CrossSection[4][5] = {0.0f};
                                ^
/Users/pkienzle/.sasview/plugin_models/RandomToOrientedCoreShellShellChains.py:161:19: warning: unused variable 'phi'
            float phi = (b*45.0f)*M_PI_180;
                  ^

(options: -I /Users/pkienzle/anaconda/envs/bumps/lib/python2.7/site-packages/pyopencl/cl)
(source saved as /var/folders/yd/50j1j6_x4dl0gj5ns3thq0n00011yf/T/tmpED94r1.cl)


Further information might be available in the Console log (bottom right corner).

comment:2 Changed 8 years ago by pkienzle

After "fixing" the initialization error, I get the following. This code is too big to run on the HD 4000, and needs to be forced onto the CPU.

Error(s) Occurred:
	Traceback (most recent call last):
  File "/Users/pkienzle/Source/sasview-new/src/sas/sascalc/data_util/calcthread.py", line 268, in _run
    self.compute(*args, **kwargs)
RuntimeError: clBuildProgram failed: build program failure - 

Build on <pyopencl.Device 'HD Graphics 4000' on 'Apple' at 0x1024400>:

Error: internal error.

(options: -I /Users/pkienzle/anaconda/envs/bumps/lib/python2.7/site-packages/pyopencl/cl)
(source saved as /var/folders/yd/50j1j6_x4dl0gj5ns3thq0n00011yf/T/tmpbgdZdw.cl)


Further information might be available in the Console log (bottom right corner).

comment:3 Changed 8 years ago by pkienzle

This model has a significant amount of code that depends only on viewing angle and not on q so it could be precomputed. It requires significant memory which does not need to be in the local register space when executing the kernel for particular q values.

Extending the computation model so that an initialization kernel can be called before the polydispersity kernel is beyond the scope of this ticket.

Last edited 8 years ago by pkienzle (previous) (diff)

comment:4 Changed 8 years ago by pkienzle

  • Resolution set to wontfix
  • Status changed from new to closed

Cannot fix.

When users can create and run arbitrary C code on the GPU, we cannot guarantee that the program will be well behaved. The best we can do is make it possible to run the code on the CPU when it is too complex for the GPU.

Note: See TracTickets for help on using tickets.