Watch the talk on McStas at ICNS 2022
PaNOSC contributor, Peter Willendrup (ESS), on behalf of the McStas team, gave an online talk entitled Speeding up legacy: GPU-accelerating the McStas instrument simulation code using OpenACC, at the International Conference on Neutron Scattering – ICNS 2022, which took place in Buenos Aires from 21 to 25 August.
The McStas neutron ray-tracing simulation package is a versatile tool for producing accurate simulations of neutron scattering instruments at reactors, short- and long-pulsed spallation sources such as the European Spallation Source.
McStas is extensively used for design and optimisation of instruments, virtual experiments, data analysis and user training. McStas was founded as a scientific, open-source collaborative code in 1997 and thus celebrates 25 years of service to the neutron community in 2022.
The contribution presents the project at its current state, with emphasis on recent modernisation-efforts and GPU-acceleration. Using the OpenACC precompiler-mechanism, McStas and its X-ray counterpart McXtrace have received speedups in the range of 10-600 depending on problem size and model complexity.
By a detailed walk-through of a selected instrument example including the utilised components, we will illustrate the few simple steps users should carry out to port their existing instrument-models.