Open j-stephan opened 5 years ago
Unfortunately I was not able to reproduce this error.
I used the current develop
Version of alpaka, your supplied code and GCC 9.1.0 on the hemera GPU partition.
As an accelerator device I used CpuOmp4
.
Are the input files located at the correct locations? What kind of input do you use?
Okay, I figured this one out. On my laptop the initial call to malloc
inside Filecache
fails as I don't have 16GiB of RAM. In this case, malloc
returns a nullptr
. This case isn't checked in Filecache
and the resulting nullptr
is then happily passed on, resulting in the segmentation fault later on.
This makes me wonder: Do we need the entire 16GiB at once? Or could a streaming dataflow be implemented?
Thanks for this information! We will check for nullptr
s in future version to prevent this from happening again.
We decided to load the data upfront because it would probably bottleneck the algorithm later. It is later intended for this algorithm to get data directly from the detector via network. Therefore, streaming the data from disk might affect benchmarks unfairly and negatively which is why we decided to load the data up front. This means loading the gain maps (~12MiB), the pedestal initialization data (~3GiB) and the main data (~10 GiB).
If you want to execute the algorithm with less main memory required, you could reduce the main data set and adjust the FileCache
constructor call in the main.cpp
on line 23 accordingly:
FileCache
constructor the size in bytes of the cache it will allocate. So if you would reduce the main data set to 1,000 frames and adjust the FileCache
constructor call to 1024UL * 1024 * 1024 * 4.5
, the program should consume (depending on other parameters like TDevFrames
in the Config
struct and other allocations in the main.cpp
) less than 6-7 GiB.
Alternatively, streaming from disk could be implemented by loading small chunks on demand and feeding them into the Dispenser::uploadData()
function. The returned std::future
will be accessible as soon as the data processing is done and the buffer can be freed or reused.
I am currently trying to get my SYCL port to run. Unfortunately it crashes with a segmentation fault right at the first call site of
FileCache::loadMaps()
. At first I believed this to be an issue in my SYCL port but it turns out that this happens with vanilla Alpaka (currentdevelop
) and OpenMP, too.gdb output:
Compiler invocation:
The changes I've made to the jungfrau-photoncounter code are SYCL related and should only affect the device code (all changes here), so I believe this to be a bug in vanilla jungfrau-photoncounter.