McCode icon indicating copy to clipboard operation
McCode copied to clipboard

MCPL_input produces slightly different results on GPU and CPU

Open willend opened this issue 1 year ago • 2 comments

Revisit algorithm differences OpenACC vs not. It seems there is differences apart from reading in INIT vs TRACE.

Visible when "repeating".

willend avatar Oct 15 '22 19:10 willend

Something is also off wrt. the positions and velocities, below output generated using Event_monitor_simple in McStas

mcstas-3.x-dev env WOF_SANS_GPUsetup $ head -10 Test_MCPL_input_cpu_20221015_215650/Events.log Test_MCPL_input_gpu_20221015_215650/Events.log 
==> Test_MCPL_input_cpu_20221015_215650/Events.log <==
# Event-file Test_MCPL_input_cpu_20221015_215650/Events.log, contains 1000000 events
########################################### START EVENT LIST ##############################################
#   id        x        y        z       vx       vy       vz        t       sx       sy       sz        p # 
###########################################################################################################
     0  -0.0048  -0.0013        0     -7.2      9.2  4.6e+02  0.00097        0        0        0  2.1e+07 
     1   0.0034  -0.0024        0       15       14  6.4e+02   0.0003        0        0        0  6.8e+07 
     2  -0.0032  0.00051        0      7.9      5.1  7.2e+02  0.00038        0        0        0  9.8e+07 
     3  -0.0028   0.0024        0      -11      6.1  3.7e+02  4.4e-05        0        0        0  8.8e+06 
     4 -0.00026  0.00082        0      -11      1.2  3.8e+02  0.00045        0        0        0    1e+07 
     5  -0.0028   0.0025        0       40       30  1.4e+03  3.6e-05        0        0        0  2.1e+08 

==> Test_MCPL_input_gpu_20221015_215650/Events.log <==
# Event-file Test_MCPL_input_gpu_20221015_215650/Events.log, contains 1000000 events
########################################### START EVENT LIST ##############################################
#   id        x        y        z       vx       vy       vz        t       sx       sy       sz        p # 
###########################################################################################################
     0  -0.0048 -0.00091 -0.00034     -7.1      9.2  4.5e+02  0.00097        0        0        0  2.1e+07 
     1   0.0036   -0.002 -0.00034       16       15  6.6e+02   0.0003        0        0        0  6.8e+07 
     2  -0.0032  0.00062 -0.00035      8.1      5.2  7.4e+02  0.00038        0        0        0  9.8e+07 
     3  -0.0027   0.0024  0.00048      -11      5.9  3.6e+02  4.4e-05        0        0        0  8.8e+06 
     4  0.00036  0.00059  0.00021      -11      1.2  3.8e+02  0.00045        0        0        0    1e+07 
     5  -0.0025   0.0027  0.00032       38       29  1.4e+03  3.6e-05        0        0        0  2.1e+08 

willend avatar Oct 15 '22 20:10 willend

Pending: Update component docs.

willend avatar Oct 17 '22 09:10 willend