Open plexoos opened 1 week ago
I think we should have a test comparing the CPU and GPU outputs. It would help significantly with debugging and refactoring.
In [16]: np.allclose(a.f.record[0,1:4], b.f.record[0,0:3])
Out[16]: True
In [17]: (a.f.record[0,1:4] == b.f.record[0,0:3]).all()
Out[17]: False
I think we should have a test comparing the CPU and GPU outputs. It would help significantly with debugging and refactoring.
In [16]: np.allclose(a.f.record[0,1:4], b.f.record[0,0:3]) Out[16]: True In [17]: (a.f.record[0,1:4] == b.f.record[0,0:3]).all() Out[17]: False
Do you expect absolute precision? There are Python methods that allow you to define the precision in tests like this one.
No, I don't expect identical results for floating point numbers. The numpy's allclose function has reasonable defaults but can be tweaked if necessary.
Right on...
A test comparing photon states produced with CPU and GPU pipelines is implemented in #31 8 out of 100 photons have different histories but the values seem to be reproducible.
Example command:
Assuming the environment variables:
the output is saved to
/tmp/myname/GEOM/mygeom/simg4ox/ALL0/
Issue: Initial photon states are not included in the CPU output (?)