SasView / sasmodels

Package for calculation of small angle scattering models using OpenCL.
BSD 3-Clause "New" or "Revised" License
15 stars 27 forks source link

Ticket 284 fix paractrystal #527

Closed butlerpd closed 1 year ago

butlerpd commented 1 year ago

This should fix the paracrystal model. I would still like to add the write up by @JoGaudet to the documentation before merging but the maths should be correct now.

Closes #284 Closes #384

smk78 commented 1 year ago

Also:

smk78 commented 1 year ago

Oh, and there is a typo in the name of this issue! ;-)

butlerpd commented 1 year ago

no there is no name change. That was in fact the point we pass DNN but the computations need d_a instead in some places so we compute it from DNN "under the hood"

butlerpd commented 1 year ago

This should now be ready for final review - docs have been updated for FCC and SC and the reviewer comments addressed.

butlerpd commented 1 year ago

regarding suggesting use of GPUs, the flag single is set to False which I think means it will not run on the GPUs? In which case suggesting it would just be mean :-)

smk78 commented 1 year ago

regarding suggesting use of GPUs, the flag single is set to False which I think means it will not run on the GPUs? In which case suggesting it would just be mean :-)

single = False just means the model requires double-precision. Thus if a dp-GPU, with suitable OpenCL support, were available these models should run on a GPU. The Note in these docs was therefore updated accordingly. If the flag opencl = False that would be more of a problem...

butlerpd commented 1 year ago

According to @JoGaudet the SC equations are incorrect and need fixing before this can be merged

butlerpd commented 1 year ago

single = False just means the model requires double-precision. Thus if a dp-GPU, with suitable OpenCL support, were available these models should run on a GPU. The Note in these docs was therefore updated accordingly. If the flag opencl = False that would be more of a problem...

Ok ... according to the docs (as @pkienzle pointed out to me) opencl = False is the flag for using the GPU. So yes, the code should run faster with GPU on if it is a "high end" GPU that supports double precision. Good catch @smk78