Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openPMD plugin: Crash with default parameters (dataPreparationStrategy = doubleBuffer) when compiling a hostonly Alpaka backend #3576

Closed
franzpoeschel opened this issue Apr 7, 2021 · 4 comments
Labels
bug a bug in the project's code component: plugin in PIConGPU plugin

Comments

@franzpoeschel
Copy link
Contributor

I'm not sure if this should be considered a bug, but I ran a little simulation previously with ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=ON. Leaving the default parameters in the openPMD backend yields the error:

Unhandled exception of type 'St13runtime_error' with message 'DataConnector: Invalid dataset ID (MallocMCBuffer)', terminating

When specifying --openPMD.dataPreparationStrategy mappedMemory, the plugin runs fine, so the error is likely to stem from this method. Precise parameters found here.

Two questions:

  1. Should the MallocMC thing work when picking a non-CUDA backend?
  2. If the answer to (1) is "no", i.e. the double buffer strategy is a CUDA-specific thing, should we automatically use the mappedMemory strategy if other Alpaka backends are enabled?
@sbastrakov
Copy link
Member

sbastrakov commented Apr 7, 2021

I am not sure how it's supposed to work, as not familiar with this part. But based on that function alone, perhaps this and that pieces should be in the #ifdef guard (at start and end of that)? The mallocMCBuffer variable is only used inside it, and so the initialization and "finalization" of it could also go there, instead of being done always like now.

@sbastrakov
Copy link
Member

sbastrakov commented Apr 7, 2021

The error means that there was no object of type MallocMCBuffer<DeviceHeap> with the corresponding name registered. Upon looking in the code, we conditionally create and register it here. So it would appear all usage of it should be inside similar #ifdef guards. So how it is implemented now the answer to your question 1 is no. But should it be like that, or it's a bug that it is, I don't know.

@franzpoeschel
Copy link
Contributor Author

Thanks for the hints!

@psychocoderHPC psychocoderHPC added bug a bug in the project's code component: plugin in PIConGPU plugin labels Apr 12, 2021
@psychocoderHPC
Copy link
Member

fixed with #3580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the project's code component: plugin in PIConGPU plugin
Projects
None yet
Development

No branches or pull requests

3 participants